def test_too_many_addresses(self): address = '192.168.0.100' db.floating_ip_create(context.get_admin_context(), { 'address': address, 'project_id': self.project_id }) self.assertRaises(exception.QuotaError, self.network.allocate_floating_ip, self.context, self.project_id) db.floating_ip_destroy(context.get_admin_context(), address)
def test_too_many_addresses(self): address = '192.168.0.100' db.floating_ip_create(context.get_admin_context(), {'address': address, 'project_id': self.project_id}) self.assertRaises(exception.QuotaError, self.network.allocate_floating_ip, self.context, self.project_id) db.floating_ip_destroy(context.get_admin_context(), address)
def _delete_floating_ip(self): db.floating_ip_destroy(self.context, self.floating_ip)
def _delete_floating_ip(self): db.floating_ip_destroy(self.context, testaddress)