''' i want to change a yang model into xml, but there is a union type in yang model, and the odl check there is a error in the xml, i don`t known how to solve it '''
''' the part of yang model
leaf prefix {
type leafref {
path "../config/prefix";
}
description
"Reference to the configured prefix for this aggregate";
}
typedef ip-prefix {
type union {
type ipv4-prefix;
type ipv6-prefix;
}
description
"An IPv4 or IPv6 prefix.";
}
''' ''' the part of xml
<prefix>10.0.0.0/24</prefix>
''' ''' the error msg
<errors xmlns="urn:ietf:params:xml:ns:yang:ietf-restconf">
<error>
<error-type>protocol</error-type>
<error-tag>malformed-message</error-tag>
<error-message>Error parsing input: Invalid value ""10.0.0.0/24"" for union type.</error-message>
<error-info>Invalid value ""10.0.0.0/24"" for union type.</error-info>
</error>
</errors>
'''