NDT Plugin REST API
Authentication
Following authentication types are supported:
- basic (/ufmRest) 
- client (/ufmRestV2) 
- token (/ufmRestV3) 
Upload NDT File
- Description: Uploads NDT file to UFM 
- URL: POST ufmRestV2/plugin/ndt/upload_metadata 
- Request Data: - [ { "file_name": "topo1.ndt", "file": base64 string, "file_type": "switch_to_host", "sha-1": "xxx" }, { "file_name": "topo2.ndt", "file": base64 string, "file_type": "switch_to_switch", "sha-1": "xxx" } ] 
- Response: N/A 
- Status Codes: - 200 – Ok. 
- 400 – bad request (bad or missing parameters). 
- 500 - insufficient resources (disk space) 
 
Delete NDT File
- Description: Deletes NDT files from UFM 
- URL: POST ufmRestV2/plugin/ndt/delete 
- Request Content Type – Application/json 
- Request Data: - [ { "file_name": "topo1.ndt" }, { "file_name": "topo2.ndt" } ] 
- Response: N/A 
- Status Codes: - 200 – Ok. 
- 400 – bad request (bad or missing parameters). 
- 404 – not found. 
 
Get List of Uploaded NDT Files
- Description: Get list of uploaded NDT files 
- URL: GET ufmRestV2/plugin/ndt/list 
- Request Data: N/A 
- Response: - [ { "file_name": "topo1.ndt", "last_uploaded": "2020-09-13 10:57:09.253", "sha-1”: "c3499c2729730a7f807efb8676a92dcb6f8a3f8f", "file_type": "switch_to_host" }, { "file_name": "topo2.ndt", "last_uploaded": "2020-08-15 11:55:19.203", "sha-1": "a94a8fe5ccb19ba61c4c0873d391e987982fbbd3", "file_type": "switch_to_switch" } ] 
- Status Codes: - 200 – Ok. 
- 400 – bad request (bad or missing parameters). 
 
Run NDT Topo Diff
- Description: Run NDT topo compare and save last X reports 
- URL: POST ufmRestV2/plugin/ndt/compare 
- Request Data (Optional): - { "run": { "startTime": "2020-10-01 16:40:59", "endTime": "2020-10-01 18:45:59", "interval": 3600 } } Note- request data is needed only to define periodic execution 
- startTime - when to start the first run 
- endTime - the time of the last run 
- interval - interval between the runs in minutes 
 
- Response: N/A 
- Status Codes: - 200 – Ok 
- 400 – bad request (bad or missing parameters). 
 
Cancel NDT Topo Diff
- Description: Cancels periodic NDT comparison 
- URL: GET ufmRestV2/plugin/ndt/cancel 
- Request: N/A 
- Response: N/A 
- Status Codes: - 200 – Ok. 
- 400 – bad request (bad or missing parameters). 
 
Get NDT Topo Diff Reports
- Description: Get reports list 
- URL: GET ufmRestV2/plugin/ndt/reports 
- Request: N/A 
- Response Content Type – Application/json 
- Response: - [ { "report_id": "1", "report_scope": "Periodic", "timestamp": "2021-06-22 11:00:00" }, { "report_id": "2", "report_scope": "Periodic", "timestamp": "2021-06-22 11:05:00" }, { "report_id": "3", "report_scope": "Periodic", "timestamp": "2021-06-22 11:10:00" }, ] 
- Status Codes: - 200 – Ok. 
- 400 – bad request (bad or missing parameters). 
 
Get NDT Topo Diff Report
- Description: Get a specific report 
- URL: GET ufmRestV2/plugin/ndt/reports/ 
- Request: N/A 
- Response Content Type – Application/json 
- Response: - { "error”: "", "timestamp": "2020-09-13 10:57:09.253", "report": { "miss-wired": [ { "expected": "DSM09-0101-0617-001IB2/P2 - DSM09-0101-0721-001IB4/P2" "actual": “DSM09-0101-0617-001IB2/P2 - DSM09-0101-0721-001IB4/P3" }, { "expected": "DSM09-0101-0721-001IB4/P3 - DSM09-0101-0617-001IB2/P2" "actual": "DSM09-0101-0721-001IB4/P3 - DSM09-0101-0617-001IB2/P4" } ], "missing_in_ufm": [ "DSM09-0101-0617-001IB2/P2-DSM09-0101 - 0721-001IB4/P2", "DSM09-0101-0617-001IB2/P3-DSM09-0101 - 0721-001IB4/P3" ], "missing_in_ndt": [ "DSM09-0101-0617-001IB2/P6-DSM09-0101 - 0721-001IB4/P6", "DSM09-0101-0617-001IB2/P5-DSM09-0101 - 0721-001IB4/P5" ] } } Note- In case the report can’t be generated, the error would be raised: - { "errors": "Can’t parse file topo1.ndt", "timestamp": "2020-09-13 10:57:09.253" } 
- Status Codes: Note- The report can have three types of link and should be limited to the first 10K error events: - miss-wired links - links that are connected differently than specified in the NDTs 
- missing_in_ufm - links that are specified in the NDT files, but missing in the UFM 
- missing_in_ndt - links that aren’t specified in the NDT, but found by the UFM 
 - 200 – Ok. 
