Search in sources :

Example 1 with ModelConverter

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");
    }
}
Also used : DynamicConfigService(org.onosproject.config.DynamicConfigService) ResourceId(org.onosproject.yang.model.ResourceId) DataNode(org.onosproject.yang.model.DataNode) ModelConverter(org.onosproject.yang.model.ModelConverter)

Aggregations

DynamicConfigService (org.onosproject.config.DynamicConfigService)1 DataNode (org.onosproject.yang.model.DataNode)1 ModelConverter (org.onosproject.yang.model.ModelConverter)1 ResourceId (org.onosproject.yang.model.ResourceId)1