Skip to main content

Cornelis Technical Documentation

7.2.4. Using Redfish API with CN5000 Switches

Redfish is a DMTF-standard RESTful interface for out-of-band platform management. On CN5000 switches, Redfish is hosted by the Baseboard Management Controller (BMC) on each manageable board and can provide remote inventory, telemetry, event subscription, log retrieval, and firmware update.

This section provides information for setting up Redfish accounts and authentication.

The following table lists the CN5000 Redfish URIs for each resource.

Table 20. CN5000 Redfish URI Quick Reference

Resource

URI

Service root

/redfish/v1

Sessions

/redfish/v1/SessionService/Sessions

Accounts

/redfish/v1/AccountService/Accounts

Roles

/redfish/v1/AccountService/Roles

Chassis collection

/redfish/v1/Chassis

Thermal subsystem

/redfish/v1/Chassis/{CNEdge|<Name>_CNSpine|<Name>_CNLeaf|CNMM}/ThermalSubsystem

Managers (BMC)

/redfish/v1/Managers/bmc

Managers log services

/redfish/v1/Managers/bmc/LogServices

Systems log services

/redfish/v1/Systems/system/LogServices

Update Service

/redfish/v1/UpdateService

Firmware Inventory

/redfish/v1/UpdateService/FirmwareInventory

Event subscriptions

/redfish/v1/EventService/Subscriptions

Task Service

/redfish/v1/TaskService/Tasks



7.2.4.1. CN5000 Cornelis OEM Redfish Endpoints

The CN5000 switch BMC supplements the standard DMTF Redfish interface with Cornelis OEM endpoints, providing switch-specific hardware operations—including ASIC fault recovery, chassis reboot orchestration, and chassis management network configuration—that fall outside the scope of the standard DMTF schema.

  1. ASIC Reset (DCS Management Module and Switch BMCs only)

    • Endpoint: POST /redfish/v1/Managers/bmc/Actions/Oem/CornelisNetworks.AsicReset

    • Action Info: GET /redfish/v1/Managers/bmc/Oem/CornelisNetworks/AsicResetActionInfo

    • Description: Resets the network ASIC on a line card without rebooting the BMC itself. Useful for recovering from ASIC-level faults.

    • Parameters: ResetType — GracefulRestart or ForceRestart

    • Availability: Only advertised on line card BMCs (not on management module boards)

  2. Chassis Reboot (Management Module BMCs only)

    • Endpoint: POST /redfish/v1/Managers/bmc/Actions/Oem/CornelisNetworks.ChassisReboot

    • Action Info: GET /redfish/v1/Managers/bmc/Oem/CornelisNetworks/ChassisRebootActionInfo

    • Description: Reboots the entire chassis or specific slots within it. Allows targeted reboot of individual line cards from the management module.

    • Parameters: ResetType — GracefulRestart or ForceRestart; Targets (optional) — array of slot IDs to reboot (omit to reboot entire chassis)

    • Availability: Only advertised on management module BMCs

  3. Chassis IP Configuration (All BMCs)

    • Endpoint: GET/PATCH /redfish/v1/Managers/bmc/EthernetInterfaces/eth0

    • Description: Extends the standard EthernetInterface resource with an Oem.CornelisNetworks section for configuring the chassis management network address. This is the shared chassis-level IP, separate from the individual BMC's own network interface.

    • OEM Properties: ChassisIPv4Address, ChassisIPv4Netmask, ChassisIPv4Prefix, ChassisIPv6Address, ChassisIPv6Prefix

    • Operations: GET to read current config; PATCH to update

  4. Manager.Reset Override (All BMCs)

    • Endpoint: POST /redfish/v1/Managers/bmc/Actions/Manager.Reset

    • Description: The standard BMC reset action is overridden to route through Cornelis chassis management, ensuring coordinated reboot behavior across the chassis. Same ResetType values as upstream (GracefulRestart, ForceRestart), but the reboot is orchestrated rather than a raw BMC restart.

