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/04/01 00:38:29 UTC

[1/5] libcloud git commit: Gcloud: fix linter

Repository: libcloud
Updated Branches:
  refs/heads/trunk 516018d05 -> 722748f78


Gcloud: fix linter


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

Branch: refs/heads/trunk
Commit: a8f66fde57642fc474a30c96215fb55b22d0938e
Parents: 8bffdaa
Author: zacharya19 <za...@gmail.com>
Authored: Thu Jan 12 20:59:35 2017 +0200
Committer: Anthony Shaw <an...@apache.org>
Committed: Sat Apr 1 11:36:28 2017 +1100

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


http://git-wip-us.apache.org/repos/asf/libcloud/blob/a8f66fde/libcloud/compute/drivers/gce.py
----------------------------------------------------------------------
diff --git a/libcloud/compute/drivers/gce.py b/libcloud/compute/drivers/gce.py
index 9bf87bb..1c0fb81 100644
--- a/libcloud/compute/drivers/gce.py
+++ b/libcloud/compute/drivers/gce.py
@@ -5751,7 +5751,7 @@ class GCENodeDriver(NodeDriver):
         return self.ex_instancegroupmanager_list_managed_instances(manager)
 
     def ex_instancegroupmanager_delete_instances(self, manager,
-                                                   node_list):
+                                                 node_list):
         """
         Remove instances from GCEInstanceGroupManager and destroy
         the instance


[2/5] libcloud git commit: Gcloud: fix typo

Posted by an...@apache.org.
Gcloud: fix typo


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

Branch: refs/heads/trunk
Commit: 8bffdaa9c545aabe0cfb088c91ab12c27e4ae14d
Parents: 3e25c2c
Author: zacharya19 <za...@gmail.com>
Authored: Thu Jan 12 20:59:02 2017 +0200
Committer: Anthony Shaw <an...@apache.org>
Committed: Sat Apr 1 11:36:28 2017 +1100

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


http://git-wip-us.apache.org/repos/asf/libcloud/blob/8bffdaa9/libcloud/compute/drivers/gce.py
----------------------------------------------------------------------
diff --git a/libcloud/compute/drivers/gce.py b/libcloud/compute/drivers/gce.py
index 404a6d7..9bf87bb 100644
--- a/libcloud/compute/drivers/gce.py
+++ b/libcloud/compute/drivers/gce.py
@@ -5753,7 +5753,7 @@ class GCENodeDriver(NodeDriver):
     def ex_instancegroupmanager_delete_instances(self, manager,
                                                    node_list):
         """
-        Remove instances from GCEInstanceGroupManager and destry
+        Remove instances from GCEInstanceGroupManager and destroy
         the instance
 
         Scopes needed - one of the following:


[5/5] libcloud git commit: changes for #975

Posted by an...@apache.org.
changes for #975


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

Branch: refs/heads/trunk
Commit: 722748f78418ee63360a3260a5c1e2cd274689f9
Parents: c6c316e
Author: Anthony Shaw <an...@apache.org>
Authored: Sat Apr 1 11:38:21 2017 +1100
Committer: Anthony Shaw <an...@apache.org>
Committed: Sat Apr 1 11:38:21 2017 +1100

----------------------------------------------------------------------
 CHANGES.rst | 11 +++++++++++
 1 file changed, 11 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/libcloud/blob/722748f7/CHANGES.rst
----------------------------------------------------------------------
diff --git a/CHANGES.rst b/CHANGES.rst
index 5b1420c..d690314 100644
--- a/CHANGES.rst
+++ b/CHANGES.rst
@@ -1,6 +1,17 @@
 \ufeffChangelog
 =========
 
+
+Changes in latest version of Apache Libcloud
+--------------------------------------------
+
+Compute
+~~~~~~~
+
+- [GCE] allow delete instances from managed group
+  [GITHUB-975]
+  (@zacharya19)
+
 Changes Apache Libcloud 2.0.0rc1
 --------------------------------
 


[4/5] libcloud git commit: Gcloud: fix typo Closes #975

Posted by an...@apache.org.
Gcloud: fix typo
Closes #975


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

Branch: refs/heads/trunk
Commit: c6c316eb7a2de65023c314fc9ab85e4a08ece538
Parents: a8f66fd
Author: zacharya19 <za...@gmail.com>
Authored: Sun Feb 26 10:16:40 2017 +0200
Committer: Anthony Shaw <an...@apache.org>
Committed: Sat Apr 1 11:36:37 2017 +1100

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


