48def multiConfigurableSet(config: dict, key: str, value: str, arg: list, onlySelect):
49 """
50 multiConfigurableSet method allows to assign values
51 for multiple configurable value arguments in JSON with/without overriding
52 depending on interface mode. The onlySelect parameter decides for
53 interface mode.if the argument contains more than one value, it is saved as list type by default
54 and this method converts them to comma separated string, otherwise assigns them as string value directly
55
56
57 Args:
58 config (dict): Input as JSON config file
59 key (string): Sub key from upper key in provided config JSON config file
60 value (string): Value from key in provided JSON config file (sub-level)
61 arg (any): Argument from parserargs
62 onlySelect (boolean): Input as args.onlySelect for selecting interface mode.
63 true for Overrider Mode and false for Additional mode
64
65
66 Assignment :
67 string or comma seperated string: If the argument is of list type,
68 it assign as a comma separated string,
69 otherwise it assign directly as a string.
70
71 """
72
73 if isinstance(arg, list):
74 arg = listToString(arg)
75 if onlySelect == "false":
76 actualConfig = config[key][value]
77 arg = actualConfig + "," + arg
78 config[key][value] = arg
79
80
81
82