/**
- * Copyright (c) 2014 Cisco Systems, Inc. and others. All rights reserved.
- * Copyright (c) 2014 Brocade Communication Systems, Inc.
+ * Copyright (c) 2014, 2015 Brocade Communication Systems, Inc., 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.Optional;
return new NormalizedNodeContext(new InstanceIdentifierContext<>(null, modulesSchemaNode,
null, schemaContext), moduleContainerBuilder.build(),
- QueryParametersParser.parseKnownWriterParameters(uriInfo));
+ QueryParametersParser.parseWriterParameters(uriInfo));
}
/**
return new NormalizedNodeContext(new InstanceIdentifierContext<>(null, modulesSchemaNode,
mountPoint, controllerContext.getGlobalSchema()), moduleContainerBuilder.build(),
- QueryParametersParser.parseKnownWriterParameters(uriInfo));
+ QueryParametersParser.parseWriterParameters(uriInfo));
}
@Override
Preconditions.checkState(moduleSchemaNode instanceof ListSchemaNode);
return new NormalizedNodeContext(new InstanceIdentifierContext<>(null, moduleSchemaNode, mountPoint,
- schemaContext), moduleMap, QueryParametersParser.parseKnownWriterParameters(uriInfo));
+ schemaContext), moduleMap, QueryParametersParser.parseWriterParameters(uriInfo));
}
@Override
return new NormalizedNodeContext(new InstanceIdentifierContext<>(null, streamsContainerSchemaNode, null,
- schemaContext), streamsContainerBuilder.build(), QueryParametersParser.parseKnownWriterParameters(uriInfo));
+ schemaContext), streamsContainerBuilder.build(), QueryParametersParser.parseWriterParameters(uriInfo));
}
@Override
return new NormalizedNodeContext(new InstanceIdentifierContext<RpcDefinition>(null,
resultNodeSchema, mountPoint, schemaContext), resultData,
- QueryParametersParser.parseKnownWriterParameters(uriInfo));
+ QueryParametersParser.parseWriterParameters(uriInfo));
}
private DOMRpcResult checkRpcResponse(final CheckedFuture<DOMRpcResult, DOMRpcException> response) {
}
return new NormalizedNodeContext(new InstanceIdentifierContext<>(null, resultNodeSchema, mountPoint,
- schemaContext), resultData, QueryParametersParser.parseKnownWriterParameters(uriInfo));
+ schemaContext), resultData, QueryParametersParser.parseWriterParameters(uriInfo));
}
private RpcDefinition findRpc(final SchemaContext schemaContext, final String identifierDecoded) {
LOG.debug(errMsg + identifier);
throw new RestconfDocumentedException(errMsg, ErrorType.APPLICATION, ErrorTag.DATA_MISSING);
}
- return new NormalizedNodeContext(iiWithData, data, QueryParametersParser.parseKnownWriterParameters(uriInfo));
+ return new NormalizedNodeContext(iiWithData, data, QueryParametersParser.parseWriterParameters(uriInfo));
}
@Override
LOG.debug(errMsg + identifier);
throw new RestconfDocumentedException(errMsg , ErrorType.APPLICATION, ErrorTag.DATA_MISSING);
}
- return new NormalizedNodeContext(iiWithData, data, QueryParametersParser.parseKnownWriterParameters(uriInfo));
+ return new NormalizedNodeContext(iiWithData, data, QueryParametersParser.parseWriterParameters(uriInfo));
}
@Override
LOG.debug("Update ConfigDataStore fail " + identifier, e);
throw new RestconfDocumentedException(e.getMessage(), e, e.getErrorList());
}
+ } catch (Exception e) {
+ final String errMsg = "Error updating data ";
+ LOG.debug(errMsg + identifier, e);
+ throw new RestconfDocumentedException(errMsg, e);
}
}
throw e;
} catch (final Exception e) {
final String errMsg = "Error creating data ";
- LOG.info(errMsg + uriInfo.getPath(), e);
+ LOG.info(errMsg + (uriInfo != null ? uriInfo.getPath() : ""), e);
throw new RestconfDocumentedException(errMsg, e);
}