Topology Compare REST API

NVIDIA UFM Enterprise REST API Guide v6.13.2-5

This API is asynchronous, therefore will create a hidden job and return its ID in the response.

  • URL: POST ufmRestV2/reports/Topology_Compare

  • Payload: .topo file (the payload is optional and if you do not send it, then the topology is compared against the master typology).

  • Response: redirect to job ID

  • URL: GET ufmRestV2/reports/last_report/Topology_Compare

  • Response:

Copy
Copied!
            

"{ { "added": { "nodes": [ { "guid": "0002c9000002026c", "system_name": "L0_R03_B15_I04", "ip": "0.0.0.0", "type": "switch" }, { "guid": "0002c90000012721", "system_name": "H_5", "ip": "0.0.0.0", "type": "host" } ], "links": [ { "source_guid": "0002c9000002026c", "destination_guid": "0002c90000021b7c", "name": "0002c9000002026c_28:0002c90000021b7c_4" }, { "source_guid": "0002c9000002026c", "destination_guid": "0002c90000021b88", "name": "0002c9000002026c_31:0002c90000021b88_4" }, { "source_guid": "0002c9000002026c", "destination_guid": "0002c90000021b8c", "name": "0002c9000002026c_32:0002c90000021b8c_4" } ] }, "removed": { "nodes": [ { "guid": "0002c9000002026c", "system_name": "L0_R03_B15_I04", "ip": "0.0.0.0", "type": "switch" }, { "guid": "0002c90000012721", "system_name": "H_5", "ip": "0.0.0.0", "type": "host" } ], "links": [ { "source_guid": "0002c9000002026c", "destination_guid": "0002c90000021b7c", "name": "0002c9000002026c_28:0002c90000021b7c_4" }, { "source_guid": "0002c9000002026c", "destination_guid": "0002c90000021b88", "name": "0002c9000002026c_31:0002c90000021b88_4" }, { "source_guid": "0002c9000002026c", "destination_guid": "0002c90000021b8c", "name": "0002c9000002026c_32:0002c90000021b8c_4" } ] } }

  • URL: GET /ufmRestV2/Topology_Compare

  • Response:

Copy
Copied!
            

[ { "report_id": "4", "report_scope": "Periodic", "timestamp": "2021-06-22 11:00:00" }, { "report_id": "5", "report_scope": "Periodic", "timestamp": "2021-06-22 11:05:00" }, { "report_id": "6", "report_scope": "Periodic", "timestamp": "2021-06-22 11:10:00" }, ]

  • URL: GET /ufmRest/reports/Topology_Compare/<report_id>

  • Response:

Copy
Copied!
            

{ "title": "Topology Compare Report", "date": "2021-01-21 12:02:00", "sections": [ { "title": "Topology Compare", "description": "Compares planned topology to an actual one ", "status": { "severity": "Critical", "value": "Completed Successfully. 3 Errors Found, 1 Warnings Found" }, "elements": [ { "status": { "severity": "Critical", "value": "Completed Successfully. 3 Errors Found, 1 Warnings Found" }, "elements": [ { "Detected Differences": " Found mismatches between the topology defined in /opt/ufm/data/fabric.topo and the discovered fabric.", "Severity": "Warning" }, { "Detected Differences": " Total: 3 Additional nodes detected", "Severity": "Critical" }, { "Detected Differences": " Unplanned node detected: r-hyp-sw01/U1", "Severity": "Critical" }, { "Detected Differences": " Unplanned node detected: r-ufm254-hyp-03/mlx5_0", "Severity": "Critical" }, { "Detected Differences": " Unplanned node detected: r-ufm254-hyp-04/U1", "Severity": "Critical" } ] } ] } ], "Created by": "admin" }

Update Master Topology File with Current Topology or External File

  • URL: POST ufmRestV2/Topology_Compare/master_topology

  • External file optional (if not sent, the API aligns the master topology with the current topology).

  • Description: generates the .topo file for the current topology. Could be synchronous or asynchronous call.

  • URL: POST ufmRestV2/Topology_Compare/topology_file

  • Request Data: N/A

  • Response:

Copy
Copied!
            

{ "file_name": "mytop.topo" }

  • Description: requests the file from the server side in order to download it on the local machine.

  • URL: GET /ufmRest/topology_file/<file_name>

  • Response: .topo file

  • URL: GET /ufmRest/notifications

  • Response:

Copy
Copied!
            

[ { "instanceID": 4, "subject": "Topology Diff", "severity": "Info", "timestamp": "2021-01-29 15:16:18", "read": true, "body": {"is_stable":true} }]

  • Description: Acknowledge the notification once the user gets the message.

  • URL: PUT/ufmRest/notifications/>instanceID>

  • Response: 202 successful operation

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