LTConfig::Field::get_values question
In [297]: b.LTConfig.Field.get_value.params
Out[297]:
[(class_instance_key, u'LTConfig.ClassInstanceKey'),
(field_instance_name, u'string')]
In [298]: syslog_instance = b.LTConfig.Class.typefactory.create('LTConfig.ClassInstanceKey')
In [299]: syslog_instance
Out[299]:
(LTConfig.ClassInstanceKey){
container = None
container_class = None
class_name = None
name = None
}
In [300]: syslog_instance.class_name = "syslog"
In [301]: syslog_instance.name = "syslog"
In [302]: b.LTConfig.Field.get_value(class_instance_key = syslog_instance, field_instance_name = 'include')
Out[302]: destination loghost { udp(10.20.5.11 port (514)); udp(10.20.4.167 port (514)); };
In [303]:
In [303]: b.LTConfig.Field.get_values.params
Out[303]:
[(class_instance_keys, u'LTConfig.ClassInstanceKeySequence'),
(field_instance_names, u'Common.StringSequenceSequence')]
In [304]: class_instance_key_seq = b.LTConfig.Class.typefactory.create('LTConfig.ClassInstanceKeySequence')
In [305]: class_instance_key_seq
Out[305]:
(LTConfig.ClassInstanceKeySequence){
_arrayType = ""
_offset = ""
_id = ""
_href=""
_arrayType = ""
}
In [306]: class_instance_key_seq.item = [ syslog_instance ]
In [307]: class_instance_key_seq
Out[307]:
(LTConfig.ClassInstanceKeySequence){
_arrayType = ""
_offset = ""
_id = ""
_href=""
item[] =
(LTConfig.ClassInstanceKey){
container = None
container_class = None
class_name = "syslog"
name = "syslog"
},
}
In [308]: field_instance_names_seq = b.LTConfig.Class.typefactory.create('Common.StringSequenceSequence')
In [309]: field_instance_names_seq
Out[309]:
(Common.StringSequenceSequence){
_arrayType = ""
_offset = ""
_id = ""
_href=""
_arrayType = ""
}
In [310]: field_instance_names_seq.item = [ 'include' ]
In [311]: field_instance_names_seq
Out[311]:
(Common.StringSequenceSequence){
_arrayType = ""
_offset = ""
_id = ""
_href=""
item[] =
"include",
}
In [312]: b.LTConfig.Field.get_values(class_instance_keys = class_instance_key_seq, field_instance_names = field_instance_names_seq )
Out[312]: [[]]
Note: I don't get an error but don't get any return values. Much less when trying to get multiple fields,