summaryrefslogtreecommitdiffstats
path: root/tests/inspector.py
diff options
context:
space:
mode:
authorRyota MIBU <r-mibu@cq.jp.nec.com>2016-02-21 00:19:29 +0900
committerRyota Mibu <r-mibu@cq.jp.nec.com>2016-02-20 15:34:25 +0000
commit0f39f1198ecbd5b5979e009ee3816973e207c2e1 (patch)
treec7681ccb02544f77534863c3f7f412cf204d21a3 /tests/inspector.py
parent914c18c6ffecc12026c8eb8838c719e6105bbcc1 (diff)
test: add nova_force_down clientbrahmaputra.1.0
New force_down API is not available due to rack of support in default configuration of keystone service catalog and limit of novaclient, so this patch adds nova_force_down client to operate the new API. Change-Id: I2545f4448313b334d4c0a12f1638e64ecfafdf41 Signed-off-by: Ryota MIBU <r-mibu@cq.jp.nec.com> (cherry picked from commit a3ea372e18ef14b75734f82db969531df6d0c7dd)
Diffstat (limited to 'tests/inspector.py')
-rw-r--r--tests/inspector.py12
1 files changed, 11 insertions, 1 deletions
diff --git a/tests/inspector.py b/tests/inspector.py
index c6432102..c796283d 100644
--- a/tests/inspector.py
+++ b/tests/inspector.py
@@ -15,6 +15,8 @@ import os
import novaclient.client as novaclient
+import nova_force_down
+
class DoctorInspectorSample(object):
@@ -34,7 +36,15 @@ class DoctorInspectorSample(object):
opts = {'all_tenants': True, 'host': hostname}
for server in self.nova.servers.list(detailed=False, search_opts=opts):
self.nova.servers.reset_state(server, 'error')
- self.nova.services.force_down(hostname, 'nova-compute', True)
+
+ # NOTE: We use our own client here instead of this novaclient for a
+ # workaround. Once keystone provides v2.1 nova api endpoint
+ # in the service catalog which is configured by OpenStack
+ # installer, we can use this:
+ #
+ # self.nova.services.force_down(hostname, 'nova-compute', True)
+ #
+ nova_force_down.force_down(hostname)
app = Flask(__name__)