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
- clean_snapshot(snapshot)¶
Deletes snapshot :param snapshot: snapshot name
- create_cinder()¶
Use pre-initialized session to create an instance of cinder client. :return: cinderclient instance
- create_glance()¶
Use pre-initialized session to create an instance of glance client. :return: glanceclient instance
- create_image(name, container_format, disk_format, data=None)¶
- create_neutron()¶
Use pre-initialized session to create an instance of neutron client. :return: neutronclient instance
- create_nova()¶
Use pre-initialized session to create an instance of nova client. :return: novaclient instance
- create_swift()¶
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)¶
Creates new volume from a snapshot :param snapshot: provided snapshot :return: created volume
- download_image(image)¶
Creates a stream for image data :param image: Image object for downloading :return: stream of image data
- get_cinder()¶
Get cinderclient instance :return: cinderclient instance
- get_glance()¶
Get glanceclient instance :return: glanceclient instance
- get_neutron()¶
Get neutronclient instance :return: neutronclient instance
- get_nova()¶
Get novaclient instance :return: novaclient instance
- get_swift()¶
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, token=None, insecure=False, endpoint_type='internalURL', interface=None, compute_api_version=2, image_api_version=2, volume_api_version=3, 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 v3. We need to provide a correct url that ends with either 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:
- get_opts_dicts()¶
Return openstack auth arguments as dict detects the auth version from url if not provided handles certificate issues