git://git.onelab.eu
/
sface.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
* AM's port is 12346 and SM's port is 12347.
[sface.git]
/
sfadata.py
diff --git
a/sfadata.py
b/sfadata.py
index
dbf7f30
..
42b5642
100644
(file)
--- a/
sfadata.py
+++ b/
sfadata.py
@@
-9,7
+9,8
@@
class SfaData:
'SFI_USER' : None,
'SFI_SLICE' : None,
'SFI_REGISTRY' : "http://www.planet-lab.org:12345",
'SFI_USER' : None,
'SFI_SLICE' : None,
'SFI_REGISTRY' : "http://www.planet-lab.org:12345",
- 'SFI_SM' : "http://www.planet-lab.org:12346",
+ 'SFI_AM' : "http://www.planet-lab.org:12346",
+ 'SFI_SM' : "http://www.planet-lab.org:12347",
'SFAUI_VERBOSE' : False,
}
'SFAUI_VERBOSE' : False,
}
@@
-73,6
+74,9
@@
class SfaData:
def slicemgr(self):
return SfaData.SFI_SM
def slicemgr(self):
return SfaData.SFI_SM
+ def aggmgr(self):
+ return SfaData.SFI_AM
+
def trace_command (self, command):
self._trace=time.time()
if self.SFAUI_VERBOSE:
def trace_command (self, command):
self._trace=time.time()
if self.SFAUI_VERBOSE:
@@
-104,7
+108,13
@@
class SfaData:
return children
return children
- def getRSpec(self):
+ def getRSpecFromSM(self):
+ return __getRSpec(self.slicemgr)
+
+ def getRSpecFromAM(self):
+ return __getRSpec(self.aggmgr)
+
+ def __getRspec(self, mgr):
slice = self.getSlice()
# Write RSpec to file for testing.
filename = os.path.expanduser("~/.sfi/" + slice + ".rspec")
slice = self.getSlice()
# Write RSpec to file for testing.
filename = os.path.expanduser("~/.sfi/" + slice + ".rspec")
@@
-113,7
+123,7
@@
class SfaData:
except:
pass
command=["sfi.py", "-u", self.getUser(), "-a", self.getAuthority(),
except:
pass
command=["sfi.py", "-u", self.getUser(), "-a", self.getAuthority(),
- "-r", self.registry(), "-s",
self.slicemgr()
, "resources",
+ "-r", self.registry(), "-s",
mgr
, "resources",
"-o", filename, slice]
self.trace_command(command)
subprocess.call(command)
"-o", filename, slice]
self.trace_command(command)
subprocess.call(command)
@@
-156,28
+166,28
@@
class PlanetLabData(SfaData):
class PLEData(PlanetLabData):
def __init__(self):
PlanetLabData.__init__(self)
class PLEData(PlanetLabData):
def __init__(self):
PlanetLabData.__init__(self)
- self.SFI_
S
M = "http://www.planet-lab.eu:12346"
+ self.SFI_
A
M = "http://www.planet-lab.eu:12346"
class PLJData(PlanetLabData):
def __init__(self):
PlanetLabData.__init__(self)
class PLJData(PlanetLabData):
def __init__(self):
PlanetLabData.__init__(self)
- self.SFI_
S
M = "http://www.planet-lab.jp:12346"
+ self.SFI_
A
M = "http://www.planet-lab.jp:12346"
class ViniData(PlanetLabData):
def __init__(self):
PlanetLabData.__init__(self)
class ViniData(PlanetLabData):
def __init__(self):
PlanetLabData.__init__(self)
- self.SFI_
S
M = "http://www.vini-veritas.net:12346"
+ self.SFI_
A
M = "http://www.vini-veritas.net:12346"
class GpENIData(PlanetLabData):
def __init__(self):
PlanetLabData.__init__(self)
class GpENIData(PlanetLabData):
def __init__(self):
PlanetLabData.__init__(self)
- self.SFI_
S
M = "http://198.248.241.100:12346"
+ self.SFI_
A
M = "http://198.248.241.100:12346"
class OpenCirrusData(SfaData):
def __init__(self):
SfaData.__init__(self)
self.SFI_REGISTRY = "http://198.55.37.29:12345"
class OpenCirrusData(SfaData):
def __init__(self):
SfaData.__init__(self)
self.SFI_REGISTRY = "http://198.55.37.29:12345"
- self.SFI_
S
M = "http://198.55.37.29:12346"
+ self.SFI_
A
M = "http://198.55.37.29:12346"
def refreshRSpec(self):
xml = SfaData.getRSpec(self)
def refreshRSpec(self):
xml = SfaData.getRSpec(self)