+/*
+ * Copyright (c) 2014 Cisco Systems, Inc. and others. All rights reserved.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at http://www.eclipse.org/legal/epl-v10.html
+ */
package org.opendaylight.controller.sal.restconf.impl
import com.google.common.base.Preconditions
return INSTANCE
}
- override readAllData() {
-
- // return broker.readOperationalData("".toInstanceIdentifier.getInstanceIdentifier);
- throw new UnsupportedOperationException("Reading all data is currently not supported.")
- }
-
override getModules() {
throw new UnsupportedOperationException("TODO: auto-generated method stub")
}
return callRpc(identifier.rpcDefinition, payload)
}
- override invokeRpc(String identifier) {
+ override invokeRpc(String identifier, String noPayload) {
+ if (!noPayload.nullOrEmpty) {
+ throw new ResponseException(UNSUPPORTED_MEDIA_TYPE, "Content-Type contains unsupported Media Type.");
+ }
return callRpc(identifier.rpcDefinition, null)
}
return new StructuredData(rpcResult.result, rpc.output, null)
}
- override readData(String identifier) {
- val iiWithData = identifier.toInstanceIdentifier
- var CompositeNode data = null;
- if (iiWithData.mountPoint !== null) {
- data = broker.readOperationalDataBehindMountPoint(iiWithData.mountPoint, iiWithData.instanceIdentifier)
- } else {
- data = broker.readOperationalData(iiWithData.getInstanceIdentifier);
- }
- return new StructuredData(data, iiWithData.schemaNode, iiWithData.mountPoint)
- }
-
override readConfigurationData(String identifier) {
val iiWithData = identifier.toInstanceIdentifier
var CompositeNode data = null;
return new StructuredData(data, iiWithData.schemaNode, iiWithData.mountPoint)
}
- override updateConfigurationDataLegacy(String identifier, CompositeNode payload) {
- updateConfigurationData(identifier, payload);
- }
-
override updateConfigurationData(String identifier, CompositeNode payload) {
val iiWithData = identifier.toInstanceIdentifier
val value = normalizeNode(payload, iiWithData.schemaNode, iiWithData.mountPoint)
}
}
- override createConfigurationDataLegacy(String identifier, CompositeNode payload) {
- createConfigurationData(identifier, payload);
- }
-
override createConfigurationData(String identifier, CompositeNode payload) {
if (payload.namespace === null) {
throw new ResponseException(BAD_REQUEST,