From 4e2c3cb1169b6ef685341ed3d3eecb77e5f27688 Mon Sep 17 00:00:00 2001 From: John Leung Date: Tue, 15 Aug 2023 09:07:26 -0700 Subject: [PATCH 1/5] Add Networking folder --- Networking/UsageGuide-ESwitch.md | 953 +++++++++++++++++++++++++++++++ 1 file changed, 953 insertions(+) create mode 100644 Networking/UsageGuide-ESwitch.md diff --git a/Networking/UsageGuide-ESwitch.md b/Networking/UsageGuide-ESwitch.md new file mode 100644 index 0000000..eaf9ed0 --- /dev/null +++ b/Networking/UsageGuide-ESwitch.md @@ -0,0 +1,953 @@ + + +Usage Guide and Requirements for the + +Ethernet Switch Management + +API v1.0.0 + +November 2021 + +Table of Contents + +[1. License [3](#license)](#license) + +[2. Scope [4](#scope)](#scope) + +[3. Requirements [4](#requirements)](#requirements) + +[4. Capabilities [4](#capabilities)](#capabilities) + +[5. Use Cases [6](#use-cases)](#use-cases) + +[5.1. Get the list of functional Ethernet switches +[6](#get-the-list-of-functional-ethernet-switches)](#get-the-list-of-functional-ethernet-switches) + +[5.2. Get a functional Ethernet switch +[6](#get-a-functional-ethernet-switch)](#get-a-functional-ethernet-switch) + +[5.3. Get status of a functional Ethernet switch +[6](#get-status-of-a-functional-ethernet-switch)](#get-status-of-a-functional-ethernet-switch) + +[5.4. Get a physical Ethernet switch +[7](#get-a-physical-ethernet-switch)](#get-a-physical-ethernet-switch) + +[5.5. Get list of modules (network adapters) +[7](#get-list-of-modules-network-adapters)](#get-list-of-modules-network-adapters) + +[5.6. Get a module [8](#get-a-module)](#get-a-module) + +[5.7. Get list of ports [8](#get-list-of-ports)](#get-list-of-ports) + +[5.8. Get a port [9](#get-a-port)](#get-a-port) + +[5.9. Get list of Ethernet interfaces +[9](#get-list-of-ethernet-interfaces)](#get-list-of-ethernet-interfaces) + +[5.10. Get an Ethernet Interface +[10](#get-an-ethernet-interface)](#get-an-ethernet-interface) + +[5.11. Set IPv4 Address [10](#set-ipv4-address)](#set-ipv4-address) + +[5.12. Get switch log [11](#get-switch-log)](#get-switch-log) + +[5.13. Get Ethernet switch log entries +[11](#get-ethernet-switch-log-entries)](#get-ethernet-switch-log-entries) + +[5.14. Get Ethernet switch log entry +[12](#get-ethernet-switch-log-entry)](#get-ethernet-switch-log-entry) + +[5.15. Clear the system log +[12](#clear-the-system-log)](#clear-the-system-log) + +[6. References [12](#references)](#references) + +[7. Revision [12](#revision)](#revision) + +# License + +This work is licensed under a Creative Commons Attribution-ShareAlike +4.0 International License. + + + +NOTWITHSTANDING THE FOREGOING LICENSES, THIS SPECIFICATION IS PROVIDED +BY OCP "AS IS" AND OCP EXPRESSLY DISCLAIMS ANY WARRANTIES (EXPRESS, +IMPLIED, OR OTHERWISE), INCLUDING IMPLIED WARRANTIES OF MERCHANTABILITY, +NON-INFRINGEMENT, FITNESS FOR A PARTICULAR PURPOSE, OR TITLE, RELATED TO +THE SPECIFICATION. NOTICE IS HEREBY GIVEN, THAT OTHER RIGHTS NOT GRANTED +AS SET FORTH ABOVE, INCLUDING WITHOUT LIMITATION, RIGHTS OF THIRD +PARTIES WHO DID NOT EXECUTE THE ABOVE LICENSES, MAY BE IMPLICATED BY THE +IMPLEMENTATION OF OR COMPLIANCE WITH THIS SPECIFICATION. OCP IS NOT +RESPONSIBLE FOR IDENTIFYING RIGHTS FOR WHICH A LICENSE MAY BE REQUIRED +IN ORDER TO IMPLEMENT THIS SPECIFICATION. THE ENTIRE RISK AS TO +IMPLEMENTING OR OTHERWISE USING THE SPECIFICATION IS ASSUMED BY YOU. IN +NO EVENT WILL OCP BE LIABLE TO YOU FOR ANY MONETARY DAMAGES WITH RESPECT +TO ANY CLAIMS RELATED TO, OR ARISING OUT OF YOUR USE OF THIS +SPECIFICATION, INCLUDING BUT NOT LIMITED TO ANY LIABILITY FOR LOST +PROFITS OR ANY CONSEQUENTIAL, INCIDENTAL, INDIRECT, SPECIAL OR PUNITIVE +DAMAGES OF ANY CHARACTER FROM ANY CAUSES OF ACTION OF ANY KIND WITH +RESPECT TO THIS SPECIFICATION, WHETHER BASED ON BREACH OF CONTRACT, TORT +(INCLUDING NEGLIGENCE), OR OTHERWISE, AND EVEN IF OCP HAS BEEN ADVISED +OF THE POSSIBILITY OF SUCH DAMAGE. + +# Scope + +This document references requirements and provide the usage examples for +the OCP Server Hardware Management API v1.0.0. + +# Requirements + +As a Redfish-based interface, the required Redfish interface model +elements are specified in a profile document. For the Server Hardware +Management API v1.0.0, the profile is located at – + +[…](https://github.com/opencomputeproject/HWMgmt-OCP-Profiles/blob/master/OCPServerHardwareManagement.v1_0_0.json) + +The Redfish Interop Validator is an open-source conformance test which +reads the profile, executes the tests against an implementation and +generates a test report – in text or HTML format. + +\$\> python3 RedfishInteropValidator.py profileName --ip host:port + +The Redfish Interop Validator is located at +. + +The Switch Management v1.0.0 profile extends from the Baseline Hardware +Management v1.0.1 profile. This extension is specified directly in the +profile. This means that the switch profile specifies conformance to the +baseline profile in addition to any requirements specified in the switch +profile, directly. + +"RequiredProfiles": { + +"OCPBaselineHardwareManagement": { + +"MinVersion": "1.0.1" + +} + +}, + +# Capabilities + +The following use cases are enabled by conformance to this Server +Hardware Management profile. The Switch Management profile is extended +from the Baseline Hardware Management profile. + +The following table lists the capabilities provide the baseline profile +requirements. These capabilities are described in the "Usage Guide and +Requirements for the OCP Baseline Hardware Management Profile v1.0.1" +document. + + + +++++ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

Table 1 - Baseline Capabilities

Use CaseManagement TaskRequirement
Account Management
    +
  • Get accounts

  • +
Mandatory
Session Management
    +
  • Get sessions

  • +
Mandatory
Hardware inventory
    +
  • Get the FRU information

  • +
  • Get and Set the Asset Tag

  • +

Mandatory

+

Recommended

Hardware location
    +
  • Get the location LED

  • +
  • Set the location LED

  • +

Recommended

+

Recommended

Status
    +
  • Get status of chassis

  • +
Mandatory
Power
    +
  • Get power state

  • +
  • Get power usage

  • +
  • Get power limit

  • +

Mandatory

+

Recommended

+

Recommended

Temperature
    +
  • Get the temperature

  • +
  • Get temperature thresholds

  • +

If Impl, Mandatory

+

If Impl, Recom

Cooling
    +
  • Get fan speeds

  • +
  • Get fan redundancies

  • +

If Impl, Mandatory

+

If Impl, Recom

Log
    +
  • Get log entry

  • +
  • Clear the log

  • +

Mandatory

+

Recommended

Management Controller
    +
  • Get version of firmware for mgmt controller

  • +
  • Get status of mgmt controller

  • +
  • Get network information for mgmt controller

  • +
  • Reset the mgmt controller

  • +

Mandatory

+

Mandatory

+

Mandatory

+

Mandatory

+ +Table 1 - Baseline Capabilities + +The following table lists the +capabilities prescribed in the Ethernet switch profile. + +Redfish models the functional and physical aspects of the system level +entities. Computer systems and switches are system level entities. The +physical aspect in found under the Chassis resource. + +The Ethernet switch functions are modelled as part of the Ethernet +fabrics in the fabrics model. The fabrics model also includes resources +for Zones and Endpoints, in addition to Switches. These resources are +not shown in the diagram. The fabrics model is described in the Fabrics +Whitepaper. + + + ++++++ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

Table – Ethernet Switch-specific Capabilities

Use CaseManagement TaskRqmt
Functional Ethernet Switches
    +
  • Get list of switches

  • +
  • Get information on a switch

  • +
  • Get the status of a switch

  • +

Mandatory

+

Mandatory

+

Mandatory

Section 5.1

+

Section 5.2

+

Section 5.3

Physical Ethernet Switches
    +
  • Get information on a switch

  • +
MandatorySection 5.4
Modules
    +
  • Get list of modules

  • +
  • Get a module

  • +

Mandatory

+

Mandatory

Section 5.5

+

Section 5.6

Ports
    +
  • Get list of ports

  • +
  • Get a port

  • +

Mandatory

+

Mandatory

Section 5.7

+

Section 5.8

Ethernet
    +
  • Get list of Ethernet interfaces

  • +
  • Get an Ethernet interface

  • +
  • Set IPv4 address

  • +

Mandatory

+

Mandatory

+

Mandatory

Section 5.9

+

Section 5.10

+

Section 5.11

System Log
    +
  • Get system log

  • +
  • Get system log entries

  • +
  • Get a system log entry

  • +
  • Clear the log

  • +

Recommended

+

Recommended

+

Recommended

+

Recommended

Section 5.12

+

Section 5.13

+

Section 5.14

+

Section 5.15

+ +Table – Ethernet Switch-specific Capabilities + +# Use Cases + +This section describes how each capability is accomplished by +interacting with the Redfish Service. + +## Get the list of functional Ethernet switches + +The Ethernet switches is obtained from the Switches resource. + +GET /redfish/v1/Fabrics/{id=Ethernet}/Switches + +The response message contains the following fragment. + +{ + +"Name": "Ethernet Switch Collection", + +"Members@odata.count": 2, + +"Members": \[ + +{ "@odata.id": "/redfish/v1/Fabrics/Ethernet/Switches/Switch1" }, + +{ "@odata.id": "/redfish/v1/Fabrics/Ethernet/Switches/Switch2" }, + +\] + +} + +## Get a functional Ethernet switch + +An Ethernet switch is obtained from the System resource. + +GET /redfish/v1/Fabrics/{id=Ethernet}/Switches/(id} + +The response message contains the following fragment. + +{ + +"@odata.id": "/redfish/v1/Fabrics/Ethernet/Switches/Switch1" + +"Id": "Switch1", + +"Name": "Ethernet Switch", + +"SwitchType": "Ethernet", + +"Manufacturer": "Contoso", + +"Model": "8320", + +"SKU": "67B", + +"SerialNumber": "2M220100SL", + +"PartNumber": "76-88883", + +"Ports": { + +"@odata.id": "/redfish/v1/Fabrics/Ethernet/Switches/Switch1/Ports" + +} + +} + +## Get status of a functional Ethernet switch + +The status and health an Ethernet switch is obtained by retrieving the +Switch resource. + +GET /redfish/v1/Fabrics/{id=Ethernet}/Switches/{id} + +The response message contains the following fragment. + +{ + +"@odata.id": "/redfish/v1/Fabrics/Ethernet/Switches/1", + +"Status": { + +"State": "Enabled", + +"Health": "OK" + +} + +} + +## Get a physical Ethernet switch + +An Ethernet switch is obtained from the System resource. + +GET /redfish/v1/Chassis/{id} + +The response message contains the following fragment. + +{ + +"@odata.id": "/redfish/v1/Chassis/ Ethernet-Switch1", + +"Id": "Ethernet-Switch1", + +"Name": "Switch Chassis1", + +"ChassisType": "RackMount", + +"AssetTag": "Chicago-45Z-2381", + +"Manufacturer": "Contoso", + +"Model": "CX8325", + +"SKU": "86753004", + +"SerialNumber": "437XR1138R2", + +"PartNumber": "224071-J23", + +"PowerState": "On", + +"IndicatorLED": "Lit", + +"HeightMm": 44.45, + +"WidthMm": 431.8, + +"DepthMm": 711, + +"WeightKg": 15.31, + +"Location": { + +"PostalAddress": { . . . }, + +"Placement": { . . . } + +}, + +"FabricAdapters": { + +{ "@odata.id": "/redfish/v1/Chassis/Ethernet-Switch1/FabricAdapters" } + +} + +"Status": { + +"State": "Enabled", + +"Health": "OK" + +}, + +"Links": { + +"Switches": \[ + +{ "@odata.id": "/redfish/v1/Fabrics/Ethernet/Switches/Switch1" } + +\], + +} + +} + +## Get list of modules (network adapters) + +The Ethernet switch modules are obtained from the NetworkAdapters +resource. + +GET /redfish/v1/Chassis/{id}/NetworkAdapters + +The response message contains the following fragment. + +{ + +"Name": "Fabric Adapter Collection", + +"Members@odata.count": 2, + +"Members": \[ + +{ "@odata.id": +"/redfish/v1/Chassis/Ethernet-Switch1/NetworkAdapters/NA-1" }, + +{ "@odata.id": +"/redfish/v1/Chassis/Ethernet-Switch1/NetworkAdapters/NA-2" } + +\] + +} + +## Get a module + +An Ethernet switch module is obtained from the NetworkAdapter resource. + +GET /redfish/v1/Chassis/{id}/NetworkAdapters/{id} + +The response message contains the following fragment. + +{ + +"@odata.id": +"/redfish/v1/Chassis/EthernetFabric-Switch1/NetworkAdapters/NA-1" + +"Id": "NA-1", + +"Name": "Network Adapter View", + +"Manufacturer": "Globex", + +"Model": "599TPS-T", + +"SKU": "Globex TPS-Net 2-Port Base-T", + +"SerialNumber": "003BFLRT00023234", + +"PartNumber": "975421-B20", + +"Ports": { + +{ "@odata.id": "/redfish/v1/Fabrics/Ethernet/Switches/Switch1/Ports/1"}, + +{ "@odata.id": "/redfish/v1/Fabrics/Ethernet/Switches/Switch2/Ports/2" } + +}, + +"NetworkDeviceFunctions": { + +"@odata.id": +"/redfish/v1/Chassis/EthernetFabric-Switch1/NetworkAdapters/NA-1/NetworkDeviceFunctions" + +}, + +"Actions": { + +"#NetworkAdapter.ResetSettingsToDefault": { + +"target": +"/redfish/v1/Chassis/EthernetFabric-Switch1/NetworkAdapters/NA-1/Actions/NetworkAdapter.ResetSettingsToDefault" + +} + +} + +} + +## Get list of ports + +The Ethernet switch ports is obtained from the Ports resource. + +GET /redfish/v1/Fabrics/{id=Ethernet}/Switches/{id}/Ports + +The response message contains the following fragment. + +{ + +"@odata.id": "/redfish/v1/Fabrics/Ethernet/Switches/Switch1/Ports" + +"Name": "Port Collection", + +"Members@odata.count": 2, + +"Members": \[ + +{ "@odata.id": "/redfish/v1/Fabrics/Ethernet/Switches/Switch1/Ports/1" +}, + +{ "@odata.id": "/redfish/v1/Fabrics/Ethernet/Switches/Switch2/Ports/2" +}, + +\] + +} + +## Get a port + +An Ethernet switch port is obtained from the Ports resource. + +GET /redfish/v1/Fabrics/{id=Ethernet}/Switches/(id}/Ports/{id} + +The response message contains the following fragment. + +{ + +"@odata.id": "/redfish/v1/Fabrics/Ethernet/Switches/Switch1/Ports/1" + +"Id": "1", + +"Name": "Ethernet Port 1", + +"Description": "Ethernet Port 1", + +"Status": { + +"State": "Enabled", + +"Health": "OK" + +}, + +"PortId": "1", + +"PortProtocol": "Ethernet", + +"PortType": "BidirectionalPort", + +"Width": 4, + +"CurrentSpeedGbps": 25, + +"MaxSpeedGbps": 25 + +} + +## Get list of Ethernet interfaces + +The list of Ethernet interfaces is obtained by retrieving the +EthernetInterfaces resource on the System of interest. + +GET +/redfish/v1/Chassis/{id}/NetworkAdapters/{id}/NetworkDeviceFunctions/{id}/EthernetInterfaces + +The response message contains the following fragment. + +{ + +"@odata.id": +"/redfish/v1/Chassis/EthernetSwitch1/NetworkAdapters/NA_1/NetworkDeviceFunctions/NDF_1/EthernetInterfaces", + +"Name": "Ethernet Interfaces", + +"Description": "Ethernet Interfaces Collection", + +"Members@odata.count": 2, + +"Members": \[ + +{ + +"@odata.id": +"/redfish/v1/Chassis/EthernetSwitch1/NetworkAdapters/NA_1/NetworkDeviceFunctions/NDF_1/EthernetInterfaces/1" + +}, + +{ + +"@odata.id": +"/redfish/v1/Chassis/EthernetSwitch1/NetworkAdapters/NA_1/NetworkDeviceFunctions/NDF_1/EthernetInterfaces/2" + +} + +\], + +## Get an Ethernet Interface + +The Ethernet interface is obtained by retrieving the EthernetInterface +resource on the System of interest. + +GET +/redfish/v1/Chassis/{id}/NetworkAdapters/{id}/NetworkDeviceFunctions/{id}/EthernetInterfaces/{id} + +The response message contains the following fragment. The fragment only +contains the properties specified in the Server profile. Since the +EthernetInterface resource may get new properties during in Redfish +schema update release, a snapshot is provided in the appendix. + +{ + +"@odata.id": +"/redfish/v1/Chassis/EthernetSwitch1/NetworkAdapters/NA_1/NetworkDeviceFunctions/NDF_1/EthernetInterfaces/1", + +"Status": { + +"State": "Enabled", + +"Health": "OK" + +}, + +"InterfaceEnabled": true, + +"MACAddress": "1E:C3:DE:6F:1E:24", + +"LinkStatus": "Linkup", + +"SpeedMbps": 100, + +"HostName": "MyHostName", + +"FQDN": "MyHostName.MyDomainName.com", + +"NameServers": \[ … \], + +"IPv4Addresses": \[ + +{ + +"Address": "192.168.0.10", + +"SubnetMask": "255.255.252.0", + +"AddressOrigin": "Static", + +"Gateway": "192.168.0.1" + +} + +\], + +"VLAN": { + +"VLANId": 10, + +"Tagged": true + +} + +} + +## Set IPv4 Address + +The IPv4 address is set by modifying the Settings resource which is +subordinate to the EthernetInterface resource. In the fragment below, +the @Redfish.Settings property indicates the location of the settings +resource as being subordinate. A HTTP POST to the path will apply the +values of the settings resource. + +{ + +"@odata.id": +"/redfish/v1/Chassis/EthernetSwitch1/NetworkAdapters/NA_1/NetworkDeviceFunctions/NDF_1/EthernetInterfaces/1", + +"@Redfish.Settings": { + +"SettingsObject": { + +"@odata.id": +"/redfish/v1/Chassis/EthernetSwitch1/NetworkAdapters/NA_1/NetworkDeviceFunctions/NDF_1/EthernetInterfaces/1/SD" + +} + +} + +} + +The Settings resource, itself, represents the future intended state of a +resource. The Settings resource contains a subset of properties of the +EthernetInterface resource. The Settings resource may contain a +@Redfish.SettingsApplyTime to indicate when the settings shall be +applied. + +{ + +"@Redfish.SettingsApplyTime": ".." + +"IPv4Addresses": \[ + +{ + +"Address": "192.170.0.15", + +"SubnetMask": "255.255.252.0", + +"AddressOrigin": "Static", + +"Gateway": "192.170.0.1" + +} + +\] + +} + +Once the properties within the settings resource have the desired +values, a POST to the settings resource applies the settings. + +POST +/redfish/v1/Chassis/EthernetSwitch1/NetworkAdapters/NA_1/NetworkDeviceFunctions/NDF_1/EthernetInterfaces/1/SD + +## Get switch log + +The switch's log is obtained retrieving the Log resource which represent +the system log. + +GET /redfish/v1/Fabrics/{id=Ethernet}/Switches/{id}/LogServices/Log + +The response message contains the following fragment. The Entries +resource contains the entries of the log. + +{ + +"@odata.id": +"/redfish/v1/Fabrics/Ethernet/Switches/Switch1/LogServices/Log", + +"Name": "System Log", + +. . . + +"Entries": { + +"@odata.id": "/redfish/v1/ +Fabrics/Ethernet/Switches/Switch1/LogServices/Log/Entries" + +} + +} + +## Get Ethernet switch log entries + +The entries of a system log are obtained by retrieving each entry of the +log. + +GET /redfish/v1/ +Fabrics/{id=Ethernet}/Switches/{id}/LogServices/Log/Entries + +The following fragment is + +{ + +"@odata.id": +"/redfish/v1/Fabrics/Ethernet/Switches/Switch1/LogServices/{id}/Entries", + +"Members@odata.count": 2, + +\] + +} + +## Get Ethernet switch log entry + +A system log entry is obtained by retrieving a specific entry of the +log. + +GET /redfish/v1/ +Fabrics/\[id=Ethernet}/Switches/{id}/LogServices/{id}/Entries/{id} + +The following fragment is + +{ + +"@odata.id": "/redfish/v1/ +Fabrics/Ethernet/Switches/Switch1/LogServices/Log1/Entries/1", + +"EntryType": "SEL", + +"Severity": "Critical", + +"Created": "2012-03-07T14:44:00Z", + +"EntryCode": "Upper Critical - going high", + +"SensorType": "Temperature", + +"SensorNumber": 1, + +"Message": "Temperature threshold exceeded", + +"MessageId": "0x592A28", + +"Links": { + +"OriginOfCondition": { "@odata.id": "/redfish/v1/Chassis/1/Thermal" } + +} + +} + +## Clear the system log + +The system log is cleared by POST'ing to the ClearLog action for + +POST +/redfish/v1/Fabrics/Ethernet/Switches/Switch1/LogService/Log/Actions/LogService.ClearLog + +# References + +\[1\] Usage Guide and Requirements for the OCP Baseline Hardware +Management Profile v1.0.1 + +\[2\] “Redfish API Specification” + +[*https://www.dmtf.org/dsp/DSP0266*](https://www.dmtf.org/dsp/DSP0266) + +# Revision + +| Revision | Date | Description | +|----------|---------------|---------------| +| V0.1 | June 13, 2023 | Initial draft | From 97ffa05af3db6b6a07bb8cf64f493c2c2aff5c63 Mon Sep 17 00:00:00 2001 From: John Leung Date: Tue, 15 Aug 2023 14:00:05 -0700 Subject: [PATCH 2/5] fix json text --- Networking/UsageGuide-ESwitch.md | 755 +++++++++++-------------------- 1 file changed, 257 insertions(+), 498 deletions(-) diff --git a/Networking/UsageGuide-ESwitch.md b/Networking/UsageGuide-ESwitch.md index eaf9ed0..d239c03 100644 --- a/Networking/UsageGuide-ESwitch.md +++ b/Networking/UsageGuide-ESwitch.md @@ -1,135 +1,37 @@ - - -Usage Guide and Requirements for the - -Ethernet Switch Management - -API v1.0.0 - -November 2021 - -Table of Contents - -[1. License [3](#license)](#license) - -[2. Scope [4](#scope)](#scope) - -[3. Requirements [4](#requirements)](#requirements) - -[4. Capabilities [4](#capabilities)](#capabilities) - -[5. Use Cases [6](#use-cases)](#use-cases) - -[5.1. Get the list of functional Ethernet switches -[6](#get-the-list-of-functional-ethernet-switches)](#get-the-list-of-functional-ethernet-switches) - -[5.2. Get a functional Ethernet switch -[6](#get-a-functional-ethernet-switch)](#get-a-functional-ethernet-switch) - -[5.3. Get status of a functional Ethernet switch -[6](#get-status-of-a-functional-ethernet-switch)](#get-status-of-a-functional-ethernet-switch) - -[5.4. Get a physical Ethernet switch -[7](#get-a-physical-ethernet-switch)](#get-a-physical-ethernet-switch) - -[5.5. Get list of modules (network adapters) -[7](#get-list-of-modules-network-adapters)](#get-list-of-modules-network-adapters) - -[5.6. Get a module [8](#get-a-module)](#get-a-module) - -[5.7. Get list of ports [8](#get-list-of-ports)](#get-list-of-ports) - -[5.8. Get a port [9](#get-a-port)](#get-a-port) - -[5.9. Get list of Ethernet interfaces -[9](#get-list-of-ethernet-interfaces)](#get-list-of-ethernet-interfaces) - -[5.10. Get an Ethernet Interface -[10](#get-an-ethernet-interface)](#get-an-ethernet-interface) - -[5.11. Set IPv4 Address [10](#set-ipv4-address)](#set-ipv4-address) - -[5.12. Get switch log [11](#get-switch-log)](#get-switch-log) - -[5.13. Get Ethernet switch log entries -[11](#get-ethernet-switch-log-entries)](#get-ethernet-switch-log-entries) - -[5.14. Get Ethernet switch log entry -[12](#get-ethernet-switch-log-entry)](#get-ethernet-switch-log-entry) - -[5.15. Clear the system log -[12](#clear-the-system-log)](#clear-the-system-log) - -[6. References [12](#references)](#references) - -[7. Revision [12](#revision)](#revision) - -# License - -This work is licensed under a Creative Commons Attribution-ShareAlike -4.0 International License. - - - -NOTWITHSTANDING THE FOREGOING LICENSES, THIS SPECIFICATION IS PROVIDED -BY OCP "AS IS" AND OCP EXPRESSLY DISCLAIMS ANY WARRANTIES (EXPRESS, -IMPLIED, OR OTHERWISE), INCLUDING IMPLIED WARRANTIES OF MERCHANTABILITY, -NON-INFRINGEMENT, FITNESS FOR A PARTICULAR PURPOSE, OR TITLE, RELATED TO -THE SPECIFICATION. NOTICE IS HEREBY GIVEN, THAT OTHER RIGHTS NOT GRANTED -AS SET FORTH ABOVE, INCLUDING WITHOUT LIMITATION, RIGHTS OF THIRD -PARTIES WHO DID NOT EXECUTE THE ABOVE LICENSES, MAY BE IMPLICATED BY THE -IMPLEMENTATION OF OR COMPLIANCE WITH THIS SPECIFICATION. OCP IS NOT -RESPONSIBLE FOR IDENTIFYING RIGHTS FOR WHICH A LICENSE MAY BE REQUIRED -IN ORDER TO IMPLEMENT THIS SPECIFICATION. THE ENTIRE RISK AS TO -IMPLEMENTING OR OTHERWISE USING THE SPECIFICATION IS ASSUMED BY YOU. IN -NO EVENT WILL OCP BE LIABLE TO YOU FOR ANY MONETARY DAMAGES WITH RESPECT -TO ANY CLAIMS RELATED TO, OR ARISING OUT OF YOUR USE OF THIS -SPECIFICATION, INCLUDING BUT NOT LIMITED TO ANY LIABILITY FOR LOST -PROFITS OR ANY CONSEQUENTIAL, INCIDENTAL, INDIRECT, SPECIAL OR PUNITIVE -DAMAGES OF ANY CHARACTER FROM ANY CAUSES OF ACTION OF ANY KIND WITH -RESPECT TO THIS SPECIFICATION, WHETHER BASED ON BREACH OF CONTRACT, TORT -(INCLUDING NEGLIGENCE), OR OTHERWISE, AND EVEN IF OCP HAS BEEN ADVISED -OF THE POSSIBILITY OF SUCH DAMAGE. - # Scope -This document references requirements and provide the usage examples for -the OCP Server Hardware Management API v1.0.0. +This document references requirements and provide the usages for managing an OCP Ethernet Switch. # Requirements As a Redfish-based interface, the required Redfish interface model -elements are specified in a profile document. For the Server Hardware -Management API v1.0.0, the profile is located at – +elements are specified in a profile document. For the Ethernet Switch Hardware Management API v1.0.0, the profile is located at – -[…](https://github.com/opencomputeproject/HWMgmt-OCP-Profiles/blob/master/OCPServerHardwareManagement.v1_0_0.json) +``` +https://github.com/opencomputeproject/HWMgmt-OCP-Profiles/blob/master/OCPESwitchHardwareManagement.v1_0_0.json +``` The Redfish Interop Validator is an open-source conformance test which reads the profile, executes the tests against an implementation and generates a test report – in text or HTML format. -\$\> python3 RedfishInteropValidator.py profileName --ip host:port +``` +$> python3 RedfishInteropValidator.py profileName --ip host:port +``` The Redfish Interop Validator is located at . The Switch Management v1.0.0 profile extends from the Baseline Hardware -Management v1.0.1 profile. This extension is specified directly in the -profile. This means that the switch profile specifies conformance to the -baseline profile in addition to any requirements specified in the switch -profile, directly. +Management v1.0.1 profile. Conformance to the switch profile requires conformance to the Baseline profile. This extension is specified in the switch profile: +``` "RequiredProfiles": { - -"OCPBaselineHardwareManagement": { - -"MinVersion": "1.0.1" - + "OCPBaselineHardwareManagement": { + "MinVersion": "1.0.1" + } } - -}, +``` # Capabilities @@ -372,415 +274,297 @@ interacting with the Redfish Service. The Ethernet switches is obtained from the Switches resource. +``` GET /redfish/v1/Fabrics/{id=Ethernet}/Switches - +``` The response message contains the following fragment. +``` { - -"Name": "Ethernet Switch Collection", - -"Members@odata.count": 2, - -"Members": \[ - -{ "@odata.id": "/redfish/v1/Fabrics/Ethernet/Switches/Switch1" }, - -{ "@odata.id": "/redfish/v1/Fabrics/Ethernet/Switches/Switch2" }, - -\] - + "Name": "Ethernet Switch Collection", + "Members@odata.count": 2, + "Members": [ + { "@odata.id": "/redfish/v1/Fabrics/Ethernet/Switches/Switch1" }, + { "@odata.id": "/redfish/v1/Fabrics/Ethernet/Switches/Switch2" } + ] } +``` ## Get a functional Ethernet switch An Ethernet switch is obtained from the System resource. +``` GET /redfish/v1/Fabrics/{id=Ethernet}/Switches/(id} - +``` The response message contains the following fragment. -{ - -"@odata.id": "/redfish/v1/Fabrics/Ethernet/Switches/Switch1" - -"Id": "Switch1", - -"Name": "Ethernet Switch", - -"SwitchType": "Ethernet", - -"Manufacturer": "Contoso", - -"Model": "8320", - -"SKU": "67B", - -"SerialNumber": "2M220100SL", - -"PartNumber": "76-88883", - -"Ports": { - -"@odata.id": "/redfish/v1/Fabrics/Ethernet/Switches/Switch1/Ports" - -} +``` +{ + "@odata.id": "/redfish/v1/Fabrics/Ethernet/Switches/Switch1" + "Id": "Switch1", + "Name": "Ethernet Switch", + "SwitchType": "Ethernet", + "Manufacturer": "Contoso", + "Model": "8320", + "SKU": "67B", + "SerialNumber": "2M220100SL", + "PartNumber": "76-88883", + "Ports": { + "@odata.id": "/redfish/v1/Fabrics/Ethernet/Switches/Switch1/Ports" + } } +``` ## Get status of a functional Ethernet switch The status and health an Ethernet switch is obtained by retrieving the Switch resource. +``` GET /redfish/v1/Fabrics/{id=Ethernet}/Switches/{id} +``` The response message contains the following fragment. +``` { - -"@odata.id": "/redfish/v1/Fabrics/Ethernet/Switches/1", - -"Status": { - -"State": "Enabled", - -"Health": "OK" - -} - + "@odata.id": "/redfish/v1/Fabrics/Ethernet/Switches/1", + "Status": { + "State": "Enabled", + "Health": "OK" + } } +``` ## Get a physical Ethernet switch An Ethernet switch is obtained from the System resource. +``` GET /redfish/v1/Chassis/{id} - +``` The response message contains the following fragment. +``` { - -"@odata.id": "/redfish/v1/Chassis/ Ethernet-Switch1", - -"Id": "Ethernet-Switch1", - -"Name": "Switch Chassis1", - -"ChassisType": "RackMount", - -"AssetTag": "Chicago-45Z-2381", - -"Manufacturer": "Contoso", - -"Model": "CX8325", - -"SKU": "86753004", - -"SerialNumber": "437XR1138R2", - -"PartNumber": "224071-J23", - -"PowerState": "On", - -"IndicatorLED": "Lit", - -"HeightMm": 44.45, - -"WidthMm": 431.8, - -"DepthMm": 711, - -"WeightKg": 15.31, - -"Location": { - -"PostalAddress": { . . . }, - -"Placement": { . . . } - -}, - -"FabricAdapters": { - -{ "@odata.id": "/redfish/v1/Chassis/Ethernet-Switch1/FabricAdapters" } - -} - -"Status": { - -"State": "Enabled", - -"Health": "OK" - -}, - -"Links": { - -"Switches": \[ - -{ "@odata.id": "/redfish/v1/Fabrics/Ethernet/Switches/Switch1" } - -\], - -} - + "@odata.id": "/redfish/v1/Chassis/Ethernet-Switch1", + "Id": "Ethernet-Switch1", + "Name": "Switch Chassis1", + "ChassisType": "RackMount", + "AssetTag": "Chicago-45Z-2381", + "Manufacturer": "Contoso", + "Model": "CX8325", + "SKU": "86753004", + "SerialNumber": "437XR1138R2", + "PartNumber": "224071-J23", + "PowerState": "On", + "IndicatorLED": "Lit", + "HeightMm": 44.45, + "WidthMm": 431.8, + "DepthMm": 711, + "WeightKg": 15.31, + "Location": { + "PostalAddress": { . . . }, + "Placement": { . . . } + }, + "FabricAdapters": { + { "@odata.id": "/redfish/v1/Chassis/Ethernet-Switch1/FabricAdapters" } + } + "Status": { + "State": "Enabled", + "Health": "OK" + }, + "Links": { + "Switches": [ + { "@odata.id": "/redfish/v1/Fabrics/Ethernet/Switches/Switch1" } + ], + } } +``` ## Get list of modules (network adapters) The Ethernet switch modules are obtained from the NetworkAdapters resource. +``` GET /redfish/v1/Chassis/{id}/NetworkAdapters +``` The response message contains the following fragment. +``` { - -"Name": "Fabric Adapter Collection", - -"Members@odata.count": 2, - -"Members": \[ - -{ "@odata.id": -"/redfish/v1/Chassis/Ethernet-Switch1/NetworkAdapters/NA-1" }, - -{ "@odata.id": -"/redfish/v1/Chassis/Ethernet-Switch1/NetworkAdapters/NA-2" } - -\] - + "Name": "Fabric Adapter Collection", + "Members@odata.count": 2, + "Members": [ + { "@odata.id": "/redfish/v1/Chassis/Ethernet-Switch1/NetworkAdapters/NA-1" }, + { "@odata.id": "/redfish/v1/Chassis/Ethernet-Switch1/NetworkAdapters/NA-2" } + ] } +``` ## Get a module An Ethernet switch module is obtained from the NetworkAdapter resource. + +``` GET /redfish/v1/Chassis/{id}/NetworkAdapters/{id} +``` The response message contains the following fragment. +``` { - -"@odata.id": -"/redfish/v1/Chassis/EthernetFabric-Switch1/NetworkAdapters/NA-1" - -"Id": "NA-1", - -"Name": "Network Adapter View", - -"Manufacturer": "Globex", - -"Model": "599TPS-T", - -"SKU": "Globex TPS-Net 2-Port Base-T", - -"SerialNumber": "003BFLRT00023234", - -"PartNumber": "975421-B20", - -"Ports": { - -{ "@odata.id": "/redfish/v1/Fabrics/Ethernet/Switches/Switch1/Ports/1"}, - -{ "@odata.id": "/redfish/v1/Fabrics/Ethernet/Switches/Switch2/Ports/2" } - -}, - -"NetworkDeviceFunctions": { - -"@odata.id": -"/redfish/v1/Chassis/EthernetFabric-Switch1/NetworkAdapters/NA-1/NetworkDeviceFunctions" - -}, - -"Actions": { - -"#NetworkAdapter.ResetSettingsToDefault": { - -"target": -"/redfish/v1/Chassis/EthernetFabric-Switch1/NetworkAdapters/NA-1/Actions/NetworkAdapter.ResetSettingsToDefault" - -} - -} - + "@odata.id": "/redfish/v1/Chassis/EthernetFabric-Switch1/NetworkAdapters/NA-1" + "Id": "NA-1", + "Name": "Network Adapter View", + "Manufacturer": "Globex", + "Model": "599TPS-T", + "SKU": "Globex TPS-Net 2-Port Base-T", + "SerialNumber": "003BFLRT00023234", + "PartNumber": "975421-B20", + "Ports": { + { "@odata.id": "/redfish/v1/Fabrics/Ethernet/Switches/Switch1/Ports/1"}, + { "@odata.id": "/redfish/v1/Fabrics/Ethernet/Switches/Switch2/Ports/2" } + }, + "NetworkDeviceFunctions": { + "@odata.id": "/redfish/v1/Chassis/EthernetFabric-Switch1/NetworkAdapters/NA-1/NetworkDeviceFunctions" + }, + "Actions": { + "#NetworkAdapter.ResetSettingsToDefault": { + "target": "/redfish/v1/Chassis/EthernetFabric-Switch1/NetworkAdapters/NA-1/Actions/NetworkAdapter.ResetSettingsToDefault" + } + } } +``` ## Get list of ports The Ethernet switch ports is obtained from the Ports resource. +``` GET /redfish/v1/Fabrics/{id=Ethernet}/Switches/{id}/Ports +``` The response message contains the following fragment. +``` { - -"@odata.id": "/redfish/v1/Fabrics/Ethernet/Switches/Switch1/Ports" - -"Name": "Port Collection", - -"Members@odata.count": 2, - -"Members": \[ - -{ "@odata.id": "/redfish/v1/Fabrics/Ethernet/Switches/Switch1/Ports/1" -}, - -{ "@odata.id": "/redfish/v1/Fabrics/Ethernet/Switches/Switch2/Ports/2" -}, - -\] - + "@odata.id": "/redfish/v1/Fabrics/Ethernet/Switches/Switch1/Ports" + "Name": "Port Collection", + "Members@odata.count": 2, + "Members": [ + { "@odata.id": "/redfish/v1/Fabrics/Ethernet/Switches/Switch1/Ports/1" }, + { "@odata.id": "/redfish/v1/Fabrics/Ethernet/Switches/Switch2/Ports/2"} + ] } +``` ## Get a port An Ethernet switch port is obtained from the Ports resource. + +``` GET /redfish/v1/Fabrics/{id=Ethernet}/Switches/(id}/Ports/{id} +``` The response message contains the following fragment. -{ - -"@odata.id": "/redfish/v1/Fabrics/Ethernet/Switches/Switch1/Ports/1" - -"Id": "1", - -"Name": "Ethernet Port 1", - -"Description": "Ethernet Port 1", - -"Status": { - -"State": "Enabled", - -"Health": "OK" - -}, - -"PortId": "1", - -"PortProtocol": "Ethernet", - -"PortType": "BidirectionalPort", - -"Width": 4, - -"CurrentSpeedGbps": 25, - -"MaxSpeedGbps": 25 +``` +{ + "@odata.id": "/redfish/v1/Fabrics/Ethernet/Switches/Switch1/Ports/1" + "Id": "1", + "Name": "Ethernet Port 1", + "Description": "Ethernet Port 1", + "Status": { + "State": "Enabled", + "Health": "OK" + }, + "PortId": "1", + "PortProtocol": "Ethernet", + "PortType": "BidirectionalPort", + "Width": 4, + "CurrentSpeedGbps": 25, + "MaxSpeedGbps": 25 } +``` ## Get list of Ethernet interfaces The list of Ethernet interfaces is obtained by retrieving the EthernetInterfaces resource on the System of interest. + +``` GET /redfish/v1/Chassis/{id}/NetworkAdapters/{id}/NetworkDeviceFunctions/{id}/EthernetInterfaces +``` The response message contains the following fragment. +``` { - -"@odata.id": -"/redfish/v1/Chassis/EthernetSwitch1/NetworkAdapters/NA_1/NetworkDeviceFunctions/NDF_1/EthernetInterfaces", - -"Name": "Ethernet Interfaces", - -"Description": "Ethernet Interfaces Collection", - -"Members@odata.count": 2, - -"Members": \[ - -{ - -"@odata.id": -"/redfish/v1/Chassis/EthernetSwitch1/NetworkAdapters/NA_1/NetworkDeviceFunctions/NDF_1/EthernetInterfaces/1" - -}, - -{ - -"@odata.id": -"/redfish/v1/Chassis/EthernetSwitch1/NetworkAdapters/NA_1/NetworkDeviceFunctions/NDF_1/EthernetInterfaces/2" - + "@odata.id": "/redfish/v1/Chassis/EthernetSwitch1/NetworkAdapters/NA_1/NetworkDeviceFunctions/NDF_1/EthernetInterfaces", + "Name": "Ethernet Interfaces", + "Description": "Ethernet Interfaces Collection", + "Members@odata.count": 2, + "Members": [ + { "@odata.id": "/redfish/v1/Chassis/EthernetSwitch1/NetworkAdapters/NA_1/NetworkDeviceFunctions/NDF_1/EthernetInterfaces/1" }, + { "@odata.id": "/redfish/v1/Chassis/EthernetSwitch1/NetworkAdapters/NA_1/NetworkDeviceFunctions/NDF_1/EthernetInterfaces/2" } + ] } - -\], +``` ## Get an Ethernet Interface The Ethernet interface is obtained by retrieving the EthernetInterface resource on the System of interest. + +``` GET /redfish/v1/Chassis/{id}/NetworkAdapters/{id}/NetworkDeviceFunctions/{id}/EthernetInterfaces/{id} +``` The response message contains the following fragment. The fragment only contains the properties specified in the Server profile. Since the -EthernetInterface resource may get new properties during in Redfish -schema update release, a snapshot is provided in the appendix. - -{ - -"@odata.id": -"/redfish/v1/Chassis/EthernetSwitch1/NetworkAdapters/NA_1/NetworkDeviceFunctions/NDF_1/EthernetInterfaces/1", - -"Status": { - -"State": "Enabled", - -"Health": "OK" - -}, - -"InterfaceEnabled": true, - -"MACAddress": "1E:C3:DE:6F:1E:24", +EthernetInterface resource may get new properties during in Redfish schema update release, a snapshot is provided in the appendix. -"LinkStatus": "Linkup", - -"SpeedMbps": 100, - -"HostName": "MyHostName", - -"FQDN": "MyHostName.MyDomainName.com", - -"NameServers": \[ … \], - -"IPv4Addresses": \[ +``` { - -"Address": "192.168.0.10", - -"SubnetMask": "255.255.252.0", - -"AddressOrigin": "Static", - -"Gateway": "192.168.0.1" - -} - -\], - -"VLAN": { - -"VLANId": 10, - -"Tagged": true - -} - + "@odata.id": "/redfish/v1/Chassis/EthernetSwitch1/NetworkAdapters/NA_1/NetworkDeviceFunctions/NDF_1/EthernetInterfaces/1", + "Status": { + "State": "Enabled", + "Health": "OK" + }, + "InterfaceEnabled": true, + "MACAddress": "1E:C3:DE:6F:1E:24", + "LinkStatus": "Linkup", + "SpeedMbps": 100, + "HostName": "MyHostName", + "FQDN": "MyHostName.MyDomainName.com", + "NameServers": [ … ], + "IPv4Addresses": [ + { + "Address": "192.168.0.10", + "SubnetMask": "255.255.252.0", + "AddressOrigin": "Static", + "Gateway": "192.168.0.1" + } + ], + "VLAN": { + "VLANId": 10, + "Tagged": true + } } +``` ## Set IPv4 Address @@ -790,23 +574,17 @@ the @Redfish.Settings property indicates the location of the settings resource as being subordinate. A HTTP POST to the path will apply the values of the settings resource. -{ - -"@odata.id": -"/redfish/v1/Chassis/EthernetSwitch1/NetworkAdapters/NA_1/NetworkDeviceFunctions/NDF_1/EthernetInterfaces/1", - -"@Redfish.Settings": { - -"SettingsObject": { - -"@odata.id": -"/redfish/v1/Chassis/EthernetSwitch1/NetworkAdapters/NA_1/NetworkDeviceFunctions/NDF_1/EthernetInterfaces/1/SD" - -} - -} +``` +{ + "@odata.id": "/redfish/v1/Chassis/EthernetSwitch1/NetworkAdapters/NA_1/NetworkDeviceFunctions/NDF_1/EthernetInterfaces/1", + "@Redfish.Settings": { + "SettingsObject": { + "@odata.id":"/redfish/v1/Chassis/EthernetSwitch1/NetworkAdapters/NA_1/NetworkDeviceFunctions/NDF_1/EthernetInterfaces/1/SD" + } + } } +``` The Settings resource, itself, represents the future intended state of a resource. The Settings resource contains a subset of properties of the @@ -814,137 +592,118 @@ EthernetInterface resource. The Settings resource may contain a @Redfish.SettingsApplyTime to indicate when the settings shall be applied. +``` { - -"@Redfish.SettingsApplyTime": ".." - -"IPv4Addresses": \[ - -{ - -"Address": "192.170.0.15", - -"SubnetMask": "255.255.252.0", - -"AddressOrigin": "Static", - -"Gateway": "192.170.0.1" - -} - -\] - + "@Redfish.SettingsApplyTime": ".." + "IPv4Addresses": [ + { + "Address": "192.170.0.15", + "SubnetMask": "255.255.252.0", + "AddressOrigin": "Static", + "Gateway": "192.170.0.1" + } + ] } +``` Once the properties within the settings resource have the desired values, a POST to the settings resource applies the settings. +``` POST /redfish/v1/Chassis/EthernetSwitch1/NetworkAdapters/NA_1/NetworkDeviceFunctions/NDF_1/EthernetInterfaces/1/SD +``` ## Get switch log The switch's log is obtained retrieving the Log resource which represent the system log. -GET /redfish/v1/Fabrics/{id=Ethernet}/Switches/{id}/LogServices/Log +``` +GET /redfish/v1/Fabrics/{id=Ethernet}/Switches/{id}/LogServices/Log +``` The response message contains the following fragment. The Entries resource contains the entries of the log. +``` { - -"@odata.id": -"/redfish/v1/Fabrics/Ethernet/Switches/Switch1/LogServices/Log", - -"Name": "System Log", - -. . . - -"Entries": { - -"@odata.id": "/redfish/v1/ -Fabrics/Ethernet/Switches/Switch1/LogServices/Log/Entries" - -} - + "@odata.id": "/redfish/v1/Fabrics/Ethernet/Switches/Switch1/LogServices/Log", + "Name": "System Log", + . . . + "Entries": { + "@odata.id": "/redfish/v1/Fabrics/Ethernet/Switches/Switch1/LogServices/Log/Entries" + } } +``` ## Get Ethernet switch log entries The entries of a system log are obtained by retrieving each entry of the log. + +``` GET /redfish/v1/ Fabrics/{id=Ethernet}/Switches/{id}/LogServices/Log/Entries + ``` The following fragment is +``` { - -"@odata.id": -"/redfish/v1/Fabrics/Ethernet/Switches/Switch1/LogServices/{id}/Entries", - -"Members@odata.count": 2, - -\] - + "@odata.id": "/redfish/v1/Fabrics/Ethernet/Switches/Switch1/LogServices/{id}/Entries", + "Members@odata.count": 2, + ] } +``` ## Get Ethernet switch log entry A system log entry is obtained by retrieving a specific entry of the log. + +``` GET /redfish/v1/ Fabrics/\[id=Ethernet}/Switches/{id}/LogServices/{id}/Entries/{id} +``` The following fragment is +``` { - -"@odata.id": "/redfish/v1/ -Fabrics/Ethernet/Switches/Switch1/LogServices/Log1/Entries/1", - -"EntryType": "SEL", - -"Severity": "Critical", - -"Created": "2012-03-07T14:44:00Z", - -"EntryCode": "Upper Critical - going high", - -"SensorType": "Temperature", - -"SensorNumber": 1, - -"Message": "Temperature threshold exceeded", - -"MessageId": "0x592A28", - -"Links": { - -"OriginOfCondition": { "@odata.id": "/redfish/v1/Chassis/1/Thermal" } - -} - + "@odata.id": "/redfish/v1/Fabrics/Ethernet/Switches/Switch1/LogServices/Log1/Entries/1", + "EntryType": "SEL", + "Severity": "Critical", + "Created": "2012-03-07T14:44:00Z", + "EntryCode": "Upper Critical - going high", + "SensorType": "Temperature", + "SensorNumber": 1, + "Message": "Temperature threshold exceeded", + "MessageId": "0x592A28", + "Links": { + "OriginOfCondition": { "@odata.id": "/redfish/v1/Chassis/1/Thermal" } + } } +``` ## Clear the system log The system log is cleared by POST'ing to the ClearLog action for + +``` POST /redfish/v1/Fabrics/Ethernet/Switches/Switch1/LogService/Log/Actions/LogService.ClearLog +``` # References \[1\] Usage Guide and Requirements for the OCP Baseline Hardware Management Profile v1.0.1 -\[2\] “Redfish API Specification” - -[*https://www.dmtf.org/dsp/DSP0266*](https://www.dmtf.org/dsp/DSP0266) +\[2\] “Redfish API Specification” - [*https://www.dmtf.org/dsp/DSP0266*](https://www.dmtf.org/dsp/DSP0266) # Revision From d0998ed7577b0a675c4dbfebd0e84ae958350796 Mon Sep 17 00:00:00 2001 From: John Leung Date: Tue, 15 Aug 2023 14:12:11 -0700 Subject: [PATCH 3/5] Update UsageGuide-ESwitch.md Fix typo --- Networking/UsageGuide-ESwitch.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Networking/UsageGuide-ESwitch.md b/Networking/UsageGuide-ESwitch.md index d239c03..34836a1 100644 --- a/Networking/UsageGuide-ESwitch.md +++ b/Networking/UsageGuide-ESwitch.md @@ -646,7 +646,7 @@ log. ``` GET /redfish/v1/ Fabrics/{id=Ethernet}/Switches/{id}/LogServices/Log/Entries - ``` +``` The following fragment is From e6198a12430bf7c89975034686f45b10824c2494 Mon Sep 17 00:00:00 2001 From: John Leung Date: Mon, 2 Oct 2023 15:30:58 -0700 Subject: [PATCH 4/5] test --- Networking/UsageGuide-ESwitch.md | 1 + 1 file changed, 1 insertion(+) diff --git a/Networking/UsageGuide-ESwitch.md b/Networking/UsageGuide-ESwitch.md index 34836a1..2d75ace 100644 --- a/Networking/UsageGuide-ESwitch.md +++ b/Networking/UsageGuide-ESwitch.md @@ -697,6 +697,7 @@ The system log is cleared by POST'ing to the ClearLog action for POST /redfish/v1/Fabrics/Ethernet/Switches/Switch1/LogService/Log/Actions/LogService.ClearLog ``` +No response is provide. # References From 8342e5cf6e6f66fb4ac865dadf029ceedfd63a04 Mon Sep 17 00:00:00 2001 From: John Leung Date: Mon, 13 Nov 2023 11:39:32 -0800 Subject: [PATCH 5/5] update tables Signed-off-by: John Leung --- Networking/UsageGuide-ESwitch.md | 381 +++++++++---------------------- 1 file changed, 102 insertions(+), 279 deletions(-) diff --git a/Networking/UsageGuide-ESwitch.md b/Networking/UsageGuide-ESwitch.md index 2d75ace..354bf66 100644 --- a/Networking/UsageGuide-ESwitch.md +++ b/Networking/UsageGuide-ESwitch.md @@ -33,249 +33,68 @@ Management v1.0.1 profile. Conformance to the switch profile requires conformanc } ``` -# Capabilities - -The following use cases are enabled by conformance to this Server -Hardware Management profile. The Switch Management profile is extended -from the Baseline Hardware Management profile. - -The following table lists the capabilities provide the baseline profile -requirements. These capabilities are described in the "Usage Guide and -Requirements for the OCP Baseline Hardware Management Profile v1.0.1" -document. - - - ----- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

Table 1 - Baseline Capabilities

Use CaseManagement TaskRequirement
Account Management
    -
  • Get accounts

  • -
Mandatory
Session Management
    -
  • Get sessions

  • -
Mandatory
Hardware inventory
    -
  • Get the FRU information

  • -
  • Get and Set the Asset Tag

  • -

Mandatory

-

Recommended

Hardware location
    -
  • Get the location LED

  • -
  • Set the location LED

  • -

Recommended

-

Recommended

Status
    -
  • Get status of chassis

  • -
Mandatory
Power
    -
  • Get power state

  • -
  • Get power usage

  • -
  • Get power limit

  • -

Mandatory

-

Recommended

-

Recommended

Temperature
    -
  • Get the temperature

  • -
  • Get temperature thresholds

  • -

If Impl, Mandatory

-

If Impl, Recom

Cooling
    -
  • Get fan speeds

  • -
  • Get fan redundancies

  • -

If Impl, Mandatory

-

If Impl, Recom

Log
    -
  • Get log entry

  • -
  • Clear the log

  • -

Mandatory

-

Recommended

Management Controller
    -
  • Get version of firmware for mgmt controller

  • -
  • Get status of mgmt controller

  • -
  • Get network information for mgmt controller

  • -
  • Reset the mgmt controller

  • -

Mandatory

-

Mandatory

-

Mandatory

-

Mandatory

- -Table 1 - Baseline Capabilities - -The following table lists the -capabilities prescribed in the Ethernet switch profile. - -Redfish models the functional and physical aspects of the system level -entities. Computer systems and switches are system level entities. The -physical aspect in found under the Chassis resource. - -The Ethernet switch functions are modelled as part of the Ethernet -fabrics in the fabrics model. The fabrics model also includes resources -for Zones and Endpoints, in addition to Switches. These resources are -not shown in the diagram. The fabrics model is described in the Fabrics -Whitepaper. - - - ------ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

Table – Ethernet Switch-specific Capabilities

Use CaseManagement TaskRqmt
Functional Ethernet Switches
    -
  • Get list of switches

  • -
  • Get information on a switch

  • -
  • Get the status of a switch

  • -

Mandatory

-

Mandatory

-

Mandatory

Section 5.1

-

Section 5.2

-

Section 5.3

Physical Ethernet Switches
    -
  • Get information on a switch

  • -
MandatorySection 5.4
Modules
    -
  • Get list of modules

  • -
  • Get a module

  • -

Mandatory

-

Mandatory

Section 5.5

-

Section 5.6

Ports
    -
  • Get list of ports

  • -
  • Get a port

  • -

Mandatory

-

Mandatory

Section 5.7

-

Section 5.8

Ethernet
    -
  • Get list of Ethernet interfaces

  • -
  • Get an Ethernet interface

  • -
  • Set IPv4 address

  • -

Mandatory

-

Mandatory

-

Mandatory

Section 5.9

-

Section 5.10

-

Section 5.11

System Log
    -
  • Get system log

  • -
  • Get system log entries

  • -
  • Get a system log entry

  • -
  • Clear the log

  • -

Recommended

-

Recommended

-

Recommended

-

Recommended

Section 5.12

-

Section 5.13

-

Section 5.14

-

Section 5.15

- -Table – Ethernet Switch-specific Capabilities +# Manageability Tasks + +The manageability tasks supported on an Ethernet switch is extended from OCP's common baseline management tasks. + +OCP's common baseline manageability task is specified in the "Usage Guide and Requirements for the OCP Baseline Hardware Management Profile v1.0.1" document. +The following table lists the manageability tasks prescribed by that document. + +| **Use Case** | **Manageability Task** | **Requirement** | +| :--- | :--------- | :--- | +| Account Management | Get accounts | Mandatory | +| Session Management | Get sessions | Mandatory | +| Hardware Inventory | Get FRU info | Mandatory | +| | Get and set asset tag | Recommended | +| Hardware Location | Get and set location LED | Recommended | +| Status | Get chassis status | Mandatory | +| Power | Get power state | Mandatory | +| | Get power usage | Recommended | +| | Get power limit | Recommended | +| Temperature | Get the temperature | If implemented, mandatory | +| Cooling | Get fan speeds | If implemented, mandatory | +| | Get fan redundancy | If implemented, recommended | +| Log | Get log entry | Mandatory | +| | Clear the log | Recommended | +| Management Controller | Get firmware version | Mandatory | +| | Get controller status | Mandatory | +| | Get network info | Mandatory | +| | Reset controller | Mandatory | + +Table 1 - Baseline Manageability Tasks + +The manageability tasks supported on an Ethernet switch is show in the table below. + +| **Use Case** | **Manageability Task** | **Requirement** | +| :--- | :----------- | :--- | +| Functional Ethernet Switch | [Get list of switches](#get-switches) | Mandatory | +| | [Get switch info](#get-switch-info) | Mandatory | +| | [Get switch status](#get-switch-status) | Mandatory | +| Physical Ethernet Switch | [Get switch chassis info](#get-switch-chassis-info) | Mandatory | +| Modules | [Get list of modules](#get-modules) | Mandatory | +| | [Get module info](#get-module-info) | Mandatory | +| Ports | [Get list of ports](#get-ports) | Mandatory | +| | [Get port info](#get-port-info) | Mandatory | +| Interfaces | [Get list of interfaces](#get-interfaces) | Mandatory | +| | [Get interface info](#get-interface-info) | Mandatory | +| | [Set IPv4 config](#set-ipv4-config) | Recommended | +| Log | [Get system log](#get-system-log) | Mandatory | +| | [Get list of system log entries](#get-system-log-entries) | Mandatory | +| | [Get system log entry](#get-system-log-entry) | Mandatory | +| | [Clear system log](#clear-system-log) | Mandatory | + +Table – Ethernet Switch Manageability task # Use Cases -This section describes how each capability is accomplished by -interacting with the Redfish Service. +This section describes how each capability is accomplished by interacting with the Redfish Service. -## Get the list of functional Ethernet switches +## Get switches The Ethernet switches is obtained from the Switches resource. ``` -GET /redfish/v1/Fabrics/{id=Ethernet}/Switches +GET /redfish/v1/Fabrics/Ethernet/Switches ``` The response message contains the following fragment. @@ -290,12 +109,12 @@ The response message contains the following fragment. } ``` -## Get a functional Ethernet switch +## Get switch info An Ethernet switch is obtained from the System resource. ``` -GET /redfish/v1/Fabrics/{id=Ethernet}/Switches/(id} +GET /redfish/v1/Fabrics/Ethernet/Switches/(id} ``` The response message contains the following fragment. @@ -317,7 +136,7 @@ The response message contains the following fragment. } ``` -## Get status of a functional Ethernet switch +## Get switch status The status and health an Ethernet switch is obtained by retrieving the Switch resource. @@ -338,7 +157,26 @@ The response message contains the following fragment. } ``` -## Get a physical Ethernet switch +## Get switches + +The Ethernet switches is obtained from the Switches resource. + +``` +GET /redfish/v1/Fabrics/Ethernet/Switches +``` +The response message contains the following fragment. + +``` +{ + "Name": "Ethernet Switch Collection", + "Members@odata.count": 2, + "Members": [ + { "@odata.id": "/redfish/v1/Fabrics/Ethernet/Switches/Switch1" }, + { "@odata.id": "/redfish/v1/Fabrics/Ethernet/Switches/Switch2" } + ] +} +``` +## Get switch chassis info An Ethernet switch is obtained from the System resource. @@ -384,10 +222,9 @@ The response message contains the following fragment. } ``` -## Get list of modules (network adapters) +## Get list of modules -The Ethernet switch modules are obtained from the NetworkAdapters -resource. +The Ethernet switch modules are obtained from the NetworkAdapters resource. ``` GET /redfish/v1/Chassis/{id}/NetworkAdapters @@ -406,7 +243,7 @@ The response message contains the following fragment. } ``` -## Get a module +## Get module info An Ethernet switch module is obtained from the NetworkAdapter resource. @@ -464,7 +301,7 @@ The response message contains the following fragment. } ``` -## Get a port +## Get port info An Ethernet switch port is obtained from the Ports resource. @@ -495,10 +332,9 @@ The response message contains the following fragment. } ``` -## Get list of Ethernet interfaces +## Get list of interfaces -The list of Ethernet interfaces is obtained by retrieving the -EthernetInterfaces resource on the System of interest. +The list of Ethernet interfaces is obtained by retrieving the EthernetInterfaces resource on the chassis. ``` @@ -521,7 +357,7 @@ The response message contains the following fragment. } ``` -## Get an Ethernet Interface +## Get interface info The Ethernet interface is obtained by retrieving the EthernetInterface resource on the System of interest. @@ -566,35 +402,23 @@ EthernetInterface resource may get new properties during in Redfish schema updat } ``` -## Set IPv4 Address +## Set IPv4 config -The IPv4 address is set by modifying the Settings resource which is -subordinate to the EthernetInterface resource. In the fragment below, -the @Redfish.Settings property indicates the location of the settings -resource as being subordinate. A HTTP POST to the path will apply the -values of the settings resource. +The IPv4 config is set by modifying, then applying the Settings resource (aka SD). +The IPv4 config is modified a PATCH to the Setting resource. ``` -{ - "@odata.id": "/redfish/v1/Chassis/EthernetSwitch1/NetworkAdapters/NA_1/NetworkDeviceFunctions/NDF_1/EthernetInterfaces/1", - "@Redfish.Settings": { - "SettingsObject": { - "@odata.id":"/redfish/v1/Chassis/EthernetSwitch1/NetworkAdapters/NA_1/NetworkDeviceFunctions/NDF_1/EthernetInterfaces/1/SD" - } - } -} -``` +PATCH +/redfish/v1/Chassis/{id}/NetworkAdapters/{id}/NetworkDeviceFunctions/{id}/EthernetInterfaces/{id}/SD + +The PATCH request includes the following message. +The @Redfish.SettingsApplyTime property indicates when the settings shall be applied. -The Settings resource, itself, represents the future intended state of a -resource. The Settings resource contains a subset of properties of the -EthernetInterface resource. The Settings resource may contain a -@Redfish.SettingsApplyTime to indicate when the settings shall be -applied. ``` { - "@Redfish.SettingsApplyTime": ".." + "@Redfish.SettingsApplyTime": "Immediate" "IPv4Addresses": [ { "Address": "192.170.0.15", @@ -606,20 +430,19 @@ applied. } ``` -Once the properties within the settings resource have the desired -values, a POST to the settings resource applies the settings. +The IPv4 config is applied a POST to the Setting resource. + ``` POST /redfish/v1/Chassis/EthernetSwitch1/NetworkAdapters/NA_1/NetworkDeviceFunctions/NDF_1/EthernetInterfaces/1/SD ``` -## Get switch log +## Get system log The switch's log is obtained retrieving the Log resource which represent the system log. - ``` GET /redfish/v1/Fabrics/{id=Ethernet}/Switches/{id}/LogServices/Log ``` @@ -637,7 +460,7 @@ resource contains the entries of the log. } ``` -## Get Ethernet switch log entries +## Get system log entries The entries of a system log are obtained by retrieving each entry of the log. @@ -658,7 +481,7 @@ The following fragment is } ``` -## Get Ethernet switch log entry +## Get system log entry A system log entry is obtained by retrieving a specific entry of the log. @@ -701,13 +524,13 @@ No response is provide. # References -\[1\] Usage Guide and Requirements for the OCP Baseline Hardware -Management Profile v1.0.1 +\[1\] Usage Guide and Requirements for the [OCP Baseline Hardware Management Profile v1.0.1](https://www.opencompute.org/documents/usage-guide-for-baseline-hw-mgmt-api-v1-0-1-final-pdf) \[2\] “Redfish API Specification” - [*https://www.dmtf.org/dsp/DSP0266*](https://www.dmtf.org/dsp/DSP0266) # Revision -| Revision | Date | Description | +| Version | Date | Description | |----------|---------------|---------------| -| V0.1 | June 13, 2023 | Initial draft | +| 0.1 | June 13, 2023 | Initial draft | +| 0.2 | Nov 13,2023 | Markdown version |