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 2016/04/19 20:45:39 UTC

[1/8] libcloud git commit: Run pylint on libcloud/dns/.

Repository: libcloud
Updated Branches:
  refs/heads/trunk 582497a22 -> df34f3543


Run pylint on libcloud/dns/.


Project: http://git-wip-us.apache.org/repos/asf/libcloud/repo
Commit: http://git-wip-us.apache.org/repos/asf/libcloud/commit/3bb3d8d9
Tree: http://git-wip-us.apache.org/repos/asf/libcloud/tree/3bb3d8d9
Diff: http://git-wip-us.apache.org/repos/asf/libcloud/diff/3bb3d8d9

Branch: refs/heads/trunk
Commit: 3bb3d8d90e0f49e0a35a75054c8421f41c2d949b
Parents: 582497a
Author: Tomaz Muraus <to...@tomaz.me>
Authored: Tue Apr 19 18:57:14 2016 +0200
Committer: Tomaz Muraus <to...@tomaz.me>
Committed: Tue Apr 19 18:57:14 2016 +0200

----------------------------------------------------------------------
 requirements-tests.txt | 2 ++
 tox.ini                | 4 ++--
 2 files changed, 4 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/libcloud/blob/3bb3d8d9/requirements-tests.txt
----------------------------------------------------------------------
diff --git a/requirements-tests.txt b/requirements-tests.txt
index 791dfb5..3132256 100644
--- a/requirements-tests.txt
+++ b/requirements-tests.txt
@@ -1,3 +1,5 @@
 pep8>=1.7.0,<1.8
 flake8>=2.5.1,<2.6
+astroid>=1.4.5,<1.5
+pylint>=1.5.5,<1.6
 mock>=1.0.1,<1.1

http://git-wip-us.apache.org/repos/asf/libcloud/blob/3bb3d8d9/tox.ini
----------------------------------------------------------------------
diff --git a/tox.ini b/tox.ini
index e7cb5a3..6e60e1f 100644
--- a/tox.ini
+++ b/tox.ini
@@ -81,9 +81,9 @@ deps = requests
 commands = python contrib/scrape-ec2-prices.py
 
 [testenv:pylint]
-deps = pylint
+deps = -r{toxinidir}/requirements-tests.txt
        backports.ssl_match_hostname
-commands = pylint --rcfile=.pylintrc -E libcloud/
+commands = pylint --rcfile=.pylintrc -E libcloud/dns/
 
 [testenv:lint]
 deps = -r{toxinidir}/requirements-tests.txt


[6/8] libcloud git commit: Fix some bugs discovered by pylint, ignore other false positives.

Posted by to...@apache.org.
Fix some bugs discovered by pylint, ignore other false positives.


Project: http://git-wip-us.apache.org/repos/asf/libcloud/repo
Commit: http://git-wip-us.apache.org/repos/asf/libcloud/commit/cbc34ea1
Tree: http://git-wip-us.apache.org/repos/asf/libcloud/tree/cbc34ea1
Diff: http://git-wip-us.apache.org/repos/asf/libcloud/diff/cbc34ea1

Branch: refs/heads/trunk
Commit: cbc34ea1215872edacb16344e77faf17becf35c2
Parents: e6a1c48
Author: Tomaz Muraus <to...@tomaz.me>
Authored: Tue Apr 19 19:52:37 2016 +0200
Committer: Tomaz Muraus <to...@tomaz.me>
Committed: Tue Apr 19 19:52:37 2016 +0200

----------------------------------------------------------------------
 libcloud/common/abiquo.py             | 2 +-
 libcloud/common/aliyun.py             | 2 +-
 libcloud/common/aws.py                | 4 +++-
 libcloud/common/azure.py              | 1 +
 libcloud/common/base.py               | 4 ++++
 libcloud/common/dimensiondata.py      | 1 +
 libcloud/common/durabledns.py         | 2 ++
 libcloud/common/gandi.py              | 1 +
 libcloud/common/gogrid.py             | 3 +++
 libcloud/common/google.py             | 3 ++-
 libcloud/common/liquidweb.py          | 4 ++--
 libcloud/common/openstack.py          | 1 +
 libcloud/common/openstack_identity.py | 1 +
 libcloud/common/runabove.py           | 1 +
 libcloud/common/worldwidedns.py       | 7 +++++--
 libcloud/common/xmlrpc.py             | 1 +
 libcloud/common/zonomi.py             | 2 ++
 17 files changed, 32 insertions(+), 8 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/libcloud/blob/cbc34ea1/libcloud/common/abiquo.py
