Skip to content

Commit

Permalink
fixed errors
Browse files Browse the repository at this point in the history
  • Loading branch information
akshay-sripriya committed Oct 22, 2024
1 parent c662157 commit 820eef3
Show file tree
Hide file tree
Showing 6 changed files with 8 additions and 7 deletions.
2 changes: 1 addition & 1 deletion powerscale/helper/network_pool_helper.go
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ func GetNetworkPools(ctx context.Context, client *client.Client, state models.Ne

networkPools, _, err := networkPoolParams.Execute()

for *networkPools.Resume != "" {
for networkPools.Resume != nil {
respAdd, _, errAdd := client.PscaleOpenAPIClient.NetworkApi.GetNetworkv12NetworkPools(context.Background()).Resume(*networkPools.Resume).Execute()
if errAdd != nil {
return networkPools, errAdd
Expand Down
2 changes: 1 addition & 1 deletion powerscale/helper/network_rule_helper.go
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ func ListNetworkRules(ctx context.Context, client *client.Client, filter *models
return nil, err
}

for *ruleList.Resume != "" {
for ruleList.Resume != nil {
respAdd, _, errAdd := client.PscaleOpenAPIClient.NetworkApi.GetNetworkv3NetworkRules(context.Background()).Resume(*ruleList.Resume).Execute()
if errAdd != nil {
return nil, errAdd
Expand Down
2 changes: 1 addition & 1 deletion powerscale/helper/ntp_server_helper.go
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ func GetNtpServers(ctx context.Context, client *client.Client) (*powerscale.V3Nt
ntpServerParams := client.PscaleOpenAPIClient.ProtocolsApi.ListProtocolsv3NtpServers(ctx)
ntpServers, _, err := ntpServerParams.Execute()

for *ntpServers.Resume != "" {
for ntpServers.Resume != nil {
respAdd, _, errAdd := client.PscaleOpenAPIClient.ProtocolsApi.ListProtocolsv3NtpServers(context.Background()).Resume(*ntpServers.Resume).Execute()
if errAdd != nil {
return ntpServers, errAdd
Expand Down
5 changes: 3 additions & 2 deletions powerscale/helper/quota_helper.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,11 @@ import (
"context"
powerscale "dell/powerscale-go-client"
"fmt"
"github.com/hashicorp/terraform-plugin-framework/diag"
"github.com/hashicorp/terraform-plugin-framework/types"
"terraform-provider-powerscale/client"
"terraform-provider-powerscale/powerscale/models"

"github.com/hashicorp/terraform-plugin-framework/diag"
"github.com/hashicorp/terraform-plugin-framework/types"
)

// CreateQuota creates quota.
Expand Down
2 changes: 1 addition & 1 deletion powerscale/helper/role_helper.go
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ func GetRoles(ctx context.Context, client *client.Client, state models.RoleDataS

roles, _, err := roleParams.Execute()

for *roles.Resume != "" {
for roles.Resume != nil {
respAdd, _, errAdd := client.PscaleOpenAPIClient.AuthApi.ListAuthv14AuthRoles(context.Background()).Resume(*roles.Resume).Execute()
if errAdd != nil {
return roles, errAdd
Expand Down
2 changes: 1 addition & 1 deletion powerscale/helper/snapshot_helper.go
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ import (
// GetAllSnapshots returns the full list of snapshots.
func GetAllSnapshots(ctx context.Context, client *client.Client) ([]powerscale.V1SnapshotSnapshotExtended, error) {
result, _, err := client.PscaleOpenAPIClient.SnapshotApi.ListSnapshotv1SnapshotSnapshots(ctx).Execute()
for *result.Resume != "" {
for result.Resume != nil {
respAdd, _, errAdd := client.PscaleOpenAPIClient.SnapshotApi.ListSnapshotv1SnapshotSnapshots(context.Background()).Resume(*result.Resume).Execute()
if errAdd != nil {
return result.Snapshots, errAdd
Expand Down

0 comments on commit 820eef3

Please sign in to comment.