l.c.d.v.VCloud_1_5_NodeDriver(VCloudNodeDriver) : class documentation

Part of libcloud.compute.drivers.vcloud View Source View In Hierarchy

Known subclasses: libcloud.compute.drivers.vcloud.VCloud_5_1_NodeDriver

No class docstring
Method list_locations List data centers for a provider
Method ex_find_node Searches for node across specified vDCs. This is more effective than querying all nodes to get a single instance.
Method destroy_node Destroy a node.
Method reboot_node Reboot a node.
Method ex_deploy_node Deploys existing node. Equal to vApp "start" operation.
Method ex_undeploy_node Undeploys existing node. Equal to vApp "stop" operation.
Method ex_power_off_node Powers on all VMs under specified node. VMs need to be This operation is allowed only when the vApp/VM is powered on.
Method ex_power_on_node Powers on all VMs under specified node. This operation is allowed only when the vApp/VM is powered off or suspended.
Method ex_shutdown_node Shutdowns all VMs under specified node. This operation is allowed only when the vApp/VM is powered on.
Method ex_suspend_node Suspends all VMs under specified node. This operation is allowed only when the vApp/VM is powered on.
Method ex_get_control_access Returns the control access settings for specified node.
Method ex_set_control_access Sets control access for the specified node.
Method ex_get_metadata @param node: node @type node: L{Node}
Method ex_set_metadata_entry @param node: node @type node: L{Node}
Method ex_query Queries vCloud for specified type. See http://www.vmware.com/pdf/vcd_15_api_guide.pdf for details. Each element of the returned list is a dictionary with all attributes from the record.
Method create_node No summary
Method ex_set_vm_cpu Sets the number of virtual CPUs for the specified VM or VMs under the vApp. If the vapp_or_vm_id param represents a link to an vApp all VMs that are attached to this vApp will be modified.
Method ex_set_vm_memory Sets the virtual memory in MB to allocate for the specified VM or VMs under the vApp. If the vapp_or_vm_id param represents a link to an vApp all VMs that are attached to this vApp will be modified.
Method ex_add_vm_disk Adds a virtual disk to the specified VM or VMs under the vApp. If the vapp_or_vm_id param represents a link to an vApp all VMs that are attached to this vApp will be modified.
Method _perform_power_operation Undocumented
Method _instantiate_node Undocumented
Method _clone_node Undocumented
Static Method _validate_vm_names Undocumented
Static Method _validate_vm_memory Undocumented
Static Method _validate_vm_cpu Undocumented
Static Method _validate_vm_disk_size Undocumented
Static Method _validate_vm_script Undocumented
Static Method _validate_vm_fence Undocumented
Static Method _validate_vm_ipmode Undocumented
Method _change_vm_names Undocumented
Method _change_vm_cpu Undocumented
Method _change_vm_memory Undocumented
Method _add_vm_disk Undocumented
Method _change_vm_script Undocumented
Method _change_vm_ipmode Undocumented
Method _get_network_href Undocumented
Method _get_vm_elements Undocumented
Method _is_node Undocumented
Method _to_node Undocumented
Method _to_vdc Undocumented

Inherited from VCloudNodeDriver:

Method __new__ Undocumented
Method vdcs vCloud virtual data centers (vDCs).
Method networks Undocumented
Method list_nodes List all nodes @return: list of node objects @rtype: C{list} of L{Node}
Method ex_list_nodes List all nodes across all vDCs. Using 'vdcs' you can specify which vDCs should be queried.
Method list_sizes List sizes on a provider
Method list_images List images on a provider
Method _get_vdc Undocumented
Method _to_image Undocumented
Method _get_catalog_hrefs Undocumented
Method _wait_for_task_completion Undocumented
Method _to_size Undocumented
Method _get_catalogitems_hrefs Given a catalog href returns contained catalog item hrefs
Method _get_catalogitem Given a catalog item href returns elementree
Method _uniquer Undocumented

Inherited from NodeDriver (via VCloudNodeDriver):

Method __init__ @param key: API key or username to be used (required) @type key: C{str}
Method deploy_node Create a new node, and start deployment.
Method create_volume Create a new volume.
Method destroy_volume Destroys a storage volume.
Method attach_volume Attaches volume to node.
Method detach_volume Detaches a volume from a node.
Method wait_until_running Block until the given nodes are fully booted and have an IP address assigned.
Method _wait_until_running Undocumented
Method _ssh_client_connect Try to connect to the remote SSH server. If a connection times out or is refused it is retried up to timeout number of seconds.
Method _connect_and_run_deployment_script Undocumented
Method _run_deployment_script Run the deployment script on the provided node. At this point it is assumed that SSH connection has already been established.
Method _get_size_price Undocumented

Inherited from BaseDriver (via VCloudNodeDriver, NodeDriver):

Method _ex_connection_class_kwargs Return extra connection keyword arguments which are passed to the Connection class constructor.
def list_locations(self): (source)
List data centers for a provider

