Expected Switch

Create Expected Switch

Changed on

Create an Expected Switch to pre-register network switches expected to be discovered at a Site.

Org must have an Infrastructure Provider entity. User must have authorization role with PROVIDER_ADMIN suffix.

Alternatively, Tenant Admins with TargetedInstanceCreation capability can also create Expected Switches if they have an account with the Site's Infrastructure Provider.

post/v2/org/{org}/nico/expected-switch

Request

  • Base URL
    https://nico-rest-api.nico.svc.cluster.local
  • URL
    https://nico-rest-api.nico.svc.cluster.local/v2/org/{org}/nico/expected-switch
  • Auth
    HTTP bearer

Request body

siteIdstring uuid required

ID of the site the Expected Switch belongs to

bmcMacAddressstring required

MAC address of the Expected Switch's BMC (Baseboard Management Controller)

defaultBmcUsernamestring nullable

Username for accessing the Expected Switch's BMC (no API length limit; the BMC's username policy still applies)

defaultBmcPasswordstring nullable

Password for accessing the Expected Switch's BMC (up to 255 characters; the BMC's password policy still applies)

switchSerialNumberstring required

Serial number of the Expected Switch

nvOsUsernamestring nullable

NvOS username for the Expected Switch

nvOsPasswordstring nullable

NvOS password for the Expected Switch

nvosMacAddressesstring[]

Deprecated and ignored. This field never configures NVOS ports or primary selection, regardless of its contents. Use nvosInterfaces, including in replace-all entries. Supplying both fields is allowed; only nvosInterfaces takes effect.

rackIdstring nullable

Optional rack identifier for this component

bmcIpAddressstring nullable

Optional BMC IP address (IPv4 or IPv6). When set, pre-allocates a reserved IP for the BMC. It must not be unspecified, multicast, or IPv4 limited broadcast.

namestring nullable

Display name for this component

manufacturerstring nullable

Manufacturer of this component

modelstring nullable

Model of this component

descriptionstring nullable

Description of this component

slotIdinteger nullable

Slot ID within the rack

trayIdxinteger nullable

Tray index within the rack

hostIdinteger nullable

Host ID within the tray

labelsLabels

Label keys must not be empty or whitespace-only. Keys and values may contain at most 255 characters and must not contain the Unicode NUL character (U+0000). Empty values are allowed.

Example request

{
  "siteId": "f97df110-f4de-492e-8849-4a6af68026b0",
  "bmcMacAddress": "00:1A:2B:3C:4D:5E",
  "bmcIpAddress": "192.168.1.100",
  "defaultBmcUsername": "admin",
  "defaultBmcPassword": "password123",
  "switchSerialNumber": "SWITCH-12345",
  "nvOsUsername": "nvadmin",
  "nvOsPassword": "nvpassword123",
  "nvosInterfaces": [
    {
      "macAddress": "00:1A:2B:3C:4D:60",
      "isPrimary": true
    },
    {
      "macAddress": "00:1A:2B:3C:4D:61",
      "isPrimary": false
    }
  ],
  "rackId": "rack-01",
  "manufacturer": "NVIDIA",
  "labels": {
    "environment": "production",
    "rack": "A1"
  }
}

Response

Created

idstring uuid

Unique identifier for the Expected Switch

siteIdstring uuid

ID of the site the Expected Switch belongs to

bmcMacAddressstring

MAC address of the Expected Switch's BMC (Baseboard Management Controller)

switchSerialNumberstring

Serial number of the Expected Switch

nvosMacAddressesstring[]

Deprecated flat NVOS MAC list retained for v2 compatibility. Use nvosInterfaces. Responses emit both fields, and this array contains the same MACs in the same order as nvosInterfaces.

rackIdstring nullable

Optional rack identifier for this component

bmcIpAddressstring nullable

Optional BMC IP address (IPv4 or IPv6). When set, pre-allocates a reserved IP for the BMC.

namestring nullable

Display name for this component

manufacturerstring nullable

Manufacturer of this component

modelstring nullable

Model of this component

descriptionstring nullable

Description of this component

slotIdinteger nullable

Slot ID within the rack

trayIdxinteger nullable

Tray index within the rack

hostIdinteger nullable

Host ID within the tray

labelsLabels

Label keys must not be empty or whitespace-only. Keys and values may contain at most 255 characters and must not contain the Unicode NUL character (U+0000). Empty values are allowed.

createdstring date-time

ISO 8601 datetime when the Expected Switch was created

updatedstring date-time

ISO 8601 datetime when the Expected Switch was last updated

Example response

{
  "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
  "siteId": "f97df110-f4de-492e-8849-4a6af68026b0",
  "bmcMacAddress": "00:1A:2B:3C:4D:5E",
  "bmcIpAddress": "192.168.1.100",
  "switchSerialNumber": "SWITCH-12345",
  "nvosInterfaces": [
    {
      "macAddress": "00:1A:2B:3C:4D:60",
      "isPrimary": true
    },
    {
      "macAddress": "00:1A:2B:3C:4D:61",
      "isPrimary": false
    }
  ],
  "nvosMacAddresses": [
    "00:1A:2B:3C:4D:60",
    "00:1A:2B:3C:4D:61"
  ],
  "rackId": "rack-01",
  "manufacturer": "NVIDIA",
  "labels": {
    "environment": "production",
    "rack": "A1"
  },
  "created": "2019-08-24T14:15:22Z",
  "updated": "2019-08-24T14:15:22Z"
}

Changes

    • breaking

      added the new required request property

    • info

      request property deprecated

    • info

      added the optional property to the response with the status

    • info

      response property nvosMacAddresses deprecated

    • info

      removed the nico enum value from the response property for the response status

    • info

      removed the nico enum value from the response property for the response status

    • info

      removed the nico enum value from the response property for the response status