Ejemplo n.º 1
0
def action_factory(config_section_items):
    actions = OrderedDict()
    for a in config_section_items:
        d = dict(config_section_items[a])
        if ('type' in d):
            actions[a] = introspection.get_class_one_arg(d['type'], d)

    return actions
Ejemplo n.º 2
0
def action_factory(config_section_items):
    actions = OrderedDict()
    for a in config_section_items:
        d = dict(config_section_items[a])
        if ('type' in d):
            actions[a] = introspection.get_class_one_arg( d['type'], d )

    return actions
Ejemplo n.º 3
0
    def __init__(self, paremeters_types_defs):
        """Create a input parameters set from a definitions

            paremeters_types_defs is a dictionary such as {par1_name : { 'par1_attrubute1_name' : par1_attrubute1_value, ... }, par2_name : { 'par2_attrubute1_name' : par2_attrubute1_value, ... }, ... }
            """
        self._params = OrderedDict()

        for name, d in OrderedDict(paremeters_types_defs).items():
            if "class" in d:
                try:
                    self._params[name] = introspection.get_class_one_arg(d["class"], name)
                except:
                    raise  # log("Cannot create parameter object from class name "+d['class']+" for parameter " + name)
            else:
                self._params[name] = command_line_parameter.CommandLineParameter(name)
            self._params[name].inject_values(d)
Ejemplo n.º 4
0
        def __init__(self, paremeters_types_defs):
            '''Create a input parameters set from a definitions

            paremeters_types_defs is a dictionary such as {par1_name : { 'par1_attrubute1_name' : par1_attrubute1_value, ... }, par2_name : { 'par2_attrubute1_name' : par2_attrubute1_value, ... }, ... }
            '''
            self._params = OrderedDict()

            for name, d in OrderedDict(paremeters_types_defs).items():
                if ('class' in d):
                    try:
                        self._params[name] = introspection.get_class_one_arg( d['class'], name )
                    except:
                        raise #log("Cannot create parameter object from class name "+d['class']+" for parameter " + name)
                else:
                    self._params[name] = command_line_parameter.CommandLineParameter(name)
                self._params[name].inject_values( d )