Expand description
Module to handle OpenStack config
let cfg = openstack_sdk::config::ConfigFile::new().unwrap();
let profile = cfg
.get_cloud_config("devstack")
.expect("Cloud devstack not found");It is possible to create a config by passing paths to a builder.
let cfg = openstack_sdk::config::ConfigFile::builder()
.add_source("c1.yaml")
.expect("Failed to load 'c1.yaml'")
.add_source("s2.yaml")
.expect("Failed to load 's2.yaml'")
.build();It is also possible to create a config with ConfigFile::new_with_user_specified_configs.
This is similar to what the python OpenStackSDK does.
let cfg = openstack_sdk::config::ConfigFile::new_with_user_specified_configs(
Some("c1.yaml"),
Some("s2.yaml"),
).expect("Failed to load the configuration files");Structs§
- Auth
- Authentication data
- Cache
Config - CacheConfig structure
- Cloud
Config - CloudConfig structure
- Config
File - ConfigFile structure
- Config
File Builder - A builder to create a
ConfigFileby specifying which files to load.
Enums§
- Config
Error - Errors which may occur when dealing with OpenStack connection configuration data.
- Config
File Builder Error - Errors which may occur when adding sources to the
ConfigFileBuilder.
Functions§
- find_
clouds_ file - Searches for a
clouds.{yaml,yml,json}config file. - find_
secure_ file - Searches for a
secure.{yaml,yml,json}config file. - find_
vendor_ file - Searches for a
clouds-public.{yaml,yml,json}config file. - get_
config_ identity_ hash - Get a user authentication hash