Skip to content

Commit 0878093

Browse files
authored
fix: List all hosts without using broken prism-go-client method (#577) (#579)
The method will be fixed in prism-go-client, but we can avoid using it for now.
1 parent 4666ada commit 0878093

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

controllers/helpers.go

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -719,7 +719,9 @@ func GetGPU(ctx context.Context, client *prismclientv3.Client, peUUID string, gp
719719

720720
func GetGPUsForPE(ctx context.Context, client *prismclientv3.Client, peUUID string) ([]*prismclientv3.GPU, error) {
721721
gpus := make([]*prismclientv3.GPU, 0)
722-
hosts, err := client.V3.ListAllHost(ctx)
722+
// We use ListHost, because it returns all hosts, since the endpoint does not support pagination,
723+
// and ListAllHost incorrectly handles pagination. https://jira.nutanix.com/browse/NCN-110045
724+
hosts, err := client.V3.ListHost(ctx, &prismclientv3.DSMetadata{})
723725
if err != nil {
724726
return gpus, err
725727
}

0 commit comments

Comments
 (0)