Skip to content

Commit

Permalink
Merge pull request #1150 from ioito/automated-cherry-pick-of-#1149-up…
Browse files Browse the repository at this point in the history
…stream-release-3.11

Automated cherry pick of #1149: fix(volc): volcengine account id
  • Loading branch information
ioito authored Dec 29, 2024
2 parents 764466e + e1e6383 commit abfa6b1
Showing 1 changed file with 2 additions and 7 deletions.
9 changes: 2 additions & 7 deletions pkg/multicloud/volcengine/volcengine.go
Original file line number Diff line number Diff line change
Expand Up @@ -180,16 +180,11 @@ func (client *SVolcEngineClient) GetAccountId() string {
if len(client.ownerId) > 0 {
return client.ownerId
}

toscli, err := client.getTosClient(VOLCENGINE_DEFAULT_REGION)
if err != nil {
return ""
}
out, err := toscli.ListBuckets(context.Background(), &tos.ListBucketsInput{})
balance, err := client.QueryBalance()
if err != nil {
return ""
}
client.ownerId = out.Owner.ID
client.ownerId = balance.AccountId
return client.ownerId
}

Expand Down

0 comments on commit abfa6b1

Please sign in to comment.