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": {
"outputs": {
"output": {
"body": {
"age": "14400",
"age_str": "Aging Time\n----------\n"
},
"code": "200",
"input": "show mac address-table aging-time ",
"msg": "Success"
}
},
"sid": "eoc",
"type": "cli_show",
"version": "1.0"
}
}
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:
| CLI Output |
|---|
|
show mac address-table count
show mac address-table count
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 count ",
"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": {
"outputs": {
"output": {
"body": {
"TABLE-macaddtblcount": {
"count_str": "MAC Entries for all vlans :",
"dyn_cnt": "3",
"id-out": "0",
"otv_cnt": "0",
"secure_cnt": "0",
"static_cnt": "1",
"total_cnt": "4"
}
},
"code": "200",
"input": "show mac address-table count ",
"msg": "Success"
}
},
"sid": "eoc",
"type": "cli_show",
"version": "1.0"
}
}
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 count command, see the CLI command reference:
| CLI Output |
|---|
|
show mac address-table dynamic
show mac address-table dynamic
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 dynamic ",
"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": {
"outputs": {
"output": {
"body": {
"TABLE_mac_address": {
"ROW_mac_address": [
{
"disp_age": "0",
"disp_is_ntfy": "F",
"disp_is_secure": "F",
"disp_mac_addr": "f44e.0584.7ffc",
"disp_port": "Eth1/39",
"disp_type": "dynamic",
"disp_vlan": "8"
},
{
"disp_age": "0",
"disp_is_ntfy": "F",
"disp_is_secure": "F",
"disp_mac_addr": "f44e.0584.7ffc",
"disp_port": "Po47",
"disp_type": "dynamic",
"disp_vlan": "50"
},
{
"disp_age": "0",
"disp_is_ntfy": "F",
"disp_is_secure": "F",
"disp_mac_addr": "f44e.0584.7ffc",
"disp_port": "Po47",
"disp_type": "dynamic",
"disp_vlan": "253"
}
]
}
},
"code": "200",
"input": "show mac address-table dynamic ",
"msg": "Success"
}
},
"sid": "eoc",
"type": "cli_show",
"version": "1.0"
}
}
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 dynamic command, see the CLI command reference:
| CLI Output |
|---|
|
show mac address-table static
show mac address-table static
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 static ",
"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": {
"outputs": {
"output": {
"body": {
"TABLE_mac_address": {
"ROW_mac_address": [
{
"disp_age": "-",
"disp_is_ntfy": "F",
"disp_is_secure": "F",
"disp_mac_addr": "aacd.2222.3333",
"disp_port": "Po47",
"disp_type": "static",
"disp_vlan": "100"
},
{
"disp_age": "-",
"disp_is_ntfy": "F",
"disp_is_secure": "F",
"disp_mac_addr": "f44e.0584.b37c",
"disp_port": "sup-eth1(R)",
"disp_type": "static",
"disp_vlan": "-"
},
{
"disp_age": "-",
"disp_is_ntfy": "F",
"disp_is_secure": "F",
"disp_mac_addr": "f44e.0584.b37c",
"disp_port": "sup-eth1(R)",
"disp_type": "static",
"disp_vlan": "8"
},
{
"disp_age": "-",
"disp_is_ntfy": "F",
"disp_is_secure": "F",
"disp_mac_addr": "f44e.0584.b37c",
"disp_port": "sup-eth1(R)",
"disp_type": "static",
"disp_vlan": "50"
},
{
"disp_age": "-",
"disp_is_ntfy": "F",
"disp_is_secure": "F",
"disp_mac_addr": "f44e.0584.b37c",
"disp_port": "sup-eth1(R)",
"disp_type": "static",
"disp_vlan": "51"
},
{
"disp_age": "-",
"disp_is_ntfy": "F",
"disp_is_secure": "F",
"disp_mac_addr": "f44e.0584.b37c",
"disp_port": "sup-eth1(R)",
"disp_type": "static",
"disp_vlan": "52"
},
{
"disp_age": "-",
"disp_is_ntfy": "F",
"disp_is_secure": "F",
"disp_mac_addr": "f44e.0584.b37c",
"disp_port": "sup-eth1(R)",
"disp_type": "static",
"disp_vlan": "53"
},
{
"disp_age": "-",
"disp_is_ntfy": "F",
"disp_is_secure": "F",
"disp_mac_addr": "f44e.0584.b37c",
"disp_port": "sup-eth1(R)",
"disp_type": "static",
"disp_vlan": "54"
},
{
"disp_age": "-",
"disp_is_ntfy": "F",
"disp_is_secure": "F",
"disp_mac_addr": "f44e.0584.b37c",
"disp_port": "sup-eth1(R)",
"disp_type": "static",
"disp_vlan": "100"
},
{
"disp_age": "-",
"disp_is_ntfy": "F",
"disp_is_secure": "F",
"disp_mac_addr": "f44e.0584.b37c",
"disp_port": "sup-eth1(R)",
"disp_type": "static",
"disp_vlan": "245"
},
{
"disp_age": "-",
"disp_is_ntfy": "F",
"disp_is_secure": "F",
"disp_mac_addr": "f44e.0584.b37c",
"disp_port": "sup-eth1(R)",
"disp_type": "static",
"disp_vlan": "253"
}
]
}
},
"code": "200",
"input": "show mac address-table static ",
"msg": "Success"
}
},
"sid": "eoc",
"type": "cli_show",
"version": "1.0"
}
}
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 static command, see the CLI command reference:
| CLI Output |
|---|
|
show mac address-table vlan 253
show mac address-table vlan 253
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 253 ",
"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": {
"outputs": {
"output": {
"body": {
"TABLE_mac_address": {
"ROW_mac_address": [
{
"disp_age": "0",
"disp_is_ntfy": "F",
"disp_is_secure": "F",
"disp_mac_addr": "f44e.0584.7ffc",
"disp_port": "Po47",
"disp_type": "dynamic",
"disp_vlan": "253"
},
{
"disp_age": "-",
"disp_is_ntfy": "F",
"disp_is_secure": "F",
"disp_mac_addr": "f44e.0584.b37c",
"disp_port": "sup-eth1(R)",
"disp_type": "static",
"disp_vlan": "253"
}
]
}
},
"code": "200",
"input": "show mac address-table vlan 253 ",
"msg": "Success"
}
},
"sid": "eoc",
"type": "cli_show",
"version": "1.0"
}
}
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 253 command, see the CLI command reference:
| CLI Output |
|---|
|