show port-profile brief
show port-profile brief
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 port-profile brief",
"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 port-profile brief",
"msg": "Success",
"code": "200",
"body": {
"TABLE_intf_count": {
"ROW_intf_count": {
"tot_header_flag": 1593
}
},
"TABLE_port_profile": {
"ROW_port_profile": [
{
"header_flag": 816644175
},
{
"profile_name": "test",
"type": "Ethernet",
"status": 1,
"profile_cfg_cnt": 1,
"eval_cfg_cnt": 1,
"intf_cnt": 1,
"inherit_cnt": 0
}
]
}
}
}
}
}
}
The CLI output example below corresponds to the payload example in the code pane on the right. For more information about the show port-profile brief command, see the CLI command reference:
Note: This example was added in Cisco NX-OS Release 9.2(1).
CLI Output |
---|
|
show port-profile expand-interface name test
show port-profile expand-interface name test
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 port-profile expand-interface name test",
"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 port-profile expand-interface name test",
"msg": "Success",
"code": "200",
"body": {
"TABLE_port_profile": {
"ROW_port_profile": {
"profile_name": "test",
"TABLE_interface": {
"ROW_interface": {
"intf": "Ethernet1/3",
"intf_cfg": "switchport mode trunk"
}
}
}
}
}
}
}
}
}
The CLI output example below corresponds to the payload example in the code pane on the right. For more information about the show port-profile expand-interface name test command, see the CLI command reference:
Note: This example was added in Cisco NX-OS Release 9.2(1).
CLI Output |
---|
|
show port-profile name test
show port-profile name test
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 port-profile name test",
"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 port-profile name test",
"msg": "Success",
"code": "200",
"body": {
"TABLE_port_profile_all": {
"ROW_port_profile_all": {
"profile_name": "test",
"type": "Ethernet",
"desc": "",
"status": 1,
"max_ports": 512,
"inherit": "data_empty",
"profile_cfg": "switchport mode trunk",
"eval_cfg": "switchport mode trunk",
"intf": "Ethernet1/3"
}
}
}
}
}
}
}
The CLI output example below corresponds to the payload example in the code pane on the right. For more information about the show port-profile name test command, see the CLI command reference:
Note: This example was added in Cisco NX-OS Release 9.2(1).
CLI Output |
---|
|
show port-profile usage name test
show port-profile usage name test
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 port-profile usage name test",
"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 port-profile usage name test",
"msg": "Success",
"code": "200",
"body": {
"TABLE_port_profile": {
"ROW_port_profile": {
"profile_name": "test",
"TABLE_interface": {
"ROW_interface": {
"interface": "Ethernet1/3"
}
}
}
}
}
}
}
}
}
The CLI output example below corresponds to the payload example in the code pane on the right. For more information about the show port-profile usage name test command, see the CLI command reference:
Note: This example was added in Cisco NX-OS Release 9.2(1).
CLI Output |
---|
|