# (*) otherwise, entering through the root context
# make sync PLCHOST=testbox1.inria.fr GUEST=vplc03.inria.fr
+PLCHOST ?= testplc.onelab.eu
+
ifdef GUEST
-ifdef PLCHOST
SSHURL:=root@$(PLCHOST):/vservers/$(GUEST)
SSHCOMMAND:=ssh root@$(PLCHOST) vserver $(GUEST)
endif
-endif
ifdef PLC
SSHURL:=root@$(PLC):/
SSHCOMMAND:=ssh root@$(PLC)
accepts = [
Auth(),
Mixed(Node.fields['node_id'],
- Node.fields['name']),
+ Node.fields['hostname']),
]
returns = { 'nodefamily' : Parameter (str, "the node-family this node should be based upon"),
########## nodefamily
- def nodefamily (self, auth, nodeid):
+ def nodefamily (self, auth, node_id):
# the deployment tag, if set, wins
deployment = GetNodeDeployment (self.api).call(auth,node_id)
return "%s-%s"%(pldistro,arch)
def extensions (self, auth, node_id):
- return GetNodeExtensions(self.api).call(auth,node_id).split()
+ try:
+ return GetNodeExtensions(self.api).call(auth,node_id).split()
+ except:
+ return []
def compressed (self, auth, node_id):
- return not PlainBootstrapfs(self.api).call(auth,node_id)
+ return not not not GetNodePlainBootstrapfs(self.api).call(auth,node_id)
def call(self, auth, node_id_or_name):
# Get node information
node = nodes[0]
node_id = node['node_id']
+ # xxx could use some sanity checking, and could provide fallbacks
return { 'nodefamily' : self.nodefamily(auth,node_id),
'extensions' : self.extensions(auth,node_id),
'compressed' : self.compressed(auth,node_id),