You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@libcloud.apache.org by an...@apache.org on 2017/07/10 08:48:20 UTC

[1/9] libcloud git commit: fix comparison by using value rather than reference

Repository: libcloud
Updated Branches:
  refs/heads/trunk cfe02ecaf -> d6dba50de


fix comparison by using value rather than reference


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

Branch: refs/heads/trunk
Commit: 7ab8b8dff5b0289f1a963d9a087ad30178fa43c5
Parents: ef662f2
Author: jhelie <je...@gmail.com>
Authored: Thu Jul 6 09:33:48 2017 +0100
Committer: Anthony Shaw <an...@apache.org>
Committed: Mon Jul 10 09:48:02 2017 +0100

----------------------------------------------------------------------
 libcloud/compute/drivers/gce.py | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/libcloud/blob/7ab8b8df/libcloud/compute/drivers/gce.py
----------------------------------------------------------------------
diff --git a/libcloud/compute/drivers/gce.py b/libcloud/compute/drivers/gce.py
index 420914b..fd8bc6c 100644
--- a/libcloud/compute/drivers/gce.py
+++ b/libcloud/compute/drivers/gce.py
@@ -4536,7 +4536,7 @@ class GCENodeDriver(NodeDriver):
             maint_opts = ['MIGRATE', 'TERMINATE']
             if isinstance(on_host_maintenance,
                           str) and on_host_maintenance in maint_opts:
-                if preemptible is True and on_host_maintenance is 'MIGRATE':
+                if preemptible is True and on_host_maintenance == 'MIGRATE':
                     raise ValueError(("host maintenance cannot be 'MIGRATE' "
                                       "if instance is preemptible."))
                 scheduling['onHostMaintenance'] = on_host_maintenance
@@ -7415,7 +7415,7 @@ class GCENodeDriver(NodeDriver):
         # Disk names are not unique across zones, so if zone is None or
         # 'all', we return the first one we find for that disk name.  For
         # consistency, we sort by keys and set the zone to the first key.
-        if zone is None or zone is 'all':
+        if zone is None or zone == 'all':
             zone = sorted(self._ex_volume_dict[volume_name])[0]
 
         volume = self._ex_volume_dict[volume_name].get(zone, None)


[9/9] libcloud git commit: revert for else fix in drivers/elb, to be addressed in later PR Closes #1080

Posted by an...@apache.org.
revert for else fix in drivers/elb, to be addressed in later PR
Closes #1080


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

Branch: refs/heads/trunk
Commit: d6dba50de4a24027d14708fbe1a36679953814eb
Parents: 7ab8b8d
Author: jhelie <je...@gmail.com>
Authored: Thu Jul 6 09:34:50 2017 +0100
Committer: Anthony Shaw <an...@apache.org>
Committed: Mon Jul 10 09:48:05 2017 +0100

----------------------------------------------------------------------
 libcloud/loadbalancer/drivers/elb.py | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/libcloud/blob/d6dba50d/libcloud/loadbalancer/drivers/elb.py
----------------------------------------------------------------------
diff --git a/libcloud/loadbalancer/drivers/elb.py b/libcloud/loadbalancer/drivers/elb.py
index 1eba3b9..766c86d 100644
--- a/libcloud/loadbalancer/drivers/elb.py
+++ b/libcloud/loadbalancer/drivers/elb.py
@@ -308,7 +308,8 @@ class ElasticLBDriver(Driver):
             if protocol == 'HTTPS' or protocol == 'SSL':
                 params['Listeners.member.%d.   \
                         SSLCertificateId' % i] = listener[3]
-        return False
+        else:
+            return False
 
         response = self.connection.request(ROOT, params=params)
         return response.status == httplib.OK


[5/9] libcloud git commit: remove unreachable return statement

Posted by an...@apache.org.
remove unreachable return statement


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

Branch: refs/heads/trunk
Commit: dde03ac855c6bb5fa3fd6db26030ab55f5f93e58
Parents: c082254
Author: jhelie <je...@gmail.com>
Authored: Thu Jun 22 13:52:08 2017 +0100
Committer: Anthony Shaw <an...@apache.org>
Committed: Mon Jul 10 09:48:02 2017 +0100

----------------------------------------------------------------------
 libcloud/compute/drivers/gandi.py | 1 -
 1 file changed, 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/libcloud/blob/dde03ac8/libcloud/compute/drivers/gandi.py
