<s> """<STR_LIT>""" <EOL> import os <EOL> import json <EOL> import sys <EOL> import time <EOL> sys . path . append ( "<STR_LIT>" ) <EOL> os . environ . setdefault ( "<STR_LIT>" , "<STR_LIT>" ) <EOL> from openstack . manager import OpenStackManager <EOL> from core . models import Slice , Instance , ServiceClass , Reservation , Tag , Network , User , Node , Image , Deployment , Site , NetworkTemplate , NetworkSlice <EOL> from planetstacktest import PlanetStackTest , fail_unless <EOL> class InstanceTest ( PlanetStackTest ) : <EOL> def __init__ ( self ) : <EOL> PlanetStackTest . __init__ ( self ) <EOL> def run_instance1 ( self ) : <EOL> slice1Name = self . make_slice_name ( ) <EOL> slice1 = Slice ( name = slice1Name , <EOL> omf_friendly = True , <EOL> site = self . testSite , <EOL> creator = self . testUser ) <EOL> slice1 = self . save_and_wait_for_enacted ( slice1 , nonempty_fields = [ "<STR_LIT>" ] ) <EOL> instance1 = Instance ( image = self . testImage , <EOL> creator = self . testUser , <EOL> slice = slice1 , <EOL> node = self . testNode , <EOL> deploymentNetwork = self . testDeployment ) <EOL> instance1 = self . save_and_wait_for_enacted ( instance1 , nonempty_fields = [ "<STR_LIT>" , "<STR_LIT>" ] ) <EOL> def run ( self ) : <EOL> self . setup ( ) <EOL> try : <EOL> self . run_instance1 ( ) <EOL> finally : <EOL> self . cleanup ( ) <EOL> def main ( ) : <EOL> InstanceTest ( ) . run ( ) <EOL> if __name__ == "<STR_LIT:__main__>" : <EOL> main ( ) </s>
