The freezer.openstack.osclients
Module¶
-
class
freezer.openstack.osclients.
DryRunSwiftclientConnectionWrapper
(sw_connector)[source]¶ Bases:
object
-
class
freezer.openstack.osclients.
OSClientManager
(auth_url, auth_method='password', **kwargs)[source]¶ Bases:
object
-
create_cinder
()[source]¶ Use pre-initialized session to create an instance of cinder client. :return: cinderclient instance
-
create_glance
()[source]¶ Use pre-initialized session to create an instance of glance client. :return: glanceclient instance
-
create_nova
()[source]¶ Use pre-initialized session to create an instance of nova client. :return: novaclient instance
-
create_swift
()[source]¶ Swift client needs to be treated differently so we need to copy the arguments and provide it to swiftclient the correct way ! :return: swiftclient instance
-
do_copy_volume
(snapshot)[source]¶ Creates new volume from a snapshot :param snapshot: provided snapshot :return: created volume
-
download_image
(image)[source]¶ Creates a stream for image data :param image: Image object for downloading :return: stream of image data
-
-
class
freezer.openstack.osclients.
OpenstackOpts
(auth_url, auth_method='password', auth_version=None, username=None, password=None, region_name=None, cacert=None, identity_api_version=None, project_id=None, project_name=None, tenant_id=None, tenant_name=None, token=None, insecure=False, endpoint_type='internalURL', interface=None, compute_api_version=2, image_api_version=2, volume_api_version=2, user_domain_name=None, domain_id=None, user_domain_id=None, project_domain_id=None, domain_name=None, project_domain_name=None)[source]¶ Bases:
object
Gathering and maintaining the right Openstack credentials that will be used to authenticate against keystone. Now we support keystone v2 and v3. We need to provide a correct url that ends with either v2.0 or v3 or provide auth_version or identity_api_version
-
static
create_from_dict
(src_dict)[source]¶ Load Openstack arguments from dict and return OpenstackOpts object with the correct parameters to authenticate. :param src_dict: dict :return: OpenstackOpts object with the passed arguments in place
-
static