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

背景

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

关联ISSUE

[需求]: NetworkAdapter相关资源支持redfish新标准

整体方案

1.redfish接口NetworkAdapter北向需要关联资源协作接口对应的链接,因此需要新增资源协作接口属性

评审点

评审点1:

URI:/redfish/v1/Chassis/{ChassisId}/NetworkAdapters/{NetworkAdapterId}

1、支持新增
Ports 、NetworkDeviceFunctions、Merics
2、支持显示"Controllers”下的“Links”下新增Ports、NetworkDeviceFunctions

详细描述

评审点1:

URI:/redfish/v1/Chassis/{ChassisId}/NetworkAdapters/{NetworkAdapterId}
变化类型:新增属性
操作类型:GET
应用场景:redfish接口获取NetworkAdapterse相关资源集合信息

一级属性 二级属性 三级属性 四级属性 类型 权限 属性说明
Ports @odata.id string ReadOnly 链接端口集合资源的URI
NetworkDeviceFunctions @odata.id string ReadOnly 链接网络功能集合资源的URI
Metrics @odata.id string ReadOnly 链接网络适配器使用情况和健康状况统计集合资源的URI
Controllers Links Ports @odata.id array,string ReadOnly 当前网络控制器关联的端口的枚举
Controllers Links NetworkDeviceFunctions @odata.id array,string ReadOnly 当前网络控制器关联的网络功能的枚举

新增schema文件networkadapter.v1_12_1.json

   "Ports": {
                    "description": "An array of links to the ports associated with this network controller.",
                    "items": {
                        "$ref": "http://redfish.dmtf.org/schemas/v1/Port.json#/definitions/Port"
                    },
                    "longDescription": "This property shall contain an array of links to resources of type `Port` that represent the ports associated with this network controller.",
                    "readonly": true,
                    "type": "array",
                    "versionAdded": "v1_5_0"
                },
 "NetworkDeviceFunctions": {
                    "$ref": "http://redfish.dmtf.org/schemas/v1/NetworkDeviceFunctionCollection.json#/definitions/NetworkDeviceFunctionCollection",
                    "description": "The link to the collection of network device functions associated with this network adapter.",
                    "longDescription": "This property shall contain a link to a resource collection of type `NetworkDeviceFunctionCollection`.",
                    "readonly": true
                },
 "Metrics": {
                    "anyOf": [
                        {
                            "$ref": "http://redfish.dmtf.org/schemas/v1/NetworkAdapterMetrics.json#/definitions/NetworkAdapterMetrics"
                        },
                        {
                            "type": "null"
                        }
                    ],
                    "description": "The link to the metrics associated with this adapter.",
                    "longDescription": "This property shall contain a link to a resource of type `NetworkAdapterMetrics` that contains the metrics associated with this adapter.",
                    "readonly": true,
                    "versionAdded": "v1_7_0"
                },