@return: list of node location objects
@rtype: C{list} of L{NodeLocation}
def ex_find_node(self, node_name, vdcs=None): (source)
Searches for node across specified vDCs. This is more effective than querying all nodes to get a single
instance.

@param node_name: The name of the node to search for
@type node_name: C{str}

@param vdcs: None, vDC or a list of vDCs to search in. If None all vDCs will be searched.
@type vdcs: L{Vdc}

@return: node instance or None if not found
@rtype: L{Node} or C{None}
def destroy_node(self, node): (source)
Destroy a node.

Depending upon the provider, this may destroy all data associated with
the node, including backups.

@param node: The node to be destroyed
@type node: L{Node}

@return: True if the destroy was successful, otherwise False
@rtype: C{bool}
def reboot_node(self, node): (source)
Reboot a node.

@param node: The node to be rebooted
@type node: L{Node}

@return: True if the reboot was successful, otherwise False
@rtype: C{bool}
def ex_deploy_node(self, node): (source)
Deploys existing node. Equal to vApp "start" operation.

@param  node: The node to be deployed
@type   node: L{Node}

@rtype: L{Node}
def ex_undeploy_node(self, node): (source)
Undeploys existing node. Equal to vApp "stop" operation.

@param  node: The node to be deployed
@type   node: L{Node}

@rtype: L{Node}
def ex_power_off_node(self, node): (source)
Powers on all VMs under specified node. VMs need to be This operation
is allowed only when the vApp/VM is powered on.

@param  node: The node to be powered off
@type   node: L{Node}

@rtype: L{Node}
def ex_power_on_node(self, node): (source)
Powers on all VMs under specified node. This operation is allowed
only when the vApp/VM is powered off or suspended.

@param  node: The node to be powered on
@type   node: L{Node}

@rtype: L{Node}
def ex_shutdown_node(self, node): (source)
Shutdowns all VMs under specified node. This operation is allowed only
when the vApp/VM is powered on.

@param  node: The node to be shut down
@type   node: L{Node}

@rtype: L{Node}
def ex_suspend_node(self, node): (source)
Suspends all VMs under specified node. This operation is allowed only
when the vApp/VM is powered on.

@param  node: The node to be suspended
@type   node: L{Node}

@rtype: L{Node}
def _perform_power_operation(self, node, operation): (source)
Undocumented
def ex_get_control_access(self, node): (source)
Returns the control access settings for specified node.

@param  node: node to get the control access for
@type   node: L{Node}

@rtype: L{ControlAccess}
def ex_set_control_access(self, node, control_access): (source)
Sets control access for the specified node.

@param  node: node
@type   node: L{Node}

@param  control_access: control access settings
@type   control_access: L{ControlAccess}

@rtype: C{None}
def ex_get_metadata(self, node): (source)
@param  node: node
@type   node: L{Node}

@return: dictionary mapping metadata keys to metadata values
@rtype: dictionary mapping C{str} to C{str}
def ex_set_metadata_entry(self, node, key, value): (source)
@param  node: node
@type   node: L{Node}

@param key: metadata key to be set
@type key: C{str}

@param value: metadata value to be set
@type value: C{str}

@rtype: C{None}
def ex_query(self, type, filter=None, page=1, page_size=100, sort_asc=None, sort_desc=None): (source)
Queries vCloud for specified type. See http://www.vmware.com/pdf/vcd_15_api_guide.pdf
for details. Each element of the returned list is a dictionary with all
attributes from the record.

@param type: type to query (r.g. user, group, vApp etc.)
@type  type: C{str}

@param filter: filter expression (see documentation for syntax)
@type  filter: C{str}

@param page: page number
@type  page: C{int}

@param page_size: page size
@type  page_size: C{int}

@param sort_asc: sort in ascending order by specified field
@type  sort_asc: C{str}

@param sort_desc: sort in descending order by specified field
@type  sort_desc: C{str}

@rtype: C{list} of dict
def create_node(self, **kwargs): (source)
Creates and returns node. If the source image is:
   - vApp template - a new vApp is instantiated from template
   - existing vApp - a new vApp is cloned from the source vApp. Can not clone more vApps is parallel otherwise
                     resource busy error is raised.


@inherits: L{NodeDriver.create_node}

@keyword    image:  OS Image to boot on node. (required). Can be a NodeImage or existing Node that will be
                    cloned.
@type       image:  L{NodeImage} or L{Node}

@keyword    ex_network: Organisation's network name for attaching vApp VMs to.
@type       ex_network: C{str}

@keyword    ex_vdc: Name of organisation's virtual data center where vApp VMs will be deployed.
@type       ex_vdc: C{str}

@keyword    ex_vm_names: list of names to be used as a VM and computer name. The name must be max. 15 characters
                         long and follow the host name requirements.
@type       ex_vm_names: C{list} of C{str}

