show flow cache ipv6
Python
Copy
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 flow cache ipv6 ",
  "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_flow_cache": {
                        "ROW_flow_cache": [
                            {
                                "bridge-domain-id": "4138", 
                                "byte-count": "268", 
                                "destination-ip": "79::2", 
                                "destination-port": "3784", 
                                "flow-cache-index": "1", 
                                "flow-end": "985743", 
                                "flow-start": "984066", 
                                "flow-type": "IPv6", 
                                "if-id": "436227072", 
                                "packet-count": "2", 
                                "protocol": "17", 
                                "source-ip": "79::1", 
                                "source-port": "49157", 
                                "tcp-flags": "537538560"
                            }, 
                            {
                                "bridge-domain-id": "4138", 
                                "byte-count": "9112", 
                                "destination-ip": "79::1", 
                                "destination-port": "3785", 
                                "flow-cache-index": "2", 
                                "flow-end": "985736", 
                                "flow-start": "983822", 
                                "flow-type": "IPv6", 
                                "if-id": "436227072", 
                                "packet-count": "68", 
                                "protocol": "17", 
                                "source-ip": "79::1", 
                                "source-port": "49157", 
                                "tcp-flags": "0"
                            }, 
                            {
                                "bridge-domain-id": "4138", 
                                "byte-count": "8844", 
                                "destination-ip": "79::2", 
                                "destination-port": "3785", 
                                "flow-cache-index": "3", 
                                "flow-end": "985509", 
                                "flow-start": "983067", 
                                "flow-type": "IPv6", 
                                "if-id": "436227072", 
                                "packet-count": "66", 
                                "protocol": "17", 
                                "source-ip": "79::2", 
                                "source-port": "49154", 
                                "tcp-flags": "0"
                            }
                        ]
                    }
                }, 
                "code": "200", 
                "input": "show flow cache ipv6 ", 
                "msg": "Success"
            }
        }, 
        "sid": "eoc", 
        "type": "cli_show", 
        "version": "1.0"
    }
}