Пример #1
0
 def test_osc_lib(self):
     base.execute('python', base.EXAMPLE_DIR + '/osc-lib.py --debug')
Пример #2
0
 def test_common(self):
     # NOTE(stevemar): If an examples has a non-zero return
     # code, then execute will raise an error by default.
     base.execute('python', base.EXAMPLE_DIR + '/common.py --debug')
Пример #3
0
 def test_object_api(self):
     base.execute('python', base.EXAMPLE_DIR + '/object_api.py --debug')
Пример #4
0
def is_dhcp_agent_present():
    cmd = 'openstack --os-cloud={cloud} network agent list -f json ' \
          '--agent-type dhcp'.format(cloud=ADMIN_CLOUD)
    output = json.loads(execute(cmd, fail_ok=False))
    return output and output[0]['State'] == 'UP'