show route-map test

show route-map 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 route-map 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 route-map test ",
        "msg": "Success",
        "code": "200",
        "body": {
          "TABLE_rmap": {
            "ROW_rmap": {
              "name": "test",
              "action": "permit",
              "seq": 10,
              "TABLE_rmap_match": {
                "ROW_rmap_match": {
                  "match_type": "ip address prefix-lists",
                  "match_stmt": "pfx1"
                }
              },
              "TABLE_rmap_set": {
                "ROW_rmap_set": {
                  "set_type": "tag",
                  "set_stmt": "10"
                }
              }
            }
          }
        }
      }
    }
  }
}

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 test command, see the CLI command reference:

http://www.cisco.com/c/en/us/support/switches/nexus-9000-series-switches/products-command-reference-list.html

Note: This example was added in Cisco NX-OS Release 9.2(1).

CLI Output
Switch# show route-map test
route-map test, permit, sequence 10 
  Match clauses:
    ip address prefix-lists: pfx1 
  Set clauses:
    tag 10 




show route-map test_pol pbr-statistics

show route-map test_pol pbr-statistics

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 test_pol pbr-statistics  ",
  "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 route-map test_pol pbr-statistics  ",
        "msg": "Success",
        "code": "200",
        "body": {
          "tag": "test_pol",
          "action": "permit",
          "seq": 10,
          "pbr_pkt_count": 0,
          "dflt_rtg_pkt_count": 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 test_pol pbr-statistics command, see the CLI command reference:

http://www.cisco.com/c/en/us/support/switches/nexus-9000-series-switches/products-command-reference-list.html

Note: This example was added in Cisco NX-OS Release 9.2(1).

CLI Output
Switch# show route-map test_pol pbr-statistics 
route-map test_pol, permit, sequence 10
  Policy routing matches: 0 packets

Default routing: 0 packets