----------------------------------------------------------------------
diff --git a/libcloud/compute/drivers/gandi.py b/libcloud/compute/drivers/gandi.py
index af039cf..14cfada 100644
--- a/libcloud/compute/drivers/gandi.py
+++ b/libcloud/compute/drivers/gandi.py
@@ -102,7 +102,6 @@ class GandiNodeDriver(BaseGandiDriver, NodeDriver):
         except Exception:
             e = sys.exc_info()[1]
             raise GandiException(1003, e)
-        return None
 
     def _node_info(self, id):
         return self._resource_info('vm', id)


[8/9] libcloud git commit: remove unecessary pass statements

Posted by an...@apache.org.
remove unecessary pass statements


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

Branch: refs/heads/trunk
Commit: a84dc394d331532668e3ff443f27fa5cc74634fa
Parents: dde03ac
Author: jhelie <je...@gmail.com>
Authored: Thu Jun 22 13:52:41 2017 +0100
Committer: Anthony Shaw <an...@apache.org>
Committed: Mon Jul 10 09:48:02 2017 +0100

----------------------------------------------------------------------
 libcloud/compute/drivers/oneandone.py | 1 -
 libcloud/compute/drivers/vultr.py     | 1 -
 2 files changed, 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/libcloud/blob/a84dc394/libcloud/compute/drivers/oneandone.py
----------------------------------------------------------------------
diff --git a/libcloud/compute/drivers/oneandone.py b/libcloud/compute/drivers/oneandone.py
index 2203a08..7263afc 100644
--- a/libcloud/compute/drivers/oneandone.py
+++ b/libcloud/compute/drivers/oneandone.py
@@ -2249,7 +2249,6 @@ class OneAndOneNodeDriver(NodeDriver):
             if i == retries:
                 raise Exception('Retries count reached')
 
