- def sfa_discover(self,options):
- "discover resources into resouces_in.rspec"
- return self.test_plc.run_in_guest(self.sfi_user(\
- "resources %s -o %s/%s"% (self.discover_option(),self.sfi_path(),self.adfile())))==0
-
- # run sfi create as a regular user
- def sfa_create_slice(self,options):
- "run sfi create (on SM) - 1st time"
- commands=[
- "sfiListNodes.py -i %s/%s -o %s/%s"%(self.sfi_path(),self.adfile(),self.sfi_path(),self.nodefile()),
- "sfiAddSliver.py -i %s/%s -n %s/%s -o %s/%s"%\
- (self.sfi_path(),self.adfile(),self.sfi_path(),self.nodefile(),self.sfi_path(),self.reqfile()),
- self.sfi_user("allocate %s %s"%(self.hrn(),self.reqfile())),
- self.sfi_user("provision %s"%(self.hrn())),
+ def sfa_discover(self, options):
+ "discover resources into ad.rspec"
+ return self.test_plc.run_in_guest(self.sfi_user(
+ "resources {} -o {}/{}"\
+ .format(self.discover_option(),self.sfi_path(),self.adfile()))) == 0
+
+ def sfa_rspec(self, options):
+ "invoke sfiListNodes and sfiAddSlivers to prepare a rspec"
+ commands = [
+ "sfiListNodes.py -i {}/{} -o {}/{}".format(self.sfi_path(), self.adfile(),
+ self.sfi_path(), self.nodefile()),
+ "sfiAddSliver.py -i {}/{} -n {}/{} -o {}/{}".format(self.sfi_path(), self.adfile(),
+ self.sfi_path(), self.nodefile(),
+ self.sfi_path(), self.reqfile()),