diff --git a/whitebox_neutron_tempest_plugin/tests/scenario/base.py b/whitebox_neutron_tempest_plugin/tests/scenario/base.py index 66825c1..cb43d11 100644 --- a/whitebox_neutron_tempest_plugin/tests/scenario/base.py +++ b/whitebox_neutron_tempest_plugin/tests/scenario/base.py @@ -304,11 +304,12 @@ class BaseTempestWhiteboxTestCase(base.BaseTempestTestCase): @classmethod def get_pod_of_service(cls, service='neutron'): - pods_list = "{} get pods".format(cls.OC) + pods_list = ("{} get pods -o=name " + "--field-selector=status.phase=Running".format(cls.OC)) if service == 'neutron': - filters = "grep neutron | grep -v meta | cut -d' ' -f1" + filters = "cut -d'/' -f 2 | grep ^neutron | grep -v meta" else: - filters = "grep {} | cut -d' ' -f1".format(service) + filters = "cut -d'/' -f 2 | grep {}".format(service) return cls.proxy_host_client.exec_command( "{} | {}".format(pods_list, filters)).strip()