Some telemetry in case of NVSwitch and NetworkAdapter is coming from PLDM and some from NSM. Hence there is a requirement to associate/correlate NSM device with PLDM terminus. Once devices are correlated, then association between PLDM sensorId must be set with NSM objects. To achieve this requirement we have below mentioned configuration PDI exposed from EM.
| Configuration Property | type | Description |
|---|---|---|
| Type | string | NsmDeviceAssociation |
| Name | string | Name for EM dbus object. |
| UUID | string | UUID of the device which will be used by PLDM for correlation. |
Example:
{
"Name": "HGX_NVSwitch_$INSTANCE_NUMBER_Association",
"Type": "NsmDeviceAssociation",
"UUID": "$UUID"
}
| Configuration Property | type | Description |
|---|---|---|
| Type | string | SensorAuxName |
| Name | string | Name for EM dbus object |
| SensorId | int | Sensor Id in PLDM for which auxillary name is provided. |
| AuxNames | strings | Auxillary name to used on dbus object for Sensor Id in PLDM. |
Example:
{
"Name": "HGX_NVSwitch_$INSTANCE_NUMBER_AUX",
"Type": "SensorAuxName",
"SensorId": 10,
"AuxNames": [
"HGX_NVSwitch_$INSTANCE_NUMBER"
]
}
| Configuration Property | type | Description |
|---|---|---|
| Type | string | SensorPortInfo |
| Name | string | Name for EM dbus object |
| SensorId | int | Sensor Id in PLDM for which auxillary name is provided. |
| PortType | string | Indicating the type of port, value must be from enum in PDI “xyz.openbmc_project.Inventory.Decorator.PortInfo.PortType” |
| MaxSpeedMBps | int | Max speed in MBps for the particular port. |
| Association | strings | Association with the NSM port object, array of string in format ‘forward’, ‘reverse’ and ‘association_path’. |
Example:
{
"Name": "NVSwitch_$INSTANCE_NUMBER_Port_0_Info",
"Type": "SensorPortInfo",
"SensorId": 5500,
"PortType": "xyz.openbmc_project.Inventory.Decorator.PortInfo.PortType.BidirectionalPort",
"MaxSpeedMBps": 50000,
"Association": [
"associated_port",
"associated_port",
"/xyz/openbmc_project/inventory/system/fabrics/HGX_NVLinkFabric_0/Switches/NVSwitch_$INSTANCE_NUMBER/Ports/NVLink_0"
]
}
For SensorAuxName and SensorPortInfo, there is a simple python script which will generate the json based on a excel sheet. This helps in avoiding writting the json for so many sensorID in PLDM. Excel sheet contails a table [column A:D] with below fields:
[NOTE: - DeviceType is all-caps and possible values are “SWITCH” and “PCIE_BRIDGE”, since PLDM is only supported on these 2 devices. - After we have generated json, copy the config to hgxb_cx_chassis.json and hgxb_nvlink_chassis.json for NVSwicth and NIC manually]
For PLDM device association to work, ensure below points in regards to EM dbus object:
Example:
[
{
"Exposes": [
{
"Name": "HGX_NVLinkManagementNIC_0",
"Type": "NSM_NVLinkMgmtNic_Chassis",
"UUID": "$UUID",
"Asset": {
"Type": "NSM_Asset",
"Manufacturer": "NVIDIA",
"Model": "$MARKETING_NAME",
"SKU": "SKU_000123",
"SerialNumber": "$SERIAL_NUMBER",
"PartNumber": "$BOARD_PART_NUMBER"
},
"Location": {
"Type": "NSM_Location",
"LocationType": "xyz.openbmc_project.Inventory.Decorator.Location.LocationTypes.Embedded"
},
"Chassis": {
"Type": "NSM_Chassis",
"ChassisType": "xyz.openbmc_project.Inventory.Item.Chassis.ChassisType.Component"
},
"Health": {
"Type": "NSM_Health",
"Health": "xyz.openbmc_project.State.Decorator.Health.HealthType.OK"
}
},
{
"ChassisName": "HGX_NVLinkManagementNIC_0",
"Name": "Assembly1",
"Type": "NSM_NVLinkMgmtNic_ChassisAssembly",
"UUID": "$UUID",
"Asset": {
"Type": "NSM_Asset",
"Name": "NVLinkManagementNIC Board Assembly",
"Model": "$MARKETING_NAME",
"Vendor": "NVIDIA",
"SKU": "SKU_000123",
"SerialNumber": "$SERIAL_NUMBER",
"PartNumber": "$BOARD_PART_NUMBER",
"ProductionDate": "$BUILD_DATE"
},
"Health": {
"Type": "NSM_Health",
"Health": "xyz.openbmc_project.State.Decorator.Health.HealthType.OK"
},
"Location": {
"Type": "NSM_Location",
"LocationType": "xyz.openbmc_project.Inventory.Decorator.Location.LocationTypes.Embedded"
}
},
{
"Name": "HGX_NVLinkManagementNIC_0_Association",
"Type": "NsmDeviceAssociation",
"UUID": "$UUID"
},
{
"Name": "HGX_NVLinkManagementNIC_0_AUX",
"Type": "SensorAuxName",
"SensorId": 5,
"AuxNames": [
"HGX_NVLinkManagementNIC_0"
]
},
{
"Name": "NVLinkManagementNIC_0_AUX",
"Type": "SensorAuxName",
"SensorId": 60,
"AuxNames": [
"NVLinkManagementNIC_0"
]
}
],
"Name": "HGX_NVLinkManagementNIC_0",
"Type": "chassis",
"Parent_Chassis": "/xyz/openbmc_project/inventory/system/chassis/HGX_Chassis_0",
"Probe": "xyz.openbmc_project.FruDevice({'DEVICE_TYPE': 2})",
"xyz.openbmc_project.Inventory.Decorator.Location": {
"LocationType": "xyz.openbmc_project.Inventory.Decorator.Location.LocationTypes.Embedded"
},
"xyz.openbmc_project.State.Decorator.Health": {
"Health": "xyz.openbmc_project.State.Decorator.Health.HealthType.OK"
},
"xyz.openbmc_project.Inventory.Item.Board": {},
"xyz.openbmc_project.Inventory.Decorator.Instance": {
"InstanceNumber": 1
}
}
]
Format: python sensorId_association_generator.py <input_mapping_file> <output_json_file>
python3 sensorId_association_generator.py HGXB_PLDM_sensorID_mapping.xlsx hgxb_pldmd_sensorID_association.json