Ejemplo n.º 1
0
def clone_env(env_id, release):
    LOG.info("Cloning env %s for release %s", env_id, release.data['name'])
    res_json = fuel2_env_call(["clone", "-f", "json", str(env_id),
                               uuid.uuid4().hex, str(release.data['id'])],
                              output=True)
    res = json.loads(res_json)
    res = helpers.normalized_cliff_show_json(res)
    if 'id' in res:
        return res['id']

    raise Exception("Couldn't find new environment ID in fuel CLI output:"
                    "\n%s" % res)
Ejemplo n.º 2
0
def test_normalized_cliff_show_json(data, normalized_data):
    res = helpers.normalized_cliff_show_json(data)
    assert res == normalized_data