show mac address-table aging-time
show mac address-table aging-time
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 mac address-table aging-time ",
"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 mac address-table aging-time ",
"msg": "Success",
"code": "200",
"body": {
"age_str": "Aging Time\n----------",
"age": "1800"
}
}
}
}
}
The CLI output example below corresponds to the payload example in the code pane on the right. For more information about the show mac address-table aging-time command, see the CLI command reference:
Note: This example was added in Cisco NX-OS Release 9.2(1).
CLI Output |
---|
|
show mac address-table notification mac-move
show mac address-table notification mac-move
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 mac address-table notification mac-move ",
"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 mac address-table notification mac-move ",
"msg": "Success",
"code": "200",
"body": {
"TABLE_mac_notif": {
"ROW_mac_notif": {
"disp_mm_status": "1",
"disp_mm_triggers": "539",
"disp_macs_added": "401228",
"disp_macs_moved": "0",
"disp_macs_removed": "394419"
}
}
}
}
}
}
}
The CLI output example below corresponds to the payload example in the code pane on the right. For more information about the show mac address-table notification mac-move command, see the CLI command reference:
Note: This example was added in Cisco NX-OS Release 9.2(1).
CLI Output |
---|
|
show mac address-table vlan 10
show mac address-table vlan 10
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 mac address-table vlan 10 ",
"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 mac address-table vlan 10 ",
"msg": "Success",
"code": "200",
"body": {
"TABLE_mac_address": {
"ROW_mac_address": [
{
"disp_mac_addr": "0000.0c9f.f00a",
"disp_type": "*",
"disp_vlan": "10",
"disp_is_static": "disabled",
"disp_age": "0",
"disp_is_secure": "disabled",
"disp_is_ntfy": "disabled",
"disp_port": "port-channel50"
},
{
"disp_mac_addr": "0002.0233.000a",
"disp_type": "*",
"disp_vlan": "10",
"disp_is_static": "disabled",
"disp_age": "0",
"disp_is_secure": "disabled",
"disp_is_ntfy": "disabled",
"disp_port": "port-channel50"
}
]
}
}
}
}
}
}
The CLI output example below corresponds to the payload example in the code pane on the right. For more information about the show mac address-table vlan 10 command, see the CLI command reference:
Note: This example was added in Cisco NX-OS Release 9.2(1).
CLI Output |
---|
|