Пример #1
0
 def test_fail_floating_ip_in_bulk_creation(self):
     self.assertRaises(exception.FloatingIpExists,
                       self._create_floating_ips,
                       [self.floating_ip, self.floating_ip_2])
     all_ips = db.floating_ip_get_all(self.context)
     ip_list = [ip['address'] for ip in all_ips]
     self.assertIn(self.floating_ip, ip_list)
     self.assertNotIn(self.floating_ip_2, ip_list)
Пример #2
0
    def test_floating_ip_in_bulk_creation(self):
        self._delete_floating_ip()

        self._create_floating_ips([self.floating_ip, self.floating_ip_2])
        all_ips = db.floating_ip_get_all(self.context)
        ip_list = [ip['address'] for ip in all_ips]
        self.assertIn(self.floating_ip, ip_list)
        self.assertIn(self.floating_ip_2, ip_list)
Пример #3
0
    def test_floating_ip_in_bulk_creation(self):
        self._delete_floating_ip()

        self._create_floating_ips([self.floating_ip, self.floating_ip_2])
        all_ips = db.floating_ip_get_all(self.context)
        ip_list = [ip['address'] for ip in all_ips]
        self.assertIn(self.floating_ip, ip_list)
        self.assertIn(self.floating_ip_2, ip_list)
Пример #4
0
 def test_fail_floating_ip_in_bulk_creation(self):
     self.assertRaises(exception.FloatingIpExists,
                       self._create_floating_ips,
                       [self.floating_ip, self.floating_ip_2])
     all_ips = db.floating_ip_get_all(self.context)
     ip_list = [ip['address'] for ip in all_ips]
     self.assertIn(self.floating_ip, ip_list)
     self.assertNotIn(self.floating_ip_2, ip_list)
Пример #5
0
 def get_all(cls, context):
     db_floatingips = db.floating_ip_get_all(context)
     return obj_base.obj_make_list(context, cls(context),
                                   objects.FloatingIP, db_floatingips)