Networking NVIDIA UFM Enterprise REST API Guide

Mirroring REST API

  • Description: Performs mirroring actions on ports of FDR, HDR, QDR, and EDR Mellanox switches.

  • Request URL: /ufmRest/app/mirrorings

  • Main operations:

    • Create a mirroring template

    • Update a mirroring template

    • Get a mirroring template

    • Delete a mirroring template

    • Port mirroring action

Create Mirroring Template

  • Description: Creates a mirroring template that you can later apply to a specific port.

  • Request URL: POST /ufmRest/app/mirrorings

  • Request content type: application/json

  • Request data:

    {
      "system_id": "<system_id>",
      "target_port": "<target_port_id>",
      "packet_size":"<packet_size>",
      "service_level":"<service_level>"
    }
    
  • Status codes:

    • 200: Mirroring template created successfully

    • 400: Bad request (bad or missing parameters)

Update Mirroring Template

  • Description: Updates an existing mirroring template.

  • Request URL: PUT /ufmRest/app/mirrorings

  • Request content type: application/json

  • Request data:

    {
      "system_id": "<system_id>",
      "target_port": "<target_port_id>",
      "packet_size":"<packet_size>",
      "service_level":"<service_level>"
    }
    
  • Status codes:

    • 200: Mirroring template updated successfully

    • 400: Bad request (bad or missing parameters)

Get Mirroring Template

  • Description: Retrieves information about an existing mirroring template by system ID.

  • Request URL: GET /ufmRest/app/mirrorings/<system_id>

  • Request content type: application/json

  • Response data:

    {
        "target_port": {
            "number": 9, 
            "module": "N/A", 
            "physical_state": "Link Up", 
            "peer": "0002c903000e0b73_1", 
            "enabled_speed": [
                "2.5 Gbps", 
                "5.0 Gbps", 
                "10.0 Gbps", 
                "14.0 Gbps", 
                "25.0 Gbps"
            ], 
            "mirror": "disable", 
            "guid": "e41d2d0300167ee0", 
            "enabled_width": [
                "1x", 
                "4x"
            ], 
            "supported_width": [
                "1x", 
                "4x"
            ], 
            "severity": "Minor", 
            "logical_state": "Armed", 
            "capabilities": [
                "enable", 
                "reset"
            ], 
            "active_speed": "10.0 Gbps", 
            "lid": 10, 
            "description": "Switch IB Port", 
            "supported_speed": [
                "2.5 Gbps", 
                "5.0 Gbps", 
                "10.0 Gbps", 
                "14.0 Gbps", 
                "25.0 Gbps"
            ], 
            "systemID": "e41d2d0300167ee0", 
            "tier": 4, 
            "path": "default(2) / Switch: r-ufm-sw63 / NA / 9", 
            "name": "e41d2d0300167ee0_9", 
            "active_width": "4x", 
            "dname": "9", 
            "mtu": 4096, 
            "external_number": 9
        },
    "packet_size":200,
    "service_level":5
    }
    
  • Status codes:

    • 200: Mirroring template retrieved successfully

    • 400: Bad request (bad or missing parameters)

Delete Mirroring Template

  • Description: Deletes an existing mirroring template by system ID.

  • Request URL: DELETE /ufmRest/app/mirrorings/<system_id>

  • Request content type: application/json

  • Status codes:

    • 200: Mirroring template deleted successfully

    • 400: Bad request (bad or missing parameters)

Port Mirroring Action

  • Description: Performs the mirroring action on a specific port.

  • Request URL: POST /ufmRest/app/mirrorings/action

  • Request content type: application/json

  • Request data:

    {
      "port_id": "<port_id>",
      "action": "enable,disable",
      "rx": true,false,
      "tx": true,false
    }
    
  • Status codes:

    • 200: Mirroring action completed successfully

    • 400: Bad request (bad or missing parameters)

Last updated: