Skip to content

Commit

Permalink
[VPC] getPublicIpIdNameMapping use wrong vpcClient.ResourceBase (#57)
Browse files Browse the repository at this point in the history
* instead of overwriting the vpcClient endpoint only the vpcClient resource base will be appended by the project id
  • Loading branch information
ckroehnert authored Oct 17, 2024
1 parent 273e9d8 commit 74859b6
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions internal/otc_wrapper.go
Original file line number Diff line number Diff line change
Expand Up @@ -293,8 +293,7 @@ func getBandwidthIdNameMapping(vpcClient *golangsdk.ServiceClient) (map[string]s
}

func getPublicIpIdNameMapping(vpcClient *golangsdk.ServiceClient, projectId string) (map[string]string, error) {
vpcClient.Endpoint = vpcClient.Endpoint + projectId + "/"
vpcClient.ResourceBase = vpcClient.Endpoint
vpcClient.ResourceBase = vpcClient.ResourceBase + projectId + "/"
vpcPageResponse := vpcPublicIps.List(vpcClient, vpcPublicIps.ListOpts{})
allPages, err := vpcPageResponse.AllPages()
if err != nil {
Expand Down

0 comments on commit 74859b6

Please sign in to comment.