@keyword    ex_vm_cpu: number of virtual CPUs/cores to allocate for each vApp VM.
@type       ex_vm_cpu: C{int}

@keyword    ex_vm_memory: amount of memory in MB to allocate for each vApp VM.
@type       ex_vm_memory: C{int}

@keyword    ex_vm_script: full path to file containing guest customisation script for each vApp VM.
                          Useful for creating users & pushing out public SSH keys etc.
@type       ex_vm_script: C{str}

@keyword    ex_vm_network: Override default vApp VM network name. Useful for when you've imported an OVF
                           originating from outside of the vCloud.
@type       ex_vm_network: C{str}

@keyword    ex_vm_fence: Fence mode for connecting the vApp VM network (ex_vm_network) to the parent
                         organisation network (ex_network).
@type       ex_vm_fence: C{str}

@keyword    ex_vm_ipmode: IP address allocation mode for all vApp VM network connections.
@type       ex_vm_ipmode: C{str}

@keyword    ex_deploy: set to False if the node shouldn't be deployed (started) after creation
@type       ex_deploy: C{bool}
def _instantiate_node(self, name, image, network_elem, vdc, vm_network, vm_fence): (source)
Undocumented
def _clone_node(self, name, sourceNode, vdc): (source)
Undocumented
def ex_set_vm_cpu(self, vapp_or_vm_id, vm_cpu): (source)
Sets the number of virtual CPUs for the specified VM or VMs under the vApp. If the vapp_or_vm_id param
represents a link to an vApp all VMs that are attached to this vApp will be modified.

Please ensure that hot-adding a virtual CPU is enabled for the powered on virtual machines.
Otherwise use this method on undeployed vApp.

@keyword    vapp_or_vm_id: vApp or VM ID that will be modified. If a vApp ID is used here all attached VMs
                           will be modified
@type       vapp_or_vm_id: C{str}

@keyword    vm_cpu: number of virtual CPUs/cores to allocate for specified VMs
@type       vm_cpu: C{int}

@rtype: C{None}
def ex_set_vm_memory(self, vapp_or_vm_id, vm_memory): (source)
Sets the virtual memory in MB to allocate for the specified VM or VMs under the vApp.
If the vapp_or_vm_id param represents a link to an vApp all VMs that are attached to
this vApp will be modified.

Please ensure that hot-change of virtual memory is enabled for the powered on virtual machines.
Otherwise use this method on undeployed vApp.

@keyword    vapp_or_vm_id: vApp or VM ID that will be modified. If a vApp ID is used here all attached VMs
                           will be modified
@type       vapp_or_vm_id: C{str}

@keyword    vm_memory: virtual memory in MB to allocate for the specified VM or VMs
@type       vm_memory: C{int}

@rtype: C{None}
def ex_add_vm_disk(self, vapp_or_vm_id, vm_disk_size): (source)
Adds a virtual disk to the specified VM or VMs under the vApp. If the vapp_or_vm_id param
represents a link to an vApp all VMs that are attached to this vApp will be modified.

@keyword    vapp_or_vm_id: vApp or VM ID that will be modified. If a vApp ID is used here all attached VMs
                           will be modified
@type       vapp_or_vm_id: C{str}

@keyword    vm_disk_size: the disk capacity in GB that will be added to the specified VM or VMs
@type       vm_disk_size: C{int}

@rtype: C{None}
@staticmethod
def _validate_vm_names(names): (source)
Undocumented
@staticmethod
def _validate_vm_memory(vm_memory): (source)
Undocumented
@staticmethod
def _validate_vm_cpu(vm_cpu): (source)
Undocumented
@staticmethod
def _validate_vm_disk_size(vm_disk): (source)
Undocumented
@staticmethod
def _validate_vm_script(vm_script): (source)
Undocumented
@staticmethod
def _validate_vm_fence(vm_fence): (source)
Undocumented
@staticmethod
def _validate_vm_ipmode(vm_ipmode): (source)
Undocumented
def _change_vm_names(self, vapp_or_vm_id, vm_names): (source)
Undocumented
def _change_vm_cpu(self, vapp_or_vm_id, vm_cpu): (source)
Undocumented
def _change_vm_memory(self, vapp_or_vm_id, vm_memory): (source)
Undocumented
def _add_vm_disk(self, vapp_or_vm_id, vm_disk): (source)
Undocumented
def _change_vm_script(self, vapp_or_vm_id, vm_script): (source)
Undocumented
def _change_vm_ipmode(self, vapp_or_vm_id, vm_ipmode): (source)
Undocumented
def _get_network_href(self, network_name): (source)
Undocumented
def _get_vm_elements(self, vapp_or_vm_id): (source)
Undocumented
def _is_node(self, node_or_image): (source)
Undocumented
def _to_node(self, node_elm): (source)
Undocumented
def _to_vdc(self, vdc_elm): (source)
Undocumented
API Documentation for libcloud, generated by pydoctor at 2013-07-01 17:02:02.