"ControllerLinks": {
            "additionalProperties": false,
            "description": "The links to other resources that are related to this resource.",
            "longDescription": "This Redfish Specification-described type shall contain links to resources that are related to but are not contained by, or subordinate to, this resource.",
            "patternProperties": {
                "^([a-zA-Z_][a-zA-Z0-9_]*)?@(odata|Redfish|Message)\\.[a-zA-Z_][a-zA-Z0-9_]*$": {
                    "description": "This property shall specify a valid odata or Redfish property.",
                    "type": [
                        "array",
                        "boolean",
                        "integer",
                        "number",
                        "null",
                        "object",
                        "string"
                    ]
                }
            },
            "properties": {
                "ActiveSoftwareImage": {
                    "$ref": "http://redfish.dmtf.org/schemas/v1/SoftwareInventory.json#/definitions/SoftwareInventory",
                    "description": "The link to the software inventory resource that represents the active firmware image for this controller.",
                    "longDescription": "This property shall contain a link to a resource of type `SoftwareInventory` that represents the active firmware image for this controller.",
                    "readonly": false,
                    "versionAdded": "v1_10_0"
                },
                "NetworkDeviceFunctions": {
                    "description": "An array of links to the network device functions associated with this network controller.",
                    "items": {
                        "$ref": "http://redfish.dmtf.org/schemas/v1/NetworkDeviceFunction.json#/definitions/NetworkDeviceFunction"
                    },
                    "longDescription": "This property shall contain an array of links to resources of type `NetworkDeviceFunction` that represent the network device functions associated with this network controller.",
                    "readonly": true,
                    "type": "array"
                },
                "NetworkDeviceFunctions@odata.count": {
                    "$ref": "http://redfish.dmtf.org/schemas/v1/odata-v4.json#/definitions/count"
                },
                "NetworkPorts": {
                    "deprecated": "This property has been deprecated in favor of the `Ports` property.",
                    "description": "An array of links to the network ports associated with this network controller.",
                    "items": {
                        "$ref": "http://redfish.dmtf.org/schemas/v1/NetworkPort.json#/definitions/NetworkPort"
                    },
                    "longDescription": "This property shall contain an array of links to resources of type `NetworkPort` that represent the network ports associated with this network controller.",
                    "readonly": true,
                    "type": "array",
                    "versionDeprecated": "v1_5_0"
                },
                "NetworkPorts@odata.count": {
                    "$ref": "http://redfish.dmtf.org/schemas/v1/odata-v4.json#/definitions/count"
                },
                "Oem": {
                    "$ref": "http://redfish.dmtf.org/schemas/v1/Resource.json#/definitions/Oem",
                    "description": "The OEM extension property.",
                    "longDescription": "This property shall contain the OEM extensions.  All values for properties contained in this object shall conform to the Redfish Specification-described requirements."
                },
                "PCIeDevices": {
                    "description": "An array of links to the PCIe devices associated with this network controller.",
                    "items": {
                        "$ref": "http://redfish.dmtf.org/schemas/v1/PCIeDevice.json#/definitions/PCIeDevice"
                    },
                    "longDescription": "This property shall contain an array of links to resources of type `PCIeDevice` that represent the PCIe devices associated with this network controller.",
                    "readonly": true,
                    "type": "array"
                },
                "PCIeDevices@odata.count": {
                    "$ref": "http://redfish.dmtf.org/schemas/v1/odata-v4.json#/definitions/count"
                },
                "Ports": {
                    "description": "An array of links to the ports associated with this network controller.",
                    "items": {
                        "$ref": "http://redfish.dmtf.org/schemas/v1/Port.json#/definitions/Port"
                    },
                    "longDescription": "This property shall contain an array of links to resources of type `Port` that represent the ports associated with this network controller.",
                    "readonly": true,
                    "type": "array",
                    "versionAdded": "v1_5_0"
                },
                "Ports@odata.count": {
                    "$ref": "http://redfish.dmtf.org/schemas/v1/odata-v4.json#/definitions/count"
                },
                "SoftwareImages": {
                    "description": "The images that are associated with this controller.",
                    "items": {
                        "$ref": "http://redfish.dmtf.org/schemas/v1/SoftwareInventory.json#/definitions/SoftwareInventory"
                    },
                    "longDescription": "This property shall contain an array of links to resource of type `SoftwareInventory` that represent the firmware images that apply to this controller.",
                    "readonly": true,
                    "type": "array",
                    "versionAdded": "v1_10_0"
                },
                "SoftwareImages@odata.count": {
                    "$ref": "http://redfish.dmtf.org/schemas/v1/odata-v4.json#/definitions/count"
                }
            },
            "type": "object"
        },













