Code Review
/
controller.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
review
|
tree
raw
|
inline
| side by side
Merge "BUG 3057 - notify added event source by topics created before"
[controller.git]
/
opendaylight
/
md-sal
/
sal-rest-connector
/
src
/
main
/
java
/
org
/
opendaylight
/
controller
/
sal
/
restconf
/
impl
/
RestconfImpl.java
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 8e88be6f501a14ccd5f843c9bafb72100bd3d53f..5e9ab7b9d0a0b818a577ddbcec502f10e6196bca 100644
(file)
--- 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
@@
-417,18
+417,13
@@
public class RestconfImpl implements RestconfService {
return retValue;
}
throw new RestconfDocumentedException("RpcError message", null, retValue.getErrors());
return retValue;
}
throw new RestconfDocumentedException("RpcError message", null, retValue.getErrors());
- }
- catch (final InterruptedException e) {
+ } catch (final InterruptedException e) {
throw new RestconfDocumentedException(
"The operation was interrupted while executing and did not complete.", ErrorType.RPC,
ErrorTag.PARTIAL_OPERATION);
throw new RestconfDocumentedException(
"The operation was interrupted while executing and did not complete.", ErrorType.RPC,
ErrorTag.PARTIAL_OPERATION);
- }
- catch (final ExecutionException e) {
+ } catch (final ExecutionException e) {
Throwable cause = e.getCause();
Throwable cause = e.getCause();
- if (cause instanceof CancellationException) {
- throw new RestconfDocumentedException("The operation was cancelled while executing.", ErrorType.RPC,
- ErrorTag.PARTIAL_OPERATION);
- } else if (cause != null) {
+ if (cause != null) {
while (cause.getCause() != null) {
cause = cause.getCause();
}
while (cause.getCause() != null) {
cause = cause.getCause();
}
@@
-444,6
+439,9
@@
public class RestconfImpl implements RestconfService {
throw new RestconfDocumentedException("The operation encountered an unexpected error while executing.",
e);
}
throw new RestconfDocumentedException("The operation encountered an unexpected error while executing.",
e);
}
+ } catch (final CancellationException e) {
+ throw new RestconfDocumentedException("The operation was cancelled while executing.", ErrorType.RPC,
+ ErrorTag.PARTIAL_OPERATION);
}
}
}
}
@@
-697,7
+695,7
@@
public class RestconfImpl implements RestconfService {
if (mountPoint != null) {
broker.commitConfigurationDataPut(mountPoint, normalizedII, payload.getData()).checkedGet();
} else {
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;
}
break;
@@
-843,7
+841,7
@@
public class RestconfImpl implements RestconfService {
if (mountPoint != null) {
broker.commitConfigurationDataPost(mountPoint, normalizedII, payload.getData()).checkedGet();
} else {
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;
}
} catch(final RestconfDocumentedException e) {
throw e;