----------------------------------------------------------------------
diff --git a/libcloud/common/abiquo.py b/libcloud/common/abiquo.py
index a972243..0aa99a7 100644
--- a/libcloud/common/abiquo.py
+++ b/libcloud/common/abiquo.py
@@ -271,4 +271,4 @@ class ForbiddenError(LibcloudError):
 
     def __init__(self, driver):
         message = 'User has not permission to perform this task.'
-        super(LibcloudError, self).__init__(message, driver)
+        super(ForbiddenError, self).__init__(message, driver)

http://git-wip-us.apache.org/repos/asf/libcloud/blob/cbc34ea1/libcloud/common/aliyun.py
----------------------------------------------------------------------
diff --git a/libcloud/common/aliyun.py b/libcloud/common/aliyun.py
index 4e91dbb..062f389 100644
--- a/libcloud/common/aliyun.py
+++ b/libcloud/common/aliyun.py
@@ -200,7 +200,7 @@ class SignedAliyunConnection(AliyunConnection):
 
         self.signer = signer_cls(access_key=self.user_id,
                                  access_secret=self.key,
-                                 version=self.version)
+                                 version=signature_version)
 
     def add_default_params(self, params):
         params = self.signer.get_request_params(params=params,

http://git-wip-us.apache.org/repos/asf/libcloud/blob/cbc34ea1/libcloud/common/aws.py
----------------------------------------------------------------------
diff --git a/libcloud/common/aws.py b/libcloud/common/aws.py
index 74922a6..c26bcaa 100644
--- a/libcloud/common/aws.py
+++ b/libcloud/common/aws.py
@@ -81,7 +81,7 @@ class AWSGenericResponse(AWSBaseResponse):
     # exception class that is raised immediately.
     # If a custom exception class is not defined, errors are accumulated and
     # returned from the parse_error method.
-    expections = {}
+    exceptions = {}
 
     def success(self):
         return self.status in [httplib.OK, httplib.CREATED, httplib.ACCEPTED]
@@ -347,6 +347,8 @@ class AWSRequestSignerAlgorithmV4(AWSRequestSigner):
 
 
 class SignedAWSConnection(AWSTokenConnection):
+    version = None
+
     def __init__(self, user_id, key, secure=True, host=None, port=None,
                  url=None, timeout=None, proxy_url=None, token=None,
                  retry_delay=None, backoff=None,

http://git-wip-us.apache.org/repos/asf/libcloud/blob/cbc34ea1/libcloud/common/azure.py
----------------------------------------------------------------------
diff --git a/libcloud/common/azure.py b/libcloud/common/azure.py
index bd3c504..b7f9ffc 100644
--- a/libcloud/common/azure.py
+++ b/libcloud/common/azure.py
@@ -71,6 +71,7 @@ class AzureResponse(XmlResponse):
             # Some APIs respond with an XML error. Others just dump HTML
             body = self.parse_body()
 
+            # pylint: disable=no-member
             if type(body) == ET.Element:
                 code = body.findtext(fixxpath(xpath='Code'))
                 message = body.findtext(fixxpath(xpath='Message'))

http://git-wip-us.apache.org/repos/asf/libcloud/blob/cbc34ea1/libcloud/common/base.py
----------------------------------------------------------------------
diff --git a/libcloud/common/base.py b/libcloud/common/base.py
index 5d4c3e9..bda758b 100644
--- a/libcloud/common/base.py
+++ b/libcloud/common/base.py
@@ -413,6 +413,8 @@ class LoggingConnection():
         return (rr, rv)
 
     def _log_curl(self, method, url, body, headers):
+        # pylint: disable=no-member
+
         cmd = ["curl"]
 
         if self.http_proxy_used:
@@ -625,6 +627,8 @@ class Connection(object):
         connection = None
         secure = self.secure
 
+        # pylint: disable=no-member
+
         if getattr(self, 'base_url', None) and base_url is None:
             (host, port,
              secure, request_path) = self._tuple_from_url(self.base_url)

http://git-wip-us.apache.org/repos/asf/libcloud/blob/cbc34ea1/libcloud/common/dimensiondata.py
----------------------------------------------------------------------
diff --git a/libcloud/common/dimensiondata.py b/libcloud/common/dimensiondata.py
index 8bb4742..50870e7 100644
--- a/libcloud/common/dimensiondata.py
+++ b/libcloud/common/dimensiondata.py
@@ -470,6 +470,7 @@ class DimensionDataConnection(ConnectionUserAndKey):
                                                    data, headers,
                                                    method).object
         yield paged_resp
+        paged_resp = paged_resp or {}
 
         while paged_resp.get('pageCount') >= paged_resp.get('pageSize'):
             params['pageNumber'] = int(paged_resp.get('pageNumber')) + 1

http://git-wip-us.apache.org/repos/asf/libcloud/blob/cbc34ea1/libcloud/common/durabledns.py
----------------------------------------------------------------------
diff --git a/libcloud/common/durabledns.py b/libcloud/common/durabledns.py
index 5859f6e..7e95c37 100644
--- a/libcloud/common/durabledns.py
+++ b/libcloud/common/durabledns.py
@@ -148,6 +148,8 @@ class DurableResponse(XmlResponse):
         zone_dict = {}
         record_dict = {}
         xml_obj = self.parse_body()
+
+        # pylint: disable=no-member
         envelop_body = xml_obj.getchildren()[0]
         method_resp = envelop_body.getchildren()[0]
         # parse the xml_obj

http://git-wip-us.apache.org/repos/asf/libcloud/blob/cbc34ea1/libcloud/common/gandi.py
----------------------------------------------------------------------
diff --git a/libcloud/common/gandi.py b/libcloud/common/gandi.py
index be326f3..75ce4fe 100644
--- a/libcloud/common/gandi.py
+++ b/libcloud/common/gandi.py
@@ -90,6 +90,7 @@ class BaseGandiDriver(object):
 
         for i in range(0, timeout, check_interval):
             try:
+                # pylint: disable=no-member
                 op = self.connection.request('operation.info', int(id)).object
 
                 if op['step'] == 'DONE':

http://git-wip-us.apache.org/repos/asf/libcloud/blob/cbc34ea1/libcloud/common/gogrid.py
----------------------------------------------------------------------
diff --git a/libcloud/common/gogrid.py b/libcloud/common/gogrid.py
index e2448de..0710bda 100644
--- a/libcloud/common/gogrid.py
+++ b/libcloud/common/gogrid.py
@@ -127,6 +127,7 @@ class BaseGoGridDriver(object):
                 for el in object['list']]
 
     def _to_location(self, element):