RspBody响应体示例:

  {
    "@odata.context": "/redfish/v1/$metadata#NetworkAdapter.NetworkAdapter",
    "@odata.id": "/redfish/v1/Chassis/1/NetworkAdapters/chassisNIC1(SF221Q)",
    "@odata.type": "#NetworkAdapter.v1_12_1.NetworkAdapter",
    "Id": "chassisNIC1(SF221Q)",
    "Name": "chassisNIC1(SF221Q)",
    "Manufacturer": "Huawei",
    "Model": "CPU Integration",
    "PartNumber": null,
    "SerialNumber": null,
    "Oem": {
        "openUBMC": {
            "Name": "NIC 1 (SF221Q)",
            "DriverName": "hns3",
            "DriverVersion": "4.19.90-89.11.v2401.ky10.aarch6",
            "CardManufacturer": "Huawei",
            "CardModel": "4*GE",
            "PcieSlotId": null,
            "DeviceLocator": "NIC 1 (SF221Q)",
            "SlotNumber": 1,
            "Position": "chassis",
            "NetworkTechnology": [
                "Ethernet"
            ],
            "RootBDF": "0000:34:00.0",
            "FirmwareVersion": "3.10.22.8",
            "VenderID": null,
            "DeviceID": null,
            "SubsystemVenderID": null,
            "SubsystemDeviceID": null,
            "BoardId": 65535,
            "BoardIdHex": "0xffff",
            "ComponentUniqueID": "00000001100302023955",
            "PCBVersion": ".A",
            "MctpEnabled": false,
            "HotPlugSupported": true,
            "HotPlugAttention": false,
            "OrderlyHotplugCtrlStatus": "Removable",
            "AssociatedResource": "CPU1",
            "PartNumber": null
        }
    },
    "Controllers": [
        {
            "FirmwarePackageVersion": "3.10.22.8",
            "ControllerCapabilities": {
                "NetworkPortCount": 4
            },
            "Links": {
                "PCIeDevices@odata.count": 0,
                "PCIeDevices": [],
                "NetworkPorts@odata.count": 4,
                "NetworkPorts": [
                    {
                        "@odata.id": "/redfish/v1/Chassis/1/NetworkAdapters/chassisNIC1(SF221Q)/NetworkPorts/1"
                    },
                    {
                        "@odata.id": "/redfish/v1/Chassis/1/NetworkAdapters/chassisNIC1(SF221Q)/NetworkPorts/2"
                    },
                    {
                        "@odata.id": "/redfish/v1/Chassis/1/NetworkAdapters/chassisNIC1(SF221Q)/NetworkPorts/3"
                    },
                    {
                        "@odata.id": "/redfish/v1/Chassis/1/NetworkAdapters/chassisNIC1(SF221Q)/NetworkPorts/4"
                    }
                ],
                "Ports": [
                    {
                        "@odata.id": "/redfish/v1/Chassis/1/NetworkAdapters/chassisNIC1(SF221Q)/Ports/1"
                    },
                    {
                        "@odata.id": "/redfish/v1/Chassis/1/NetworkAdapters/chassisNIC1(SF221Q)/Ports/2"
                    },
                    {
                        "@odata.id": "/redfish/v1/Chassis/1/NetworkAdapters/chassisNIC1(SF221Q)/Ports/3"
                    },
                    {
                        "@odata.id": "/redfish/v1/Chassis/1/NetworkAdapters/chassisNIC1(SF221Q)/Ports/4"
                    }
                ],
                "NetworkDeviceFunctions": [
                    {
                        "@odata.id": "/redfish/v1/Chassis/1/NetworkAdapters/chassisNIC1(SF221Q)/NetworkDeviceFunctions/1"
                    },
                    {
                        "@odata.id": "/redfish/v1/Chassis/1/NetworkAdapters/chassisNIC1(SF221Q)/NetworkDeviceFunctions/2"
                    },
                    {
                        "@odata.id": "/redfish/v1/Chassis/1/NetworkAdapters/chassisNIC1(SF221Q)/NetworkDeviceFunctions/3"
                    },
                    {
                        "@odata.id": "/redfish/v1/Chassis/1/NetworkAdapters/chassisNIC1(SF221Q)/NetworkDeviceFunctions/4"
                    }
                ]
            }
        }
    ],
    "NetworkPorts": {
        "@odata.id": "/redfish/v1/Chassis/1/NetworkAdapters/chassisNIC1(SF221Q)/NetworkPorts"
    },
    "NetworkDeviceFunctions": {
        "@odata.id": "/redfish/v1/Chassis/1/NetworkAdapters/chassisNIC1(SF221Q)/NetworkDeviceFunctions"
    },
    "Ports": {
        "@odata.id": "/redfish/v1/Chassis/1/NetworkAdapters/chassisNIC1(SF221Q)/Ports"
    },
    "Metrics": {
        "@odata.id": "/redfish/v1/Chassis/1/NetworkAdapters/chassisNIC1(SF221Q)/Metrics"
    },
    "Status": {
        "State": "Enabled",
        "Oem": {
            "openUBMC": {
                "Severity": "Informational"
            }
        },
        "Health": "OK"
    }
} 












评审结论

同意新增:

1、Ports 、NetworkDeviceFunctions、Merics
2、支持显示"Controllers”下的“Links”下新增Ports、NetworkDeviceFunctions

URI:/redfish/v1/Chassis/{ChassisId}/NetworkAdapters/{NetworkAdapterId}
变化类型:新增属性
操作类型:GET
应用场景:redfish接口获取NetworkAdapterse相关资源集合信息

一级属性 二级属性 三级属性 四级属性 类型 权限 属性说明
Ports @odata.id string ReadOnly 链接端口集合资源的URI
NetworkDeviceFunctions @odata.id string ReadOnly 链接网络功能集合资源的URI
Metrics @odata.id string ReadOnly 链接网络适配器使用情况和健康状况统计集合资源的URI
Controllers Links Ports @odata.id array,string ReadOnly 当前网络控制器关联的端口的枚举
Controllers Links NetworkDeviceFunctions @odata.id array,string ReadOnly 当前网络控制器关联的网络功能的枚举

遗留问题

networkadapter.v1_12_1.json 中 定义了 ControllerLinks属性,但是在networkadapter资源的redfish接口文档中未定义 ControllerLinks属性,需要再审视下

响应体示例中为什么不写出来 PCIeDevices 的返回值,注意redfish文档中返回的是 system资源,不是chassis资源

redfish接口文档里面是controller下又一层links层级,repbody示例中就是按照redfish接口文档来实现的。

需求中没有要求实现Pciedevices这一个属性


帖子已经修改,按照结论实现