git://git.onelab.eu
/
plcapi.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
eba3043
)
Thierry's suggested cleanup for GetSlivers
author
Marc Fiuczynski
<mef@cs.princeton.edu>
Fri, 17 Jul 2009 03:50:47 +0000
(
03:50
+0000)
committer
Marc Fiuczynski
<mef@cs.princeton.edu>
Fri, 17 Jul 2009 03:50:47 +0000
(
03:50
+0000)
PLC/Methods/GetSlivers.py
patch
|
blob
|
history
diff --git
a/PLC/Methods/GetSlivers.py
b/PLC/Methods/GetSlivers.py
index
b8743cc
..
63e30c0
100644
(file)
--- a/
PLC/Methods/GetSlivers.py
+++ b/
PLC/Methods/GetSlivers.py
@@
-17,10
+17,6
@@
from PLC.Roles import Roles
from PLC.Keys import Key, Keys
from PLC.SliceTags import SliceTag, SliceTags
from PLC.InitScripts import InitScript, InitScripts
from PLC.Keys import Key, Keys
from PLC.SliceTags import SliceTag, SliceTags
from PLC.InitScripts import InitScript, InitScripts
-from PLC.Config import Config
-
-# XXX we don't really know whether this PLC is loaded from /etc/planetlab/plc_config or elsewhere
-plc_config = Config()
# XXX used to check if slice expiration time is sane
MAXINT = 2L**31-1
# XXX used to check if slice expiration time is sane
MAXINT = 2L**31-1
@@
-168,8
+164,6
@@
class v43GetSlivers(Method):
}
def call(self, auth, node_id_or_hostname = None):
}
def call(self, auth, node_id_or_hostname = None):
- global plc_config
-
timestamp = int(time.time())
# Get node
timestamp = int(time.time())
# Get node
@@
-274,7
+268,7
@@
class v43GetSlivers(Method):
# 'root' account setup on nodes from all 'admin' users
# registered with the PLC main site
# 'root' account setup on nodes from all 'admin' users
# registered with the PLC main site
- personsitekeys=getpersonsitekeys(
plc_
config.PLC_SLICE_PREFIX,['admin'])
+ personsitekeys=getpersonsitekeys(
self.api.
config.PLC_SLICE_PREFIX,['admin'])
accounts.append({'name':'root','keys':personsitekeys})
node.update_last_contact()
accounts.append({'name':'root','keys':personsitekeys})
node.update_last_contact()