image image image image image

On This Page

  • Description – Manages unhealthy ports in OpenSM
  • Request URL – GET /ufmRest/app/unhealthy_ports
  • Main Operations
    • Get unhealthy ports
    • Mark unhealthy ports as healthy
    • Mark healthy ports as unhealthy

Get Unhealthy Ports

  • Description – Gets all ports that are marked as healthy from OpenSM
  • Request URL – GET /ufmRest/app/unhealthy_ports
  • Request Content Type – Application/json
  • Response 

    [
        {
            "PeerLID": "18", 
            "PeerPortNumber": 6, 
            "UnhealthyPortNumber": 1, 
            "PeerGUID": "248a070300f88fe0", 
            "PeerPort": "switch-ec4034/6", 
            "UnhealthyNode": "r-dmz-ufm135", 
            "UnhealthyPort": "r-dmz-ufm135/HCA-1/1", 
            "State": "Info", 
            "PeerPortDname": "6", 
            "Condition": "MANUAL", 
            "PeerNode": "switch-ec4034", 
            "StatusTime": "Wed Apr 29 00:05:32 2020", 
            "UnhealthyPortDname": "HCA-1/1", 
            "UnhealthyGUID": "248a0703002e628e"
        }
    ]
  • Status Codes

    • 200 – OK

Mark Unhealthy Ports as Healthy

  • Description – Marks unhealthy ports or devices as healthy. Once device GUID is passed as a parameter, its unhealthy ports are marked as healthy.
  • Request URL – PUT /ufmRest/app/unhealthy_ports
  • Request Content Type – Application/json
  • Request Data 

       "ports":[  
          "0002c9030060dc20_10"
       ],
       “devices”:[
                “0002c9030060dc20”
       ],
       "ports_policy":"HEALTHY"
  • Status Codes

    • 200 – OK
    • 400 – bad request

Mark Healthy Ports as Unhealthy

  • Description – mark healthy ports as unhealthy, and send the action that you want to apply on this port
    Action: ["no_discover", "isolate"]
  • Request URL – PUT /ufmRest/app/unhealthy_ports
  • Request Content Type – Application/json
  • Request Data

    {
       "ports":[
          "0002c9030060dc20_10"
       ],
       "ports_policy":"UNHEALTHY",
       "action":"no_discover"
    }
  • Status Codes

    • 200 – OK
    • 400 – bad request


Mark All Unhealthy Ports as Healthy at Once

  • Description – Marks all unhealthy ports as healthy at once.
  • Request URL – PUT /ufmRest/app/unhealthy_ports
  • Request Content Type – Application/json
  • Request Data 

    {
      "ports": [
        "ALL"
      ],
      "ports_policy": "HEALTHY"
    }
  • Status Codes

    • 200 – OK

Connectivity

  • Description – Gets unhealthy port.
  • Request URL – GET app/unhealthy_ports.
  • Parameter:
    • Connectivity
      • host-to-switch
      • switch-to-switch

Example: /ufmRestV2/app/unhealthy_ports?connectivity=host-to-switch

Delete Policies

  • Description: Deletes unhealthy/healthy ports from health policy file.
  • Request URL: DELETE app/unhealthy_ports/policy
  • Request data- List of strings:
    • Port names - Deletes all the ports specified in the list.
    • Device GUID - Deletes all the ports in the health policy of that specified device GUID.
    • all_healthy - Deletes all the healthy ports in the health policy.
  • Status Codes-
    • 200 – OK
  • Response:
    A list of deleted ports.

Get Healthy Policy Ports

  • Description: Retrieves all unhealthy/healthy ports from the health policy file.
  • Request URL:  Get app/unhealthy_ports/policy
  • Request data
    • device_guid: Enables you to group ports by device.
  • Status Codes:
    • 200-OK
  • Response:

    [
        {
            "node_guid": "248a070300f88fe0",
            "port_number": 6,
            "policy": Healthy,
            "action":””,
            "last_updated": "Wed Apr 29 00:05:32 2020",
            "node_description": "r-dmz-ufm135",
            "node_name": "r-dmz-ufm135/HCA-1/1",
            "capabilities": "mark_port_unhealthy",
        }
    ]

Get Healthy Policy Devices

  • Description – Retrieves all devices from the health policy.
  • Request URL – Get app/unhealthy_ports/policy_devices
  • Status Codes:
    • 200-OK
  • Response:

    [
        {
            "guid": "248a070300f88fe0",
            "type": host,
            "name":” r-dmz-ufm135/HCA-1/1”,
            "number_of_policies”: 7
        }
    ]