# could not define this in the class..
# create a dict with the allowed actions for each type of node
+# reservable nodes being more recent, we do not support the floppy stuff anymore
allowed_actions = {
- 'regular' : [ 'node-preview',
- 'node-floppy',
- 'node-iso',
- 'node-usb',
- 'generic-iso',
- 'generic-usb',
- ],
- }
+ 'regular' :
+ [ 'node-preview',
+ 'node-floppy',
+ 'node-iso',
+ 'node-usb',
+ 'generic-iso',
+ 'generic-usb',
+ ],
+ 'reservable':
+ [ 'node-preview',
+ 'node-iso',
+ 'node-usb',
+ ],
+ }
# compute a new key
def compute_key():
Apart for the preview mode, this method generates a new node key for the
specified node, effectively invalidating any old boot medium.
+ Note that 'reservable' nodes do not support 'node-floppy',
+ 'generic-iso' nor 'generic-usb'.
In addition, two return mechanisms are supported.
(*) The default behaviour is that the file's content is returned as a
return file
# see also GetNodeFlavour that does similar things
- def get_nodefamily (self, node):
+ def get_nodefamily (self, node, auth):
pldistro = self.api.config.PLC_FLAVOUR_NODE_PLDISTRO
fcdistro = self.api.config.PLC_FLAVOUR_NODE_FCDISTRO
arch = self.api.config.PLC_FLAVOUR_NODE_ARCH
# regular node, make build's arguments
# and build the full command line to be called
- if node_type == 'regular':
+ if node_type in [ 'regular', 'reservable' ]:
build_sh_options=""
if "cramfs" in build_sh_spec:
if tag['tagname'] == 'kvariant':
build_sh_spec['variant'] = tag['value']
if tag['tagname'] == 'kargs':
- build_sh_spec['kargs'].append(tag['value'].split())
+ build_sh_spec['kargs'] += tag['value'].split()
if tag['tagname'] == 'no-hangcheck':
build_sh_spec['kargs'].append('hcheck_reboot0')
# then options can override tags
nodename = "".join(map(hexa2,tempbytes))
# get nodefamily
- (pldistro,fcdistro,arch) = self.get_nodefamily(node)
+ (pldistro,fcdistro,arch) = self.get_nodefamily(node,auth)
self.nodefamily="%s-%s-%s"%(pldistro,fcdistro,arch)
# apply on globals