hotfix Bug 3226 - unable to configure flows
[controller.git] / opendaylight / md-sal / sal-rest-connector / src / main / java / org / opendaylight / controller / sal / restconf / impl / RestconfImpl.java
index 9f3a83eafcc5ae6a15aa04c979e0f1fdbdc9cbcf..67ecf56ba443d5bff64cae5f7c69af0cd8968bca 100644 (file)
@@ -774,10 +774,7 @@ public class RestconfImpl implements RestconfService {
             RestconfValidationUtils.checkDocumentedError(uriKeyValue != null, ErrorType.PROTOCOL, ErrorTag.DATA_MISSING,
                     "Missing key " + keyDefinition + " in URI.");
 
-            final Object dataKeyValue = payload.getAttributeValue(keyDefinition);
-            RestconfValidationUtils.checkDocumentedError(dataKeyValue != null, ErrorType.PROTOCOL, ErrorTag.DATA_MISSING,
-                    "Missing key " + keyDefinition.getLocalName() + " in the message body.");
-
+            final Object dataKeyValue = payload.getIdentifier().getKeyValues().get(keyDefinition);
 
             if ( ! uriKeyValue.equals(dataKeyValue)) {
                 final String errMsg = "The value '" + uriKeyValue + "' for key '" + keyDefinition.getLocalName() +