Documentation ¶
Index ¶
- Constants
- func FindAndReadYAML(dir, filename string) (string, []byte, error)
- func LoadAndCheckOSConfigfile(filename string, loader func() (map[string]clientconfig.Cloud, error), ...) (map[string]clientconfig.Cloud, error)
- func WriteOSConfig(directory string, clouds, secure, public []byte) (err error)
- type CloudAlreadyExistsError
- type Clouds
- type YAMLOpts
- func (opts YAMLOpts) AllCloudNames() ([]string, error)
- func (opts YAMLOpts) AllProfileNames() ([]string, error)
- func (opts YAMLOpts) LoadCloudsYAML() (map[string]clientconfig.Cloud, error)
- func (opts YAMLOpts) LoadPublicCloudsYAML() (map[string]clientconfig.Cloud, error)
- func (opts YAMLOpts) LoadSecureCloudsYAML() (map[string]clientconfig.Cloud, error)
Constants ¶
const (
BackupsToKeep = 4
)
Variables ¶
This section is empty.
Functions ¶
func FindAndReadYAML ¶
FindAndReadYAML looks for filename in home directory if dir is empty, otherwise looks in specified directory.
func LoadAndCheckOSConfigfile ¶
func LoadAndCheckOSConfigfile( filename string, loader func() (map[string]clientconfig.Cloud, error), cloudName string, ) (map[string]clientconfig.Cloud, error)
LoadAndCheckOSConfigfile loads and returns all the clouds found the specified filename. If cloudName is different from "" then cloudName is searched for in the clouds and an error is returned if cloudName is found.
func WriteOSConfig ¶
Types ¶
type CloudAlreadyExistsError ¶ added in v0.6.13
func (CloudAlreadyExistsError) Error ¶ added in v0.6.13
func (e CloudAlreadyExistsError) Error() string
type Clouds ¶
type Clouds struct { Clouds map[string]clientconfig.Cloud `json:"clouds" yaml:"clouds"` PublicClouds map[string]clientconfig.Cloud `json:"public-clouds" yaml:"public-clouds"` //nolint:tagliatelle }
type YAMLOpts ¶
type YAMLOpts struct {
Directory string
}
YAMLOpts implements gophercloud util's YAMLOptsBuilder interface.
func (YAMLOpts) AllCloudNames ¶
AllCloudNames returns all the possible cloud names.
func (YAMLOpts) AllProfileNames ¶
AllProfileNames returns all the possible profile names.
func (YAMLOpts) LoadCloudsYAML ¶
func (opts YAMLOpts) LoadCloudsYAML() (map[string]clientconfig.Cloud, error)
LoadCloudsYAML loads ~/.config/openstack/clouds.yaml.
func (YAMLOpts) LoadPublicCloudsYAML ¶
func (opts YAMLOpts) LoadPublicCloudsYAML() (map[string]clientconfig.Cloud, error)
LoadPublicCloudsYAML loads ~/.config/openstack/clouds-public.yaml.
func (YAMLOpts) LoadSecureCloudsYAML ¶
func (opts YAMLOpts) LoadSecureCloudsYAML() (map[string]clientconfig.Cloud, error)
LoadSecureCloudsYAML loads ~/.config/openstack/secure.yaml.