<s> from foam . ethzlegacyoptinstuff . legacyoptin . flowspacemodels import FlowSpace <EOL> '''<STR_LIT>''' <EOL> '''<STR_LIT>''' <EOL> '''<STR_LIT>''' <EOL> class Experiment ( object ) : <EOL> '''<STR_LIT>''' <EOL> slice_id = None <EOL> project_name = None <EOL> project_desc = None <EOL> slice_name = None <EOL> slice_desc = None <EOL> controller_url = None <EOL> owner_email = None <EOL> owner_password = None <EOL> def get_fv_slice_name ( self ) : <EOL> s = "<STR_LIT>" % ( self . slice_name , self . slice_id ) <EOL> return s . replace ( "<STR_LIT:.>" , "<STR_LIT:_>" ) . replace ( "<STR_LIT::>" , "<STR_LIT:_>" ) . replace ( "<STR_LIT:=>" , "<STR_LIT:_>" ) . replace ( "<STR_LIT:U+0020>" , "<STR_LIT:_>" ) . replace ( "<STR_LIT:'>" , "<STR_LIT:_>" ) <EOL> def __unicode__ ( self ) : <EOL> return "<STR_LIT>" % ( self . project_name , self . slice_name ) <EOL> class ExperimentFLowSpace ( FlowSpace ) : <EOL> dpid = None <EOL> direction = None <EOL> port_number_s = None <EOL> port_number_e = None <EOL> exp = None <EOL> def __unicode__ ( self ) : <EOL> fs_desc = super ( ExperimentFLowSpace , self ) . __unicode__ ( ) <EOL> pn = "<STR_LIT>" <EOL> if self . port_number_s == self . port_number_e : <EOL> pn = "<STR_LIT>" % self . port_number_s <EOL> elif self . port_number_s > <NUM_LIT:0> or self . port_number_e < <NUM_LIT> : <EOL> pn = "<STR_LIT>" % ( self . port_number_s , self . port_number_e ) <EOL> dir = "<STR_LIT>" <EOL> if self . direction == <NUM_LIT:2> : <EOL> dir = "<STR_LIT>" <EOL> elif self . direction == <NUM_LIT:1> : <EOL> dir = "<STR_LIT>" <EOL> elif self . direction == <NUM_LIT:0> : <EOL> dir = "<STR_LIT>" <EOL> return "<STR_LIT>" % ( self . dpid , fs_desc , pn , dir ) <EOL> '''<STR_LIT>''' <EOL> '''<STR_LIT>''' <EOL> '''<STR_LIT>''' <EOL> '''<STR_LIT>''' </s>
