Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Exception in thread "main" java.lang.RuntimeException: org.yangcentral.yangkit.model.api.codec.YangCodecException: invalid value. #27

Open
xinghaiquedeng opened this issue Feb 20, 2024 · 0 comments

Comments

@xinghaiquedeng
Copy link
Contributor

xinghaiquedeng commented Feb 20, 2024

tool:yangkit-data-xml-codec
version:1.4.0

Exception in thread "main" java.lang.RuntimeException: org.yangcentral.yangkit.model.api.codec.YangCodecException: invalid value.
at org.yangcentral.yangkit.data.impl.model.LeafListDataImpl.(LeafListDataImpl.java:23)
at org.yangcentral.yangkit.data.impl.builder.YangDataBuilder.getYangData(YangDataBuilder.java:53)
at org.yangcentral.yangkit.data.codec.xml.LeafListDataXmlCodec.buildData(LeafListDataXmlCodec.java:20)
at org.yangcentral.yangkit.data.codec.xml.LeafListDataXmlCodec.buildData(LeafListDataXmlCodec.java:10)
at org.yangcentral.yangkit.data.codec.xml.YangDataXmlCodec.deserialize(YangDataXmlCodec.java:99)
at org.yangcentral.yangkit.data.codec.xml.YangDataDocumentXmlCodec.buildChildrenData(YangDataDocumentXmlCodec.java:65)
at org.yangcentral.yangkit.data.codec.xml.YangDataDocumentXmlCodec.buildChildrenData(YangDataDocumentXmlCodec.java:93)
at org.yangcentral.yangkit.data.codec.xml.YangDataDocumentXmlCodec.buildChildrenData(YangDataDocumentXmlCodec.java:93)
at org.yangcentral.yangkit.data.codec.xml.YangDataDocumentXmlCodec.buildChildrenData(YangDataDocumentXmlCodec.java:93)
at org.yangcentral.yangkit.data.codec.xml.YangDataDocumentXmlCodec.deserialize(YangDataDocumentXmlCodec.java:109)
at org.yangcentral.yangkit.data.codec.xml.YangDataDocumentXmlCodec.deserialize(YangDataDocumentXmlCodec.java:119)
at org.yangcentral.yangkit.data.codec.xml.YangDataParser.parse(YangDataParser.java:39)
at org.yangcentral.yangkit.data.codec.xml.YangDataParserExecutor.main(YangDataParserExecutor.java:52)
Caused by: org.yangcentral.yangkit.model.api.codec.YangCodecException: invalid value.
at org.yangcentral.yangkit.model.impl.codec.UnionStringValueCodecImpl.serialize(UnionStringValueCodecImpl.java:58)
at org.yangcentral.yangkit.model.impl.codec.UnionStringValueCodecImpl.serialize(UnionStringValueCodecImpl.java:17)
at org.yangcentral.yangkit.data.impl.model.YangDataValueStringImpl.getStringValue(YangDataValueStringImpl.java:54)
at org.yangcentral.yangkit.data.impl.model.LeafListDataImpl.(LeafListDataImpl.java:21)
... 12 more

cause by
LeafList:
3352:3885

yang:
leaf-list community-member {
type community-type;
max-elements 200;
status deprecated;
ext:advised-node "../rtp:community-attributes/rtp:community-attribute";
description
"Configure a community attribute in a BGP community list. There must be at least one community in a list, min-elements 1.";
}

typedef community-type {
type union {
type well-known-community-type;
type std-community-type;
}
description
"Type of the community members.";
}

typedef well-known-community-type {
type enumeration {
enum "internet" {
description
"The basic type of filter.";
}
enum "no-advertise" {
description
"Do not advertise to any peer.";
}
enum "no-export" {
description
"Do not export to external peers.";
}
enum "no-export-subconfed" {
description
"Do not send outside a sub-confederation.";
}
}
description
"Type definition for well-known IETF community attribute values.";
}

typedef std-community-type {
type union {
type string {
length "1..19";
pattern '((6553[0-5]|655[0-2][0-9]|65[0-4][0-9]{2}|6[0-4][0-9]{3}|[1-5][0-9]{4}|[1-9][0-9]{0,3}|0):(6553[0-5]|655[0-2][0-9]|65[0-4][0-9]{2}|6[0-4][0-9]{3}|[1-5][0-9]{4}|[1-9][0-9]{0,3}|0))';
}
type uint32 {
range "1..4294967040|4294967044..4294967295";
}
}
description
"Type definition for community attributes.";
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant