Пример #1
0
def verify_instance_biil(project):
    nova_dao = NovaDAO("mysql+pymysql://root:^[email protected]/nova")
    instances = nova_dao.get_instances(project.id)

    for instance in instances:
        LOG.info("++++++++++++++++++++++++++++++++++++++++++++++++++")
        LOG.info("instance")
        LOG.info("\tname: %s" % instance.display_name)
        LOG.info("\tid: " + instance.uuid)
        LOG.info("\tdeleted: %s" % instance.deleted)

        verify_billing(instance.uuid, "instance")

    LOG.info("++++++++++++++++++++++++++++++++++++++++++++++++++")
Пример #2
0
 def test_get_instances(self):
     """ Test retrieving the instances of a project """
     nova_dao = NovaDAO("mysql+pymysql://root:^[email protected]/nova")
     instances = nova_dao.get_instances("18fb285bfa4f4ddaaebb7512683b6a52")
     self.assertGreater(len(instances), 0)