diff options
40 files changed, 166 insertions, 92 deletions
diff --git a/features/ccsdk-sli-plugins-all/pom.xml b/features/ccsdk-sli-plugins-all/pom.xml index 051f3a463..d4715be62 100644 --- a/features/ccsdk-sli-plugins-all/pom.xml +++ b/features/ccsdk-sli-plugins-all/pom.xml @@ -7,16 +7,18 @@ <parent> <groupId>org.onap.ccsdk.parent</groupId> <artifactId>single-feature-parent</artifactId> - <version>1.1.0-SNAPSHOT</version> + <version>1.1.1-SNAPSHOT</version> <relativePath /> </parent> <groupId>org.onap.ccsdk.sli.plugins</groupId> <artifactId>ccsdk-sli-plugins-all</artifactId> - <version>0.3.0-SNAPSHOT</version> + <version>0.3.1-SNAPSHOT</version> <packaging>feature</packaging> <name>ccsdk-sli-plugins :: features :: ${project.artifactId}</name> + + <dependencyManagement> <dependencies> <dependency> diff --git a/features/features-sli-plugins/pom.xml b/features/features-sli-plugins/pom.xml index 0b43d1a0d..b3333b600 100644 --- a/features/features-sli-plugins/pom.xml +++ b/features/features-sli-plugins/pom.xml @@ -5,13 +5,13 @@ <parent> <groupId>org.onap.ccsdk.parent</groupId> <artifactId>feature-repo-parent</artifactId> - <version>1.1.0-SNAPSHOT</version> + <version>1.1.1-SNAPSHOT</version> <relativePath/> </parent> <groupId>org.onap.ccsdk.sli.plugins</groupId> <artifactId>features-sli-plugins</artifactId> - <version>0.3.0-SNAPSHOT</version> + <version>0.3.1-SNAPSHOT</version> <packaging>feature</packaging> <name>ccsdk-sli-plugins :: features :: ${project.artifactId}</name> diff --git a/features/installer/pom.xml b/features/installer/pom.xml index 050d3e9d5..c2b77d0fd 100755 --- a/features/installer/pom.xml +++ b/features/installer/pom.xml @@ -6,13 +6,13 @@ <parent> <groupId>org.onap.ccsdk.parent</groupId> <artifactId>odlparent-lite</artifactId> - <version>1.1.0-SNAPSHOT</version> + <version>1.1.1-SNAPSHOT</version> <relativePath /> </parent> <groupId>org.onap.ccsdk.sli.plugins</groupId> <artifactId>sliplugins-features-installer</artifactId> - <version>0.3.0-SNAPSHOT</version> + <version>0.3.1-SNAPSHOT</version> <packaging>pom</packaging> <name>ccsdk-sli-plugins :: features :: ${project.artifactId}</name> diff --git a/features/pom.xml b/features/pom.xml index 3ac87bf6b..257627da4 100755 --- a/features/pom.xml +++ b/features/pom.xml @@ -5,13 +5,13 @@ <parent> <groupId>org.onap.ccsdk.parent</groupId> <artifactId>odlparent-lite</artifactId> - <version>1.1.0-SNAPSHOT</version> + <version>1.1.1-SNAPSHOT</version> <relativePath/> </parent> <groupId>org.onap.ccsdk.sli.plugins</groupId> <artifactId>sliplugins-feature-aggregator</artifactId> - <version>0.3.0-SNAPSHOT</version> + <version>0.3.1-SNAPSHOT</version> <packaging>pom</packaging> <name>ccsdk-sli-plugins :: features</name> @@ -5,12 +5,12 @@ <parent> <groupId>org.onap.ccsdk.parent</groupId> <artifactId>odlparent-lite</artifactId> - <version>1.1.0-SNAPSHOT</version> + <version>1.1.1-SNAPSHOT</version> </parent> <groupId>org.onap.ccsdk.sli.plugins</groupId> <artifactId>ccsdk-sli-plugins</artifactId> - <version>0.3.0-SNAPSHOT</version> + <version>0.3.1-SNAPSHOT</version> <packaging>pom</packaging> <name>ccsdk-sli-plugins</name> diff --git a/properties-node/features/ccsdk-properties-node/pom.xml b/properties-node/features/ccsdk-properties-node/pom.xml index fd38cb224..744d6d892 100644 --- a/properties-node/features/ccsdk-properties-node/pom.xml +++ b/properties-node/features/ccsdk-properties-node/pom.xml @@ -5,18 +5,20 @@ <parent> <groupId>org.onap.ccsdk.parent</groupId> <artifactId>single-feature-parent</artifactId> - <version>1.1.0-SNAPSHOT</version> + <version>1.1.1-SNAPSHOT</version> <relativePath /> </parent> <groupId>org.onap.ccsdk.sli.plugins</groupId> <artifactId>ccsdk-properties-node</artifactId> - <version>0.3.0-SNAPSHOT</version> + <version>0.3.1-SNAPSHOT</version> <packaging>feature</packaging> <name>ccsdk-sli-plugins :: properties-node :: ${project.artifactId}</name> + + <dependencyManagement> <dependencies> <dependency> diff --git a/properties-node/features/features-properties-node/pom.xml b/properties-node/features/features-properties-node/pom.xml index e8f168e2b..0f1b28c88 100644 --- a/properties-node/features/features-properties-node/pom.xml +++ b/properties-node/features/features-properties-node/pom.xml @@ -5,13 +5,13 @@ <parent> <groupId>org.onap.ccsdk.parent</groupId> <artifactId>feature-repo-parent</artifactId> - <version>1.1.0-SNAPSHOT</version> + <version>1.1.1-SNAPSHOT</version> <relativePath/> </parent> <groupId>org.onap.ccsdk.sli.plugins</groupId> <artifactId>features-properties-node</artifactId> - <version>0.3.0-SNAPSHOT</version> + <version>0.3.1-SNAPSHOT</version> <packaging>feature</packaging> <name>ccsdk-sli-plugins :: properties-node :: ${project.artifactId}</name> diff --git a/properties-node/features/pom.xml b/properties-node/features/pom.xml index dd0e824f0..32e139b4f 100755 --- a/properties-node/features/pom.xml +++ b/properties-node/features/pom.xml @@ -5,12 +5,12 @@ <parent>
<groupId>org.onap.ccsdk.parent</groupId>
<artifactId>odlparent-lite</artifactId>
- <version>1.1.0-SNAPSHOT</version>
+ <version>1.1.1-SNAPSHOT</version>
</parent>
<groupId>org.onap.ccsdk.sli.plugins</groupId>
<artifactId>properties-node-features</artifactId>
- <version>0.3.0-SNAPSHOT</version>
+ <version>0.3.1-SNAPSHOT</version>
<packaging>pom</packaging>
<name>ccsdk-sli-plugins :: properties-node :: ${project.artifactId}</name>
diff --git a/properties-node/installer/pom.xml b/properties-node/installer/pom.xml index 965bdbb77..0a6918a3e 100755 --- a/properties-node/installer/pom.xml +++ b/properties-node/installer/pom.xml @@ -5,12 +5,12 @@ <parent> <groupId>org.onap.ccsdk.parent</groupId> <artifactId>odlparent-lite</artifactId> - <version>1.1.0-SNAPSHOT</version> + <version>1.1.1-SNAPSHOT</version> </parent> <groupId>org.onap.ccsdk.sli.plugins</groupId> <artifactId>properties-node-installer</artifactId> - <version>0.3.0-SNAPSHOT</version> + <version>0.3.1-SNAPSHOT</version> <packaging>pom</packaging> <name>ccsdk-sli-plugins :: properties-node :: ${project.artifactId}</name> diff --git a/properties-node/pom.xml b/properties-node/pom.xml index eb7dcbb51..25c2cf225 100755 --- a/properties-node/pom.xml +++ b/properties-node/pom.xml @@ -5,12 +5,12 @@ <parent>
<groupId>org.onap.ccsdk.parent</groupId>
<artifactId>odlparent-lite</artifactId>
- <version>1.1.0-SNAPSHOT</version>
+ <version>1.1.1-SNAPSHOT</version>
</parent>
<groupId>org.onap.ccsdk.sli.plugins</groupId>
<artifactId>properties-node</artifactId>
- <version>0.3.0-SNAPSHOT</version>
+ <version>0.3.1-SNAPSHOT</version>
<packaging>pom</packaging>
<name>ccsdk-sli-plugins :: properties-node</name>
diff --git a/properties-node/provider/pom.xml b/properties-node/provider/pom.xml index a9a3c94d5..7f9352341 100755 --- a/properties-node/provider/pom.xml +++ b/properties-node/provider/pom.xml @@ -5,12 +5,12 @@ <parent>
<groupId>org.onap.ccsdk.parent</groupId>
<artifactId>binding-parent</artifactId>
- <version>1.1.0-SNAPSHOT</version>
+ <version>1.1.1-SNAPSHOT</version>
</parent>
<groupId>org.onap.ccsdk.sli.plugins</groupId>
<artifactId>properties-node-provider</artifactId>
- <version>0.3.0-SNAPSHOT</version>
+ <version>0.3.1-SNAPSHOT</version>
<packaging>bundle</packaging>
<name>ccsdk-sli-plugins :: properties-node :: ${project.artifactId}</name>
diff --git a/restapi-call-node/features/ccsdk-restapi-call-node/pom.xml b/restapi-call-node/features/ccsdk-restapi-call-node/pom.xml index 822a6d1e7..2c616a298 100644 --- a/restapi-call-node/features/ccsdk-restapi-call-node/pom.xml +++ b/restapi-call-node/features/ccsdk-restapi-call-node/pom.xml @@ -7,17 +7,19 @@ <parent> <groupId>org.onap.ccsdk.parent</groupId> <artifactId>single-feature-parent</artifactId> - <version>1.1.0-SNAPSHOT</version> + <version>1.1.1-SNAPSHOT</version> <relativePath /> </parent> <groupId>org.onap.ccsdk.sli.plugins</groupId> <artifactId>ccsdk-restapi-call-node</artifactId> - <version>0.3.0-SNAPSHOT</version> + <version>0.3.1-SNAPSHOT</version> <packaging>feature</packaging> <name>ccsdk-sli-plugins :: restapi-call-node :: ${project.artifactId}</name> + + <dependencyManagement> <dependencies> <dependency> diff --git a/restapi-call-node/features/features-restapi-call-node/pom.xml b/restapi-call-node/features/features-restapi-call-node/pom.xml index dfcef32f4..8160611dd 100644 --- a/restapi-call-node/features/features-restapi-call-node/pom.xml +++ b/restapi-call-node/features/features-restapi-call-node/pom.xml @@ -5,13 +5,13 @@ <parent> <groupId>org.onap.ccsdk.parent</groupId> <artifactId>feature-repo-parent</artifactId> - <version>1.1.0-SNAPSHOT</version> + <version>1.1.1-SNAPSHOT</version> <relativePath/> </parent> <groupId>org.onap.ccsdk.sli.plugins</groupId> <artifactId>features-restapi-call-node</artifactId> - <version>0.3.0-SNAPSHOT</version> + <version>0.3.1-SNAPSHOT</version> <packaging>feature</packaging> <name>ccsdk-sli-plugins :: restapi-call-node :: ${project.artifactId}</name> diff --git a/restapi-call-node/features/pom.xml b/restapi-call-node/features/pom.xml index 14e9ae022..55e0945e7 100755 --- a/restapi-call-node/features/pom.xml +++ b/restapi-call-node/features/pom.xml @@ -5,12 +5,12 @@ <parent> <groupId>org.onap.ccsdk.parent</groupId> <artifactId>odlparent-lite</artifactId> - <version>1.1.0-SNAPSHOT</version> + <version>1.1.1-SNAPSHOT</version> </parent> <groupId>org.onap.ccsdk.sli.plugins</groupId> <artifactId>restapi-call-node-features</artifactId> - <version>0.3.0-SNAPSHOT</version> + <version>0.3.1-SNAPSHOT</version> <packaging>pom</packaging> <name>ccsdk-sli-plugins :: restapi-call-node :: ${project.artifactId}</name> diff --git a/restapi-call-node/installer/pom.xml b/restapi-call-node/installer/pom.xml index 8e2f402eb..acb6ae899 100755 --- a/restapi-call-node/installer/pom.xml +++ b/restapi-call-node/installer/pom.xml @@ -5,12 +5,12 @@ <parent> <groupId>org.onap.ccsdk.parent</groupId> <artifactId>odlparent-lite</artifactId> - <version>1.1.0-SNAPSHOT</version> + <version>1.1.1-SNAPSHOT</version> </parent> <groupId>org.onap.ccsdk.sli.plugins</groupId> <artifactId>restapi-call-node-installer</artifactId> - <version>0.3.0-SNAPSHOT</version> + <version>0.3.1-SNAPSHOT</version> <packaging>pom</packaging> <name>ccsdk-sli-plugins :: restapi-call-node :: ${project.artifactId}</name> diff --git a/restapi-call-node/pom.xml b/restapi-call-node/pom.xml index 641bcc863..f704647ab 100755 --- a/restapi-call-node/pom.xml +++ b/restapi-call-node/pom.xml @@ -5,12 +5,12 @@ <parent> <groupId>org.onap.ccsdk.parent</groupId> <artifactId>odlparent-lite</artifactId> - <version>1.1.0-SNAPSHOT</version> + <version>1.1.1-SNAPSHOT</version> </parent> <groupId>org.onap.ccsdk.sli.plugins</groupId> <artifactId>restapi-call-node</artifactId> - <version>0.3.0-SNAPSHOT</version> + <version>0.3.1-SNAPSHOT</version> <packaging>pom</packaging> <name>ccsdk-sli-plugins :: restapi-call-node</name> diff --git a/restapi-call-node/provider/pom.xml b/restapi-call-node/provider/pom.xml index 942c4f32f..035f2fcf3 100755 --- a/restapi-call-node/provider/pom.xml +++ b/restapi-call-node/provider/pom.xml @@ -6,12 +6,12 @@ <parent> <groupId>org.onap.ccsdk.parent</groupId> <artifactId>binding-parent</artifactId> - <version>1.1.0-SNAPSHOT</version> + <version>1.1.1-SNAPSHOT</version> </parent> <groupId>org.onap.ccsdk.sli.plugins</groupId> <artifactId>restapi-call-node-provider</artifactId> - <version>0.3.0-SNAPSHOT</version> + <version>0.3.1-SNAPSHOT</version> <packaging>bundle</packaging> <name>ccsdk-sli-plugins :: restapi-call-node :: ${project.artifactId}</name> diff --git a/restconf-client/features/ccsdk-restconf-client/pom.xml b/restconf-client/features/ccsdk-restconf-client/pom.xml index 1877f19d8..03d935296 100644 --- a/restconf-client/features/ccsdk-restconf-client/pom.xml +++ b/restconf-client/features/ccsdk-restconf-client/pom.xml @@ -7,17 +7,19 @@ <parent> <groupId>org.onap.ccsdk.parent</groupId> <artifactId>single-feature-parent</artifactId> - <version>1.1.0-SNAPSHOT</version> + <version>1.1.1-SNAPSHOT</version> <relativePath /> </parent> <groupId>org.onap.ccsdk.sli.plugins</groupId> <artifactId>ccsdk-restconf-client</artifactId> - <version>0.3.0-SNAPSHOT</version> + <version>0.3.1-SNAPSHOT</version> <packaging>feature</packaging> <name>ccsdk-sli-plugins :: restconf-client :: ${project.artifactId}</name> + + <dependencyManagement> <dependencies> <dependency> diff --git a/restconf-client/features/features-restconf-client/pom.xml b/restconf-client/features/features-restconf-client/pom.xml index 8ee5e7e21..166ddc53d 100644 --- a/restconf-client/features/features-restconf-client/pom.xml +++ b/restconf-client/features/features-restconf-client/pom.xml @@ -5,13 +5,13 @@ <parent> <groupId>org.onap.ccsdk.parent</groupId> <artifactId>feature-repo-parent</artifactId> - <version>1.1.0-SNAPSHOT</version> + <version>1.1.1-SNAPSHOT</version> <relativePath/> </parent> <groupId>org.onap.ccsdk.sli.plugins</groupId> <artifactId>features-restconf-client</artifactId> - <version>0.3.0-SNAPSHOT</version> + <version>0.3.1-SNAPSHOT</version> <packaging>feature</packaging> <name>ccsdk-sli-plugins :: restconf-client :: ${project.artifactId}</name> diff --git a/restconf-client/features/pom.xml b/restconf-client/features/pom.xml index c94be00be..6aa3fde88 100755 --- a/restconf-client/features/pom.xml +++ b/restconf-client/features/pom.xml @@ -5,12 +5,12 @@ <parent> <groupId>org.onap.ccsdk.parent</groupId> <artifactId>odlparent-lite</artifactId> - <version>1.1.0-SNAPSHOT</version> + <version>1.1.1-SNAPSHOT</version> </parent> <groupId>org.onap.ccsdk.sli.plugins</groupId> <artifactId>restconf-client-features</artifactId> - <version>0.3.0-SNAPSHOT</version> + <version>0.3.1-SNAPSHOT</version> <packaging>pom</packaging> <name>ccsdk-sli-plugins :: restconf-client :: ${project.artifactId}</name> diff --git a/restconf-client/installer/pom.xml b/restconf-client/installer/pom.xml index b28cefde9..fd675c80a 100755 --- a/restconf-client/installer/pom.xml +++ b/restconf-client/installer/pom.xml @@ -6,12 +6,12 @@ <parent> <groupId>org.onap.ccsdk.parent</groupId> <artifactId>odlparent-lite</artifactId> - <version>1.1.0-SNAPSHOT</version> + <version>1.1.1-SNAPSHOT</version> </parent> <groupId>org.onap.ccsdk.sli.plugins</groupId> <artifactId>restconf-client-installer</artifactId> - <version>0.3.0-SNAPSHOT</version> + <version>0.3.1-SNAPSHOT</version> <packaging>pom</packaging> <name>ccsdk-sli-plugins :: restconf-client :: ${project.artifactId}</name> diff --git a/restconf-client/pom.xml b/restconf-client/pom.xml index fecbd2b93..fccd697bb 100755 --- a/restconf-client/pom.xml +++ b/restconf-client/pom.xml @@ -5,12 +5,12 @@ <parent> <groupId>org.onap.ccsdk.parent</groupId> <artifactId>odlparent-lite</artifactId> - <version>1.1.0-SNAPSHOT</version> + <version>1.1.1-SNAPSHOT</version> </parent> <groupId>org.onap.ccsdk.sli.plugins</groupId> <artifactId>restconf-client</artifactId> - <version>0.3.0-SNAPSHOT</version> + <version>0.3.1-SNAPSHOT</version> <packaging>pom</packaging> <name>ccsdk-sli-plugins :: restconf-client</name> diff --git a/restconf-client/provider/pom.xml b/restconf-client/provider/pom.xml index db0bee061..ac5c4cc32 100755 --- a/restconf-client/provider/pom.xml +++ b/restconf-client/provider/pom.xml @@ -6,12 +6,12 @@ <parent> <groupId>org.onap.ccsdk.parent</groupId> <artifactId>binding-parent</artifactId> - <version>1.1.0-SNAPSHOT</version> + <version>1.1.1-SNAPSHOT</version> </parent> <groupId>org.onap.ccsdk.sli.plugins</groupId> <artifactId>restconf-client-provider</artifactId> - <version>0.3.0-SNAPSHOT</version> + <version>0.3.1-SNAPSHOT</version> <packaging>bundle</packaging> <name>ccsdk-sli-plugins :: restconf-client :: ${project.artifactId}</name> @@ -39,7 +39,7 @@ <dependency> <groupId>org.onap.ccsdk.sli.plugins</groupId> <artifactId>properties-node-provider</artifactId> - <version>0.3.0-SNAPSHOT</version> + <version>0.3.1-SNAPSHOT</version> </dependency> <dependency> <groupId>org.opendaylight.yangtools</groupId> @@ -63,7 +63,7 @@ <dependency> <groupId>org.onap.ccsdk.sli.plugins</groupId> <artifactId>restapi-call-node-provider</artifactId> - <version>0.3.0-SNAPSHOT</version> + <version>0.3.1-SNAPSHOT</version> </dependency> diff --git a/restconf-client/provider/src/main/java/org/onap/ccsdk/sli/plugins/restconfapicall/RestconfApiCallNode.java b/restconf-client/provider/src/main/java/org/onap/ccsdk/sli/plugins/restconfapicall/RestconfApiCallNode.java index f9a1ecbf3..91ce3338a 100644 --- a/restconf-client/provider/src/main/java/org/onap/ccsdk/sli/plugins/restconfapicall/RestconfApiCallNode.java +++ b/restconf-client/provider/src/main/java/org/onap/ccsdk/sli/plugins/restconfapicall/RestconfApiCallNode.java @@ -54,6 +54,7 @@ import java.util.Map; import static java.lang.String.format; import static org.apache.commons.lang3.StringUtils.join; +import static org.onap.ccsdk.sli.plugins.restapicall.HttpMethod.PATCH; import static org.onap.ccsdk.sli.plugins.restapicall.HttpMethod.POST; import static org.onap.ccsdk.sli.plugins.restapicall.HttpMethod.PUT; import static org.onap.ccsdk.sli.plugins.restapicall.RestapiCallNode.parseParam; @@ -153,7 +154,8 @@ public class RestconfApiCallNode implements SvcLogicJavaPlugin { InstanceIdentifierContext<?> insIdCtx = getInsIdCtx(p, uri); String req = null; - if (p.httpMethod == POST || p.httpMethod == PUT) { + if (p.httpMethod == POST || p.httpMethod == PUT + || p.httpMethod == PATCH) { req = serializeRequest(props, p, uri, insIdCtx); } if (req == null && p.requestBody != null) { @@ -181,8 +183,8 @@ public class RestconfApiCallNode implements SvcLogicJavaPlugin { log.error(REQ_ERR + e.getMessage(), e); String prefix = parseParam(paramMap, RES_PRE, false, null); - if (retryPolicy == null || shouldRetry == false) { - setFailureResponseStatus(ctx, prefix, e.getMessage(), r); + if (retryPolicy == null || !shouldRetry) { + setFailureResponseStatus(ctx, prefix, e.getMessage()); } else { if (retryCount == null) { retryCount = 0; @@ -198,12 +200,11 @@ public class RestconfApiCallNode implements SvcLogicJavaPlugin { sendRequest(paramMap, ctx, retryCount); } else { log.debug(MAX_RETRY_ERR); - setFailureResponseStatus(ctx, prefix, - e.getMessage(), r); + setFailureResponseStatus(ctx, prefix, e.getMessage()); } } catch (Exception ex) { log.error(NO_MORE_RETRY, ex); - setFailureResponseStatus(ctx, prefix, RETRY_FAIL, r); + setFailureResponseStatus(ctx, prefix, RETRY_FAIL); } } } @@ -338,11 +339,10 @@ public class RestconfApiCallNode implements SvcLogicJavaPlugin { * @param ctx service logic context * @param prefix prefix to be added * @param errMsg error message - * @param res http response */ private void setFailureResponseStatus(SvcLogicContext ctx, String prefix, - String errMsg, HttpResponse res) { - res = new HttpResponse(); + String errMsg) { + HttpResponse res = new HttpResponse(); res.code = 500; res.message = errMsg; ctx.setAttribute(prefix + RES_CODE, String.valueOf(res.code)); diff --git a/restconf-client/provider/src/main/java/org/onap/ccsdk/sli/plugins/restconfapicall/RestconfApiUtils.java b/restconf-client/provider/src/main/java/org/onap/ccsdk/sli/plugins/restconfapicall/RestconfApiUtils.java index 0f9c9401c..b51272f7e 100644 --- a/restconf-client/provider/src/main/java/org/onap/ccsdk/sli/plugins/restconfapicall/RestconfApiUtils.java +++ b/restconf-client/provider/src/main/java/org/onap/ccsdk/sli/plugins/restconfapicall/RestconfApiUtils.java @@ -97,8 +97,6 @@ public final class RestconfApiUtils { private static final String URL_SYNTAX = "The following URL cannot be " + "parsed into URI : "; - private static final String RESTCONF_PATH = "/restconf/operations/"; - private static final String PUT_NODE_ERR = "The following URL does not " + "contain minimum two nodes for PUT operation."; @@ -136,7 +134,7 @@ public final class RestconfApiUtils { * @return YANG path pointing to parent * @throws SvcLogicException when parsing the URL fails */ - static String parseUrl(String url, HttpMethod method) + public static String parseUrl(String url, HttpMethod method) throws SvcLogicException { URI uri; try { @@ -146,9 +144,7 @@ public final class RestconfApiUtils { } String path = uri.getPath(); - if (path.contains(RESTCONF_PATH)) { - path = path.replaceFirst(RESTCONF_PATH, ""); - } + path = getParsedPath(path); if (method == PUT) { if (!path.contains(SLASH)) { throw new SvcLogicException(PUT_NODE_ERR + url); @@ -159,6 +155,27 @@ public final class RestconfApiUtils { } /** + * Returns the path which contains only the schema nodes. + * + * @param path path + * @return path representing schema + */ + private static String getParsedPath(String path) { + String firstHalf; + if (path.contains(":")) { + String[] p = path.split(":"); + if (p[0].contains(SLASH)) { + int slash = p[0].lastIndexOf(SLASH); + firstHalf = p[0].substring(slash + 1); + } else { + firstHalf = p[0]; + } + return firstHalf + ":" + p[1]; + } + return path; + } + + /** * Returns the schema context of the YANG files present in a directory. * * @param di directory path diff --git a/restconf-client/provider/src/main/java/org/onap/ccsdk/sli/plugins/yangserializers/dfserializer/MdsalSerializerHelper.java b/restconf-client/provider/src/main/java/org/onap/ccsdk/sli/plugins/yangserializers/dfserializer/MdsalSerializerHelper.java index 6f9f9070a..1fd0d2dee 100644 --- a/restconf-client/provider/src/main/java/org/onap/ccsdk/sli/plugins/yangserializers/dfserializer/MdsalSerializerHelper.java +++ b/restconf-client/provider/src/main/java/org/onap/ccsdk/sli/plugins/yangserializers/dfserializer/MdsalSerializerHelper.java @@ -274,11 +274,12 @@ public class MdsalSerializerHelper extends SerializerHelper<SchemaNode, SchemaCo if (curSchemaNode instanceof DataSchemaNode) { Deque<DataSchemaNode> dataSchema = findSchemaNodeByNameAndNamespace( (DataSchemaNode) curSchemaNode, name, namespace.moduleNs()); + if (dataSchema != null && !dataSchema.isEmpty()) { childNode = dataSchema.pop(); } - if (!dataSchema.isEmpty()) { + if (dataSchema != null && !dataSchema.isEmpty()) { childNode = findSchemaForChild(((ChoiceSchemaNode) childNode), qname); } diff --git a/restconf-client/provider/src/test/java/org/onap/ccsdk/sli/plugins/yangserializers/dfserializer/DataFormatSerializerTest.java b/restconf-client/provider/src/test/java/org/onap/ccsdk/sli/plugins/yangserializers/dfserializer/DataFormatSerializerTest.java index 0f46d625b..6c11206c9 100644 --- a/restconf-client/provider/src/test/java/org/onap/ccsdk/sli/plugins/yangserializers/dfserializer/DataFormatSerializerTest.java +++ b/restconf-client/provider/src/test/java/org/onap/ccsdk/sli/plugins/yangserializers/dfserializer/DataFormatSerializerTest.java @@ -41,6 +41,10 @@ import static org.mockito.Mockito.doAnswer; import static org.mockito.Mockito.doCallRealMethod; import static org.mockito.Mockito.doReturn; import static org.mockito.Mockito.mock; +import static org.onap.ccsdk.sli.plugins.restapicall.HttpMethod.GET; +import static org.onap.ccsdk.sli.plugins.restapicall.HttpMethod.POST; +import static org.onap.ccsdk.sli.plugins.restapicall.HttpMethod.PUT; +import static org.onap.ccsdk.sli.plugins.restconfapicall.RestconfApiUtils.parseUrl; import static org.onap.ccsdk.sli.plugins.yangserializers.dfserializer.DataFormatUtilsTest.DECODE_FROM_JSON_RPC; import static org.onap.ccsdk.sli.plugins.yangserializers.dfserializer.DataFormatUtilsTest.DECODE_FROM_XML_RPC; import static org.onap.ccsdk.sli.plugins.yangserializers.dfserializer.DataFormatUtilsTest.ENCODE_TO_JSON_ID; @@ -317,6 +321,51 @@ public class DataFormatSerializerTest { } /** + * Verifies URL parser returning path with only schema information for all + * kind of URL. + * + * @throws SvcLogicException when test case fails + */ + @Test + public void validateUrlParser() throws SvcLogicException { + String actVal = "identity-test:test"; + String url1 = "http://echo.getpostman.com/restconf/operations/" + + actVal; + String url2 = "http://echo.getpostman.com/restconf/data/" + actVal; + String url3 = "https://echo.getpostman.com/restconf/operations/" + + actVal; + String url4 = "https://echo.getpostman.com/restconf/data/" + actVal + + "/for-put"; + String url5 = "http://localhost:8282/restconf/operations/" + actVal; + String url6 = "https://localhost:8282/restconf/operations/" + actVal; + String url7 = "http://localhost:8282/restconf/data/" + actVal + + "/for-put"; + String url8 = "https://localhost:8282/restconf/data/" + actVal; + String url9 = "http://182.2.61.24:2250/restconf/data/" + actVal; + String url10 = "https://182.2.61.24:2250/restconf/operations/" + actVal; + String val1 = parseUrl(url1, POST); + String val2 = parseUrl(url2, GET); + String val3 = parseUrl(url3, POST); + String val4 = parseUrl(url4, PUT); + String val5 = parseUrl(url5, GET); + String val6 = parseUrl(url6, POST); + String val7 = parseUrl(url7, PUT); + String val8 = parseUrl(url8, POST); + String val9 = parseUrl(url9, GET); + String val10 = parseUrl(url10, POST); + assertThat(val1, is(actVal)); + assertThat(val2, is(actVal)); + assertThat(val3, is(actVal)); + assertThat(val4, is(actVal)); + assertThat(val5, is(actVal)); + assertThat(val6, is(actVal)); + assertThat(val7, is(actVal)); + assertThat(val8, is(actVal)); + assertThat(val9, is(actVal)); + assertThat(val10, is(actVal)); + } + + /** * Creates attribute list for encoding JSON or XML with identity-ref YANG * file. * diff --git a/sshapi-call-node/features/ccsdk-sshapi-call-node/pom.xml b/sshapi-call-node/features/ccsdk-sshapi-call-node/pom.xml index 7b74d6de9..9220b1f78 100644 --- a/sshapi-call-node/features/ccsdk-sshapi-call-node/pom.xml +++ b/sshapi-call-node/features/ccsdk-sshapi-call-node/pom.xml @@ -7,17 +7,19 @@ <parent> <groupId>org.onap.ccsdk.parent</groupId> <artifactId>single-feature-parent</artifactId> - <version>1.1.0-SNAPSHOT</version> + <version>1.1.1-SNAPSHOT</version> <relativePath /> </parent> <groupId>org.onap.ccsdk.sli.plugins</groupId> <artifactId>ccsdk-sshapi-call-node</artifactId> - <version>0.3.0-SNAPSHOT</version> + <version>0.3.1-SNAPSHOT</version> <packaging>feature</packaging> <name>ccsdk-sli-plugins :: sshapi-call-node :: ${project.artifactId}</name> + + <dependencyManagement> <dependencies> <dependency> diff --git a/sshapi-call-node/features/features-sshapi-call-node/pom.xml b/sshapi-call-node/features/features-sshapi-call-node/pom.xml index a37ac6172..dc924244a 100644 --- a/sshapi-call-node/features/features-sshapi-call-node/pom.xml +++ b/sshapi-call-node/features/features-sshapi-call-node/pom.xml @@ -7,13 +7,13 @@ <parent> <groupId>org.onap.ccsdk.parent</groupId> <artifactId>feature-repo-parent</artifactId> - <version>1.1.0-SNAPSHOT</version> + <version>1.1.1-SNAPSHOT</version> <relativePath/> </parent> <groupId>org.onap.ccsdk.sli.plugins</groupId> <artifactId>features-sshapi-call-node</artifactId> - <version>0.3.0-SNAPSHOT</version> + <version>0.3.1-SNAPSHOT</version> <packaging>feature</packaging> <name>ccsdk-sli-plugins :: sshapi-call-node :: ${project.artifactId}</name> diff --git a/sshapi-call-node/features/pom.xml b/sshapi-call-node/features/pom.xml index 49b96e3fd..82e69b9b6 100755 --- a/sshapi-call-node/features/pom.xml +++ b/sshapi-call-node/features/pom.xml @@ -7,12 +7,12 @@ <parent> <groupId>org.onap.ccsdk.parent</groupId> <artifactId>odlparent-lite</artifactId> - <version>1.1.0-SNAPSHOT</version> + <version>1.1.1-SNAPSHOT</version> </parent> <groupId>org.onap.ccsdk.sli.plugins</groupId> <artifactId>sshapi-call-node-features</artifactId> - <version>0.3.0-SNAPSHOT</version> + <version>0.3.1-SNAPSHOT</version> <packaging>pom</packaging> <name>ccsdk-sli-plugins :: sshapi-call-node :: ${project.artifactId}</name> diff --git a/sshapi-call-node/installer/pom.xml b/sshapi-call-node/installer/pom.xml index 51bed972f..9d570fd36 100755 --- a/sshapi-call-node/installer/pom.xml +++ b/sshapi-call-node/installer/pom.xml @@ -5,12 +5,12 @@ <parent> <groupId>org.onap.ccsdk.parent</groupId> <artifactId>odlparent-lite</artifactId> - <version>1.1.0-SNAPSHOT</version> + <version>1.1.1-SNAPSHOT</version> </parent> <groupId>org.onap.ccsdk.sli.plugins</groupId> <artifactId>sshapi-call-node-installer</artifactId> - <version>0.3.0-SNAPSHOT</version> + <version>0.3.1-SNAPSHOT</version> <packaging>pom</packaging> <name>ccsdk-sli-plugins :: sshapi-call-node :: ${project.artifactId}</name> diff --git a/sshapi-call-node/pom.xml b/sshapi-call-node/pom.xml index 91b52e123..7dda908e5 100755 --- a/sshapi-call-node/pom.xml +++ b/sshapi-call-node/pom.xml @@ -5,12 +5,12 @@ <parent> <groupId>org.onap.ccsdk.parent</groupId> <artifactId>odlparent-lite</artifactId> - <version>1.1.0-SNAPSHOT</version> + <version>1.1.1-SNAPSHOT</version> </parent> <groupId>org.onap.ccsdk.sli.plugins</groupId> <artifactId>sshapi-call-node</artifactId> - <version>0.3.0-SNAPSHOT</version> + <version>0.3.1-SNAPSHOT</version> <packaging>pom</packaging> <name>ccsdk-sli-plugins :: sshapi-call-node</name> diff --git a/sshapi-call-node/provider/pom.xml b/sshapi-call-node/provider/pom.xml index d37972efc..e4619ca04 100755 --- a/sshapi-call-node/provider/pom.xml +++ b/sshapi-call-node/provider/pom.xml @@ -5,12 +5,12 @@ <parent> <groupId>org.onap.ccsdk.parent</groupId> <artifactId>binding-parent</artifactId> - <version>1.1.0-SNAPSHOT</version> + <version>1.1.1-SNAPSHOT</version> </parent> <groupId>org.onap.ccsdk.sli.plugins</groupId> <artifactId>sshapi-call-node-provider</artifactId> - <version>0.3.0-SNAPSHOT</version> + <version>0.3.1-SNAPSHOT</version> <packaging>bundle</packaging> <name>ccsdk-sli-plugins :: sshapi-call-node :: ${project.artifactId}</name> diff --git a/template-node/features/ccsdk-template-node/pom.xml b/template-node/features/ccsdk-template-node/pom.xml index fd3a92457..b7d329e59 100644 --- a/template-node/features/ccsdk-template-node/pom.xml +++ b/template-node/features/ccsdk-template-node/pom.xml @@ -5,18 +5,15 @@ <parent> <groupId>org.onap.ccsdk.parent</groupId> <artifactId>single-feature-parent</artifactId> - <version>1.1.0-SNAPSHOT</version> + <version>1.1.1-SNAPSHOT</version> <relativePath /> </parent> <groupId>org.onap.ccsdk.sli.plugins</groupId> <artifactId>ccsdk-template-node</artifactId> - <version>0.3.3-SNAPSHOT</version> + <version>0.3.1-SNAPSHOT</version> <packaging>feature</packaging> - <properties> - <skip.karaf.featureTest>true</skip.karaf.featureTest> - </properties> <dependencies> <dependency> diff --git a/template-node/features/features-template-node/pom.xml b/template-node/features/features-template-node/pom.xml index c352ba514..021e5921b 100644 --- a/template-node/features/features-template-node/pom.xml +++ b/template-node/features/features-template-node/pom.xml @@ -5,13 +5,13 @@ <parent> <groupId>org.onap.ccsdk.parent</groupId> <artifactId>feature-repo-parent</artifactId> - <version>1.1.0-SNAPSHOT</version> + <version>1.1.1-SNAPSHOT</version> <relativePath/> </parent> <groupId>org.onap.ccsdk.sli.plugins</groupId> <artifactId>features-template-node</artifactId> - <version>0.3.3-SNAPSHOT</version> + <version>0.3.1-SNAPSHOT</version> <packaging>feature</packaging> <dependencies> diff --git a/template-node/features/pom.xml b/template-node/features/pom.xml index 1abcdbe3e..c918417ca 100644 --- a/template-node/features/pom.xml +++ b/template-node/features/pom.xml @@ -5,12 +5,12 @@ <parent> <groupId>org.onap.ccsdk.parent</groupId> <artifactId>odlparent-lite</artifactId> - <version>1.1.0-SNAPSHOT</version> + <version>1.1.1-SNAPSHOT</version> </parent> <groupId>org.onap.ccsdk.sli.plugins</groupId> <artifactId>template-node-features</artifactId> - <version>0.3.3-SNAPSHOT</version> + <version>0.3.1-SNAPSHOT</version> <packaging>pom</packaging> <modules> diff --git a/template-node/installer/pom.xml b/template-node/installer/pom.xml index 1e4d24cd3..f588f49ce 100644 --- a/template-node/installer/pom.xml +++ b/template-node/installer/pom.xml @@ -5,12 +5,12 @@ <parent> <groupId>org.onap.ccsdk.parent</groupId> <artifactId>odlparent-lite</artifactId> - <version>1.1.0-SNAPSHOT</version> + <version>1.1.1-SNAPSHOT</version> </parent> <groupId>org.onap.ccsdk.sli.plugins</groupId> <artifactId>template-node-installer</artifactId> - <version>0.3.3-SNAPSHOT</version> + <version>0.3.1-SNAPSHOT</version> <packaging>pom</packaging> <properties> diff --git a/template-node/pom.xml b/template-node/pom.xml index 21ab127f3..c2668f869 100644 --- a/template-node/pom.xml +++ b/template-node/pom.xml @@ -5,12 +5,12 @@ <parent> <groupId>org.onap.ccsdk.parent</groupId> <artifactId>odlparent-lite</artifactId> - <version>1.1.0-SNAPSHOT</version> + <version>1.1.1-SNAPSHOT</version> </parent> <groupId>org.onap.ccsdk.sli.plugins</groupId> <artifactId>template-node</artifactId> - <version>0.3.3-SNAPSHOT</version> + <version>0.3.1-SNAPSHOT</version> <packaging>pom</packaging> <modules> diff --git a/template-node/provider/pom.xml b/template-node/provider/pom.xml index 936f76f37..fa2ba9d91 100644 --- a/template-node/provider/pom.xml +++ b/template-node/provider/pom.xml @@ -5,12 +5,12 @@ <parent> <groupId>org.onap.ccsdk.parent</groupId> <artifactId>binding-parent</artifactId> - <version>1.1.0-SNAPSHOT</version> + <version>1.1.1-SNAPSHOT</version> </parent> <groupId>org.onap.ccsdk.sli.plugins</groupId> <artifactId>template-node-provider</artifactId> - <version>0.3.3-SNAPSHOT</version> + <version>0.3.1-SNAPSHOT</version> <packaging>bundle</packaging> <dependencies> diff --git a/version.properties b/version.properties index 53760c8c7..1c849dae1 100644 --- a/version.properties +++ b/version.properties @@ -7,7 +7,7 @@ release_name=0 sprint_number=3 -feature_revision=0 +feature_revision=1 base_version=${release_name}.${sprint_number}.${feature_revision} |