X-Git-Url: http://git.onelab.eu/?p=sface.git;a=blobdiff_plain;f=sface%2Fsfiprocess.py;h=e06bf9a8bd8a6afd57b0aeec949f0509d52a1097;hp=829abab26e3bde336fd2ad791ef1654f716c0c6e;hb=ab5bd9742a2d1b306e1a65b7f37c46f602c3fdd3;hpb=e1d58b1e78bcde73897466a5677bdc6ba39a4f1b diff --git a/sface/sfiprocess.py b/sface/sfiprocess.py index 829abab..e06bf9a 100644 --- a/sface/sfiprocess.py +++ b/sface/sfiprocess.py @@ -41,6 +41,9 @@ class SfiProcess(QObject): def __init_command(self, args): self.args = QStringList() + self.args << "-d" + self.args << config.get_dirname() + if config.debug: # this shows xmlrpc conversation, see sfi.py docs. self.args << QString('-D') @@ -86,7 +89,7 @@ class SfiProcess(QObject): def __getRSpec(self, mgr): slice = config.getSlice() # Write RSpec to file for testing. - filename = os.path.expanduser("~/.sfi/" + slice + ".rspec") + filename = config.fullpath ("%s.rspec"%slice) try: os.remove(filename) except: @@ -157,6 +160,12 @@ class SfiProcess(QObject): 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 renewSlivers(self, expiration): args = ["-u", config.getUser(), "-a", config.getAuthority(), "-r", config.getRegistry(), "-s", config.getSlicemgr(), "renew",