MCPcopy Create free account
hub / github.com/cloudwan/gohan / getProviderClient

Function getProviderClient

cli/client/client.go:238–250  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

236}
237
238func getProviderClient() (*gophercloud.ProviderClient, error) {
239 opts, err := openstack.AuthOptionsFromEnv()
240 if err != nil {
241 return nil, err
242 }
243 provider, err := openstack.AuthenticatedClient(opts)
244 if err != nil {
245 if strings.Contains(err.Error(), "provide exactly one of Domain") {
246 return nil, fmt.Errorf(envVariablesNotSetError, keystoneDomainIDKey, keystoneDomainNameKey)
247 }
248 }
249 return provider, err
250}
251
252func (gohanClientCLI *GohanClientCLI) getGohanEndpointURL(provider *gophercloud.ProviderClient) (string, error) {
253 endpointOpts := gophercloud.EndpointOpts{

Callers 2

client_test.goFile · 0.85
NewGohanClientCLIFunction · 0.85

Calls 3

ContainsMethod · 0.80
ErrorMethod · 0.65
ErrorfMethod · 0.65

Tested by

no test coverage detected