Hi Tomas,
I am writing a Cohert trying to validate a subtree data, which is augmented to
a target node in the same module. For registering the cohert, I am creating an
instance of the same and also the DomDataTreeIdentifier by using the
YangInstanceIdentifier instance having the sub-tree path. Registration does not
throw any exception, but the canCommit() of my cohert is not triggered whenever
I push the JSON data to the sub-tree. I have put below the yang and the code
snippets. Is the way of registering the subtree for the the Cohert validations
wrong in my case ? Please advise.
container controller {
}
module connector-config {
...
...
container controller {
}
/*
* Augumented -> controllerconfig management model
*/
augment "/controller" {
ext:augment-identifier ControllerMgmtAugmentation;
container controller-common-mgmt {
config true;
list tenant {
key id;
leaf id {
type string;
description "ID of tenant";
mandatory true;
}
Description "Tenant details";
uses controller-common-group;
}
}
}
...
...
}
@Override
public synchronized Future<RpcResult<Void>> registerCommitCohort() {
...
...
final YangInstanceIdentifier connectorConfigPath =
YangInstanceIdentifier.builder(
YangInstanceIdentifier.of(Controller.QNAME)).node(ControllerCommonMgmt.QNAME).
node(Tenant.QNAME).node(Tenant.QNAME).build();
commitCohortReg.set(commitCohortRegistry.registerCommitCohort(
new org.opendaylight.mdsal.dom.api.DOMDataTreeIdentifier(
org.opendaylight.mdsal.common.api.LogicalDatastoreType.CONFIGURATION,
connectorConfigPath), new
ConnectorDataTreeCommitCohort(domDataBroker, dataProvider)));
return RpcResultBuilder.<Void>success().buildFuture();
}
Regards,
-Satish
_______________________________________________
controller-dev mailing list
[email protected]
https://lists.opendaylight.org/mailman/listinfo/controller-dev