Skip to content

Commit a4a7ffc

Browse files
mdelordMaxime Delord
authored and
Ludovic Lamarche
committed
Fix BareMetalV1 version (#16)
Co-authored-by: Maxime Delord <[email protected]>
1 parent 31b91fe commit a4a7ffc

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

openstack/client.go

+5-1
Original file line numberDiff line numberDiff line change
@@ -363,7 +363,11 @@ func initClientOpts(client *gophercloud.ProviderClient, eo gophercloud.EndpointO
363363
// NewBareMetalV1 creates a ServiceClient that may be used with the v1
364364
// bare metal package.
365365
func NewBareMetalV1(client *gophercloud.ProviderClient, eo gophercloud.EndpointOpts) (*gophercloud.ServiceClient, error) {
366-
return initClientOpts(client, eo, "baremetal")
366+
sc, err := initClientOpts(client, eo, "baremetal")
367+
if !strings.HasSuffix(sc.Endpoint, "v1/") {
368+
sc.ResourceBase = sc.Endpoint + "v1/"
369+
}
370+
return sc, err
367371
}
368372

369373
// NewBareMetalIntrospectionV1 creates a ServiceClient that may be used with the v1

0 commit comments

Comments
 (0)