image image image image image

On This Page

rest-rdma is a utility to send REST requests over IB to the UFM server. Rest requests can be one of the following three types:

  •  UFM REST API requests
  •  ibdiagnet requests
  •  Telemetry requests

rest-rdma is distributed as a docker container that could serve as server and as client.

Deployment Server

Deploy Plugin on UFM Appliance

  1. Log into your UFM as admin.
  2. Enter config mode. Run:

    config terminal

    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  docker pull mellanox/ufm-plugin-rest-rdma:[version]

Deploy Plugin on Bare Metal Server

  1. Verify that UFM is installed and running
  2. Pull image from docker hub:
    docker pull mellanox/ufm-plugin-rest-rdma:[version] 
  3. To load image run:
    /opt/ufm/scripts/ add -p rest-rdma

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:

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

How to Run


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

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


There are three options to run client:

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
      ./ -h
  2. From hosting server run script located at /opt/ufm/ufm-plugin-ufm-rest/ inside docker

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

    ./ -u admin -p password -t simple -a GET -w ufmRest/app/ufm_version

    1. To see available options run:
      ./ -h

  3. From hosting server using docker exec command.

    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/ -r client -u admin -p password -t simple -a GET -w ufmRest/app/ufm_version

Telemetry Authentication Configuration

Telemetry request authentication option could be enabled or disabled (enabled by default – set to True) in ufm_rdma.ini file in [Server] section on the server. It means that the rest_rdma server will perform simple request to UFM server, using supplied credentials to verify that the user is allowed to run telemetry requests. 


Remote ibdiagnet Request

The script does not require authentication as the server side can run on a machine which does not run UFM (which is responsible for the authentication) so just to run from hosting server. 

/ [options]

rest Request with Username/Password Authentication

To get UFM version from inside the docker: 

./ -r client -u admin -p admin_pwd -t simple -a GET -w ufmRest/app/ufm_version

To get UFM version from hosting server using script: 

./ -u admin -p admin_pwd -t simple -a GET -w ufmRest/app/ufm_version

For telemetry: 

./ -r client -u admin -p admin_pwd -t telemetry -a GET -g 9001 -w /csv/enterprise

To get ibdiagnet run result using UFM REST API from inside the docker:

./ -r client -u admin -p admin_pwd -t ibdiagnet -a POST -w ufmRest/reports/ibdiagnetPeriodic -l '{"general": {"name": "IBDiagnet_CMD_1234567890_199_88", "location": "local", "running_mode": "once"}, "command_flags": {"--pc": ""}}'

rest Request with Client Certificate Authentication

need to pass path to client certificate file and name of UFM server machine: 
6.	./ -r client -t simple -a GET -w ufmRest/resources/modules -d /path/to/certificate/file/ufm-client.pfx -s
for telemetry if need authentication from inside the docker
./ -r client  -t telemetry -a GET -g 9001 -w csv/enterprise -d /path/to/certificate/file/ufm-client.pfx -s

Client certificate file should be located INSIDE docker container.

rest Request with Token Authentication

need to pass token for authentication
./ -r client -k OGUY7TwLvTmFkXyTkcsEWD9KKNvq6f -t simple -a GET -w ufmRestV3/app/ufm_version
for telemetry if need to perform authentication
./ -r client -k 4rQRf7i7wEeliuJEurGbeecc210V6G  -t telemetry -a GET -g 9001 -w /csv/enterprise

Token could be generated using UFM UI.

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