The yang type of events leaf is 'type empty', meaning there should be no value.
As of Carbon performing a GET on restconf/streams causes a cast
exception due to the empty string value here. See EmptyJSONCodec in
yangtools.
Change-Id: If0501b9c5459f4255096a4f070968c87a749407e
Signed-off-by: Evan Zeller <evanrzeller@gmail.com>
(cherry picked from commit
9ae46c73bc2437dc1dab54498b3a64c0600fa9e8)
instanceDataChildrenByName = ControllerContext.findInstanceDataChildrenByName(listStreamSchemaNode, "events");
final DataSchemaNode eventsSchemaNode = Iterables.getFirst(instanceDataChildrenByName, null);
Preconditions.checkState(eventsSchemaNode instanceof LeafSchemaNode);
- streamNodeValues.withChild(Builders.leafBuilder((LeafSchemaNode) eventsSchemaNode).withValue("").build());
+ streamNodeValues.withChild(Builders.leafBuilder((LeafSchemaNode) eventsSchemaNode).build());
return streamNodeValues.build();
}