Skip to content

Service Validator does not flag links to non-subordinate resource outside 'Links' object. #663

@pointbazaar

Description

@pointbazaar

Hi i have a question / issue w.r.t. reference properties

3.3.16 subordinate resource
is subordinate to another resource if the initial segment of the resource URI is the same as the URI of the other
resource, but is at least one level deeper
Note 1 to entry: For example, /redfish/v1/Chassis/A88/Assembly is a subordinate resource of the Chassis resource
named A88 .

...

9.5.7 Reference properties
Reference properties provide a reference to another resource in the data model. Reference properties are JSON
objects that contain an @odata.id property. The @odata.id property value is the URI of the referenced resource.

...

9.6.13 Links
The Links property represents the hyperlinks associated with the resource, as defined by that resource's schema
definition. All associated reference properties defined for a resource shall be nested under the links property. All
directly (subordinate) referenced properties defined for a resource shall be in the root of the resource. There are
some exceptions to these rules, such as where ease of expansion or deep operations is beneficial to the user.

In my example i put the following in a response for a ComputerSystem resource GET

res.jsonValue["LogServices"]["@odata.id"] = "/redfish/v1/Managers/bmc/LogServices"
curl --insecure --user root:**** https://${bmc}/redfish/v1/Systems/Tyan_S8030_Baseboard
{
  "@odata.id": "/redfish/v1/Systems/Tyan_S8030_Baseboard",
  "@odata.type": "#ComputerSystem.v1_22_0.ComputerSystem",
  "Actions": {
    "#ComputerSystem.Reset": {
      "@Redfish.ActionInfo": "/redfish/v1/Systems/Tyan_S8030_Baseboard/ResetActionInfo",
      "target": "/redfish/v1/Systems/Tyan_S8030_Baseboard/Actions/ComputerSystem.Reset"
    }
  },
  "Boot": {
    "AutomaticRetryConfig": "RetryAttempts",
    "AutomaticRetryConfig@Redfish.AllowableValues": [
      "Disabled",
      "RetryAttempts"
    ],
    "BootSourceOverrideEnabled": "Disabled",
    "BootSourceOverrideMode": "UEFI",
    "BootSourceOverrideMode@Redfish.AllowableValues": [
      "Legacy",
      "UEFI"
    ],
    "BootSourceOverrideTarget": "None",
    "BootSourceOverrideTarget@Redfish.AllowableValues": [
      "None",
      "Pxe",
      "Hdd",
      "Cd",
      "Diags",
      "BiosSetup",
      "Usb"
    ],
    "StopBootOnFault": "Never",
    "TrustedModuleRequiredToBoot": "Disabled"
  },
  "Description": "Computer System",
  "GraphicalConsole": {
    "ConnectTypesSupported": [
      "KVMIP"
    ],
    "MaxConcurrentSessions": 4,
    "ServiceEnabled": true
  },
  "HostWatchdogTimer": {
    "FunctionEnabled": false,
    "Status": {
      "State": "Enabled"
    },
    "TimeoutAction": "PowerCycle"
  },
  "Id": "Tyan_S8030_Baseboard",
  "LastResetTime": "2026-01-26T02:23:22+00:00",
  "Links": {
    "ManagedBy": [
      {
        "@odata.id": "/redfish/v1/Managers/bmc"
      }
    ]
  },
  "LocationIndicatorActive": false,
  "LogServices": {
    "@odata.id": "/redfish/v1/Managers/bmc/LogServices"
  },
  "MemorySummary": {
    "TotalSystemMemoryGiB": 0.0
  },
  "Name": "Tyan_S8030_Baseboard",
  "PowerRestorePolicy": "AlwaysOff",
  "PowerState": "Off",
  "ProcessorSummary": {
    "Count": 0
  },
  "SerialConsole": {
    "IPMI": {
      "ServiceEnabled": true
    },
    "MaxConcurrentSessions": 15,
    "SSH": {
      "HotKeySequenceDisplay": "Press ~. to exit console",
      "Port": 2200,
      "ServiceEnabled": true
    }
  },
  "Status": {
    "Health": "OK",
    "State": "Disabled"
  },
  "SystemType": "Physical"
}

where /redfish/v1/Managers/bmc/LogServices is not a subordinate resource.

One interpretation of 9.6.13 Links would suggest that it is not allowed since

  "LogServices": {
    "@odata.id": "/redfish/v1/Managers/bmc/LogServices"
  },

is not under Links and can only reference subordinate resources.

In my experience the Service Validator did not check for this.

I am asking if my interpretation here is correct and if the validator should be patched to catch errors like that.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions