Hi,
I need to implement a function to decide if a container is a presence container as below:
func (node *Node) IsPresenceContainer()
Node is confd_cs_node as below:
221 type _Ctype_struct_confd_cs_node struct {
222 tag _Ctype_u_int32_t
223 ns _Ctype_u_int32_t
224 info _Ctype_struct_confd_cs_node_info
225 parent *_Ctype_struct_confd_cs_node
226 children *_Ctype_struct_confd_cs_node
227 next *_Ctype_struct_confd_cs_node
228 opaque unsafe.Pointer
229 }
230
231 type _Ctype_struct_confd_cs_node_info struct {
232 keys *_Ctype_u_int32_t
233 minOccurs _Ctype_int
234 maxOccurs _Ctype_int
235 shallow_type uint32
236 _type *_Ctype_struct_confd_type
237 defval *_Ctype_struct_confd_value
238 choices *_Ctype_struct_confd_cs_choice
239 flags _Ctype_int
240 cmp _Ctype_u_int8_t
241 meta_data *_Ctype_struct_confd_cs_meta_data
242 }
And here is the corresponding schema:
container school {
presence "edu";
leaf key {type string;}
leaf schoolname {
type string;
description "Name of the school";
}
leaf school-rating {
type string;
yexte:is-passphrase;
description "choice case leaf encrypted value";
}
}
I can get children: key, schoolname, and school-rating by the next point. But I cannot get the statement of “presence” by meta-data. Would you please give me some guide how to get the “presence” statement?