show route-map
show route-map
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 route-map",
"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_rmap": {
"ROW_rmap": [
{
"TABLE_rmap_match": {
"ROW_rmap_match": {
"match_stmt": "US",
"match_type": "as-path (as-path filter)"
}
},
"TABLE_rmap_set": {
"ROW_rmap_set": {
"set_stmt": "160",
"set_type": "local-preference"
}
},
"action": "permit",
"name": "LPREF_lhc",
"seq": "10"
},
{
"TABLE_rmap_set": {
"ROW_rmap_set": {
"set_stmt": "110",
"set_type": "local-preference"
}
},
"action": "permit",
"name": "LPREF_lhc",
"seq": "20"
},
{
"TABLE_rmap_set": {
"ROW_rmap_set": [
{
"set_stmt": "8",
"set_type": "metric"
},
{
"set_stmt": "type-2",
"set_type": "metric-type"
}
]
},
"action": "permit",
"name": "OSPF-DEF-ROUTE",
"seq": "10"
},
{
"TABLE_rmap_match": {
"ROW_rmap_match": {
"match_stmt": "PL-MDR-10",
"match_type": "ip address prefix-lists"
}
},
"TABLE_rmap_set": {
"ROW_rmap_set": {
"set_stmt": "65057:10",
"set_type": "community"
}
},
"action": "permit",
"name": "RM-FRK-OUT",
"seq": "10"
},
{
"TABLE_rmap_match": {
"ROW_rmap_match": {
"match_stmt": "256",
"match_type": "as-path (as-path filter)"
}
},
"TABLE_rmap_set": {
"ROW_rmap_set": {
"set_stmt": "65057:7",
"set_type": "community"
}
},
"action": "permit",
"name": "RM-FRK-OUT",
"seq": "20"
},
{
"action": "permit",
"name": "RM-FRK-OUT",
"seq": "100"
},
{
"TABLE_rmap_match": {
"ROW_rmap_match": {
"match_stmt": "PL-MDR-10",
"match_type": "ip address prefix-lists"
}
},
"TABLE_rmap_set": {
"ROW_rmap_set": {
"set_stmt": "65057:10",
"set_type": "community"
}
},
"action": "permit",
"name": "RM-LHC-OUT",
"seq": "10"
},
{
"TABLE_rmap_match": {
"ROW_rmap_match": {
"match_stmt": "256",
"match_type": "as-path (as-path filter)"
}
},
"TABLE_rmap_set": {
"ROW_rmap_set": {
"set_stmt": "65057:7",
"set_type": "community"
}
},
"action": "permit",
"name": "RM-LHC-OUT",
"seq": "20"
},
{
"action": "permit",
"name": "RM-LHC-OUT",
"seq": "100"
},
{
"TABLE_rmap_match": {
"ROW_rmap_match": {
"match_stmt": "US",
"match_type": "as-path (as-path filter)"
}
},
"TABLE_rmap_set": {
"ROW_rmap_set": {
"set_stmt": "160",
"set_type": "local-preference"
}
},
"action": "permit",
"name": "RM-LSL-IN",
"seq": "10"
},
{
"TABLE_rmap_match": {
"ROW_rmap_match": {
"match_stmt": "APAC",
"match_type": "as-path (as-path filter)"
}
},
"TABLE_rmap_set": {
"ROW_rmap_set": {
"set_stmt": "130",
"set_type": "local-preference"
}
},
"action": "permit",
"name": "RM-LSL-IN",
"seq": "15"
},
{
"TABLE_rmap_set": {
"ROW_rmap_set": {
"set_stmt": "110",
"set_type": "local-preference"
}
},
"action": "permit",
"name": "RM-LSL-IN",
"seq": "20"
},
{
"TABLE_rmap_match": {
"ROW_rmap_match": {
"match_stmt": "PL-MDR-10",
"match_type": "ip address prefix-lists"
}
},
"TABLE_rmap_set": {
"ROW_rmap_set": {
"set_stmt": "65057:10",
"set_type": "community"
}
},
"action": "permit",
"name": "RM-LSL-OUT",
"seq": "10"
},
{
"TABLE_rmap_match": {
"ROW_rmap_match": {
"match_stmt": "256",
"match_type": "as-path (as-path filter)"
}
},
"TABLE_rmap_set": {
"ROW_rmap_set": {
"set_stmt": "65057:7",
"set_type": "community"
}
},
"action": "permit",
"name": "RM-LSL-OUT",
"seq": "20"
},
{
"action": "permit",
"name": "RM-LSL-OUT",
"seq": "100"
},
{
"TABLE_rmap_match": {
"ROW_rmap_match": {
"match_stmt": "ANYCAST",
"match_type": "ip address prefix-lists"
}
},
"TABLE_rmap_set": {
"ROW_rmap_set": {
"set_stmt": "500",
"set_type": "local-preference"
}
},
"action": "permit",
"name": "RM-MIL-IN",
"seq": "1"
},
{
"TABLE_rmap_match": {
"ROW_rmap_match": {
"match_stmt": "CL-BO",
"match_type": "community (community-list filter)"
}
},
"TABLE_rmap_set": {
"ROW_rmap_set": {
"set_stmt": "140",
"set_type": "local-preference"
}
},
"action": "permit",
"name": "RM-MIL-IN",
"seq": "10"
},
{
"TABLE_rmap_match": {
"ROW_rmap_match": {
"match_stmt": "67",
"match_type": "as-path (as-path filter)"
}
},
"TABLE_rmap_set": {
"ROW_rmap_set": {
"set_stmt": "120",
"set_type": "local-preference"
}
},
"action": "permit",
"name": "RM-MIL-IN",
"seq": "20"
},
{
"TABLE_rmap_set": {
"ROW_rmap_set": {
"set_stmt": "90",
"set_type": "local-preference"
}
},
"action": "permit",
"name": "RM-MIL-IN",
"seq": "30"
},
{
"TABLE_rmap_match": {
"ROW_rmap_match": {
"match_stmt": "PL-MDR-10",
"match_type": "ip address prefix-lists"
}
},
"TABLE_rmap_set": {
"ROW_rmap_set": {
"set_stmt": "65057:10",
"set_type": "community"
}
},
"action": "permit",
"name": "RM-MIL-OUT",
"seq": "10"
},
{
"TABLE_rmap_match": {
"ROW_rmap_match": {
"match_stmt": "256",
"match_type": "as-path (as-path filter)"
}
},
"TABLE_rmap_set": {
"ROW_rmap_set": {
"set_stmt": "65057:7",
"set_type": "community"
}
},
"action": "permit",
"name": "RM-MIL-OUT",
"seq": "20"
},
{
"action": "permit",
"name": "RM-MIL-OUT",
"seq": "100"
},
{
"TABLE_rmap_match": {
"ROW_rmap_match": {
"match_stmt": "group 239.128.0.0/16",
"match_type": "ip multicast"
}
},
"action": "permit",
"name": "RM-SPT-INFINITY",
"seq": "200"
},
{
"TABLE_rmap_match": {
"ROW_rmap_match": {
"match_stmt": "PL_STATIC-TO-OSPF",
"match_type": "ip address prefix-lists"
}
},
"TABLE_rmap_set": {
"ROW_rmap_set": {
"set_stmt": "type-1",
"set_type": "metric-type"
}
},
"action": "permit",
"name": "RM_STATIC-TO-OSPF",
"seq": "10"
},
{
"action": "deny",
"name": "RM_STATIC-TO-OSPF",
"seq": "100"
},
{
"TABLE_rmap_match": {
"ROW_rmap_match": {
"match_stmt": "group 239.128.0.0/16",
"match_type": "ip multicast"
}
},
"action": "permit",
"name": "RP_Tree",
"seq": "45"
}
]
}
},
"code": "200",
"input": "show route-map",
"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 route-map command, see the CLI command reference:
Note: This example was added in Cisco NX-OS Release 6.0(2)A8(8).
| CLI Output |
|---|
|
show route-map RM-MIL-OUT
show route-map RM-MIL-OUT
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 route-map RM-MIL-OUT",
"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_rmap": {
"ROW_rmap": [
{
"TABLE_rmap_match": {
"ROW_rmap_match": {
"match_stmt": "PL-MDR-10",
"match_type": "ip address prefix-lists"
}
},
"TABLE_rmap_set": {
"ROW_rmap_set": {
"set_stmt": "65057:10",
"set_type": "community"
}
},
"action": "permit",
"name": "RM-MIL-OUT",
"seq": "10"
},
{
"TABLE_rmap_match": {
"ROW_rmap_match": {
"match_stmt": "256",
"match_type": "as-path (as-path filter)"
}
},
"TABLE_rmap_set": {
"ROW_rmap_set": {
"set_stmt": "65057:7",
"set_type": "community"
}
},
"action": "permit",
"name": "RM-MIL-OUT",
"seq": "20"
},
{
"action": "permit",
"name": "RM-MIL-OUT",
"seq": "100"
}
]
}
},
"code": "200",
"input": "show route-map RM-MIL-OUT",
"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 route-map RM-MIL-OUT command, see the CLI command reference:
Note: This example was added in Cisco NX-OS Release 6.0(2)A8(8).
| CLI Output |
|---|
|