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§
- Authentication data
- CacheConfig structure
- CloudConfig structure
- ConfigFile structure
- A builder to create a
ConfigFileby specifying which files to load.
Enums§
- Errors which may occur when dealing with OpenStack connection configuration data.
- Errors which may occur when adding sources to the
ConfigFileBuilder.
Functions§
- Searches for a
clouds.{yaml,yml,json}config file. - Searches for a
secure.{yaml,yml,json}config file. - Searches for a
clouds-public.{yaml,yml,json}config file. - Get a user authentication hash