DPT Commands
show dpt flow testflow
show dpt flow testflow
import requests
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 dpt flow testflows",
"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.2",
"sid": "eoc",
"outputs": {
"output": {
"input": "show dpt flow testflow",
"msg": "Success",
"code": "200",
"body": {
"TABLE_flows": {
"ROW_flows": {
"flowID": "testflow",
"status": "armed",
"flow_definition": {
"network-type": "classical-ethernet",
"dst-ip-prefix": "3.3.3.3/32"
}
}
}
}
}
}
}
}
switch(config)# show dpt flow testflow | xml
<?xml version="1.0" encoding="UTF-8"?>
<ins_api>
<type>cli_show</type>
<version>1.2</version>
<sid>eoc</sid>
<outputs>
<output>
<body>
<TABLE_flows>
<ROW_flows>
<flowID>testflow</flowID>
<status>armed</status>
<flow_definition>
<network-type>classical-ethernet</network-type>
<dst-ip-prefix>3.3.3.3/32</dst-ip-prefix>
</flow_definition>
</ROW_flows>
</TABLE_flows>
</body>
<input>show dpt flow testflow</input>
<msg>Success</msg>
<code>200</code>
</output>
</outputs>
</ins_api>
For command descriptions, see the Cisco Nexus 7000 Series Switches Command References.
Note: This sample output is generated for Cisco Nexus 7000 Series NX-OS Release 8.3(1).
| CLI Output |
|---|
|
show dpt status flow testflow
show dpt status flow testflow
import requests
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 dpt status flow testflow",
"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.2",
"sid": "eoc",
"outputs": {
"output": {
"input": "show dpt status flow testflow",
"msg": "Success",
"code": "200",
"body": {
"TABLE_flows": {
"ROW_flows": {
"flowID": "testflow",
"stats": "n/a",
"lookupresult": "n/a",
"status": "armed",
"start-time": "2018-07-12 12:06:17",
"end-time": "2018-07-12 16:06:17",
"interval": 30,
"detail": ""
}
}
}
}
}
}
}
switch(config)# show dpt status flow testflow | xml
<?xml version="1.0" encoding="UTF-8"?>
<ins_api>
<type>cli_show</type>
<version>1.2</version>
<sid>eoc</sid>
<outputs>
<output>
<body>
<TABLE_flows>
<ROW_flows>
<flowID>testflow</flowID>
<stats>n/a</stats>
<lookupresult>n/a</lookupresult>
<status>armed</status>
<start-time>2018-07-12 12:06:17</start-time>
<end-time>2018-07-12 16:06:17</end-time>
<interval>30</interval>
<detail/>
</ROW_flows>
</TABLE_flows>
</body>
<input>show dpt status flow testflow</input>
<msg>Success</msg>
<code>200</code>
</output>
</outputs>
</ins_api>
For command descriptions, see the Cisco Nexus 7000 Series Switches Command References.
Note: This sample output is generated for Cisco Nexus 7000 Series NX-OS Release 8.3(1).
| CLI Output |
|---|
|
Flow Statistics Lookup-result Status Start-time End-time Interval Detail
testflow n/a n/a armed 2018-07-12 12:06:17 2018-07-12 16:06:17 30
show dpt results flow testflow
show dpt results flow testflow
import requests
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 dpt results flow testflow",
"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.2",
"sid": "eoc",
"outputs": {
"output": {
"input": "show dpt results flow testflow",
"msg": "Success",
"code": "200",
"body": {
"flowID": "testflow",
"start-time": "2018-07-12 12:06:17",
"end-time": "2018-07-12 16:06:17",
"interval": 30,
"TABLE_results": {
"ROW_results": {
"index": 0,
"result": " fwd ",
"drop_reason": " n/a ",
"timestamp": "2018-07-12 12:06:27",
"output": {
"phyintf": "sup-eth1",
"vlan-id": 0,
"bridge-domain": " n/a ",
"vni": " n/a ",
"rate": " n/a ",
"count": 1
},
"input": {
"phyintf": "Ethernet9/26",
"vlan-id": 0,
"bridge-domain": " n/a ",
"vni": " n/a ",
"rate": " n/a ",
"count": 1
}
}
}
}
}
}
}
}
switch(config)# show dpt results flow testflow | xml
<?xml version="1.0" encoding="UTF-8"?>
<ins_api>
<type>cli_show</type>
<version>1.2</version>
<sid>eoc</sid>
<outputs>
<output>
<body>
<flowID>testflow</flowID>
<start-time>2018-07-12 12:06:17</start-time>
<end-time>2018-07-12 16:06:17</end-time>
<interval>30</interval>
<TABLE_results>
<ROW_results>
<index>0</index>
<result> fwd </result>
<drop_reason> n/a </drop_reason>
<timestamp>2018-07-12 12:06:27</timestamp>
<input>
<phyintf>Ethernet9/26</phyintf>
<vlan-id>0</vlan-id>
<bridge-domain> n/a </bridge-domain>
<vni> n/a </vni>
<rate> n/a </rate>
<count>1</count>
</input>
<output>
<phyintf>sup-eth1</phyintf>
<vlan-id>0</vlan-id>
<bridge-domain> n/a </bridge-domain>
<vni> n/a </vni>
<rate> n/a </rate>
<count>1</count>
</output>
</ROW_results>
</TABLE_results>
</body>
<input>show dpt results flow testflow</input>
<msg>Success</msg>
<code>200</code>
</output>
</outputs>
</ins_api>
For command descriptions, see the Cisco Nexus 7000 Series Switches Command References.
Note: This sample output is generated for Cisco Nexus 7000 Series NX-OS Release 8.3(1).
| CLI Output |
|---|
|
Flow ID: testflow Start-time [2018-07-12 12:06:17] End-time [2018-07-12 16:06:17] Interval [30]
Idx |Result|Drop | Timestamp |Input |Output | |reason| |interface |Vlan |BD |VNI |Rate |Count |interface |Vlan |BD |VNI |Rate |Count
0 fwd n/a 2018-07-12 12:06:27 Ethernet9/26 0 n/a n/a n/a 1 sup-eth1 0 n/a n/a n/a 1
show dpt results flow testflow detail
show dpt results flow testflow detail
import requests
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 dpt results flow testflow detail",
"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.2",
"sid": "eoc",
"outputs": {
"output": {
"input": "show dpt results flow testflow detail",
"msg": "Success",
"code": "200",
"body": {
"flowID": "testflow",
"TABLE_results_detail": {
"ROW_results_detail": {
"index": 0,
"timestamp": "2018-07-12 12:06:27",
"src-ifindex": "Ethernet9/26",
"src-mac": "e4aa.5d88.037c",
"src-ip": "3.3.3.1",
"dst-ifindex": "sup-eth1",
"dst-mac": "0026.51c7.fcc1",
"dst-ip": "3.3.3.3",
"ip-protocol": 1,
"src-l4-port": 0,
"dst-l4-port": 0,
"vlan-id": 0,
"dst-vlan-id": 0,
"src-bridge-domain": "n/a ",
"dst-bridge-domain": "n/a ",
"src-vni": "n/a ",
"dst-vni": "n/a "
}
}
}
}
}
}
}
switch(config)# show dpt results flow testflow detail | xml
<?xml version="1.0" encoding="UTF-8"?>
<ins_api>
<type>cli_show</type>
<version>1.2</version>
<sid>eoc</sid>
<outputs>
<output>
<body>
<flowID>testflow</flowID>
<TABLE_results_detail>
<ROW_results_detail>
<index>0</index>
<timestamp>2018-07-12 12:06:27</timestamp>
<src-ifindex>Ethernet9/26</src-ifindex>
<src-mac>e4aa.5d88.037c</src-mac>
<src-ip>3.3.3.1</src-ip>
<dst-ifindex>sup-eth1</dst-ifindex>
<dst-mac>0026.51c7.fcc1</dst-mac>
<dst-ip>3.3.3.3</dst-ip>
<ip-protocol>1</ip-protocol>
<src-l4-port>0</src-l4-port>
<dst-l4-port>0</dst-l4-port>
<vlan-id>0</vlan-id>
<dst-vlan-id>0</dst-vlan-id>
<src-bridge-domain>n/a </src-bridge-domain>
<dst-bridge-domain>n/a </dst-bridge-domain>
<src-vni>n/a </src-vni>
<dst-vni>n/a </dst-vni>
</ROW_results_detail>
</TABLE_results_detail>
</body>
<input>show dpt results flow testflow detail</input>
<msg>Success</msg>
<code>200</code>
</output>
</outputs>
</ins_api>
For command descriptions, see the Cisco Nexus 7000 Series Switches Command References.
Note: This sample output is generated for Cisco Nexus 7000 Series NX-OS Release 8.3(1).
| CLI Output |
|---|
|
Result details for flow ID: testflow
Index 0 Timestamp 2018-07-12 12:06:27 Source Interface Ethernet9/26 Source MAC address e4aa.5d88.037c Source IP address 3.3.3.1
Destination Interface sup-eth1 Destination MAC address 0026.51c7.fcc1 Destination IP address 3.3.3.3
IP Protocol 1 Source L4 port 0 Destination L4 port 0 Source Vlan ID 0 Destination Vlan ID 0 Source Bridge Domain n/a Destination Bridge Domain n/a Source VNI n/a Destination VNI n/a