show vlan dot1Q tag native
show vlan dot1Q tag native
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 vlan dot1Q tag native ",
"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 vlan dot1Q tag native",
"msg": "Success",
"code": "200",
"body": {
"tag_native_mode": "disabled"
}}}}}
The CLI output example below corresponds to the payload example in the code pane on the right. For more information about the show vlan dot1Q tag native command, see the CLI command reference:
Note: This example was added in Cisco NX-OS Release 9.2(1).
CLI Output |
---|
|
show vlan id 2 counters
show vlan id 2 counters
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 vlan id 2 counters ",
"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 vlan id 2 counters",
"msg": "Success",
"code": "200",
"body": {
"TABLE_vlancounters": {
"ROW_vlancounters": {
"vlanshowbr-vlanid": "2",
"l2_ing_ucast_b": "5812",
"l2_ing_ucast_p": "7",
"l2_ing_mcast_b": "3028752",
"l2_ing_mcast_p": "42066",
"l2_ing_bcast_b": "640636690",
"l2_ing_bcast_p": "1314579",
"l2_egr_ucast_b": "5812",
"l2_egr_ucast_p": "7",
"l3_ucast_rcv_b": "0",
"l3_ucast_rcv_p": "0"
}}}}}}}}}
The CLI output example below corresponds to the payload example in the code pane on the right. For more information about the show vlan id 2 counters command, see the CLI command reference:
Note: This example was added in Cisco NX-OS Release 9.2(1).
CLI Output |
---|
|
show vlan id 101 vn-segment
show vlan id 101 vn-segment
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 vlan id 101 vn-segment",
"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 vlan id 101 vn-segment ",
"msg": "Success",
"code": "200",
"body": {
"TABLE_seginfoid": {
"ROW_seginfoid": {
"vlanshowinfo-seg-vlanid": "101",
"vlanshowinfo-segment-id": "10101"
}
}
}
}
}
}
}
The CLI output example below corresponds to the payload example in the code pane on the right. For more information about the show vlan id 101 vn-segment command, see the CLI command reference:
Note: This example was added in Cisco NX-OS Release 9.2(1).
CLI Output |
---|
|
show vlan private-vlan
show vlan private-vlan
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 vlan private-vlan ",
"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 vlan private-vlan",
"msg": "Success",
"code": "200",
"body": {
"TABLE_pvlan_primary": {
"ROW_pvlan_primary": [
{
"vlan-key": null,
"primary": "150",
"secondary": "151",
"pvlan-type": "isolated",
"ports": [
"369099782",
"369099783",
"369099784",
"939524096",
"939528192",
"939532288",
"939565056",
"939569152",
"939573248",
"939606016",
"939610112",
"939614208",
"939933696",
"939937792",
"939941888",
"939982848",
"971481088",
"971485184"
]
},
{
"vlan-key": null,
"primary": "150",
"secondary": "152",
"pvlan-type": "community",
"ports": [
"369099782",
"369099794",
"939524096",
"939565056",
"939606016",
"939655168",
"939659264",
"939896832",
"939933696",
"940306432",
"971481088",
"971722752"
]
},
{
"vlan-key": null,
"primary": "150",
"secondary": "153",
"pvlan-type": "community",
"ports": [
"369099782",
"369099872",
"939524096",
"939565056",
"939606016",
"939900928",
"939933696",
"939974656",
"940310528",
"971472896",
"971481088",
"971726848"
]
},
{
"vlan-key": null,
"primary": "150",
"secondary": "154",
"pvlan-type": "community",
"ports": [
"369099782",
"939524096",
"939565056",
"939606016",
"939933696",
"971481088"
]
},
{
"vlan-key": null,
"primary": "155",
"secondary": "156",
"pvlan-type": "isolated",
"ports": [
"369099782",
"369099783",
"369099785",
"939524096",
"939528192",
"939536384",
"939565056",
"939569152",
"939577344",
"939606016",
"939610112",
"939618304",
"939933696",
"939937792",
"939945984",
"939986944",
"971481088",
"971485184"
]
},
{
"vlan-key": null,
"primary": "155",
"secondary": "157",
"pvlan-type": "community",
"ports": [
"369099782",
"939524096",
"939565056",
"939606016",
"939933696",
"971481088"
]
},
{
"vlan-key": null,
"primary": "155",
"secondary": "158",
"pvlan-type": "community",
"ports": [
"369099782",
"939524096",
"939565056",
"939606016",
"939933696",
"971481088"
]
},
{
"vlan-key": null,
"primary": "160",
"secondary": "161",
"pvlan-type": "isolated",
"ports": [
"369099782",
"369099783",
"369099792",
"939524096",
"939528192",
"939565056",
"939569152",
"939606016",
"939610112",
"939646976",
"939651072",
"939892736",
"939933696",
"939937792",
"940302336",
"971481088",
"971485184",
"971718656"
]
},
{
"vlan-key": null,
"primary": "160",
"secondary": "162",
"pvlan-type": "community",
"ports": [
"369099782",
"369099873",
"939524096",
"939565056",
"939606016",
"939905024",
"939933696",
"939978752",
"940314624",
"971476992",
"971481088",
"971730944"
]
},
{
"vlan-key": null,
"primary": "160",
"secondary": "163",
"pvlan-type": "community",
"ports": [
"369099782",
"939524096",
"939565056",
"939606016",
"939933696",
"971481088"
]}]}}}}}}}}
The CLI output example below corresponds to the payload example in the code pane on the right. For more information about the show vlan private-vlan command, see the CLI command reference:
Note: This example was added in Cisco NX-OS Release 9.2(1).
CLI Output |
---|
|
show vlan private-vlan type
show vlan private-vlan type
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 vlan private-vlan type ",
"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 vlan private-vlan type",
"msg": "Success",
"code": "200",
"body": {
"TABLE_pvlantype": {
"ROW_pvlantype": [
{
"vlan-num": "150",
"pvlan-type": "primary"
},
{
"vlan-num": "151",
"pvlan-type": "isolated"
},
{
"vlan-num": "152",
"pvlan-type": "community"
},
{
"vlan-num": "153",
"pvlan-type": "community"
},
{
"vlan-num": "154",
"pvlan-type": "community"
},
{
"vlan-num": "155",
"pvlan-type": "primary"
},
{
"vlan-num": "156",
"pvlan-type": "isolated"
},
{
"vlan-num": "157",
"pvlan-type": "community"
},
{
"vlan-num": "158",
"pvlan-type": "community"
},
{
"vlan-num": "160",
"pvlan-type": "primary"
},
{
"vlan-num": "161",
"pvlan-type": "isolated"
},
{
"vlan-num": "162",
"pvlan-type": "community"
},
{
"vlan-num": "163",
"pvlan-type": "community"
}
]
}
}}}}}}
The CLI output example below corresponds to the payload example in the code pane on the right. For more information about the show vlan private-vlan type command, see the CLI command reference:
Note: This example was added in Cisco NX-OS Release 9.2(1).
CLI Output |
---|
|