- 400 – bad request (bad or missing parameters). 
 
Upload Merger NDT File
- Description: Uploads Merger NDT file to the NDT plugin 
- URL: POST ufmRestV2/plugin/merger_upload_ndt 
- Request Data: - file: (binary) 
- Response: N/A 
- Status Codes: - 200 – Ok. 
- 400 – Bad request (bad or missing parameters). 
 
Get List of Uploaded Merger NDT Files
- Description: Gets a list of uploaded merger NDT files 
- URL: GET ufmRestV2/plugin/ndt/merger_ndts_list 
- Request Data: N/A 
- Response Content Type – Application/json 
- Response: - [ { - "file":- "ndt_small_fabric_new.csv",- "timestamp":- "2023-08-09 11:34:59",- "sha-1":- "",- "file_type":- "",- "file_status":- "Verified",- "file_capabilities":- "Verify,Deploy,Update"}, {- "file":- "ndt_full_fabric_new.csv",- "timestamp":- "2023-08-13 10:49:29",- "sha-1":- "",- "file_type":- "",- "file_status":- "Verified",- "file_capabilities":- "Verify,Deploy,Update"} ]
- Status Codes: - 200 – Ok. 
- 400 – Bad request (bad or missing parameters). 
 
Get Info about Uploaded Merger NDT File
- Description: Gets information about the single uploaded merger NDT file 
- URL: GET ufmRestV2/plugin/ndt/merger_ndts_list/NDT_FILE_NAME 
- Request Data: N/A 
- Response: - { - "file":- "ndt_small_fabric_new.csv",- "timestamp":- "2023-08-09 11:34:59",- "sha-1":- "",- "file_type":- "",- "file_status":- "Verified",- "file_capabilities":- "Verify,Deploy,Update"}
- Status Codes: - 200 – Ok. 
- 400 – bad request (bad or missing parameters). 
 
Verify Merger NDT File
- Description: Verifies merger NDT file with current IB fabric. The response is the number of created reports. 
- URL: POST ufmRestV2/plugin/ndt/merger_verify_ndt 
- Request Data: - { - "ndt_file_name":- "NDT_FILE_NAME",- "NDT_status":- "Active"} Response Content Type – Application/json Response: {- "ndt_file_name":- "NDT_FILE_NAME",- "report_id":- 47}
- Status Codes: - 200 – Ok. 
- 400 – bad request (bad or missing parameters). 
 
Get List of Merger Verification Reports
- Description: Gets a list of verification reports. 
- URL: GET ufmRestV2/plugin/ndt/merger_verify_ndt_reports 
- Request Data: N/A 
- Response Content Type – Application/json 
- Response: - [ { - "report_id":- 1,- "report_scope":- "Single",- "timestamp":- "2023-08-06 15:54:07"}, {- "report_id":- 2,- "report_scope":- "Single",- "timestamp":- "2023-08-06 17:03:17"}, {- "report_id":- 3,- "report_scope":- "Single",- "timestamp":- "2023-08-06 17:04:21"}, {- "report_id":- 4,- "report_scope":- "Single",- "timestamp":- "2023-08-06 17:12:59"}, {- "report_id":- 5,- "report_scope":- "Single",- "timestamp":- "2023-08-06 17:14:00"} ] Status Codes:- 00– Ok.- 400– bad request (bad or missing parameters).
Get Merger Verification Report
- Description: Gets report by report number with all the issues found during verification. 
- URL: GET ufmRestV2/plugin/ndt/merger_verify_ndt_reports/REPORT_ID 
- Request Data: N/A 
- Response Content Type – Application/json 
- Response: - { - "status":- "Completed with errors",- "error":- "",- "timestamp":- "2023-08-07 10:12:21",- "report": [ {- "category":- "missing in wire",- "description": "expected: MF0;r-ufm-sw13:MQM8700/U1/- 1- NEMO-LEAF-- 2/- 11. actual: MF0;r-ufm-sw13:MQM8700/U1/- 1- NEMO-LEAF-- 2/- 1" } ],- "NDT_file":- "miswired_in_ndt_file.csv"} Status Codes:- 200– Ok.- 400– bad request (bad or missing parameters).
Merger Create Topoconfig File Based on NDT file
- Description: Creates a topoconfig file based on the NDT file with specified boundary port state. 
- URL: POST ufmRestV2/plugin/ndt/merger_create_topoconfig 
- Request Data: - { - "ndt_file_name":- "ndt_small_fabric_new.csv",- "boundary_port_state":- "Disabled"}
- Response: N/A 
- Status Codes: - 200 – Ok. 
- 400 – bad request (bad or missing parameters). 
 
