l.c.d.o.OpenStack_1_1_NodeDriver(OpenStackNodeDriver) : class documentation

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

Known subclasses: libcloud.compute.drivers.rackspacenova.RackspaceNovaBetaNodeDriver, libcloud.compute.drivers.rackspacenova.RackspaceNovaDfwNodeDriver, libcloud.compute.drivers.rackspacenova.RackspaceNovaLonNodeDriver, libcloud.compute.drivers.rackspacenova.RackspaceNovaOrdNodeDriver

OpenStack node driver.
Method __init__ @param key: API key or username to be used (required) @type key: C{str}
Method create_node Create a new node
Method ex_set_password Changes the administrator password for a specified server.
Method ex_rebuild Rebuild a Node.
Method ex_resize Change a node size.
Method ex_confirm_resize Confirms a pending resize action.
Method ex_revert_resize Cancels and reverts a pending resize action.
Method ex_save_image Creates a new image.
Method ex_set_server_name Sets the Node's name.
Method ex_get_metadata Get a Node's metadata.
Method ex_set_metadata Sets the Node's metadata.
Method ex_update_node Update the Node's editable attributes. The OpenStack API currently supports editing name and IPv4/IPv6 access addresses.
Method ex_list_networks Get a list of Networks that are available.
Method ex_create_network Create a new Network
Method ex_delete_network Get a list of NodeNetorks that are available.
Method ex_list_security_groups Get a list of Security Groups that are available.
Method ex_get_node_security_groups Get Security Groups of the specified server.
Method ex_create_security_group Create a new Security Group
Method ex_delete_security_group Delete a Security Group.
Method ex_create_security_group_rule Create a new Rule in a Security Group
Method ex_delete_security_group_rule Delete a Rule from a Security Group.
Method ex_get_size Get a NodeSize
Method ex_get_image Get a NodeImage
Method ex_delete_image Delete a NodeImage
Method ex_rescue Rescue a node
Method ex_unrescue Unrescue a node
Method _to_images Undocumented
Method _to_image Undocumented
Method _to_nodes Undocumented
Method _to_sizes Undocumented
Method _create_args_to_params Undocumented
Method _files_to_personality Undocumented
Method _reboot_node Undocumented
Method _to_networks Undocumented
Method _to_network Undocumented
Method _to_security_group_rules Undocumented
Method _to_security_group_rule Undocumented
Method _to_security_groups Undocumented
Method _to_security_group Undocumented
Method _node_action Undocumented
Method _update_node Updates the editable attributes of a server, which currently include its name and IPv4/IPv6 access addresses.
Method _to_node_from_obj Undocumented
Method _to_node Undocumented
Method _to_size Undocumented
Method _get_size_price Undocumented
Method _extract_image_id_from_url Undocumented

Inherited from OpenStackNodeDriver:

Method __new__ Undocumented
Method destroy_node Destroy a node.
Method reboot_node Reboot a node.
Method list_nodes List all nodes @return: list of node objects @rtype: C{list} of L{Node}
Method list_images @inherits: L{NodeDriver.list_images}
Method list_sizes List sizes on a provider
Method list_locations List data centers for a provider
Method ex_get_node_details Lists details of the specified server.
Method ex_soft_reboot_node Soft reboots the specified server
Method ex_hard_reboot_node Hard reboots the specified server
Method _ex_connection_class_kwargs Return extra connection keyword arguments which are passed to the Connection class constructor.

Inherited from NodeDriver (via OpenStackNodeDriver):

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.

Inherited from OpenStackDriverMixin (via OpenStackNodeDriver):

Method openstack_connection_kwargs @rtype: C{dict}
Method _get_argument_pairs Undocumented
def __init__(self, *args, **kwargs): (source)
@param    key:    API key or username to be used (required)
@type     key:    C{str}

@param    secret: Secret password to be used (required)
@type     secret: C{str}

