'''我想把一个yang模型改成xml,但是yang模型中有union类型,odl检查xml有错误,不知道怎么解决'''
''' 阳模部分
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.";
}
''' ''' xml部分
<prefix>10.0.0.0/24</prefix>
''' ''' 错误信息
<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>
'''