replace all occurrences of {Ss}liver{s,} with {Ii}nstance{s,}
diff --git a/xos/tests/networktest.py b/xos/tests/networktest.py
index 5390f0f..b4bcbd2 100644
--- a/xos/tests/networktest.py
+++ b/xos/tests/networktest.py
@@ -2,12 +2,12 @@
Network Data Model Test
1) Create a slice1
- 2) Create sliver1 on slice1
- 3) Verify one quantum network created for sliver1
+ 2) Create instance1 on slice1
+ 3) Verify one quantum network created for instance1
4) Create a private network, network1
5) Connect network1 to slice1
- 6) Create sliver1_2 on slice1
- 7) Verify two quantum networks created for sliver1_2
+ 6) Create instance1_2 on slice1
+ 7) Verify two quantum networks created for instance1_2
"""
import os
@@ -19,7 +19,7 @@
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "xos.settings")
from openstack.manager import OpenStackManager
-from core.models import Slice, Sliver, ServiceClass, Reservation, Tag, Network, User, Node, Image, Deployment, Site, NetworkTemplate, NetworkSlice
+from core.models import Slice, Instance, ServiceClass, Reservation, Tag, Network, User, Node, Image, Deployment, Site, NetworkTemplate, NetworkSlice
from planetstacktest import PlanetStackTest, fail_unless, fail
@@ -27,10 +27,10 @@
def __init__(self):
PlanetStackTest.__init__(self)
- def wait_for_ports(self, sliver, count=1, max_time=120):
- print "waiting for %d ports on %s" % (count, str(sliver))
+ def wait_for_ports(self, instance, count=1, max_time=120):
+ print "waiting for %d ports on %s" % (count, str(instance))
while max_time>0:
- ports = self.manager.driver.shell.quantum.list_ports(device_id=sliver.instance_id)["ports"]
+ ports = self.manager.driver.shell.quantum.list_ports(device_id=instance.instance_id)["ports"]
if len(ports)==count:
return ports
@@ -70,15 +70,15 @@
creator=self.testUser)
slice1=self.save_and_wait_for_enacted(slice1, nonempty_fields=["tenant_id"])
- sliver1 = Sliver(image = self.testImage,
+ instance1 = Instance(image = self.testImage,
creator=self.testUser,
slice=slice1,
node=self.testNode,
deploymentNetwork=self.testDeployment)
- sliver1=self.save_and_wait_for_enacted(sliver1, nonempty_fields=["instance_id", "ip"])
+ instance1=self.save_and_wait_for_enacted(instance1, nonempty_fields=["instance_id", "ip"])
- # sliver1 should have only one port, its private network
- ports = self.wait_for_ports(sliver1, count=1)
+ # instance1 should have only one port, its private network
+ ports = self.wait_for_ports(instance1, count=1)
self.verify_network_names(ports, [slice1.name])
network1 = Network(name = slice1Name + "-pvt",
@@ -89,14 +89,14 @@
network1_slice1 = NetworkSlice(network=network1, slice=slice1)
network1_slice1.save() # does not need to be enacted
- sliver1_2 = Sliver(image = self.testImage,
+ instance1_2 = Instance(image = self.testImage,
creator=self.testUser,
slice=slice1,
node=self.testNode,
deploymentNetwork=self.testDeployment)
- sliver1_2=self.save_and_wait_for_enacted(sliver1_2, nonempty_fields=["instance_id", "ip"])
+ instance1_2=self.save_and_wait_for_enacted(instance1_2, nonempty_fields=["instance_id", "ip"])
- ports = self.wait_for_ports(sliver1_2, count=2)
+ ports = self.wait_for_ports(instance1_2, count=2)
self.verify_network_names(ports, [slice1.name, network1.name])
self.slice1 = slice1
@@ -118,14 +118,14 @@
network2_slice2 = NetworkSlice(network=network2, slice=slice2)
network2_slice2.save() # does not need to be enacted
- sliver2_1 = Sliver(image = self.testImage,
+ instance2_1 = Instance(image = self.testImage,
creator=self.testUser,
slice=slice2,
node=self.testNode,
deploymentNetwork=self.testDeployment)
- sliver2_1=self.save_and_wait_for_enacted(sliver2_1, nonempty_fields=["instance_id", "ip"])
+ instance2_1=self.save_and_wait_for_enacted(instance2_1, nonempty_fields=["instance_id", "ip"])
- ports = self.wait_for_ports(sliver2_1, count=2)
+ ports = self.wait_for_ports(instance2_1, count=2)
self.verify_network_names(ports, [slice2.name, network2.name])
self.slice2 = slice2
@@ -137,14 +137,14 @@
network2_slice1 = NetworkSlice(network=self.network2, slice=self.slice1)
network2_slice1.save()
- sliver1_3 = Sliver(image = self.testImage,
+ instance1_3 = Instance(image = self.testImage,
creator=self.testUser,
slice=self.slice1,
node=self.testNode,
deploymentNetwork=self.testDeployment)
- sliver1_3=self.save_and_wait_for_enacted(sliver1_3, nonempty_fields=["instance_id", "ip"])
+ instance1_3=self.save_and_wait_for_enacted(instance1_3, nonempty_fields=["instance_id", "ip"])
- ports = self.wait_for_ports(sliver1_3, count=3)
+ ports = self.wait_for_ports(instance1_3, count=3)
self.verify_network_names(ports, [self.slice1.name, self.network1.name, self.network2.name])
def test_nat_net(self):
@@ -164,14 +164,14 @@
network3_slice3 = NetworkSlice(network=network3, slice=slice3)
network3_slice3.save() # does not need to be enacted
- sliver3_1 = Sliver(image = self.testImage,
+ instance3_1 = Instance(image = self.testImage,
creator=self.testUser,
slice=slice3,
node=self.testNode,
deploymentNetwork=self.testDeployment)
- sliver3_1=self.save_and_wait_for_enacted(sliver3_1, nonempty_fields=["instance_id", "ip"])
+ instance3_1=self.save_and_wait_for_enacted(instance3_1, nonempty_fields=["instance_id", "ip"])
- ports = self.wait_for_ports(sliver3_1, count=2)
+ ports = self.wait_for_ports(instance3_1, count=2)
self.verify_network_names(ports, [slice3.name, "nat-net"])
def run(self):