@param    secure: Weither to use HTTPS or HTTP. Note: Some providers
                    only support HTTPS, and it is on by default.
@type     secure: C{bool}

@param    host: Override hostname used for connections.
@type     host: C{str}

@param    port: Override port used for connections.
@type     port: C{int}

@param    api_version: Optional API version. Only used by drivers
                         which support multiple API versions.
@type     api_version: C{str}

@rtype: C{None}
def create_node(self, **kwargs): (source)
Create a new node

@inherits:  L{NodeDriver.create_node}

@keyword    ex_metadata: Key/Value metadata to associate with a node
@type       ex_metadata: C{dict}

@keyword    ex_files:   File Path => File contents to create on
                        the no  de
@type       ex_files:   C{dict}

@keyword    ex_keyname:  Name of existing public key to inject into
                         instance
@type       ex_keyname:  C{str}

@keyword    ex_userdata: String containing user data
                         see
                         https://help.ubuntu.com/community/CloudInit
@type       ex_userdata: C{str}

@keyword    networks: The server is launched into a set of Networks.
@type       networks: L{OpenStackNetwork}

@keyword    ex_security_groups: List of security groups to assign to
                                the node
@type       ex_security_groups: C{list} of L{OpenStackSecurityGroup}
def _to_images(self, obj, ex_only_active): (source)
Undocumented
def _to_image(self, api_image): (source)
Undocumented
def _to_nodes(self, obj): (source)
Undocumented
def _to_sizes(self, obj): (source)
Undocumented
def _create_args_to_params(self, node, **kwargs): (source)
Undocumented
def _files_to_personality(self, files): (source)
Undocumented
def _reboot_node(self, node, reboot_type='SOFT'): (source)
Undocumented
def ex_set_password(self, node, password): (source)
Changes the administrator password for a specified server.

@param      node: Node to rebuild.
@type       node: L{Node}

@param      password: The administrator password.
@type       password: C{str}

@rtype: C{bool}
def ex_rebuild(self, node, image): (source)
Rebuild a Node.

@param      node: Node to rebuild.
@type       node: L{Node}

@param      image: New image to use.
@type       image: L{NodeImage}

@rtype: C{bool}
def ex_resize(self, node, size): (source)
Change a node size.

@param      node: Node to resize.
@type       node: L{Node}

@type       size: L{NodeSize}
@param      size: New size to use.

@rtype: C{bool}
def ex_confirm_resize(self, node): (source)
Confirms a pending resize action.

@param      node: Node to resize.
@type       node: L{Node}

@rtype: C{bool}
def ex_revert_resize(self, node): (source)
Cancels and reverts a pending resize action.

@param      node: Node to resize.
@type       node: L{Node}

@rtype: C{bool}
def ex_save_image(self, node, name, metadata=None): (source)
Creates a new image.

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

@param      name: The name for the new image.
@type       name: C{str}

@param      metadata: Key and value pairs for metadata.
@type       metadata: C{dict}

@rtype: L{NodeImage}
def ex_set_server_name(self, node, name): (source)
Sets the Node's name.

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

@param      name: The name of the server.
@type       name: C{str}

@rtype: L{Node}
def ex_get_metadata(self, node): (source)
Get a Node's metadata.

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

@return: Key/Value metadata associated with node.
@rtype: C{dict}
def ex_set_metadata(self, node, metadata): (source)
Sets the Node's metadata.

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

@param      metadata: Key/Value metadata to associate with a node
@type       metadata: C{dict}

@rtype: C{dict}
def ex_update_node(self, node, **node_updates): (source)
Update the Node's editable attributes.  The OpenStack API currently
supports editing name and IPv4/IPv6 access addresses.

The driver currently only supports updating the node name.

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

@keyword    name:   New name for the server
@type       name:   C{str}

@rtype: L{Node}
def _to_networks(self, obj): (source)
Undocumented
def _to_network(self, obj): (source)
Undocumented
def ex_list_networks(self): (source)
Get a list of Networks that are available.

