def test_osc_lib(self): base.execute('python', base.EXAMPLE_DIR + '/osc-lib.py --debug')
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')
def test_object_api(self): base.execute('python', base.EXAMPLE_DIR + '/object_api.py --debug')
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'