http://git-wip-us.apache.org/repos/asf/libcloud/blob/c6c316eb/libcloud/compute/drivers/gce.py
----------------------------------------------------------------------
diff --git a/libcloud/compute/drivers/gce.py b/libcloud/compute/drivers/gce.py
index 1c0fb81..09187d3 100644
--- a/libcloud/compute/drivers/gce.py
+++ b/libcloud/compute/drivers/gce.py
@@ -5765,8 +5765,8 @@ class GCENodeDriver(NodeDriver):
                        RFC1035.
         :type   manager: ``str`` or :class: `GCEInstanceGroupManager`
 
-        :keyword  node_list:  list of Node objects to delete.
-        :type   :type   node_list: ``list`` of :class:`Node`
+        :param  node_list:  list of Node objects to delete.
+        :type   node_list: ``list`` of :class:`Node`
 
         :return:  True if successful
         :rtype: ``bool``


[3/5] libcloud git commit: Gcloud: allow delete instances from managed group

Posted by an...@apache.org.
Gcloud: allow delete instances from managed group


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

Branch: refs/heads/trunk
Commit: 3e25c2c786222fc5a10b4a48178f22cf9d53e41a
Parents: 516018d
Author: zacharya19 <za...@gmail.com>
Authored: Thu Jan 12 20:58:16 2017 +0200
Committer: Anthony Shaw <an...@apache.org>
Committed: Sat Apr 1 11:36:28 2017 +1100

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


http://git-wip-us.apache.org/repos/asf/libcloud/blob/3e25c2c7/libcloud/compute/drivers/gce.py
----------------------------------------------------------------------
diff --git a/libcloud/compute/drivers/gce.py b/libcloud/compute/drivers/gce.py
index 5eccac5..404a6d7 100644
--- a/libcloud/compute/drivers/gce.py
+++ b/libcloud/compute/drivers/gce.py
@@ -1371,6 +1371,25 @@ class GCEInstanceGroupManager(UuidMixin):
         return self.driver.ex_instancegroupmanager_recreate_instances(
             manager=self)
 
+    def delete_instances(self, node_list):
+        """
+        Removes one or more instances from the specified instance group,
+        and delete those instances.
+
+        Scopes needed - one of the following:
+        * https://www.googleapis.com/auth/cloud-platform
+        * https://www.googleapis.com/auth/compute
+
+        :param  node_list: List of nodes to delete.
+        :type   node_list: ``list`` of :class:`Node` or ``list`` of
+                           :class:`GCENode`
+
+        :return:  Return True if successful.
+        :rtype: ``bool``
+        """
+        return self.driver.ex_instancegroupmanager_delete_instances(
+            manager=self, node_list=node_list)
+
     def resize(self, size):
         """
         Set the number of instances for this Instance Group.  An increase in
@@ -5731,6 +5750,37 @@ class GCENodeDriver(NodeDriver):
 
         return self.ex_instancegroupmanager_list_managed_instances(manager)
 
+    def ex_instancegroupmanager_delete_instances(self, manager,
+                                                   node_list):
+        """
+        Remove instances from GCEInstanceGroupManager and destry
+        the instance
+
+        Scopes needed - one of the following:
+        * https://www.googleapis.com/auth/cloud-platform
+        * https://www.googleapis.com/auth/compute
+
+        :param  manager:  Required. The name of the managed instance group. The
+                       name must be 1-63 characters long, and comply with
+                       RFC1035.
+        :type   manager: ``str`` or :class: `GCEInstanceGroupManager`
+
+        :keyword  node_list:  list of Node objects to delete.
+        :type   :type   node_list: ``list`` of :class:`Node`
+
+        :return:  True if successful
+        :rtype: ``bool``
+        """
+
+        request = "/zones/%s/instanceGroupManagers/%s/deleteInstances" % (
+            manager.zone.name, manager.name)
+        request_data = {'instances': [x.extra['selfLink']
+                                      for x in node_list]}
+        self.connection.request(request, method='POST',
+                                data=request_data).object
+
+        return True
+
     def ex_instancegroupmanager_resize(self, manager, size):
         """
         Set the Instance Template for this Instance Group.