from neutronclient.common.utils import str2bool
import numbers
from snaps import file_utils
-from snaps.openstack.utils import glance_utils, keystone_utils
+from snaps.openstack.utils import glance_utils, keystone_utils, cinder_utils
__author__ = 'spisarski'
clients
:param heat_api_version: The OpenStack's API version to use for Heat
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')
: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')
if kwargs.get('heat_api_version') is None:
self.heat_api_version = 1
else:
- self.heat_api_version = float(kwargs['heat_api_version'])
+ val = kwargs['heat_api_version']
+ ver = float(val)
+ self.heat_api_version = int(ver)
+
+ 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'])
+
+ 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')
return new_url
- @property
def __str__(self):
"""Converts object to a string"""
return ('OSCreds - username=' + str(self.username) +
: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')