From cb03f96d7d10327b8cb39d3e822da9099953e543 Mon Sep 17 00:00:00 2001 From: Zhenguo Niu Date: Wed, 12 Jun 2019 06:48:11 +0000 Subject: [PATCH] Update SFS client --- openstack/client.go | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/openstack/client.go b/openstack/client.go index 97958859b..5474406e2 100644 --- a/openstack/client.go +++ b/openstack/client.go @@ -820,8 +820,9 @@ func NewOBSService(client *golangsdk.ProviderClient, eo golangsdk.EndpointOpts) //TODO: Need to change to sfs client type from evs once available //NewSFSV2 creates a service client that is used for Huawei cloud for SFS , it replaces the EVS type. func NewHwSFSV2(client *golangsdk.ProviderClient, eo golangsdk.EndpointOpts) (*golangsdk.ServiceClient, error) { - sc, err := initClientOpts(client, eo, "compute") - sc.Endpoint = strings.Replace(sc.Endpoint, "ecs", "sfs", 1) + sc, err := initClientOpts(client, eo, "network") + sc.Endpoint = strings.Replace(sc.Endpoint, "vpc", "sfs", 1) + sc.ResourceBase = sc.Endpoint + "v2/" + client.ProjectID + "/" return sc, err }