7.2.4.1. Verifying Redfish Is Installed

From a management host on the same network, confirm the Redfish service is installed and responding:

curl -k https://<bmc_ip>/redfish/v1/UpdateService/FirmwareInventory/bmc_1
 "Status": {
 "Health": "OK",
 "HealthRollup": "OK",
 "State": "Enabled"
 },
 "Updateable": false,
 "Version": "12.2.0.0.0" 

7.2.4.2. Authenticating to Redfish

Redfish on CN5000 supports two authentication methods.

  • Use Basic for simple ad-hoc calls.

    Note

    This method will leave the password in the command history.

  • Use Sessions for multi-request workflows and scripted tooling.

7.2.4.2.1. Basic Authorization
curl -k -u "admin:<password>" https://<bmc_ip>/redfish/v1/Chassis

Tip

Each request re-authenticates, which adds per-call overhead. Use Sessions for anything beyond a single call.

7.2.4.2.2. Sessions Authentication (Recommended)
  1. Create a session and capture the X-Auth-Token and Location response headers:

    curl -k -i -X POST https://<bmc_ip>/redfish/v1/SessionService/Sessions \ 
     -H "Content-Type: application/json" \ 
     -d '{"UserName":"admin","Password":"<password>"}'
  2. Use the token on subsequent requests:

    curl -k -H "X-Auth-Token: <token>" https://<bmc_ip>/redfish/v1/Chassis
  3. Log out when finished:

    curl -k -X DELETE -H "X-Auth-Token: <token>" https://<bmc_ip><session_location_uri>

7.2.4.3. Managing Redfish Accounts and Roles

CN5000 BMCs implement the three standard predefined Redfish roles.

Role

Required (Floor) Privileges

Forbidden privileges

Administrator

Login, ConfigureManager, ConfigureUsers, ConfigureSelf

Operator

Login, ConfigureSelf

ConfigureUsers, ConfigureManager

ReadOnly

Login, ConfigureSelf

ConfigureUsers, ConfigureManager, ConfigureComponents

Note

Usernames are limited to 16 characters.

7.2.4.3.1. Create an Account
curl -k -u "$BMC_USER:$BMC_PASS" -X POST \
  https:///redfish/v1/AccountService/Accounts \ 
  -H "Content-Type: application/json" \
  -d '{"UserName":"opsuser","Password":"Example123!","RoleId":"Operator"}'
7.2.4.3.2. Read an Account
curl -k -u "$BMC_USER:$BMC_PASS" \
  https:///redfish/v1/AccountService/Accounts/opsuser 
7.2.4.3.3. Change the Role of an Existing Account
curl -k -u "$BMC_USER:$BMC_PASS" -X PATCH \
  https:///redfish/v1/AccountService/Accounts/opsuser \
  -H "Content-Type: application/json" \
  -d '{"RoleId":"ReadOnly"}'
7.2.4.3.4. Delete an Account
curl -k -u "$BMC_USER:$BMC_PASS" -X DELETE \
  https://<bmc_ip>/redfish/v1/AccountService/Accounts/opsuser

7.2.4.4. Retrieving Inventory and Thermal Telemetry

The chassis Id segment in each URI depends on the board type being queried: CN5000 Switch (CNEdge) or Director Class Switch (CNMM).

  1. List the chassis collection:

    curl -k -H "X-Auth-Token: $T" https://<bmc_ip>/redfish/v1/Chassis
  2. Retrieve the thermal subsystem for the target board (example uses CNEdge):

    curl -k -H "X-Auth-Token: $T" \
      https://<bmc_ip>/redfish/v1/Chassis/CNEdge/ThermalSubsystem 
  3. Retrieve thermal metrics and fan inventory:

    curl -k -H "X-Auth-Token: $T" \
      https://<bmc_ip>/redfish/v1/Chassis/CNEdge/ThermalSubsystem/ThermalMetrics
      curl -k -H "X-Auth-Token: $T" \
      https://<bmc_ip>/redfish/v1/Chassis/CNEdge/ThermalSubsystem/Fans

