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 <[email protected]> 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]
