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

activate(cloudname)[source]

Activates a cloud :param cloudname: :return:

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:

add_secgroup_rule(**kwargs)[source]
attributes(kind)[source]
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

create_secgroup(secgroup_name)[source]
deactivate(cloudname)[source]

Deactivates a cloud :param cloudname: :return:

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_secgroup(name)[source]
delete_secgroup_rule(rule_id)[source]
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_flavor(**kwargs)[source]

finds the flavor based on a query TODO: details TBD

get_flavor_id(name)[source]

finds the image based on a query TODO: details TBD

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_image(**kwargs)[source]

finds the image based on a query TODO: details TBD

get_image_id(name)[source]

finds the image based on a query TODO: details TBD

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

get_vm(**kwargs)[source]

finds the flavor based on a query TODO: details TBD

initialize(cloudname, user=None)[source]
isUuid(name)[source]
list_clouds()[source]

Lists clouds :return:

list_console(name, length=None)[source]
list_flavor(cloudname, **kwargs)[source]
list_floating_ip_pools(**kwargs)[source]
list_floating_ips(**kwargs)[source]
list_image(cloudname, **kwargs)[source]
list_key(cloudname, **kwargs)[source]
list_limits(tenant, **kwargs)[source]
list_quota(cloudname, **kwargs)[source]
list_secgroup(cloudname, **kwargs)[source]
list_secgroup_rules(cloudname)[source]
list_usage(cloudname, **kwargs)[source]
list_vm(cloudname, **kwargs)[source]
logon(cloudname)[source]

Logs onto a cloud :param cloudname: :return:

logout(cloudname)[source]

Logs out from a cloud :param cloudname: :return:

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:

reserve_fixed_ip(fixed_ip_addr)[source]

Reserves a fixed ip address :param fixed_ip_addr: :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:

stop_vm(name, group=None, force=None)[source]

Stops 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:

unreserve_fixed_ip(fixed_ip_addr)[source]

Unreserves a fixed ip address :param fixed_ip_addr: :return:

cloudmesh_client.cloud.iaas.provider.openstack.CloudProviderOpenstackAPI.set_os_environ(cloudname)[source]

Set os environment variables on a given cloudname

Module contents