hostnames += [test_node.name()]
utils.header("Adding %r in %s"%(hostnames,slice_name))
self.test_plc.apiserver.AddSliceToNodes(auth, slice_name, hostnames)
- # add initscript body or name as appropriate
- if self.slice_spec.has_key('initscriptbody'):
- isbody=self.slice_spec['initscriptbody']
- utils.header("Adding initscript body %s in %s"%(isbody,slice_name))
- self.test_plc.apiserver.AddSliceTag(self.test_plc.auth_root(), slice_name,'initscript_body',isbody)
+ # add initscript code or name as appropriate
+ if self.slice_spec.has_key('initscriptcode'):
+ iscode=self.slice_spec['initscriptcode']
+ utils.header("Adding initscript code %s in %s"%(iscode,slice_name))
+ self.test_plc.apiserver.AddSliceTag(self.test_plc.auth_root(), slice_name,'initscript_code',iscode)
elif self.slice_spec.has_key('initscriptname'):
isname=self.slice_spec['initscriptname']
utils.header("Adding initscript name %s in %s"%(isname,slice_name))
esac
"""
-initscript_by_body=initscript_by_name.replace("the_script_name","the_script_body")
+initscript_by_code=initscript_by_name.replace("the_script_name","the_script_code")
# one single initscript in the InitScripts table
def initscripts(options,index):
]
# always return 2 slices
-# one has an initscript body, the other one an initscript name
+# one has an initscript code, the other one an initscript name
def slices (options,index):
def theslice (i):
slice_spec = { 'slice_fields': {'name':'%s_pslc%d'%(login_base(index),i),
'sitename' : login_base(index),
'owner' : 'pi',
}
- # odd one has an initscript_body
+ # odd one has an initscript_code
if i%2==1:
- slice_spec['initscriptbody']=initscript_by_body
- slice_spec['initscriptstamp']='the_script_body'
+ slice_spec['initscriptcode']=initscript_by_code
+ slice_spec['initscriptstamp']='the_script_code'
# even one has an initscript (name)
else:
slice_spec['initscriptname']='the_script_name'