Ejemplo n.º 1
0
def test_lxc_controller_deployed():
    with open('test/juju-output/lxc-controller-deployed.out') as js:
        with open('test/maas-output/maas-for-lxc.out') as ms:
            juju_state = JujuState(js)
            maas_state = MaasState(json.load(ms))
            update_machine_info(juju_state, maas_state)
            assert NOVA_CLOUD_CONTROLLER in juju_state.services
Ejemplo n.º 2
0
def test_parse_state():
    with open('test/juju-output/service-pending.out') as juju_file:
        with open('test/maas-output/twonodes.out') as maas_file:
            juju_state = JujuState(juju_file)
            maas_state = MaasState(json.load(maas_file))

            update_machine_info(juju_state, maas_state)

            juju_machines = list(juju_state.machines())

            assert ("node-4c49e73e-e8b8-11e2-ac16-5254002cb1d6"
                    in juju_machines[0].instance_id)
            assert ("node-5fb74ba0-e8c1-11e2-b109-5254002cb1d6"
                    in juju_machines[1].instance_id)
Ejemplo n.º 3
0
def test_lxc():
    with open('test/juju-output/lxc.out') as js:
        with open('test/maas-output/maas-for-lxc.out') as ms:
            juju_state = JujuState(js)
            maas_state = MaasState(json.load(ms))
            update_machine_info(juju_state, maas_state)