diff --git a/internal/cmp/cloud_folder.go b/internal/cmp/cloud_folder.go index 4eda05a3..3a16591b 100644 --- a/internal/cmp/cloud_folder.go +++ b/internal/cmp/cloud_folder.go @@ -1,4 +1,4 @@ -// (C) Copyright 2021 Hewlett Packard Enterprise Development LP +// (C) Copyright 2021-2024 Hewlett Packard Enterprise Development LP package cmp @@ -31,7 +31,8 @@ func (f *cloudFolder) Read(ctx context.Context, d *utils.Data, meta interface{}) if err := d.Error(); err != nil { return err } - folders, err := f.fClient.GetAllCloudFolders(ctx, cloudID, nil) + param := map[string]string{maxKey: "2000"} // There could be many folders, and max=-1 doesn't return any data + folders, err := f.fClient.GetAllCloudFolders(ctx, cloudID, param) if err != nil { return err } diff --git a/internal/cmp/group.go b/internal/cmp/group.go index a7da18cf..81ff882c 100644 --- a/internal/cmp/group.go +++ b/internal/cmp/group.go @@ -1,4 +1,4 @@ -// (C) Copyright 2021 Hewlett Packard Enterprise Development LP +// (C) Copyright 2021-2024 Hewlett Packard Enterprise Development LP package cmp @@ -30,7 +30,8 @@ func (g *group) Read(ctx context.Context, d *utils.Data, meta interface{}) error if err := d.Error(); err != nil { return err } - groups, err := g.gClient.GetAllGroups(ctx, nil) + param := map[string]string{maxKey: "-1"} + groups, err := g.gClient.GetAllGroups(ctx, param) if err != nil { return err } diff --git a/internal/cmp/network.go b/internal/cmp/network.go index 65b2a2bd..2ca09066 100644 --- a/internal/cmp/network.go +++ b/internal/cmp/network.go @@ -1,4 +1,4 @@ -// (C) Copyright 2021 Hewlett Packard Enterprise Development LP +// (C) Copyright 2021-2024 Hewlett Packard Enterprise Development LP package cmp @@ -28,7 +28,8 @@ func (n *network) Read(ctx context.Context, d *utils.Data, meta interface{}) err if err := d.Error(); err != nil { return err } - networks, err := n.nClient.GetAllNetworks(ctx, nil) + param := map[string]string{maxKey: "-1"} + networks, err := n.nClient.GetAllNetworks(ctx, param) if err != nil { return err } diff --git a/internal/cmp/resourcePool.go b/internal/cmp/resourcePool.go index e2a3ec6e..c35e2a3c 100644 --- a/internal/cmp/resourcePool.go +++ b/internal/cmp/resourcePool.go @@ -1,4 +1,4 @@ -// (C) Copyright 2021 Hewlett Packard Enterprise Development LP +// (C) Copyright 2021-2024 Hewlett Packard Enterprise Development LP package cmp @@ -32,7 +32,7 @@ func (n *resourcePool) Read(ctx context.Context, d *utils.Data, meta interface{} flag := false resourcePools, err := n.rClient.GetAllCloudResourcePools(ctx, cloudID, map[string]string{ - maxKey: "100", + maxKey: "-1", }) if err != nil { return err diff --git a/internal/cmp/router_datasource.go b/internal/cmp/router_datasource.go index 84b1c724..d6ee61c3 100644 --- a/internal/cmp/router_datasource.go +++ b/internal/cmp/router_datasource.go @@ -1,4 +1,4 @@ -// (C) Copyright 2021 Hewlett Packard Enterprise Development LP +// (C) Copyright 2021-2024 Hewlett Packard Enterprise Development LP package cmp @@ -29,7 +29,8 @@ func (n *routerds) Read(ctx context.Context, d *utils.Data, meta interface{}) er if err := d.Error(); err != nil { return err } - routers, err := n.nClient.GetAllRouter(ctx, nil) + param := map[string]string{maxKey: "-1"} + routers, err := n.nClient.GetAllRouter(ctx, param) if err != nil { return err }