File tree Expand file tree Collapse file tree 1 file changed +5
-0
lines changed
mantle/platform/api/openstack Expand file tree Collapse file tree 1 file changed +5
-0
lines changed Original file line number Diff line number Diff line change @@ -85,7 +85,9 @@ type API struct {
85
85
86
86
// LoadCloudsYAML defines how to load a clouds.yaml file.
87
87
// By default, this calls the local LoadCloudsYAML function.
88
+ // See https://github.com/gophercloud/utils/blob/master/openstack/clientconfig/requests.go
88
89
func (opts Options ) LoadCloudsYAML () (map [string ]clientconfig.Cloud , error ) {
90
+ // If provided a path to a config file then we load it here.
89
91
if opts .ConfigPath != "" {
90
92
var clouds clientconfig.Clouds
91
93
if content , err := ioutil .ReadFile (opts .ConfigPath ); err != nil {
@@ -95,6 +97,9 @@ func (opts Options) LoadCloudsYAML() (map[string]clientconfig.Cloud, error) {
95
97
}
96
98
return clouds .Clouds , nil
97
99
}
100
+
101
+ // If not provided a path to a config, fall back to
102
+ // LoadCloudsYAML() from the clientconfig library.
98
103
return clientconfig .LoadCloudsYAML ()
99
104
}
100
105
You can’t perform that action at this time.
0 commit comments