import org.opendaylight.mdsal.binding.runtime.api.ModuleRuntimeType;
import org.opendaylight.mdsal.binding.runtime.api.OutputRuntimeType;
import org.opendaylight.mdsal.binding.runtime.api.RuntimeType;
+import org.opendaylight.mdsal.binding.runtime.api.YangDataRuntimeType;
import org.opendaylight.yangtools.yang.common.QName;
import org.opendaylight.yangtools.yang.common.QNameModule;
+import org.opendaylight.yangtools.yang.common.YangDataName;
import org.opendaylight.yangtools.yang.model.api.EffectiveModelContext;
/**
}
@Override
- public Optional<IdentityRuntimeType> findIdentity(final QName qname) {
- return Optional.ofNullable(identities.get(requireNonNull(qname)));
+ public IdentityRuntimeType identityChild(final QName qname) {
+ return identities.get(requireNonNull(qname));
}
@Override
return Optional.ofNullable(rpcOutputs.get(requireNonNull(rpcName)));
}
+ @Override
+ public Optional<YangDataRuntimeType> findYangData(final YangDataName templateName) {
+ final var module = modulesByNamespace.get(templateName.module());
+ return module == null ? Optional.empty() : Optional.ofNullable(module.yangDataChild(templateName));
+ }
+
@Override
public Set<CaseRuntimeType> allCaseChildren(final ChoiceRuntimeType choiceType) {
return choiceToCases.get(choiceType.getIdentifier());