import org.opendaylight.yangtools.yang.data.impl.schema.Builders;
import org.opendaylight.yangtools.yang.data.impl.schema.ImmutableNodes;
import org.opendaylight.yangtools.yang.data.impl.schema.NormalizedNodeResult;
-import org.opendaylight.yangtools.yang.data.impl.schema.builder.impl.ImmutableContainerNodeBuilder;
-import org.opendaylight.yangtools.yang.model.api.ActionDefinition;
import org.opendaylight.yangtools.yang.model.api.EffectiveModelContext;
import org.opendaylight.yangtools.yang.model.api.stmt.SchemaNodeIdentifier.Absolute;
import org.opendaylight.yangtools.yang.test.util.YangParserTestUtils;
schemaPaths.add(CHECK_WITH_OUTPUT_INTERFACE_PATH);
schemaPaths.add(CHECK_WITHOUT_OUTPUT_INTERFACE_PATH);
- final Map<Absolute, ActionDefinition> actions = NetconfMessageTransformer.getActions(ACTION_SCHEMA);
+ var actions = NetconfMessageTransformer.getActions(ACTION_SCHEMA);
assertEquals(schemaPaths.size(), actions.size());
- for (final Absolute actionPath : actions.keySet()) {
- assertTrue(schemaPaths.remove(actionPath));
+
+ for (var path : schemaPaths) {
+ assertNotNull("Action for " + path + " not found", actions.get(path));
}
}
DOMDataTreeIdentifier domDataTreeIdentifier = prepareDataTreeId(nodeIdentifiers);
- ContainerNode payload = ImmutableContainerNodeBuilder.create()
- .withNodeIdentifier(NodeIdentifier.create(QName.create(barInputQname, "input")))
- .withChild(ImmutableNodes.leafNode(barInputQname, barInput))
- .build();
+ ContainerNode payload = Builders.containerBuilder()
+ .withNodeIdentifier(NodeIdentifier.create(QName.create(barInputQname, "input")))
+ .withChild(ImmutableNodes.leafNode(barInputQname, barInput))
+ .build();
NetconfMessage actionRequest = actionNetconfMessageTransformer.toActionRequest(
XYZZY_BAR_PATH, domDataTreeIdentifier, payload);
}
private static ContainerNode initInputAction(final QName qname, final String value) {
- return ImmutableContainerNodeBuilder.create()
+ return Builders.containerBuilder()
.withNodeIdentifier(NodeIdentifier.create(QName.create(qname, "input")))
.withChild(ImmutableNodes.leafNode(qname, value))
.build();
}
private static ContainerNode initEmptyInputAction(final QName qname) {
- return ImmutableContainerNodeBuilder.create()
+ return Builders.containerBuilder()
.withNodeIdentifier(NodeIdentifier.create(QName.create(qname, "input")))
.build();
}