NVIDIA UFM-SDN Appliance User Manual v4.10.0
NVIDIA UFM-SDN Appliance User Manual v4.10.0

rest-rdma Plugin

rest-rdma is a utility to send REST requests over IB to the UFM server. rest-rdma is distributed as a docker container that could serve as server and as client.

Deploy Plugin on UFM Appliance

  1. Log into your UFM as admin.

  2. Enter config mode. Run:

    Copy
    Copied!
                

    enable config terminal

    Warning

    Make sure that UFM is running with show ufm status. If UFM is down then run with ufm start.

  3. Ensure that rest-rdma plugin is disabled with show ufm plugin command

  4. Pull the plugin container with docker pull mellanox/ufm-plugin-rest-rdma:[version]

  5. Run ufm plugin rest-rdma add tag [version] to enable the plugin

  6. Check that plugin is up and running with show ufm plugin

Deployment Client

To pull image from docker hub:
docker pull mellanox/ufm-plugin-rest-rdma:[version]

To start container as client (on any host in the same fabric as UFM server) run:

Copy
Copied!
            

docker run -d --network=host --privileged --name=ufm-plugin-rest-rdma --rm -v /tmp/ibdiagnet:/tmp/ibdiagnet mellanox/ufm-plugin-rest-rdma:[version] client

To check that plugin is up and running run:
docker ps

Server

In server mode ufm_rdma.py will started automatically and will be restarted if exit. If ufm_rdma.py server is not running – enter to the docker and run the following commands to start the server:

Copy
Copied!
            

cd /opt/ufm/src/ufm-plugin-ufm-rest ./ufm_rdma.py -r server


Client

There are three options to run client:

Warning

From inside the docker, using custom script from the hosting server or using docker exec command from hosting server.

  1. From inside the docker:

    1. Enter to the docker using docker exec -it ufm-plugin-rest-rdma bash

    2. then cd /opt/ufm/src/ufm-plugin-rest-rdma

    3. Use -h help option to see available parameters
      ./ufm_rdma.py -h

  2. From hosting server run script located at /opt/ufm/ufm-plugin-ufm-rest/ufm-rest-rdma_client.sh inside docker

    Warning

    that could be copied using command
    cp <containerId>:/opt/ufm/ufm-plugin-ufm-rest/ufm-rest-rdma_client.sh /host/path/target

    Warning

    Example:
    ./ufm-rest-rdma_client.sh -u admin -p password -t simple -a GET -w ufmRest/app/ufm_version

    1. To see available options run:
      ./ufm-rest-rdma_client.sh -h

  3. From hosting server using docker exec command.

    Warning

    To run from inside docker, run:

    docker exec ufm-plugin-rest-rdma prior to the command.

    For example: docker exec ufm-plugin-rest-rdma /opt/ufm/ufm-plugin-ufm-rest/src/ufm_rdma.py -r client -u admin -p password -t simple -a GET -w ufmRest/app/ufm_version

Warning

All the examples in this section are relevant for running the ufm-rest-rdma client from inside the docker.

If you must run ufm-rest-rdma using the client script, all quotation marks (") must be wrapped by a backslash (\).

For example, "running_mode": "once" must become \"running_mode\":\"once\".

There are three types of user authentication flows supported by UFM and also by ufm-rest-rdma utility

Username/Password Authentication

Copy
Copied!
            

to get UFM version ./ufm_rdma.py -r client -u admin -p password -t simple -a GET -w ufmRest/app/ufm_version   to get ibdiagnet run result ./ufm_rdma.py -r client -u admin -p password -t ibdiagnet -a POST -w ufmRest/reports/ibdiagnetPeriodic -l '{"general": {"name": "IBDiagnet_CMD_1234567890_199_88", "location": "local", "running_mode": "once"}, "command_flags": {"--pc": ""}}'


Client Certificate Authentication

Copy
Copied!
            

need to pass path to client certificate file and name of UFM server machine: ./ufm_rdma.py -r client -t simple -a GET -w ufmRest/resources/modules -d /path/to/certificate/file/ufm-client.pfx -s ufm.azurehpc.core.azure-test.net

Warning

Client certificate file should be located INSIDE docker container.


Token Authentication

Copy
Copied!
            

need to pass it for authentication ./ufm_rdma.py -r client -k OGUY7TwLvTmFkXyTkcsEWD9KKNvq6f -t simple -a GET -w ufmRestV3/app/ufm_version

Warning

Token could be generated using UFM UI.

Warning

If a token is used for client authentication, ufmRestV3 must be used.


© Copyright 2023, NVIDIA. Last updated on Sep 5, 2023.