From df6ead3cec55c2da9816531e9a113064fce3b564 Mon Sep 17 00:00:00 2001 From: ismirlia <90468712+ismirlia@users.noreply.github.com> Date: Thu, 21 Nov 2024 15:38:18 -0600 Subject: [PATCH] Add host reference host get and host list (#509) --- clients/instance/ibm-pi-host-groups.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/clients/instance/ibm-pi-host-groups.go b/clients/instance/ibm-pi-host-groups.go index 4c6c2474..0fb69f27 100644 --- a/clients/instance/ibm-pi-host-groups.go +++ b/clients/instance/ibm-pi-host-groups.go @@ -112,7 +112,9 @@ func (f *IBMPIHostGroupsClient) GetHosts() (models.HostList, error) { if f.session.IsOnPrem() { return nil, fmt.Errorf("operation not supported in satellite location, check documentation") } + hostReference := true params := host_groups.NewV1HostsGetParams().WithContext(f.ctx).WithTimeout(helpers.PIGetTimeOut) + params.HostReference = &hostReference resp, err := f.session.Power.HostGroups.V1HostsGet(params, f.session.AuthInfo(f.cloudInstanceID)) if err != nil { return nil, ibmpisession.SDKFailWithAPIError(err, fmt.Errorf("failed to get hosts for %s: %w", f.cloudInstanceID, err)) @@ -146,7 +148,9 @@ func (f *IBMPIHostGroupsClient) GetHost(id string) (*models.Host, error) { if f.session.IsOnPrem() { return nil, fmt.Errorf("operation not supported in satellite location, check documentation") } + hostReference := true params := host_groups.NewV1HostsIDGetParams().WithContext(f.ctx).WithTimeout(helpers.PIGetTimeOut).WithHostID(id) + params.HostReference = &hostReference resp, err := f.session.Power.HostGroups.V1HostsIDGet(params, f.session.AuthInfo(f.cloudInstanceID)) if err != nil { return nil, ibmpisession.SDKFailWithAPIError(err, fmt.Errorf("failed to get host %s for %s: %w", id, f.cloudInstanceID, err))