| 2) Create sliver1 on slice1 |
| sys.path.append("/opt/planetstack") |
| os.environ.setdefault("DJANGO_SETTINGS_MODULE", "planetstack.settings") |
| from openstack.manager import OpenStackManager |
| from core.models import Slice, Sliver, ServiceClass, Reservation, Tag, Network, User, Node, Image, Deployment, Site, NetworkTemplate, NetworkSlice |
| from planetstacktest import PlanetStackTest, fail_unless |
| class SliverTest(PlanetStackTest): |
| PlanetStackTest.__init__(self) |
| slice1Name = self.make_slice_name() |
| slice1 = Slice(name = slice1Name, |
| slice1=self.save_and_wait_for_enacted(slice1, nonempty_fields=["tenant_id"]) |
| sliver1 = Sliver(image = self.testImage, |
| deploymentNetwork=self.testDeployment) |
| sliver1=self.save_and_wait_for_enacted(sliver1, nonempty_fields=["instance_id", "ip"]) |