Querying Guest Shell Information
This section contains payload examples to demonstrate how to use the NX-API REST API to control the state of the Guest Shell on the Cisco Nexus 3000 and 9000 Series switches.
For more information about the Guest Shell, see the Cisco Nexus 9000 Series NX-OS Programmability Guide:
Obtaining Guest Shell Status
Obtaining Guest Shell Status
GET http://<IP_Address>/api/mo/sys/guestshell/status.json
{
"guestshellStatus": {
"attributes": {
"dn": "sys/guestshell/status",
"lastActionStatus": "Successfully activated virtual service",
"operState": "activated"
}
}
}
Note: This example was added in Cisco NX-OS Release 9.3(3).
You can subscribe the status change notification as described in the Subscribing to Query Results section of the following chapter:
guestshellStatus Properties
The following table contains information about the guestshellStatus 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 |
---|---|---|---|
lastActionStatus | string:Basic | Status/result of last action performed on the Guest Shell | A sequence of characters |
operState | guestshell:GuestShellOperState (scalar:Enum8) | Operational state of the Guest Shell | SELECTION: 0 - unknown 1 - initializing 2 - provisioned 3 - configured 4 - installing 5 - installed 6 - install-failed 7 - install-verify-failed 8 - activating 9 - activated 10 - activate-failed 11 - deactivated 12 - deactivating 13 - restarting 14 - not-installed 15 - error DEFAULT: unknown |
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:
Obtaining Guestshell Resource Information
Obtaining Guestshell Resource Information
GET http://<IP_Address>/api/mo/sys/guestshell/resources.json
{
"guestshellResourceInfo": {
"attributes": {
"bootflashAvailable": "1025",
"bootflashCommitted": "250",
"bootflashQuota": "2000",
"cpuAvailable": "19",
"cpuCommitted": "1",
"cpuQuota": "20",
"cpuRequested": "1",
"cpuUtilized": "0",
"dn": "sys/guestshell/resources",
"memAvailable": "5120",
"memCommitted": "256",
"memQuota": "5376",
"memRequested": "256",
"memUtilized": "31",
"rootfsRequested": "250",
"rootfsUtilized": "154"
}
}
}
Note: This example was added in Cisco NX-OS Release 9.3(3).
guestshellResourceInfo Properties
The following table contains information about the guestshellResourceInfo 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 |
---|---|---|---|
bootflashAvailable | guestshell:BootflashResource (scalar:Uint32) | Amount of bootflash space available beneath the quota that may be committed | RANGE: [0, 4294967295] |
bootflashCommitted | guestshell:BootflashResource (scalar:Uint32) | Amount of space used for rootfs and control files | RANGE: [0, 4294967295] |
bootflashQuota | guestshell:BootflashResource (scalar:Uint32) | Maximum bootflash space that may be used | RANGE: [0, 4294967295] |
cpuAvailable | guestshell:CpuResource (scalar:Uint32) | Amount of CPU share beneath the quota that may be committed | RANGE: [0, 4294967295] |
cpuCommitted | guestshell:CpuResource (scalar:Uint32) | Current share of CPU | RANGE: [0, 4294967295] |
cpuQuota | guestshell:CpuResource (scalar:Uint32) | Maximum CPU share allowed | RANGE: [0, 4294967295] |
cpuRequested | guestshell:CpuResource (scalar:Uint32) | Requested share of CPU | RANGE: [0, 4294967295] |
cpuUtilized | guestshell:CpuResource (scalar:Uint32) | Current utilization of CPU resources | RANGE: [0, 4294967295] |
memAvailable | guestshell:MemoryResource (scalar:Uint32) | Amount of memory beneath the quota that may be committed | RANGE: [0, 4294967295] |
memCommitted | guestshell:MemoryResource (scalar:Uint32) | Maximum amount of memory currently allowed to be used | RANGE: [0, 4294967295] |
memQuota | guestshell:MemoryResource (scalar:Uint32) | Maximum memory limit allowed | RANGE: [0, 4294967295] |
memRequested | guestshell:MemoryResource (scalar:Uint32) | Requested memory limit | RANGE: [0, 4294967295] |
memUtilized | guestshell:MemoryResource (scalar:Uint32) | Amount of memory in use | RANGE: [0, 4294967295] |
rootfsRequested | guestshell:BootflashResource (scalar:Uint32) | Requested space for rootfs | RANGE: [0, 4294967295] |
rootfsUtilized | guestshell:BootflashResource (scalar:Uint32) | Current utilization of the rootfs | RANGE: [0, 4294967295] |
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:
Obtaining Guestshell Information
Obtaining Guestshell Information
GET http://<IP_Address>/api/mo/sys/guestshell/info.json
{
"guestshellInfo": {
"attributes": {
"description": "Cisco Systems Guest Shell",
"dn": "sys/guestshell/info",
"packageLocation": "/isanboot/bin/guestshell.ova",
"signingKeyType": "release",
"version": "2.6(0.0)"
}
}
}
Note: This example was added in Cisco NX-OS Release 9.3(3).
guestshellInfo Properties
The following table contains information about the guestshellInfo 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 |
---|---|---|---|
description | string:Basic | Guest Shell description | A sequence of characters |
packageLocation | string:Basic | Location of the Guest Shell package file at the time it was installed | A sequence of characters |
signingKeyType | guestshell:SigningKeyType (scalar:Enum8) | Type of key that was used to sign the Guest Shell source package | SELECTION: 0 - unknown 1 - development 2 - release 3 - unsigned DEFAULT: unknown |
version | string:Basic | Guest Shell version number | A sequence of characters |
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: