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:49:00 UTC

[1/4] libcloud git commit: linode stop node

Repository: libcloud
Updated Branches:
  refs/heads/trunk 53591b7a8 -> c4cfea6e1


linode stop node


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

Branch: refs/heads/trunk
Commit: 5bd4e45e431c80b3aa72cf38ad30ad4c849f2398
Parents: f90a251
Author: Markos Gogoulos <mg...@mist.io>
Authored: Wed Feb 15 17:51:03 2017 +0200
Committer: Anthony Shaw <an...@apache.org>
Committed: Sat Apr 1 11:47:22 2017 +1100

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


http://git-wip-us.apache.org/repos/asf/libcloud/blob/5bd4e45e/libcloud/compute/drivers/linode.py
----------------------------------------------------------------------
diff --git a/libcloud/compute/drivers/linode.py b/libcloud/compute/drivers/linode.py
index 94ac2a0..24d086c 100644
--- a/libcloud/compute/drivers/linode.py
+++ b/libcloud/compute/drivers/linode.py
@@ -127,6 +127,15 @@ class LinodeNodeDriver(NodeDriver):
         self.connection.request(API_ROOT, params=params)
         return True
 
+    def ex_stop_node(self, node):
+        """
+        Shutdown the given Linode
+
+        """
+        params = {"api_action": "linode.shutdown", "LinodeID": node.id}
+        self.connection.request(API_ROOT, params=params)
+        return True
+
     def reboot_node(self, node):
         """
         Reboot the given Linode


[3/4] libcloud git commit: remove local variable assignment Closes #986

Posted by an...@apache.org.
remove local variable assignment
Closes #986


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

Branch: refs/heads/trunk
Commit: 1d0a64ccde04d738c2a19305d3a26732af10d095
Parents: 5bd4e45
Author: Markos Gogoulos <mg...@mist.io>
Authored: Tue Feb 28 14:29:19 2017 +0200
Committer: Anthony Shaw <an...@apache.org>
Committed: Sat Apr 1 11:47:26 2017 +1100

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


http://git-wip-us.apache.org/repos/asf/libcloud/blob/1d0a64cc/libcloud/compute/drivers/linode.py
----------------------------------------------------------------------
diff --git a/libcloud/compute/drivers/linode.py b/libcloud/compute/drivers/linode.py
index 24d086c..cdb3019 100644
--- a/libcloud/compute/drivers/linode.py
+++ b/libcloud/compute/drivers/linode.py
@@ -433,7 +433,7 @@ class LinodeNodeDriver(NodeDriver):
             "LinodeID": node.id,
             "Label": name
         }
-        data = self.connection.request(API_ROOT, params=params)
+        self.connection.request(API_ROOT, params=params)
         return True
 
     def list_sizes(self, location=None):


[4/4] libcloud git commit: changes for #986

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


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

Branch: refs/heads/trunk
Commit: c4cfea6e12a057c9d99e9eff2b1667c620687933
Parents: 1d0a64c
Author: Anthony Shaw <an...@apache.org>
Authored: Sat Apr 1 11:48:53 2017 +1100
Committer: Anthony Shaw <an...@apache.org>
Committed: Sat Apr 1 11:48:53 2017 +1100

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


http://git-wip-us.apache.org/repos/asf/libcloud/blob/c4cfea6e/CHANGES.rst
----------------------------------------------------------------------
diff --git a/CHANGES.rst b/CHANGES.rst
index 65c8324..1631733 100644
--- a/CHANGES.rst
+++ b/CHANGES.rst
@@ -8,6 +8,10 @@ Changes in latest version of Apache Libcloud
 Compute
 ~~~~~~~
 
+- [Linode] Add start, stop instance methods and fix incorrect state TERMINATED to STOPPED
+  [GITHUB-986]
+  (Markos Gogoulos)
+
 - [EC2] Add ENA support for EC2 compute images
   [GITHUB-983]
   (Alex Misstear)


[2/4] libcloud git commit: add a few missing functions and fix state

Posted by an...@apache.org.
add a few missing functions and fix state


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

Branch: refs/heads/trunk
Commit: f90a251671a5231e806c9ac4da02cc1e12deafa2
Parents: 53591b7
Author: Markos Gogoulos <mg...@mist.io>
Authored: Wed Feb 15 17:40:50 2017 +0200
Committer: Anthony Shaw <an...@apache.org>
Committed: Sat Apr 1 11:47:22 2017 +1100

----------------------------------------------------------------------
 libcloud/compute/drivers/linode.py | 41 ++++++++++++++++++++++++++++++++-
 1 file changed, 40 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/libcloud/blob/f90a2516/libcloud/compute/drivers/linode.py
----------------------------------------------------------------------
diff --git a/libcloud/compute/drivers/linode.py b/libcloud/compute/drivers/linode.py
index e24e367..94ac2a0 100644
--- a/libcloud/compute/drivers/linode.py
+++ b/libcloud/compute/drivers/linode.py
@@ -97,7 +97,7 @@ class LinodeNodeDriver(NodeDriver):
         (-1): NodeState.PENDING,    # Being Created
         0: NodeState.PENDING,     # Brand New
         1: NodeState.RUNNING,     # Running
-        2: NodeState.TERMINATED,  # Powered Off
+        2: NodeState.STOPPED,  # Powered Off
         3: NodeState.REBOOTING,   # Shutting Down
         4: NodeState.UNKNOWN      # Reserved
     }
@@ -118,6 +118,15 @@ class LinodeNodeDriver(NodeDriver):
         data = self.connection.request(API_ROOT, params=params).objects[0]
         return self._to_nodes(data)
 
+    def ex_start_node(self, node):
+        """
+        Boot the given Linode
+
+        """
+        params = {"api_action": "linode.boot", "LinodeID": node.id}
+        self.connection.request(API_ROOT, params=params)
+        return True
+
     def reboot_node(self, node):
         """
         Reboot the given Linode
@@ -364,6 +373,10 @@ class LinodeNodeDriver(NodeDriver):
             "Comments": comments,
             "DiskList": disks
         }
+        if "ex_private" in kwargs and kwargs["ex_private"]:
+            params['helper_network'] = True
+            params['helper_distro'] = True
+
         data = self.connection.request(API_ROOT, params=params).objects[0]
         linode["config"] = data["ConfigID"]
 
@@ -388,6 +401,32 @@ class LinodeNodeDriver(NodeDriver):
 
         return None
 
+    def ex_resize_node(self, node, size):
+        """Resizes a Linode from one plan to another
+
+        Immediately shuts the Linode down, charges/credits the account,
+        and issue a migration to another host server.
+        Requires a size (numeric), which is the desired PlanID available from
+        avail.LinodePlans()
+        After resize is complete the node needs to be booted
+        """
+
+        params = {"api_action": "linode.resize", "LinodeID": node.id,
+                  "PlanID": size}
+        self.connection.request(API_ROOT, params=params)
+        return True
+
+    def ex_rename_node(self, node, name):
+        """Renames a node"""
+
+        params = {
+            "api_action": "linode.update",
+            "LinodeID": node.id,
+            "Label": name
+        }
+        data = self.connection.request(API_ROOT, params=params)
+        return True
+
     def list_sizes(self, location=None):
         """
         List available Linode plans