X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=config%2Fsfa-config-tty;h=4de43ee2dcd27ebf197fb35fd939ba6833e15a32;hb=4a2337e7f70cef81a8de37829aa63fc941c4b96e;hp=0b708e2d7c64d5c395d7e42943d4967d5b60a837;hpb=3d9943d1e5f993408b618cde29ff31b3585e5cef;p=sfa.git diff --git a/config/sfa-config-tty b/config/sfa-config-tty index 0b708e2d..4de43ee2 100755 --- a/config/sfa-config-tty +++ b/config/sfa-config-tty @@ -29,11 +29,15 @@ usual_variables = [ "SFA_AGGREGATE_HOST", "SFA_SM_HOST", "SFA_DB_HOST", - "SFA_PLC_URL", - "SFA_PLC_USER", - "SFA_PLC_PASSWORD", ] +flavour_xml_section_hash = { \ + 'pl':'sfa_plc', + 'openstack':'sfa_nova', + 'fd':'sfa_federica', + 'nitos':'sfa_nitos', + 'dummy':'sfa_dummy', + } configuration={ \ 'name':'sfa', 'service':"sfa", @@ -401,11 +405,23 @@ def mainloop (cdef, cread, cwrite, default_config, site_config, consolidated_con (service,service)) elif command in "uU": global usual_variables + global flavour_xml_section_hash try: for varname in usual_variables: (category,variable) = cdef.locate_varname(varname) if not (category is None and variable is None): prompt_variable(cdef, cread, cwrite, category, variable, False) + + # set the driver variable according to the already set flavour + generic_flavour = cwrite.items('sfa')[0][1] + for section in cdef.sections(): + if generic_flavour in flavour_xml_section_hash and flavour_xml_section_hash[generic_flavour] == section: + for item in cdef.items(section): + category = section + variable = item[0] + prompt_variable(cdef, cread, cwrite, category, variable, False) + break + except Exception, inst: if (str(inst) != 'BailOut'): raise