예제 #1
0
 def test_get_aggregate_list(self):
     uuids = [self.aggregate['uuid']]
     for i in range(1, 6):
         aggregate = utils.create_test_aggregate(
             uuid=uuidutils.generate_uuid(), name=six.text_type(i))
         uuids.append(six.text_type(aggregate['uuid']))
     res = self.dbapi.aggregate_get_all(self.context)
     res_uuids = [r['uuid'] for r in res]
     six.assertCountEqual(self, uuids, res_uuids)
예제 #2
0
 def test_create_aggregate(self):
     utils.create_test_aggregate(name='testing')
 def setUp(self):
     super(TestAvailabilityZoneAuthorization, self).setUp()
     self.agg = utils.create_test_aggregate()
     self.metadata = {'availability_zone': 'az1'}
     self.agg_meta = utils.create_test_aggregate_metadata(
         aggregate_id=self.agg.id, metadata=self.metadata)
예제 #4
0
 def setUp(self):
     super(DbAggregateTestCase, self).setUp()
     self.aggregate = utils.create_test_aggregate()
예제 #5
0
 def test_server_group_create(self):
     sg = utils.create_test_aggregate(name='testing')
     self.assertEqual('testing', sg.name)