Configuring the Maintenance-Mode Profile
You can create a maintenance-mode profile with configuration commands that can be applied during graceful removal or graceful insertion.
For more information, see the Cisco Nexus 9000 Series NX-OS System Management Configuration Guide:
Configuring a Maintenance-Mode Profile
Configuring a Maintenance-Mode Profile
POST http://<IP_Address>/api/mo/sys/mmode/profile-maintenance-mode.json
{
"mmodeProfile": {
"attributes": {
"profType": "maintenance-mode",
}
"children": [
{
"mmodeProfileEntry": {
"attributes": {
"configCmd": "router bgp 100",
"parentSequence": "0",
"sequence": "1",
}
}
},
{
"mmodeProfileEntry": {
"attributes": {
"configCmd": "isolate",
"parentSequence": "1",
"sequence": "2",
}
}
},
{
"mmodeProfileEntry": {
"attributes": {
"configCmd": "router ospf test1",
"parentSequence": "0",
"sequence": "3",
}
}
},
{
"mmodeProfileEntry": {
"attributes": {
"configCmd": "isolate",
"parentSequence": "3",
"sequence": "4",
}
}
}
]
}
}
CLI Commands
|
Verifying a DME Configuration
The following table contains the distinguished name (DN) for each managed object (MO) in the DME payload. Issue a GET request using the DN to verify the configuration was posted or to get information about the configured properties of a particular object.
MO | DN |
---|---|
mmodeProfile | sys/mmode/profile-maintenance-mode |
mmodeProfileEntry | sys/mmode/profile-maintenance-mode/entry-1 |
mmodeProfile Properties
The following table contains information about the mmodeProfile properties in the DME payload. For more information about the properties and MOs, see the NX-API DME Model Reference linked in the Related Documentation section below.
Property Name | Data Type | Description | Values |
---|---|---|---|
profType | mmode:MaintProfileType (scalar:Enum8) | Maintenance Profile Type | SELECTION: 0 - normal-mode 1 - maintenance-mode DEFAULT: normal-mode |
mmodeProfileEntry Properties
The following table contains information about the mmodeProfileEntry properties in the DME payload. For more information about the properties and MOs, see the NX-API DME Model Reference linked in the Related Documentation section below.
Property Name | Data Type | Description | Values |
---|---|---|---|
configCmd | scalar:Bool | Config Command is Valid | SELECTION: true or false |
parentSequence | scalar:Uint16 | Profile Entry Parent Sequence Number | RANGE: [0, 65535] DEFAULT: 0 |
sequence | scalar:Uint16 | Profile Entry Sequence Number | RANGE: [0, 65535] |
Note: Applying mmode payload via REST is only supported in a box that has no pre-existing mmode config and payload needs to be framed from another Cisco Box using NX-API sandbox.
Related Documentation
For other CLI options, see the Cisco Nexus 9000 Series NX-OS Command Reference:
See the NX-API DME Model Reference for detailed information about classes and attributes described in the payload:
https://developer.cisco.com/site/nx-os/docs/nexus-model-reference/
For information about using the payloads, see the Cisco Nexus 9000 Series NX-OS Programmability Guide:
Verifying the Maintenance-Mode Profile Configuration
Verifying the Maintenance-Mode Profile Configuration
GET http://<IP_Address>/api/mo/sys/mmode/profile-maintenance-mode.json?rsp-subtree=full
{
"totalCount": "1",
"imdata": [
{
"mmodeProfile": {
"attributes": {
"childAction": "",
"dn": "sys/mmode/profile-maintenance-mode",
"modTs": "2019-05-15T12:11:02.295+00:00",
"profType": "maintenance-mode",
"status": ""
},
"children": [
{
"mmodeProfileEntry": {
"attributes": {
"childAction": "",
"configCmd": "router ospf test1",
"configCmdValid": "yes",
"modTs": "2019-05-15T12:11:17.610+00:00",
"parentSequence": "0",
"rn": "entry-3",
"sequence": "3",
"status": ""
}
}
},
{
"mmodeProfileEntry": {
"attributes": {
"childAction": "",
"configCmd": "isolate",
"configCmdValid": "yes",
"modTs": "2019-05-15T12:11:19.915+00:00",
"parentSequence": "3",
"rn": "entry-4",
"sequence": "4",
"status": ""
}
}
},
{
"mmodeProfileEntry": {
"attributes": {
"childAction": "",
"configCmd": "isolate",
"configCmdValid": "yes",
"modTs": "2019-05-15T12:09:23.908+00:00",
"parentSequence": "1",
"rn": "entry-2",
"sequence": "2",
"status": ""
}
}
},
{
"mmodeProfileEntry": {
"attributes": {
"childAction": "",
"configCmd": "router bgp 100",
"configCmdValid": "yes",
"modTs": "2019-05-15T12:09:19.692+00:00",
"parentSequence": "0",
"rn": "entry-1",
"sequence": "1",
"status": ""
}
}
}
]
}
}
]
}
Note: This example was added in Release 9.3(1).
CLI Commands
|
Verifying a DME Configuration
The following table contains the distinguished name (DN) for each managed object (MO) in the DME payload. Issue a GET request using the DN to verify the configuration was posted or to get information about the configured properties of a particular object.
MO | DN |
---|---|
mmodeProfile | sys/mmode/profile-maintenance-mode |
mmodeProfileEntry | sys/mmode/profile-maintenance-mode/entry-3 |
mmodeProfile Properties
The following table contains information about the mmodeProfile properties in the DME payload. For more information about the properties and MOs, see the NX-API DME Model Reference linked in the Related Documentation section below.
Property Name | Data Type | Description | Values |
---|---|---|---|
childAction | mo:ModificationChildAction scalar:Bitmask32 | Delete or ignore. For internal use only. | SELECTION:
|
dn | reference:BinRef | A tag or metadata is a non-hierarchical keyword or term assigned to the fabric module. | |
modTs | mo:TStamp (scalar:Date) | The time when this object was last modified. | SELECTION: 0 - never DEFAULT: never |
profType | mmode:MaintProfileType (scalar:Enum8) | Maintenance Profile Type | SELECTION: 0 - normal-mode 1 - maintenance-mode DEFAULT: normal-mode |
status | mo:ModificationStatus (scalar:Bitmask32) | Modification status | SELECTION: 2 - created 4 - modified 8 - deleted 16 - replaced |
mmodeProfileEntry Properties
The following table contains information about the mmodeProfileEntry properties in the DME payload. For more information about the properties and MOs, see the NX-API DME Model Reference linked in the Related Documentation section below.
Property Name | Data Type | Description | Values |
---|---|---|---|
childAction | mo:ModificationChildAction scalar:Bitmask32 | Delete or ignore. For internal use only. | SELECTION:
|
configCmd | scalar:Bool | Config Command is Valid | SELECTION: true or false |
configCmdValid | scalar:Bool | Config Command is Valid | SELECTION: true or false |
modTs | mo:TStamp (scalar:Date) | The time when this object was last modified. | SELECTION: 0 - never DEFAULT: never |
parentSequence | scalar:Uint16 | Profile Entry Parent Sequence Number | RANGE: [0, 65535] DEFAULT: 0 |
rn | reference:BinRN | Identifies an object from its siblings within the context of its parent object. The distinguished name contains a sequence of relative names. | |
sequence | scalar:Uint16 | Profile Entry Sequence Number | RANGE: [0, 65535] |
status | mo:ModificationStatus (scalar:Bitmask32) | Modification status | SELECTION: 2 - created 4 - modified 8 - deleted 16 - replaced |
Related Documentation
For other CLI options, see the Cisco Nexus 9000 Series NX-OS Command Reference:
See the NX-API DME Model Reference for detailed information about classes and attributes described in the payload:
https://developer.cisco.com/site/nx-os/docs/nexus-model-reference/
For information about using the payloads, see the Cisco Nexus 9000 Series NX-OS Programmability Guide:
Configuring a Normal-Mode Profile
Configuring a Normal-Mode Profile
POST http://<IP_Address>/api/mo/sys/mmode/profile-normal-mode.json
{
"mmodeProfile": {
"attributes": {
"profType": "normal-mode",
}
"children": [
{
"mmodeProfileEntry": {
"attributes": {
"configCmd": "router bgp 100",
"parentSequence": "0",
"sequence": "1",
}
}
},
{
"mmodeProfileEntry": {
"attributes": {
"configCmd": "no isolate",
"parentSequence": "1",
"sequence": "2",
}
}
},
{
"mmodeProfileEntry": {
"attributes": {
"configCmd": "router ospf test1",
"parentSequence": "0",
"sequence": "3",
}
}
},
{
"mmodeProfileEntry": {
"attributes": {
"configCmd": "no isolate",
"parentSequence": "3",
"sequence": "4",
}
}
}
]
}
}
CLI Commands
|
Verifying a DME Configuration
The following table contains the distinguished name (DN) for each managed object (MO) in the DME payload. Issue a GET request using the DN to verify the configuration was posted or to get information about the configured properties of a particular object.
MO | DN |
---|---|
mmodeProfile | sys/mmode/profile-normal-mode |
mmodeProfileEntry | sys/mmode/profile-normal-mode/entry-1 |
mmodeProfile Properties
The following table contains information about the mmodeProfile properties in the DME payload. For more information about the properties and MOs, see the NX-API DME Model Reference linked in the Related Documentation section below.
Property Name | Data Type | Description | Values |
---|---|---|---|
profType | mmode:MaintProfileType (scalar:Enum8) | Maintenance Profile Type | SELECTION: 0 - normal-mode 1 - maintenance-mode DEFAULT: normal-mode |
mmodeProfileEntry Properties
The following table contains information about the mmodeProfileEntry properties in the DME payload. For more information about the properties and MOs, see the NX-API DME Model Reference linked in the Related Documentation section below.
Property Name | Data Type | Description | Values |
---|---|---|---|
configCmd | scalar:Bool | Config Command is Valid | SELECTION: true or false |
parentSequence | scalar:Uint16 | Profile Entry Parent Sequence Number | RANGE: [0, 65535] DEFAULT: 0 |
sequence | scalar:Uint16 | Profile Entry Sequence Number | RANGE: [0, 65535] |
Note: Applying mmode payload via REST is only supported in a box that has no pre-existing mmode config and payload needs to be framed from another Cisco Box using NX-API sandbox.
Related Documentation
For other CLI options, see the Cisco Nexus 9000 Series NX-OS Command Reference:
See the NX-API DME Model Reference for detailed information about classes and attributes described in the payload:
https://developer.cisco.com/site/nx-os/docs/nexus-model-reference/
For information about using the payloads, see the Cisco Nexus 9000 Series NX-OS Programmability Guide:
Verifying the Normal-Mode Profile Configuration
Verifying the Normal-Mode Profile Configuration
GET http://<IP_Address>/api/mo/sys/mmode/profile-normal-mode.json?rsp-subtree=full
{
"totalCount": "1",
"imdata": [
{
"mmodeProfile": {
"attributes": {
"childAction": "",
"dn": "sys/mmode/profile-normal-mode",
"modTs": "2019-05-15T12:28:13.309+00:00",
"profType": "normal-mode",
"status": ""
},
"children": [
{
"mmodeProfileEntry": {
"attributes": {
"childAction": "",
"configCmd": "router ospf test1",
"configCmdValid": "yes",
"modTs": "2019-05-15T12:28:25.968+00:00",
"parentSequence": "0",
"rn": "entry-3",
"sequence": "3",
"status": ""
}
}
},
{
"mmodeProfileEntry": {
"attributes": {
"childAction": "",
"configCmd": "no isolate",
"configCmdValid": "yes",
"modTs": "2019-05-15T12:28:28.579+00:00",
"parentSequence": "3",
"rn": "entry-4",
"sequence": "4",
"status": ""
}
}
},
{
"mmodeProfileEntry": {
"attributes": {
"childAction": "",
"configCmd": "no isolate",
"configCmdValid": "yes",
"modTs": "2019-05-15T12:28:21.419+00:00",
"parentSequence": "1",
"rn": "entry-2",
"sequence": "2",
"status": ""
}
}
},
{
"mmodeProfileEntry": {
"attributes": {
"childAction": "",
"configCmd": "router bgp 100",
"configCmdValid": "yes",
"modTs": "2019-05-15T12:28:17.854+00:00",
"parentSequence": "0",
"rn": "entry-1",
"sequence": "1",
"status": ""
}
}
}
]
}
}
]
}
Note: This example was added in Release 9.3(1).
CLI Commands
|
Verifying a DME Configuration
The following table contains the distinguished name (DN) for each managed object (MO) in the DME payload. Issue a GET request using the DN to verify the configuration was posted or to get information about the configured properties of a particular object.
MO | DN |
---|---|
mmodeProfile | sys/mmode/profile-normal-mode |
mmodeProfileEntry | sys/mmode/profile-normal-mode/entry-3 |
mmodeProfile Properties
The following table contains information about the mmodeProfile properties in the DME payload. For more information about the properties and MOs, see the NX-API DME Model Reference linked in the Related Documentation section below.
Property Name | Data Type | Description | Values |
---|---|---|---|
childAction | mo:ModificationChildAction scalar:Bitmask32 | Delete or ignore. For internal use only. | SELECTION:
|
dn | reference:BinRef | A tag or metadata is a non-hierarchical keyword or term assigned to the fabric module. | |
modTs | mo:TStamp (scalar:Date) | The time when this object was last modified. | SELECTION: 0 - never DEFAULT: never |
profType | mmode:MaintProfileType (scalar:Enum8) | Maintenance Profile Type | SELECTION: 0 - normal-mode 1 - maintenance-mode DEFAULT: normal-mode |
status | mo:ModificationStatus (scalar:Bitmask32) | Modification status | SELECTION: 2 - created 4 - modified 8 - deleted 16 - replaced |
mmodeProfileEntry Properties
The following table contains information about the mmodeProfileEntry properties in the DME payload. For more information about the properties and MOs, see the NX-API DME Model Reference linked in the Related Documentation section below.
Property Name | Data Type | Description | Values |
---|---|---|---|
childAction | mo:ModificationChildAction scalar:Bitmask32 | Delete or ignore. For internal use only. | SELECTION:
|
configCmd | scalar:Bool | Config Command is Valid | SELECTION: true or false |
configCmdValid | scalar:Bool | Config Command is Valid | SELECTION: true or false |
modTs | mo:TStamp (scalar:Date) | The time when this object was last modified. | SELECTION: 0 - never DEFAULT: never |
parentSequence | scalar:Uint16 | Profile Entry Parent Sequence Number | RANGE: [0, 65535] DEFAULT: 0 |
rn | reference:BinRN | Identifies an object from its siblings within the context of its parent object. The distinguished name contains a sequence of relative names. | |
sequence | scalar:Uint16 | Profile Entry Sequence Number | RANGE: [0, 65535] |
status | mo:ModificationStatus (scalar:Bitmask32) | Modification status | SELECTION: 2 - created 4 - modified 8 - deleted 16 - replaced |
Related Documentation
For other CLI options, see the Cisco Nexus 9000 Series NX-OS Command Reference:
See the NX-API DME Model Reference for detailed information about classes and attributes described in the payload:
https://developer.cisco.com/site/nx-os/docs/nexus-model-reference/
For information about using the payloads, see the Cisco Nexus 9000 Series NX-OS Programmability Guide: