VSX peer switches and REST API access

If Virtual Switching Extension (VSX) is enabled, you can access the REST API of a peer switch without having to separately log into or manage a session cookie from that peer switch.

To access a peer REST API from your connected switch, insert /vsx-peer in the URI path after the server URL and before the REST API and version identifier.

For example:

https://192.0.2.5/vsx-peer/rest/v1/...

Notes:

  • VSX must be enabled on both switches, and the interswitch link (ISL) must be up.

  • REST API access must be enabled on both switches.

  • For write access, the REST API access mode must be set to read/write on both switches.

  • You must be logged in to the switch to which you are connected. For example, if you are connected to the primary VSX switch, you must be logged in to the primary switch.

  • The following uses of /vsx-peer in the URI path are not supported:

    • The login resource. Requests to /vsx-peer/rest/v1/login are not supported.

    • Accessing the Web UI. Setting the browser address to https://<connected_switch_ip>/vsx-peer is not supported.

    • Accessing the real-time notifications framework through the WebSockets connection. Setting the connection to address to wss://<connected_switch_ip>/vsx-peer/rest/v1/notification is not supported.

      However, you can specify the peer VSX switch when you subscribe to topics.

  • Audit messages are logged on the peer device.

  • When configuration synchronization is enabled, supported configuration changes on the primary VSX switch are replicated on the secondary VSX switch. Changing the configuration of a secondary VSX switch might cause the configurations to be out of synchronization.

For more information about VSX, see the ArubaOS-CX Virtual Technologies Guide for your software release.

Examples:

  • Getting the VSX status of the secondary VSX switch while connected to the primary VSX switch at IP address 192.0.2.5:

    $ curl -k --noproxy 192.0.2.5 GET \
    -b /tmp/primary_auth_cookie \
    "https://192.0.2.5/vsx-peer/rest/v1/system/vsx?attributes?oper_status"
  • Getting the VSX status of the primary VSX switch while connected to the secondary VSX switch at IP address 192.0.2.6:

    $ curl -k --noproxy 192.0.2.6 GET \
    -b /tmp/secondary_auth_cookie \
    "https://192.0.2.6/vsx-peer/rest/v1/system/vsx?attributes?oper_status"
  • Getting the name and IP addresses of ports on secondary VSX switch while connected to the primary VSX switch at IP address 192.0.2.5:

    $ curl -k --noproxy 192.0.2.5 GET \
    -b /tmp/primary_auth_cookie \
    "https://192.0.2.5/vsx-peer/rest/v1/system/ports?attributes=name,ipv4_adress"