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=str))) channels = ParameterLoader(SequenceParameter( PrimitiveParameter("", element_type=str)), aliases=('channels_altname', )) always_an_int = ParameterLoader(PrimitiveParameter(0)) boolean_map = ParameterLoader( MapParameter(PrimitiveParameter(False, element_type=bool))) commented_map = ParameterLoader(MapParameter(PrimitiveParameter("", str))) env_var_map = ParameterLoader(MapParameter(PrimitiveParameter("", str)), 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('', str)), expandvars=True) nested_map = ParameterLoader( MapParameter( SequenceParameter(PrimitiveParameter("", element_type=str)))) nested_seq = ParameterLoader( SequenceParameter( MapParameter(PrimitiveParameter("", element_type=str)))) test_object = ParameterLoader(ObjectParameter(DummyTestObject()))
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))
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)
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)