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 2015/12/30 10:14:41 UTC
[01/11] libcloud git commit: Fix docstring issues causing sphinx
warnings.
Repository: libcloud
Updated Branches:
refs/heads/trunk 6e8ad2de6 -> 5e5f7a5f6
Fix docstring issues causing sphinx warnings.
Project: http://git-wip-us.apache.org/repos/asf/libcloud/repo
Commit: http://git-wip-us.apache.org/repos/asf/libcloud/commit/bed9fb67
Tree: http://git-wip-us.apache.org/repos/asf/libcloud/tree/bed9fb67
Diff: http://git-wip-us.apache.org/repos/asf/libcloud/diff/bed9fb67
Branch: refs/heads/trunk
Commit: bed9fb67875fec60ab829d3d23ad14c5a7069762
Parents: 6e8ad2d
Author: Tomaz Muraus <to...@tomaz.me>
Authored: Wed Dec 30 15:29:03 2015 +0800
Committer: Tomaz Muraus <to...@tomaz.me>
Committed: Wed Dec 30 15:49:02 2015 +0800
----------------------------------------------------------------------
libcloud/common/google.py | 9 +++----
libcloud/common/openstack.py | 38 +++++++++++++++++------------
libcloud/compute/deployment.py | 2 +-
libcloud/compute/drivers/abiquo.py | 4 +--
libcloud/compute/drivers/azure.py | 32 ++++++++++++------------
libcloud/compute/drivers/cloudsigma.py | 4 +--
libcloud/compute/drivers/cloudstack.py | 5 ++--
7 files changed, 51 insertions(+), 43 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/libcloud/blob/bed9fb67/libcloud/common/google.py
----------------------------------------------------------------------
diff --git a/libcloud/common/google.py b/libcloud/common/google.py
index b881506..07cf553 100644
--- a/libcloud/common/google.py
+++ b/libcloud/common/google.py
@@ -21,8 +21,8 @@ Information about setting up your Google OAUTH2 credentials:
For libcloud, there are two basic methods for authenticating to Google using
OAUTH2: Service Accounts and Client IDs for Installed Applications.
-Both are initially set up from the Cloud Console_
-_Console: https://cloud.google.com/console
+Both are initially set up from the Cloud Console Console -
+https://cloud.google.com/console
Setting up Service Account authentication (note that you need the PyCrypto
package installed to use this):
@@ -38,9 +38,7 @@ package installed to use this):
- Optionally, you may choose to Generate a PKCS12 key from the Console.
It needs to be converted to the PEM format. Please note, the PKCS12 format
is deprecated and may be removed in a future release.
- - Convert the key using OpenSSL (the default password is 'notasecret'):
- ``openssl pkcs12 -in YOURPRIVKEY.p12 -nodes -nocerts
- -passin pass:notasecret | openssl rsa -out PRIV.pem``
+ - Convert the key using OpenSSL (the default password is 'notasecret').
- Move the .pem file to a safe location.
- To Authenticate, you will need to pass the Service Account's "Email
address" in as the user_id and the path to the .pem file as the key.
@@ -66,6 +64,7 @@ Setting up Installed Application authentication:
Please remember to secure your keys and access tokens.
"""
+
from __future__ import with_statement
try:
http://git-wip-us.apache.org/repos/asf/libcloud/blob/bed9fb67/libcloud/common/openstack.py
----------------------------------------------------------------------
diff --git a/libcloud/common/openstack.py b/libcloud/common/openstack.py
index b6e6d6c..e63ee8a 100644
--- a/libcloud/common/openstack.py
+++ b/libcloud/common/openstack.py
@@ -74,40 +74,46 @@ class OpenStackBaseConnection(ConnectionUserAndKey):
:type secure: ``bool``
:param ex_force_base_url: Base URL for connection requests. If
- not specified, this will be determined by authenticating.
+ not specified, this will be determined by
+ authenticating.
:type ex_force_base_url: ``str``
:param ex_force_auth_url: Base URL for authentication requests.
:type ex_force_auth_url: ``str``
:param ex_force_auth_version: Authentication version to use. If
- not specified, defaults to AUTH_API_VERSION.
+ not specified, defaults to AUTH_API_VERSION.
:type ex_force_auth_version: ``str``
- :param ex_force_auth_token: Authentication token to use for
- connection requests. If specified, the connection will not attempt
- to authenticate, and the value of ex_force_base_url will be used to
- determine the base request URL. If ex_force_auth_token is passed in,
- ex_force_base_url must also be provided.
+ :param ex_force_auth_token: Authentication token to use for connection
+ requests. If specified, the connection will
+ not attempt to authenticate, and the value
+ of ex_force_base_url will be used to
+ determine the base request URL. If
+ ex_force_auth_token is passed in,
+ ex_force_base_url must also be provided.
:type ex_force_auth_token: ``str``
- :param ex_tenant_name: When authenticating, provide this tenant
- name to the identity service. A scoped token will be returned.
- Some cloud providers require the tenant name to be provided at
- authentication time. Others will use a default tenant if none
- is provided.
+ :param ex_tenant_name: When authenticating, provide this tenant name to the
+ identity service. A scoped token will be returned.
+ Some cloud providers require the tenant name to be
+ provided at authentication time. Others will use a
+ default tenant if none is provided.
:type ex_tenant_name: ``str``
:param ex_force_service_type: Service type to use when selecting an
- service. If not specified, a provider specific default will be used.
+ service. If not specified, a provider
+ specific default will be used.
:type ex_force_service_type: ``str``
:param ex_force_service_name: Service name to use when selecting an
- service. If not specified, a provider specific default will be used.
+ service. If not specified, a provider
+ specific default will be used.
:type ex_force_service_name: ``str``
- :param ex_force_service_region: Region to use when selecting an
- service. If not specified, a provider specific default will be used.
+ :param ex_force_service_region: Region to use when selecting an service.
+ If not specified, a provider specific
+ default will be used.
:type ex_force_service_region: ``str``
"""
http://git-wip-us.apache.org/repos/asf/libcloud/blob/bed9fb67/libcloud/compute/deployment.py
----------------------------------------------------------------------
diff --git a/libcloud/compute/deployment.py b/libcloud/compute/deployment.py
index 018c5f8..d5f7eec 100644
--- a/libcloud/compute/deployment.py
+++ b/libcloud/compute/deployment.py
@@ -246,7 +246,7 @@ class MultiStepDeployment(Deployment):
:type add: Single :class:`Deployment` or a ``list`` of
:class:`Deployment`
:keyword add: Adds this deployment to the others already in this
- object.
+ object.
"""
if add is not None:
add = add if isinstance(add, (list, tuple)) else [add]
http://git-wip-us.apache.org/repos/asf/libcloud/blob/bed9fb67/libcloud/compute/drivers/abiquo.py
----------------------------------------------------------------------
diff --git a/libcloud/compute/drivers/abiquo.py b/libcloud/compute/drivers/abiquo.py
index f8afdfd..fdcc59d 100644
--- a/libcloud/compute/drivers/abiquo.py
+++ b/libcloud/compute/drivers/abiquo.py
@@ -328,8 +328,8 @@ class AbiquoNodeDriver(NodeDriver):
"""
Destroy a group.
- Be careful! Destroying a group means destroying all the :class:`Node`s
- there and the group itself!
+ Be careful! Destroying a group means destroying all the :class:`Node`
+ instances there and the group itself!
If there is currently any action over any :class:`Node` of the
:class:`NodeGroup`, then the method will raise an exception.
http://git-wip-us.apache.org/repos/asf/libcloud/blob/bed9fb67/libcloud/compute/drivers/azure.py
----------------------------------------------------------------------
diff --git a/libcloud/compute/drivers/azure.py b/libcloud/compute/drivers/azure.py
index f55fce6..48a0654 100644
--- a/libcloud/compute/drivers/azure.py
+++ b/libcloud/compute/drivers/azure.py
@@ -954,23 +954,25 @@ class AzureNodeDriver(NodeDriver):
def ex_set_instance_endpoints(self, node, endpoints,
ex_deployment_slot="Production"):
+
"""
- endpoint = ConfigurationSetInputEndpoint(
- name='SSH',
- protocol='tcp',
- port=port,
- local_port='22',
- load_balanced_endpoint_set_name=None,
- enable_direct_server_return=False
- )
- {
- 'name': 'SSH',
- 'protocol': 'tcp',
- 'port': port,
- 'local_port': '22'
- }
- """
+ For example::
+ endpoint = ConfigurationSetInputEndpoint(
+ name='SSH',
+ protocol='tcp',
+ port=port,
+ local_port='22',
+ load_balanced_endpoint_set_name=None,
+ enable_direct_server_return=False
+ )
+ {
+ 'name': 'SSH',
+ 'protocol': 'tcp',
+ 'port': port,
+ 'local_port': '22'
+ }
+ """
ex_cloud_service_name = node.extra['ex_cloud_service_name']
vm_role_name = node.name
http://git-wip-us.apache.org/repos/asf/libcloud/blob/bed9fb67/libcloud/compute/drivers/cloudsigma.py
----------------------------------------------------------------------
diff --git a/libcloud/compute/drivers/cloudsigma.py b/libcloud/compute/drivers/cloudsigma.py
index 0b26665..02818b3 100644
--- a/libcloud/compute/drivers/cloudsigma.py
+++ b/libcloud/compute/drivers/cloudsigma.py
@@ -274,11 +274,11 @@ class CloudSigma_1_0_NodeDriver(CloudSigmaNodeDriver):
:type name: ``str``
:keyword smp: Number of virtual processors or None to calculate
- based on the cpu speed
+ based on the cpu speed.
:type smp: ``int``
:keyword nic_model: e1000, rtl8139 or virtio (is not specified,
- e1000 is used)
+ e1000 is used)
:type nic_model: ``str``
:keyword vnc_password: If not set, VNC access is disabled.
http://git-wip-us.apache.org/repos/asf/libcloud/blob/bed9fb67/libcloud/compute/drivers/cloudstack.py
----------------------------------------------------------------------
diff --git a/libcloud/compute/drivers/cloudstack.py b/libcloud/compute/drivers/cloudstack.py
index 763e3fd..33edda7 100644
--- a/libcloud/compute/drivers/cloudstack.py
+++ b/libcloud/compute/drivers/cloudstack.py
@@ -818,7 +818,7 @@ class CloudStackNetworkACL(object):
:type id ``int``
:param protocol: the protocol for the ACL rule. Valid values are
- TCP/UDP/ICMP/ALL or valid protocol number
+ TCP/UDP/ICMP/ALL or valid protocol number
:type protocol: ``string``
:param acl_id: Name of the network ACL List
@@ -837,7 +837,8 @@ class CloudStackNetworkACL(object):
:type end_port: ``str``
:param traffic_type: the traffic type for the ACL,can be Ingress
- or Egress, defaulted to Ingress if not specified
+ or Egress, defaulted to Ingress if not
+ specified
:type traffic_type: ``str``
:rtype: :class:`CloudStackNetworkACL`
[10/11] libcloud git commit: Fix exclude pattern.
Posted by to...@apache.org.
Fix exclude pattern.
Project: http://git-wip-us.apache.org/repos/asf/libcloud/repo
Commit: http://git-wip-us.apache.org/repos/asf/libcloud/commit/f5dc41b4
Tree: http://git-wip-us.apache.org/repos/asf/libcloud/tree/f5dc41b4
Diff: http://git-wip-us.apache.org/repos/asf/libcloud/diff/f5dc41b4
Branch: refs/heads/trunk
Commit: f5dc41b44dc97582159dfd00f82b172dab575d1c
Parents: 0cb8878
Author: Tomaz Muraus <to...@tomaz.me>
Authored: Wed Dec 30 17:06:56 2015 +0800
Committer: Tomaz Muraus <to...@tomaz.me>
Committed: Wed Dec 30 17:06:56 2015 +0800
----------------------------------------------------------------------
docs/conf.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/libcloud/blob/f5dc41b4/docs/conf.py
----------------------------------------------------------------------
diff --git a/docs/conf.py b/docs/conf.py
index 34c9a0d..b047c6b 100644
--- a/docs/conf.py
+++ b/docs/conf.py
@@ -80,7 +80,7 @@ release = '0.14.0-dev'
# List of patterns, relative to source directory, that match files and
# directories to ignore when looking for source files.
exclude_patterns = [
- 'docs/apidocs/modules.rst', # generated during build (orphan)
+ 'apidocs/modules.rst', # generated during build (orphan)
'_build',
'*/_*.rst'
]
[03/11] libcloud git commit: Fix more docstring issues.
Posted by to...@apache.org.
Fix more docstring issues.
Project: http://git-wip-us.apache.org/repos/asf/libcloud/repo
Commit: http://git-wip-us.apache.org/repos/asf/libcloud/commit/0a7b29ee
Tree: http://git-wip-us.apache.org/repos/asf/libcloud/tree/0a7b29ee
Diff: http://git-wip-us.apache.org/repos/asf/libcloud/diff/0a7b29ee
Branch: refs/heads/trunk
Commit: 0a7b29eea051881af51afd8e19af51df6e7ba586
Parents: 68b6c2d
Author: Tomaz Muraus <to...@tomaz.me>
Authored: Wed Dec 30 16:34:00 2015 +0800
Committer: Tomaz Muraus <to...@tomaz.me>
Committed: Wed Dec 30 16:34:00 2015 +0800
----------------------------------------------------------------------
docs/conf.py | 2 +-
libcloud/compute/drivers/gce.py | 12 ++++++------
libcloud/compute/drivers/hostvirtual.py | 9 ++++++---
libcloud/compute/drivers/ibm_sce.py | 3 +--
libcloud/compute/drivers/linode.py | 24 ++++++++++++------------
libcloud/compute/drivers/nephoscale.py | 14 +++++++-------
libcloud/compute/drivers/profitbricks.py | 2 +-
libcloud/storage/drivers/google_storage.py | 18 +++++++++++++-----
libcloud/test/compute/test_elasticstack.py | 10 ----------
9 files changed, 47 insertions(+), 47 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/libcloud/blob/0a7b29ee/docs/conf.py
----------------------------------------------------------------------
diff --git a/docs/conf.py b/docs/conf.py
index 155a30a..56b68eb 100644
--- a/docs/conf.py
+++ b/docs/conf.py
@@ -284,7 +284,7 @@ def mock_warning(self, *args, **kwargs):
original_warn_node = BuildEnvironment.warn_node
def ignore_more_than_one_target_found_errors(self, msg, node):
- if "more than one target found" in msg:
+ if 'more than one target found' in msg:
return None
return original_warn_node(self, msg, node)
http://git-wip-us.apache.org/repos/asf/libcloud/blob/0a7b29ee/libcloud/compute/drivers/gce.py
----------------------------------------------------------------------
diff --git a/libcloud/compute/drivers/gce.py b/libcloud/compute/drivers/gce.py
index 03a8320..84ac64d 100644
--- a/libcloud/compute/drivers/gce.py
+++ b/libcloud/compute/drivers/gce.py
@@ -2292,7 +2292,7 @@ class GCENodeDriver(NodeDriver):
list of dictionaries containing email
and list of scopes, e.g.
[{'email':'default',
- 'scopes':['compute', ...]}, ...]
+ 'scopes':['compute', ...]}, ...]
Scopes can either be full URLs or short
names. If not provided, use the
'default' service account email and a
@@ -2345,8 +2345,8 @@ class GCENodeDriver(NodeDriver):
:type ex_automatic_restart: ``bool`` or ``None``
:keyword ex_preemptible: Defines whether the instance is preemptible.
- (If not supplied, the instance will
- not be preemptible)
+ (If not supplied, the instance will not be
+ preemptible)
:type ex_preemptible: ``bool`` or ``None``
:return: A Node object for the new node.
@@ -2491,7 +2491,7 @@ class GCENodeDriver(NodeDriver):
list of dictionaries containing email
and list of scopes, e.g.
[{'email':'default',
- 'scopes':['compute', ...]}, ...]
+ 'scopes':['compute', ...]}, ...]
Scopes can either be full URLs or short
names. If not provided, use the
'default' service account email and a
@@ -3299,7 +3299,7 @@ class GCENodeDriver(NodeDriver):
list of dictionaries containing email
and list of scopes, e.g.
[{'email':'default',
- 'scopes':['compute', ...]}, ...]
+ 'scopes':['compute', ...]}, ...]
Scopes can either be full URLs or short
names. If not provided, use the
'default' service account email and a
@@ -4592,7 +4592,7 @@ class GCENodeDriver(NodeDriver):
list of dictionaries containing email
and list of scopes, e.g.
[{'email':'default',
- 'scopes':['compute', ...]}, ...]
+ 'scopes':['compute', ...]}, ...]
Scopes can either be full URLs or short
names. If not provided, use the
'default' service account email and a
http://git-wip-us.apache.org/repos/asf/libcloud/blob/0a7b29ee/libcloud/compute/drivers/hostvirtual.py
----------------------------------------------------------------------
diff --git a/libcloud/compute/drivers/hostvirtual.py b/libcloud/compute/drivers/hostvirtual.py
index 116a211..e56889e 100644
--- a/libcloud/compute/drivers/hostvirtual.py
+++ b/libcloud/compute/drivers/hostvirtual.py
@@ -126,8 +126,11 @@ class HostVirtualNodeDriver(NodeDriver):
return images
def create_node(self, name, image, size, **kwargs):
- """Creates a node
- Example of node creation with ssh key deployed
+ """
+ Creates a node
+
+ Example of node creation with ssh key deployed:
+
>>> from libcloud.compute.base import NodeAuthSSHKey
>>> key = open('/home/user/.ssh/id_rsa.pub').read()
>>> auth = NodeAuthSSHKey(pubkey=key)
@@ -139,7 +142,7 @@ class HostVirtualNodeDriver(NodeDriver):
>>> location = conn.list_locations()[1]
>>> name = 'markos-dev'
>>> node = conn.create_node(name, image, size, auth=auth,
- location=location)
+ >>> location=location)
"""
dc = None
http://git-wip-us.apache.org/repos/asf/libcloud/blob/0a7b29ee/libcloud/compute/drivers/ibm_sce.py
----------------------------------------------------------------------
diff --git a/libcloud/compute/drivers/ibm_sce.py b/libcloud/compute/drivers/ibm_sce.py
index 66cbec6..d01e5d4 100644
--- a/libcloud/compute/drivers/ibm_sce.py
+++ b/libcloud/compute/drivers/ibm_sce.py
@@ -132,8 +132,7 @@ class Address(object):
"""
A reserved IP address that can be attached to an instance.
Properties: id, ip, state, options(location, type, created_time, state,
- hostname, instance_ids, vlan, owner,
- mode, offering_id)
+ hostname, instance_ids, vlan, owner, mode, offering_id)
"""
def __init__(self, id, ip, state, options):
self.id = id
http://git-wip-us.apache.org/repos/asf/libcloud/blob/0a7b29ee/libcloud/compute/drivers/linode.py
----------------------------------------------------------------------
diff --git a/libcloud/compute/drivers/linode.py b/libcloud/compute/drivers/linode.py
index c3a9642..e24e367 100644
--- a/libcloud/compute/drivers/linode.py
+++ b/libcloud/compute/drivers/linode.py
@@ -55,18 +55,18 @@ class LinodeNodeDriver(NodeDriver):
Rough mapping of which is which:
- list_nodes linode.list
- reboot_node linode.reboot
- destroy_node linode.delete
- create_node linode.create, linode.update,
- linode.disk.createfromdistribution,
- linode.disk.create, linode.config.create,
- linode.ip.addprivate, linode.boot
- list_sizes avail.linodeplans
- list_images avail.distributions
- list_locations avail.datacenters
- list_volumes linode.disk.list
- destroy_volume linode.disk.delete
+ - list_nodes linode.list
+ - reboot_node linode.reboot
+ - destroy_node linode.delete
+ - create_node linode.create, linode.update,
+ linode.disk.createfromdistribution,
+ linode.disk.create, linode.config.create,
+ linode.ip.addprivate, linode.boot
+ - list_sizes avail.linodeplans
+ - list_images avail.distributions
+ - list_locations avail.datacenters
+ - list_volumes linode.disk.list
+ - destroy_volume linode.disk.delete
For more information on the Linode API, be sure to read the reference:
http://git-wip-us.apache.org/repos/asf/libcloud/blob/0a7b29ee/libcloud/compute/drivers/nephoscale.py
----------------------------------------------------------------------
diff --git a/libcloud/compute/drivers/nephoscale.py b/libcloud/compute/drivers/nephoscale.py
index 1888ac8..e06b7d3 100644
--- a/libcloud/compute/drivers/nephoscale.py
+++ b/libcloud/compute/drivers/nephoscale.py
@@ -351,13 +351,13 @@ get all keys call with no arguments')
We can also specify the location
>>> location = conn.list_locations()[0]
>>> node = conn.create_node(name=name,
- ... size=size,
- ... image=image,
- ... console_key=console_key,
- ... server_key=server_key,
- ... connect_attempts=10,
- ... nowait=True,
- ... zone=location.id)
+ >>> ... size=size,
+ >>> ... image=image,
+ >>> ... console_key=console_key,
+ >>> ... server_key=server_key,
+ >>> ... connect_attempts=10,
+ >>> ... nowait=True,
+ >>> ... zone=location.id)
"""
hostname = kwargs.get('hostname', name)
service_type = size.id
http://git-wip-us.apache.org/repos/asf/libcloud/blob/0a7b29ee/libcloud/compute/drivers/profitbricks.py
----------------------------------------------------------------------
diff --git a/libcloud/compute/drivers/profitbricks.py b/libcloud/compute/drivers/profitbricks.py
index f47fc66..697b082 100644
--- a/libcloud/compute/drivers/profitbricks.py
+++ b/libcloud/compute/drivers/profitbricks.py
@@ -248,7 +248,7 @@ class ProfitBricksNodeDriver(NodeDriver):
These are instance types that match up with what other providers support.
- You can configure disk size, core size, and memory size using the ex_
+ You can configure disk size, core size, and memory size using the ``ex_``
parameters on the create_node method.
"""
http://git-wip-us.apache.org/repos/asf/libcloud/blob/0a7b29ee/libcloud/storage/drivers/google_storage.py
----------------------------------------------------------------------
diff --git a/libcloud/storage/drivers/google_storage.py b/libcloud/storage/drivers/google_storage.py
index 8646556..ca80c97 100644
--- a/libcloud/storage/drivers/google_storage.py
+++ b/libcloud/storage/drivers/google_storage.py
@@ -113,16 +113,24 @@ class GoogleStorageDriver(BaseS3StorageDriver):
Installed App credentials, and GCE instance service accounts)
Examples:
- Service Accounts
+
+ Service Accounts::
+
driver = GoogleStorageDriver(key=client_email, secret=private_key, ...)
- Installed Application
+
+ Installed Application::
+
driver = GoogleStorageDriver(key=client_id, secret=client_secret, ...)
- From GCE instance
+
+ From GCE instance::
+
driver = GoogleStorageDriver(key=foo , secret=bar, ...)
Can also authenticate via Google Cloud Storage's S3 interoperability API.
- S3 user keys are 20 alphanumeric characters, starting with GOOG
- Example:
+ S3 user keys are 20 alphanumeric characters, starting with GOOG.
+
+ Example::
+
driver = GoogleStorageDriver(key='GOOG0123456789ABCXYZ',
secret=key_secret)
"""
http://git-wip-us.apache.org/repos/asf/libcloud/blob/0a7b29ee/libcloud/test/compute/test_elasticstack.py
----------------------------------------------------------------------
diff --git a/libcloud/test/compute/test_elasticstack.py b/libcloud/test/compute/test_elasticstack.py
index 40dea2e..4cbbbe5 100644
--- a/libcloud/test/compute/test_elasticstack.py
+++ b/libcloud/test/compute/test_elasticstack.py
@@ -34,16 +34,6 @@ class ElasticStackTestCase(object):
def setUp(self):
# Re-use ElasticHosts fixtures for the base ElasticStack platform tests
- """ElasticStack.type = Provider.ELASTICHOSTS
- ElasticStack.api_name = 'elastichosts'
-
- ElasticStackBaseConnection.host = 'test.com'
- ElasticStack.connectionCls.conn_classes = (None,
- ElasticStackMockHttp)
- ElasticStack._standard_drives = ElasticHosts._standard_drives
-
- self.driver = ElasticStack('foo', 'bar')
- """
self.mockHttp = ElasticStackMockHttp
self.mockHttp.type = None
[02/11] libcloud git commit: Try a hack to avoid warnings from
docstrings.
Posted by to...@apache.org.
Try a hack to avoid warnings from docstrings.
For now, we just want to treat, non-docstring related warnings as errors.
Project: http://git-wip-us.apache.org/repos/asf/libcloud/repo
Commit: http://git-wip-us.apache.org/repos/asf/libcloud/commit/68b6c2d5
Tree: http://git-wip-us.apache.org/repos/asf/libcloud/tree/68b6c2d5
Diff: http://git-wip-us.apache.org/repos/asf/libcloud/diff/68b6c2d5
Branch: refs/heads/trunk
Commit: 68b6c2d5d8553ead2ad278d0ce16d794c4a3776c
Parents: bed9fb6
Author: Tomaz Muraus <to...@tomaz.me>
Authored: Wed Dec 30 15:49:06 2015 +0800
Committer: Tomaz Muraus <to...@tomaz.me>
Committed: Wed Dec 30 16:13:58 2015 +0800
----------------------------------------------------------------------
docs/conf.py | 34 +++++++++++++++++++++++++++++++++-
1 file changed, 33 insertions(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/libcloud/blob/68b6c2d5/docs/conf.py
----------------------------------------------------------------------
diff --git a/docs/conf.py b/docs/conf.py
index 6bd17cb..155a30a 100644
--- a/docs/conf.py
+++ b/docs/conf.py
@@ -11,9 +11,15 @@
# All configuration values have a default; values that are commented out
# serve to show the default.
-import sys, os
+import os
+import sys
import subprocess
+from sphinx.environment import BuildEnvironment
+
+from sphinx.ext.autodoc import AutoDirective
+from sphinx.ext.autodoc import AutodocReporter
+
# Detect if we are running on read the docs
on_rtd = os.environ.get('READTHEDOCS', None) == 'True'
@@ -263,3 +269,29 @@ texinfo_documents = [
intersphinx_mapping = {'http://docs.python.org/': None}
autoclass_content = 'both'
+
+
+# Note: For now we ignore sphinx-autodoc warnings since there are too many
+# and we want at least documentation (not docstring) related warnings to be
+# reported, treated as errors and fixed.
+def noop(*args, **kwargs):
+ pass
+
+def mock_warning(self, *args, **kwargs):
+ # We re-write warning as info (level 1)
+ return self.system_message(1, *args, **kwargs)
+
+original_warn_node = BuildEnvironment.warn_node
+
+def ignore_more_than_one_target_found_errors(self, msg, node):
+ if "more than one target found" in msg:
+ return None
+
+ return original_warn_node(self, msg, node)
+
+
+# Monkey patch the original methods
+AutoDirective.warn = noop
+AutodocReporter.warning = mock_warning
+
+BuildEnvironment.warn_node = ignore_more_than_one_target_found_errors
[06/11] libcloud git commit: Add missing documentation example.
Posted by to...@apache.org.
Add missing documentation example.
Project: http://git-wip-us.apache.org/repos/asf/libcloud/repo
Commit: http://git-wip-us.apache.org/repos/asf/libcloud/commit/6d6c2301
Tree: http://git-wip-us.apache.org/repos/asf/libcloud/tree/6d6c2301
Diff: http://git-wip-us.apache.org/repos/asf/libcloud/diff/6d6c2301
Branch: refs/heads/trunk
Commit: 6d6c2301bde102f346363f00b7074521295d48f7
Parents: 0ff2a66
Author: Tomaz Muraus <to...@tomaz.me>
Authored: Wed Dec 30 16:52:40 2015 +0800
Committer: Tomaz Muraus <to...@tomaz.me>
Committed: Wed Dec 30 16:52:40 2015 +0800
----------------------------------------------------------------------
docs/examples/http_proxy/constructor_argument.py | 8 ++++++++
1 file changed, 8 insertions(+)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/libcloud/blob/6d6c2301/docs/examples/http_proxy/constructor_argument.py
----------------------------------------------------------------------
diff --git a/docs/examples/http_proxy/constructor_argument.py b/docs/examples/http_proxy/constructor_argument.py
new file mode 100644
index 0000000..7fc87ac
--- /dev/null
+++ b/docs/examples/http_proxy/constructor_argument.py
@@ -0,0 +1,8 @@
+from libcloud.compute.types import Provider
+from libcloud.compute.providers import get_driver
+
+PROXY_URL_NO_AUTH_1 = 'http://<proxy hostname 1>:<proxy port 2>'
+
+cls = get_driver(Provider.RACKSPACE)
+driver = cls('username', 'api key', region='ord',
+ http_proxy=PROXY_URL_NO_AUTH_1)
[08/11] libcloud git commit: Fix docstring issue.
Posted by to...@apache.org.
Fix docstring issue.
Project: http://git-wip-us.apache.org/repos/asf/libcloud/repo
Commit: http://git-wip-us.apache.org/repos/asf/libcloud/commit/967a11c4
Tree: http://git-wip-us.apache.org/repos/asf/libcloud/tree/967a11c4
Diff: http://git-wip-us.apache.org/repos/asf/libcloud/diff/967a11c4
Branch: refs/heads/trunk
Commit: 967a11c45b12bdc8a43598615b4b28a6cad9838c
Parents: 3dea379
Author: Tomaz Muraus <to...@tomaz.me>
Authored: Wed Dec 30 16:58:11 2015 +0800
Committer: Tomaz Muraus <to...@tomaz.me>
Committed: Wed Dec 30 16:58:11 2015 +0800
----------------------------------------------------------------------
libcloud/common/onapp.py | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/libcloud/blob/967a11c4/libcloud/common/onapp.py
----------------------------------------------------------------------
diff --git a/libcloud/common/onapp.py b/libcloud/common/onapp.py
index 990ce53..259e315 100644
--- a/libcloud/common/onapp.py
+++ b/libcloud/common/onapp.py
@@ -35,11 +35,12 @@ class OnAppConnection(ConnectionUserAndKey):
Add Basic Authentication header to all the requests.
It injects the "Authorization: Basic Base64String===" header
in each request
+
:type headers: ``dict``
:param headers: Default input headers
+
:rtype: ``dict``
- :return: Default input headers with the "Authorization"
- header
+ :return: Default input headers with the "Authorization" header.
"""
b64string = b("%s:%s" % (self.user_id, self.key))
encoded = b64encode(b64string).decode("utf-8")
[05/11] libcloud git commit: Fix syntax issues in changes.rst file.
Posted by to...@apache.org.
Fix syntax issues in changes.rst file.
Project: http://git-wip-us.apache.org/repos/asf/libcloud/repo
Commit: http://git-wip-us.apache.org/repos/asf/libcloud/commit/0ff2a667
Tree: http://git-wip-us.apache.org/repos/asf/libcloud/tree/0ff2a667
Diff: http://git-wip-us.apache.org/repos/asf/libcloud/diff/0ff2a667
Branch: refs/heads/trunk
Commit: 0ff2a66722596d6ef30f555e0fe8c36c409707f7
Parents: 4c42cc2
Author: Tomaz Muraus <to...@tomaz.me>
Authored: Wed Dec 30 16:48:23 2015 +0800
Committer: Tomaz Muraus <to...@tomaz.me>
Committed: Wed Dec 30 16:48:23 2015 +0800
----------------------------------------------------------------------
CHANGES.rst | 26 ++++++++++++++------------
1 file changed, 14 insertions(+), 12 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/libcloud/blob/0ff2a667/CHANGES.rst
----------------------------------------------------------------------
diff --git a/CHANGES.rst b/CHANGES.rst
index 22636b8..31de474 100644
--- a/CHANGES.rst
+++ b/CHANGES.rst
@@ -156,13 +156,14 @@ DNS
~~~
- RackSpace driver - New DNS driver methods:
- ex_iterate_ptr_records
- ex_get_ptr_record
- ex_create_ptr_record
- ex_update_ptr_record
- ex_delete_ptr_record
- This should cover all of the functionality offered by the Rackspace
- DNS API in regards to RDNS.
+ - ex_iterate_ptr_records
+ - ex_get_ptr_record
+ - ex_create_ptr_record
+ - ex_update_ptr_record
+ - ex_delete_ptr_record
+
+ This should cover all of the functionality offered by the Rackspace DNS API
+ in regards to RDNS.
(LIBCLOUD-780, GITHUB-652)
[Greg Hill]
@@ -628,11 +629,12 @@ Compute
[Konstantin Skaburskas]
- Various improvements in the DigitalOcean driver:
- - Increase page size to API maximum.
- - Add ``ex_create_attr`` kwarg to ``create_node`` method.
- - Update all the ``list_*`` methods to use paginated requests
- - Allow user to specify page size by passing ``ex_per_page`` argument to the
- constructor.
+ - Increase page size to API maximum.
+ - Add ``ex_create_attr`` kwarg to ``create_node`` method.
+ - Update all the ``list_*`` methods to use paginated requests
+ - Allow user to specify page size by passing ``ex_per_page`` argument to the
+ constructor.
+
(LIBCLOUD-717, GITHUB-537)
[Javier Castillo II]
[04/11] libcloud git commit: Treat sphinx warnings as errors while
building docs.
Posted by to...@apache.org.
Treat sphinx warnings as errors while building docs.
Project: http://git-wip-us.apache.org/repos/asf/libcloud/repo
Commit: http://git-wip-us.apache.org/repos/asf/libcloud/commit/4c42cc22
Tree: http://git-wip-us.apache.org/repos/asf/libcloud/tree/4c42cc22
Diff: http://git-wip-us.apache.org/repos/asf/libcloud/diff/4c42cc22
Branch: refs/heads/trunk
Commit: 4c42cc22ba0346bad3770a9a04161cb5ea04fb8e
Parents: 0a7b29e
Author: Tomaz Muraus <to...@tomaz.me>
Authored: Wed Dec 30 16:34:10 2015 +0800
Committer: Tomaz Muraus <to...@tomaz.me>
Committed: Wed Dec 30 16:34:10 2015 +0800
----------------------------------------------------------------------
tox.ini | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/libcloud/blob/4c42cc22/tox.ini
----------------------------------------------------------------------
diff --git a/tox.ini b/tox.ini
index 109c720..29dc779 100644
--- a/tox.ini
+++ b/tox.ini
@@ -27,7 +27,7 @@ deps = sphinx
changedir = docs
commands = python ../contrib/generate_provider_feature_matrix_table.py
sphinx-apidoc -d 2 ../libcloud/ -o apidocs/
- sphinx-build -b html -d {envtmpdir}/doctrees . _build/html
+ sphinx-build -W -b html -d {envtmpdir}/doctrees . _build/html
[testenv:scrape-ec2-prices]
deps = requests
[09/11] libcloud git commit: Update docs config.
Posted by to...@apache.org.
Update docs config.
Project: http://git-wip-us.apache.org/repos/asf/libcloud/repo
Commit: http://git-wip-us.apache.org/repos/asf/libcloud/commit/0cb88786
Tree: http://git-wip-us.apache.org/repos/asf/libcloud/tree/0cb88786
Diff: http://git-wip-us.apache.org/repos/asf/libcloud/diff/0cb88786
Branch: refs/heads/trunk
Commit: 0cb88786a03126086cac817d09a2af1186533700
Parents: 967a11c
Author: Tomaz Muraus <to...@tomaz.me>
Authored: Wed Dec 30 17:03:10 2015 +0800
Committer: Tomaz Muraus <to...@tomaz.me>
Committed: Wed Dec 30 17:03:10 2015 +0800
----------------------------------------------------------------------
docs/conf.py | 1 +
1 file changed, 1 insertion(+)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/libcloud/blob/0cb88786/docs/conf.py
----------------------------------------------------------------------
diff --git a/docs/conf.py b/docs/conf.py
index 56b68eb..34c9a0d 100644
--- a/docs/conf.py
+++ b/docs/conf.py
@@ -80,6 +80,7 @@ release = '0.14.0-dev'
# List of patterns, relative to source directory, that match files and
# directories to ignore when looking for source files.
exclude_patterns = [
+ 'docs/apidocs/modules.rst', # generated during build (orphan)
'_build',
'*/_*.rst'
]
[11/11] libcloud git commit: Exclude everything under apidocs/*.
Posted by to...@apache.org.
Exclude everything under apidocs/*.
Project: http://git-wip-us.apache.org/repos/asf/libcloud/repo
Commit: http://git-wip-us.apache.org/repos/asf/libcloud/commit/5e5f7a5f
Tree: http://git-wip-us.apache.org/repos/asf/libcloud/tree/5e5f7a5f
Diff: http://git-wip-us.apache.org/repos/asf/libcloud/diff/5e5f7a5f
Branch: refs/heads/trunk
Commit: 5e5f7a5f603361ff4f7e56de5308668f60ce3053
Parents: f5dc41b
Author: Tomaz Muraus <to...@tomaz.me>
Authored: Wed Dec 30 17:09:25 2015 +0800
Committer: Tomaz Muraus <to...@tomaz.me>
Committed: Wed Dec 30 17:09:53 2015 +0800
----------------------------------------------------------------------
docs/conf.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/libcloud/blob/5e5f7a5f/docs/conf.py
----------------------------------------------------------------------
diff --git a/docs/conf.py b/docs/conf.py
index b047c6b..f1e53d8 100644
--- a/docs/conf.py
+++ b/docs/conf.py
@@ -80,7 +80,7 @@ release = '0.14.0-dev'
# List of patterns, relative to source directory, that match files and
# directories to ignore when looking for source files.
exclude_patterns = [
- 'apidocs/modules.rst', # generated during build (orphan)
+ 'apidocs/*', # generated during build (orphans)
'_build',
'*/_*.rst'
]
[07/11] libcloud git commit: Re-generate supported providers tables.
Posted by to...@apache.org.
Re-generate supported providers tables.
Project: http://git-wip-us.apache.org/repos/asf/libcloud/repo
Commit: http://git-wip-us.apache.org/repos/asf/libcloud/commit/3dea379b
Tree: http://git-wip-us.apache.org/repos/asf/libcloud/tree/3dea379b
Diff: http://git-wip-us.apache.org/repos/asf/libcloud/diff/3dea379b
Branch: refs/heads/trunk
Commit: 3dea379bc807ad899bdf1cdb6b8d8c131c1ced5a
Parents: 6d6c230
Author: Tomaz Muraus <to...@tomaz.me>
Authored: Wed Dec 30 16:52:55 2015 +0800
Committer: Tomaz Muraus <to...@tomaz.me>
Committed: Wed Dec 30 16:52:55 2015 +0800
----------------------------------------------------------------------
docs/compute/_supported_methods_block_storage.rst | 2 ++
docs/compute/_supported_methods_image_management.rst | 2 ++
docs/compute/_supported_methods_key_pair_management.rst | 2 ++
docs/compute/_supported_methods_main.rst | 2 ++
docs/compute/_supported_providers.rst | 2 ++
5 files changed, 10 insertions(+)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/libcloud/blob/3dea379b/docs/compute/_supported_methods_block_storage.rst
----------------------------------------------------------------------
diff --git a/docs/compute/_supported_methods_block_storage.rst b/docs/compute/_supported_methods_block_storage.rst
index f7e8c69..e2f34ed 100644
--- a/docs/compute/_supported_methods_block_storage.rst
+++ b/docs/compute/_supported_methods_block_storage.rst
@@ -13,6 +13,7 @@ Provider list volumes create volume destroy volume
`CloudStack`_ yes yes yes yes yes no yes
`Cloudwatt`_ yes yes yes yes yes yes yes
`DigitalOcean`_ no no no no no no no
+`DimensionData`_ no no no no no no no
`Amazon EC2`_ yes yes yes yes yes yes yes
`Amazon EC2 (ap-northeast-1)`_ yes yes yes yes yes yes yes
`Amazon EC2 (ap-southeast-1)`_ yes yes yes yes yes yes yes
@@ -84,6 +85,7 @@ Provider list volumes create volume destroy volume
.. _`CloudStack`: http://cloudstack.org/
.. _`Cloudwatt`: https://www.cloudwatt.com/
.. _`DigitalOcean`: https://www.digitalocean.com
+.. _`DimensionData`: http://www.dimensiondata.com/
.. _`Amazon EC2`: http://aws.amazon.com/ec2/
.. _`Amazon EC2 (ap-northeast-1)`: http://aws.amazon.com/ec2/
.. _`Amazon EC2 (ap-southeast-1)`: http://aws.amazon.com/ec2/
http://git-wip-us.apache.org/repos/asf/libcloud/blob/3dea379b/docs/compute/_supported_methods_image_management.rst
----------------------------------------------------------------------
diff --git a/docs/compute/_supported_methods_image_management.rst b/docs/compute/_supported_methods_image_management.rst
index 7c60f7a..bcd6d6b 100644
--- a/docs/compute/_supported_methods_image_management.rst
+++ b/docs/compute/_supported_methods_image_management.rst
@@ -13,6 +13,7 @@ Provider list images get image create image delete
`CloudStack`_ yes no no no no
`Cloudwatt`_ yes yes yes yes no
`DigitalOcean`_ yes yes yes yes no
+`DimensionData`_ yes no no no no
`Amazon EC2`_ yes yes yes yes yes
`Amazon EC2 (ap-northeast-1)`_ yes yes yes yes yes
`Amazon EC2 (ap-southeast-1)`_ yes yes yes yes yes
@@ -84,6 +85,7 @@ Provider list images get image create image delete
.. _`CloudStack`: http://cloudstack.org/
.. _`Cloudwatt`: https://www.cloudwatt.com/
.. _`DigitalOcean`: https://www.digitalocean.com
+.. _`DimensionData`: http://www.dimensiondata.com/
.. _`Amazon EC2`: http://aws.amazon.com/ec2/
.. _`Amazon EC2 (ap-northeast-1)`: http://aws.amazon.com/ec2/
.. _`Amazon EC2 (ap-southeast-1)`: http://aws.amazon.com/ec2/
http://git-wip-us.apache.org/repos/asf/libcloud/blob/3dea379b/docs/compute/_supported_methods_key_pair_management.rst
----------------------------------------------------------------------
diff --git a/docs/compute/_supported_methods_key_pair_management.rst b/docs/compute/_supported_methods_key_pair_management.rst
index d39e3cf..b0cfce4 100644
--- a/docs/compute/_supported_methods_key_pair_management.rst
+++ b/docs/compute/_supported_methods_key_pair_management.rst
@@ -13,6 +13,7 @@ Provider list key pairs get key pair create key pai
`CloudStack`_ yes yes yes yes no yes
`Cloudwatt`_ yes yes yes yes no yes
`DigitalOcean`_ yes yes yes no no yes
+`DimensionData`_ no no no no no no
`Amazon EC2`_ yes yes yes yes no yes
`Amazon EC2 (ap-northeast-1)`_ yes yes yes yes no yes
`Amazon EC2 (ap-southeast-1)`_ yes yes yes yes no yes
@@ -84,6 +85,7 @@ Provider list key pairs get key pair create key pai
.. _`CloudStack`: http://cloudstack.org/
.. _`Cloudwatt`: https://www.cloudwatt.com/
.. _`DigitalOcean`: https://www.digitalocean.com
+.. _`DimensionData`: http://www.dimensiondata.com/
.. _`Amazon EC2`: http://aws.amazon.com/ec2/
.. _`Amazon EC2 (ap-northeast-1)`: http://aws.amazon.com/ec2/
.. _`Amazon EC2 (ap-southeast-1)`: http://aws.amazon.com/ec2/
http://git-wip-us.apache.org/repos/asf/libcloud/blob/3dea379b/docs/compute/_supported_methods_main.rst
----------------------------------------------------------------------
diff --git a/docs/compute/_supported_methods_main.rst b/docs/compute/_supported_methods_main.rst
index 1ad3620..67c8966 100644
--- a/docs/compute/_supported_methods_main.rst
+++ b/docs/compute/_supported_methods_main.rst
@@ -13,6 +13,7 @@ Provider list nodes create node reboot node destroy
`CloudStack`_ yes yes yes yes yes yes yes
`Cloudwatt`_ yes yes yes yes yes yes yes
`DigitalOcean`_ yes yes yes yes yes yes no
+`DimensionData`_ yes yes yes yes yes yes yes
`Amazon EC2`_ yes yes yes yes yes yes yes
`Amazon EC2 (ap-northeast-1)`_ yes yes yes yes yes yes yes
`Amazon EC2 (ap-southeast-1)`_ yes yes yes yes yes yes yes
@@ -84,6 +85,7 @@ Provider list nodes create node reboot node destroy
.. _`CloudStack`: http://cloudstack.org/
.. _`Cloudwatt`: https://www.cloudwatt.com/
.. _`DigitalOcean`: https://www.digitalocean.com
+.. _`DimensionData`: http://www.dimensiondata.com/
.. _`Amazon EC2`: http://aws.amazon.com/ec2/
.. _`Amazon EC2 (ap-northeast-1)`: http://aws.amazon.com/ec2/
.. _`Amazon EC2 (ap-southeast-1)`: http://aws.amazon.com/ec2/
http://git-wip-us.apache.org/repos/asf/libcloud/blob/3dea379b/docs/compute/_supported_providers.rst
----------------------------------------------------------------------
diff --git a/docs/compute/_supported_providers.rst b/docs/compute/_supported_providers.rst
index 337bcef..ab7b9d9 100644
--- a/docs/compute/_supported_providers.rst
+++ b/docs/compute/_supported_providers.rst
@@ -13,6 +13,7 @@ Provider Documentation
`CloudStack`_ :doc:`Click </compute/drivers/cloudstack>` CLOUDSTACK :mod:`libcloud.compute.drivers.cloudstack` :class:`CloudStackNodeDriver`
`Cloudwatt`_ :doc:`Click </compute/drivers/cloudwatt>` CLOUDWATT :mod:`libcloud.compute.drivers.cloudwatt` :class:`CloudwattNodeDriver`
`DigitalOcean`_ :doc:`Click </compute/drivers/digital_ocean>` DIGITAL_OCEAN :mod:`libcloud.compute.drivers.digitalocean` :class:`DigitalOceanNodeDriver`
+`DimensionData`_ :doc:`Click </compute/drivers/dimensiondata>` DIMENSIONDATA :mod:`libcloud.compute.drivers.dimensiondata` :class:`DimensionDataNodeDriver`
`Amazon EC2`_ :doc:`Click </compute/drivers/ec2>` EC2 :mod:`libcloud.compute.drivers.ec2` :class:`EC2NodeDriver`
`Amazon EC2 (ap-northeast-1)`_ EC2_AP_NORTHEAST :mod:`libcloud.compute.drivers.ec2` :class:`EC2APNENodeDriver`
`Amazon EC2 (ap-southeast-1)`_ EC2_AP_SOUTHEAST :mod:`libcloud.compute.drivers.ec2` :class:`EC2APSENodeDriver`
@@ -84,6 +85,7 @@ Provider Documentation
.. _`CloudStack`: http://cloudstack.org/
.. _`Cloudwatt`: https://www.cloudwatt.com/
.. _`DigitalOcean`: https://www.digitalocean.com
+.. _`DimensionData`: http://www.dimensiondata.com/
.. _`Amazon EC2`: http://aws.amazon.com/ec2/
.. _`Amazon EC2 (ap-northeast-1)`: http://aws.amazon.com/ec2/
.. _`Amazon EC2 (ap-southeast-1)`: http://aws.amazon.com/ec2/