show boot
show boot
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 boot",
"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 boot",
"msg": "Success",
"code": "200",
"body": {
"TABLE_bootvar_show": {
"ROW_bootvar_show": [
{
"Str1": "Current Boot Variables:\n"
},
{
"Str1": "sup-1"
},
{
"Str1": "NXOS variable = bootflash:/nxos.9.2.1.47.bin"
},
{
"Str1": "Boot POAP Disabled\n"
},
{
"Str1": "\nBoot Variables on next reload:\n"
},
{
"Str1": "sup-1"
},
{
"Str1": "NXOS variable = bootflash:/nxos.9.2.1.47.bin"
},
{
"Str1": "Boot POAP Disabled\n"
}
]
}
}
}
}
}
}
The CLI output example below corresponds to the payload example in the code pane on the right. For more information about the show boot command, see the CLI command reference:
Note: This example was added in Cisco NX-OS Release 9.2(1).
CLI Output |
---|
|
show boot variables
show boot variables
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 boot variables",
"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 boot variables",
"msg": "Success",
"code": "200",
"body": {
"TABLE_boot_vars": {
"ROW_boot_vars": [
{
"Str1": "List of boot variables are:"
},
{
"Str1": " nxos"
}
]
}
}
}
}
}
}
The CLI output example below corresponds to the payload example in the code pane on the right. For more information about the show boot variables command, see the CLI command reference:
Note: This example was added in Cisco NX-OS Release 9.2(1).
CLI Output |
---|
|
show boot mode
show boot mode
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 boot mode",
"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 boot mode",
"msg": "Success",
"code": "200",
"body": {
"TABLE_mode": {
"ROW_mode": {
"Str1": "Current boot mode is native mode"
}
}
}
}
}
}
}
The CLI output example below corresponds to the payload example in the code pane on the right. For more information about the show boot mode command, see the CLI command reference:
Note: This example was added in Cisco NX-OS Release 9.2(1).
CLI Output |
---|
|