From cd3ec637874aca13e5a100349287f41254ed944a Mon Sep 17 00:00:00 2001 From: Thierry Parmentelat Date: Mon, 14 Jun 2010 10:48:19 +0000 Subject: [PATCH] tweaks for reservable nodes --- PLC/Methods/GetBootMedium.py | 27 ++++++++++++++++++--------- 1 file changed, 18 insertions(+), 9 deletions(-) diff --git a/PLC/Methods/GetBootMedium.py b/PLC/Methods/GetBootMedium.py index b403ca1..64458e2 100644 --- a/PLC/Methods/GetBootMedium.py +++ b/PLC/Methods/GetBootMedium.py @@ -20,15 +20,22 @@ from PLC.Accessors.Accessors_standard import * # import node accessors # 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(): @@ -70,6 +77,8 @@ class GetBootMedium(Method): 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 @@ -328,7 +337,7 @@ class GetBootMedium(Method): # 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: -- 2.43.0