openstack: nova_utils_tests: Increase timeout for API calls
[snaps.git] / snaps / openstack / os_credentials.py
index cff2dd8..72223e3 100644 (file)
@@ -44,6 +44,8 @@ class OSCreds:
                                     clients
         :param volume_api_version: The OpenStack's API version to use
                                    for Cinder clients
+        :param magnum_api_version: The OpenStack's API version to use
+                                   for magnum clients
         :param user_domain_id: Used for v3 APIs (default='default')
         :param user_domain_name: Used for v3 APIs (default='Default')
         :param project_domain_id: Used for v3 APIs (default='default')
@@ -51,10 +53,8 @@ class OSCreds:
         :param interface: Used to specify the endpoint type for keystone as
                           public, admin, internal
         :param proxy_settings: instance of os_credentials.ProxySettings class
-        :param cacert: Default to be True for http, or the certification file
-                       is specified for https verification, or set to be False
-                       to disable server certificate verification without cert
-                       file
+        :param cacert: True for https or the certification file for https
+                       verification (default=False)
         :param region_name: the region (optional default = None)
         """
         self.username = kwargs.get('username')
@@ -90,8 +90,12 @@ class OSCreds:
         if kwargs.get('volume_api_version') is None:
             self.volume_api_version = cinder_utils.VERSION_2
         else:
-            self.volume_api_version = float(
-                kwargs['volume_api_version'])
+            self.volume_api_version = float(kwargs['volume_api_version'])
+
+        if kwargs.get('magnum_api_version') is None:
+            self.magnum_api_version = 1
+        else:
+            self.magnum_api_version = float(kwargs['magnum_api_version'])
 
         self.user_domain_id = kwargs.get('user_domain_id', 'default')
 
@@ -165,7 +169,6 @@ class OSCreds:
 
         return new_url
 
-    @property
     def __str__(self):
         """Converts object to a string"""
         return ('OSCreds - username=' + str(self.username) +
@@ -200,7 +203,6 @@ class ProxySettings:
         :param port: the HTTP proxy port
         :param https_host: the HTTPS proxy host (defaults to host)
         :param https_port: the HTTPS proxy port (defaults to port)
-        :param port: the HTTP proxy port
         :param ssh_proxy_cmd: the SSH proxy command string (optional)
         """
         self.host = kwargs.get('host')