BUG 340: Resolved instance-identifier translation in JSON
[controller.git] / opendaylight / md-sal / sal-rest-connector / src / main / java / org / opendaylight / controller / sal / restconf / impl / RestCodec.java
index 4f643fe34d02461a00a71ceef4f53da24670e75c..d6b530039eb681cf831956b9e61a83aad106ac64 100644 (file)
@@ -212,6 +212,11 @@ public class RestCodec {
                     List<Predicate> predicates = keyValuesToPredicateList(((NodeIdentifierWithPredicates) pathArgument)
                             .getKeyValues());
                     identityValue.setPredicates(predicates);
+                } else if (pathArgument instanceof NodeWithValue && identityValue != null) {
+                    List<Predicate> predicates = new ArrayList<>();
+                    String value = String.valueOf(((NodeWithValue) pathArgument).getValue());
+                    predicates.add(new Predicate(null, value));
+                    identityValue.setPredicates(predicates);
                 }
                 identityValuesDTO.add(identityValue);
             }