Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Build links between the ComputerSystem and Manager Redfish resources #72

Merged
merged 2 commits into from
Mar 5, 2025

Conversation

starbops
Copy link
Owner

@starbops starbops commented Mar 5, 2025

Now that a ComputerSystem resource is ManagedBy a Manager resource:

$ curl -sSfL -H "X-Auth-Token: d40314aa8ef6bf03daebe42166470f9047fbefd6a958cb035ae70a630382d489" http://127.0.0.1:55247/redfish/v1/Systems/1 | jq .
{
  "@odata.context": "/redfish/v1/$metadata#ComputerSystem.ComputerSystem",
  "@odata.id": "/redfish/v1/Systems/1",
  "@odata.type": "#ComputerSystem.v1_22_0.ComputerSystem",
  "Actions": {
    "#ComputerSystem.AddResourceBlock": {},
    "#ComputerSystem.Decommission": {},
    "#ComputerSystem.RemoveResourceBlock": {},
    "#ComputerSystem.Reset": {
      "target": "/redfish/v1/Systems/1/Actions/ComputerSystem.Reset",
      "title": "Reset"
    },
    "#ComputerSystem.SetDefaultBootOrder": {}
  },
  "AssetTag": "",
  "Bios": {},
  "Boot": {
    "BootOptions": {},
    "BootSourceOverrideEnabled": "Disabled",
    "BootSourceOverrideMode": "Legacy",
    "BootSourceOverrideTarget": "Hdd",
    "Certificates": {}
  },
  "BootProgress": {},
  "Certificates": {},
  "Composition": {},
  "Description": "Computer System",
  "EthernetInterfaces": {},
  "FabricAdapters": {},
  "GraphicalConsole": {},
  "GraphicsControllers": {},
  "HostWatchdogTimer": {
    "FunctionEnabled": false,
    "Status": {},
    "TimeoutAction": ""
  },
  "HostedServices": {
    "StorageServices": {}
  },
  "Id": "1",
  "IdlePowerSaver": {},
  "IndicatorLED": "Unknown",
  "KeyManagement": {
    "KMIPCertificates": {}
  },
  "LastResetTime": "0001-01-01T00:00:00Z",
  "Links": {
    "HostingComputerSystem": {},
    "ManagedBy": [
      {
        "@odata.id": "/redfish/v1/Managers/BMC"
      }
    ]
  },
  "LogServices": {},
  "Manufacturer": "KubeVirt",
  "Memory": {},
  "MemoryDomains": {},
  "MemorySummary": {
    "Metrics": {},
    "Status": {},
    "TotalSystemMemoryGiB": 0
  },
  "Model": "KubeVirt",
  "Name": "default/test-vm",
  "NetworkInterfaces": {
    "@odata.id": "/redfish/v1/Systems/1/NetworkInterfaces"
  },
  "OperatingSystem": "/redfish/v1/Systems/1/OperatingSystem",
  "PartNumber": "",
  "PowerState": "On",
  "ProcessorSummary": {
    "Count": 0,
    "Metrics": {},
    "Status": {}
  },
  "Processors": {},
  "SKU": "",
  "SecureBoot": {},
  "SerialConsole": {
    "IPMI": {},
    "SSH": {},
    "Telnet": {}
  },
  "SerialNumber": "000000000000",
  "SimpleStorage": {
    "@odata.id": "/redfish/v1/Systems/1/SimpleStorage"
  },
  "Status": {},
  "Storage": {
    "@odata.id": "/redfish/v1/Systems/1/Storage"
  },
  "SystemType": "Virtual",
  "USBControllers": {},
  "UUID": "00000000-0000-0000-0000-000000000000",
  "VirtualMedia": {
    "@odata.id": "/redfish/v1/Systems/1/VirtualMedia"
  },
  "VirtualMediaConfig": {}
}

A Manager resource Manages a ComputerSystem resource:

$ curl -sSfL -H "X-Auth-Token: d40314aa8ef6bf03daebe42166470f9047fbefd6a958cb035ae70a6
30382d489" http://127.0.0.1:55247/redfish/v1/Managers/BMC | jq .
{
  "@odata.context": "/redfish/v1/$metadata#Manager.Manager",
  "@odata.id": "/redfish/v1/Managers/BMC",
  "@odata.type": "#Manager.v1_19_2.Manager",
  "Actions": {
    "#Manager.ForceFailover": {},
    "#Manager.ModifyRedundancySet": {},
    "#Manager.Reset": {},
    "#Manager.ResetToDefaults": {}
  },
  "AdditionalFirmwareVersions": {},
  "Certificates": {},
  "CommandShell": {},
  "DateTime": "2025-03-05T15:11:09.401107411Z",
  "DaylightSavingTime": {
    "EndDateTime": "0001-01-01T00:00:00Z",
    "StartDateTime": "0001-01-01T00:00:00Z"
  },
  "DedicatedNetworkPorts": {},
  "Description": "Manager",
  "EthernetInterfaces": {
    "@odata.id": "/redfish/v1/Managers/BMC/EthernetInterfaces"
  },
  "GraphicalConsole": {},
  "HostInterfaces": {},
  "Id": "BMC",
  "LastResetTime": "0001-01-01T00:00:00Z",
  "Links": {
    "ActiveSoftwareImage": {},
    "ManagerForServers": [
      {
        "@odata.id": "/redfish/v1/Systems/1"
      }
    ],
    "ManagerInChassis": {},
    "SelectedNetworkPort": {}
  },
  "Location": {
    "PartLocation": {},
    "PhysicalAddress": {},
    "Placement": {},
    "PostalAddress": {}
  },
  "LogServices": {
    "@odata.id": "/redfish/v1/Managers/BMC/LogServices"
  },
  "ManagerDiagnosticData": {},
  "ManagerType": "BMC",
  "Model": "KubeVirtBMC",
  "Name": "Manager",
  "NetworkProtocol": {},
  "RemoteAccountService": {},
  "SecurityPolicy": {},
  "SerialConsole": {},
  "SerialInterfaces": {
    "@odata.id": "/redfish/v1/Managers/BMC/SerialInterfaces"
  },
  "SharedNetworkPorts": {},
  "Status": {},
  "USBPorts": {},
  "UUID": "00000000-0000-0000-0000-000000000000",
  "VirtualMedia": {
    "@odata.id": "/redfish/v1/Managers/BMC/VirtualMedia"
  }
}

Related issue: #70

@starbops
Copy link
Owner Author

starbops commented Mar 5, 2025

Running again the Redfish interop validator:

  • /redfish/v1/Systems/1
    image
  • /redfish/v1/Managers/BMC
    image

Though many red herrings exist, at least we've solved the urgent need.

@starbops starbops merged commit e735b77 into main Mar 5, 2025
3 checks passed
@starbops starbops deleted the fix-70 branch March 5, 2025 15:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant