Exemple #1
0
def main():
    c = utils.get_client()

    LOG.debug("list networks: %s", [_.name for _ in c.network.list()])
    LOG.debug("list subnets: %s", [_.name for _ in c.subnet.list()])
    LOG.debug("list routers: %s", [_.name for _ in c.router.list()])
    LOG.debug("list servers: %s", [_.name for _ in c.server.list()])
    LOG.debug("list key pairs: %s", [_.name for _ in c.key_pair.list()])
    LOG.debug("list images: %s", [_.name for _ in c.image.list()])
    run_tests(c)
    LOG.debug("list networks: %s", [_.name for _ in c.network.list()])
    LOG.debug("list subnets: %s", [_.name for _ in c.subnet.list()])
    LOG.debug("list routers: %s", [_.name for _ in c.router.list()])
    LOG.debug("list servers: %s", [_.name for _ in c.server.list()])
    LOG.debug("list key pairs: %s", [_.name for _ in c.key_pair.list()])
    LOG.debug("list images: %s", [_.name for _ in c.image.list()])
    show_test_summary()
Exemple #2
0
                a1 = q1.get_associations()
                LOG.debug("QoS #1 associations: %s", a1)
                test("Volume Type #1: associated with QoS #1", vt1 in a1)
                test("Volume Type #2: associated with QoS #1", vt2 in a1)

                LOG.debug("All Volume Type: disassociate from QoS #1")
                q1.disassociate_all()
                a1 = q1.get_associations()
                LOG.debug("QoS #1 associations: %s", a1)
                test("No volume type associated with QoS #1", a1 == [])

            test("Volume Type #2 is deleted", vt1 not in c.volume.list())

        test("Volume Type #1 is deleted", vt1 not in c.volume.list())

    test("QoS #1 is deleted", q1 not in c.volume.list())


if __name__ == '__main__':
    c = utils.get_client()

    LOG.debug("list volume types: %s", [_.name for _ in c.volume_type.list()])
    LOG.debug("list volumes: %s", [_.name for _ in c.volume.list()])
    LOG.debug("list QoS: %s", [_.name for _ in c.volume_type_qos.list()])
    main(c)
    LOG.debug("list volume types: %s", [_.name for _ in c.volume_type.list()])
    LOG.debug("list volumes: %s", [_.name for _ in c.volume.list()])
    LOG.debug("list QoS: %s", [_.name for _ in c.volume_type_qos.list()])

    show_test_summary()