github.com/openshift/installer@v1.4.17/pkg/types/openstack/defaults/clientopts.go (about) 1 package defaults 2 3 import ( 4 "github.com/gophercloud/utils/v2/openstack/clientconfig" 5 ) 6 7 // DefaultClientOpts generates default client opts based on cloud name 8 func DefaultClientOpts(cloudName string) *clientconfig.ClientOpts { 9 opts := new(clientconfig.ClientOpts) 10 opts.Cloud = cloudName 11 // We explicitly disable reading auth data from env variables by setting an invalid EnvPrefix. 12 // By doing this, we make sure that the data from clouds.yaml is enough to authenticate. 13 // For more information: https://github.com/gophercloud/utils/blob/8677e053dcf1f05d0fa0a616094aace04690eb94/openstack/clientconfig/requests.go#L508 14 opts.EnvPrefix = "NO_ENV_VARIABLES_" 15 return opts 16 }