@@ -344,6 +344,7 @@ func NewIdentityV3(client *gophercloud.ProviderClient, eo gophercloud.EndpointOp
344344 }, nil
345345}
346346
347+ // TODO(stephenfin): Allow passing aliases to all New${SERVICE}V${VERSION} methods in v3
347348func initClientOpts (client * gophercloud.ProviderClient , eo gophercloud.EndpointOpts , clientType string ) (* gophercloud.ServiceClient , error ) {
348349 sc := new (gophercloud.ServiceClient )
349350 eo .ApplyDefaults (clientType )
@@ -393,6 +394,7 @@ func NewNetworkV2(client *gophercloud.ProviderClient, eo gophercloud.EndpointOpt
393394 return sc , err
394395}
395396
397+ // TODO(stephenfin): Remove this in v3. We no longer support the V1 Block Storage service.
396398// NewBlockStorageV1 creates a ServiceClient that may be used to access the v1
397399// block storage service.
398400func NewBlockStorageV1 (client * gophercloud.ProviderClient , eo gophercloud.EndpointOpts ) (* gophercloud.ServiceClient , error ) {
@@ -402,17 +404,17 @@ func NewBlockStorageV1(client *gophercloud.ProviderClient, eo gophercloud.Endpoi
402404// NewBlockStorageV2 creates a ServiceClient that may be used to access the v2
403405// block storage service.
404406func NewBlockStorageV2 (client * gophercloud.ProviderClient , eo gophercloud.EndpointOpts ) (* gophercloud.ServiceClient , error ) {
405- return initClientOpts (client , eo , "volumev2 " )
407+ return initClientOpts (client , eo , "block-storage " )
406408}
407409
408410// NewBlockStorageV3 creates a ServiceClient that may be used to access the v3 block storage service.
409411func NewBlockStorageV3 (client * gophercloud.ProviderClient , eo gophercloud.EndpointOpts ) (* gophercloud.ServiceClient , error ) {
410- return initClientOpts (client , eo , "volumev3 " )
412+ return initClientOpts (client , eo , "block-storage " )
411413}
412414
413415// NewSharedFileSystemV2 creates a ServiceClient that may be used to access the v2 shared file system service.
414416func NewSharedFileSystemV2 (client * gophercloud.ProviderClient , eo gophercloud.EndpointOpts ) (* gophercloud.ServiceClient , error ) {
415- return initClientOpts (client , eo , "sharev2 " )
417+ return initClientOpts (client , eo , "shared-file-system " )
416418}
417419
418420// NewOrchestrationV1 creates a ServiceClient that may be used to access the v1
@@ -457,14 +459,14 @@ func NewLoadBalancerV2(client *gophercloud.ProviderClient, eo gophercloud.Endpoi
457459// NewMessagingV2 creates a ServiceClient that may be used with the v2 messaging
458460// service.
459461func NewMessagingV2 (client * gophercloud.ProviderClient , clientID string , eo gophercloud.EndpointOpts ) (* gophercloud.ServiceClient , error ) {
460- sc , err := initClientOpts (client , eo , "messaging " )
462+ sc , err := initClientOpts (client , eo , "message " )
461463 sc .MoreHeaders = map [string ]string {"Client-ID" : clientID }
462464 return sc , err
463465}
464466
465467// NewContainerV1 creates a ServiceClient that may be used with v1 container package
466468func NewContainerV1 (client * gophercloud.ProviderClient , eo gophercloud.EndpointOpts ) (* gophercloud.ServiceClient , error ) {
467- return initClientOpts (client , eo , "container" )
469+ return initClientOpts (client , eo , "application- container" )
468470}
469471
470472// NewKeyManagerV1 creates a ServiceClient that may be used with the v1 key
@@ -478,12 +480,12 @@ func NewKeyManagerV1(client *gophercloud.ProviderClient, eo gophercloud.Endpoint
478480// NewContainerInfraV1 creates a ServiceClient that may be used with the v1 container infra management
479481// package.
480482func NewContainerInfraV1 (client * gophercloud.ProviderClient , eo gophercloud.EndpointOpts ) (* gophercloud.ServiceClient , error ) {
481- return initClientOpts (client , eo , "container-infra " )
483+ return initClientOpts (client , eo , "container-infrastructure-management " )
482484}
483485
484486// NewWorkflowV2 creates a ServiceClient that may be used with the v2 workflow management package.
485487func NewWorkflowV2 (client * gophercloud.ProviderClient , eo gophercloud.EndpointOpts ) (* gophercloud.ServiceClient , error ) {
486- return initClientOpts (client , eo , "workflowv2 " )
488+ return initClientOpts (client , eo , "workflow " )
487489}
488490
489491// NewPlacementV1 creates a ServiceClient that may be used with the placement package.
0 commit comments