diff options
| author | Jenkins <jenkins@review.openstack.org> | 2017-04-27 03:03:08 +0000 |
|---|---|---|
| committer | Gerrit Code Review <review@openstack.org> | 2017-04-27 03:03:08 +0000 |
| commit | 19a7081aa0dd7303e908969d65879ce13ef3cc27 (patch) | |
| tree | ae24da79b1c189cbe278c42f0051699c7cc9dce8 /openstackclient/tests/functional/base.py | |
| parent | 7939fea6e779f769ad6ee15225e35cd4a002a58e (diff) | |
| parent | 871450abcd89f9bb5ee9f75cdef3b812695eae93 (diff) | |
| download | python-openstackclient-19a7081aa0dd7303e908969d65879ce13ef3cc27.tar.gz | |
Merge "Fix quota functional tests for nova-net"
Diffstat (limited to 'openstackclient/tests/functional/base.py')
| -rw-r--r-- | openstackclient/tests/functional/base.py | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/openstackclient/tests/functional/base.py b/openstackclient/tests/functional/base.py index 85743296..2d070645 100644 --- a/openstackclient/tests/functional/base.py +++ b/openstackclient/tests/functional/base.py @@ -42,6 +42,18 @@ def execute(cmd, fail_ok=False, merge_stderr=False): return result +def is_service_enabled(service): + """Ask client cloud if service is available""" + try: + ret = execute('openstack service show -f value -c enabled ' + service) + except exceptions.CommandFailed: + # We get here for multiple reasons, all of them mean that a working + # service is not avilable + return False + + return "True" in ret + + class TestCase(testtools.TestCase): delimiter_line = re.compile('^\+\-[\+\-]+\-\+$') |
