Skip to content
This repository was archived by the owner on Aug 31, 2021. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions openstack/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -713,6 +713,16 @@ func NewCSBSService(client *golangsdk.ProviderClient, eo golangsdk.EndpointOpts)
return sc, err
}

// NewHwCSBSServiceV1 creates a ServiceClient that may be used to access the Huawei Cloud Server Backup service.
func NewHwCSBSServiceV1(client *golangsdk.ProviderClient, eo golangsdk.EndpointOpts) (*golangsdk.ServiceClient, error) {
sc, err := initClientOpts(client, eo, "compute")
sc.Endpoint = strings.Replace(sc.Endpoint, "ecs", "csbs", 1)
e := strings.Replace(sc.Endpoint, "v2", "v1", 1)
sc.Endpoint = e
sc.ResourceBase = e
return sc, err
}

func NewMLSV1(client *golangsdk.ProviderClient, eo golangsdk.EndpointOpts) (*golangsdk.ServiceClient, error) {
sc, err := initClientOpts(client, eo, "network")
sc.Endpoint = strings.Replace(sc.Endpoint, "vpc", "mls", 1)
Expand Down
1 change: 1 addition & 0 deletions openstack/csbs/v1/backup/results.go
Original file line number Diff line number Diff line change
Expand Up @@ -150,6 +150,7 @@ type VolumeBackup struct {
Id string `json:"id"`
ImageType string `json:"image_type"`
Incremental bool `json:"incremental"`
SnapshotID string `json:"snapshot_id"`
Name string `json:"name"`
Size int `json:"size"`
SourceVolumeId string `json:"source_volume_id"`
Expand Down