cloudmesh_client.cloud.iaas.provider.openstack package¶
Submodules¶
cloudmesh_client.cloud.iaas.provider.openstack.CloudProviderOpenstackAPI module¶
-
class
cloudmesh_client.cloud.iaas.provider.openstack.CloudProviderOpenstackAPI.
CloudProviderOpenstackAPI
(cloud_name, cloud_details, user=None, flat=True)[source]¶ Bases:
cloudmesh_client.cloud.iaas.CloudProviderBase.CloudProviderBase
-
add_key_to_cloud
(name, public_key)[source]¶ Method to add key to cloud, typically a keypair for openstack. :param name: Name of the keypair. :param public_key: public key string. :return:
-
boot_vm
(name, group=None, image=None, flavor=None, cloud=None, key=None, secgroup=None, meta=None, nics=None, **kwargs)[source]¶ Spawns a VM instance on the cloud. If image and flavor passed as none, it would consider the defaults specified in cloudmesh.yaml.
Parameters: - name – Name of the instance to be started
- image – Image id to be used for the instance
- flavor – Flavor to be used for the instance
- cloud – Cloud on which to spawn the machine. Defaults to ‘India’.
- key – Key to be used for the instance
- secgroup – Security group for the instance
- meta – A dict of arbitrary key/value metadata to store for this server
-
cloud_pwd
= {}¶
-
cloud_type
= 'openstack'¶
-
create_assign_floating_ip
(server_name)[source]¶ Function creates a new floating ip and associates it with the machine specified. :param server_name: Name of the machine to which the floating ip needs to be assigned. :return: Floating IP | None if floating ip already assigned.
-
create_floating_ip
(float_pool)[source]¶ Method creates a new floating ip under the specified pool :param float_pool: :return: Floating IP
-
delete_floating_ip
(floating_ip)[source]¶ Method deletes a floating IP address :param floating_ip: :return: None
-
delete_key_from_cloud
(name)[source]¶ Method to delete key from cloud, typically a keypair for openstack. :param name: Name of the keypair. :return:
-
delete_vm
(name, group=None, force=None)[source]¶ Deletes a machine on the target cloud indicated by the id or name :param name: Name or ID of the instance to be deleted :param group: Security group of the instance to be deleted :param force: Force delete option :return:
-
get_fixed_ip
(fixed_ip_addr)[source]¶ Returns the fixed ip info associated with fixed ip addr :param fixed_ip_addr: :return: fixed ip info
-
get_floating_ip
(floating_ip_id)[source]¶ Returns the floating ip info associated with floating_ip_id :param floating_ip_id: :return: floating ip info
-
get_ips
(name, group=None, force=None)[source]¶ Returns the ip of the instance indicated by name :param name: :param group: :param force: :return: IP address of the instance
-
mode
(source)[source]¶ Sets the source for the information to be returned. “db” and “cloud” :param source: the database can be queried in mode “db”, the database can be bypassed in mode “cloud”
-
rename_vm
(current_name, new_name)[source]¶ Renames a vm. :param current_name: :param new_name: :return:
-
start_vm
(name, group=None, force=None)[source]¶ Starts a suspended machine on the target cloud indicated by the id or name :param name: Name or ID of the instance to be deleted :param group: Security group of the instance to be deleted :param force: Force delete option :return:
-