From 30294bcafd6310280fadf6c4ea1e68bd9c38d4b1 Mon Sep 17 00:00:00 2001 From: Boris Pavlovic Date: Thu, 5 Oct 2017 15:41:49 -0700 Subject: [PATCH] [CI] Unblock CI by introducing Nova VMs cleanup bug This bug removes limit=-1 that is broken at the moment and hangs out. By removing it we will remove only 1000 servers. We are going to revert this patch as soon as Nova is fixed Change-Id: If23d874e8b73de12ba2b8c4e028a55543af6381b --- rally/plugins/openstack/cleanup/resources.py | 3 ++- tests/unit/plugins/openstack/cleanup/test_resources.py | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/rally/plugins/openstack/cleanup/resources.py b/rally/plugins/openstack/cleanup/resources.py index 2f5dac0c28..647c8564e9 100644 --- a/rally/plugins/openstack/cleanup/resources.py +++ b/rally/plugins/openstack/cleanup/resources.py @@ -154,7 +154,8 @@ _nova_order = get_order(200) class NovaServer(base.ResourceManager): def list(self): """List all servers.""" - return self._manager().list(limit=-1) + # FIX(boris-42): Use limit=-1 when it's fixed + return self._manager().list() def delete(self): if getattr(self.raw_resource, "OS-EXT-STS:locked", False): diff --git a/tests/unit/plugins/openstack/cleanup/test_resources.py b/tests/unit/plugins/openstack/cleanup/test_resources.py index 4a934186a8..29e2ac5126 100644 --- a/tests/unit/plugins/openstack/cleanup/test_resources.py +++ b/tests/unit/plugins/openstack/cleanup/test_resources.py @@ -84,7 +84,7 @@ class NovaServerTestCase(test.TestCase): server.list() - server._manager.return_value.list.assert_called_once_with(limit=-1) + server._manager.return_value.list.assert_called_once_with() def test_delete(self): server = resources.NovaServer()