bmcweb: Fix PartLocationContext for Chassis

I wrongly assumed that an object cannot have both chassis interface
and connector interface which warthog object does. So
PartLocationContext was being derived twice. In this changeset i am
making sure that /containedby association is explored only when chassis
interface is detected after exploring all interfaces including connector

Tested:
```
root@jkeju13-nfd01:~# wget -qO- localhost:80/redfish/v1/Chassis/warthog_1
{
  "@odata.id": "/redfish/v1/Chassis/warthog_1",
  "@odata.type": "#Chassis.v1_17_0.Chassis",
  "Assembly": {
    "@odata.id": "/redfish/v1/Chassis/warthog_1/Assembly"
  },
  "ChassisType": "RackMount",
  "Drives": {
    "@odata.id": "/redfish/v1/Chassis/warthog_1/Drives"
  },
  "EnvironmentMetrics": {
    "@odata.id": "/redfish/v1/Chassis/warthog_1/EnvironmentMetrics"
  },
  "Id": "warthog_1",
  "Links": {
    "ComputerSystems": [
      {
        "@odata.id": "/redfish/v1/Systems/system"
      }
    ],
    "ContainedBy": {
      "@odata.id": "/redfish/v1/Chassis/ioadapter_x8x8_1"
    },
    "ManagedBy": [
      {
        "@odata.id": "/redfish/v1/Managers/bmc"
      }
    ],
    "Storage": [
      {
        "@odata.id": "/redfish/v1/Systems/system/Storage/warthog_storage_1"
      }
    ],
    "Storage@odata.count": 1
  },
  "Location": {
    "PartLocation": {
      "LocationType": "Slot",
      "ServiceLabel": "IO0"
    },
    "PartLocationContext": "PE2"
  },
  "Manufacturer": "Kingston",
  "Model": "Warthog",
  "Name": "warthog_1",
  "PCIeDevices": {
    "@odata.id": "/redfish/v1/Systems/system/PCIeDevices"
  },
  "PartNumber": "KW049419-67901",
  "Power": {
    "@odata.id": "/redfish/v1/Chassis/warthog_1/Power"
  },
  "PowerState": "On",
  "PowerSubsystem": {
    "@odata.id": "/redfish/v1/Chassis/warthog_1/PowerSubsystem"
  },
  "Sensors": {
    "@odata.id": "/redfish/v1/Chassis/warthog_1/Sensors"
  },
  "SerialNumber": "20819562",
  "Status": {
    "Health": "OK",
    "HealthRollup": "OK",
    "State": "Enabled"
  },
  "Thermal": {
    "@odata.id": "/redfish/v1/Chassis/warthog_1/Thermal"
  },
  "ThermalSubsystem": {
    "@odata.id": "/redfish/v1/Chassis/warthog_1/ThermalSubsystem"
  }
}
```

Google-Bug-Id: 283353012
Change-Id: I5b41e172cdbb793ba8e2c5d354037485f4c1b1b4
Signed-off-by: Rahul Kapoor <rahulkpr@google.com>
3 files changed
tree: f2e2081b879be3e3b4fa7dc486d686bbafd506e0
  1. conf/
  2. dynamic-layers/
  3. meta-nuvoton-npcm8xx/
  4. recipes-bsp/
  5. recipes-connectivity/
  6. recipes-core/
  7. recipes-devtools/
  8. recipes-extended/
  9. recipes-google/
  10. recipes-kernel/
  11. recipes-phosphor/
  12. LICENSE
  13. README.md
README.md

meta-gbmc-staging

This repository contains additions to the openbmc/meta-google layer that are not yet ready for OpenBMC inclusion.

How to use this layer

  1. Clone openbmc/openbmc from GitHub.
  2. Clone this layer from GitHub into a subdirectory of openbmc.