-        pass
 
     def _list_fixed_instances(self):
         response = self.connection.request(

http://git-wip-us.apache.org/repos/asf/libcloud/blob/a84dc394/libcloud/compute/drivers/vultr.py
----------------------------------------------------------------------
diff --git a/libcloud/compute/drivers/vultr.py b/libcloud/compute/drivers/vultr.py
index 1cabd46..e349a44 100644
--- a/libcloud/compute/drivers/vultr.py
+++ b/libcloud/compute/drivers/vultr.py
@@ -316,7 +316,6 @@ class VultrNodeDriver(NodeDriver):
                 created_node = [n for n in nodes if n.id == subid][0]
             except IndexError:
                 time.sleep(1)
-                pass
             else:
                 break
 


[2/9] libcloud git commit: make linter happy

Posted by an...@apache.org.
make linter happy


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

Branch: refs/heads/trunk
Commit: ef662f2d27509d17659ccb8ff355e000258ba467
Parents: 10cb33b
Author: jhelie <je...@gmail.com>
Authored: Thu Jun 22 15:06:48 2017 +0100
Committer: Anthony Shaw <an...@apache.org>
Committed: Mon Jul 10 09:48:02 2017 +0100

----------------------------------------------------------------------
 libcloud/compute/drivers/oneandone.py | 1 -
 1 file changed, 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/libcloud/blob/ef662f2d/libcloud/compute/drivers/oneandone.py
----------------------------------------------------------------------
diff --git a/libcloud/compute/drivers/oneandone.py b/libcloud/compute/drivers/oneandone.py
index 7263afc..f95eb1e 100644
--- a/libcloud/compute/drivers/oneandone.py
+++ b/libcloud/compute/drivers/oneandone.py
@@ -2249,7 +2249,6 @@ class OneAndOneNodeDriver(NodeDriver):
             if i == retries:
                 raise Exception('Retries count reached')
 
-
     def _list_fixed_instances(self):
         response = self.connection.request(
             action='/servers/fixed_instance_sizes',


[4/9] libcloud git commit: fix badly raised exceptions

Posted by an...@apache.org.
fix badly raised exceptions


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

Branch: refs/heads/trunk
Commit: bd887c8077282c10d5467e9494c770f4f5a0fe41
Parents: cfe02ec
Author: jhelie <je...@gmail.com>
Authored: Thu Jun 22 13:25:42 2017 +0100
Committer: Anthony Shaw <an...@apache.org>
Committed: Mon Jul 10 09:48:02 2017 +0100

----------------------------------------------------------------------
 libcloud/compute/drivers/gce.py | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/libcloud/blob/bd887c80/libcloud/compute/drivers/gce.py
----------------------------------------------------------------------
diff --git a/libcloud/compute/drivers/gce.py b/libcloud/compute/drivers/gce.py
index 5766530..420914b 100644
--- a/libcloud/compute/drivers/gce.py
+++ b/libcloud/compute/drivers/gce.py
@@ -6950,7 +6950,7 @@ class GCENodeDriver(NodeDriver):
         if not region_name:
             region = self._set_region(region)
             if not region:
-                raise ("Could not determine region for subnetwork.")
+                raise ValueError("Could not determine region for subnetwork.")
             else:
                 region_name = region.name
 
@@ -6988,7 +6988,7 @@ class GCENodeDriver(NodeDriver):
         if not region_name:
             region = self._set_region(region)
             if not region:
-                raise ("Could not determine region for subnetwork.")
+                raise ValueError("Could not determine region for subnetwork.")
             else:
                 region_name = region.name
 


[6/9] libcloud git commit: fix if statement resulting in unreachable code

Posted by an...@apache.org.
fix if statement resulting in unreachable code


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

Branch: refs/heads/trunk
Commit: 10cb33b7fc7b021690ccd7205467f36eb063ea43
Parents: a84dc39
Author: jhelie <je...@gmail.com>
Authored: Thu Jun 22 13:57:39 2017 +0100
Committer: Anthony Shaw <an...@apache.org>
Committed: Mon Jul 10 09:48:02 2017 +0100

----------------------------------------------------------------------
 libcloud/loadbalancer/drivers/dimensiondata.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/libcloud/blob/10cb33b7/libcloud/loadbalancer/drivers/dimensiondata.py
----------------------------------------------------------------------
diff --git a/libcloud/loadbalancer/drivers/dimensiondata.py b/libcloud/loadbalancer/drivers/dimensiondata.py
index 71cc167..2156c44 100644
--- a/libcloud/loadbalancer/drivers/dimensiondata.py
+++ b/libcloud/loadbalancer/drivers/dimensiondata.py
@@ -629,7 +629,7 @@ class DimensionDataLBDriver(Driver):
         :return: Instance of the listener
         :rtype: ``DimensionDataVirtualListener``
         """
-        if port is 80 or 443:
+        if (port == 80) or (port == 443):
             listener_type = 'PERFORMANCE_LAYER_4'
         else:
             listener_type = 'STANDARD'


[7/9] libcloud git commit: remove redundant and confusing else statements after a for loop without break clause

Posted by an...@apache.org.
remove redundant and confusing else statements after a for loop without break clause


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

Branch: refs/heads/trunk
Commit: 8aa0076cceeca661602c4461a1545a1ead511f44
Parents: bd887c8
Author: jhelie <je...@gmail.com>
Authored: Thu Jun 22 13:36:16 2017 +0100
Committer: Anthony Shaw <an...@apache.org>
Committed: Mon Jul 10 09:48:02 2017 +0100

----------------------------------------------------------------------
 libcloud/common/ovh.py               | 3 +--
 libcloud/loadbalancer/drivers/elb.py | 3 +--
 2 files changed, 2 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/libcloud/blob/8aa0076c/libcloud/common/ovh.py
----------------------------------------------------------------------
diff --git a/libcloud/common/ovh.py b/libcloud/common/ovh.py
index 029e66f..260ea41 100644
--- a/libcloud/common/ovh.py
+++ b/libcloud/common/ovh.py
@@ -131,8 +131,7 @@ class OvhConnection(ConnectionUserAndKey):
             full_url += '?'
             for key, value in params.items():
                 full_url += '%s=%s&' % (key, value)
-            else:
-                full_url = full_url[:-1]
+            full_url = full_url[:-1]
         sha1 = hashlib.sha1()
         base_signature = "+".join([
             self.key,

http://git-wip-us.apache.org/repos/asf/libcloud/blob/8aa0076c/libcloud/loadbalancer/drivers/elb.py
----------------------------------------------------------------------
diff --git a/libcloud/loadbalancer/drivers/elb.py b/libcloud/loadbalancer/drivers/elb.py
index 766c86d..1eba3b9 100644
--- a/libcloud/loadbalancer/drivers/elb.py
+++ b/libcloud/loadbalancer/drivers/elb.py
@@ -308,8 +308,7 @@ class ElasticLBDriver(Driver):
             if protocol == 'HTTPS' or protocol == 'SSL':
                 params['Listeners.member.%d.   \
                         SSLCertificateId' % i] = listener[3]
-        else:
-            return False
+        return False
 
         response = self.connection.request(ROOT, params=params)
         return response.status == httplib.OK


[3/9] libcloud git commit: remove duplicate assignment of dictionary key

Posted by an...@apache.org.
remove duplicate assignment of dictionary key


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

Branch: refs/heads/trunk
Commit: c082254420464aea70b737d8cef7d14397a3196f
Parents: 8aa0076
Author: jhelie <je...@gmail.com>
Authored: Thu Jun 22 13:51:01 2017 +0100
Committer: Anthony Shaw <an...@apache.org>
Committed: Mon Jul 10 09:48:02 2017 +0100

----------------------------------------------------------------------
 libcloud/compute/drivers/ec2.py | 84 ------------------------------------
 1 file changed, 84 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/libcloud/blob/c0822544/libcloud/compute/drivers/ec2.py
----------------------------------------------------------------------
diff --git a/libcloud/compute/drivers/ec2.py b/libcloud/compute/drivers/ec2.py
index 5b3e7c9..26b789e 100644
--- a/libcloud/compute/drivers/ec2.py
+++ b/libcloud/compute/drivers/ec2.py
@@ -2274,90 +2274,6 @@ OUTSCALE_SAS_REGION_DETAILS = {
             'cr1.8xlarge',
             'os1.8xlarge'
         ]
-    },
-    'us-east-2': {
-        'endpoint': 'fcu.us-east-2.outscale.com',
-        'api_name': 'osc_sas_us_east_2',
-        'country': 'USA',
-        'instance_types': [
-            't1.micro',
-            'm1.small',
-            'm1.medium',
-            'm1.large',
-            'm1.xlarge',
-            'c1.medium',
-            'c1.xlarge',
-            'm2.xlarge',
-            'm2.2xlarge',
-            'm2.4xlarge',
-            'nv1.small',
-            'nv1.medium',
-            'nv1.large',
-            'nv1.xlarge',
-            'cc1.4xlarge',
-            'cc2.8xlarge',
-            'm3.xlarge',
-            'm3.2xlarge',
-            'p2.xlarge',
-            'p2.8xlarge',
-            'p2.16xlarge',
-            'cr1.8xlarge',
-            'os1.8xlarge'
-        ]
-    },
-    'us-east-2': {
-        'endpoint': 'fcu.us-east-2.outscale.com',
-        'api_name': 'osc_sas_us_east_2',
-        'country': 'USA',
-        'instance_types': [
-            't1.micro',
-            'm1.small',
-            'm1.medium',
-            'm1.large',
-            'm1.xlarge',
-            'c1.medium',
-            'c1.xlarge',
-            'm2.xlarge',
-            'm2.2xlarge',
-            'm2.4xlarge',
-            'nv1.small',
-            'nv1.medium',
-            'nv1.large',
-            'nv1.xlarge',
-            'cc1.4xlarge',
-            'cc2.8xlarge',
-            'm3.xlarge',
-            'm3.2xlarge',
-            'cr1.8xlarge',
-            'os1.8xlarge'
-        ]
-    },
-    'us-east-2': {
-        'endpoint': 'fcu.us-east-2.outscale.com',
-        'api_name': 'osc_sas_us_east_2',
-        'country': 'USA',
-        'instance_types': [
-            't1.micro',
-            'm1.small',
-            'm1.medium',
-            'm1.large',
-            'm1.xlarge',
-            'c1.medium',
-            'c1.xlarge',
-            'm2.xlarge',
-            'm2.2xlarge',
-            'm2.4xlarge',
-            'nv1.small',
-            'nv1.medium',
-            'nv1.large',
-            'nv1.xlarge',
-            'cc1.4xlarge',
-            'cc2.8xlarge',
-            'm3.xlarge',
-            'm3.2xlarge',
-            'cr1.8xlarge',
-            'os1.8xlarge'
-        ]
     }
 }