Node.fields['hostname']),
]
- returns = { 'nodefamily' : Parameter (str, "the node-family this node should be based upon"),
- 'extensions' : [ Parameter (str, "extension to add to the base install") ],
- 'uncompressed' : Parameter (bool, "for tests : use uncompressed bootstrapfs" ) ,
- }
+ returns = {
+ 'nodefamily' : Parameter (str, "the node-family this node should be based upon"),
+ 'extensions' : [ Parameter (str, "extensions to add to the base install") ],
+ 'plain' : Parameter (bool, "use plain bootstrapfs image if set (for tests)" ) ,
+ }
########## nodefamily
- def nodefamily (self, auth, node_id):
+ def nodefamily (self, auth, node_id, arch):
# the deployment tag, if set, wins
deployment = GetNodeDeployment (self.api).call(auth,node_id)
if deployment: return deployment
- arch = GetNodeArch (self.api).call(auth,node_id)
- if not arch: arch = self.api.config.PLC_FLAVOUR_NODE_ARCH
-
pldistro = GetNodePldistro (self.api).call(auth, node_id)
if not pldistro: pldistro = self.api.config.PLC_FLAVOUR_NODE_PLDISTRO
###return "%s-%s-%s"%(pldistro,fcdistro,arch)
return "%s-%s"%(pldistro,arch)
- def extensions (self, auth, node_id):
+ def extensions (self, auth, node_id, arch):
try:
- return GetNodeExtensions(self.api).call(auth,node_id).split()
+ return [ "%s-%s"%(e,arch) for e in GetNodeExtensions(self.api).call(auth,node_id).split() ]
except:
return []
- def compressed (self, auth, node_id):
- return not not not GetNodePlainBootstrapfs(self.api).call(auth,node_id)
+ def plain (self, auth, node_id):
+ return 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']
+ arch = GetNodeArch (self.api).call(auth,node_id)
+ if not arch: arch = self.api.config.PLC_FLAVOUR_NODE_ARCH
+
# 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),
+ return { 'nodefamily' : self.nodefamily(auth,node_id, arch),
+ 'extensions' : self.extensions(auth,node_id, arch),
+ 'plain' : self.plain(auth,node_id),
}