Test changes to accomodate no default block functionality

Change-Id: Id22c524ae430220cf02ed1c417aac7d6af1c6668
This commit is contained in:
rajarammallya 2012-01-24 18:20:46 +05:30
parent 67d1da329e
commit 913179fcba

View File

@ -397,7 +397,12 @@ class TestIpRoutesCLI(TestBaseCLI):
class TestInterfaceCLI(TestBaseCLI):
def test_crud(self):
iface = factory.create_interface(tenant_id=self.tenant_id)
network_id = uuid.uuid4()
block = factory.create_block(cidr="20.1.1.0/24",
network_id=network_id,
tenant_id=self.tenant_id)
iface = factory.create_interface(network_id=network_id,
tenant_id=self.tenant_id)
self.assertShows("interface",
iface,
parameters="vif_id=%s" % iface['id'])
@ -438,19 +443,19 @@ class TestAllowedIpCLI(TestBaseCLI):
def test_crud(self):
network_id = uuid.uuid4()
iface = factory.create_interface(network_id=network_id,
tenant_id=self.tenant_id)
block = factory.create_block(cidr="20.1.1.0/24",
network_id=network_id,
tenant_id=self.tenant_id)
network_id=network_id,
tenant_id=self.tenant_id)
iface = factory.create_interface(network_id=network_id,
tenant_id=self.tenant_id)
ip = factory.create_ip(address="20.1.1.2",
block_id=block['id'],
used_by_tenant=self.tenant_id,
tenant_id=self.tenant_id)
block_id=block['id'],
used_by_tenant=self.tenant_id,
tenant_id=self.tenant_id)
another_ip = factory.create_ip(address="20.1.1.3",
block_id=block['id'],
used_by_tenant=self.tenant_id,
tenant_id=self.tenant_id)
block_id=block['id'],
used_by_tenant=self.tenant_id,
tenant_id=self.tenant_id)
ip_res = self.command("allowed_ip create",
interface_id=iface['id'],