@rtype: C{list} of L{OpenStackNetwork}
def ex_create_network(self, name, cidr): (source)
Create a new Network

@param name: Name of network which should be used
@type name: C{str}

@param cidr: cidr of network which should be used
@type cidr: C{str}

@rtype: L{OpenStackNetwork}
def ex_delete_network(self, network): (source)
Get a list of NodeNetorks that are available.

@param network: Network which should be used
@type network: L{OpenStackNetwork}

@rtype: C{bool}
def _to_security_group_rules(self, obj): (source)
Undocumented
def _to_security_group_rule(self, obj): (source)
Undocumented
def _to_security_groups(self, obj): (source)
Undocumented
def _to_security_group(self, obj): (source)
Undocumented
def ex_list_security_groups(self): (source)
Get a list of Security Groups that are available.

@rtype: C{list} of L{OpenStackSecurityGroup}
def ex_get_node_security_groups(self, node): (source)
Get Security Groups of the specified server.

@rtype: C{list} of L{OpenStackSecurityGroup}
def ex_create_security_group(self, name, description): (source)
Create a new Security Group

@param name: Name of the new Security Group
@type  name: C{str}

@param description: Description of the new Security Group
@type  description: C{str}

@rtype: L{OpenStackSecurityGroup}
def ex_delete_security_group(self, security_group): (source)
Delete a Security Group.

@param security_group: Security Group should be deleted
@type  security_group: L{OpenStackSecurityGroup}

@rtype: C{bool}
def ex_create_security_group_rule(self, security_group, ip_protocol, from_port, to_port, cidr=None, source_security_group=None): (source)
Create a new Rule in a Security Group

@param security_group: Security Group in which to add the rule
@type  security_group: L{OpenStackSecurityGroup}

@param ip_protocol: Protocol to which this rule applies
                    Examples: tcp, udp, ...
@type  ip_protocol: C{str}

@param from_port: First port of the port range
@type  from_port: C{int}

@param to_port: Last port of the port range
@type  to_port: C{int}

@param cidr: CIDR notation of the source IP range for this rule
@type  cidr: C{str}

@param source_security_group: Existing Security Group to use as the
                              source (instead of CIDR)
@type  source_security_group: L{OpenStackSecurityGroup

@rtype: L{OpenStackSecurityGroupRule}
def ex_delete_security_group_rule(self, rule): (source)
Delete a Rule from a Security Group.

@param rule: Rule should be deleted
@type  rule: L{OpenStackSecurityGroupRule}

@rtype: C{bool}
def ex_get_size(self, size_id): (source)
Get a NodeSize

@param      size_id: ID of the size which should be used
@type       size_id: C{str}

@rtype: L{NodeSize}
def ex_get_image(self, image_id): (source)
Get a NodeImage

@param      image_id: ID of the image which should be used
@type       image_id: C{str}

@rtype: L{NodeImage}
def ex_delete_image(self, image): (source)
Delete a NodeImage

@param      image: image witch should be used
@type       image: L{NodeImage}

@rtype: C{bool}
def _node_action(self, node, action, **params): (source)
Undocumented
def _update_node(self, node, **node_updates): (source)
Updates the editable attributes of a server, which currently include
its name and IPv4/IPv6 access addresses.
def _to_node_from_obj(self, obj): (source)
Undocumented
def _to_node(self, api_node): (source)
Undocumented
def _to_size(self, api_flavor, price=None, bandwidth=None): (source)
Undocumented
def _get_size_price(self, size_id): (source)
Undocumented
def _extract_image_id_from_url(self, location_header): (source)
Undocumented
def ex_rescue(self, node, password=None): (source)
Rescue a node

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

@param      password: password
@type       password: C{str}

@rtype: L{Node}
def ex_unrescue(self, node): (source)
Unrescue a node

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

@rtype: C{bool}
API Documentation for libcloud, generated by pydoctor at 2013-07-01 17:02:02.