Adding a debug option
This commit is contained in:
parent
7a2a61e519
commit
9739a9c20b
@ -53,14 +53,18 @@ def initSequences():
|
|||||||
{ 'description' : 'Initial Steps',
|
{ 'description' : 'Initial Steps',
|
||||||
'condition' : [],
|
'condition' : [],
|
||||||
'condition_match' : [],
|
'condition_match' : [],
|
||||||
'steps' : [ { 'title' : "Noop",
|
'steps' : [ { 'title' : "Pre Plugin Setup",
|
||||||
'functions' : [] },]
|
'functions' : [setDebug] },]
|
||||||
},
|
},
|
||||||
]
|
]
|
||||||
|
|
||||||
for item in sequences_conf:
|
for item in sequences_conf:
|
||||||
controller.addSequence(item['description'], item['condition'], item['condition_match'], item['steps'])
|
controller.addSequence(item['description'], item['condition'], item['condition_match'], item['steps'])
|
||||||
|
|
||||||
|
def setDebug():
|
||||||
|
if controller.CONF['CONFIG_DEBUG'] == 'y':
|
||||||
|
logging.root.setLevel(logging.DEBUG)
|
||||||
|
|
||||||
def initConfig():
|
def initConfig():
|
||||||
"""
|
"""
|
||||||
Initialization of configuration
|
Initialization of configuration
|
||||||
@ -82,6 +86,20 @@ def initConfig():
|
|||||||
CONDITION - (True/False) is this a condition for a group?
|
CONDITION - (True/False) is this a condition for a group?
|
||||||
"""
|
"""
|
||||||
conf_params = {
|
conf_params = {
|
||||||
|
"INSTALLER": [
|
||||||
|
{"CMD_OPTION" : "debug",
|
||||||
|
"USAGE" : "Should we turn on debug in logging",
|
||||||
|
"PROMPT" : "Should we turn on debug in logging",
|
||||||
|
"OPTION_LIST" : ["y", "n"],
|
||||||
|
"VALIDATION_FUNC" : validate.validateOptions,
|
||||||
|
"DEFAULT_VALUE" : "n",
|
||||||
|
"MASK_INPUT" : False,
|
||||||
|
"LOOSE_VALIDATION": False,
|
||||||
|
"CONF_NAME" : "CONFIG_DEBUG",
|
||||||
|
"USE_DEFAULT" : False,
|
||||||
|
"NEED_CONFIRM" : False,
|
||||||
|
"CONDITION" : False },
|
||||||
|
]
|
||||||
}
|
}
|
||||||
"""
|
"""
|
||||||
Group fields:
|
Group fields:
|
||||||
@ -93,7 +111,14 @@ def initConfig():
|
|||||||
POST_CONDITION_MATCH - Value to match condition with
|
POST_CONDITION_MATCH - Value to match condition with
|
||||||
"""
|
"""
|
||||||
conf_groups = (
|
conf_groups = (
|
||||||
|
{ "GROUP_NAME" : "INSTALLER",
|
||||||
|
"DESCRIPTION" : "Installer Config paramaters",
|
||||||
|
"PRE_CONDITION" : utils.returnYes,
|
||||||
|
"PRE_CONDITION_MATCH" : "yes",
|
||||||
|
"POST_CONDITION" : False,
|
||||||
|
"POST_CONDITION_MATCH" : True},
|
||||||
)
|
)
|
||||||
|
|
||||||
for group in conf_groups:
|
for group in conf_groups:
|
||||||
paramList = conf_params[group["GROUP_NAME"]]
|
paramList = conf_params[group["GROUP_NAME"]]
|
||||||
controller.addGroup(group, paramList)
|
controller.addGroup(group, paramList)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user