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 051f3a46..d4715be6 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 0b43d1a0..b3333b60 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 050d3e9d..c2b77d0f 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 3ac87bf6..257627da 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 fd38cb22..744d6d89 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 e8f168e2..0f1b28c8 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 dd0e824f..32e139b4 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 965bdbb7..0a6918a3 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 eb7dcbb5..25c2cf22 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 a9a3c94d..7f935234 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 822a6d1e..2c616a29 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 dfcef32f..8160611d 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 14e9ae02..55e0945e 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 8e2f402e..acb6ae89 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 641bcc86..f704647a 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 942c4f32..035f2fcf 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 1877f19d..03d93529 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 8ee5e7e2..166ddc53 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 c94be00b..6aa3fde8 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 b28cefde..fd675c80 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 fecbd2b9..fccd697b 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 db0bee06..ac5c4cc3 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 f9a1ecbf..91ce3338 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 0f9c9401..b51272f7 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 6f9f9070..1fd0d2de 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 0f46d625..6c11206c 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 7b74d6de..9220b1f7 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 a37ac617..dc924244 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 49b96e3f..82e69b9b 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 51bed972..9d570fd3 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 91b52e12..7dda908e 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 d37972ef..e4619ca0 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 fd3a9245..b7d329e5 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 c352ba51..021e5921 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 1abcdbe3..c918417c 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 1e4d24cd..f588f49c 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 21ab127f..c2668f86 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 936f76f3..fa2ba9d9 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 53760c8c..1c849dae 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} |