show install committed
show install committed
import json
"""
Modify these please
"""
url='http://<IP_Address>/ins'
switchuser='<User_ID>'
switchpassword='<Password>'
myheaders={'content-type':'application/json'}
payload={
"ins_api":{
"version": "1.0",
"type": "cli_show",
"chunk": "0",
"sid": "1",
"input": "show install committed",
"output_format": "json"
}
response = requests.post(url,data=json.dumps(payload), headers=myheaders,auth=(switchuser,switchpassword)).json()
output = json.dumps(response, indent=4, sort_keys=True)
{
"ins_api": {
"type": "cli_show",
"version": "1.0",
"sid": "eoc",
"outputs": {
"output": {
"input": "show install committed",
"msg": "Success",
"code": "200",
"body": {
"curr_nxos_image": "bootflash:/nxos.9.2.1.bin-260-CCO",
"TABLE_package_list": {
"ROW_package_list": {
"package_id": {}
}
},
"TABLE_smu_list": {
"ROW_smu_list": {
"install_smu_id": "nxos.IGMP_RESTART-n9k_ALL-1.0.0-9.2.1.lib32_n9000\n"
}
}
}
}
}
}
}
The CLI output example below corresponds to the payload example in the code pane on the right. For more information about the show install committed command, see the CLI command reference:
Note: This example was added in Cisco NX-OS Release 9.2(1).
CLI Output |
---|
|
show install log 1
show install log 1
import json
"""
Modify these please
"""
url='http://<IP_Address>/ins'
switchuser='<User_ID>'
switchpassword='<Password>'
myheaders={'content-type':'application/json'}
payload={
"ins_api":{
"version": "1.0",
"type": "cli_show",
"chunk": "0",
"sid": "1",
"input": "show install log 1",
"output_format": "json"
}
response = requests.post(url,data=json.dumps(payload), headers=myheaders,auth=(switchuser,switchpassword)).json()
output = json.dumps(response, indent=4, sort_keys=True)
{
"ins_api": {
"type": "cli_show",
"version": "1.0",
"sid": "eoc",
"outputs": {
"output": {
"input": "show install log 1",
"msg": "Success",
"code": "200",
"body": {
"current_time": {
"curr_time": "Wed Aug 8 13:49:40 2018\n",
"TABLE_show_log_output": {
"ROW_show_log_output": {
"install_id": 1,
"install_log_entry": [
"Install operation 1 by user 'admin' at Wed Aug 8 01:02:29 2018\n",
"Install add bootflash :nxos.SYSINFO_RESTART-n9k_ALL-1.0.0-9.2.1.lib32_n9000.rpm\n",
"Install operation 1 completed successfully at Wed Aug 8 01:02:32 2018.\n"
]
}
}
}
}
}
}
}
}
The CLI output example below corresponds to the payload example in the code pane on the right. For more information about the show install log 1 command, see the CLI command reference:
Note: This example was added in Cisco NX-OS Release 9.2(1).
CLI Output |
---|
|
show install packages
show install packages
import json
"""
Modify these please
"""
url='http://<IP_Address>/ins'
switchuser='<User_ID>'
switchpassword='<Password>'
myheaders={'content-type':'application/json'}
payload={
"ins_api":{
"version": "1.0",
"type": "cli_show",
"chunk": "0",
"sid": "1",
"input": "show install packages",
"output_format": "json"
}
response = requests.post(url,data=json.dumps(payload), headers=myheaders,auth=(switchuser,switchpassword)).json()
output = json.dumps(response, indent=4, sort_keys=True)
{
"ins_api": {
"type": "cli_show",
"version": "1.0",
"sid": "eoc",
"outputs": {
"output": {
"input": "show install packages",
"msg": "Success",
"code": "200",
"body": {
"curr_nxos_image": "bootflash:/nxos.9.2.1.bin-260-CCO",
"TABLE_package_list": {
"ROW_package_list": [
{
"package_name": "attr.x86_64",
"version": "2.4.47-r0.0",
"state": "installed",
"signature": "Unsigned"
},
{
"package_name": "aufs-util.x86_64",
"version": "3.14+git0+b59a2167a1-r0.0",
"state": "installed",
"signature": "Unsigned"
},
…
…
<snip>
…
…
{
"package_name": "zip.x86_64",
"version": "3.0-r2.0",
"state": "installed",
"signature": "Unsigned"
}
]
}
}
}
}
}
}
The CLI output example below corresponds to the payload example in the code pane on the right. For more information about the show install packages command, see the CLI command reference:
Note: This example was added in Cisco NX-OS Release 9.2(1).
CLI Output |
---|
|
show install patches
show install patches
import json
"""
Modify these please
"""
url='http://<IP_Address>/ins'
switchuser='<User_ID>'
switchpassword='<Password>'
myheaders={'content-type':'application/json'}
payload={
"ins_api":{
"version": "1.0",
"type": "cli_show",
"chunk": "0",
"sid": "1",
"input": "show install patches",
"output_format": "json"
}
response = requests.post(url,data=json.dumps(payload), headers=myheaders,auth=(switchuser,switchpassword)).json()
output = json.dumps(response, indent=4, sort_keys=True)
{
"ins_api": {
"type": "cli_show",
"version": "1.0",
"sid": "eoc",
"outputs": {
"output": {
"input": "show install patches",
"msg": "Success",
"code": "200",
"body": {
"curr_nxos_image": "bootflash:/nxos.9.2.1.bin-260-CCO",
"TABLE_smu_list": {
"ROW_smu_list": {
"install_smu_id": "nxos.IGMP_RESTART-n9k_ALL-1.0.0-9.2.1.lib32_n9000",
"install_smu_state": "Active Committed"
}
}
}
}
}
}
}
The CLI output example below corresponds to the payload example in the code pane on the right. For more information about the show install patches command, see the CLI command reference:
Note: This example was added in Cisco NX-OS Release 9.2(1).
CLI Output |
---|
|
show install pkg-info nxos.IGMP_RESTART-n9k_ALL-1.0.0-9.2.1.lib32_n9000
show install pkg-info nxos.IGMP_RESTART-n9k_ALL-1.0.0-9.2.1.lib32_n9000
import json
"""
Modify these please
"""
url='http://<IP_Address>/ins'
switchuser='<User_ID>'
switchpassword='<Password>'
myheaders={'content-type':'application/json'}
payload={
"ins_api":{
"version": "1.0",
"type": "cli_show",
"chunk": "0",
"sid": "1",
"input": "show install pkg-info nxos.IGMP_RESTART-n9k_ALL-1.0.0-9.2.1.lib32_n9000",
"output_format": "json"
}
response = requests.post(url,data=json.dumps(payload), headers=myheaders,auth=(switchuser,switchpassword)).json()
output = json.dumps(response, indent=4, sort_keys=True)
{
"ins_api": {
"type": "cli_show",
"version": "1.0",
"sid": "eoc",
"outputs": {
"output": {
"input": "show install pkg-info nxos.IGMP_RESTART-n9k_ALL-1.0.0-9.2.1.lib32_n9000",
"msg": "Success",
"code": "200",
"body": {
"TABLE_show_pkg_output": {
"ROW_show_pkg_output": {
"pkg_info_entry": [
"Name : nxos.IGMP_RESTART-n9k_ALL\n",
"Version : 1.0.0\n",
"Release : 9.2.1\n",
"Vendor : []\n",
"License : Cisco proprietary\n",
"Patch Type : restart\n",
"LC Type : none\n",
"Patch State : Active\n",
"Requires : core,eth\n",
"Provides : nxos.IGMP_RESTART-n9k_ALL,nxos.IGMP_RESTART-n9k_ALL\n",
"Conflicts : \n",
"Description : This is a patch for IGMP_RESTART-n9k_ALL.The build type is final.\n",
"Checksum : []\n"
]
}
}
}
}
}
}
}
The CLI output example below corresponds to the payload example in the code pane on the right. For more information about the show install pkg-info nxos.IGMP_RESTART-n9k_ALL-1.0.0-9.2.1.lib32_n9000 command, see the CLI command reference:
Note: This example was added in Cisco NX-OS Release 9.2(1).
CLI Output |
---|
|