use of org.onosproject.yang.model.ModelConverter in project onos by opennetworkinglab.
the class OdtnTapiHandlersTestCommand method doExecute.
@Override
public void doExecute() {
dcs = get(DynamicConfigService.class);
modelConverter = get(ModelConverter.class);
setupTapiContext();
DataNode data = contextHandler.getDataNode();
ResourceId empty = ResourceId.builder().build();
CharSequence strNode = toCharSequence(toXmlCompositeStream(toCompositeData(toResourceData(empty, data))));
StringBuilder exp = loadXml("/test-tapi-context.xml");
if (XmlString.prettifyXml(strNode).toString().contentEquals(exp)) {
printlog("result: ok");
} else {
printlog("result: failed");
}
}
Aggregations