【已评审】EthernetInterface相关资源支持redfish新标准

背景

当前redfish标准接口存在缺失,需要评审新增redfish标准接口以及资源协作接口属性。

关联ISSUE

EthernetInterface相关资源支持redfish新标准

整体方案

评审点1:

新增资源协作接口属性MTUSize

评审点2:

redfish接口EthernetInterfaces资源新增属性EthernetInterfaceType,Links,MTUSize,VLAN
URI:/redfish/v1/Systems/{ComputerSystemId}/EthernetInterfaces/{EthernetInterfaceId}(已有)

详细描述

评审点1:

资源path:”/bmc/kepler/Systems/:SystemID/NetworkAdapters/:ID/Ports/:ID”(已有)
资源interface:“bmc.kepler.Systems.NetworkPort”(已有)
新增属性:MTUSize

属性名称 变化类型 签名 读写&权限 持久化 变化通知 属性说明 接口约束
MTUSize 新增属性 q 只读,读权限 ReadOnly false 此接口当前配置的最大传输单元

评审点2:
URI:/redfish/v1/Systems/{ComputerSystemId}/EthernetInterfaces/{EthernetInterfaceId}”(已有)

变化类型:新增属性
操作类型:GET
权限:ReadOnly

一级属性 二级属性 三级属性 取值类型 说明 取值范围 默认值 操作权限 是否频繁变化并需要屏蔽变化事件 约束
EthernetInterfaceType string 接口类型 [Physical,Virtual] ReadOnly
Links object 与本资源相关的其他资源的链接 ReadOnly
Ports array 提供此以太网接口的端口的链接 ReadOnly
@odata.id string /redfish/v1/Chassis/{ChassisId}/NetworkAdapters/{NetworkAdapterId}/Ports/{PortId}
MTUSize integer 此接口当前配置的最大传输单元 ReadOnly
VLAN object 如果此网络接口支持多个 VLAN,则此属性不存在。VLAN 集合会出现在此资源的链接属性中(os的VLAN) null ReadOnly
VLANEnable boolean 指示此 VLAN 是否已启用用于此 VLAN 网络接口 null ReadOnly
VLANId integer 此 VLAN 的 ID null ReadOnly
VLANPriority integer 此 VLAN 的优先级 null ReadOnly

已有 EthernetInterface.v1_12_0.json文件
schema相应示例

"EthernetInterfaceType": {
                    "anyOf": [
                        {
                            "$ref": "#/definitions/EthernetDeviceType"
                        },
                        {
                            "type": "null"
                        }
                    ],
                    "description": "The type of interface.",
                    "longDescription": "This property shall contain the type of interface.",
                    "readonly": true,
                    "versionAdded": "v1_6_0"
                },

"Links": {
                    "$ref": "#/definitions/Links",
                    "description": "The links to other resources that are related to this resource.",
                    "longDescription": "This property shall contain links to resources that are related to but are not contained by, or subordinate to, this resource.",
                    "versionAdded": "v1_1_0"
                },

"MTUSize": {
                    "description": "The currently configured maximum transmission unit (MTU), in bytes, on this interface.",
                    "longDescription": "This property shall contain the size, in bytes, of the largest protocol data unit (PDU) that can be passed in an Ethernet (MAC) frame on this interface, as currently configured by the operating system or driver.",
                    "readonly": false,
                    "type": [
                        "integer",
                        "null"
                    ]
                },

"VLAN": {
                    "$ref": "http://redfish.dmtf.org/schemas/v1/VLanNetworkInterface.json#/definitions/VLAN",
                    "description": "If this network interface supports more than one VLAN, this property is absent.  VLAN collections appear in the `Links` property of this resource.",
                    "longDescription": "This property shall contain the VLAN for this interface.  If this interface supports more than one VLAN, the `VLAN` property shall be absent and, instead, the VLAN collection link shall be present."
                },

响应示例:

{
    "@odata.context": "/redfish/v1/$metadata#EthernetInterface.EthernetInterface",
    "@odata.id": "/redfish/v1/Systems/1/EthernetInterfaces/PCIeCard3(SP680)Port1",
    "@odata.type": "#EthernetInterface.v1_2_0.EthernetInterface",
    ...

    "EthernetInterfaceType": "Physical"
    "Links": {
        "Ports": [ {
                    "@odata.id": "/redfish/v1/Chassis/1/NetworkAdapters/PCIeCard3(SP680)/NetworkPorts/1"
                   }
                 ]
    },
    "VLAN":{
         "VLANEnable": ""
         "VLANId": ""
         "VLANPriority": ""
    },
    "MTUSize":
    "PermanentMACAddress": "AC:DC:CA:5E:11:C9",
    "MACAddress": "AC:DC:CA:5E:11:C9",
    "LinkStatus": "NoLink",
    ...
    "Actions": {
        "Oem": {
            "Huawei": {
                "#EthernetInterface.Configure": {
                    "target": "/redfish/v1/Systems/1/EthernetInterfaces/PCIeCard3(SP680)Port1/Actions/Oem/Huawei/EthernetInterface.Configure",
                    "@Redfish.ActionInfo": "/redfish/v1/Systems/1/EthernetInterfaces/PCIeCard3(SP680)Port1/ConfigureActionInfo"
    }
}

评审结论

通过,具体结论如下:

  1. 评审点1:同意资源协作接口 bmc.kepler.Systems.NetworkPort 新增属性 MTUSize,签名为 q,表征网口当前配置的最大传输单元;只读属性,读权限 ReadOnly ,不需要持久化,不需要发送变更通知。
  2. 评审点2:同意 Redfish 接口 /redfish/v1/Systems/{ComputerSystemId}/EthernetInterfaces/{EthernetInterfaceId} 新增属性EthernetInterfaceType,Links,MTUSize,VLAN,属性操作类型为 GET,权限为 ReadOnly;对应 schema 为 EthernetInterface.v1_12_0.json,具体属性说明如下:
一级属性 二级属性 三级属性 取值类型 说明 取值范围 默认值 操作权限 是否频繁变化并需要屏蔽变化事件 约束
EthernetInterfaceType string 接口类型 [Physical,Virtual] ReadOnly
Links object 与本资源相关的其他资源的链接 ReadOnly
Ports array 提供此以太网接口的端口的链接 ReadOnly
@odata.id string /redfish/v1/Chassis/{ChassisId}/NetworkAdapters/{NetworkAdapterId}/Ports/{PortId}
MTUSize integer 此接口当前配置的最大传输单元 ReadOnly
VLAN object 如果此网络接口支持多个 VLAN,则此属性不存在。VLAN 集合会出现在此资源的链接属性中 null ReadOnly
VLANEnable boolean 指示此 VLAN 是否已启用用于此 VLAN 网络接口 null ReadOnly
VLANId integer 此 VLAN 的 ID null ReadOnly
VLANPriority integer 此 VLAN 的优先级 null ReadOnly

遗留问题

  1. Redfish 规范中标准属性 MTUSize 是 读写属性,当前实现是 只读,需要在接口说明资料中增加约束说明。
    结论:当前问题已经提 issue 进行跟踪,链接:mdb_interface issue #284

1、仅支持可读,不支持配置;

2、最大值为9000,那u16是不是就够用了;