7.2.4.5. Subscribing to Redfish Events

The EventService delivers asynchronous notifications (for example, OpenBMC-registry messages) to a subscribed destination.

Supported SubscriptionType value: RedfishEvent

  1. List existing subscriptions:

    curl -k -u "$BMC_USER:$BMC_PASS" \
      https://<bmc_ip>/redfish/v1/EventService/Subscriptions
  2. Create a subscription:

    curl -k -u "$BMC_USER:$BMC_PASS" -H 'Content-Type: application/json' \
      -d '{
            "Destination":"https://listener.example.net:8443/events",
            "Protocol":"Redfish", 
            "EventFormatType":"Event",
            "RegistryPrefixes":["OpenBMC"]
          }' \
      https://<bmc_ip>/redfish/v1/EventService/Subscriptions
  3. Delete a subscription using the @odata.id returned from the POST response:

    curl -k -u "$BMC_USER:$BMC_PASS" -X DELETE \
      https://<bmc_ip>/redfish/v1/EventService/Subscriptions/<id>

7.2.4.6. Collecting Redfish Logs

Log services are exposed under both the Managers/bmc and Systems/system namespaces.

  • Valid Severity values: OK, Warning, Critical.

  • Valid EntryType values: Event, SEL, Oem, Multiple.

7.2.4.6.1. Procedure
  1. Enumerate log services:

    curl -k -u "$BMC_USER:$BMC_PASS" \
      https://<bmc_ip>/redfish/v1/Managers/bmc/LogServices
    curl -k -u "$BMC_USER:$BMC_PASS" \
      https://<bmc_ip>/redfish/v1/Systems/system/LogServices
  2. Paginate entries from the EventLog:

    curl -k -u "$BMC_USER:$BMC_PASS" \
    'https://<bmc_ip>/redfish/v1/Systems/system/LogServices/EventLog/Entries?$top=20'

Note

The following are expected empty-log conditions:

  • HostLogger may legitimately return zero entries when the host is powered off or is not streaming serial console data.

  • EventLog can be empty on a freshly booted BMC.

  • Journal should always contain entries (populated from kernel boot messages); an empty Journal indicates a problem. Refer to Troubleshooting Redfish Access, Session, and Update Failures.

7.2.4.7. Troubleshooting Redfish Access, Session, and Update Failures

Table 21. Troubleshooting Table

Symptom

Likely Cause

Action

curl to /redfish/v1 times out or is refused

BMC network not configured; Redfish service not running

Refer to CN5000 Fabric Installation Guide, CN5000 Switch and DCS Start-up Procedures: From serial console confirm management Ethernet is up and has an IP.

401 Unauthorized on every request

Wrong credentials; account disabled; role lacks Login

Verify account via Section 7.2.4.3. Confirm the RoleId is one of Administrator, Operator, ReadOnly.

403 Forbidden on firmware update

Account does not have Administrator role

Re-authenticate with an Administrator account (refer to Section 7.2.4.3 and Section 7.3.2.5).

Username creation rejected

Username exceeds 16 characters

Shorten the username (refer to Section 7.2.4.3 constraint).

EventLog returns no entries

Normal on a freshly booted BMC

No action required. Refer to Section 7.2.4.6 note.

Journal returns no entries

Abnormal — indicates a BMC problem

Collect serial console output and escalate.

Firmware update Task never completes

Update exceeded the 20-minute default timeout

Re-check package integrity and retry. If the issue persists, escalate with the Task resource JSON.

Event subscription POST succeeds but listener receives nothing

Listener URL unreachable from BMC; TLS trust failure

Verify BMC-to-listener HTTPS connectivity. Confirm the listener accepts the BMC's certificate chain.