Exemplo n.º 1
0
 def __init__(self):
     self.int_field = PrimitiveParameter(0, element_type=int)
     self.str_field = PrimitiveParameter("", element_type=string_types)
     self.map_field = MapParameter(
         PrimitiveParameter("", element_type=string_types))
     self.seq_field = SequenceParameter(
         PrimitiveParameter("", element_type=string_types))
Exemplo n.º 2
0
class SampleConfiguration(Configuration):
    always_yes = PrimitiveParameter(False,
                                    aliases=('always_yes_altname1', 'yes',
                                             'always_yes_altname2'))
    changeps1 = PrimitiveParameter(True)
    proxy_servers = MapParameter(string_types)
    channels = SequenceParameter(string_types, aliases=('channels_altname', ))

    always_an_int = PrimitiveParameter(0)
    boolean_map = MapParameter(bool)
Exemplo n.º 3
0
class SampleConfiguration(Configuration):
    always_yes = PrimitiveParameter(False,
                                    aliases=('always_yes_altname1', 'yes',
                                             'always_yes_altname2'))
    changeps1 = PrimitiveParameter(True)
    proxy_servers = MapParameter(string_types)
    channels = SequenceParameter(string_types, aliases=('channels_altname', ))

    always_an_int = PrimitiveParameter(0)
    boolean_map = MapParameter(bool)
    commented_map = MapParameter(string_types)

    env_var_map = MapParameter(string_types, expandvars=True)
    env_var_str = PrimitiveParameter('', expandvars=True)
    env_var_bool = PrimitiveParameter(False,
                                      element_type=bool,
                                      expandvars=True)
    normal_str = PrimitiveParameter('', expandvars=False)
    env_var_list = SequenceParameter(string_types, expandvars=True)
Exemplo n.º 4
0
class SampleConfiguration(Configuration):
    always_yes = ParameterLoader(PrimitiveParameter(False),
                                 aliases=('always_yes_altname1', 'yes',
                                          'always_yes_altname2'))
    changeps1 = ParameterLoader(PrimitiveParameter(True))
    proxy_servers = ParameterLoader(
        MapParameter(PrimitiveParameter("", element_type=string_types)))
    channels = ParameterLoader(SequenceParameter(
        PrimitiveParameter("", element_type=string_types)),
                               aliases=('channels_altname', ))

    always_an_int = ParameterLoader(PrimitiveParameter(0))
    boolean_map = ParameterLoader(
        MapParameter(PrimitiveParameter(False, element_type=bool)))
    commented_map = ParameterLoader(
        MapParameter(PrimitiveParameter("", string_types)))

    env_var_map = ParameterLoader(MapParameter(
        PrimitiveParameter("", string_types)),
                                  expandvars=True)
    env_var_str = ParameterLoader(PrimitiveParameter(''), expandvars=True)
    env_var_bool = ParameterLoader(PrimitiveParameter(False,
                                                      element_type=bool),
                                   expandvars=True)
    normal_str = ParameterLoader(PrimitiveParameter(''), expandvars=False)
    env_var_list = ParameterLoader(SequenceParameter(
        PrimitiveParameter('', string_types)),
                                   expandvars=True)

    nested_map = ParameterLoader(
        MapParameter(
            SequenceParameter(PrimitiveParameter("",
                                                 element_type=string_types))))
    nested_seq = ParameterLoader(
        SequenceParameter(
            MapParameter(PrimitiveParameter("", element_type=string_types))))

    test_object = ParameterLoader(ObjectParameter(DummyTestObject()))