X-Git-Url: https://git.opendaylight.org/gerrit/gitweb?a=blobdiff_plain;f=opendaylight%2Fmd-sal%2Fsal-rest-connector%2Fsrc%2Fmain%2Fjava%2Forg%2Fopendaylight%2Fcontroller%2Fsal%2Frestconf%2Fimpl%2FRestconfImpl.java;h=1514a15d1132417849a0efb29e53b0ea26113b8f;hb=412db94945c5db5d2da918f5e23bd3abcecc4d10;hp=33795889a122536c14f9e6c61f368b8b7c949ece;hpb=cd5b4bd47e1cfc40751ef15f6fcdf33fc131c1f8;p=controller.git diff --git a/opendaylight/md-sal/sal-rest-connector/src/main/java/org/opendaylight/controller/sal/restconf/impl/RestconfImpl.java b/opendaylight/md-sal/sal-rest-connector/src/main/java/org/opendaylight/controller/sal/restconf/impl/RestconfImpl.java index 33795889a1..1514a15d11 100644 --- a/opendaylight/md-sal/sal-rest-connector/src/main/java/org/opendaylight/controller/sal/restconf/impl/RestconfImpl.java +++ b/opendaylight/md-sal/sal-rest-connector/src/main/java/org/opendaylight/controller/sal/restconf/impl/RestconfImpl.java @@ -697,7 +697,7 @@ public class RestconfImpl implements RestconfService { if (mountPoint != null) { broker.commitConfigurationDataPut(mountPoint, normalizedII, payload.getData()).checkedGet(); } else { - broker.commitConfigurationDataPut(normalizedII, payload.getData()).checkedGet(); + broker.commitConfigurationDataPut(controllerContext.getGlobalSchema(), normalizedII, payload.getData()).checkedGet(); } break; @@ -828,12 +828,13 @@ public class RestconfImpl implements RestconfService { throw new RestconfDocumentedException("Input is required.", ErrorType.PROTOCOL, ErrorTag.MALFORMED_MESSAGE); } - final URI payloadNS = payload.getData().getNodeType().getNamespace(); - if (payloadNS == null) { - throw new RestconfDocumentedException( - "Data has bad format. Root element node must have namespace (XML format) or module name(JSON format)", - ErrorType.PROTOCOL, ErrorTag.UNKNOWN_NAMESPACE); - } + // FIXME: move this to parsing stage (we can have augmentation nodes here which do not have namespace) +// final URI payloadNS = payload.getData().getNodeType().getNamespace(); +// if (payloadNS == null) { +// throw new RestconfDocumentedException( +// "Data has bad format. Root element node must have namespace (XML format) or module name(JSON format)", +// ErrorType.PROTOCOL, ErrorTag.UNKNOWN_NAMESPACE); +// } final DOMMountPoint mountPoint = payload.getInstanceIdentifierContext().getMountPoint(); final InstanceIdentifierContext iiWithData = payload.getInstanceIdentifierContext(); @@ -842,7 +843,7 @@ public class RestconfImpl implements RestconfService { if (mountPoint != null) { broker.commitConfigurationDataPost(mountPoint, normalizedII, payload.getData()).checkedGet(); } else { - broker.commitConfigurationDataPost(normalizedII, payload.getData()).checkedGet(); + broker.commitConfigurationDataPost(controllerContext.getGlobalSchema(), normalizedII, payload.getData()).checkedGet(); } } catch(final RestconfDocumentedException e) { throw e;