Пример #1
0
    def test_07(self):
        HEADING("07 INFO OPENSTACK TABLES")
        self.test_03()
        table = cm_table()
        columns = ["id", "name", "ram", "vcpus"]

        table.create(self.cloud.flavors, columns, header=True)
        print table

        table = cm_table()
        columns = ["id", "name", "ram", "vcpus"]

        table.create(self.cloud.flavors, columns, format='HTML', header=True)
        print table

        table = cm_table()
        columns = ["id", "name", "ram", "vcpus"]

        table.create(self.cloud.flavors, columns, format='%12s', header=True)
        print table

        assert table is not None
Пример #2
0
        # print json.dumps(cloud.usage("2000-01-01T00:00:00",
        # "2013-12-31T00:00:00"), indent=4)

        print json.dumps(cloud.limits(), indent=4)

        # print json.dumps(cloud.usage("2000-01-01", "2013-12-31"), indent=4)
        # print json.dumps(cloud.usage("2000-01-01", "2013-12-31",format=None),
        # indent=4)
        # print json.dumps(cloud.limits(format='dict'), indent=4)
        # print json.dumps(cloud.limits(format='array'), indent=4)
    if flavor_test or table_test:
        cloud.refresh('flavors')
        print json.dumps(cloud.flavors, indent=4)

    if table_test:
        table = cm_table()
        columns = ["id", "name", "ram", "vcpus"]

        table.create(cloud.flavors, columns, header=True)
        print table

        table.create(cloud.flavors, columns, format='HTML', header=True)
        print table

        table.create(cloud.flavors, columns, format='%12s', header=True)
        print table

    if image_test:
        cloud.refresh('images')
        print json.dumps(cloud.images, indent=4)