X-Git-Url: https://git.opendaylight.org/gerrit/gitweb?p=controller.git;a=blobdiff_plain;f=opendaylight%2Fnetconf%2Fnetconf-cli%2Fsrc%2Fmain%2Fjava%2Forg%2Fopendaylight%2Fcontroller%2Fnetconf%2Fcli%2Freader%2Fimpl%2FChoiceReader.java;h=ef0396f4ccbce2f402a770de3697d8d5d0f37a17;hp=1e69fbb774832a2805cf4940f3909205482133a8;hb=874a18a9ce5dc09bc49922754bf8fb3e981fffb9;hpb=17d82f582a6bc13c78be3b19954ff8c021180e93 diff --git a/opendaylight/netconf/netconf-cli/src/main/java/org/opendaylight/controller/netconf/cli/reader/impl/ChoiceReader.java b/opendaylight/netconf/netconf-cli/src/main/java/org/opendaylight/controller/netconf/cli/reader/impl/ChoiceReader.java index 1e69fbb774..ef0396f4cc 100644 --- a/opendaylight/netconf/netconf-cli/src/main/java/org/opendaylight/controller/netconf/cli/reader/impl/ChoiceReader.java +++ b/opendaylight/netconf/netconf-cli/src/main/java/org/opendaylight/controller/netconf/cli/reader/impl/ChoiceReader.java @@ -28,7 +28,7 @@ import org.opendaylight.controller.netconf.cli.reader.ReadingException; import org.opendaylight.yangtools.yang.data.api.Node; import org.opendaylight.yangtools.yang.data.impl.NodeFactory; import org.opendaylight.yangtools.yang.model.api.ChoiceCaseNode; -import org.opendaylight.yangtools.yang.model.api.ChoiceNode; +import org.opendaylight.yangtools.yang.model.api.ChoiceSchemaNode; import org.opendaylight.yangtools.yang.model.api.DataSchemaNode; import org.opendaylight.yangtools.yang.model.api.LeafSchemaNode; import org.opendaylight.yangtools.yang.model.api.SchemaContext; @@ -36,7 +36,7 @@ import org.opendaylight.yangtools.yang.model.api.TypeDefinition; import org.slf4j.Logger; import org.slf4j.LoggerFactory; -public class ChoiceReader extends AbstractReader { +public class ChoiceReader extends AbstractReader { private static final Logger LOG = LoggerFactory.getLogger(ChoiceReader.class); @@ -55,7 +55,7 @@ public class ChoiceReader extends AbstractReader { } @Override - public List> readWithContext(final ChoiceNode choiceNode) throws IOException, ReadingException { + public List> readWithContext(final ChoiceSchemaNode choiceNode) throws IOException, ReadingException { final Map availableCases = collectAllCases(choiceNode); console.formatLn("Select case for choice %s from: %s", choiceNode.getQName().getLocalName(), formatSet(availableCases.keySet())); @@ -117,7 +117,7 @@ public class ChoiceReader extends AbstractReader { return false; } - private Map collectAllCases(final ChoiceNode schemaNode) { + private Map collectAllCases(final ChoiceSchemaNode schemaNode) { return Maps.uniqueIndex(schemaNode.getCases(), new Function() { @Override public String apply(final ChoiceCaseNode input) { @@ -127,8 +127,8 @@ public class ChoiceReader extends AbstractReader { } @Override - protected ConsoleContext getContext(final ChoiceNode schemaNode) { - return new BaseConsoleContext(schemaNode) { + protected ConsoleContext getContext(final ChoiceSchemaNode schemaNode) { + return new BaseConsoleContext(schemaNode) { @Override public List getAdditionalCompleters() { return Collections