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 2021/02/26 22:51:42 UTC

[libcloud] branch trunk updated (51001b8 -> 60a1978)

This is an automated email from the ASF dual-hosted git repository.

tomaz pushed a change to branch trunk
in repository https://gitbox.apache.org/repos/asf/libcloud.git.


    from 51001b8  Add changelog entry.
     new 3320c5b  status RESIZE of node was not implemented
     new 6f81ec9  Merge branch 'added_node_state_map' of https://github.com/robjuffermans/libcloud into robjuffermans-added_node_state_map
     new 60a1978  Use reconfiguring NodeState instead, add changelog entry.

The 3 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 CHANGES.rst                           | 4 ++++
 libcloud/compute/drivers/openstack.py | 1 +
 libcloud/test/compute/test_ovh.py     | 3 +++
 3 files changed, 8 insertions(+)


[libcloud] 01/03: status RESIZE of node was not implemented

Posted by to...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

tomaz pushed a commit to branch trunk
in repository https://gitbox.apache.org/repos/asf/libcloud.git

commit 3320c5b9bd3b433b7f78a0267524ad22bb9d2e1e
Author: Rob Juffermans <ro...@maxmath.nl>
AuthorDate: Wed Feb 24 01:31:48 2021 +0100

    status RESIZE of node was not implemented
---
 libcloud/compute/drivers/openstack.py | 1 +
 libcloud/test/compute/test_ovh.py     | 3 +++
 2 files changed, 4 insertions(+)

diff --git a/libcloud/compute/drivers/openstack.py b/libcloud/compute/drivers/openstack.py
index 9e5505c..2ab51d9 100644
--- a/libcloud/compute/drivers/openstack.py
+++ b/libcloud/compute/drivers/openstack.py
@@ -120,6 +120,7 @@ class OpenStackNodeDriver(NodeDriver, OpenStackDriverMixin):
         'PASSWORD': NodeState.PENDING,
         'RESCUE': NodeState.PENDING,
         'REBOOT': NodeState.REBOOTING,
+        'RESIZE': NodeState.MIGRATING,
         'HARD_REBOOT': NodeState.REBOOTING,
         'SHARE_IP': NodeState.PENDING,
         'SHARE_IP_NO_CONFIG': NodeState.PENDING,
diff --git a/libcloud/test/compute/test_ovh.py b/libcloud/test/compute/test_ovh.py
index f79c2b7..c8b7eae 100644
--- a/libcloud/test/compute/test_ovh.py
+++ b/libcloud/test/compute/test_ovh.py
@@ -231,6 +231,9 @@ class OvhTests(unittest.TestCase):
                                        location=location)
         self.assertEqual(node.name, 'test_vm')
 
+    def test_resizing_node(self):
+        assert self.driver.NODE_STATE_MAP['RESIZE']
+
     def test_destroy_node(self):
         node = self.driver.list_nodes()[0]
         self.driver.destroy_node(node)


[libcloud] 03/03: Use reconfiguring NodeState instead, add changelog entry.

Posted by to...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

tomaz pushed a commit to branch trunk
in repository https://gitbox.apache.org/repos/asf/libcloud.git

commit 60a1978a1565dc5f20e2ef12f89b1c6ab960f482
Author: Tomaz Muraus <to...@tomaz.me>
AuthorDate: Fri Feb 26 23:42:02 2021 +0100

    Use reconfiguring NodeState instead, add changelog entry.
---
 CHANGES.rst                           | 4 ++++
 libcloud/compute/drivers/openstack.py | 2 +-
 libcloud/test/compute/test_ovh.py     | 2 +-
 3 files changed, 6 insertions(+), 2 deletions(-)

diff --git a/CHANGES.rst b/CHANGES.rst
index 0dc62d8..b0fab73 100644
--- a/CHANGES.rst
+++ b/CHANGES.rst
@@ -37,6 +37,10 @@ Compute
   (GITHUB-1549)
   [Tio Gobin - @tgn-outscale]
 
+- [Ovh] Fix driver so it doesn't throw if a node is in resizing state.
+  (GITHUB-1555)
+  [Rob Juffermans - @robjuffermans]
+
 Changes in Apache Libcloud 3.3.1
 --------------------------------
 
diff --git a/libcloud/compute/drivers/openstack.py b/libcloud/compute/drivers/openstack.py
index 2ab51d9..91e0f63 100644
--- a/libcloud/compute/drivers/openstack.py
+++ b/libcloud/compute/drivers/openstack.py
@@ -120,7 +120,7 @@ class OpenStackNodeDriver(NodeDriver, OpenStackDriverMixin):
         'PASSWORD': NodeState.PENDING,
         'RESCUE': NodeState.PENDING,
         'REBOOT': NodeState.REBOOTING,
-        'RESIZE': NodeState.MIGRATING,
+        'RESIZE': NodeState.RECONFIGURING,
         'HARD_REBOOT': NodeState.REBOOTING,
         'SHARE_IP': NodeState.PENDING,
         'SHARE_IP_NO_CONFIG': NodeState.PENDING,
diff --git a/libcloud/test/compute/test_ovh.py b/libcloud/test/compute/test_ovh.py
index c8b7eae..77f8110 100644
--- a/libcloud/test/compute/test_ovh.py
+++ b/libcloud/test/compute/test_ovh.py
@@ -232,7 +232,7 @@ class OvhTests(unittest.TestCase):
         self.assertEqual(node.name, 'test_vm')
 
     def test_resizing_node(self):
-        assert self.driver.NODE_STATE_MAP['RESIZE']
+        self.assertTrue(self.driver.NODE_STATE_MAP['RESIZE'])
 
     def test_destroy_node(self):
         node = self.driver.list_nodes()[0]


[libcloud] 02/03: Merge branch 'added_node_state_map' of https://github.com/robjuffermans/libcloud into robjuffermans-added_node_state_map

Posted by to...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

tomaz pushed a commit to branch trunk
in repository https://gitbox.apache.org/repos/asf/libcloud.git

commit 6f81ec9a8ab0ec16e23de6a72c4cc8858ffc7a11
Merge: 51001b8 3320c5b
Author: Tomaz Muraus <to...@tomaz.me>
AuthorDate: Fri Feb 26 23:36:39 2021 +0100

    Merge branch 'added_node_state_map' of https://github.com/robjuffermans/libcloud into robjuffermans-added_node_state_map

 libcloud/compute/drivers/openstack.py | 1 +
 libcloud/test/compute/test_ovh.py     | 3 +++
 2 files changed, 4 insertions(+)