diff options
author | Zuul <zuul@review.openstack.org> | 2018-05-09 01:22:46 +0000 |
---|---|---|
committer | Gerrit Code Review <review@openstack.org> | 2018-05-09 01:22:47 +0000 |
commit | 7e2f459032e842cd7cd53622c9fdd3056480789a (patch) | |
tree | e913421100b97713463bc352c3b3697e20e2b107 /nova | |
parent | 3f1c581fc6b3e5daaeb766454694fbcc84904cc7 (diff) | |
parent | ea2d459d096c220e21aeb74f516ca35a5a6b4db2 (diff) | |
download | nova-7e2f459032e842cd7cd53622c9fdd3056480789a.tar.gz |
Merge "Convert fping API to processutils.execute()"
Diffstat (limited to 'nova')
-rw-r--r-- | nova/api/openstack/compute/fping.py | 7 | ||||
-rw-r--r-- | nova/tests/functional/api_sample_tests/test_fping.py | 3 | ||||
-rw-r--r-- | nova/tests/unit/api/openstack/compute/test_fping.py | 2 |
3 files changed, 7 insertions, 5 deletions
diff --git a/nova/api/openstack/compute/fping.py b/nova/api/openstack/compute/fping.py index b4d5c29fe4..540300f7cf 100644 --- a/nova/api/openstack/compute/fping.py +++ b/nova/api/openstack/compute/fping.py @@ -20,6 +20,8 @@ import os from webob import exc +from oslo_concurrency import processutils + from nova.api.openstack.api_version_request \ import MAX_PROXY_API_SUPPORT_VERSION from nova.api.openstack import common @@ -30,7 +32,6 @@ from nova import compute import nova.conf from nova.i18n import _ from nova.policies import fping as fping_policies -from nova import utils CONF = nova.conf.CONF @@ -48,8 +49,8 @@ class FpingController(wsgi.Controller): @staticmethod def fping(ips): - fping_ret = utils.execute(CONF.api.fping_path, *ips, - check_exit_code=False) + fping_ret = processutils.execute(CONF.api.fping_path, *ips, + check_exit_code=False) if not fping_ret: return set() alive_ips = set() diff --git a/nova/tests/functional/api_sample_tests/test_fping.py b/nova/tests/functional/api_sample_tests/test_fping.py index a6e4d369a7..2c94038c3e 100644 --- a/nova/tests/functional/api_sample_tests/test_fping.py +++ b/nova/tests/functional/api_sample_tests/test_fping.py @@ -25,7 +25,8 @@ class FpingSampleJsonTests(test_servers.ServersSampleBase): def fake_check_fping(self): pass - self.stub_out("nova.utils.execute", test_fping.execute) + self.stub_out("oslo_concurrency.processutils.execute", + test_fping.execute) self.stub_out("nova.api.openstack.compute.fping." "FpingController.check_fping", fake_check_fping) diff --git a/nova/tests/unit/api/openstack/compute/test_fping.py b/nova/tests/unit/api/openstack/compute/test_fping.py index f995ce8afe..f9c03a6548 100644 --- a/nova/tests/unit/api/openstack/compute/test_fping.py +++ b/nova/tests/unit/api/openstack/compute/test_fping.py @@ -42,7 +42,7 @@ class FpingTestV21(test.TestCase): return_servers) self.stub_out("nova.db.instance_get_by_uuid", return_server) - self.stub_out('nova.utils.execute', + self.stub_out('oslo_concurrency.processutils.execute', execute) self.stub_out("nova.api.openstack.compute.fping.FpingController." "check_fping", |