Merger Deploy Topoconfig File Based on NDT file
- Description: Deploy opoconfig file to UFM server and signal OpenSM to reload configuration. 
- URL: POST ufmRestV2/plugin/ndt/merger_deploy_ndt_config 
- Request Data: - { - "ndt_file_name": "ndt_small_fabric_new.csv” }
- Response: N/A 
- Status Codes: - 200 – Ok. 
- 400 – bad request (bad or missing parameters). 
 
Merger Update and Deploy topoconfig File Based on NDT file
- Description: Merger update boundary port state in topoconfig file and deploy topoconfig file based on NDT file to OpenSM. 
- URL: POST ufmRestV2/plugin/ndt/merger_update_deploy_ndt_config 
- Request Data: - { - "ndt_file_name":- "ndt_small_fabric_new.csv",- "boundary_port_state":- "No-discover"}
- Response: N/A 
- Status Codes: - 200 – Ok. 
- 400 – bad request (bad or missing parameters). 
 
Merger Update Topoconfig File Based on NDT file
- Description: Merger update boundary port state in topoconfig file. 
- URL: POST ufmRestV2/plugin/ndt/merger_update_topoconfig 
- Request Data: - { - "ndt_file_name":- "ndt_small_fabric_new.csv",- "boundary_port_state":- "No-discover"}
- Response: N/A 
- Status Codes: - 200 – Ok. 
- 400 – bad request (bad or missing parameters). 
 
Merger Delete NDT File
- Description: Deletes an NDT file. 
- URL: POST ufmRestV2/plugin/ndt/merger_delete_ndt 
- Request Data: - { - "ndt_file_name": "ndt_small_fabric_new.csv” }
- Response: N/A 
- Status Codes: - 200 – Ok. 
- 400 – bad request (bad or missing parameters). 
 
Get Last Deployed NDT File
- Description: Gets name of last deployed NDT file. 
- URL: GET ufmRestV2/plugin/ndt/merger_deployed_ndt 
- Request Data: N/A 
- Response Content Type – Application/json 
- Response: - { - "last_deployed_file":- "miswired_in_ndt_file.csv"}
- Status Codes: - 200 – Ok. 
- 400 – bad request (bad or missing parameters). 
 
Configure Cable Validation Plugin Connection
- Description: Retrieves the connection definition status from the Cable Validation Plugin. 
- URL: POST ufmRestV2/plugin/ndt/cable_validation_connection_configuration 
- Request Data: - For local host connection { - "address":- "localhost"} For remote host connection {- "address":- "remote_host_name_or_ip_address",- "port":- 443,- "username":- "admin",- "password":- "123456"}
- Response: N/A 
- Status Codes: - 200 – Ok 
- 400 – bad request (bad or missing parameters) 
 
Get Cable Validation Plugin Connectivity Status
- Description: Retrieves the connection definition status for the Cable Validation Plugin. 
- URL: GET ufmRestV2/plugin/ndt/cable_validation_connection_configuration 
- Request Data: N/A 
- Response Content Type – Application/json 
- Response: - For remote host connection { - "mode":- "remote",- "is_enabled":- true,- "address":- ""remote_host_name_or_ip_address",- "port":- 443,- "username":- "admin"} For local connection {- "mode":- "local",- "is_enabled":- true} For disabled connection {- "is_enabled":- false}
- Status Codes: - 200 – Ok 
- 400 – bad request (bad or missing parameters) 
 
Get Cable Validation Report
- Description: Retrieves Cable Validation Report 
- URL: GET ufmRestV2/plugin/ndt/cable_validation_report 
- Request Data: N/A 
- Response Content Type – Application/json 
- Response: - { - "report":- "ValidationReport",- "stats": {- "in_progress":- 1,- "no_issues":- 0,- "not_started":- 0},- "issues": [ {- "timestamp":- 1698670939.5339258,- "node_desc":- "MQM8700 r-ufm-sw13",- "rack":- null,- "unit":- null,- "issues": [ [- "Wrong-neighbor",- "r-ufm-sw13:P1",- "S98039b0300867bba N98039b0300867bba:P1",- "NEMO-LEAF-2:P1",- "NA",- "Switch-Switch"], [- "Wrong-neighbor",- "r-ufm-sw13:P3",- "S98039b0300867bba N98039b0300867bba:P3",- "NEMO-LEAF-2:P3",- "NA",- "Switch-Switch"] ] }
- Status Codes: 
- 200 – Ok 
- 400 – bad request (bad or missing parameters