mirror of
https://github.com/yunionio/cloudpods.git
synced 2026-09-24 16:03:43 +08:00
fix huawei client package name error
This commit is contained in:
@@ -0,0 +1 @@
|
||||
package credentials // import "yunion.io/x/onecloud/pkg/util/huawei/client/auth/credentials"
|
||||
@@ -0,0 +1 @@
|
||||
package auth // import "yunion.io/x/onecloud/pkg/util/huawei/client/auth"
|
||||
@@ -0,0 +1 @@
|
||||
package signers // import "yunion.io/x/onecloud/pkg/util/huawei/client/auth/signers"
|
||||
@@ -1,4 +1,4 @@
|
||||
package clients
|
||||
package client
|
||||
|
||||
import (
|
||||
"yunion.io/x/onecloud/pkg/util/huawei/client/auth"
|
||||
@@ -1,4 +1,4 @@
|
||||
package clients
|
||||
package client
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
@@ -0,0 +1 @@
|
||||
package client // import "yunion.io/x/onecloud/pkg/util/huawei/client"
|
||||
@@ -0,0 +1 @@
|
||||
package manager // import "yunion.io/x/onecloud/pkg/util/huawei/client/manager"
|
||||
@@ -0,0 +1 @@
|
||||
package modules // import "yunion.io/x/onecloud/pkg/util/huawei/client/modules"
|
||||
@@ -0,0 +1 @@
|
||||
package requests // import "yunion.io/x/onecloud/pkg/util/huawei/client/requests"
|
||||
@@ -0,0 +1 @@
|
||||
package responses // import "yunion.io/x/onecloud/pkg/util/huawei/client/responses"
|
||||
@@ -0,0 +1 @@
|
||||
package huawei // import "yunion.io/x/onecloud/pkg/util/huawei"
|
||||
@@ -77,7 +77,7 @@ func NewHuaweiClient(providerId, providerName, accessurl, account, secret string
|
||||
}
|
||||
|
||||
func (self *SHuaweiClient) fetchRegions() error {
|
||||
huawei, _ := clients.NewClientWithAccessKey("", "", self.accessKey, self.secret)
|
||||
huawei, _ := client.NewClientWithAccessKey("", "", self.accessKey, self.secret)
|
||||
regions := make([]SRegion, 0)
|
||||
err := DoList(huawei.Regions.List, nil, ®ions)
|
||||
if err != nil {
|
||||
|
||||
@@ -34,7 +34,7 @@ func (self *SProject) GetHealthStatus() string {
|
||||
}
|
||||
|
||||
func (self *SHuaweiClient) fetchProjects() ([]SProject, error) {
|
||||
huawei, _ := clients.NewClientWithAccessKey("", "", self.accessKey, self.secret)
|
||||
huawei, _ := client.NewClientWithAccessKey("", "", self.accessKey, self.secret)
|
||||
projects := make([]SProject, 0)
|
||||
err := DoList(huawei.Projects.List, nil, &projects)
|
||||
return projects, err
|
||||
|
||||
@@ -0,0 +1 @@
|
||||
package provider // import "yunion.io/x/onecloud/pkg/util/huawei/provider"
|
||||
@@ -21,7 +21,7 @@ type Locales struct {
|
||||
// https://support.huaweicloud.com/api-iam/zh-cn_topic_0067148043.html
|
||||
type SRegion struct {
|
||||
client *SHuaweiClient
|
||||
ecsClient *clients.Client
|
||||
ecsClient *client.Client
|
||||
|
||||
Description string `json:"description"`
|
||||
ID string `json:"id"`
|
||||
@@ -35,7 +35,7 @@ type SRegion struct {
|
||||
storageCache *SStoragecache
|
||||
}
|
||||
|
||||
func (self *SRegion) getECSClient() (*clients.Client, error) {
|
||||
func (self *SRegion) getECSClient() (*client.Client, error) {
|
||||
var err error
|
||||
|
||||
if len(self.client.projectId) > 0 {
|
||||
@@ -52,7 +52,7 @@ func (self *SRegion) getECSClient() (*clients.Client, error) {
|
||||
}
|
||||
|
||||
if self.ecsClient == nil {
|
||||
self.ecsClient, err = clients.NewClientWithAccessKey(self.ID, self.client.projectId, self.client.accessKey, self.client.secret)
|
||||
self.ecsClient, err = client.NewClientWithAccessKey(self.ID, self.client.projectId, self.client.accessKey, self.client.secret)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user