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

Ports gets the instances managed by the Processor #391

Merged
merged 1 commit into from
Dec 12, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions redfish/processor.go
Original file line number Diff line number Diff line change
Expand Up @@ -471,7 +471,7 @@ type Processor struct {
// Ports shall contain a link to a resource collection of type PortCollection. It shall contain the interconnect
// and fabric ports of this processor. It shall not contain ports for GraphicsController resources, USBController
// resources, or other local adapter-related types of resources.
ports []string
ports string
// PowerState shall contain the power state of the processor. If the PowerState property in the associated Chassis
// resource contains the value 'Off', this property shall contain 'Off'.
PowerState PowerState
Expand Down Expand Up @@ -611,7 +611,7 @@ func (processor *Processor) UnmarshalJSON(b []byte) error {
EnvironmentMetrics common.Link
Metrics common.Link
OperatingConfigs common.LinksCollection
Ports common.LinksCollection
Ports common.Link
SubProcessors common.LinksCollection
ProcessorMemory common.Links
Links processorLinks
Expand Down Expand Up @@ -662,7 +662,7 @@ func (processor *Processor) UnmarshalJSON(b []byte) error {
processor.environmentMetrics = t.EnvironmentMetrics.String()
processor.metrics = t.Metrics.String()
processor.operatingConfigs = t.OperatingConfigs.ToStrings()
processor.ports = t.Ports.ToStrings()
processor.ports = t.Ports.String()
processor.subProcessors = t.SubProcessors.ToStrings()

processor.chassis = t.Links.Chassis.String()
Expand Down Expand Up @@ -778,7 +778,7 @@ func (processor *Processor) OperatingConfigs() ([]*OperatingConfig, error) {
// contain ports for GraphicsController resources, USBController resources, or
// other local adapter-related types of resources.
func (processor *Processor) Ports() ([]*Port, error) {
return common.GetObjects[Port](processor.GetClient(), processor.ports)
return ListReferencedPorts(processor.GetClient(), processor.ports)
}

// SubProcessors gets the sub-processors associated with this processor, such as
Expand Down
Loading