You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@libcloud.apache.org by to...@apache.org on 2013/09/28 13:17:44 UTC
[2/6] Migrate API docstrings to Sphinx format.
http://git-wip-us.apache.org/repos/asf/libcloud/blob/f01e0637/libcloud/compute/drivers/vcloud.py
----------------------------------------------------------------------
diff --git a/libcloud/compute/drivers/vcloud.py b/libcloud/compute/drivers/vcloud.py
index 5687641..68ec73d 100644
--- a/libcloud/compute/drivers/vcloud.py
+++ b/libcloud/compute/drivers/vcloud.py
@@ -393,8 +393,8 @@ class VCloudNodeDriver(NodeDriver):
"""
vCloud virtual data centers (vDCs).
- @return: list of vDC objects
- @rtype: C{list} of L{Vdc}
+ :return: list of vDC objects
+ :rtype: ``list`` of :class:`Vdc`
"""
if not self._vdcs:
self.connection.check_org() # make sure the org is set. # pylint: disable-msg=E1101
@@ -556,11 +556,11 @@ class VCloudNodeDriver(NodeDriver):
List all nodes across all vDCs. Using 'vdcs' you can specify which vDCs
should be queried.
- @param vdcs: None, vDC or a list of vDCs to query. If None all vDCs
+ :param vdcs: None, vDC or a list of vDCs to query. If None all vDCs
will be queried.
- @type vdcs: L{Vdc}
+ :type vdcs: :class:`Vdc`
- @rtype: C{list} of L{Node}
+ :rtype: ``list`` of :class:`Node`
"""
if not vdcs:
vdcs = self.vdcs
@@ -689,24 +689,24 @@ class VCloudNodeDriver(NodeDriver):
"""Creates and returns node.
- @inherits: L{NodeDriver.create_node}
+ @inherits: :class:`NodeDriver.create_node`
- @keyword ex_network: link to a "Network" e.g.,
+ :keyword ex_network: link to a "Network" e.g.,
"https://services.vcloudexpress.terremark.com/api/v0.8/network/7"
- @type ex_network: C{str}
+ :type ex_network: ``str``
- @keyword ex_vdc: Name of organisation's virtual data
+ :keyword ex_vdc: Name of organisation's virtual data
center where vApp VMs will be deployed.
- @type ex_vdc: C{str}
+ :type ex_vdc: ``str``
- @keyword ex_cpus: number of virtual cpus (limit depends on provider)
- @type ex_cpus: C{int}
+ :keyword ex_cpus: number of virtual cpus (limit depends on provider)
+ :type ex_cpus: ``int``
- @keyword ex_row: ????
- @type ex_row: C{str}
+ :keyword ex_row: ????
+ :type ex_row: ``str``
- @keyword ex_group: ????
- @type ex_group: C{str}
+ :keyword ex_group: ????
+ :type ex_group: ``str``
"""
name = kwargs['name']
image = kwargs['image']
@@ -947,14 +947,14 @@ class VCloud_1_5_NodeDriver(VCloudNodeDriver):
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 node_name: The name of the node to search for
+ :type node_name: ``str``
- @param vdcs: None, vDC or a list of vDCs to search in. If None all vDCs will be searched.
- @type vdcs: L{Vdc}
+ :param vdcs: None, vDC or a list of vDCs to search in. If None all vDCs will be searched.
+ :type vdcs: :class:`Vdc`
- @return: node instance or None if not found
- @rtype: L{Node} or C{None}
+ :return: node instance or None if not found
+ :rtype: :class:`Node` or ``None``
"""
if not vdcs:
vdcs = self.vdcs
@@ -995,10 +995,10 @@ class VCloud_1_5_NodeDriver(VCloudNodeDriver):
"""
Deploys existing node. Equal to vApp "start" operation.
- @param node: The node to be deployed
- @type node: L{Node}
+ :param node: The node to be deployed
+ :type node: :class:`Node`
- @rtype: L{Node}
+ :rtype: :class:`Node`
"""
deploy_xml = ET.Element('DeployVAppParams', {'powerOn': 'true',
'xmlns': 'http://www.vmware.com/vcloud/v1.5'})
@@ -1016,10 +1016,10 @@ class VCloud_1_5_NodeDriver(VCloudNodeDriver):
"""
Undeploys existing node. Equal to vApp "stop" operation.
- @param node: The node to be deployed
- @type node: L{Node}
+ :param node: The node to be deployed
+ :type node: :class:`Node`
- @rtype: L{Node}
+ :rtype: :class:`Node`
"""
undeploy_xml = ET.Element('UndeployVAppParams', {'xmlns': 'http://www.vmware.com/vcloud/v1.5'})
undeploy_power_action_xml = ET.SubElement(undeploy_xml, 'UndeployPowerAction')
@@ -1053,10 +1053,10 @@ class VCloud_1_5_NodeDriver(VCloudNodeDriver):
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}
+ :param node: The node to be powered off
+ :type node: :class:`Node`
- @rtype: L{Node}
+ :rtype: :class:`Node`
"""
return self._perform_power_operation(node, 'powerOff')
@@ -1065,10 +1065,10 @@ class VCloud_1_5_NodeDriver(VCloudNodeDriver):
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}
+ :param node: The node to be powered on
+ :type node: :class:`Node`
- @rtype: L{Node}
+ :rtype: :class:`Node`
"""
return self._perform_power_operation(node, 'powerOn')
@@ -1077,10 +1077,10 @@ class VCloud_1_5_NodeDriver(VCloudNodeDriver):
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}
+ :param node: The node to be shut down
+ :type node: :class:`Node`
- @rtype: L{Node}
+ :rtype: :class:`Node`
"""
return self._perform_power_operation(node, 'shutdown')
@@ -1089,10 +1089,10 @@ class VCloud_1_5_NodeDriver(VCloudNodeDriver):
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}
+ :param node: The node to be suspended
+ :type node: :class:`Node`
- @rtype: L{Node}
+ :rtype: :class:`Node`
"""
return self._perform_power_operation(node, 'suspend')
@@ -1108,10 +1108,10 @@ class VCloud_1_5_NodeDriver(VCloudNodeDriver):
"""
Returns the control access settings for specified node.
- @param node: node to get the control access for
- @type node: L{Node}
+ :param node: node to get the control access for
+ :type node: :class:`Node`
- @rtype: L{ControlAccess}
+ :rtype: :class:`ControlAccess`
"""
res = self.connection.request(
'%s/controlAccess' % get_url_path(node.id))
@@ -1146,13 +1146,13 @@ class VCloud_1_5_NodeDriver(VCloudNodeDriver):
"""
Sets control access for the specified node.
- @param node: node
- @type node: L{Node}
+ :param node: node
+ :type node: :class:`Node`
- @param control_access: control access settings
- @type control_access: L{ControlAccess}
+ :param control_access: control access settings
+ :type control_access: :class:`ControlAccess`
- @rtype: C{None}
+ :rtype: ``None``
"""
xml = ET.Element('ControlAccessParams',
{'xmlns': 'http://www.vmware.com/vcloud/v1.5'})
@@ -1190,11 +1190,11 @@ class VCloud_1_5_NodeDriver(VCloudNodeDriver):
def ex_get_metadata(self, node):
"""
- @param node: node
- @type node: L{Node}
+ :param node: node
+ :type node: :class:`Node`
- @return: dictionary mapping metadata keys to metadata values
- @rtype: dictionary mapping C{str} to C{str}
+ :return: dictionary mapping metadata keys to metadata values
+ :rtype: dictionary mapping ``str`` to ``str``
"""
res = self.connection.request('%s/metadata' % (get_url_path(node.id)))
metadata_entries = res.object.findall(fixxpath(res.object, 'MetadataEntry'))
@@ -1209,16 +1209,16 @@ class VCloud_1_5_NodeDriver(VCloudNodeDriver):
def ex_set_metadata_entry(self, node, key, value):
"""
- @param node: node
- @type node: L{Node}
+ :param node: node
+ :type node: :class:`Node`
- @param key: metadata key to be set
- @type key: C{str}
+ :param key: metadata key to be set
+ :type key: ``str``
- @param value: metadata value to be set
- @type value: C{str}
+ :param value: metadata value to be set
+ :type value: ``str``
- @rtype: C{None}
+ :rtype: ``None``
"""
metadata_elem = ET.Element(
'Metadata',
@@ -1248,25 +1248,25 @@ class VCloud_1_5_NodeDriver(VCloudNodeDriver):
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 type: type to query (r.g. user, group, vApp etc.)
+ :type type: ``str``
- @param filter: filter expression (see documentation for syntax)
- @type filter: C{str}
+ :param filter: filter expression (see documentation for syntax)
+ :type filter: ``str``
- @param page: page number
- @type page: C{int}
+ :param page: page number
+ :type page: ``int``
- @param page_size: page size
- @type page_size: C{int}
+ :param page_size: page size
+ :type page_size: ``int``
- @param sort_asc: sort in ascending order by specified field
- @type sort_asc: C{str}
+ :param sort_asc: sort in ascending order by specified field
+ :type sort_asc: ``str``
- @param sort_desc: sort in descending order by specified field
- @type sort_desc: C{str}
+ :param sort_desc: sort in descending order by specified field
+ :type sort_desc: ``str``
- @rtype: C{list} of dict
+ :rtype: ``list`` of dict
"""
# This is a workaround for filter parameter encoding
# the urllib encodes (name==Developers%20Only) into
@@ -1303,52 +1303,52 @@ class VCloud_1_5_NodeDriver(VCloudNodeDriver):
resource busy error is raised.
- @inherits: L{NodeDriver.create_node}
+ @inherits: :class:`NodeDriver.create_node`
- @keyword image: OS Image to boot on node. (required). Can be a NodeImage or existing Node that will be
+ :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}
+ :type image: :class:`NodeImage` or :class:`Node`
- @keyword ex_network: Organisation's network name for attaching vApp VMs to.
- @type ex_network: C{str}
+ :keyword ex_network: Organisation's network name for attaching vApp VMs to.
+ :type ex_network: ``str``
- @keyword ex_vdc: Name of organisation's virtual data center where vApp VMs will be deployed.
- @type ex_vdc: C{str}
+ :keyword ex_vdc: Name of organisation's virtual data center where vApp VMs will be deployed.
+ :type ex_vdc: ``str``
- @keyword ex_vm_names: list of names to be used as a VM and computer name. The name must be max. 15 characters
+ :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}
+ :type ex_vm_names: ``list`` of ``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_cpu: number of virtual CPUs/cores to allocate for each vApp VM.
+ :type ex_vm_cpu: ``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_memory: amount of memory in MB to allocate for each vApp VM.
+ :type ex_vm_memory: ``int``
- @keyword ex_vm_script: full path to file containing guest customisation script for each vApp VM.
+ :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}
+ :type ex_vm_script: ``str``
- @keyword ex_vm_network: Override default vApp VM network name. Useful for when you've imported an OVF
+ :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}
+ :type ex_vm_network: ``str``
- @keyword ex_vm_fence: Fence mode for connecting the vApp VM network (ex_vm_network) to the parent
+ :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}
+ :type ex_vm_fence: ``str``
- @keyword ex_vm_ipmode: IP address allocation mode for all vApp VM network connections.
- @type ex_vm_ipmode: C{str}
+ :keyword ex_vm_ipmode: IP address allocation mode for all vApp VM network connections.
+ :type ex_vm_ipmode: ``str``
- @keyword ex_deploy: set to False if the node shouldn't be deployed (started) after creation
- @type ex_deploy: C{bool}
+ :keyword ex_deploy: set to False if the node shouldn't be deployed (started) after creation
+ :type ex_deploy: ``bool``
- @keyword ex_clone_timeout: timeout in seconds for clone/instantiate VM operation.
+ :keyword ex_clone_timeout: timeout in seconds for clone/instantiate VM operation.
Cloning might be a time consuming operation especially
when linked clones are disabled or VMs are created
on different datastores.
Overrides the default task completion value.
- @type ex_clone_timeout: C{int}
+ :type ex_clone_timeout: ``int``
"""
name = kwargs['name']
image = kwargs['image']
@@ -1518,14 +1518,14 @@ class VCloud_1_5_NodeDriver(VCloudNodeDriver):
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
+ :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}
+ :type vapp_or_vm_id: ``str``
- @keyword vm_cpu: number of virtual CPUs/cores to allocate for specified VMs
- @type vm_cpu: C{int}
+ :keyword vm_cpu: number of virtual CPUs/cores to allocate for specified VMs
+ :type vm_cpu: ``int``
- @rtype: C{None}
+ :rtype: ``None``
"""
self._validate_vm_cpu(vm_cpu)
self._change_vm_cpu(vapp_or_vm_id, vm_cpu)
@@ -1539,14 +1539,14 @@ class VCloud_1_5_NodeDriver(VCloudNodeDriver):
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
+ :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}
+ :type vapp_or_vm_id: ``str``
- @keyword vm_memory: virtual memory in MB to allocate for the specified VM or VMs
- @type vm_memory: C{int}
+ :keyword vm_memory: virtual memory in MB to allocate for the specified VM or VMs
+ :type vm_memory: ``int``
- @rtype: C{None}
+ :rtype: ``None``
"""
self._validate_vm_memory(vm_memory)
self._change_vm_memory(vapp_or_vm_id, vm_memory)
@@ -1556,14 +1556,14 @@ class VCloud_1_5_NodeDriver(VCloudNodeDriver):
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
+ :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}
+ :type vapp_or_vm_id: ``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}
+ :keyword vm_disk_size: the disk capacity in GB that will be added to the specified VM or VMs
+ :type vm_disk_size: ``int``
- @rtype: C{None}
+ :rtype: ``None``
"""
self._validate_vm_disk_size(vm_disk_size)
self._add_vm_disk(vapp_or_vm_id, vm_disk_size)
http://git-wip-us.apache.org/repos/asf/libcloud/blob/f01e0637/libcloud/compute/drivers/voxel.py
----------------------------------------------------------------------
diff --git a/libcloud/compute/drivers/voxel.py b/libcloud/compute/drivers/voxel.py
index 39fc91b..9865027 100644
--- a/libcloud/compute/drivers/voxel.py
+++ b/libcloud/compute/drivers/voxel.py
@@ -161,47 +161,47 @@ class VoxelNodeDriver(NodeDriver):
def create_node(self, **kwargs):
"""Create Voxel Node
- @keyword name: the name to assign the node (mandatory)
- @type name: C{str}
+ :keyword name: the name to assign the node (mandatory)
+ :type name: ``str``
- @keyword image: distribution to deploy
- @type image: L{NodeImage}
+ :keyword image: distribution to deploy
+ :type image: :class:`NodeImage`
- @keyword size: the plan size to create (mandatory)
+ :keyword size: the plan size to create (mandatory)
Requires size.disk (GB) to be set manually
- @type size: L{NodeSize}
+ :type size: :class:`NodeSize`
- @keyword location: which datacenter to create the node in
- @type location: L{NodeLocation}
+ :keyword location: which datacenter to create the node in
+ :type location: :class:`NodeLocation`
- @keyword ex_privateip: Backend IP address to assign to node;
+ :keyword ex_privateip: Backend IP address to assign to node;
must be chosen from the customer's
private VLAN assignment.
- @type ex_privateip: C{str}
+ :type ex_privateip: ``str``
- @keyword ex_publicip: Public-facing IP address to assign to node;
+ :keyword ex_publicip: Public-facing IP address to assign to node;
must be chosen from the customer's
public VLAN assignment.
- @type ex_publicip: C{str}
+ :type ex_publicip: ``str``
- @keyword ex_rootpass: Password for root access; generated if unset.
- @type ex_rootpass: C{str}
+ :keyword ex_rootpass: Password for root access; generated if unset.
+ :type ex_rootpass: ``str``
- @keyword ex_consolepass: Password for remote console;
+ :keyword ex_consolepass: Password for remote console;
generated if unset.
- @type ex_consolepass: C{str}
+ :type ex_consolepass: ``str``
- @keyword ex_sshuser: Username for SSH access
- @type ex_sshuser: C{str}
+ :keyword ex_sshuser: Username for SSH access
+ :type ex_sshuser: ``str``
- @keyword ex_sshpass: Password for SSH access; generated if unset.
- @type ex_sshpass: C{str}
+ :keyword ex_sshpass: Password for SSH access; generated if unset.
+ :type ex_sshpass: ``str``
- @keyword ex_voxel_access: Allow access Voxel administrative access.
+ :keyword ex_voxel_access: Allow access Voxel administrative access.
Defaults to False.
- @type ex_voxel_access: C{bool}
+ :type ex_voxel_access: ``bool``
- @rtype: L{Node} or C{None}
+ :rtype: :class:`Node` or ``None``
"""
# assert that disk > 0
http://git-wip-us.apache.org/repos/asf/libcloud/blob/f01e0637/libcloud/compute/drivers/vpsnet.py
----------------------------------------------------------------------
diff --git a/libcloud/compute/drivers/vpsnet.py b/libcloud/compute/drivers/vpsnet.py
index fb044ae..607113e 100644
--- a/libcloud/compute/drivers/vpsnet.py
+++ b/libcloud/compute/drivers/vpsnet.py
@@ -126,13 +126,13 @@ class VPSNetNodeDriver(NodeDriver):
def create_node(self, name, image, size, **kwargs):
"""Create a new VPS.net node
- @inherits: L{NodeDriver.create_node}
+ @inherits: :class:`NodeDriver.create_node`
- @keyword ex_backups_enabled: Enable automatic backups
- @type ex_backups_enabled: C{bool}
+ :keyword ex_backups_enabled: Enable automatic backups
+ :type ex_backups_enabled: ``bool``
- @keyword ex_fqdn: Fully Qualified domain of the node
- @type ex_fqdn: C{str}
+ :keyword ex_fqdn: Fully Qualified domain of the node
+ :type ex_fqdn: ``str``
"""
headers = {'Content-Type': 'application/json'}
request = {'virtual_machine':
http://git-wip-us.apache.org/repos/asf/libcloud/blob/f01e0637/libcloud/compute/ssh.py
----------------------------------------------------------------------
diff --git a/libcloud/compute/ssh.py b/libcloud/compute/ssh.py
index ea5152e..bc23e4d 100644
--- a/libcloud/compute/ssh.py
+++ b/libcloud/compute/ssh.py
@@ -44,20 +44,20 @@ class BaseSSHClient(object):
def __init__(self, hostname, port=22, username='root', password=None,
key=None, timeout=None):
"""
- @type hostname: C{str}
- @keyword hostname: Hostname or IP address to connect to.
+ :type hostname: ``str``
+ :keyword hostname: Hostname or IP address to connect to.
- @type port: C{int}
- @keyword port: TCP port to communicate on, defaults to 22.
+ :type port: ``int``
+ :keyword port: TCP port to communicate on, defaults to 22.
- @type username: C{str}
- @keyword username: Username to use, defaults to root.
+ :type username: ``str``
+ :keyword username: Username to use, defaults to root.
- @type password: C{str}
- @keyword password: Password to authenticate with.
+ :type password: ``str``
+ :keyword password: Password to authenticate with.
- @type key: C{list}
- @keyword key: Private SSH keys to authenticate with.
+ :type key: ``list``
+ :keyword key: Private SSH keys to authenticate with.
"""
self.hostname = hostname
self.port = port
@@ -70,9 +70,9 @@ class BaseSSHClient(object):
"""
Connect to the remote node over SSH.
- @return: True if the connection has been successfuly established, False
+ :return: True if the connection has been successfuly established, False
otherwise.
- @rtype: C{bool}
+ :rtype: ``bool``
"""
raise NotImplementedError(
'connect not implemented for this ssh client')
@@ -81,20 +81,20 @@ class BaseSSHClient(object):
"""
Upload a file to the remote node.
- @type path: C{str}
- @keyword path: File path on the remote node.
+ :type path: ``str``
+ :keyword path: File path on the remote node.
- @type contents: C{str}
- @keyword contents: File Contents.
+ :type contents: ``str``
+ :keyword contents: File Contents.
- @type chmod: C{int}
- @keyword chmod: chmod file to this after creation.
+ :type chmod: ``int``
+ :keyword chmod: chmod file to this after creation.
- @type mode: C{str}
- @keyword mode: Mode in which the file is opened.
+ :type mode: ``str``
+ :keyword mode: Mode in which the file is opened.
- @return: Full path to the location where a file has been saved.
- @rtype: C{str}
+ :return: Full path to the location where a file has been saved.
+ :rtype: ``str``
"""
raise NotImplementedError(
'put not implemented for this ssh client')
@@ -103,12 +103,12 @@ class BaseSSHClient(object):
"""
Delete/Unlink a file on the remote node.
- @type path: C{str}
- @keyword path: File path on the remote node.
+ :type path: ``str``
+ :keyword path: File path on the remote node.
- @return: True if the file has been successfuly deleted, False
+ :return: True if the file has been successfuly deleted, False
otherwise.
- @rtype: C{bool}
+ :rtype: ``bool``
"""
raise NotImplementedError(
'delete not implemented for this ssh client')
@@ -117,10 +117,10 @@ class BaseSSHClient(object):
"""
Run a command on a remote node.
- @type cmd: C{str}
- @keyword cmd: Command to run.
+ :type cmd: ``str``
+ :keyword cmd: Command to run.
- @return C{list} of [stdout, stderr, exit_status]
+ :return ``list`` of [stdout, stderr, exit_status]
"""
raise NotImplementedError(
'run not implemented for this ssh client')
@@ -129,9 +129,9 @@ class BaseSSHClient(object):
"""
Shutdown connection to the remote node.
- @return: True if the connection has been successfuly closed, False
+ :return: True if the connection has been successfuly closed, False
otherwise.
- @rtype: C{bool}
+ :rtype: ``bool``
"""
raise NotImplementedError(
'close not implemented for this ssh client')
@@ -316,11 +316,11 @@ class ShellOutSSHClient(BaseSSHClient):
"""
Run a command on a remote server.
- @param cmd: Command to run.
- @type cmd: C{list} of C{str}
+ :param cmd: Command to run.
+ :type cmd: ``list`` of ``str``
- @return: Command stdout, stderr and status code.
- @rtype: C{tuple}
+ :return: Command stdout, stderr and status code.
+ :rtype: ``tuple``
"""
base_cmd = self._get_base_ssh_command()
full_cmd = base_cmd + [' '.join(cmd)]
http://git-wip-us.apache.org/repos/asf/libcloud/blob/f01e0637/libcloud/compute/types.py
----------------------------------------------------------------------
diff --git a/libcloud/compute/types.py b/libcloud/compute/types.py
index c8e2fb4..926c750 100644
--- a/libcloud/compute/types.py
+++ b/libcloud/compute/types.py
@@ -39,38 +39,38 @@ class Provider(object):
"""
Defines for each of the supported providers
- @cvar DUMMY: Example provider
- @cvar EC2_US_EAST: Amazon AWS US N. Virgina
- @cvar EC2_US_WEST: Amazon AWS US N. California
- @cvar EC2_EU_WEST: Amazon AWS EU Ireland
- @cvar RACKSPACE: Rackspace next-gen OpenStack based Cloud Servers
- @cvar RACKSPACE_FIRST_GEN: Rackspace First Gen Cloud Servers
- @cvar SLICEHOST: Slicehost.com
- @cvar GCE: Google Compute Engine
- @cvar GOGRID: GoGrid
- @cvar VPSNET: VPS.net
- @cvar LINODE: Linode.com
- @cvar VCLOUD: vmware vCloud
- @cvar RIMUHOSTING: RimuHosting.com
- @cvar ECP: Enomaly
- @cvar IBM: IBM Developer Cloud
- @cvar OPENNEBULA: OpenNebula.org
- @cvar DREAMHOST: DreamHost Private Server
- @cvar CLOUDSIGMA: CloudSigma
- @cvar NIMBUS: Nimbus
- @cvar BLUEBOX: Bluebox
- @cvar OPSOURCE: Opsource Cloud
- @cvar NINEFOLD: Ninefold
- @cvar TERREMARK: Terremark
- @cvar EC2_US_WEST_OREGON: Amazon AWS US West 2 (Oregon)
- @cvar CLOUDSTACK: CloudStack
- @cvar CLOUDSIGMA_US: CloudSigma US Las Vegas
- @cvar LIBVIRT: Libvirt driver
- @cvar JOYENT: Joyent driver
- @cvar VCL: VCL driver
- @cvar KTUCLOUD: kt ucloud driver
- @cvar GRIDSPOT: Gridspot driver
- @cvar ABIQUO: Abiquo driver
+ :cvar DUMMY: Example provider
+ :cvar EC2_US_EAST: Amazon AWS US N. Virgina
+ :cvar EC2_US_WEST: Amazon AWS US N. California
+ :cvar EC2_EU_WEST: Amazon AWS EU Ireland
+ :cvar RACKSPACE: Rackspace next-gen OpenStack based Cloud Servers
+ :cvar RACKSPACE_FIRST_GEN: Rackspace First Gen Cloud Servers
+ :cvar SLICEHOST: Slicehost.com
+ :cvar GCE: Google Compute Engine
+ :cvar GOGRID: GoGrid
+ :cvar VPSNET: VPS.net
+ :cvar LINODE: Linode.com
+ :cvar VCLOUD: vmware vCloud
+ :cvar RIMUHOSTING: RimuHosting.com
+ :cvar ECP: Enomaly
+ :cvar IBM: IBM Developer Cloud
+ :cvar OPENNEBULA: OpenNebula.org
+ :cvar DREAMHOST: DreamHost Private Server
+ :cvar CLOUDSIGMA: CloudSigma
+ :cvar NIMBUS: Nimbus
+ :cvar BLUEBOX: Bluebox
+ :cvar OPSOURCE: Opsource Cloud
+ :cvar NINEFOLD: Ninefold
+ :cvar TERREMARK: Terremark
+ :cvar EC2_US_WEST_OREGON: Amazon AWS US West 2 (Oregon)
+ :cvar CLOUDSTACK: CloudStack
+ :cvar CLOUDSIGMA_US: CloudSigma US Las Vegas
+ :cvar LIBVIRT: Libvirt driver
+ :cvar JOYENT: Joyent driver
+ :cvar VCL: VCL driver
+ :cvar KTUCLOUD: kt ucloud driver
+ :cvar GRIDSPOT: Gridspot driver
+ :cvar ABIQUO: Abiquo driver
"""
DUMMY = 'dummy'
EC2 = 'ec2_us_east'
@@ -157,11 +157,11 @@ class NodeState(object):
"""
Standard states for a node
- @cvar RUNNING: Node is running
- @cvar REBOOTING: Node is rebooting
- @cvar TERMINATED: Node is terminated
- @cvar PENDING: Node is pending
- @cvar UNKNOWN: Node state is unknown
+ :cvar RUNNING: Node is running
+ :cvar REBOOTING: Node is rebooting
+ :cvar TERMINATED: Node is terminated
+ :cvar PENDING: Node is pending
+ :cvar UNKNOWN: Node state is unknown
"""
RUNNING = 0
REBOOTING = 1
@@ -174,8 +174,8 @@ class Architecture(object):
"""
Image and size architectures.
- @cvar I386: i386 (32 bt)
- @cvar X86_64: x86_64 (64 bit)
+ :cvar I386: i386 (32 bt)
+ :cvar X86_64: x86_64 (64 bit)
"""
I386 = 0
X86_X64 = 1
@@ -185,7 +185,7 @@ class DeploymentError(LibcloudError):
"""
Exception used when a Deployment Task failed.
- @ivar node: L{Node} on which this exception happened, you might want to call L{Node.destroy}
+ :ivar node: :class:`Node` on which this exception happened, you might want to call :class:`Node.destroy`
"""
def __init__(self, node, original_exception=None, driver=None):
self.node = node
@@ -200,5 +200,5 @@ class DeploymentError(LibcloudError):
% (self.node.id, str(self.value), str(self.driver))))
-"""Deprecated alias of L{DeploymentException}"""
+"""Deprecated alias of :class:`DeploymentException`"""
DeploymentException = DeploymentError
http://git-wip-us.apache.org/repos/asf/libcloud/blob/f01e0637/libcloud/dns/base.py
----------------------------------------------------------------------
diff --git a/libcloud/dns/base.py b/libcloud/dns/base.py
index 5f3ff19..fafdf56 100644
--- a/libcloud/dns/base.py
+++ b/libcloud/dns/base.py
@@ -220,7 +220,7 @@ class DNSDriver(BaseDriver):
Return a list of records for the provided zone.
:param zone: Zone to list records for.
- :type zone: L{Zone}
+ :type zone: :class:`Zone`
:return: ``list`` of :class:`Record`
"""
http://git-wip-us.apache.org/repos/asf/libcloud/blob/f01e0637/libcloud/dns/drivers/dummy.py
----------------------------------------------------------------------
diff --git a/libcloud/dns/drivers/dummy.py b/libcloud/dns/drivers/dummy.py
index 4b8117a..04da354 100644
--- a/libcloud/dns/drivers/dummy.py
+++ b/libcloud/dns/drivers/dummy.py
@@ -35,13 +35,13 @@ class DummyDNSDriver(DNSDriver):
def __init__(self, api_key, api_secret):
"""
- @param api_key: API key or username to used (required)
- @type api_key: C{str}
+ :param api_key: API key or username to used (required)
+ :type api_key: ``str``
- @param api_secret: Secret password to be used (required)
- @type api_secret: C{str}
+ :param api_secret: Secret password to be used (required)
+ :type api_secret: ``str``
- @rtype: C{None}
+ :rtype: ``None``
"""
self._zones = {}
@@ -51,7 +51,7 @@ class DummyDNSDriver(DNSDriver):
>>> driver.list_record_types()
['A']
- @inherits: L{DNSDriver.list_record_types}
+ @inherits: :class:`DNSDriver.list_record_types`
"""
return [RecordType.A]
@@ -61,7 +61,7 @@ class DummyDNSDriver(DNSDriver):
>>> driver.list_zones()
[]
- @inherits: L{DNSDriver.list_zones}
+ @inherits: :class:`DNSDriver.list_zones`
"""
return [zone['zone'] for zone in list(self._zones.values())]
@@ -88,7 +88,7 @@ class DummyDNSDriver(DNSDriver):
Traceback (most recent call last):
ZoneDoesNotExistError:
- @inherits: L{DNSDriver.get_zone}
+ @inherits: :class:`DNSDriver.get_zone`
"""
if zone_id not in self._zones:
@@ -105,7 +105,7 @@ class DummyDNSDriver(DNSDriver):
Traceback (most recent call last):
ZoneDoesNotExistError:
- @inherits: L{DNSDriver.get_record}
+ @inherits: :class:`DNSDriver.get_record`
"""
self.get_zone(zone_id=zone_id)
@@ -130,7 +130,7 @@ class DummyDNSDriver(DNSDriver):
Traceback (most recent call last):
ZoneAlreadyExistsError:
- @inherits: L{DNSDriver.create_zone}
+ @inherits: :class:`DNSDriver.create_zone`
"""
id = 'id-%s' % (domain)
@@ -159,7 +159,7 @@ class DummyDNSDriver(DNSDriver):
Traceback (most recent call last):
RecordAlreadyExistsError:
- @inherits: L{DNSDriver.create_record}
+ @inherits: :class:`DNSDriver.create_record`
"""
id = 'id-%s' % (name)
@@ -185,7 +185,7 @@ class DummyDNSDriver(DNSDriver):
Traceback (most recent call last):
ZoneDoesNotExistError:
- @inherits: L{DNSDriver.delete_zone}
+ @inherits: :class:`DNSDriver.delete_zone`
"""
self.get_zone(zone_id=zone.id)
@@ -205,7 +205,7 @@ class DummyDNSDriver(DNSDriver):
Traceback (most recent call last):
RecordDoesNotExistError:
- @inherits: L{DNSDriver.delete_record}
+ @inherits: :class:`DNSDriver.delete_record`
"""
self.get_record(zone_id=record.zone.id, record_id=record.id)
http://git-wip-us.apache.org/repos/asf/libcloud/blob/f01e0637/libcloud/dns/drivers/linode.py
----------------------------------------------------------------------
diff --git a/libcloud/dns/drivers/linode.py b/libcloud/dns/drivers/linode.py
index 567621d..0b29fe9 100644
--- a/libcloud/dns/drivers/linode.py
+++ b/libcloud/dns/drivers/linode.py
@@ -113,8 +113,6 @@ class LinodeDNSDriver(DNSDriver):
Create a new zone.
API docs: http://www.linode.com/api/dns/domain.create
-
- @inherits: C{DNSDriver.create_zone}
"""
params = {'api_action': 'domain.create', 'Type': type,
'Domain': domain}
@@ -135,8 +133,6 @@ class LinodeDNSDriver(DNSDriver):
Update an existing zone.
API docs: http://www.linode.com/api/dns/domain.update
-
- @inherits: C{DNSDriver.update_zone}
"""
params = {'api_action': 'domain.update', 'DomainID': zone.id}
@@ -164,8 +160,6 @@ class LinodeDNSDriver(DNSDriver):
Create a new record.
API docs: http://www.linode.com/api/dns/domain.resource.create
-
- @inherits: C{DNSDriver.create_record}
"""
params = {'api_action': 'domain.resource.create', 'DomainID': zone.id,
'Name': name, 'Target': data,
@@ -185,8 +179,6 @@ class LinodeDNSDriver(DNSDriver):
Update an existing record.
API docs: http://www.linode.com/api/dns/domain.resource.update
-
- @inherits: C{DNSDriver.update_record}
"""
params = {'api_action': 'domain.resource.update',
'ResourceID': record.id, 'DomainID': record.zone.id}
http://git-wip-us.apache.org/repos/asf/libcloud/blob/f01e0637/libcloud/dns/drivers/rackspace.py
----------------------------------------------------------------------
diff --git a/libcloud/dns/drivers/rackspace.py b/libcloud/dns/drivers/rackspace.py
index dd30171..973d158 100644
--- a/libcloud/dns/drivers/rackspace.py
+++ b/libcloud/dns/drivers/rackspace.py
@@ -355,11 +355,11 @@ class RackspaceDNSDriver(DNSDriver, OpenStackDriverMixin):
"""
Build a FQDN from a domain and record name.
- @param domain: Domain name.
- @type domain: C{str}
+ :param domain: Domain name.
+ :type domain: ``str``
- @param name: Record name.
- @type name: C{str}
+ :param name: Record name.
+ :type name: ``str``
"""
if name:
name = '%s.%s' % (name, domain)
@@ -372,11 +372,11 @@ class RackspaceDNSDriver(DNSDriver, OpenStackDriverMixin):
"""
Strip domain portion from the record name.
- @param domain: Domain name.
- @type domain: C{str}
+ :param domain: Domain name.
+ :type domain: ``str``
- @param name: Full record name (fqdn).
- @type name: C{str}
+ :param name: Full record name (fqdn).
+ :type name: ``str``
"""
name = name.replace('.%s' % (domain), '')
return name
http://git-wip-us.apache.org/repos/asf/libcloud/blob/f01e0637/libcloud/dns/drivers/route53.py
----------------------------------------------------------------------
diff --git a/libcloud/dns/drivers/route53.py b/libcloud/dns/drivers/route53.py
index 64918ad..cb82379 100644
--- a/libcloud/dns/drivers/route53.py
+++ b/libcloud/dns/drivers/route53.py
@@ -215,8 +215,8 @@ class Route53DNSDriver(DNSDriver):
"""
Remove all the records for the provided zone.
- @param zone: Zone to delete records for.
- @type zone: L{Zone}
+ :param zone: Zone to delete records for.
+ :type zone: :class:`Zone`
"""
deletions = []
for r in zone.list_records():
http://git-wip-us.apache.org/repos/asf/libcloud/blob/f01e0637/libcloud/dns/drivers/zerigo.py
----------------------------------------------------------------------
diff --git a/libcloud/dns/drivers/zerigo.py b/libcloud/dns/drivers/zerigo.py
index 0ff16e0..85a2cee 100644
--- a/libcloud/dns/drivers/zerigo.py
+++ b/libcloud/dns/drivers/zerigo.py
@@ -171,7 +171,7 @@ class ZerigoDNSDriver(DNSDriver):
Provider API docs:
https://www.zerigo.com/docs/apis/dns/1.1/zones/create
- @inherits: L{DNSDriver.create_zone}
+ @inherits: :class:`DNSDriver.create_zone`
"""
path = API_ROOT + 'zones.xml'
zone_elem = self._to_zone_elem(domain=domain, type=type, ttl=ttl,
@@ -189,7 +189,7 @@ class ZerigoDNSDriver(DNSDriver):
Provider API docs:
https://www.zerigo.com/docs/apis/dns/1.1/zones/update
- @inherits: L{DNSDriver.update_zone}
+ @inherits: :class:`DNSDriver.update_zone`
"""
if domain:
raise LibcloudError('Domain cannot be changed', driver=self)
@@ -218,7 +218,7 @@ class ZerigoDNSDriver(DNSDriver):
Provider API docs:
https://www.zerigo.com/docs/apis/dns/1.1/hosts/create
- @inherits: L{DNSDriver.create_record}
+ @inherits: :class:`DNSDriver.create_record`
"""
path = API_ROOT + 'zones/%s/hosts.xml' % (zone.id)
record_elem = self._to_record_elem(name=name, type=type, data=data,
@@ -265,10 +265,10 @@ class ZerigoDNSDriver(DNSDriver):
"""
Retrieve a zone object by the domain name.
- @param domain: The domain which should be used
- @type domain: C{str}
+ :param domain: The domain which should be used
+ :type domain: ``str``
- @rtype: L{Zone}
+ :rtype: :class:`Zone`
"""
path = API_ROOT + 'zones/%s.xml' % (domain)
self.connection.set_context({'resource': 'zone', 'id': domain})
@@ -280,10 +280,10 @@ class ZerigoDNSDriver(DNSDriver):
"""
Force a zone transfer.
- @param zone: Zone which should be used.
- @type zone: L{Zone}
+ :param zone: Zone which should be used.
+ :type zone: :class:`Zone`
- @rtype: L{Zone}
+ :rtype: :class:`Zone`
"""
path = API_ROOT + 'zones/%s/force_slave_axfr.xml' % (zone.id)
self.connection.set_context({'resource': 'zone', 'id': zone.id})
http://git-wip-us.apache.org/repos/asf/libcloud/blob/f01e0637/libcloud/loadbalancer/base.py
----------------------------------------------------------------------
diff --git a/libcloud/loadbalancer/base.py b/libcloud/loadbalancer/base.py
index d7d8e7d..39ada3d 100644
--- a/libcloud/loadbalancer/base.py
+++ b/libcloud/loadbalancer/base.py
@@ -162,12 +162,12 @@ class Driver(BaseDriver):
def get_balancer(self, balancer_id):
"""
- Return a L{LoadBalancer} object.
+ Return a :class:`LoadBalancer` object.
:param balancer_id: id of a load balancer you want to fetch
:type balancer_id: ``str``
- :rtype: L{LoadBalancer}
+ :rtype: :class:`LoadBalancer`
"""
raise NotImplementedError(
http://git-wip-us.apache.org/repos/asf/libcloud/blob/f01e0637/libcloud/loadbalancer/drivers/cloudstack.py
----------------------------------------------------------------------
diff --git a/libcloud/loadbalancer/drivers/cloudstack.py b/libcloud/loadbalancer/drivers/cloudstack.py
index 1cedfcc..117fc6a 100644
--- a/libcloud/loadbalancer/drivers/cloudstack.py
+++ b/libcloud/loadbalancer/drivers/cloudstack.py
@@ -42,7 +42,7 @@ class CloudStackLBDriver(CloudStackDriverMixIn, Driver):
def __init__(self, key, secret=None, secure=True, host=None,
path=None, port=None, *args, **kwargs):
"""
- @inherits: L{Driver.__init__}
+ @inherits: :class:`Driver.__init__`
"""
host = host if host else self.host
path = path if path else self.path
@@ -65,7 +65,7 @@ class CloudStackLBDriver(CloudStackDriverMixIn, Driver):
"""
We don't actually have any protocol awareness beyond TCP.
- @rtype: C{list} of C{str}
+ :rtype: ``list`` of ``str``
"""
return ['tcp']
@@ -85,13 +85,13 @@ class CloudStackLBDriver(CloudStackDriverMixIn, Driver):
algorithm=DEFAULT_ALGORITHM, location=None,
private_port=None):
"""
- @inherits: L{Driver.create_balancer}
+ @inherits: :class:`Driver.create_balancer`
- @param location: Location
- @type location: L{NodeLocation}
+ :param location: Location
+ :type location: :class:`NodeLocation`
- @param private_port: Private port
- @type private_port: C{int}
+ :param private_port: Private port
+ :type private_port: ``int``
"""
if location is None:
locations = self._sync_request('listZones')
http://git-wip-us.apache.org/repos/asf/libcloud/blob/f01e0637/libcloud/loadbalancer/drivers/gogrid.py
----------------------------------------------------------------------
diff --git a/libcloud/loadbalancer/drivers/gogrid.py b/libcloud/loadbalancer/drivers/gogrid.py
index 9c1bb98..a688f06 100644
--- a/libcloud/loadbalancer/drivers/gogrid.py
+++ b/libcloud/loadbalancer/drivers/gogrid.py
@@ -71,7 +71,7 @@ class GoGridLBDriver(BaseGoGridDriver, Driver):
def __init__(self, *args, **kwargs):
"""
- @inherits: L{Driver.__init__}
+ @inherits: :class:`Driver.__init__`
"""
super(GoGridLBDriver, self).__init__(*args, **kwargs)
@@ -86,7 +86,7 @@ class GoGridLBDriver(BaseGoGridDriver, Driver):
def ex_create_balancer_nowait(self, name, members, protocol='http',
port=80, algorithm=DEFAULT_ALGORITHM):
"""
- @inherits: L{Driver.create_balancer}
+ @inherits: :class:`Driver.create_balancer`
"""
algorithm = self._algorithm_to_value(algorithm)
@@ -199,7 +199,7 @@ class GoGridLBDriver(BaseGoGridDriver, Driver):
def _members_to_params(self, members):
"""
- Helper method to convert list of L{Member} objects
+ Helper method to convert list of :class:`Member` objects
to GET params.
"""
http://git-wip-us.apache.org/repos/asf/libcloud/blob/f01e0637/libcloud/loadbalancer/drivers/rackspace.py
----------------------------------------------------------------------
diff --git a/libcloud/loadbalancer/drivers/rackspace.py b/libcloud/loadbalancer/drivers/rackspace.py
index 1aa7fd5..656de3b 100644
--- a/libcloud/loadbalancer/drivers/rackspace.py
+++ b/libcloud/loadbalancer/drivers/rackspace.py
@@ -44,25 +44,25 @@ class RackspaceResponse(JsonResponse):
class RackspaceHealthMonitor(object):
"""
- @param type: type of load balancer. currently CONNECT (connection
+ :param type: type of load balancer. currently CONNECT (connection
monitoring), HTTP, HTTPS (connection and HTTP
monitoring) are supported.
- @type type: C{str}
+ :type type: ``str``
- @param delay: minimum seconds to wait before executing the health
+ :param delay: minimum seconds to wait before executing the health
monitor. (Must be between 1 and 3600)
- @type delay: C{int}
+ :type delay: ``int``
- @param timeout: maximum seconds to wait when establishing a
+ :param timeout: maximum seconds to wait when establishing a
connection before timing out. (Must be between 1
and 3600)
- @type timeout: C{int}
+ :type timeout: ``int``
- @param attempts_before_deactivation: Number of monitor failures
+ :param attempts_before_deactivation: Number of monitor failures
before removing a node from
rotation. (Must be between 1
and 10)
- @type attempts_before_deactivation: C{int}
+ :type attempts_before_deactivation: ``int``
"""
def __init__(self, type, delay, timeout, attempts_before_deactivation):
@@ -90,16 +90,16 @@ class RackspaceHTTPHealthMonitor(RackspaceHealthMonitor):
"""
A HTTP health monitor adds extra features to a Rackspace health monitor.
- @param path: the HTTP path to monitor.
- @type path: C{str}
+ :param path: the HTTP path to monitor.
+ :type path: ``str``
- @param body_regex: Regular expression used to evaluate the body of
+ :param body_regex: Regular expression used to evaluate the body of
the HTTP response.
- @type body_regex: C{str}
+ :type body_regex: ``str``
- @param status_regex: Regular expression used to evaluate the HTTP
+ :param status_regex: Regular expression used to evaluate the HTTP
status code of the response.
- @type status_regex: C{str}
+ :type status_regex: ``str``
"""
def __init__(self, type, delay, timeout, attempts_before_deactivation,
@@ -131,26 +131,26 @@ class RackspaceHTTPHealthMonitor(RackspaceHealthMonitor):
class RackspaceConnectionThrottle(object):
"""
- @param min_connections: Minimum number of connections per IP address
+ :param min_connections: Minimum number of connections per IP address
before applying throttling.
- @type min_connections: C{int}
+ :type min_connections: ``int``
- @param max_connections: Maximum number of of connections per IP address.
+ :param max_connections: Maximum number of of connections per IP address.
(Must be between 0 and 100000, 0 allows an
unlimited number of connections.)
- @type max_connections: C{int}
+ :type max_connections: ``int``
- @param max_connection_rate: Maximum number of connections allowed
+ :param max_connection_rate: Maximum number of connections allowed
from a single IP address within the
given rate_interval_seconds. (Must be
between 0 and 100000, 0 allows an
unlimited number of connections.)
- @type max_connection_rate: C{int}
+ :type max_connection_rate: ``int``
- @param rate_interval_seconds: Interval at which the
+ :param rate_interval_seconds: Interval at which the
max_connection_rate is enforced.
(Must be between 1 and 3600.)
- @type rate_interval_seconds: C{int}
+ :type rate_interval_seconds: ``int``
"""
def __init__(self, min_connections, max_connections,
@@ -191,15 +191,15 @@ class RackspaceAccessRule(object):
An access rule allows or denies traffic to a Load Balancer based on the
incoming IPs.
- @param id: Unique identifier to refer to this rule by.
- @type id: C{str}
+ :param id: Unique identifier to refer to this rule by.
+ :type id: ``str``
- @param rule_type: RackspaceAccessRuleType.ALLOW or
+ :param rule_type: RackspaceAccessRuleType.ALLOW or
RackspaceAccessRuleType.DENY.
- @type id: C{int}
+ :type id: ``int``
- @param address: IP address or cidr (can be IPv4 or IPv6).
- @type address: C{str}
+ :param address: IP address or cidr (can be IPv4 or IPv6).
+ :type address: ``str``
"""
def __init__(self, id=None, rule_type=None, address=None):
@@ -352,20 +352,20 @@ class RackspaceLBDriver(Driver, OpenStackDriverMixin):
"""
List protocols with default ports.
- @rtype: C{list} of C{tuple}
- @return: A list of protocols with default ports included.
+ :rtype: ``list`` of ``tuple``
+ :return: A list of protocols with default ports included.
"""
return self._to_protocols_with_default_ports(
self.connection.request('/loadbalancers/protocols').object)
def list_balancers(self, ex_member_address=None):
"""
- @inherits: L{Driver.list_balancers}
+ @inherits: :class:`Driver.list_balancers`
- @param ex_member_address: Optional IP address of the attachment member.
+ :param ex_member_address: Optional IP address of the attachment member.
If provided, only the load balancers which
have this member attached will be returned.
- @type ex_member_address: C{str}
+ :type ex_member_address: ``str``
"""
params = {}
@@ -385,27 +385,27 @@ class RackspaceLBDriver(Driver, OpenStackDriverMixin):
"""
Creates a new load balancer instance
- @param name: Name of the new load balancer (required)
- @type name: C{str}
+ :param name: Name of the new load balancer (required)
+ :type name: ``str``
- @param members: C{list} ofL{Member}s to attach to balancer
- @type members: C{list} of L{Member}
+ :param members: ``list`` of:class:`Member`s to attach to balancer
+ :type members: ``list`` of :class:`Member`
- @param protocol: Loadbalancer protocol, defaults to http.
- @type protocol: C{str}
+ :param protocol: Loadbalancer protocol, defaults to http.
+ :type protocol: ``str``
- @param port: Port the load balancer should listen on, defaults to 80
- @type port: C{str}
+ :param port: Port the load balancer should listen on, defaults to 80
+ :type port: ``str``
- @param algorithm: Load balancing algorithm, defaults to
+ :param algorithm: Load balancing algorithm, defaults to
LBAlgorithm.ROUND_ROBIN
- @type algorithm: L{Algorithm}
+ :type algorithm: :class:`Algorithm`
- @param vip: Virtual ip type of PUBLIC, SERVICENET, or ID of a virtual
+ :param vip: Virtual ip type of PUBLIC, SERVICENET, or ID of a virtual
ip
- @type vip: C{str}
+ :type vip: ``str``
- @rtype: L{LoadBalancer}
+ :rtype: :class:`LoadBalancer`
"""
balancer_attrs = self._kwargs_to_mutable_attrs(
name=name,
@@ -449,11 +449,11 @@ class RackspaceLBDriver(Driver, OpenStackDriverMixin):
"""
Destroys a list of Balancers (the API supports up to 10).
- @param balancers: A list of Balancers to destroy.
- @type balancers: C{list} of L{LoadBalancer}
+ :param balancers: A list of Balancers to destroy.
+ :type balancers: ``list`` of :class:`LoadBalancer`
- @return: Returns whether the destroy request was accepted.
- @rtype: C{bool}
+ :return: Returns whether the destroy request was accepted.
+ :rtype: ``bool``
"""
ids = [('id', balancer.id) for balancer in balancers]
resp = self.connection.request('/loadbalancers',
@@ -480,13 +480,13 @@ class RackspaceLBDriver(Driver, OpenStackDriverMixin):
"""
Attaches a list of members to a load balancer.
- @param balancer: The Balancer to which members will be attached.
- @type balancer: L{LoadBalancer}
+ :param balancer: The Balancer to which members will be attached.
+ :type balancer: :class:`LoadBalancer`
- @param members: A list of Members to attach.
- @type members: C{list} of L{Member}
+ :param members: A list of Members to attach.
+ :type members: ``list`` of :class:`Member`
- @rtype: C{list} of L{Member}
+ :rtype: ``list`` of :class:`Member`
"""
member_objects = {"nodes": [self._member_attributes(member) for member
in members]}
@@ -511,14 +511,14 @@ class RackspaceLBDriver(Driver, OpenStackDriverMixin):
This method blocks until the detach request has been processed and the
balancer is in a RUNNING state again.
- @param balancer: The Balancer to detach members from.
- @type balancer: L{LoadBalancer}
+ :param balancer: The Balancer to detach members from.
+ :type balancer: :class:`LoadBalancer`
- @param members: A list of Members to detach.
- @type members: C{list} of L{Member}
+ :param members: A list of Members to detach.
+ :type members: ``list`` of :class:`Member`
- @return: Updated Balancer.
- @rtype: L{LoadBalancer}
+ :return: Updated Balancer.
+ :rtype: :class:`LoadBalancer`
"""
accepted = self.ex_balancer_detach_members_no_poll(balancer, members)
@@ -533,14 +533,14 @@ class RackspaceLBDriver(Driver, OpenStackDriverMixin):
Detaches a list of members from a balancer (the API supports up to 10).
This method returns immediately.
- @param balancer: The Balancer to detach members from.
- @type balancer: L{LoadBalancer}
+ :param balancer: The Balancer to detach members from.
+ :type balancer: :class:`LoadBalancer`
- @param members: A list of Members to detach.
- @type members: C{list} of L{Member}
+ :param members: A list of Members to detach.
+ :type members: ``list`` of :class:`Member`
- @return: Returns whether the detach request was accepted.
- @rtype: C{bool}
+ :return: Returns whether the detach request was accepted.
+ :rtype: ``bool``
"""
uri = '/loadbalancers/%s/nodes' % (balancer.id)
ids = [('id', member.id) for member in members]
@@ -565,7 +565,7 @@ class RackspaceLBDriver(Driver, OpenStackDriverMixin):
"""
Update balancer no poll.
- @inherits: L{Driver.update_balancer}
+ @inherits: :class:`Driver.update_balancer`
"""
attrs = self._kwargs_to_mutable_attrs(**kwargs)
resp = self.connection.request(
@@ -581,21 +581,21 @@ class RackspaceLBDriver(Driver, OpenStackDriverMixin):
request has been processed and the balancer is in a RUNNING state
again.
- @param balancer: Balancer to update the member on.
- @type balancer: L{LoadBalancer}
+ :param balancer: Balancer to update the member on.
+ :type balancer: :class:`LoadBalancer`
- @param member: Member which should be used
- @type member: L{Member}
+ :param member: Member which should be used
+ :type member: :class:`Member`
- @keyword **kwargs: New attributes. Should contain either 'weight'
+ :keyword **kwargs: New attributes. Should contain either 'weight'
or 'condition'. 'condition' can be set to 'ENABLED', 'DISABLED'.
or 'DRAINING'. 'weight' can be set to a positive integer between
1 and 100, with a higher weight indicating that the node will receive
more traffic (assuming the Balancer is using a weighted algorithm).
- @type **kwargs: C{dict}
+ :type **kwargs: ``dict``
- @return: Updated Member.
- @rtype: L{Member}
+ :return: Updated Member.
+ :rtype: :class:`Member`
"""
accepted = self.ex_balancer_update_member_no_poll(
balancer, member, **kwargs)
@@ -619,21 +619,21 @@ class RackspaceLBDriver(Driver, OpenStackDriverMixin):
Updates a Member's extra attributes for a Balancer. The attribute can
include 'weight' or 'condition'. This method returns immediately.
- @param balancer: Balancer to update the member on.
- @type balancer: L{LoadBalancer}
+ :param balancer: Balancer to update the member on.
+ :type balancer: :class:`LoadBalancer`
- @param member: Member which should be used
- @type member: L{Member}
+ :param member: Member which should be used
+ :type member: :class:`Member`
- @keyword **kwargs: New attributes. Should contain either 'weight'
+ :keyword **kwargs: New attributes. Should contain either 'weight'
or 'condition'. 'condition' can be set to 'ENABLED', 'DISABLED'.
or 'DRAINING'. 'weight' can be set to a positive integer between
1 and 100, with a higher weight indicating that the node will receive
more traffic (assuming the Balancer is using a weighted algorithm).
- @type **kwargs: C{dict}
+ :type **kwargs: ``dict``
- @return: Returns whether the update request was accepted.
- @rtype: C{bool}
+ :return: Returns whether the update request was accepted.
+ :rtype: ``bool``
"""
resp = self.connection.request(
action='/loadbalancers/%s/nodes/%s' % (balancer.id, member.id),
@@ -648,7 +648,7 @@ class RackspaceLBDriver(Driver, OpenStackDriverMixin):
Lists algorithms supported by the API. Returned as strings because
this list may change in the future.
- @rtype: C{list} of C{str}
+ :rtype: ``list`` of ``str``
"""
response = self.connection.request('/loadbalancers/algorithms')
return [a["name"].upper() for a in response.object["algorithms"]]
@@ -657,10 +657,10 @@ class RackspaceLBDriver(Driver, OpenStackDriverMixin):
"""
List error page configured for the specified load balancer.
- @param balancer: Balancer which should be used
- @type balancer: L{LoadBalancer}
+ :param balancer: Balancer which should be used
+ :type balancer: :class:`LoadBalancer`
- @rtype: C{str}
+ :rtype: ``str``
"""
uri = '/loadbalancers/%s/errorpage' % (balancer.id)
resp = self.connection.request(uri)
@@ -671,10 +671,10 @@ class RackspaceLBDriver(Driver, OpenStackDriverMixin):
"""
List the access list.
- @param balancer: Balancer which should be used
- @type balancer: L{LoadBalancer}
+ :param balancer: Balancer which should be used
+ :type balancer: :class:`LoadBalancer`
- @rtype: C{list} of L{RackspaceAccessRule}
+ :rtype: ``list`` of :class:`RackspaceAccessRule`
"""
uri = '/loadbalancers/%s/accesslist' % (balancer.id)
resp = self.connection.request(uri)
@@ -700,14 +700,14 @@ class RackspaceLBDriver(Driver, OpenStackDriverMixin):
request has been processed and the balancer is in a RUNNING state
again.
- @param balancer: Balancer to update.
- @type balancer: L{LoadBalancer}
+ :param balancer: Balancer to update.
+ :type balancer: :class:`LoadBalancer`
- @param health_monitor: Health Monitor for the balancer.
- @type health_monitor: L{RackspaceHealthMonitor}
+ :param health_monitor: Health Monitor for the balancer.
+ :type health_monitor: :class:`RackspaceHealthMonitor`
- @return: Updated Balancer.
- @rtype: L{LoadBalancer}
+ :return: Updated Balancer.
+ :rtype: :class:`LoadBalancer`
"""
accepted = self.ex_update_balancer_health_monitor_no_poll(
balancer, health_monitor)
@@ -722,14 +722,14 @@ class RackspaceLBDriver(Driver, OpenStackDriverMixin):
"""
Sets a Balancer's health monitor. This method returns immediately.
- @param balancer: Balancer to update health monitor on.
- @type balancer: L{LoadBalancer}
+ :param balancer: Balancer to update health monitor on.
+ :type balancer: :class:`LoadBalancer`
- @param health_monitor: Health Monitor for the balancer.
- @type health_monitor: L{RackspaceHealthMonitor}
+ :param health_monitor: Health Monitor for the balancer.
+ :type health_monitor: :class:`RackspaceHealthMonitor`
- @return: Returns whether the update request was accepted.
- @rtype: C{bool}
+ :return: Returns whether the update request was accepted.
+ :rtype: ``bool``
"""
uri = '/loadbalancers/%s/healthmonitor' % (balancer.id)
@@ -744,11 +744,11 @@ class RackspaceLBDriver(Driver, OpenStackDriverMixin):
disable request has been processed and the balancer is in a RUNNING
state again.
- @param balancer: Balancer to disable health monitor on.
- @type balancer: L{LoadBalancer}
+ :param balancer: Balancer to disable health monitor on.
+ :type balancer: :class:`LoadBalancer`
- @return: Updated Balancer.
- @rtype: L{LoadBalancer}
+ :return: Updated Balancer.
+ :rtype: :class:`LoadBalancer`
"""
if not self.ex_disable_balancer_health_monitor_no_poll(balancer):
msg = 'Disable health monitor request not accepted'
@@ -761,11 +761,11 @@ class RackspaceLBDriver(Driver, OpenStackDriverMixin):
Disables a Balancer's health monitor. This method returns
immediately.
- @param balancer: Balancer to disable health monitor on.
- @type balancer: L{LoadBalancer}
+ :param balancer: Balancer to disable health monitor on.
+ :type balancer: :class:`LoadBalancer`
- @return: Returns whether the disable request was accepted.
- @rtype: C{bool}
+ :return: Returns whether the disable request was accepted.
+ :rtype: ``bool``
"""
uri = '/loadbalancers/%s/healthmonitor' % (balancer.id)
@@ -781,14 +781,14 @@ class RackspaceLBDriver(Driver, OpenStackDriverMixin):
the update request has been processed and the balancer is in a
RUNNING state again.
- @param balancer: Balancer to update connection throttle on.
- @type balancer: L{LoadBalancer}
+ :param balancer: Balancer to update connection throttle on.
+ :type balancer: :class:`LoadBalancer`
- @param connection_throttle: Connection Throttle for the balancer.
- @type connection_throttle: L{RackspaceConnectionThrottle}
+ :param connection_throttle: Connection Throttle for the balancer.
+ :type connection_throttle: :class:`RackspaceConnectionThrottle`
- @return: Updated Balancer.
- @rtype: L{LoadBalancer}
+ :return: Updated Balancer.
+ :rtype: :class:`LoadBalancer`
"""
accepted = self.ex_update_balancer_connection_throttle_no_poll(
balancer, connection_throttle)
@@ -805,14 +805,14 @@ class RackspaceLBDriver(Driver, OpenStackDriverMixin):
Sets a Balancer's connection throttle. This method returns
immediately.
- @param balancer: Balancer to update connection throttle on.
- @type balancer: L{LoadBalancer}
+ :param balancer: Balancer to update connection throttle on.
+ :type balancer: :class:`LoadBalancer`
- @param connection_throttle: Connection Throttle for the balancer.
- @type connection_throttle: L{RackspaceConnectionThrottle}
+ :param connection_throttle: Connection Throttle for the balancer.
+ :type connection_throttle: :class:`RackspaceConnectionThrottle`
- @return: Returns whether the update request was accepted.
- @rtype: C{bool}
+ :return: Returns whether the update request was accepted.
+ :rtype: ``bool``
"""
uri = '/loadbalancers/%s/connectionthrottle' % (balancer.id)
resp = self.connection.request(
@@ -827,11 +827,11 @@ class RackspaceLBDriver(Driver, OpenStackDriverMixin):
the disable request has been processed and the balancer is in a RUNNING
state again.
- @param balancer: Balancer to disable connection throttle on.
- @type balancer: L{LoadBalancer}
+ :param balancer: Balancer to disable connection throttle on.
+ :type balancer: :class:`LoadBalancer`
- @return: Updated Balancer.
- @rtype: L{LoadBalancer}
+ :return: Updated Balancer.
+ :rtype: :class:`LoadBalancer`
"""
if not self.ex_disable_balancer_connection_throttle_no_poll(balancer):
msg = 'Disable connection throttle request not accepted'
@@ -844,11 +844,11 @@ class RackspaceLBDriver(Driver, OpenStackDriverMixin):
Disables a Balancer's connection throttle. This method returns
immediately.
- @param balancer: Balancer to disable connection throttle on.
- @type balancer: L{LoadBalancer}
+ :param balancer: Balancer to disable connection throttle on.
+ :type balancer: :class:`LoadBalancer`
- @return: Returns whether the disable request was accepted.
- @rtype: C{bool}
+ :return: Returns whether the disable request was accepted.
+ :rtype: ``bool``
"""
uri = '/loadbalancers/%s/connectionthrottle' % (balancer.id)
resp = self.connection.request(uri, method='DELETE')
@@ -861,11 +861,11 @@ class RackspaceLBDriver(Driver, OpenStackDriverMixin):
the enable request has been processed and the balancer is in a RUNNING
state again.
- @param balancer: Balancer to enable connection logging on.
- @type balancer: L{LoadBalancer}
+ :param balancer: Balancer to enable connection logging on.
+ :type balancer: :class:`LoadBalancer`
- @return: Updated Balancer.
- @rtype: L{LoadBalancer}
+ :return: Updated Balancer.
+ :rtype: :class:`LoadBalancer`
"""
if not self.ex_enable_balancer_connection_logging_no_poll(balancer):
msg = 'Enable connection logging request not accepted'
@@ -878,11 +878,11 @@ class RackspaceLBDriver(Driver, OpenStackDriverMixin):
Enables connection logging for a Balancer. This method returns
immediately.
- @param balancer: Balancer to enable connection logging on.
- @type balancer: L{LoadBalancer}
+ :param balancer: Balancer to enable connection logging on.
+ :type balancer: :class:`LoadBalancer`
- @return: Returns whether the enable request was accepted.
- @rtype: C{bool}
+ :return: Returns whether the enable request was accepted.
+ :rtype: ``bool``
"""
uri = '/loadbalancers/%s/connectionlogging' % (balancer.id)
@@ -899,11 +899,11 @@ class RackspaceLBDriver(Driver, OpenStackDriverMixin):
the enable request has been processed and the balancer is in a RUNNING
state again.
- @param balancer: Balancer to disable connection logging on.
- @type balancer: L{LoadBalancer}
+ :param balancer: Balancer to disable connection logging on.
+ :type balancer: :class:`LoadBalancer`
- @return: Updated Balancer.
- @rtype: L{LoadBalancer}
+ :return: Updated Balancer.
+ :rtype: :class:`LoadBalancer`
"""
if not self.ex_disable_balancer_connection_logging_no_poll(balancer):
msg = 'Disable connection logging request not accepted'
@@ -916,11 +916,11 @@ class RackspaceLBDriver(Driver, OpenStackDriverMixin):
Disables connection logging for a Balancer. This method returns
immediately.
- @param balancer: Balancer to disable connection logging on.
- @type balancer: L{LoadBalancer}
+ :param balancer: Balancer to disable connection logging on.
+ :type balancer: :class:`LoadBalancer`
- @return: Returns whether the disable request was accepted.
- @rtype: C{bool}
+ :return: Returns whether the disable request was accepted.
+ :rtype: ``bool``
"""
uri = '/loadbalancers/%s/connectionlogging' % (balancer.id)
resp = self.connection.request(
@@ -936,11 +936,11 @@ class RackspaceLBDriver(Driver, OpenStackDriverMixin):
type to 'HTTP_COOKIE'. This method blocks until the enable request
has been processed and the balancer is in a RUNNING state again.
- @param balancer: Balancer to enable session persistence on.
- @type balancer: L{LoadBalancer}
+ :param balancer: Balancer to enable session persistence on.
+ :type balancer: :class:`LoadBalancer`
- @return: Updated Balancer.
- @rtype: L{LoadBalancer}
+ :return: Updated Balancer.
+ :rtype: :class:`LoadBalancer`
"""
if not self.ex_enable_balancer_session_persistence_no_poll(balancer):
msg = 'Enable session persistence request not accepted'
@@ -953,11 +953,11 @@ class RackspaceLBDriver(Driver, OpenStackDriverMixin):
Enables session persistence for a Balancer by setting the persistence
type to 'HTTP_COOKIE'. This method returns immediately.
- @param balancer: Balancer to enable session persistence on.
- @type balancer: L{LoadBalancer}
+ :param balancer: Balancer to enable session persistence on.
+ :type balancer: :class:`LoadBalancer`
- @return: Returns whether the enable request was accepted.
- @rtype: C{bool}
+ :return: Returns whether the enable request was accepted.
+ :rtype: ``bool``
"""
uri = '/loadbalancers/%s/sessionpersistence' % (balancer.id)
resp = self.connection.request(
@@ -974,11 +974,11 @@ class RackspaceLBDriver(Driver, OpenStackDriverMixin):
the disable request has been processed and the balancer is in a RUNNING
state again.
- @param balancer: Balancer to disable session persistence on.
- @type balancer: L{LoadBalancer}
+ :param balancer: Balancer to disable session persistence on.
+ :type balancer: :class:`LoadBalancer`
- @return: Updated Balancer.
- @rtype: L{LoadBalancer}
+ :return: Updated Balancer.
+ :rtype: :class:`LoadBalancer`
"""
if not self.ex_disable_balancer_session_persistence_no_poll(balancer):
msg = 'Disable session persistence request not accepted'
@@ -991,11 +991,11 @@ class RackspaceLBDriver(Driver, OpenStackDriverMixin):
Disables session persistence for a Balancer. This method returns
immediately.
- @param balancer: Balancer to disable session persistence for.
- @type balancer: L{LoadBalancer}
+ :param balancer: Balancer to disable session persistence for.
+ :type balancer: :class:`LoadBalancer`
- @return: Returns whether the disable request was accepted.
- @rtype: C{bool}
+ :return: Returns whether the disable request was accepted.
+ :rtype: ``bool``
"""
uri = '/loadbalancers/%s/sessionpersistence' % (balancer.id)
resp = self.connection.request(uri, method='DELETE')
@@ -1008,14 +1008,14 @@ class RackspaceLBDriver(Driver, OpenStackDriverMixin):
the update request has been processed and the balancer is in a
RUNNING state again.
- @param balancer: Balancer to update the custom error page for.
- @type balancer: L{LoadBalancer}
+ :param balancer: Balancer to update the custom error page for.
+ :type balancer: :class:`LoadBalancer`
- @param page_content: HTML content for the custom error page.
- @type page_content: C{str}
+ :param page_content: HTML content for the custom error page.
+ :type page_content: ``str``
- @return: Updated Balancer.
- @rtype: L{LoadBalancer}
+ :return: Updated Balancer.
+ :rtype: :class:`LoadBalancer`
"""
accepted = self.ex_update_balancer_error_page_no_poll(balancer,
page_content)
@@ -1030,14 +1030,14 @@ class RackspaceLBDriver(Driver, OpenStackDriverMixin):
Updates a Balancer's custom error page. This method returns
immediately.
- @param balancer: Balancer to update the custom error page for.
- @type balancer: L{LoadBalancer}
+ :param balancer: Balancer to update the custom error page for.
+ :type balancer: :class:`LoadBalancer`
- @param page_content: HTML content for the custom error page.
- @type page_content: C{str}
+ :param page_content: HTML content for the custom error page.
+ :type page_content: ``str``
- @return: Returns whether the update request was accepted.
- @rtype: C{bool}
+ :return: Returns whether the update request was accepted.
+ :rtype: ``bool``
"""
uri = '/loadbalancers/%s/errorpage' % (balancer.id)
resp = self.connection.request(
@@ -1054,11 +1054,11 @@ class RackspaceLBDriver(Driver, OpenStackDriverMixin):
request has been processed and the balancer is in a RUNNING state
again.
- @param balancer: Balancer to disable the custom error page for.
- @type balancer: L{LoadBalancer}
+ :param balancer: Balancer to disable the custom error page for.
+ :type balancer: :class:`LoadBalancer`
- @return: Updated Balancer.
- @rtype: L{LoadBalancer}
+ :return: Updated Balancer.
+ :rtype: :class:`LoadBalancer`
"""
if not self.ex_disable_balancer_custom_error_page_no_poll(balancer):
msg = 'Disable custom error page request not accepted'
@@ -1071,11 +1071,11 @@ class RackspaceLBDriver(Driver, OpenStackDriverMixin):
Disables a Balancer's custom error page, returning its error page to
the Rackspace-provided default. This method returns immediately.
- @param balancer: Balancer to disable the custom error page for.
- @type balancer: L{LoadBalancer}
+ :param balancer: Balancer to disable the custom error page for.
+ :type balancer: :class:`LoadBalancer`
- @return: Returns whether the disable request was accepted.
- @rtype: C{bool}
+ :return: Returns whether the disable request was accepted.
+ :rtype: ``bool``
"""
uri = '/loadbalancers/%s/errorpage' % (balancer.id)
resp = self.connection.request(uri, method='DELETE')
@@ -1090,14 +1090,14 @@ class RackspaceLBDriver(Driver, OpenStackDriverMixin):
until the update request has been processed and the balancer is in a
RUNNING state again.
- @param balancer: Balancer to create the access rule for.
- @type balancer: L{LoadBalancer}
+ :param balancer: Balancer to create the access rule for.
+ :type balancer: :class:`LoadBalancer`
- @param rule: Access Rule to add to the balancer.
- @type rule: L{RackspaceAccessRule}
+ :param rule: Access Rule to add to the balancer.
+ :type rule: :class:`RackspaceAccessRule`
- @return: The created access rule.
- @rtype: L{RackspaceAccessRule}
+ :return: The created access rule.
+ :rtype: :class:`RackspaceAccessRule`
"""
accepted = self.ex_create_balancer_access_rule_no_poll(balancer, rule)
if not accepted:
@@ -1119,14 +1119,14 @@ class RackspaceLBDriver(Driver, OpenStackDriverMixin):
Adds an access rule to a Balancer's access list. This method returns
immediately.
- @param balancer: Balancer to create the access rule for.
- @type balancer: L{LoadBalancer}
+ :param balancer: Balancer to create the access rule for.
+ :type balancer: :class:`LoadBalancer`
- @param rule: Access Rule to add to the balancer.
- @type rule: L{RackspaceAccessRule}
+ :param rule: Access Rule to add to the balancer.
+ :type rule: :class:`RackspaceAccessRule`
- @return: Returns whether the create request was accepted.
- @rtype: C{bool}
+ :return: Returns whether the create request was accepted.
+ :rtype: ``bool``
"""
uri = '/loadbalancers/%s/accesslist' % (balancer.id)
resp = self.connection.request(
@@ -1142,14 +1142,14 @@ class RackspaceLBDriver(Driver, OpenStackDriverMixin):
blocks until the update request has been processed and the balancer is
in a RUNNING state again.
- @param balancer: Balancer to create the access rule for.
- @type balancer: L{LoadBalancer}
+ :param balancer: Balancer to create the access rule for.
+ :type balancer: :class:`LoadBalancer`
- @param rules: List of L{RackspaceAccessRule} to add to the balancer.
- @type rules: C{list} of L{RackspaceAccessRule}
+ :param rules: List of :class:`RackspaceAccessRule` to add to the balancer.
+ :type rules: ``list`` of :class:`RackspaceAccessRule`
- @return: The created access rules.
- @rtype: L{RackspaceAccessRule}
+ :return: The created access rules.
+ :rtype: :class:`RackspaceAccessRule`
"""
accepted = self.ex_create_balancer_access_rules_no_poll(balancer,
rules)
@@ -1190,14 +1190,14 @@ class RackspaceLBDriver(Driver, OpenStackDriverMixin):
Adds a list of access rules to a Balancer's access list. This method
returns immediately.
- @param balancer: Balancer to create the access rule for.
- @type balancer: L{LoadBalancer}
+ :param balancer: Balancer to create the access rule for.
+ :type balancer: :class:`LoadBalancer`
- @param rules: List of L{RackspaceAccessRule} to add to the balancer.
- @type rules: C{list} of L{RackspaceAccessRule}
+ :param rules: List of :class:`RackspaceAccessRule` to add to the balancer.
+ :type rules: ``list`` of :class:`RackspaceAccessRule`
- @return: Returns whether the create request was accepted.
- @rtype: C{bool}
+ :return: Returns whether the create request was accepted.
+ :rtype: ``bool``
"""
uri = '/loadbalancers/%s/accesslist' % (balancer.id)
resp = self.connection.request(
@@ -1214,14 +1214,14 @@ class RackspaceLBDriver(Driver, OpenStackDriverMixin):
blocks until the update request has been processed and the balancer
is in a RUNNING state again.
- @param balancer: Balancer to remove the access rule from.
- @type balancer: L{LoadBalancer}
+ :param balancer: Balancer to remove the access rule from.
+ :type balancer: :class:`LoadBalancer`
- @param rule: Access Rule to remove from the balancer.
- @type rule: L{RackspaceAccessRule}
+ :param rule: Access Rule to remove from the balancer.
+ :type rule: :class:`RackspaceAccessRule`
- @return: Updated Balancer.
- @rtype: L{LoadBalancer}
+ :return: Updated Balancer.
+ :rtype: :class:`LoadBalancer`
"""
accepted = self.ex_destroy_balancer_access_rule_no_poll(balancer, rule)
if not accepted:
@@ -1235,14 +1235,14 @@ class RackspaceLBDriver(Driver, OpenStackDriverMixin):
Removes an access rule from a Balancer's access list. This method
returns immediately.
- @param balancer: Balancer to remove the access rule from.
- @type balancer: L{LoadBalancer}
+ :param balancer: Balancer to remove the access rule from.
+ :type balancer: :class:`LoadBalancer`
- @param rule: Access Rule to remove from the balancer.
- @type rule: L{RackspaceAccessRule}
+ :param rule: Access Rule to remove from the balancer.
+ :type rule: :class:`RackspaceAccessRule`
- @return: Returns whether the destroy request was accepted.
- @rtype: C{bool}
+ :return: Returns whether the destroy request was accepted.
+ :rtype: ``bool``
"""
uri = '/loadbalancers/%s/accesslist/%s' % (balancer.id, rule.id)
resp = self.connection.request(uri, method='DELETE')
@@ -1255,15 +1255,15 @@ class RackspaceLBDriver(Driver, OpenStackDriverMixin):
method blocks until the update request has been processed and the
balancer is in a RUNNING state again.
- @param balancer: Balancer to remove the access rules from.
- @type balancer: L{LoadBalancer}
+ :param balancer: Balancer to remove the access rules from.
+ :type balancer: :class:`LoadBalancer`
- @param rules: List of L{RackspaceAccessRule} objects to remove from the
+ :param rules: List of :class:`RackspaceAccessRule` objects to remove from the
balancer.
- @type rules: C{list} of L{RackspaceAccessRule}
+ :type rules: ``list`` of :class:`RackspaceAccessRule`
- @return: Updated Balancer.
- @rtype: L{LoadBalancer}
+ :return: Updated Balancer.
+ :rtype: :class:`LoadBalancer`
"""
accepted = self.ex_destroy_balancer_access_rules_no_poll(
balancer, rules)
@@ -1279,15 +1279,15 @@ class RackspaceLBDriver(Driver, OpenStackDriverMixin):
Removes a list of access rules from a Balancer's access list. This
method returns immediately.
- @param balancer: Balancer to remove the access rules from.
- @type balancer: L{LoadBalancer}
+ :param balancer: Balancer to remove the access rules from.
+ :type balancer: :class:`LoadBalancer`
- @param rules: List of L{RackspaceAccessRule} objects to remove from the
+ :param rules: List of :class:`RackspaceAccessRule` objects to remove from the
balancer.
- @type rules: C{list} of L{RackspaceAccessRule}
+ :type rules: ``list`` of :class:`RackspaceAccessRule`
- @return: Returns whether the destroy request was accepted.
- @rtype: C{bool}
+ :return: Returns whether the destroy request was accepted.
+ :rtype: ``bool``
"""
ids = [('id', rule.id) for rule in rules]
uri = '/loadbalancers/%s/accesslist' % balancer.id
@@ -1302,11 +1302,11 @@ class RackspaceLBDriver(Driver, OpenStackDriverMixin):
"""
Return current load balancer usage report.
- @param balancer: Balancer to remove the access rules from.
- @type balancer: L{LoadBalancer}
+ :param balancer: Balancer to remove the access rules from.
+ :type balancer: :class:`LoadBalancer`
- @return: Raw load balancer usage object.
- @rtype: C{dict}
+ :return: Raw load balancer usage object.
+ :rtype: ``dict``
"""
uri = '/loadbalancers/%s/usage/current' % (balancer.id)
resp = self.connection.request(uri, method='GET')
http://git-wip-us.apache.org/repos/asf/libcloud/blob/f01e0637/libcloud/loadbalancer/types.py
----------------------------------------------------------------------
diff --git a/libcloud/loadbalancer/types.py b/libcloud/loadbalancer/types.py
index 6608ca4..40246f9 100644
--- a/libcloud/loadbalancer/types.py
+++ b/libcloud/loadbalancer/types.py
@@ -45,8 +45,8 @@ class State(object):
"""
Standard states for a loadbalancer
- @cvar RUNNING: loadbalancer is running and ready to use
- @cvar UNKNOWN: loabalancer state is unknown
+ :cvar RUNNING: loadbalancer is running and ready to use
+ :cvar UNKNOWN: loabalancer state is unknown
"""
RUNNING = 0
http://git-wip-us.apache.org/repos/asf/libcloud/blob/f01e0637/libcloud/storage/base.py
----------------------------------------------------------------------
diff --git a/libcloud/storage/base.py b/libcloud/storage/base.py
index 4a965b8..b99f4be 100644
--- a/libcloud/storage/base.py
+++ b/libcloud/storage/base.py
@@ -402,7 +402,7 @@ class StorageDriver(BaseDriver):
This dictionary must contain a 'content_type' key which represents
a content type of the stored object.
- :rtype: C{object}
+ :rtype: ``object``
"""
raise NotImplementedError(
'upload_object_via_stream not implemented for this driver')
http://git-wip-us.apache.org/repos/asf/libcloud/blob/f01e0637/libcloud/storage/drivers/atmos.py
----------------------------------------------------------------------
diff --git a/libcloud/storage/drivers/atmos.py b/libcloud/storage/drivers/atmos.py
index 7f59e96..271fbef 100644
--- a/libcloud/storage/drivers/atmos.py
+++ b/libcloud/storage/drivers/atmos.py
@@ -389,16 +389,16 @@ class AtmosDriver(StorageDriver):
"""
Return a object CDN URL.
- @param obj: Object instance
- @type obj: L{Object}
+ :param obj: Object instance
+ :type obj: :class:`Object`
- @param expiry: Expiry
- @type expiry: C{str}
+ :param expiry: Expiry
+ :type expiry: ``str``
- @param use_object: Use object
- @type use_object: C{bool}
+ :param use_object: Use object
+ :type use_object: ``bool``
- @rtype: C{str}
+ :rtype: ``str``
"""
if use_object:
path = '/rest/objects' + obj.meta_data['object_id']