- filename = config.getSliceRSpecFile() + "_new"
- rspec.save(filename)
- args = ["-u", config.getUser(), "-a", config.getAuthority(),
- "-r", config.getRegistry(), "-s", config.getSlicemgr(), "create",
- config.getSlice(), filename]
+ # that's what we pass, like in what we'd like to get
+ requested = config.getSliceRSpecFile() + "_new"
+ # that's what we actually receive
+ # just overwrite the slice file as if we'd used 'resources'
+ obtained = config.getSliceRSpecFile()
+ rspec.save(requested)
+ args = ["-u", config.getUser(), "-a", config.getAuthority(),
+ "-r", config.getRegistry(), "-s", config.getSlicemgr(), "create",
+ "-o", obtained,
+ config.getSlice(), requested]
+ self.__init_command(args)
+ self.start()
+
+ def updateRecord(self, filename):
+ args = ["-u", config.getUser(), "-a", config.getAuthority(),
+ "-r", config.getRegistry(), "-s", config.getSlicemgr(), "update", filename]
+ self.__init_command(args)
+ self.start()
+
+ def addRecord(self, filename):
+ args = ["-u", config.getUser(), "-a", config.getAuthority(),
+ "-r", config.getRegistry(), "-s", config.getSlicemgr(), "add", filename]
+ self.__init_command(args)
+ self.start()
+
+ def removeRecord(self, hrn):
+ args = ["-u", config.getUser(), "-a", config.getAuthority(),
+ "-r", config.getRegistry(), "-s", config.getSlicemgr(), "remove", hrn]
+ self.__init_command(args)
+ self.start()
+
+ def renewSlivers(self, expiration, slice=None):
+ if not slice:
+ slice = config.getSlice()
+
+ args = ["-u", config.getUser(), "-a", config.getAuthority(),
+ "-r", config.getRegistry(), "-s", config.getSlicemgr(), "renew",
+ slice, expiration]