The freezer.openstack.osclients Module

The freezer.openstack.osclients Module

class freezer.openstack.osclients.DryRunSwiftclientConnectionWrapper(sw_connector)

Bases: object

dummy(*args, **kwargs)
class freezer.openstack.osclients.OSClientManager(auth_url, auth_method='password', **kwargs)

Bases: object


Deletes snapshot :param snapshot: snapshot name


Use pre-initialized session to create an instance of cinder client. :return: cinderclient instance


Use pre-initialized session to create an instance of glance client. :return: glanceclient instance

create_image(name, container_format, disk_format, data=None)

Use pre-initialized session to create an instance of neutron client. :return: neutronclient instance


Use pre-initialized session to create an instance of nova client. :return: novaclient instance


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


Creates new volume from a snapshot :param snapshot: provided snapshot :return: created volume


Creates a stream for image data :param image: Image object for downloading :return: stream of image data


Get cinderclient instance :return: cinderclient instance


Get glanceclient instance :return: glanceclient instance


Get neutronclient instance :return: neutronclient instance


Get novaclient instance :return: novaclient instance


Get swiftclient instance :return: swiftclient instance

make_glance_image(image_volume_name, copy_volume)

Creates an glance image from volume :param image_volume_name: Name of image :param copy_volume: volume to make an image :return: Glance image object

provide_snapshot(volume, snapshot_name)

Creates snapshot for cinder volume with –force parameter :param volume: volume object for snapshoting :param snapshot_name: name of snapshot :return: snapshot object

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)

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)

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 create_from_env()

Parse environment variables and load Openstack related options. :return:


Return opentack auth arguments as dict detects the auth version from url if not provided handles certificate issues

Creative Commons Attribution 3.0 License

Except where otherwise noted, this document is licensed under Creative Commons Attribution 3.0 License. See all OpenStack Legal Documents.

freezer 6.0.1.dev5