X-Git-Url: https://git.opendaylight.org/gerrit/gitweb?p=controller.git;a=blobdiff_plain;f=opendaylight%2Fmd-sal%2Fsal-rest-connector%2Fsrc%2Fmain%2Fjava%2Forg%2Fopendaylight%2Fcontroller%2Fsal%2Frestconf%2Fimpl%2FRestconfImpl.xtend;h=b6426c65bfdd55c8f984a8433eaddbb9ccb20dbc;hp=8f6ca1685bbb4b0c6f81ec2dc85ae4fd4c92d5f2;hb=a4f760dabea4b4387b9f3f0090e0768432c4a2e5;hpb=1306d0ed4b53625a1ba83e6aa5d693cd12ce7001 diff --git a/opendaylight/md-sal/sal-rest-connector/src/main/java/org/opendaylight/controller/sal/restconf/impl/RestconfImpl.xtend b/opendaylight/md-sal/sal-rest-connector/src/main/java/org/opendaylight/controller/sal/restconf/impl/RestconfImpl.xtend index 8f6ca1685b..b6426c65bf 100644 --- a/opendaylight/md-sal/sal-rest-connector/src/main/java/org/opendaylight/controller/sal/restconf/impl/RestconfImpl.xtend +++ b/opendaylight/md-sal/sal-rest-connector/src/main/java/org/opendaylight/controller/sal/restconf/impl/RestconfImpl.xtend @@ -2,12 +2,11 @@ package org.opendaylight.controller.sal.restconf.impl import java.util.List import javax.ws.rs.core.Response +import org.opendaylight.controller.md.sal.common.api.TransactionStatus import org.opendaylight.controller.sal.rest.api.RestconfService import org.opendaylight.yangtools.yang.data.api.CompositeNode import org.opendaylight.yangtools.yang.model.api.DataNodeContainer import org.opendaylight.yangtools.yang.model.api.DataSchemaNode -import org.opendaylight.controller.md.sal.common.api.TransactionStatus -import javax.ws.rs.WebApplicationException class RestconfImpl implements RestconfService { @@ -96,26 +95,6 @@ class RestconfImpl implements RestconfService { createConfigurationData(identifier,payload); } - override createOperationalData(String identifier, CompositeNode payload) { - val identifierWithSchemaNode = identifier.resolveInstanceIdentifier - val value = resolveNodeNamespaceBySchema(payload, identifierWithSchemaNode.schemaNode) - val status = broker.commitOperationalDataPut(identifierWithSchemaNode.instanceIdentifier,value).get(); - switch status.result { - case TransactionStatus.COMMITED: Response.status(Response.Status.OK).build - default: Response.status(Response.Status.INTERNAL_SERVER_ERROR).build - } - } - - override updateOperationalData(String identifier, CompositeNode payload) { - val identifierWithSchemaNode = identifier.resolveInstanceIdentifier - val value = resolveNodeNamespaceBySchema(payload, identifierWithSchemaNode.schemaNode) - val status = broker.commitOperationalDataPut(identifierWithSchemaNode.instanceIdentifier,value).get(); - switch status.result { - case TransactionStatus.COMMITED: Response.status(Response.Status.NO_CONTENT).build - default: Response.status(Response.Status.INTERNAL_SERVER_ERROR).build - } - } - private def InstanceIdWithSchemaNode resolveInstanceIdentifier(String identifier) { val identifierWithSchemaNode = identifier.toInstanceIdentifier if (identifierWithSchemaNode === null) {