Cables Agent

The Cables agent is implemented as a docker container that executes on the switch to gather data on neighboring switches and link quality. The agent operates a web service capable of providing information on ports and links through user queries. Moreover, the agent transmits validation reports to the bringup server.

Check if cable agent is running on the switch:

  1. Run:

    Copy
    Copied!
                

    ssh admin@<switch-ip-or-name>

  2. Enable

  3. Show docker images

  4. Exit

If cables agent is running on the switch, the following output is prompted.

Copy
Copied!
            

---------------------------------------------------------------------------- Image                                 Version      Created            Size ---------------------------------------------------------------------------- cables_agent                          latest       13 hours ago       788MB

Usually, it is not necessary to manually deploy the agent onto the switch, as it is recommended to use the deploy_all_agents or deploy_single_agent commands from the bringup CLI. However, in instances where manual deployment is required, the following commands can be executed:

  1. enable

  2. configure terminal

  3. no docker shutdown

  4. image fetch scp://<user>:<pwd>@<hostname>/tmp/cables_agent_<version>.tar.gz cables_agent_latest.tar.gz

  5. docker load cables_agent_latest.tar.gz

  6. docker start cables_agent latest cables_agent now-and-init privileged network

For cleanup, run:

  1. docker no start cables_agent

  2. docker remove image cables_agent latest

  3. image delete cables_agent_latest.tar.gz

To enter terminal in the container running on the switch, run:

  1. enable

  2. configure terminal

  3. docker exec cables_agent /bin/bash

The agent has a web server listening on port 8251. The following two REST APIs are supported:

  1. https://<switch-ip-or-name>:8251/resources/links

  2. https://<switch-ip-or-name>:8251/resources/ports

Links Output Example

Copy
Copied!
            

curl -k https://sw-hdr-proton01:8251/resources/links | python3 -m json.tool [  {     "info": {         "md5": "256477d766fa8d8853848c43c35982ba",         "timestamp": 1659355401394591,         "time": "2022-08-01 12:03:21.394601"     },     "src": {         "Node Description": "MF0;sw-hdr-proton01:MQM8700/U1",         "Guid": "0x0c42a1030079a6ec",         "ip": "10.209.44.74",         "Node Name": "sw-hdr-proton01"     },     "dests": {         "4": {             "Node Description": "swx-proton04 mlx5_2",             "Guid": "0xb8cef6030083bea2",             "LocalPort": "1"         },         "2": {             "Node Description": "Quantum Mellanox Technologies",             "Guid": "0xb8cef60300fbf210",             "LocalPort": "2"         },         "3": {             "Node Description": "swx-proton03 mlx5_0",             "Guid": "0xb8cef6030083bf02",             "LocalPort": "1"         },         "1": {             "Node Description": "Quantum Mellanox Technologies",             "Guid": "0xb8cef60300fbf210",             "LocalPort": "1"         }     } } ]


Output Example of Ports

Copy
Copied!
            

curl -k https://sw-hdr-proton01:8251/resources/ports | python3 -m json.tool [     {         "port": "IB1/10",         "port_num": "10",         "logical": "Down",         "physical": "Polling"     },     {         "port": "IB1/11",         "port_num": "11",         "logical": "Down",         "physical": "Polling"     },     {         "port": "IB1/12",         "port_num": "12",         "logical": "Down",         "physical": "Polling"     },     {         "port": "IB1/13",         "port_num": "13",         "logical": "Down",         "physical": "Polling"     } ]


© Copyright 2023, NVIDIA. Last updated on Nov 7, 2023.