+        # pylint: disable=no-member
         location = NodeLocation(id=element['id'],
                                 name=element['name'],
                                 country="US",
@@ -170,6 +171,7 @@ class BaseGoGridDriver(object):
         if "location" in kwargs and kwargs['location'] is not None:
             params['datacenter'] = kwargs['location'].id
 
+        # pylint: disable=no-member
         response = self.connection.request('/api/grid/ip/list', params=params)
         ips = self._to_ips(response.object)
         return ips
@@ -179,5 +181,6 @@ class BaseGoGridDriver(object):
         try:
             return ips[0].ip
         except IndexError:
+            # pylint: disable=no-member
             raise LibcloudError('No public unassigned IPs left',
                                 self.driver)

http://git-wip-us.apache.org/repos/asf/libcloud/blob/cbc34ea1/libcloud/common/google.py
----------------------------------------------------------------------
diff --git a/libcloud/common/google.py b/libcloud/common/google.py
index ca248d5..2912817 100644
--- a/libcloud/common/google.py
+++ b/libcloud/common/google.py
@@ -160,7 +160,7 @@ class ResourceNotFoundError(GoogleBaseError):
                 "error may be an authentication issue. " \
                 "Please  ensure your auth credentials match " \
                 "your project. "
-        super(GoogleBaseError, self).__init__(value, http_code, driver)
+        super(ResourceNotFoundError, self).__init__(value, http_code, driver)
 
 
 class QuotaExceededError(GoogleBaseError):
@@ -377,6 +377,7 @@ class GoogleBaseAuthConnection(ConnectionUserAndKey):
         :return:  A dictionary containing updated token information.
         :rtype:   ``dict``
         """
+        # pylint: disable=no-member
         return self.get_new_token()
 
 

http://git-wip-us.apache.org/repos/asf/libcloud/blob/cbc34ea1/libcloud/common/liquidweb.py
----------------------------------------------------------------------
diff --git a/libcloud/common/liquidweb.py b/libcloud/common/liquidweb.py
index 123e82f..cdbacc1 100644
--- a/libcloud/common/liquidweb.py
+++ b/libcloud/common/liquidweb.py
@@ -51,10 +51,10 @@ class LiquidWebException(ProviderError):
         super(LiquidWebException, self).__init__(value, http_code, driver=None)
 
     def __str__(self):
-        return "%s  %s" % (self.code, self.value)
+        return "%s  %s" % (self.http_code, self.value)
 
     def __repr__(self):
-        return "LiquidWebException %s %s" % (self.code, self.value)
+        return "LiquidWebException %s %s" % (self.http_code, self.value)
 
 
 class APIException(LiquidWebException):

http://git-wip-us.apache.org/repos/asf/libcloud/blob/cbc34ea1/libcloud/common/openstack.py
----------------------------------------------------------------------
diff --git a/libcloud/common/openstack.py b/libcloud/common/openstack.py
index e63ee8a..cfdef79 100644
--- a/libcloud/common/openstack.py
+++ b/libcloud/common/openstack.py
@@ -125,6 +125,7 @@ class OpenStackBaseConnection(ConnectionUserAndKey):
     service_type = None
     service_name = None
     service_region = None
+    accept_format = None
     _auth_version = None
 
     def __init__(self, user_id, key, secure=True,

http://git-wip-us.apache.org/repos/asf/libcloud/blob/cbc34ea1/libcloud/common/openstack_identity.py
----------------------------------------------------------------------
diff --git a/libcloud/common/openstack_identity.py b/libcloud/common/openstack_identity.py
index e8cc6a8..24c12d0 100644
--- a/libcloud/common/openstack_identity.py
+++ b/libcloud/common/openstack_identity.py
@@ -569,6 +569,7 @@ class OpenStackIdentityConnection(ConnectionUserAndKey):
     """
     responseCls = OpenStackAuthResponse
     timeout = None
+    auth_version = None
 
     def __init__(self, auth_url, user_id, key, tenant_name=None,
                  timeout=None, parent_conn=None):

http://git-wip-us.apache.org/repos/asf/libcloud/blob/cbc34ea1/libcloud/common/runabove.py
----------------------------------------------------------------------
diff --git a/libcloud/common/runabove.py b/libcloud/common/runabove.py
index 4d45241..0f08b59 100644
--- a/libcloud/common/runabove.py
+++ b/libcloud/common/runabove.py
@@ -54,6 +54,7 @@ class RunAboveException(Exception):
 class RunAboveResponse(JsonResponse):
     def parse_error(self):
         response = super(RunAboveResponse, self).parse_body()
+        response = response or {}
 
         if response.get('errorCode', None) == 'INVALID_SIGNATURE':
             raise InvalidCredsError('Signature validation failed, probably '

http://git-wip-us.apache.org/repos/asf/libcloud/blob/cbc34ea1/libcloud/common/worldwidedns.py
----------------------------------------------------------------------
diff --git a/libcloud/common/worldwidedns.py b/libcloud/common/worldwidedns.py
index 1c02a12..6dce6b1 100644
--- a/libcloud/common/worldwidedns.py
+++ b/libcloud/common/worldwidedns.py
@@ -190,6 +190,9 @@ class WorldWideDNSConnection(ConnectionUserAndKey):
         """
         params["NAME"] = self.user_id
         params["PASSWORD"] = self.key
-        if hasattr(self, 'reseller_id'):
-            params["ID"] = self.reseller_id
+
+        reseller_id = getattr(self, 'reseller_id', None)
+        if reseller_id:
+            params["ID"] = reseller_id
+
         return params

http://git-wip-us.apache.org/repos/asf/libcloud/blob/cbc34ea1/libcloud/common/xmlrpc.py
----------------------------------------------------------------------
diff --git a/libcloud/common/xmlrpc.py b/libcloud/common/xmlrpc.py
index 2502ea6..237bf27 100644
--- a/libcloud/common/xmlrpc.py
+++ b/libcloud/common/xmlrpc.py
@@ -85,6 +85,7 @@ class XMLRPCConnection(Connection):
     """
 
     responseCls = XMLRPCResponse
+    endpoint = None
 
     def add_default_headers(self, headers):
         headers['Content-Type'] = 'text/xml'

http://git-wip-us.apache.org/repos/asf/libcloud/blob/cbc34ea1/libcloud/common/zonomi.py
----------------------------------------------------------------------
diff --git a/libcloud/common/zonomi.py b/libcloud/common/zonomi.py
index 3ef913d..cabfa54 100644
--- a/libcloud/common/zonomi.py
+++ b/libcloud/common/zonomi.py
@@ -65,6 +65,8 @@ class ZonomiResponse(XmlResponse):
         data = []
         errors = []
         xml_body = super(ZonomiResponse, self).parse_body()
+
+        # pylint: disable=no-member
         # Error handling
         if xml_body.text is not None and xml_body.tag == 'error':
             error_dict['ERRORCODE'] = self.status


[8/8] libcloud git commit: Also make pylint a default tox target.

Posted by to...@apache.org.
Also make pylint a default tox target.


Project: http://git-wip-us.apache.org/repos/asf/libcloud/repo
Commit: http://git-wip-us.apache.org/repos/asf/libcloud/commit/df34f354
Tree: http://git-wip-us.apache.org/repos/asf/libcloud/tree/df34f354
Diff: http://git-wip-us.apache.org/repos/asf/libcloud/diff/df34f354

Branch: refs/heads/trunk
Commit: df34f3543e3ab43946174490a12dc5fe54a3dcdd
Parents: 8874941
Author: Tomaz Muraus <to...@tomaz.me>
Authored: Tue Apr 19 20:37:58 2016 +0200
Committer: Tomaz Muraus <to...@tomaz.me>
Committed: Tue Apr 19 20:37:58 2016 +0200

----------------------------------------------------------------------
 tox.ini | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/libcloud/blob/df34f354/tox.ini
----------------------------------------------------------------------
diff --git a/tox.ini b/tox.ini
index d80e03c..0cf1201 100644
--- a/tox.ini
+++ b/tox.ini
@@ -1,5 +1,5 @@
 [tox]
-envlist = py{2.5,2.6,2.7,pypy,pypy3,3.2,3.3,3.4,3.5},lint
+envlist = py{2.5,2.6,2.7,pypy,pypy3,3.2,3.3,3.4,3.5},lint,pylint
 
 [testenv]
 deps =


[4/8] libcloud git commit: Use -E flag, we don't care about warnings.

Posted by to...@apache.org.
Use -E flag, we don't care about warnings.


Project: http://git-wip-us.apache.org/repos/asf/libcloud/repo
Commit: http://git-wip-us.apache.org/repos/asf/libcloud/commit/da3e4335
Tree: http://git-wip-us.apache.org/repos/asf/libcloud/tree/da3e4335
Diff: http://git-wip-us.apache.org/repos/asf/libcloud/diff/da3e4335

Branch: refs/heads/trunk
Commit: da3e4335b2c3c438fd96baa4bef4f291728c2f5a
Parents: 1a8189d
Author: Tomaz Muraus <to...@tomaz.me>
Authored: Tue Apr 19 19:16:50 2016 +0200
Committer: Tomaz Muraus <to...@tomaz.me>
Committed: Tue Apr 19 19:16:50 2016 +0200

----------------------------------------------------------------------
 tox.ini | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/libcloud/blob/da3e4335/tox.ini
----------------------------------------------------------------------
diff --git a/tox.ini b/tox.ini
index 6e60e1f..c706158 100644
--- a/tox.ini
+++ b/tox.ini
@@ -83,7 +83,7 @@ commands = python contrib/scrape-ec2-prices.py
 [testenv:pylint]
 deps = -r{toxinidir}/requirements-tests.txt
        backports.ssl_match_hostname
-commands = pylint --rcfile=.pylintrc -E libcloud/dns/
+commands = pylint -E --rcfile=./.pylintrc libcloud/dns/
 
 [testenv:lint]
 deps = -r{toxinidir}/requirements-tests.txt


[2/8] libcloud git commit: Add missing license.

Posted by to...@apache.org.
Add missing license.


Project: http://git-wip-us.apache.org/repos/asf/libcloud/repo
Commit: http://git-wip-us.apache.org/repos/asf/libcloud/commit/c231005f
Tree: http://git-wip-us.apache.org/repos/asf/libcloud/tree/c231005f
Diff: http://git-wip-us.apache.org/repos/asf/libcloud/diff/c231005f

Branch: refs/heads/trunk
Commit: c231005fcbb67d275fdf20fea93d0103b18a1d62
Parents: 3bb3d8d
Author: Tomaz Muraus <to...@tomaz.me>
Authored: Tue Apr 19 18:57:51 2016 +0200
Committer: Tomaz Muraus <to...@tomaz.me>
Committed: Tue Apr 19 18:57:51 2016 +0200

----------------------------------------------------------------------
 libcloud/dns/drivers/nsone.py | 15 +++++++++++++++
 1 file changed, 15 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/libcloud/blob/c231005f/libcloud/dns/drivers/nsone.py
----------------------------------------------------------------------
diff --git a/libcloud/dns/drivers/nsone.py b/libcloud/dns/drivers/nsone.py
index 06297e6..08dcd8b 100644
--- a/libcloud/dns/drivers/nsone.py
+++ b/libcloud/dns/drivers/nsone.py
@@ -1,3 +1,18 @@
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License.  You may obtain a copy of the License at
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
 import sys
 try:
     import simplejson as json


[3/8] libcloud git commit: Fix pylint violations and some actual code bugs discovered by pylint.

Posted by to...@apache.org.
Fix pylint violations and some actual code bugs discovered by pylint.


Project: http://git-wip-us.apache.org/repos/asf/libcloud/repo
Commit: http://git-wip-us.apache.org/repos/asf/libcloud/commit/1a8189d6
Tree: http://git-wip-us.apache.org/repos/asf/libcloud/tree/1a8189d6
Diff: http://git-wip-us.apache.org/repos/asf/libcloud/diff/1a8189d6

Branch: refs/heads/trunk
Commit: 1a8189d673bc5172fc30a09bf4c70d162f15ff34
Parents: c231005
Author: Tomaz Muraus <to...@tomaz.me>
Authored: Tue Apr 19 19:15:52 2016 +0200
Committer: Tomaz Muraus <to...@tomaz.me>
Committed: Tue Apr 19 19:16:46 2016 +0200

----------------------------------------------------------------------
 libcloud/dns/drivers/cloudflare.py | 1 +
 libcloud/dns/drivers/google.py     | 1 +
 libcloud/dns/drivers/liquidweb.py  | 7 ++++---
 libcloud/dns/drivers/nsone.py      | 2 +-
 libcloud/dns/drivers/powerdns.py   | 6 +++---
 libcloud/dns/drivers/softlayer.py  | 2 ++
 6 files changed, 12 insertions(+), 7 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/libcloud/blob/1a8189d6/libcloud/dns/drivers/cloudflare.py
----------------------------------------------------------------------
diff --git a/libcloud/dns/drivers/cloudflare.py b/libcloud/dns/drivers/cloudflare.py
index ee2d8eb..7d1e035 100644
--- a/libcloud/dns/drivers/cloudflare.py
+++ b/libcloud/dns/drivers/cloudflare.py
@@ -67,6 +67,7 @@ class CloudFlareDNSResponse(JsonResponse):
 
     def parse_body(self):
         body = super(CloudFlareDNSResponse, self).parse_body()
+        body = body or {}
 
         result = body.get('result', None)
         error_code = body.get('err_code', None)

http://git-wip-us.apache.org/repos/asf/libcloud/blob/1a8189d6/libcloud/dns/drivers/google.py
----------------------------------------------------------------------
diff --git a/libcloud/dns/drivers/google.py b/libcloud/dns/drivers/google.py
index d0aebcb..3f625cb 100644
--- a/libcloud/dns/drivers/google.py
+++ b/libcloud/dns/drivers/google.py
@@ -294,6 +294,7 @@ class GoogleDNSDriver(DNSDriver):
         request = '/managedZones/%s/changes' % (zone.id)
         response = self.connection.request(request, method='POST',
                                            data=records).object
+        response = response or {}
 
         response_data = {
             'additions': self._to_records(response.get('additions', []), zone),

http://git-wip-us.apache.org/repos/asf/libcloud/blob/1a8189d6/libcloud/dns/drivers/liquidweb.py
----------------------------------------------------------------------
diff --git a/libcloud/dns/drivers/liquidweb.py b/libcloud/dns/drivers/liquidweb.py
index 803849a..d9415b3 100644
--- a/libcloud/dns/drivers/liquidweb.py
+++ b/libcloud/dns/drivers/liquidweb.py
@@ -176,11 +176,12 @@ class LiquidWebDNSDriver(DNSDriver):
         https://www.liquidweb.com/storm/api/docs/v1/Network/DNS/Zone.html
         """
         action = '/v1/Network/DNS/Zone/create'
-        data = json.dumps({'params': {'name': domain}})
+        data = {'params': {'name': domain}}
+
         if extra is not None:
-            params = data.get('params')
-            params.update(extra)
+            data['params'].update(extra)
         try:
+            data = json.dumps(data)
             response = self.connection.request(action=action,
                                                method='POST',
                                                data=data)

http://git-wip-us.apache.org/repos/asf/libcloud/blob/1a8189d6/libcloud/dns/drivers/nsone.py
----------------------------------------------------------------------
diff --git a/libcloud/dns/drivers/nsone.py b/libcloud/dns/drivers/nsone.py
index 08dcd8b..0233975 100644
--- a/libcloud/dns/drivers/nsone.py
+++ b/libcloud/dns/drivers/nsone.py
@@ -292,7 +292,7 @@ class NsOneDNSDriver(DNSDriver):
             e = sys.exc_info()[1]
             if e.message == 'record does not exist':
                 raise RecordDoesNotExistError(value=e.message, driver=self,
-                                              id=record.id)
+                                              record_id=record.id)
             else:
                 raise e
         record = self._to_record(item=response.parse_body(), zone=zone)

http://git-wip-us.apache.org/repos/asf/libcloud/blob/1a8189d6/libcloud/dns/drivers/powerdns.py
----------------------------------------------------------------------
diff --git a/libcloud/dns/drivers/powerdns.py b/libcloud/dns/drivers/powerdns.py
index 56e2381..37bd37c 100644
--- a/libcloud/dns/drivers/powerdns.py
+++ b/libcloud/dns/drivers/powerdns.py
@@ -141,9 +141,9 @@ class PowerDNSDriver(DNSDriver):
             raise NotImplementedError('Unsupported API version: %s' %
                                       api_version)
 
-        return super(PowerDNSDriver, self).__init__(key=key, secure=secure,
-                                                    host=host, port=port,
-                                                    **kwargs)
+        super(PowerDNSDriver, self).__init__(key=key, secure=secure,
+                                             host=host, port=port,
+                                             **kwargs)
 
     def create_record(self, name, zone, type, data, extra=None):
         """

http://git-wip-us.apache.org/repos/asf/libcloud/blob/1a8189d6/libcloud/dns/drivers/softlayer.py
----------------------------------------------------------------------
diff --git a/libcloud/dns/drivers/softlayer.py b/libcloud/dns/drivers/softlayer.py
index 8a3cf4c..bfe7776 100644
--- a/libcloud/dns/drivers/softlayer.py
+++ b/libcloud/dns/drivers/softlayer.py
@@ -12,6 +12,8 @@
 # See the License for the specific language governing permissions and
 # limitations under the License.
 
+# pylint: disable=unexpected-keyword-arg
+
 __all__ = [
     'SoftLayerDNSDriver'
 ]


[5/8] libcloud git commit: Also run pylint tox target on travis.

Posted by to...@apache.org.
Also run pylint tox target on travis.


Project: http://git-wip-us.apache.org/repos/asf/libcloud/repo
Commit: http://git-wip-us.apache.org/repos/asf/libcloud/commit/e6a1c48d
Tree: http://git-wip-us.apache.org/repos/asf/libcloud/tree/e6a1c48d
Diff: http://git-wip-us.apache.org/repos/asf/libcloud/diff/e6a1c48d

Branch: refs/heads/trunk
Commit: e6a1c48d21f4e4288692f204503338cae37a9ca6
Parents: da3e433
Author: Tomaz Muraus <to...@tomaz.me>
Authored: Tue Apr 19 19:32:41 2016 +0200
Committer: Tomaz Muraus <to...@tomaz.me>
Committed: Tue Apr 19 19:34:19 2016 +0200

----------------------------------------------------------------------
 .travis.yml | 3 +++
 1 file changed, 3 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/libcloud/blob/e6a1c48d/.travis.yml
----------------------------------------------------------------------
diff --git a/.travis.yml b/.travis.yml
index 339489f..c27cc7c 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -49,6 +49,9 @@ matrix:
     - env: ENV=lint
       python: 2.7
       before_script: TOX_ENV=lint
+    - env: ENV=pylint
+      python: 2.7
+      before_script: TOX_ENV=pylint
     - env: ENV=docs
       python: 2.7
       before_script: TOX_ENV=docs-travis


[7/8] libcloud git commit: Also run pylint on libcloud/common/

Posted by to...@apache.org.
Also run pylint on libcloud/common/


Project: http://git-wip-us.apache.org/repos/asf/libcloud/repo
Commit: http://git-wip-us.apache.org/repos/asf/libcloud/commit/8874941d
Tree: http://git-wip-us.apache.org/repos/asf/libcloud/tree/8874941d
Diff: http://git-wip-us.apache.org/repos/asf/libcloud/diff/8874941d

Branch: refs/heads/trunk
Commit: 8874941d6f7b9e9b2a4a62e0d11ac5dc3b851d02
Parents: cbc34ea
Author: Tomaz Muraus <to...@tomaz.me>
Authored: Tue Apr 19 19:54:17 2016 +0200
Committer: Tomaz Muraus <to...@tomaz.me>
Committed: Tue Apr 19 19:54:17 2016 +0200

----------------------------------------------------------------------
 tox.ini | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/libcloud/blob/8874941d/tox.ini
----------------------------------------------------------------------
diff --git a/tox.ini b/tox.ini
index c706158..d80e03c 100644
--- a/tox.ini
+++ b/tox.ini
@@ -83,7 +83,8 @@ commands = python contrib/scrape-ec2-prices.py
 [testenv:pylint]
 deps = -r{toxinidir}/requirements-tests.txt
        backports.ssl_match_hostname
-commands = pylint -E --rcfile=./.pylintrc libcloud/dns/
+commands = pylint -E --rcfile=./.pylintrc libcloud/common/
+           pylint -E --rcfile=./.pylintrc libcloud/dns/
 
 [testenv:lint]
 deps = -r{toxinidir}/requirements-tests.txt