summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--doc/source/vendor-support.rst42
-rw-r--r--os_client_config/cloud_config.py37
2 files changed, 60 insertions, 19 deletions
diff --git a/doc/source/vendor-support.rst b/doc/source/vendor-support.rst
index e7d51c0..314e362 100644
--- a/doc/source/vendor-support.rst
+++ b/doc/source/vendor-support.rst
@@ -8,6 +8,22 @@ information about various things a user would need to know. The following
is a text representation of the vendor related defaults `os-client-config`
knows about.
+Default Values
+--------------
+
+These are the default behaviors unless a cloud is configured differently.
+
+* Identity uses `password` authentication
+* Identity API Version is 2
+* Image API Version is 1
+* Images must be in `qcow2` format
+* Images are uploaded using PUT interface
+* Public IPv4 is directly routable via DHCP from Neutron
+* IPv6 is not provided
+* Floating IPs are provided by Neutron
+* Security groups are provided by Neutron
+* Vendor specific agents are not used
+
hp
--
@@ -21,10 +37,6 @@ region-b.geo-1 US East
============== ================
* DNS Service Type is `hpext:dns`
-* Image API Version is 1
-* Images must be in `qcow2` format
-* Floating IPs are provided by Neutron
-* Security groups are provided by Neutron
rackspace
---------
@@ -47,6 +59,8 @@ HKG Hong Kong
* Images must be in `vhd` format
* Images must be uploaded using the Glance Task Interface
* Floating IPs are not needed
+* Public IPv4 is directly routable via static config by Nova
+* IPv6 is provided to every server
* Security groups are not supported
* Uploaded Images need properties to not use vendor agent
:vm_mode: hvm
@@ -65,8 +79,8 @@ RegionOne Region One
* Image API Version is 2
* Images must be in `raw` format
-* Floating IPs are provided by Neutron
-* Security groups are provided by Neutron
+* Public IPv4 is provided via Floating IP from Neutron
+* IPv6 is provided to every server
vexxhost
--------
@@ -80,9 +94,6 @@ ca-ymq-1 Montreal
============== ================
* Image API Version is 2
-* Images must be in `qcow2` format
-* Floating IPs are not needed
-* Security groups are provided by Neutron
runabove
--------
@@ -98,8 +109,7 @@ BHS-1 Beauharnois, QC
* Image API Version is 2
* Images must be in `qcow2` format
-* Floating IPs are not needed
-* Security groups are provided by Neutron
+* Floating IPs are not supported
unitedstack
-----------
@@ -116,8 +126,6 @@ gd1 Guangdong
* Identity API Version is 3
* Image API Version is 2
* Images must be in `raw` format
-* Floating IPs are not needed
-* Security groups are provided by Neutron
auro
----
@@ -131,8 +139,7 @@ RegionOne RegionOne
============== ================
* Identity API Version is 2
-* Image API Version is 1
-* Images must be in `qcow2` format
+* Public IPv4 is provided via Floating IP from Nova
* Floating IPs are provided by Nova
* Security groups are provided by Nova
@@ -147,8 +154,5 @@ Region Name Human Name
SBG-1 Strassbourg, FR
============== ================
-* Identity API Version is 2
-* Image API Version is 1
* Images must be in `raw` format
-* Floating IPs are provided by Neutron
-* Security groups are provided by Neutron
+* Floating IPs are not supported
diff --git a/os_client_config/cloud_config.py b/os_client_config/cloud_config.py
index 018908e..19f1bb4 100644
--- a/os_client_config/cloud_config.py
+++ b/os_client_config/cloud_config.py
@@ -59,3 +59,40 @@ class CloudConfig(object):
if self.config['key']:
cert = (cert, self.config['key'])
return (verify, cert)
+
+ def get_services(self):
+ """Return a list of service types we know something about."""
+ services = []
+ for key, val in self.config.items():
+ if (key.endswith('api_version')
+ or key.endswith('service_type')
+ or key.endswith('service_name')):
+ services.append("_".join(key.split('_')[:-2]))
+ return list(set(services))
+
+ def get_auth_args(self):
+ return self.config['auth']
+
+ def get_endpoint_type(self, service_type=None):
+ if not service_type:
+ return self.config['endpoint_type']
+ key = '{service_type}_endpoint_type'.format(service_type=service_type)
+ return self.config.get(key, self.config['endpoint_type'])
+
+ def get_region_name(self, service_type=None):
+ if not service_type:
+ return self.region
+ key = '{service_type}_region_name'.format(service_type=service_type)
+ return self.config.get(key, self.region)
+
+ def get_api_version(self, service_type):
+ key = '{service_type}_api_version'.format(service_type=service_type)
+ return self.config.get(key, None)
+
+ def get_service_type(self, service_type):
+ key = '{service_type}_service_type'.format(service_type=service_type)
+ return self.config.get(key, service_type)
+
+ def get_service_name(self, service_type):
+ key = '{service_type}_service_name'.format(service_type=service_type)
+ return self.config.get(key, service_type)