diff --git a/openstack/client.go b/openstack/client.go index 1770d8499..5f4b2dc04 100644 --- a/openstack/client.go +++ b/openstack/client.go @@ -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) diff --git a/openstack/csbs/v1/backup/results.go b/openstack/csbs/v1/backup/results.go index 5ea515921..30ea8a797 100644 --- a/openstack/csbs/v1/backup/results.go +++ b/openstack/csbs/v1/backup/results.go @@ -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"`