From d7d5ea0fe2e9bf6c5222174df2bdd80192b9d6ee Mon Sep 17 00:00:00 2001 From: gaurav Date: Wed, 18 Jul 2018 19:39:10 +0530 Subject: API for RestconfClient API for RestconfClient including: - RestconfApiCallNode - RestconfDiscoveryNode Change-Id: Ieda6251b91b6d399cd0106993c3fdd1a440d5b0a Issue-ID: CCSDK-371 Signed-off-by: Gaurav Agrawal --- restconf-client/provider/pom.xml | 73 ++++++++++++++ .../restconfapicall/RestconfapiCallNode.java | 65 ++++++++++++ .../restconfdiscovery/RestconfDiscoveryNode.java | 25 +++++ .../restconfdiscovery/SvcLogicDiscoveryPlugin.java | 110 +++++++++++++++++++++ .../META-INF/spring/restconf-client-context.xml | 48 +++++++++ .../spring/restconf-client-osgi-context.xml | 32 ++++++ .../blueprint/restconf-client-blueprint.xml | 41 ++++++++ 7 files changed, 394 insertions(+) create mode 100755 restconf-client/provider/pom.xml create mode 100644 restconf-client/provider/src/main/java/org/onap/ccsdk/sli/plugins/restconfapicall/RestconfapiCallNode.java create mode 100644 restconf-client/provider/src/main/java/org/onap/ccsdk/sli/plugins/restconfdiscovery/RestconfDiscoveryNode.java create mode 100644 restconf-client/provider/src/main/java/org/onap/ccsdk/sli/plugins/restconfdiscovery/SvcLogicDiscoveryPlugin.java create mode 100644 restconf-client/provider/src/main/resources/META-INF/spring/restconf-client-context.xml create mode 100644 restconf-client/provider/src/main/resources/META-INF/spring/restconf-client-osgi-context.xml create mode 100755 restconf-client/provider/src/main/resources/org/opendaylight/blueprint/restconf-client-blueprint.xml (limited to 'restconf-client/provider') diff --git a/restconf-client/provider/pom.xml b/restconf-client/provider/pom.xml new file mode 100755 index 000000000..776240e0c --- /dev/null +++ b/restconf-client/provider/pom.xml @@ -0,0 +1,73 @@ + + + 4.0.0 + + + org.onap.ccsdk.parent + binding-parent + 1.1.0-SNAPSHOT + + + org.onap.ccsdk.sli.plugins + restconf-client-provider + 0.3.0-SNAPSHOT + bundle + + ccsdk-sli-plugins :: restconf-client :: ${project.artifactId} + http://maven.apache.org + + + UTF-8 + + + + + junit + junit + test + + + org.springframework + spring-test + test + + + org.onap.ccsdk.sli.core + sli-common + + + org.onap.ccsdk.sli.core + sli-provider + + + org.slf4j + slf4j-api + + + org.springframework + spring-beans + + + org.springframework + spring-context + + + com.sun.jersey + jersey-client + + + com.sun.jersey.contribs.jersey-oauth + oauth-signature + ${jersey.version} + + + com.sun.jersey.contribs.jersey-oauth + oauth-client + ${jersey.version} + + + org.codehaus.jettison + jettison + + + 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 new file mode 100644 index 000000000..87cb92bc5 --- /dev/null +++ b/restconf-client/provider/src/main/java/org/onap/ccsdk/sli/plugins/restconfapicall/RestconfapiCallNode.java @@ -0,0 +1,65 @@ +/*- + * ============LICENSE_START======================================================= + * ONAP - CCSDK + * ================================================================================ + * Copyright (C) 2018 Huawei Technologies Co., Ltd. All rights reserved. + * ================================================================================ + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============LICENSE_END========================================================= + */ + +package org.onap.ccsdk.sli.plugins.restconfapicall; + +import java.util.Map; +import org.onap.ccsdk.sli.core.sli.SvcLogicContext; +import org.onap.ccsdk.sli.core.sli.SvcLogicException; +import org.onap.ccsdk.sli.core.sli.SvcLogicJavaPlugin; + +/** + * Representation of a plugin to enable RESTCONF based CRUD operations from DG. + */ +public class RestconfapiCallNode implements SvcLogicJavaPlugin { + + public RestconfapiCallNode() { + } + + /** + * Allows Directed Graphs the ability to interact with RESTCONF APIs. + * @param parameters HashMap of parameters passed by the DG to this function + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + *
parameterMandatory/Optionaldescriptionexample values
templateFileNameOptionalfull path to YANG directory that can be used to build a request/sdncopt/bvc/resconfapi/test
restapiUrlMandatoryurl to send the request tohttps://sdncodl:8543/restconf/operations/L3VNF-API:create-update-vnf-request
restapiUserOptionaluser name to use for http basic authenticationsdnc_ws
restapiPasswordOptionalunencrypted password to use for http basic authenticationplain_password
contentTypeOptionalhttp content type to set in the http headerusually application/json or application/xml
formatOptionalshould match request body formatjson or xml
httpMethodOptionalhttp method to use when sending the requestget post put delete patch
responsePrefixOptionallocation the response will be written to in context memorytmp.resconftapi.result
skipSendingOptionaltrue or false
convertResponse Optionalwhether the response should be convertedtrue or false
customHttpHeadersOptionala list additional http headers to be passed in, follow the format in the exampleX-CSI-MessageId=messageId,headerFieldName=headerFieldValue
dumpHeadersOptionalwhen true writes http header content to context memorytrue or false
+ * @param ctx Reference to context memory + * @throws SvcLogicException + * @since 11.0.2 + * @see String#split(String, int) + */ + public void sendRequest(Map paramMap, SvcLogicContext ctx) throws SvcLogicException { + //TODO + } + +} diff --git a/restconf-client/provider/src/main/java/org/onap/ccsdk/sli/plugins/restconfdiscovery/RestconfDiscoveryNode.java b/restconf-client/provider/src/main/java/org/onap/ccsdk/sli/plugins/restconfdiscovery/RestconfDiscoveryNode.java new file mode 100644 index 000000000..9eaa67916 --- /dev/null +++ b/restconf-client/provider/src/main/java/org/onap/ccsdk/sli/plugins/restconfdiscovery/RestconfDiscoveryNode.java @@ -0,0 +1,25 @@ +package org.onap.ccsdk.sli.plugins.restconfdiscovery; + +import java.util.Map; +import org.onap.ccsdk.sli.core.sli.SvcLogicContext; + +/** + * Created by root1 on 18/7/18. + */ +public class RestconfDiscoveryNode implements SvcLogicDiscoveryPlugin { + + @Override + public void establishSubscription(Map paramMap, SvcLogicContext ctx) { + + } + + @Override + public void modifySubscription(Map paramMap, SvcLogicContext ctx) { + + } + + @Override + public void deleteSubscription(Map paramMap, SvcLogicContext ctx) { + + } +} diff --git a/restconf-client/provider/src/main/java/org/onap/ccsdk/sli/plugins/restconfdiscovery/SvcLogicDiscoveryPlugin.java b/restconf-client/provider/src/main/java/org/onap/ccsdk/sli/plugins/restconfdiscovery/SvcLogicDiscoveryPlugin.java new file mode 100644 index 000000000..183d22297 --- /dev/null +++ b/restconf-client/provider/src/main/java/org/onap/ccsdk/sli/plugins/restconfdiscovery/SvcLogicDiscoveryPlugin.java @@ -0,0 +1,110 @@ +/*- + * ============LICENSE_START======================================================= + * ONAP - CCSDK + * ================================================================================ + * Copyright (C) 2018 Huawei Technologies Co., Ltd. All rights reserved. + * ================================================================================ + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============LICENSE_END========================================================= + */ + +package org.onap.ccsdk.sli.plugins.restconfdiscovery; + +import java.util.Map; +import org.onap.ccsdk.sli.core.sli.SvcLogicContext; +import org.onap.ccsdk.sli.core.sli.SvcLogicException; +import org.onap.ccsdk.sli.core.sli.SvcLogicJavaPlugin; + +/** + * Abstraction of a plugin to enable discovery from DG. + */ +public interface SvcLogicDiscoveryPlugin extends SvcLogicJavaPlugin { + + /** + * Allows directed graphs to establish a discovery subscription for a given subscriber. + * @param paramMap HashMap of parameters passed by the DG to this function + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + *
parameterMandatory/Optionaldescriptionexample values
templateDirNameOptionalfull path to YANG directory that can be used to build a request/sdncopt/bvc/resconfapi/test
establishSubscriptionURLMandatoryurl to establish connection with serverhttps://127.0.0.1:8181/restconf/operations/ietf-subscribed-notifications:establish-subscription
sseConnectURLMandatoryurl to setup SSE connection with serverhttps://127.0.0.1:8181/restconf/streams/yang-push-json
callbackDGMandatorycallback DG to process the received notificationResource-Discovery:handleSOTNTopology
filterURLOptionalurl which needs to be subscribed, if null subscribe to allhttp://example.com/sample-data/1.0
subscriptionTypeOptionaltype of subscription, periodic or onDataChangeonDataChange
updateFrequencyOptionalupdate frequency in milli seconds when subscription type is periodic1000
restapiUserOptionaluser name to use for http basic authenticationsdnc_ws
restapiPasswordOptionalunencrypted password to use for http basic authenticationplain_password
contentTypeOptionalhttp content type to set in the http headerusually application/json or application/xml
formatOptionalshould match request body formatjson or xml
responsePrefixOptionallocation the notification response will be written to in context memorytmp.restconfdiscovery.result
skipSendingOptionaltrue or false
convertResponse Optionalwhether the response should be convertedtrue or false
customHttpHeadersOptionala list additional http headers to be passed in, follow the format in the exampleX-CSI-MessageId=messageId,headerFieldName=headerFieldValue
dumpHeadersOptionalwhen true writes http header content to context memorytrue or false
+ * @param ctx Reference to context memory + * @throws SvcLogicException + * @since 11.0.2 + * @see String#split(String, int) + */ + void establishSubscription(Map paramMap, SvcLogicContext ctx); + + /** + * Allows directed graphs to modify a discovery subscription for a given subscriber. + * @param paramMap HashMap of parameters passed by the DG to this function + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + *
parameterMandatory/Optionaldescriptionexample values
subscriberIdMandatorysubscription subscriber's identifiertopologyId/1111
templateDirNameOptionalfull path to YANG directory that can be used to build a request/sdncopt/bvc/resconfapi/test
establishSubscriptionURLMandatoryurl to establish connection with serverhttps://127.0.0.1:8181/restconf/operations/ietf-subscribed-notifications:establish-subscription
sseConnectURLMandatoryurl to setup SSE connection with serverhttps://127.0.0.1:8181/restconf/streams/yang-push-json
callbackDGMandatorycallback DG to process the received notificationResource-Discovery:handleSOTNTopology
filterURLOptionalurl filter list which needs to be subscribed, if null subscribe to allhttp://example.com/sample-data/1.0
subscriptionTypeOptionaltype of subscription, periodic or onDataChangeonDataChange
updateFrequencyOptionalupdate frequency in milli seconds when subscription type is periodic1000
restapiUserOptionaluser name to use for http basic authenticationsdnc_ws
restapiPasswordOptionalunencrypted password to use for http basic authenticationplain_password
contentTypeOptionalhttp content type to set in the http headerusually application/json or application/xml
formatOptionalshould match request body formatjson or xml
responsePrefixOptionallocation the notification response will be written to in context memorytmp.restconfdiscovery.result
skipSendingOptionaltrue or false
convertResponse Optionalwhether the response should be convertedtrue or false
customHttpHeadersOptionala list additional http headers to be passed in, follow the format in the exampleX-CSI-MessageId=messageId,headerFieldName=headerFieldValue
dumpHeadersOptionalwhen true writes http header content to context memorytrue or false
+ * @param ctx Reference to context memory + * @throws SvcLogicException + * @since 11.0.2 + * @see String#split(String, int) + */ + void modifySubscription(Map paramMap, SvcLogicContext ctx); + + /** + * Allows directed graphs to delete the discovery subscription for a given subscriber. + * @param paramMap HashMap of parameters passed by the DG to this function + * + * + * + * + * + *
parameterMandatory/Optionaldescriptionexample values
subscriberIdMandatorysubscription subscriber's identifiertopologyId/1111
+ * @param ctx Reference to context memory + * @throws SvcLogicException + */ + void deleteSubscription(Map paramMap, SvcLogicContext ctx); + +} diff --git a/restconf-client/provider/src/main/resources/META-INF/spring/restconf-client-context.xml b/restconf-client/provider/src/main/resources/META-INF/spring/restconf-client-context.xml new file mode 100644 index 000000000..d7fa61c55 --- /dev/null +++ b/restconf-client/provider/src/main/resources/META-INF/spring/restconf-client-context.xml @@ -0,0 +1,48 @@ + + + + + + + + + file:${SDNC_CONFIG_DIR}/ueb.properties + file:${SDNC_CONFIG_DIR}/dme2.properties + + + + + + + + + + + + + + + + + diff --git a/restconf-client/provider/src/main/resources/META-INF/spring/restconf-client-osgi-context.xml b/restconf-client/provider/src/main/resources/META-INF/spring/restconf-client-osgi-context.xml new file mode 100644 index 000000000..d56e2fc11 --- /dev/null +++ b/restconf-client/provider/src/main/resources/META-INF/spring/restconf-client-osgi-context.xml @@ -0,0 +1,32 @@ + + + + + + + + + diff --git a/restconf-client/provider/src/main/resources/org/opendaylight/blueprint/restconf-client-blueprint.xml b/restconf-client/provider/src/main/resources/org/opendaylight/blueprint/restconf-client-blueprint.xml new file mode 100755 index 000000000..149ed9fcf --- /dev/null +++ b/restconf-client/provider/src/main/resources/org/opendaylight/blueprint/restconf-client-blueprint.xml @@ -0,0 +1,41 @@ + + + + + + + + + + + org.onap.ccsdk.sli.plugins.restconfapicall.RestconfapiCallNode + + + + + + org.onap.ccsdk.sli.plugins.restconfdiscovery.RestconfDiscoveryNode + + + + \ No newline at end of file -- cgit 1.2.3-korg From 5ed67078d4ea6822fa2d000d27ff8fca0017b6e8 Mon Sep 17 00:00:00 2001 From: gaurav Date: Mon, 23 Jul 2018 23:36:17 +0530 Subject: Adding APIs for YANG serializers Adding APIs for YANG based data format serializers. Change-Id: I8e17c475e636aa9bbf39be52d31583565bae8e92 Issue-ID: CCSDK-375 Signed-off-by: Gaurav Agrawal --- .../sli/plugins/yangserializers/Annotation.java | 59 ++++++++++++++ .../sli/plugins/yangserializers/DataFormat.java | 29 +++++++ .../yangserializers/DataFormatSerializer.java | 82 +++++++++++++++++++ .../DataFormatSerializerContext.java | 74 +++++++++++++++++ .../plugins/yangserializers/JsonSerializer.java | 49 ++++++++++++ .../sli/plugins/yangserializers/Listener.java | 34 ++++++++ .../yangserializers/MdsalSerializerHelper.java | 67 ++++++++++++++++ .../sli/plugins/yangserializers/NodeType.java | 31 ++++++++ .../plugins/yangserializers/SerializerHelper.java | 93 ++++++++++++++++++++++ .../sli/plugins/yangserializers/XmlSerializer.java | 49 ++++++++++++ 10 files changed, 567 insertions(+) create mode 100644 restconf-client/provider/src/main/java/org/onap/ccsdk/sli/plugins/yangserializers/Annotation.java create mode 100644 restconf-client/provider/src/main/java/org/onap/ccsdk/sli/plugins/yangserializers/DataFormat.java create mode 100644 restconf-client/provider/src/main/java/org/onap/ccsdk/sli/plugins/yangserializers/DataFormatSerializer.java create mode 100644 restconf-client/provider/src/main/java/org/onap/ccsdk/sli/plugins/yangserializers/DataFormatSerializerContext.java create mode 100644 restconf-client/provider/src/main/java/org/onap/ccsdk/sli/plugins/yangserializers/JsonSerializer.java create mode 100644 restconf-client/provider/src/main/java/org/onap/ccsdk/sli/plugins/yangserializers/Listener.java create mode 100644 restconf-client/provider/src/main/java/org/onap/ccsdk/sli/plugins/yangserializers/MdsalSerializerHelper.java create mode 100644 restconf-client/provider/src/main/java/org/onap/ccsdk/sli/plugins/yangserializers/NodeType.java create mode 100644 restconf-client/provider/src/main/java/org/onap/ccsdk/sli/plugins/yangserializers/SerializerHelper.java create mode 100644 restconf-client/provider/src/main/java/org/onap/ccsdk/sli/plugins/yangserializers/XmlSerializer.java (limited to 'restconf-client/provider') diff --git a/restconf-client/provider/src/main/java/org/onap/ccsdk/sli/plugins/yangserializers/Annotation.java b/restconf-client/provider/src/main/java/org/onap/ccsdk/sli/plugins/yangserializers/Annotation.java new file mode 100644 index 000000000..13f1c323b --- /dev/null +++ b/restconf-client/provider/src/main/java/org/onap/ccsdk/sli/plugins/yangserializers/Annotation.java @@ -0,0 +1,59 @@ +/*- + * ============LICENSE_START======================================================= + * ONAP - CCSDK + * ================================================================================ + * Copyright (C) 2018 Huawei Technologies Co., Ltd. All rights reserved. + * ================================================================================ + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============LICENSE_END========================================================= + */ + +package org.onap.ccsdk.sli.plugins.yangserializers; + +/** + * Representation of an entity that represents annotated attribute. + */ +public class Annotation { + + private String name; + private String value; + + /** + * Creates an instance of annotation. + * + * @param n annotation name + * @param v annotation value + */ + public Annotation(String n, String v) { + name = n; + value = v; + } + + /** + * Returns name of annotation. + * + * @return name of annotation + */ + public String name() { + return name; + } + + /** + * Returns value of annotation. + * + * @return value of annotation + */ + public String value() { + return value; + } +} diff --git a/restconf-client/provider/src/main/java/org/onap/ccsdk/sli/plugins/yangserializers/DataFormat.java b/restconf-client/provider/src/main/java/org/onap/ccsdk/sli/plugins/yangserializers/DataFormat.java new file mode 100644 index 000000000..0d1928b35 --- /dev/null +++ b/restconf-client/provider/src/main/java/org/onap/ccsdk/sli/plugins/yangserializers/DataFormat.java @@ -0,0 +1,29 @@ +/*- + * ============LICENSE_START======================================================= + * ONAP - CCSDK + * ================================================================================ + * Copyright (C) 2018 Huawei Technologies Co., Ltd. All rights reserved. + * ================================================================================ + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============LICENSE_END========================================================= + */ + +package org.onap.ccsdk.sli.plugins.yangserializers; + +/** + * Representation of data format. + */ +public enum DataFormat { + XML, + JSON +} diff --git a/restconf-client/provider/src/main/java/org/onap/ccsdk/sli/plugins/yangserializers/DataFormatSerializer.java b/restconf-client/provider/src/main/java/org/onap/ccsdk/sli/plugins/yangserializers/DataFormatSerializer.java new file mode 100644 index 000000000..bcd5991d7 --- /dev/null +++ b/restconf-client/provider/src/main/java/org/onap/ccsdk/sli/plugins/yangserializers/DataFormatSerializer.java @@ -0,0 +1,82 @@ +/*- + * ============LICENSE_START======================================================= + * ONAP - CCSDK + * ================================================================================ + * Copyright (C) 2018 Huawei Technologies Co., Ltd. All rights reserved. + * ================================================================================ + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============LICENSE_END========================================================= + */ + +package org.onap.ccsdk.sli.plugins.yangserializers; + +import java.util.List; +import java.util.Map; + +/** + * Abstraction of serializer to encode/decode context memory parameters + * to/from specified data format. + */ +public abstract class DataFormatSerializer { + + private DataFormat dataFormat; + private DataFormatSerializerContext serializerContext; + + /** + * Creates an instance of data format serializer. + * + * @param dataFormat type of data format + * @param serializerContext data format serializer context + */ + protected DataFormatSerializer(DataFormat dataFormat, + DataFormatSerializerContext serializerContext) { + this.dataFormat = dataFormat; + this.serializerContext = serializerContext; + } + + /** + * Encodes context memory parameters to data format. + * + * @param param context memory parameter + * @param annotations annotations + * @return data format body + */ + public abstract String encode(Map param, + Map> annotations); + + /** + * Decodes data format body to context memory parameters. + * + * @param dataFormatBody abstract node + * @return context memory parameters + */ + public abstract Map decode(String dataFormatBody); + + /** + * Returns data format serializer context. + * + * @return data format serializer context + */ + public DataFormatSerializerContext serializerContext() { + return serializerContext; + } + + /** + * Returns supported data format. + * + * @return supported data format + */ + public DataFormat dataFormat() { + return dataFormat; + } +} \ No newline at end of file diff --git a/restconf-client/provider/src/main/java/org/onap/ccsdk/sli/plugins/yangserializers/DataFormatSerializerContext.java b/restconf-client/provider/src/main/java/org/onap/ccsdk/sli/plugins/yangserializers/DataFormatSerializerContext.java new file mode 100644 index 000000000..50cb2daf6 --- /dev/null +++ b/restconf-client/provider/src/main/java/org/onap/ccsdk/sli/plugins/yangserializers/DataFormatSerializerContext.java @@ -0,0 +1,74 @@ +/*- + * ============LICENSE_START======================================================= + * ONAP - CCSDK + * ================================================================================ + * Copyright (C) 2018 Huawei Technologies Co., Ltd. All rights reserved. + * ================================================================================ + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============LICENSE_END========================================================= + */ + +package org.onap.ccsdk.sli.plugins.yangserializers; + +import java.util.Map; + +/** + * Abstraction of data format serializer context. + */ +public class DataFormatSerializerContext { + + private Listener listener; + private String uri; + private Map protocolAnnotation; + + /** + * Creates an instance of data format serializer context. + * + * @param listener data format listener + * @param uri URI corresponding to instance identifier + * @param protocolAnnotation protocol annotations + */ + public DataFormatSerializerContext(Listener listener, String uri, + Map protocolAnnotation) { + this.listener = listener; + this.uri = uri; + this.protocolAnnotation = protocolAnnotation; + } + + /** + * Retruns data format listener. + * + * @return data format listener + */ + public Listener listener() { + return listener; + } + + /** + * Returns URI. + * + * @return URI + */ + public String uri() { + return uri; + } + + /** + * Returns protocol annotations. + * + * @return protocol annotations + */ + public Map getProtocolAnnotation() { + return protocolAnnotation; + } +} \ No newline at end of file diff --git a/restconf-client/provider/src/main/java/org/onap/ccsdk/sli/plugins/yangserializers/JsonSerializer.java b/restconf-client/provider/src/main/java/org/onap/ccsdk/sli/plugins/yangserializers/JsonSerializer.java new file mode 100644 index 000000000..072cfb09c --- /dev/null +++ b/restconf-client/provider/src/main/java/org/onap/ccsdk/sli/plugins/yangserializers/JsonSerializer.java @@ -0,0 +1,49 @@ +/*- + * ============LICENSE_START======================================================= + * ONAP - CCSDK + * ================================================================================ + * Copyright (C) 2018 Huawei Technologies Co., Ltd. All rights reserved. + * ================================================================================ + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============LICENSE_END========================================================= + */ + +package org.onap.ccsdk.sli.plugins.yangserializers; + +import java.util.List; +import java.util.Map; + +/** + * Representation of JSON serializer. + */ +public class JsonSerializer extends DataFormatSerializer { + + /** + * Creates an instance of data format serializer. + * + * @param serializerContext data format serializer context + */ + protected JsonSerializer(DataFormatSerializerContext serializerContext) { + super(DataFormat.JSON, serializerContext); + } + + @Override + public String encode(Map param, Map> annotations) { + return null; + } + + @Override + public Map decode(String dataFormatBody) { + return null; + } +} diff --git a/restconf-client/provider/src/main/java/org/onap/ccsdk/sli/plugins/yangserializers/Listener.java b/restconf-client/provider/src/main/java/org/onap/ccsdk/sli/plugins/yangserializers/Listener.java new file mode 100644 index 000000000..a0976822e --- /dev/null +++ b/restconf-client/provider/src/main/java/org/onap/ccsdk/sli/plugins/yangserializers/Listener.java @@ -0,0 +1,34 @@ +/*- + * ============LICENSE_START======================================================= + * ONAP - CCSDK + * ================================================================================ + * Copyright (C) 2018 Huawei Technologies Co., Ltd. All rights reserved. + * ================================================================================ + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============LICENSE_END========================================================= + */ + +package org.onap.ccsdk.sli.plugins.yangserializers; + +/** + * Abstraction of listener. + */ +public interface Listener { + + /** + * Returns serializer helper for this listener. + * + * @return serializer helper + */ + SerializerHelper serializerHelper(); +} diff --git a/restconf-client/provider/src/main/java/org/onap/ccsdk/sli/plugins/yangserializers/MdsalSerializerHelper.java b/restconf-client/provider/src/main/java/org/onap/ccsdk/sli/plugins/yangserializers/MdsalSerializerHelper.java new file mode 100644 index 000000000..c9bda511f --- /dev/null +++ b/restconf-client/provider/src/main/java/org/onap/ccsdk/sli/plugins/yangserializers/MdsalSerializerHelper.java @@ -0,0 +1,67 @@ +/*- + * ============LICENSE_START======================================================= + * ONAP - CCSDK + * ================================================================================ + * Copyright (C) 2018 Huawei Technologies Co., Ltd. All rights reserved. + * ================================================================================ + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============LICENSE_END========================================================= + */ + +package org.onap.ccsdk.sli.plugins.yangserializers; + +import java.util.Map; +import org.opendaylight.yangtools.yang.model.api.SchemaNode; + +/** + * Representation of MDSAL based schema helper. + */ +public class MdsalSerializerHelper extends SerializerHelper { + + protected MdsalSerializerHelper(SchemaNode node, String uri) { + super(node, uri); + } + + @Override + public SchemaNode getRootContext() { + return null; + } + + @Override + public SchemaNode getCurContext() { + return null; + } + + @Override + public SchemaNode getChildContext(SchemaNode schemaNode, String name, String namespace) { + return null; + } + + @Override + public NodeType getNodeType(SchemaNode schemaNode) { + return null; + } + + @Override + public void addNode(String name, String namespace, String value, String valNamespace, NodeType type) { + } + + @Override + public void exitNode() { + } + + @Override + public Map getProperties() { + return null; + } +} diff --git a/restconf-client/provider/src/main/java/org/onap/ccsdk/sli/plugins/yangserializers/NodeType.java b/restconf-client/provider/src/main/java/org/onap/ccsdk/sli/plugins/yangserializers/NodeType.java new file mode 100644 index 000000000..5a63d6325 --- /dev/null +++ b/restconf-client/provider/src/main/java/org/onap/ccsdk/sli/plugins/yangserializers/NodeType.java @@ -0,0 +1,31 @@ +/*- + * ============LICENSE_START======================================================= + * ONAP - CCSDK + * ================================================================================ + * Copyright (C) 2018 Huawei Technologies Co., Ltd. All rights reserved. + * ================================================================================ + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============LICENSE_END========================================================= + */ + +package org.onap.ccsdk.sli.plugins.yangserializers; + +/** + * Representation of type of data node. + */ +public enum NodeType { + SINGLE_INSTANCE, + MULTI_INSTANCE, + SINGLE_INSTANCE_LEAF, + MULTI_INSTANCE_LEAF +} diff --git a/restconf-client/provider/src/main/java/org/onap/ccsdk/sli/plugins/yangserializers/SerializerHelper.java b/restconf-client/provider/src/main/java/org/onap/ccsdk/sli/plugins/yangserializers/SerializerHelper.java new file mode 100644 index 000000000..a4bbce529 --- /dev/null +++ b/restconf-client/provider/src/main/java/org/onap/ccsdk/sli/plugins/yangserializers/SerializerHelper.java @@ -0,0 +1,93 @@ +/*- + * ============LICENSE_START======================================================= + * ONAP - CCSDK + * ================================================================================ + * Copyright (C) 2018 Huawei Technologies Co., Ltd. All rights reserved. + * ================================================================================ + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============LICENSE_END========================================================= + */ + +package org.onap.ccsdk.sli.plugins.yangserializers; + +import java.util.Map; + +/** + * Abstraction of an entity which helps the data format serializers to obtain + * schema context details and to build properties from data. + * + * @param type of schema node + */ +public abstract class SerializerHelper { + + private T rootSchema; + private String rootURI; + + protected SerializerHelper(T t, String uri) { + rootSchema = t; + } + + /** + * Returns root schema context node. + * + * @return root schema context node + */ + protected abstract T getRootContext(); + + /** + * Returns current schema context node. + * + * @return current schema context node + */ + protected abstract T getCurContext(); + + /** + * Returns child schema context node. + * + * @return child schema context node + */ + protected abstract T getChildContext(T t, String name, String namespace); + + /** + * Returns type of node + * @param t node + * @return node type + */ + protected abstract NodeType getNodeType(T t); + + /** + * Adds a node to current tree. + * + * @param name name of node + * @param namespace namespace of node, it can be either module name or + * namespace, null indicates parent namespace + * @param value value of node, in case it's leaf/leaf-list node + * @param valNamespace value namespace for identityref, could be module + * name or namespace + * @param type type of node if known like in case of JSON + */ + protected abstract void addNode(String name, String namespace, String value, + String valNamespace, NodeType type); + + /** + * Exits the node, in case if it's leaf node add to properties map. + */ + protected abstract void exitNode(); + + /** + * Returns the properties built corresponding to data. + * + * @return properties map + */ + protected abstract Map getProperties(); +} diff --git a/restconf-client/provider/src/main/java/org/onap/ccsdk/sli/plugins/yangserializers/XmlSerializer.java b/restconf-client/provider/src/main/java/org/onap/ccsdk/sli/plugins/yangserializers/XmlSerializer.java new file mode 100644 index 000000000..ba5d8ed27 --- /dev/null +++ b/restconf-client/provider/src/main/java/org/onap/ccsdk/sli/plugins/yangserializers/XmlSerializer.java @@ -0,0 +1,49 @@ +/*- + * ============LICENSE_START======================================================= + * ONAP - CCSDK + * ================================================================================ + * Copyright (C) 2018 Huawei Technologies Co., Ltd. All rights reserved. + * ================================================================================ + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============LICENSE_END========================================================= + */ + +package org.onap.ccsdk.sli.plugins.yangserializers; + +import java.util.List; +import java.util.Map; + +/** + * Representation of XML serializer. + */ +public class XmlSerializer extends DataFormatSerializer { + + /** + * Creates an instance of XML serializer. + * + * @param serializerContext data format serializer context + */ + protected XmlSerializer(DataFormatSerializerContext serializerContext) { + super(DataFormat.XML, serializerContext); + } + + @Override + public String encode(Map param, Map> annotations) { + return null; + } + + @Override + public Map decode(String dataFormatBody) { + return null; + } +} \ No newline at end of file -- cgit 1.2.3-korg From be3d4606d9627e5dfb461b72140f7be52e1c7776 Mon Sep 17 00:00:00 2001 From: gaurav Date: Wed, 25 Jul 2018 11:33:13 +0530 Subject: Adding additional APIs for YANG serializers Adding APIs for YANG based properties node serializer Change-Id: Ic76204e0292fdbaede4ff47f4ddda91dcfa3b764 Issue-ID: CCSDK-377 Signed-off-by: Gaurav Agrawal --- .../sli/plugins/yangserializers/Annotation.java | 59 ---------- .../sli/plugins/yangserializers/DataFormat.java | 29 ----- .../yangserializers/DataFormatSerializer.java | 82 -------------- .../DataFormatSerializerContext.java | 74 ------------ .../plugins/yangserializers/JsonSerializer.java | 49 -------- .../sli/plugins/yangserializers/Listener.java | 34 ------ .../yangserializers/MdsalSerializerHelper.java | 67 ----------- .../sli/plugins/yangserializers/NodeType.java | 31 ------ .../plugins/yangserializers/SerializerHelper.java | 93 ---------------- .../sli/plugins/yangserializers/XmlSerializer.java | 49 -------- .../yangserializers/dfserializer/Annotation.java | 59 ++++++++++ .../yangserializers/dfserializer/DataFormat.java | 29 +++++ .../dfserializer/DataFormatSerializer.java | 82 ++++++++++++++ .../dfserializer/DataFormatSerializerContext.java | 74 ++++++++++++ .../dfserializer/JsonSerializer.java | 49 ++++++++ .../yangserializers/dfserializer/Listener.java | 34 ++++++ .../dfserializer/MdsalSerializerHelper.java | 67 +++++++++++ .../yangserializers/dfserializer/NodeType.java | 31 ++++++ .../dfserializer/SerializerHelper.java | 93 ++++++++++++++++ .../dfserializer/XmlSerializer.java | 49 ++++++++ .../MdsalPropertiesNodeSerializer.java | 59 ++++++++++ .../yangserializers/pnserializer/NodeType.java | 33 ++++++ .../pnserializer/PropertiesNode.java | 124 +++++++++++++++++++++ .../pnserializer/PropertiesNodeSerializer.java | 108 ++++++++++++++++++ 24 files changed, 891 insertions(+), 567 deletions(-) delete mode 100644 restconf-client/provider/src/main/java/org/onap/ccsdk/sli/plugins/yangserializers/Annotation.java delete mode 100644 restconf-client/provider/src/main/java/org/onap/ccsdk/sli/plugins/yangserializers/DataFormat.java delete mode 100644 restconf-client/provider/src/main/java/org/onap/ccsdk/sli/plugins/yangserializers/DataFormatSerializer.java delete mode 100644 restconf-client/provider/src/main/java/org/onap/ccsdk/sli/plugins/yangserializers/DataFormatSerializerContext.java delete mode 100644 restconf-client/provider/src/main/java/org/onap/ccsdk/sli/plugins/yangserializers/JsonSerializer.java delete mode 100644 restconf-client/provider/src/main/java/org/onap/ccsdk/sli/plugins/yangserializers/Listener.java delete mode 100644 restconf-client/provider/src/main/java/org/onap/ccsdk/sli/plugins/yangserializers/MdsalSerializerHelper.java delete mode 100644 restconf-client/provider/src/main/java/org/onap/ccsdk/sli/plugins/yangserializers/NodeType.java delete mode 100644 restconf-client/provider/src/main/java/org/onap/ccsdk/sli/plugins/yangserializers/SerializerHelper.java delete mode 100644 restconf-client/provider/src/main/java/org/onap/ccsdk/sli/plugins/yangserializers/XmlSerializer.java create mode 100644 restconf-client/provider/src/main/java/org/onap/ccsdk/sli/plugins/yangserializers/dfserializer/Annotation.java create mode 100644 restconf-client/provider/src/main/java/org/onap/ccsdk/sli/plugins/yangserializers/dfserializer/DataFormat.java create mode 100644 restconf-client/provider/src/main/java/org/onap/ccsdk/sli/plugins/yangserializers/dfserializer/DataFormatSerializer.java create mode 100644 restconf-client/provider/src/main/java/org/onap/ccsdk/sli/plugins/yangserializers/dfserializer/DataFormatSerializerContext.java create mode 100644 restconf-client/provider/src/main/java/org/onap/ccsdk/sli/plugins/yangserializers/dfserializer/JsonSerializer.java create mode 100644 restconf-client/provider/src/main/java/org/onap/ccsdk/sli/plugins/yangserializers/dfserializer/Listener.java create mode 100644 restconf-client/provider/src/main/java/org/onap/ccsdk/sli/plugins/yangserializers/dfserializer/MdsalSerializerHelper.java create mode 100644 restconf-client/provider/src/main/java/org/onap/ccsdk/sli/plugins/yangserializers/dfserializer/NodeType.java create mode 100644 restconf-client/provider/src/main/java/org/onap/ccsdk/sli/plugins/yangserializers/dfserializer/SerializerHelper.java create mode 100644 restconf-client/provider/src/main/java/org/onap/ccsdk/sli/plugins/yangserializers/dfserializer/XmlSerializer.java create mode 100644 restconf-client/provider/src/main/java/org/onap/ccsdk/sli/plugins/yangserializers/pnserializer/MdsalPropertiesNodeSerializer.java create mode 100644 restconf-client/provider/src/main/java/org/onap/ccsdk/sli/plugins/yangserializers/pnserializer/NodeType.java create mode 100644 restconf-client/provider/src/main/java/org/onap/ccsdk/sli/plugins/yangserializers/pnserializer/PropertiesNode.java create mode 100644 restconf-client/provider/src/main/java/org/onap/ccsdk/sli/plugins/yangserializers/pnserializer/PropertiesNodeSerializer.java (limited to 'restconf-client/provider') diff --git a/restconf-client/provider/src/main/java/org/onap/ccsdk/sli/plugins/yangserializers/Annotation.java b/restconf-client/provider/src/main/java/org/onap/ccsdk/sli/plugins/yangserializers/Annotation.java deleted file mode 100644 index 13f1c323b..000000000 --- a/restconf-client/provider/src/main/java/org/onap/ccsdk/sli/plugins/yangserializers/Annotation.java +++ /dev/null @@ -1,59 +0,0 @@ -/*- - * ============LICENSE_START======================================================= - * ONAP - CCSDK - * ================================================================================ - * Copyright (C) 2018 Huawei Technologies Co., Ltd. All rights reserved. - * ================================================================================ - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * ============LICENSE_END========================================================= - */ - -package org.onap.ccsdk.sli.plugins.yangserializers; - -/** - * Representation of an entity that represents annotated attribute. - */ -public class Annotation { - - private String name; - private String value; - - /** - * Creates an instance of annotation. - * - * @param n annotation name - * @param v annotation value - */ - public Annotation(String n, String v) { - name = n; - value = v; - } - - /** - * Returns name of annotation. - * - * @return name of annotation - */ - public String name() { - return name; - } - - /** - * Returns value of annotation. - * - * @return value of annotation - */ - public String value() { - return value; - } -} diff --git a/restconf-client/provider/src/main/java/org/onap/ccsdk/sli/plugins/yangserializers/DataFormat.java b/restconf-client/provider/src/main/java/org/onap/ccsdk/sli/plugins/yangserializers/DataFormat.java deleted file mode 100644 index 0d1928b35..000000000 --- a/restconf-client/provider/src/main/java/org/onap/ccsdk/sli/plugins/yangserializers/DataFormat.java +++ /dev/null @@ -1,29 +0,0 @@ -/*- - * ============LICENSE_START======================================================= - * ONAP - CCSDK - * ================================================================================ - * Copyright (C) 2018 Huawei Technologies Co., Ltd. All rights reserved. - * ================================================================================ - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * ============LICENSE_END========================================================= - */ - -package org.onap.ccsdk.sli.plugins.yangserializers; - -/** - * Representation of data format. - */ -public enum DataFormat { - XML, - JSON -} diff --git a/restconf-client/provider/src/main/java/org/onap/ccsdk/sli/plugins/yangserializers/DataFormatSerializer.java b/restconf-client/provider/src/main/java/org/onap/ccsdk/sli/plugins/yangserializers/DataFormatSerializer.java deleted file mode 100644 index bcd5991d7..000000000 --- a/restconf-client/provider/src/main/java/org/onap/ccsdk/sli/plugins/yangserializers/DataFormatSerializer.java +++ /dev/null @@ -1,82 +0,0 @@ -/*- - * ============LICENSE_START======================================================= - * ONAP - CCSDK - * ================================================================================ - * Copyright (C) 2018 Huawei Technologies Co., Ltd. All rights reserved. - * ================================================================================ - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * ============LICENSE_END========================================================= - */ - -package org.onap.ccsdk.sli.plugins.yangserializers; - -import java.util.List; -import java.util.Map; - -/** - * Abstraction of serializer to encode/decode context memory parameters - * to/from specified data format. - */ -public abstract class DataFormatSerializer { - - private DataFormat dataFormat; - private DataFormatSerializerContext serializerContext; - - /** - * Creates an instance of data format serializer. - * - * @param dataFormat type of data format - * @param serializerContext data format serializer context - */ - protected DataFormatSerializer(DataFormat dataFormat, - DataFormatSerializerContext serializerContext) { - this.dataFormat = dataFormat; - this.serializerContext = serializerContext; - } - - /** - * Encodes context memory parameters to data format. - * - * @param param context memory parameter - * @param annotations annotations - * @return data format body - */ - public abstract String encode(Map param, - Map> annotations); - - /** - * Decodes data format body to context memory parameters. - * - * @param dataFormatBody abstract node - * @return context memory parameters - */ - public abstract Map decode(String dataFormatBody); - - /** - * Returns data format serializer context. - * - * @return data format serializer context - */ - public DataFormatSerializerContext serializerContext() { - return serializerContext; - } - - /** - * Returns supported data format. - * - * @return supported data format - */ - public DataFormat dataFormat() { - return dataFormat; - } -} \ No newline at end of file diff --git a/restconf-client/provider/src/main/java/org/onap/ccsdk/sli/plugins/yangserializers/DataFormatSerializerContext.java b/restconf-client/provider/src/main/java/org/onap/ccsdk/sli/plugins/yangserializers/DataFormatSerializerContext.java deleted file mode 100644 index 50cb2daf6..000000000 --- a/restconf-client/provider/src/main/java/org/onap/ccsdk/sli/plugins/yangserializers/DataFormatSerializerContext.java +++ /dev/null @@ -1,74 +0,0 @@ -/*- - * ============LICENSE_START======================================================= - * ONAP - CCSDK - * ================================================================================ - * Copyright (C) 2018 Huawei Technologies Co., Ltd. All rights reserved. - * ================================================================================ - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * ============LICENSE_END========================================================= - */ - -package org.onap.ccsdk.sli.plugins.yangserializers; - -import java.util.Map; - -/** - * Abstraction of data format serializer context. - */ -public class DataFormatSerializerContext { - - private Listener listener; - private String uri; - private Map protocolAnnotation; - - /** - * Creates an instance of data format serializer context. - * - * @param listener data format listener - * @param uri URI corresponding to instance identifier - * @param protocolAnnotation protocol annotations - */ - public DataFormatSerializerContext(Listener listener, String uri, - Map protocolAnnotation) { - this.listener = listener; - this.uri = uri; - this.protocolAnnotation = protocolAnnotation; - } - - /** - * Retruns data format listener. - * - * @return data format listener - */ - public Listener listener() { - return listener; - } - - /** - * Returns URI. - * - * @return URI - */ - public String uri() { - return uri; - } - - /** - * Returns protocol annotations. - * - * @return protocol annotations - */ - public Map getProtocolAnnotation() { - return protocolAnnotation; - } -} \ No newline at end of file diff --git a/restconf-client/provider/src/main/java/org/onap/ccsdk/sli/plugins/yangserializers/JsonSerializer.java b/restconf-client/provider/src/main/java/org/onap/ccsdk/sli/plugins/yangserializers/JsonSerializer.java deleted file mode 100644 index 072cfb09c..000000000 --- a/restconf-client/provider/src/main/java/org/onap/ccsdk/sli/plugins/yangserializers/JsonSerializer.java +++ /dev/null @@ -1,49 +0,0 @@ -/*- - * ============LICENSE_START======================================================= - * ONAP - CCSDK - * ================================================================================ - * Copyright (C) 2018 Huawei Technologies Co., Ltd. All rights reserved. - * ================================================================================ - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * ============LICENSE_END========================================================= - */ - -package org.onap.ccsdk.sli.plugins.yangserializers; - -import java.util.List; -import java.util.Map; - -/** - * Representation of JSON serializer. - */ -public class JsonSerializer extends DataFormatSerializer { - - /** - * Creates an instance of data format serializer. - * - * @param serializerContext data format serializer context - */ - protected JsonSerializer(DataFormatSerializerContext serializerContext) { - super(DataFormat.JSON, serializerContext); - } - - @Override - public String encode(Map param, Map> annotations) { - return null; - } - - @Override - public Map decode(String dataFormatBody) { - return null; - } -} diff --git a/restconf-client/provider/src/main/java/org/onap/ccsdk/sli/plugins/yangserializers/Listener.java b/restconf-client/provider/src/main/java/org/onap/ccsdk/sli/plugins/yangserializers/Listener.java deleted file mode 100644 index a0976822e..000000000 --- a/restconf-client/provider/src/main/java/org/onap/ccsdk/sli/plugins/yangserializers/Listener.java +++ /dev/null @@ -1,34 +0,0 @@ -/*- - * ============LICENSE_START======================================================= - * ONAP - CCSDK - * ================================================================================ - * Copyright (C) 2018 Huawei Technologies Co., Ltd. All rights reserved. - * ================================================================================ - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * ============LICENSE_END========================================================= - */ - -package org.onap.ccsdk.sli.plugins.yangserializers; - -/** - * Abstraction of listener. - */ -public interface Listener { - - /** - * Returns serializer helper for this listener. - * - * @return serializer helper - */ - SerializerHelper serializerHelper(); -} diff --git a/restconf-client/provider/src/main/java/org/onap/ccsdk/sli/plugins/yangserializers/MdsalSerializerHelper.java b/restconf-client/provider/src/main/java/org/onap/ccsdk/sli/plugins/yangserializers/MdsalSerializerHelper.java deleted file mode 100644 index c9bda511f..000000000 --- a/restconf-client/provider/src/main/java/org/onap/ccsdk/sli/plugins/yangserializers/MdsalSerializerHelper.java +++ /dev/null @@ -1,67 +0,0 @@ -/*- - * ============LICENSE_START======================================================= - * ONAP - CCSDK - * ================================================================================ - * Copyright (C) 2018 Huawei Technologies Co., Ltd. All rights reserved. - * ================================================================================ - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * ============LICENSE_END========================================================= - */ - -package org.onap.ccsdk.sli.plugins.yangserializers; - -import java.util.Map; -import org.opendaylight.yangtools.yang.model.api.SchemaNode; - -/** - * Representation of MDSAL based schema helper. - */ -public class MdsalSerializerHelper extends SerializerHelper { - - protected MdsalSerializerHelper(SchemaNode node, String uri) { - super(node, uri); - } - - @Override - public SchemaNode getRootContext() { - return null; - } - - @Override - public SchemaNode getCurContext() { - return null; - } - - @Override - public SchemaNode getChildContext(SchemaNode schemaNode, String name, String namespace) { - return null; - } - - @Override - public NodeType getNodeType(SchemaNode schemaNode) { - return null; - } - - @Override - public void addNode(String name, String namespace, String value, String valNamespace, NodeType type) { - } - - @Override - public void exitNode() { - } - - @Override - public Map getProperties() { - return null; - } -} diff --git a/restconf-client/provider/src/main/java/org/onap/ccsdk/sli/plugins/yangserializers/NodeType.java b/restconf-client/provider/src/main/java/org/onap/ccsdk/sli/plugins/yangserializers/NodeType.java deleted file mode 100644 index 5a63d6325..000000000 --- a/restconf-client/provider/src/main/java/org/onap/ccsdk/sli/plugins/yangserializers/NodeType.java +++ /dev/null @@ -1,31 +0,0 @@ -/*- - * ============LICENSE_START======================================================= - * ONAP - CCSDK - * ================================================================================ - * Copyright (C) 2018 Huawei Technologies Co., Ltd. All rights reserved. - * ================================================================================ - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * ============LICENSE_END========================================================= - */ - -package org.onap.ccsdk.sli.plugins.yangserializers; - -/** - * Representation of type of data node. - */ -public enum NodeType { - SINGLE_INSTANCE, - MULTI_INSTANCE, - SINGLE_INSTANCE_LEAF, - MULTI_INSTANCE_LEAF -} diff --git a/restconf-client/provider/src/main/java/org/onap/ccsdk/sli/plugins/yangserializers/SerializerHelper.java b/restconf-client/provider/src/main/java/org/onap/ccsdk/sli/plugins/yangserializers/SerializerHelper.java deleted file mode 100644 index a4bbce529..000000000 --- a/restconf-client/provider/src/main/java/org/onap/ccsdk/sli/plugins/yangserializers/SerializerHelper.java +++ /dev/null @@ -1,93 +0,0 @@ -/*- - * ============LICENSE_START======================================================= - * ONAP - CCSDK - * ================================================================================ - * Copyright (C) 2018 Huawei Technologies Co., Ltd. All rights reserved. - * ================================================================================ - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * ============LICENSE_END========================================================= - */ - -package org.onap.ccsdk.sli.plugins.yangserializers; - -import java.util.Map; - -/** - * Abstraction of an entity which helps the data format serializers to obtain - * schema context details and to build properties from data. - * - * @param type of schema node - */ -public abstract class SerializerHelper { - - private T rootSchema; - private String rootURI; - - protected SerializerHelper(T t, String uri) { - rootSchema = t; - } - - /** - * Returns root schema context node. - * - * @return root schema context node - */ - protected abstract T getRootContext(); - - /** - * Returns current schema context node. - * - * @return current schema context node - */ - protected abstract T getCurContext(); - - /** - * Returns child schema context node. - * - * @return child schema context node - */ - protected abstract T getChildContext(T t, String name, String namespace); - - /** - * Returns type of node - * @param t node - * @return node type - */ - protected abstract NodeType getNodeType(T t); - - /** - * Adds a node to current tree. - * - * @param name name of node - * @param namespace namespace of node, it can be either module name or - * namespace, null indicates parent namespace - * @param value value of node, in case it's leaf/leaf-list node - * @param valNamespace value namespace for identityref, could be module - * name or namespace - * @param type type of node if known like in case of JSON - */ - protected abstract void addNode(String name, String namespace, String value, - String valNamespace, NodeType type); - - /** - * Exits the node, in case if it's leaf node add to properties map. - */ - protected abstract void exitNode(); - - /** - * Returns the properties built corresponding to data. - * - * @return properties map - */ - protected abstract Map getProperties(); -} diff --git a/restconf-client/provider/src/main/java/org/onap/ccsdk/sli/plugins/yangserializers/XmlSerializer.java b/restconf-client/provider/src/main/java/org/onap/ccsdk/sli/plugins/yangserializers/XmlSerializer.java deleted file mode 100644 index ba5d8ed27..000000000 --- a/restconf-client/provider/src/main/java/org/onap/ccsdk/sli/plugins/yangserializers/XmlSerializer.java +++ /dev/null @@ -1,49 +0,0 @@ -/*- - * ============LICENSE_START======================================================= - * ONAP - CCSDK - * ================================================================================ - * Copyright (C) 2018 Huawei Technologies Co., Ltd. All rights reserved. - * ================================================================================ - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * ============LICENSE_END========================================================= - */ - -package org.onap.ccsdk.sli.plugins.yangserializers; - -import java.util.List; -import java.util.Map; - -/** - * Representation of XML serializer. - */ -public class XmlSerializer extends DataFormatSerializer { - - /** - * Creates an instance of XML serializer. - * - * @param serializerContext data format serializer context - */ - protected XmlSerializer(DataFormatSerializerContext serializerContext) { - super(DataFormat.XML, serializerContext); - } - - @Override - public String encode(Map param, Map> annotations) { - return null; - } - - @Override - public Map decode(String dataFormatBody) { - return null; - } -} \ No newline at end of file diff --git a/restconf-client/provider/src/main/java/org/onap/ccsdk/sli/plugins/yangserializers/dfserializer/Annotation.java b/restconf-client/provider/src/main/java/org/onap/ccsdk/sli/plugins/yangserializers/dfserializer/Annotation.java new file mode 100644 index 000000000..7271c3d71 --- /dev/null +++ b/restconf-client/provider/src/main/java/org/onap/ccsdk/sli/plugins/yangserializers/dfserializer/Annotation.java @@ -0,0 +1,59 @@ +/*- + * ============LICENSE_START======================================================= + * ONAP - CCSDK + * ================================================================================ + * Copyright (C) 2018 Huawei Technologies Co., Ltd. All rights reserved. + * ================================================================================ + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============LICENSE_END========================================================= + */ + +package org.onap.ccsdk.sli.plugins.yangserializers.dfserializer; + +/** + * Representation of an entity that represents annotated attribute. + */ +public class Annotation { + + private String name; + private String value; + + /** + * Creates an instance of annotation. + * + * @param n annotation name + * @param v annotation value + */ + public Annotation(String n, String v) { + name = n; + value = v; + } + + /** + * Returns name of annotation. + * + * @return name of annotation + */ + public String name() { + return name; + } + + /** + * Returns value of annotation. + * + * @return value of annotation + */ + public String value() { + return value; + } +} diff --git a/restconf-client/provider/src/main/java/org/onap/ccsdk/sli/plugins/yangserializers/dfserializer/DataFormat.java b/restconf-client/provider/src/main/java/org/onap/ccsdk/sli/plugins/yangserializers/dfserializer/DataFormat.java new file mode 100644 index 000000000..6fb11e70f --- /dev/null +++ b/restconf-client/provider/src/main/java/org/onap/ccsdk/sli/plugins/yangserializers/dfserializer/DataFormat.java @@ -0,0 +1,29 @@ +/*- + * ============LICENSE_START======================================================= + * ONAP - CCSDK + * ================================================================================ + * Copyright (C) 2018 Huawei Technologies Co., Ltd. All rights reserved. + * ================================================================================ + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============LICENSE_END========================================================= + */ + +package org.onap.ccsdk.sli.plugins.yangserializers.dfserializer; + +/** + * Representation of data format. + */ +public enum DataFormat { + XML, + JSON +} diff --git a/restconf-client/provider/src/main/java/org/onap/ccsdk/sli/plugins/yangserializers/dfserializer/DataFormatSerializer.java b/restconf-client/provider/src/main/java/org/onap/ccsdk/sli/plugins/yangserializers/dfserializer/DataFormatSerializer.java new file mode 100644 index 000000000..e703b1732 --- /dev/null +++ b/restconf-client/provider/src/main/java/org/onap/ccsdk/sli/plugins/yangserializers/dfserializer/DataFormatSerializer.java @@ -0,0 +1,82 @@ +/*- + * ============LICENSE_START======================================================= + * ONAP - CCSDK + * ================================================================================ + * Copyright (C) 2018 Huawei Technologies Co., Ltd. All rights reserved. + * ================================================================================ + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============LICENSE_END========================================================= + */ + +package org.onap.ccsdk.sli.plugins.yangserializers.dfserializer; + +import java.util.List; +import java.util.Map; + +/** + * Abstraction of serializer to encode/decode context memory parameters + * to/from specified data format. + */ +public abstract class DataFormatSerializer { + + private DataFormat dataFormat; + private DataFormatSerializerContext serializerContext; + + /** + * Creates an instance of data format serializer. + * + * @param dataFormat type of data format + * @param serializerContext data format serializer context + */ + protected DataFormatSerializer(DataFormat dataFormat, + DataFormatSerializerContext serializerContext) { + this.dataFormat = dataFormat; + this.serializerContext = serializerContext; + } + + /** + * Encodes context memory parameters to data format. + * + * @param param context memory parameter + * @param annotations annotations + * @return data format body + */ + public abstract String encode(Map param, + Map> annotations); + + /** + * Decodes data format body to context memory parameters. + * + * @param dataFormatBody abstract node + * @return context memory parameters + */ + public abstract Map decode(String dataFormatBody); + + /** + * Returns data format serializer context. + * + * @return data format serializer context + */ + public DataFormatSerializerContext serializerContext() { + return serializerContext; + } + + /** + * Returns supported data format. + * + * @return supported data format + */ + public DataFormat dataFormat() { + return dataFormat; + } +} \ No newline at end of file diff --git a/restconf-client/provider/src/main/java/org/onap/ccsdk/sli/plugins/yangserializers/dfserializer/DataFormatSerializerContext.java b/restconf-client/provider/src/main/java/org/onap/ccsdk/sli/plugins/yangserializers/dfserializer/DataFormatSerializerContext.java new file mode 100644 index 000000000..e2ead53fb --- /dev/null +++ b/restconf-client/provider/src/main/java/org/onap/ccsdk/sli/plugins/yangserializers/dfserializer/DataFormatSerializerContext.java @@ -0,0 +1,74 @@ +/*- + * ============LICENSE_START======================================================= + * ONAP - CCSDK + * ================================================================================ + * Copyright (C) 2018 Huawei Technologies Co., Ltd. All rights reserved. + * ================================================================================ + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============LICENSE_END========================================================= + */ + +package org.onap.ccsdk.sli.plugins.yangserializers.dfserializer; + +import java.util.Map; + +/** + * Abstraction of data format serializer context. + */ +public class DataFormatSerializerContext { + + private Listener listener; + private String uri; + private Map protocolAnnotation; + + /** + * Creates an instance of data format serializer context. + * + * @param listener data format listener + * @param uri URI corresponding to instance identifier + * @param protocolAnnotation protocol annotations + */ + public DataFormatSerializerContext(Listener listener, String uri, + Map protocolAnnotation) { + this.listener = listener; + this.uri = uri; + this.protocolAnnotation = protocolAnnotation; + } + + /** + * Retruns data format listener. + * + * @return data format listener + */ + public Listener listener() { + return listener; + } + + /** + * Returns URI. + * + * @return URI + */ + public String uri() { + return uri; + } + + /** + * Returns protocol annotations. + * + * @return protocol annotations + */ + public Map getProtocolAnnotation() { + return protocolAnnotation; + } +} \ No newline at end of file diff --git a/restconf-client/provider/src/main/java/org/onap/ccsdk/sli/plugins/yangserializers/dfserializer/JsonSerializer.java b/restconf-client/provider/src/main/java/org/onap/ccsdk/sli/plugins/yangserializers/dfserializer/JsonSerializer.java new file mode 100644 index 000000000..6013664cb --- /dev/null +++ b/restconf-client/provider/src/main/java/org/onap/ccsdk/sli/plugins/yangserializers/dfserializer/JsonSerializer.java @@ -0,0 +1,49 @@ +/*- + * ============LICENSE_START======================================================= + * ONAP - CCSDK + * ================================================================================ + * Copyright (C) 2018 Huawei Technologies Co., Ltd. All rights reserved. + * ================================================================================ + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============LICENSE_END========================================================= + */ + +package org.onap.ccsdk.sli.plugins.yangserializers.dfserializer; + +import java.util.List; +import java.util.Map; + +/** + * Representation of JSON serializer. + */ +public class JsonSerializer extends DataFormatSerializer { + + /** + * Creates an instance of data format serializer. + * + * @param serializerContext data format serializer context + */ + protected JsonSerializer(DataFormatSerializerContext serializerContext) { + super(DataFormat.JSON, serializerContext); + } + + @Override + public String encode(Map param, Map> annotations) { + return null; + } + + @Override + public Map decode(String dataFormatBody) { + return null; + } +} diff --git a/restconf-client/provider/src/main/java/org/onap/ccsdk/sli/plugins/yangserializers/dfserializer/Listener.java b/restconf-client/provider/src/main/java/org/onap/ccsdk/sli/plugins/yangserializers/dfserializer/Listener.java new file mode 100644 index 000000000..e5812dbb7 --- /dev/null +++ b/restconf-client/provider/src/main/java/org/onap/ccsdk/sli/plugins/yangserializers/dfserializer/Listener.java @@ -0,0 +1,34 @@ +/*- + * ============LICENSE_START======================================================= + * ONAP - CCSDK + * ================================================================================ + * Copyright (C) 2018 Huawei Technologies Co., Ltd. All rights reserved. + * ================================================================================ + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============LICENSE_END========================================================= + */ + +package org.onap.ccsdk.sli.plugins.yangserializers.dfserializer; + +/** + * Abstraction of listener. + */ +public interface Listener { + + /** + * Returns serializer helper for this listener. + * + * @return serializer helper + */ + SerializerHelper serializerHelper(); +} 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 new file mode 100644 index 000000000..311fc2d6b --- /dev/null +++ b/restconf-client/provider/src/main/java/org/onap/ccsdk/sli/plugins/yangserializers/dfserializer/MdsalSerializerHelper.java @@ -0,0 +1,67 @@ +/*- + * ============LICENSE_START======================================================= + * ONAP - CCSDK + * ================================================================================ + * Copyright (C) 2018 Huawei Technologies Co., Ltd. All rights reserved. + * ================================================================================ + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============LICENSE_END========================================================= + */ + +package org.onap.ccsdk.sli.plugins.yangserializers.dfserializer; + +import java.util.Map; +import org.opendaylight.yangtools.yang.model.api.SchemaNode; + +/** + * Representation of MDSAL based schema helper. + */ +public class MdsalSerializerHelper extends SerializerHelper { + + protected MdsalSerializerHelper(SchemaNode node, String uri) { + super(node, uri); + } + + @Override + public SchemaNode getRootContext() { + return null; + } + + @Override + public SchemaNode getCurContext() { + return null; + } + + @Override + public SchemaNode getChildContext(SchemaNode schemaNode, String name, String namespace) { + return null; + } + + @Override + public NodeType getNodeType(SchemaNode schemaNode) { + return null; + } + + @Override + public void addNode(String name, String namespace, String value, String valNamespace, NodeType type) { + } + + @Override + public void exitNode() { + } + + @Override + public Map getProperties() { + return null; + } +} diff --git a/restconf-client/provider/src/main/java/org/onap/ccsdk/sli/plugins/yangserializers/dfserializer/NodeType.java b/restconf-client/provider/src/main/java/org/onap/ccsdk/sli/plugins/yangserializers/dfserializer/NodeType.java new file mode 100644 index 000000000..ffa35e2b6 --- /dev/null +++ b/restconf-client/provider/src/main/java/org/onap/ccsdk/sli/plugins/yangserializers/dfserializer/NodeType.java @@ -0,0 +1,31 @@ +/*- + * ============LICENSE_START======================================================= + * ONAP - CCSDK + * ================================================================================ + * Copyright (C) 2018 Huawei Technologies Co., Ltd. All rights reserved. + * ================================================================================ + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============LICENSE_END========================================================= + */ + +package org.onap.ccsdk.sli.plugins.yangserializers.dfserializer; + +/** + * Representation of type of data node. + */ +public enum NodeType { + SINGLE_INSTANCE, + MULTI_INSTANCE, + SINGLE_INSTANCE_LEAF, + MULTI_INSTANCE_LEAF +} diff --git a/restconf-client/provider/src/main/java/org/onap/ccsdk/sli/plugins/yangserializers/dfserializer/SerializerHelper.java b/restconf-client/provider/src/main/java/org/onap/ccsdk/sli/plugins/yangserializers/dfserializer/SerializerHelper.java new file mode 100644 index 000000000..4e6d2944d --- /dev/null +++ b/restconf-client/provider/src/main/java/org/onap/ccsdk/sli/plugins/yangserializers/dfserializer/SerializerHelper.java @@ -0,0 +1,93 @@ +/*- + * ============LICENSE_START======================================================= + * ONAP - CCSDK + * ================================================================================ + * Copyright (C) 2018 Huawei Technologies Co., Ltd. All rights reserved. + * ================================================================================ + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============LICENSE_END========================================================= + */ + +package org.onap.ccsdk.sli.plugins.yangserializers.dfserializer; + +import java.util.Map; + +/** + * Abstraction of an entity which helps the data format serializers to obtain + * schema context details and to build properties from data. + * + * @param type of schema node + */ +public abstract class SerializerHelper { + + private T rootSchema; + private String rootURI; + + protected SerializerHelper(T t, String uri) { + rootSchema = t; + } + + /** + * Returns root schema context node. + * + * @return root schema context node + */ + protected abstract T getRootContext(); + + /** + * Returns current schema context node. + * + * @return current schema context node + */ + protected abstract T getCurContext(); + + /** + * Returns child schema context node. + * + * @return child schema context node + */ + protected abstract T getChildContext(T t, String name, String namespace); + + /** + * Returns type of node + * @param t node + * @return node type + */ + protected abstract NodeType getNodeType(T t); + + /** + * Adds a node to current tree. + * + * @param name name of node + * @param namespace namespace of node, it can be either module name or + * namespace, null indicates parent namespace + * @param value value of node, in case it's leaf/leaf-list node + * @param valNamespace value namespace for identityref, could be module + * name or namespace + * @param type type of node if known like in case of JSON + */ + protected abstract void addNode(String name, String namespace, String value, + String valNamespace, NodeType type); + + /** + * Exits the node, in case if it's leaf node add to properties map. + */ + protected abstract void exitNode(); + + /** + * Returns the properties built corresponding to data. + * + * @return properties map + */ + protected abstract Map getProperties(); +} diff --git a/restconf-client/provider/src/main/java/org/onap/ccsdk/sli/plugins/yangserializers/dfserializer/XmlSerializer.java b/restconf-client/provider/src/main/java/org/onap/ccsdk/sli/plugins/yangserializers/dfserializer/XmlSerializer.java new file mode 100644 index 000000000..0cfb4d17f --- /dev/null +++ b/restconf-client/provider/src/main/java/org/onap/ccsdk/sli/plugins/yangserializers/dfserializer/XmlSerializer.java @@ -0,0 +1,49 @@ +/*- + * ============LICENSE_START======================================================= + * ONAP - CCSDK + * ================================================================================ + * Copyright (C) 2018 Huawei Technologies Co., Ltd. All rights reserved. + * ================================================================================ + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============LICENSE_END========================================================= + */ + +package org.onap.ccsdk.sli.plugins.yangserializers.dfserializer; + +import java.util.List; +import java.util.Map; + +/** + * Representation of XML serializer. + */ +public class XmlSerializer extends DataFormatSerializer { + + /** + * Creates an instance of XML serializer. + * + * @param serializerContext data format serializer context + */ + protected XmlSerializer(DataFormatSerializerContext serializerContext) { + super(DataFormat.XML, serializerContext); + } + + @Override + public String encode(Map param, Map> annotations) { + return null; + } + + @Override + public Map decode(String dataFormatBody) { + return null; + } +} \ No newline at end of file diff --git a/restconf-client/provider/src/main/java/org/onap/ccsdk/sli/plugins/yangserializers/pnserializer/MdsalPropertiesNodeSerializer.java b/restconf-client/provider/src/main/java/org/onap/ccsdk/sli/plugins/yangserializers/pnserializer/MdsalPropertiesNodeSerializer.java new file mode 100644 index 000000000..67e9c1e59 --- /dev/null +++ b/restconf-client/provider/src/main/java/org/onap/ccsdk/sli/plugins/yangserializers/pnserializer/MdsalPropertiesNodeSerializer.java @@ -0,0 +1,59 @@ +/*- + * ============LICENSE_START======================================================= + * ONAP - CCSDK + * ================================================================================ + * Copyright (C) 2018 Huawei Technologies Co., Ltd. All rights reserved. + * ================================================================================ + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============LICENSE_END========================================================= + */ + +package org.onap.ccsdk.sli.plugins.yangserializers.pnserializer; + +import java.util.Map; +import org.opendaylight.yangtools.yang.model.api.SchemaContext; +import org.opendaylight.yangtools.yang.model.api.SchemaNode; +import org.slf4j.Logger; +import static org.slf4j.LoggerFactory.getLogger; + +/** + * Representation of mdsal based properties node serializer implementation. + */ +public class MdsalPropertiesNodeSerializer extends PropertiesNodeSerializer { + + private SchemaNode curSchema; + private PropertiesNode node; + private static final Logger LOG = getLogger(MdsalPropertiesNodeSerializer.class); + + /** + * Creates the properties node serializer. + * + * @param schemaNode schema node. + * @param schemaCtx schema context + * @param uri URL of the request + */ + public MdsalPropertiesNodeSerializer(SchemaNode schemaNode, SchemaContext schemaCtx, String uri) { + super(schemaNode, schemaCtx, uri); + } + + @Override + public PropertiesNode encode(Map paramMap) { + return null; + } + + @Override + public Map decode(PropertiesNode propertiesNode) { + return null; + } + +} diff --git a/restconf-client/provider/src/main/java/org/onap/ccsdk/sli/plugins/yangserializers/pnserializer/NodeType.java b/restconf-client/provider/src/main/java/org/onap/ccsdk/sli/plugins/yangserializers/pnserializer/NodeType.java new file mode 100644 index 000000000..94f2915ac --- /dev/null +++ b/restconf-client/provider/src/main/java/org/onap/ccsdk/sli/plugins/yangserializers/pnserializer/NodeType.java @@ -0,0 +1,33 @@ +/*- + * ============LICENSE_START======================================================= + * ONAP - CCSDK + * ================================================================================ + * Copyright (C) 2018 Huawei Technologies Co., Ltd. All rights reserved. + * ================================================================================ + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============LICENSE_END========================================================= + */ + +package org.onap.ccsdk.sli.plugins.yangserializers.pnserializer; + +/** + * Representation of types of node in properties node tree. + */ +public enum NodeType { + SINGLE_INSTANCE_NODE, + MULTI_INSTANCE_NODE, + SINGLE_INSTANCE_LEAF_NODE, + MULTI_INSTANCE_LEAF_NODE, + MULTI_INSTANCE_HOLDER_NODE, + MULTI_INSTANCE_LEAF_HOLDER_NODE +} diff --git a/restconf-client/provider/src/main/java/org/onap/ccsdk/sli/plugins/yangserializers/pnserializer/PropertiesNode.java b/restconf-client/provider/src/main/java/org/onap/ccsdk/sli/plugins/yangserializers/pnserializer/PropertiesNode.java new file mode 100644 index 000000000..fccfa6a9d --- /dev/null +++ b/restconf-client/provider/src/main/java/org/onap/ccsdk/sli/plugins/yangserializers/pnserializer/PropertiesNode.java @@ -0,0 +1,124 @@ +/*- + * ============LICENSE_START======================================================= + * ONAP - CCSDK + * ================================================================================ + * Copyright (C) 2018 Huawei Technologies Co., Ltd. All rights reserved. + * ================================================================================ + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============LICENSE_END========================================================= + */ + +package org.onap.ccsdk.sli.plugins.yangserializers.pnserializer; + +/** + * Abstraction of properties node data tree. This intermediate representation + * will enable data format serializers to be agnostic of DG context memory + * nuances and thereby will enable faster development of new data faormat + * serializers. + */ +public abstract class PropertiesNode { + + private String name; + private String namespace; + private String uri; + private PropertiesNode parent; + + /** + * Creates an instance of properties node. + */ + protected PropertiesNode() { + } + + /** + * Creates an instance of properties node. + * + * @param name name of node + * @param namespace namespace of node, null indicates parent namespace + * @param uri URI of this node, if null its calculated based on parent and + * current value of name and namespace + * @param parent parent's node + */ + protected PropertiesNode(String name, String namespace, String uri, PropertiesNode parent) { + this.name = name; + this.namespace = namespace; + this.uri = uri; + this.parent = parent; + } + + /** + * Adds a child to a current node. + * + * @param name name of child + * @param namespace namespace of child, null represents parent namespace + * @param type type of node + * @return added properties node + */ + public abstract PropertiesNode addChild(String name, String namespace, NodeType type); + + /** + * Adds a child with value to a current node. + * + * @param name name of child + * @param namespace namespace of child, null represents parent namespace + * @param type type of node + * @param value value of node + * @return added properties node + */ + public abstract PropertiesNode addChild(String name, String namespace, NodeType type, String value); + + /** + * Adds a child at a given index to a current node. To be used in case of + * leaf holder child's which is multi instance node. + * + * @param index index at which node is to be added + * @param name name of child + * @param namespace namespace of child, null represents parent namespace + * @param type type of node + * @return added properties node + */ + public abstract PropertiesNode addChild(String index, String name, String namespace, NodeType type); + + public void name(String name) { + this.name = name; + } + + public void namespace(String namespace) { + this.namespace = namespace; + } + + public void uri(String uri) { + this.uri = uri; + } + + public void parent(PropertiesNode parent) { + this.parent = parent; + } + + public PropertiesNode parent() { + return parent; + } + + public String name() { + return name; + } + + public String namespace() { + return namespace; + } + + public String uri() { + return uri; + } + +} + diff --git a/restconf-client/provider/src/main/java/org/onap/ccsdk/sli/plugins/yangserializers/pnserializer/PropertiesNodeSerializer.java b/restconf-client/provider/src/main/java/org/onap/ccsdk/sli/plugins/yangserializers/pnserializer/PropertiesNodeSerializer.java new file mode 100644 index 000000000..81609a6da --- /dev/null +++ b/restconf-client/provider/src/main/java/org/onap/ccsdk/sli/plugins/yangserializers/pnserializer/PropertiesNodeSerializer.java @@ -0,0 +1,108 @@ +/*- + * ============LICENSE_START======================================================= + * ONAP - CCSDK + * ================================================================================ + * Copyright (C) 2018 Huawei Technologies Co., Ltd. All rights reserved. + * ================================================================================ + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============LICENSE_END========================================================= + */ + +package org.onap.ccsdk.sli.plugins.yangserializers.pnserializer; + +import java.util.Map; + +/** + * Abstraction of an entity to enable encoding and decoding of properties + * to an abstract properties node tree using YANG based schema. + * This serializer will be used by other data format serializers and will keep + * them abstract from properties nuances thereby enabling quick addition of any + * new data format serializer. + * + * @param type of schema node + * @param

schema context of the model + */ +public abstract class PropertiesNodeSerializer { + + /** + * Schema node from which the property is made. + */ + private T schemaNode; + + /** + * Schema context of the model. + */ + private P schemaCtx; + + /** + * URL pointing to the schema node. + */ + private String uri; + + /** + * Creates the properties node serializer. + * + * @param schemaNode schema node. + * @param schemaCtx schema context + * @param uri URL of the request + */ + public PropertiesNodeSerializer(T schemaNode, P schemaCtx, String uri) { + this.schemaNode = schemaNode; + this.schemaCtx = schemaCtx; + this.uri = uri; + } + + + /** + * Encodes from properties to properties-node tree. + * + * @param paramMap parameter map + * @return properties node + */ + public abstract PropertiesNode encode(Map paramMap); + + /** + * Decodes from properties-node to properties map. + * + * @param propertiesNode properties-node + * @return parameter map + */ + public abstract Map decode(PropertiesNode propertiesNode); + + /** + * Returns the schema node of the property + * + * @return schema node + */ + public T getSchemaNode(){ + return schemaNode; + } + + /** + * Returns the schema context + * + * @return schema node + */ + public P getSchemaCtx() { + return schemaCtx; + } + + /** + * Returns the URI. + * + * @return uri + */ + public String getUri() { + return uri; + } +} -- cgit 1.2.3-korg From 8e8ec2eb81e062010da230fae30626cb07c25bd1 Mon Sep 17 00:00:00 2001 From: Vidyashree Rama Date: Thu, 9 Aug 2018 12:21:34 +0530 Subject: RestconfDiscoveryNode Plugin implementation Initial code submit for supporting RestconfDiscoveryNode Plugin implementation Issue-ID: CCSDK-374 Change-Id: Ieb0b622b135ea78ef58bd36dfe171f4117bc3328 Signed-off-by: Vidyashree Rama --- .../features/ccsdk-restconf-client/pom.xml | 10 +- .../features/src/main/resources/features.xml | 7 +- restconf-client/provider/pom.xml | 49 ++--- .../plugins/restconfdiscovery/EventHandler.java | 50 +++++ .../plugins/restconfdiscovery/EventProcessor.java | 69 +++++++ .../restconfdiscovery/RestconfDiscoveryNode.java | 221 ++++++++++++++++++++- .../restconfdiscovery/SubscriptionInfo.java | 122 ++++++++++++ .../restconfdiscovery/SvcLogicDiscoveryPlugin.java | 2 +- .../restconfdiscovery/SvcLogicGraphInfo.java | 178 +++++++++++++++++ .../META-INF/spring/restconf-client-context.xml | 2 +- .../plugins/restconfdiscovery/SseServerMock.java | 68 +++++++ .../TestRestconfDiscoveryNode.java | 105 ++++++++++ 12 files changed, 843 insertions(+), 40 deletions(-) create mode 100644 restconf-client/provider/src/main/java/org/onap/ccsdk/sli/plugins/restconfdiscovery/EventHandler.java create mode 100644 restconf-client/provider/src/main/java/org/onap/ccsdk/sli/plugins/restconfdiscovery/EventProcessor.java create mode 100644 restconf-client/provider/src/main/java/org/onap/ccsdk/sli/plugins/restconfdiscovery/SubscriptionInfo.java create mode 100644 restconf-client/provider/src/main/java/org/onap/ccsdk/sli/plugins/restconfdiscovery/SvcLogicGraphInfo.java create mode 100644 restconf-client/provider/src/test/java/org/onap/ccsdk/sli/plugins/restconfdiscovery/SseServerMock.java create mode 100644 restconf-client/provider/src/test/java/org/onap/ccsdk/sli/plugins/restconfdiscovery/TestRestconfDiscoveryNode.java (limited to 'restconf-client/provider') diff --git a/restconf-client/features/ccsdk-restconf-client/pom.xml b/restconf-client/features/ccsdk-restconf-client/pom.xml index 8bdfe87a0..1877f19d8 100644 --- a/restconf-client/features/ccsdk-restconf-client/pom.xml +++ b/restconf-client/features/ccsdk-restconf-client/pom.xml @@ -46,10 +46,10 @@ xml features - - ${project.groupId} - restconf-client-provider - ${project.version} - + + + + + diff --git a/restconf-client/features/src/main/resources/features.xml b/restconf-client/features/src/main/resources/features.xml index d7907ac29..c07cddffb 100644 --- a/restconf-client/features/src/main/resources/features.xml +++ b/restconf-client/features/src/main/resources/features.xml @@ -31,11 +31,8 @@ sdnc-sli spring spring-dm - mvn:com.sun.jersey/jersey-client/${jersey.version} - mvn:com.sun.jersey.contribs.jersey-oauth/oauth-signature/${jersey.version} - mvn:com.sun.jersey.contribs.jersey-oauth/oauth-client/${jersey.version} - mvn:org.codehaus.jettison/jettison/${jettison.version} - mvn:org.onap.ccsdk.sli.plugins/restconf-client-provider/${project.version} + mvn:org.onap.ccsdk.sli.plugins/properties-node-provider/0.3.0-SNAPSHOT + mvn:org.onap.ccsdk.sli.plugins/restconf-client-provider/0.3.0-SNAPSHOT diff --git a/restconf-client/provider/pom.xml b/restconf-client/provider/pom.xml index 776240e0c..5a74d8fc0 100755 --- a/restconf-client/provider/pom.xml +++ b/restconf-client/provider/pom.xml @@ -28,46 +28,47 @@ org.springframework - spring-test - test - - - org.onap.ccsdk.sli.core - sli-common + spring-beans - org.onap.ccsdk.sli.core - sli-provider + org.springframework + spring-context - org.slf4j - slf4j-api + org.glassfish.jersey.media + jersey-media-sse + 2.27 + provided - org.springframework - spring-beans + javax.ws.rs + javax.ws.rs-api + 2.1 - org.springframework - spring-context + org.glassfish.jersey.inject + jersey-hk2 + 2.27 - com.sun.jersey - jersey-client + org.glassfish.jersey.containers + jersey-container-servlet + 2.27 - com.sun.jersey.contribs.jersey-oauth - oauth-signature - ${jersey.version} + org.glassfish.jersey.containers + jersey-container-grizzly2-http + 2.27 + test - com.sun.jersey.contribs.jersey-oauth - oauth-client - ${jersey.version} + org.onap.ccsdk.sli.core + sli-common - org.codehaus.jettison - jettison + org.onap.ccsdk.sli.plugins + properties-node-provider + 0.3.0-SNAPSHOT diff --git a/restconf-client/provider/src/main/java/org/onap/ccsdk/sli/plugins/restconfdiscovery/EventHandler.java b/restconf-client/provider/src/main/java/org/onap/ccsdk/sli/plugins/restconfdiscovery/EventHandler.java new file mode 100644 index 000000000..155656e27 --- /dev/null +++ b/restconf-client/provider/src/main/java/org/onap/ccsdk/sli/plugins/restconfdiscovery/EventHandler.java @@ -0,0 +1,50 @@ +/*- + * ============LICENSE_START======================================================= + * ONAP - CCSDK + * ================================================================================ + * Copyright (C) 2018 Huawei Technologies Co., Ltd. All rights reserved. + * ================================================================================ + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============LICENSE_END========================================================= + */ + +package org.onap.ccsdk.sli.plugins.restconfdiscovery; + +import org.glassfish.jersey.media.sse.InboundEvent; +import org.glassfish.jersey.media.sse.EventListener; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +/** + * Listener that can be registered to listen for notifications. + */ +class EventHandler implements EventListener { + private static final Logger log = LoggerFactory.getLogger(EventListener.class); + private RestconfDiscoveryNode node; + + public EventHandler(RestconfDiscoveryNode node) { + this.node = node; + } + + @Override + public void onEvent(InboundEvent event) { + String payload = event.readData(); + if (!node.eventQueue().offer(payload)) { + log.error("Unable to process event " + + payload + "as processing queue is full"); + throw new RuntimeException("Unable to process event " + + payload + + "as processing queue is full"); + } + } +} diff --git a/restconf-client/provider/src/main/java/org/onap/ccsdk/sli/plugins/restconfdiscovery/EventProcessor.java b/restconf-client/provider/src/main/java/org/onap/ccsdk/sli/plugins/restconfdiscovery/EventProcessor.java new file mode 100644 index 000000000..a85876cae --- /dev/null +++ b/restconf-client/provider/src/main/java/org/onap/ccsdk/sli/plugins/restconfdiscovery/EventProcessor.java @@ -0,0 +1,69 @@ +/*- + * ============LICENSE_START======================================================= + * ONAP - CCSDK + * ================================================================================ + * Copyright (C) 2018 Huawei Technologies Co., Ltd. All rights reserved. + * ================================================================================ + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============LICENSE_END========================================================= + */ + +package org.onap.ccsdk.sli.plugins.restconfdiscovery; + +import org.onap.ccsdk.sli.core.sli.SvcLogicContext; +import org.onap.ccsdk.sli.core.sli.SvcLogicException; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +import java.util.Map; + +import static org.onap.ccsdk.sli.plugins.prop.JsonParser.convertToProperties; + +/** + * Processes the events from event queue and executes callback DG. + */ +class EventProcessor implements Runnable { + private static final Logger log = LoggerFactory.getLogger(EventProcessor.class); + private RestconfDiscoveryNode node; + + private static final String EVENT_SUBSCRIPTION_ID = "ietf-notification:notification" + + ".ietf-yang-push:push-change-update" + + ".subscription-id"; + + public EventProcessor(RestconfDiscoveryNode node) { + this.node = node; + } + + @Override + public void run() { + while(true) { + try { + String payload = node.eventQueue().take(); + Map param = convertToProperties(payload); + String id = param.get(EVENT_SUBSCRIPTION_ID); + SubscriptionInfo info = node.subscriptionInfoMap().get(id); + if (info != null) { + SvcLogicContext ctx = new SvcLogicContext(); + for (Map.Entry entry : param.entrySet()) { + ctx.setAttribute(entry.getKey(), entry.getValue()); + } + SvcLogicGraphInfo callbackDG = info.callBackDG(); + callbackDG.executeGraph(ctx); + } + } catch (InterruptedException | SvcLogicException e) { + log.error(e.getMessage()); + throw new RuntimeException(e.getMessage()); + } + } + } +} diff --git a/restconf-client/provider/src/main/java/org/onap/ccsdk/sli/plugins/restconfdiscovery/RestconfDiscoveryNode.java b/restconf-client/provider/src/main/java/org/onap/ccsdk/sli/plugins/restconfdiscovery/RestconfDiscoveryNode.java index 9eaa67916..34bb2ee6e 100644 --- a/restconf-client/provider/src/main/java/org/onap/ccsdk/sli/plugins/restconfdiscovery/RestconfDiscoveryNode.java +++ b/restconf-client/provider/src/main/java/org/onap/ccsdk/sli/plugins/restconfdiscovery/RestconfDiscoveryNode.java @@ -1,25 +1,238 @@ +/*- + * ============LICENSE_START======================================================= + * ONAP - CCSDK + * ================================================================================ + * Copyright (C) 2018 Huawei Technologies Co., Ltd. All rights reserved. + * ================================================================================ + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============LICENSE_END========================================================= + */ + package org.onap.ccsdk.sli.plugins.restconfdiscovery; -import java.util.Map; +import org.glassfish.jersey.media.sse.EventSource; +import org.glassfish.jersey.media.sse.SseFeature; import org.onap.ccsdk.sli.core.sli.SvcLogicContext; +import org.onap.ccsdk.sli.core.sli.SvcLogicException; +import org.onap.ccsdk.sli.plugins.restconfapicall.RestconfapiCallNode; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +import javax.ws.rs.client.Client; +import javax.ws.rs.client.ClientBuilder; +import javax.ws.rs.client.WebTarget; +import java.util.Map; +import java.util.concurrent.ConcurrentHashMap; +import java.util.concurrent.ExecutorService; +import java.util.concurrent.Executors; +import java.util.concurrent.LinkedBlockingQueue; /** - * Created by root1 on 18/7/18. + * Representation of a plugin to subscribe for notification and then + * to handle the received notifications. */ public class RestconfDiscoveryNode implements SvcLogicDiscoveryPlugin { + private static final Logger log = LoggerFactory.getLogger(RestconfDiscoveryNode.class); + + private ExecutorService executor = Executors.newCachedThreadPool(); + private Map runnableInfo = new ConcurrentHashMap<>(); + private RestconfapiCallNode restconfapiCallNode; + + private volatile Map subscriptionInfoMap = new ConcurrentHashMap<>(); + private volatile LinkedBlockingQueue eventQueue = new LinkedBlockingQueue<>(); + + private static final String SUBSCRIBER_ID = "subscriberId"; + private static final String RESPONSE_CODE = "response-code"; + private static final String RESPONSE_PREFIX = "responsePrefix"; + private static final String OUTPUT_IDENTIFIER = "ietf-subscribed-notifications:output.identifier"; + private static final String RESPONSE_CODE_200 = "200"; + private static final String SSE_URL = "sseConnectURL"; + + /** + * Creates an instance of RestconfDiscoveryNode and + * starts processing of event. + */ + public RestconfDiscoveryNode() { + ExecutorService e = Executors.newFixedThreadPool(20); + EventProcessor p = new EventProcessor(this); + for (int i = 0; i < 20; ++i) { + e.execute(p); + } + } @Override - public void establishSubscription(Map paramMap, SvcLogicContext ctx) { + public void establishSubscription(Map paramMap, + SvcLogicContext ctx) throws SvcLogicException { + String subscriberId = paramMap.get(SUBSCRIBER_ID); + if (subscriberId == null) { + throw new SvcLogicException("Subscriber Id is null"); + } + restconfapiCallNode.sendRequest(paramMap, ctx); + + if (getResponseCode(paramMap.get(RESPONSE_PREFIX), ctx).equals(RESPONSE_CODE_200)) { + // TODO: save subscription id and subscriber in MYSQL + + establishPersistentConnection(paramMap, ctx, subscriberId); + } else { + log.info("Failed to subscribe " + subscriberId); + throw new SvcLogicException(ctx.getAttribute(RESPONSE_CODE)); + } } @Override public void modifySubscription(Map paramMap, SvcLogicContext ctx) { - + // TODO: to be implemented } @Override public void deleteSubscription(Map paramMap, SvcLogicContext ctx) { + String id = getSubscriptionId(paramMap.get(SUBSCRIBER_ID)); + if (id != null) { + PersistentConnection conn = runnableInfo.get(id); + conn.terminate(); + runnableInfo.remove(id); + subscriptionInfoMap.remove(id); + } + } + + class PersistentConnection implements Runnable { + private String url; + private volatile boolean running = true; + + PersistentConnection(String url) { + this.url = url; + } + + private void terminate() { + running = false; + } + + @Override + public void run() { + Client client = ClientBuilder.newBuilder() + .register(SseFeature.class).build(); + WebTarget target = client.target(url); + EventSource eventSource = EventSource.target(target).build(); + eventSource.register(new EventHandler(RestconfDiscoveryNode.this)); + eventSource.open(); + log.info("Connected to SSE source"); + while (running) { + try { + Thread.sleep(5000); + } catch (InterruptedException e) { + log.error("Exception: " + e.getMessage()); + } + } + eventSource.close(); + log.info("Closed connection to SSE source"); + } + } + + /** + * Establishes a persistent between the client and server. + * + * @param paramMap input paramter map + * @param ctx service logic context + * @param subscriberId subscriber identifier + */ + void establishPersistentConnection(Map paramMap, SvcLogicContext ctx, + String subscriberId) { + String id = getOutputIdentifier(paramMap.get(RESPONSE_PREFIX), ctx); + SvcLogicGraphInfo callbackDG = new SvcLogicGraphInfo(paramMap.get("module"), + paramMap.get("rpc"), + paramMap.get("version"), + paramMap.get("mode")); + SubscriptionInfo info = new SubscriptionInfo(); + info.callBackDG(callbackDG); + info.subscriptionId(id); + info.subscriberId(subscriberId); + subscriptionInfoMap.put(id, info); + + String url = paramMap.get(SSE_URL); + PersistentConnection connection = new PersistentConnection(url); + runnableInfo.put(id, connection); + executor.execute(connection); + } + + /** + * Returns response code. + * + * @param prefix prefix given in input parameter + * @param ctx service logic context + * @return response code + */ + String getResponseCode(String prefix, SvcLogicContext ctx) { + return ctx.getAttribute(getPrefix(prefix) + RESPONSE_CODE); + } + + /** + * Returns subscription id from event. + * + * @param prefix prefix given in input parameter + * @param ctx service logic context + * @return subscription id from event + */ + String getOutputIdentifier(String prefix, SvcLogicContext ctx) { + return ctx.getAttribute(getPrefix(prefix) + OUTPUT_IDENTIFIER); + } + + private String getPrefix(String prefix) { + return prefix != null ? prefix + "." : ""; + } + + private String getSubscriptionId(String subscriberId) { + for (Map.Entry entry + : subscriptionInfoMap.entrySet()) { + if (entry.getValue().subscriberId() + .equals(subscriberId)) { + return entry.getKey(); + } + } + return null; + } + + /** + * Returns restconfApiCallNode. + * + * @return restconfApiCallNode + */ + protected RestconfapiCallNode restconfapiCallNode() { + return restconfapiCallNode; + } + + /** + * Sets restconfApiCallNode. + * + * @param node restconfApiCallNode + */ + void restconfapiCallNode(RestconfapiCallNode node) { + restconfapiCallNode = node; + } + + Map subscriptionInfoMap() { + return subscriptionInfoMap; + } + + void subscriptionInfoMap(Map subscriptionInfoMap) { + this.subscriptionInfoMap = subscriptionInfoMap; + } + + LinkedBlockingQueue eventQueue() { + return eventQueue; + } + void eventQueue(LinkedBlockingQueue eventQueue) { + this.eventQueue = eventQueue; } } diff --git a/restconf-client/provider/src/main/java/org/onap/ccsdk/sli/plugins/restconfdiscovery/SubscriptionInfo.java b/restconf-client/provider/src/main/java/org/onap/ccsdk/sli/plugins/restconfdiscovery/SubscriptionInfo.java new file mode 100644 index 000000000..4ed3660ca --- /dev/null +++ b/restconf-client/provider/src/main/java/org/onap/ccsdk/sli/plugins/restconfdiscovery/SubscriptionInfo.java @@ -0,0 +1,122 @@ +/*- + * ============LICENSE_START======================================================= + * ONAP - CCSDK + * ================================================================================ + * Copyright (C) 2018 Huawei Technologies Co., Ltd. All rights reserved. + * ================================================================================ + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============LICENSE_END========================================================= + */ + +package org.onap.ccsdk.sli.plugins.restconfdiscovery; + +/** + * Holder to store information of subscription. + */ +public class SubscriptionInfo { + private String subscriptionId; + private String subscriberId; + private SvcLogicGraphInfo callbackDG; + private String yangFilePath; + private String filterUrl; + + /** + * Returns callback DG. + * + * @return callback DG + */ + public SvcLogicGraphInfo callBackDG() { + return callbackDG; + } + + /** + * Sets callback DG. + * + * @param callbackDg callback DG + */ + public void callBackDG(SvcLogicGraphInfo callbackDg) { + this.callbackDG = callbackDg; + } + + /** + * Returns YANG file path. + * + * @return YANG file path + */ + public String yangFilePath() { + return yangFilePath; + } + + /** + * Sets YANG file path. + * + * @param yangFilePath yang file path + */ + public void yangFilePath(String yangFilePath) { + this.yangFilePath = yangFilePath; + } + + /** + * Returns filter URL. + * + * @return filter URL + */ + public String filterUrl() { + return filterUrl; + } + + /** + * Sets filter URL. + * + * @param filterUrl filter URL + */ + public void filterUrl(String filterUrl) { + this.filterUrl = filterUrl; + } + + /** + * Returns subscription Id. + * + * @return subscription Id + */ + public String subscriptionId() { + return subscriptionId; + } + + /** + * Sets subscription id. + * + * @param subscriptionId subscription id + */ + public void subscriptionId(String subscriptionId) { + this.subscriptionId = subscriptionId; + } + + /** + * Returns subscription Id. + * + * @return subscription Id + */ + public String subscriberId() { + return subscriberId; + } + + /** + * Sets subscriber id. + * + * @param subscriberId subscriber id + */ + public void subscriberId(String subscriberId) { + this.subscriberId = subscriberId; + } +} diff --git a/restconf-client/provider/src/main/java/org/onap/ccsdk/sli/plugins/restconfdiscovery/SvcLogicDiscoveryPlugin.java b/restconf-client/provider/src/main/java/org/onap/ccsdk/sli/plugins/restconfdiscovery/SvcLogicDiscoveryPlugin.java index 183d22297..dfe8cd5b7 100644 --- a/restconf-client/provider/src/main/java/org/onap/ccsdk/sli/plugins/restconfdiscovery/SvcLogicDiscoveryPlugin.java +++ b/restconf-client/provider/src/main/java/org/onap/ccsdk/sli/plugins/restconfdiscovery/SvcLogicDiscoveryPlugin.java @@ -59,7 +59,7 @@ public interface SvcLogicDiscoveryPlugin extends SvcLogicJavaPlugin { * @since 11.0.2 * @see String#split(String, int) */ - void establishSubscription(Map paramMap, SvcLogicContext ctx); + void establishSubscription(Map paramMap, SvcLogicContext ctx) throws SvcLogicException; /** * Allows directed graphs to modify a discovery subscription for a given subscriber. diff --git a/restconf-client/provider/src/main/java/org/onap/ccsdk/sli/plugins/restconfdiscovery/SvcLogicGraphInfo.java b/restconf-client/provider/src/main/java/org/onap/ccsdk/sli/plugins/restconfdiscovery/SvcLogicGraphInfo.java new file mode 100644 index 000000000..725826bda --- /dev/null +++ b/restconf-client/provider/src/main/java/org/onap/ccsdk/sli/plugins/restconfdiscovery/SvcLogicGraphInfo.java @@ -0,0 +1,178 @@ +/*- + * ============LICENSE_START======================================================= + * ONAP - CCSDK + * ================================================================================ + * Copyright (C) 2018 Huawei Technologies Co., Ltd. All rights reserved. + * ================================================================================ + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============LICENSE_END========================================================= + */ + +package org.onap.ccsdk.sli.plugins.restconfdiscovery; + +import org.onap.ccsdk.sli.core.sli.SvcLogicContext; +import org.onap.ccsdk.sli.core.sli.SvcLogicException; +import org.onap.ccsdk.sli.core.sli.SvcLogicGraph; +import org.onap.ccsdk.sli.core.sli.SvcLogicStore; +import org.onap.ccsdk.sli.core.sli.provider.SvcLogicService; +import org.osgi.framework.Bundle; +import org.osgi.framework.BundleContext; +import org.osgi.framework.FrameworkUtil; +import org.osgi.framework.ServiceReference; + +/** + * Holder to store callback directed graph info. + */ +class SvcLogicGraphInfo { + private String module; + private String rpc; + private String mode; + private String version; + + /** + * Creates an instance of SvcLogicGraphInfo. + * + * @param module module name of callback DG + * @param rpc rpc name of callback DG + * @param mode mode of callback DG + * @param version version of callback DG + */ + public SvcLogicGraphInfo(String module, String rpc, String mode, String version) { + this.module = module; + this.rpc = rpc; + this.mode = mode; + this.version = version; + } + + public SvcLogicGraphInfo() {} + + /** + * Returns module name of callback DG. + * + * @return module name of callback DG + */ + public String module() { + return module; + } + + /** + * Sets module of callback DG. + * + * @param module module name of the DG + */ + public void module(String module) { + this.module = module; + } + + /** + * Returns rpc of callback DG. + * + * @return rpc of callback DG + */ + public String rpc() { + return rpc; + } + + /** + * Sets rpc of callback DG. + * + * @param rpc rpc attribute of the DG + */ + public void rpc(String rpc) { + this.rpc = rpc; + } + + /** + * Returns mode of callback DG. + * + * @return mode of callback DG + */ + public String mode() { + return mode; + } + + /** + * Sets mode of DG. + * + * @param mode mode of the DG + */ + public void mode(String mode) { + this.mode = mode; + } + + /** + * Returns version of callback DG. + * + * @return version of callback DG + */ + public String version() { + return version; + } + + /** + * Sets version of DG. + * + * @param version version of the DG + */ + public void version(String version) { + this.version = version; + } + + /** + * Executes call back DG. + * + * @param ctx service logic context + * @throws SvcLogicException service logic error + */ + public void executeGraph(SvcLogicContext ctx) throws SvcLogicException { + SvcLogicService service = findSvcLogicService(); + if (service == null) { + throw new SvcLogicException("\"Could not get SvcLogicService reference\""); + } + + SvcLogicStore store = service.getStore(); + if (store != null) { + SvcLogicGraph subGraph = store.fetch(module, rpc, version, mode); + if (subGraph != null) { + ctx.setAttribute("subGraph", subGraph.toString()); + service.execute(subGraph, ctx); + } else { + throw new SvcLogicException("Failed to call child [" + module + + "," + rpc + "," + version + + "," + mode + "] because" + + " the" + " graph could" + + " not be found"); + } + } else { + throw new SvcLogicException("\"Could not get SvcLogicStore reference\""); + } + } + + private static SvcLogicService findSvcLogicService() throws SvcLogicException { + Bundle bundle = FrameworkUtil.getBundle(SvcLogicService.class); + if (bundle == null) { + throw new SvcLogicException("Cannot find bundle reference for " + + SvcLogicService.NAME); + } + + BundleContext bctx = bundle.getBundleContext(); + ServiceReference sref = bctx.getServiceReference( + SvcLogicService.class); + if (sref != null) { + return bctx.getService(sref); + } else { + throw new SvcLogicException("Cannot find service reference for " + + SvcLogicService.NAME); + } + } +} diff --git a/restconf-client/provider/src/main/resources/META-INF/spring/restconf-client-context.xml b/restconf-client/provider/src/main/resources/META-INF/spring/restconf-client-context.xml index d7fa61c55..34344fe07 100644 --- a/restconf-client/provider/src/main/resources/META-INF/spring/restconf-client-context.xml +++ b/restconf-client/provider/src/main/resources/META-INF/spring/restconf-client-context.xml @@ -42,7 +42,7 @@ - + diff --git a/restconf-client/provider/src/test/java/org/onap/ccsdk/sli/plugins/restconfdiscovery/SseServerMock.java b/restconf-client/provider/src/test/java/org/onap/ccsdk/sli/plugins/restconfdiscovery/SseServerMock.java new file mode 100644 index 000000000..1b234a236 --- /dev/null +++ b/restconf-client/provider/src/test/java/org/onap/ccsdk/sli/plugins/restconfdiscovery/SseServerMock.java @@ -0,0 +1,68 @@ +/*- + * ============LICENSE_START======================================================= + * ONAP - CCSDK + * ================================================================================ + * Copyright (C) 2018 Huawei Technologies Co., Ltd. All rights reserved. + * ================================================================================ + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============LICENSE_END========================================================= + */ +package org.onap.ccsdk.sli.plugins.restconfdiscovery; + +import org.glassfish.jersey.media.sse.EventOutput; +import org.glassfish.jersey.media.sse.OutboundEvent; +import org.glassfish.jersey.media.sse.SseFeature; + +import javax.ws.rs.GET; +import javax.ws.rs.Path; +import javax.ws.rs.Produces; +import java.io.IOException; + +@Path("events") +public class SseServerMock { + + @GET + @Produces(SseFeature.SERVER_SENT_EVENTS) + public EventOutput getServerSentEvents() throws IOException { + String data = "{" + + "\"ietf-notification:notification\" : {" + + " \"eventTime\" : \"2017-10-25T08:22:33.44Z\"," + + " \"ietf-yang-push:push-change-update\": {" + + "\"subscription-id\":\"89\"," + + "\"datastore-changes\": {" + + "\"ietf-yang-patch:yang-patch\":{" + + "\"patch-id\":\"1\"," + + "\"edit\":[{" + + "\"edit-id\":\"edit1\"," + + "\"operation\":\"merge\"," + + "\"target\":\"/ietf-interfaces:interfaces-state\"," + + "\"value\": {" + + "\"ietf-interfaces:interfaces-state\":{"+ + "\"interface\": {" + + "\"name\":\"eth0\"," + + "\"oper-status\":\"down\"," + + "}" + + "}" + + "}" + + "}]"+ + "}" + + "}" + + "}" + + "}" + + "}"; + final EventOutput result = new EventOutput(); + result.write(new OutboundEvent.Builder().data(String.class, data).build()); + result.close(); + return result; + } +} diff --git a/restconf-client/provider/src/test/java/org/onap/ccsdk/sli/plugins/restconfdiscovery/TestRestconfDiscoveryNode.java b/restconf-client/provider/src/test/java/org/onap/ccsdk/sli/plugins/restconfdiscovery/TestRestconfDiscoveryNode.java new file mode 100644 index 000000000..db878f0af --- /dev/null +++ b/restconf-client/provider/src/test/java/org/onap/ccsdk/sli/plugins/restconfdiscovery/TestRestconfDiscoveryNode.java @@ -0,0 +1,105 @@ +/*- + * ============LICENSE_START======================================================= + * ONAP - CCSDK + * ================================================================================ + * Copyright (C) 2018 Huawei Technologies Co., Ltd. All rights reserved. + * ================================================================================ + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============LICENSE_END========================================================= + */ + +package org.onap.ccsdk.sli.plugins.restconfdiscovery; + +import java.net.URI; +import java.util.HashMap; +import java.util.Map; + +import org.glassfish.jersey.grizzly2.httpserver.GrizzlyHttpServerFactory; +import org.glassfish.jersey.media.sse.SseFeature; +import org.glassfish.jersey.server.ResourceConfig; +import org.junit.Test; +import org.onap.ccsdk.sli.core.sli.SvcLogicContext; +import org.onap.ccsdk.sli.core.sli.SvcLogicException; +import static org.hamcrest.MatcherAssert.assertThat; +import static org.hamcrest.core.Is.is; + +public class TestRestconfDiscoveryNode { + + private static final URI CONTEXT = URI.create("http://localhost:8080/"); + + @Test + public void testEstablishPersistentConnection() throws SvcLogicException, + InterruptedException { + final ResourceConfig resourceConfig = new ResourceConfig( + SseServerMock.class, SseFeature.class); + GrizzlyHttpServerFactory.createHttpServer(CONTEXT, resourceConfig); + SvcLogicContext ctx = new SvcLogicContext(); + ctx.setAttribute("prop.encoding-json", "encoding-json"); + ctx.setAttribute("restapi-result.response-code", "200"); + ctx.setAttribute("restapi-result.ietf-subscribed-notifications" + + ":output.identifier", "100"); + + Map p = new HashMap<>(); + p.put("sseConnectURL", "http://localhost:8080/events"); + p.put("subscriberId", "networkId"); + p.put("responsePrefix", "restapi-result"); + RestconfDiscoveryNode rdn = new RestconfDiscoveryNode(); + rdn.establishPersistentConnection(p, ctx, "networkId"); + Thread.sleep(2000); + rdn.deleteSubscription(p, ctx); + } + + @Test(expected = SvcLogicException.class) + public void testSubGraphExecution() throws SvcLogicException{ + SvcLogicGraphInfo subDg = new SvcLogicGraphInfo(); + subDg.mode("sync"); + subDg.module("l3VpnService"); + subDg.rpc("createVpn"); + subDg.version("1.0"); + SvcLogicContext ctx = new SvcLogicContext(); + subDg.executeGraph(ctx); + } + + @Test(expected = SvcLogicException.class) + public void testEstablishSubscriptionWithoutSubscriberId() + throws SvcLogicException{ + SvcLogicContext ctx = new SvcLogicContext(); + Map p = new HashMap<>(); + RestconfDiscoveryNode rdn = new RestconfDiscoveryNode(); + rdn.establishSubscription(p, ctx); + } + + @Test + public void testResponseCode() { + SvcLogicContext ctx = new SvcLogicContext(); + ctx.setAttribute("restapi-result.response-code", "200"); + ctx.setAttribute("response-code", "404"); + RestconfDiscoveryNode rdn = new RestconfDiscoveryNode(); + assertThat(rdn.getResponseCode("restapi-result", ctx), + is("200")); + assertThat(rdn.getResponseCode(null, ctx), + is("404")); + } + + @Test + public void testOutputIdentifier() { + SvcLogicContext ctx = new SvcLogicContext(); + ctx.setAttribute("restapi-result.ietf-subscribed-notifications:" + + "output.identifier", "89"); + ctx.setAttribute("ietf-subscribed-notifications:output.identifier", + "89"); + RestconfDiscoveryNode rdn = new RestconfDiscoveryNode(); + assertThat(rdn.getOutputIdentifier("restapi-result", ctx), + is("89")); + } +} -- cgit 1.2.3-korg From 436c3a034313ef7f27e6df32a33c667d7c89940b Mon Sep 17 00:00:00 2001 From: Vidyashree Rama Date: Fri, 17 Aug 2018 09:27:24 +0530 Subject: Add abstract properties node tree properties node tree definations Issue-ID: CCSDK-379 Change-Id: Ib498cd57b0de5e67a31764f2fe46a2aeed7ac3f4 Signed-off-by: Vidyashree Rama --- .../pnserializer/DataNodeChild.java | 27 +++ .../yangserializers/pnserializer/HolderNode.java | 59 ++++++ .../yangserializers/pnserializer/InnerNode.java | 94 +++++++++ .../pnserializer/LeafListHolderChild.java | 28 +++ .../pnserializer/LeafListHolderNode.java | 81 ++++++++ .../yangserializers/pnserializer/LeafNode.java | 119 ++++++++++++ .../pnserializer/ListHolderChild.java | 28 +++ .../pnserializer/ListHolderNode.java | 66 +++++++ .../MdsalPropertiesNodeSerializer.java | 4 +- .../pnserializer/MultiInstanceNode.java | 32 +++ .../yangserializers/pnserializer/Namespace.java | 100 ++++++++++ .../yangserializers/pnserializer/NodeChild.java | 28 +++ .../pnserializer/PropertiesNode.java | 216 +++++++++++++++++---- .../pnserializer/PropertiesNodeSerializer.java | 15 +- .../yangserializers/pnserializer/RootNode.java | 91 +++++++++ .../pnserializer/SingleInstanceNode.java | 33 ++++ 16 files changed, 974 insertions(+), 47 deletions(-) create mode 100644 restconf-client/provider/src/main/java/org/onap/ccsdk/sli/plugins/yangserializers/pnserializer/DataNodeChild.java create mode 100644 restconf-client/provider/src/main/java/org/onap/ccsdk/sli/plugins/yangserializers/pnserializer/HolderNode.java create mode 100644 restconf-client/provider/src/main/java/org/onap/ccsdk/sli/plugins/yangserializers/pnserializer/InnerNode.java create mode 100644 restconf-client/provider/src/main/java/org/onap/ccsdk/sli/plugins/yangserializers/pnserializer/LeafListHolderChild.java create mode 100644 restconf-client/provider/src/main/java/org/onap/ccsdk/sli/plugins/yangserializers/pnserializer/LeafListHolderNode.java create mode 100644 restconf-client/provider/src/main/java/org/onap/ccsdk/sli/plugins/yangserializers/pnserializer/LeafNode.java create mode 100644 restconf-client/provider/src/main/java/org/onap/ccsdk/sli/plugins/yangserializers/pnserializer/ListHolderChild.java create mode 100644 restconf-client/provider/src/main/java/org/onap/ccsdk/sli/plugins/yangserializers/pnserializer/ListHolderNode.java create mode 100644 restconf-client/provider/src/main/java/org/onap/ccsdk/sli/plugins/yangserializers/pnserializer/MultiInstanceNode.java create mode 100644 restconf-client/provider/src/main/java/org/onap/ccsdk/sli/plugins/yangserializers/pnserializer/Namespace.java create mode 100644 restconf-client/provider/src/main/java/org/onap/ccsdk/sli/plugins/yangserializers/pnserializer/NodeChild.java create mode 100644 restconf-client/provider/src/main/java/org/onap/ccsdk/sli/plugins/yangserializers/pnserializer/RootNode.java create mode 100644 restconf-client/provider/src/main/java/org/onap/ccsdk/sli/plugins/yangserializers/pnserializer/SingleInstanceNode.java (limited to 'restconf-client/provider') diff --git a/restconf-client/provider/src/main/java/org/onap/ccsdk/sli/plugins/yangserializers/pnserializer/DataNodeChild.java b/restconf-client/provider/src/main/java/org/onap/ccsdk/sli/plugins/yangserializers/pnserializer/DataNodeChild.java new file mode 100644 index 000000000..7be54690a --- /dev/null +++ b/restconf-client/provider/src/main/java/org/onap/ccsdk/sli/plugins/yangserializers/pnserializer/DataNodeChild.java @@ -0,0 +1,27 @@ +/*- + * ============LICENSE_START======================================================= + * ONAP - CCSDK + * ================================================================================ + * Copyright (C) 2018 Huawei Technologies Co., Ltd. All rights reserved. + * ================================================================================ + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============LICENSE_END========================================================= + */ + +package org.onap.ccsdk.sli.plugins.yangserializers.pnserializer; + +/** + * Abstraction of entity representing child's to data node. + */ +public interface DataNodeChild extends NodeChild { +} diff --git a/restconf-client/provider/src/main/java/org/onap/ccsdk/sli/plugins/yangserializers/pnserializer/HolderNode.java b/restconf-client/provider/src/main/java/org/onap/ccsdk/sli/plugins/yangserializers/pnserializer/HolderNode.java new file mode 100644 index 000000000..52bec3412 --- /dev/null +++ b/restconf-client/provider/src/main/java/org/onap/ccsdk/sli/plugins/yangserializers/pnserializer/HolderNode.java @@ -0,0 +1,59 @@ +/*- + * ============LICENSE_START======================================================= + * ONAP - CCSDK + * ================================================================================ + * Copyright (C) 2018 Huawei Technologies Co., Ltd. All rights reserved. + * ================================================================================ + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============LICENSE_END========================================================= + */ + +package org.onap.ccsdk.sli.plugins.yangserializers.pnserializer; + +import java.util.HashMap; +import java.util.Map; + +/** + * Abstraction of an entity that represents holder node to multi instance node + * in properties data tree. + * + * @param type of child + */ +public abstract class HolderNode extends PropertiesNode { + + private Map children = new HashMap<>(); + + protected HolderNode(String name, Namespace namespace, String uri, + PropertiesNode parent, Object appInfo, + NodeType nodeType) { + super(name, namespace, uri, parent, appInfo, nodeType); + } + + /** + * Returns children. + * + * @return children + */ + public Map children() { + return children; + } + + /** + * Returns child based on index. + * + * @return child based on index + */ + public T child(String index) { + return children.get(index); + } +} diff --git a/restconf-client/provider/src/main/java/org/onap/ccsdk/sli/plugins/yangserializers/pnserializer/InnerNode.java b/restconf-client/provider/src/main/java/org/onap/ccsdk/sli/plugins/yangserializers/pnserializer/InnerNode.java new file mode 100644 index 000000000..21f0b7c03 --- /dev/null +++ b/restconf-client/provider/src/main/java/org/onap/ccsdk/sli/plugins/yangserializers/pnserializer/InnerNode.java @@ -0,0 +1,94 @@ +/*- + * ============LICENSE_START======================================================= + * ONAP - CCSDK + * ================================================================================ + * Copyright (C) 2018 Huawei Technologies Co., Ltd. All rights reserved. + * ================================================================================ + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============LICENSE_END========================================================= + */ + +package org.onap.ccsdk.sli.plugins.yangserializers.pnserializer; + +import org.onap.ccsdk.sli.core.sli.SvcLogicException; + +import java.util.HashMap; +import java.util.Map; + +/** + * Abstraction of an entity that represents an inner node to properties data + * tree. + * + * @param type of child + */ +public abstract class InnerNode extends PropertiesNode { + + private Map children = new HashMap(); + + protected InnerNode(String name, Namespace namespace, String uri, + PropertiesNode parent, Object appInfo, NodeType nodeType) { + super(name, namespace, uri, parent, appInfo, nodeType); + } + + /** + * Returns children. + * + * @return children + */ + public Map children() { + return children; + } + + /** + * Sets children. + * + * @param children child nodes + */ + public void children(Map children) { + this.children = children; + } + + @Override + public PropertiesNode addChild(String name, Namespace namespace, + NodeType type, + Object appInfo) throws SvcLogicException { + // TODO : to be implemented + return null; + } + + @Override + public PropertiesNode addChild(String name, Namespace namespace, + NodeType type, String value, + Namespace valuens, + Object appInfo) throws SvcLogicException { + // TODO : to be implemented + return null; + } + + @Override + public PropertiesNode addChild(String index, String name, + Namespace namespace, NodeType type, + Object appInfo) throws SvcLogicException { + // TODO : to be implemented + return null; + } + + @Override + public PropertiesNode addChild(String index, String name, + Namespace namespace, NodeType type, + String value, Namespace valueNs, + Object appInfo) throws SvcLogicException { + // TODO : to be implemented + return null; + } +} diff --git a/restconf-client/provider/src/main/java/org/onap/ccsdk/sli/plugins/yangserializers/pnserializer/LeafListHolderChild.java b/restconf-client/provider/src/main/java/org/onap/ccsdk/sli/plugins/yangserializers/pnserializer/LeafListHolderChild.java new file mode 100644 index 000000000..e43249a3d --- /dev/null +++ b/restconf-client/provider/src/main/java/org/onap/ccsdk/sli/plugins/yangserializers/pnserializer/LeafListHolderChild.java @@ -0,0 +1,28 @@ +/*- + * ============LICENSE_START======================================================= + * ONAP - CCSDK + * ================================================================================ + * Copyright (C) 2018 Huawei Technologies Co., Ltd. All rights reserved. + * ================================================================================ + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============LICENSE_END========================================================= + */ + +package org.onap.ccsdk.sli.plugins.yangserializers.pnserializer; + +/** + * Abstraction of entity representing child's to leaf list holder. + */ +public interface LeafListHolderChild extends NodeChild { + +} diff --git a/restconf-client/provider/src/main/java/org/onap/ccsdk/sli/plugins/yangserializers/pnserializer/LeafListHolderNode.java b/restconf-client/provider/src/main/java/org/onap/ccsdk/sli/plugins/yangserializers/pnserializer/LeafListHolderNode.java new file mode 100644 index 000000000..aa10e3307 --- /dev/null +++ b/restconf-client/provider/src/main/java/org/onap/ccsdk/sli/plugins/yangserializers/pnserializer/LeafListHolderNode.java @@ -0,0 +1,81 @@ +/*- + * ============LICENSE_START======================================================= + * ONAP - CCSDK + * ================================================================================ + * Copyright (C) 2018 Huawei Technologies Co., Ltd. All rights reserved. + * ================================================================================ + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============LICENSE_END========================================================= + */ + +package org.onap.ccsdk.sli.plugins.yangserializers.pnserializer; + +import org.onap.ccsdk.sli.core.sli.SvcLogicException; + +/** + * Representation of leaf list holder node which will hold multi instance leaf + * node in properties data tree. + */ +public class LeafListHolderNode extends HolderNode implements DataNodeChild { + + /** + * Creates an instance of LeafListHolderNode. + * + * @param name name of the leaf-list node + * @param namespace namespace of the leaf-list node + * @param uri uri of the leaf-list node + * @param parent parent node of the leaf-list + * @param appInfo application info + * @param nodeType node type + */ + public LeafListHolderNode(String name, Namespace namespace, + String uri, PropertiesNode parent, + Object appInfo, NodeType nodeType) { + super(name, namespace, uri, parent, appInfo, nodeType); + } + + @Override + public PropertiesNode addChild(String name, Namespace namespace, + NodeType type, String value, + Namespace valueNs, + Object appInfo) throws SvcLogicException { + throw new SvcLogicException("Leaf cannot be child of leaf-list" + + " holder node"); + } + + @Override + public PropertiesNode addChild(String name, Namespace namespace, + NodeType type, + Object appInfo) throws SvcLogicException { + throw new SvcLogicException("Container cannot be child of leaf-list" + + " holder node"); + } + + @Override + public PropertiesNode addChild(String index, String name, + Namespace namespace, + NodeType type, + Object appInfo) throws SvcLogicException { + throw new SvcLogicException("List cannot be child of leaf-list" + + " holder node"); + } + + @Override + public PropertiesNode addChild(String index, String name, + Namespace namespace, NodeType type, + String value, Namespace valueNs, + Object appInfo) throws SvcLogicException { + // TODO : to be implemented + return null; + } +} diff --git a/restconf-client/provider/src/main/java/org/onap/ccsdk/sli/plugins/yangserializers/pnserializer/LeafNode.java b/restconf-client/provider/src/main/java/org/onap/ccsdk/sli/plugins/yangserializers/pnserializer/LeafNode.java new file mode 100644 index 000000000..c9cf95ba3 --- /dev/null +++ b/restconf-client/provider/src/main/java/org/onap/ccsdk/sli/plugins/yangserializers/pnserializer/LeafNode.java @@ -0,0 +1,119 @@ +/*- + * ============LICENSE_START======================================================= + * ONAP - CCSDK + * ================================================================================ + * Copyright (C) 2018 Huawei Technologies Co., Ltd. All rights reserved. + * ================================================================================ + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============LICENSE_END========================================================= + */ + +package org.onap.ccsdk.sli.plugins.yangserializers.pnserializer; + +import org.onap.ccsdk.sli.core.sli.SvcLogicException; + +/** + * Representation of leaf node in properties data tree. + */ +public class LeafNode extends PropertiesNode implements LeafListHolderChild, DataNodeChild { + + private String value; + private Namespace valueNs; + + /** + * Creates an instance of leaf node. + * + * @param name name of the leaf node + * @param namespace namespace of the leaf node + * @param uri uri of the leaf node + * @param parent parent of the leaf node + * @param appInfo application info + * @param nodeType node type + * @param value value of the leaf + */ + public LeafNode(String name, Namespace namespace, + String uri, PropertiesNode parent, + Object appInfo, NodeType nodeType, + String value) { + super(name, namespace, uri, parent, appInfo, nodeType); + this.value = value; + } + + /** + * Returns value of the leaf. + * + * @return value of the leaf + */ + public String value() { + return value; + } + + /** + * Sets value of the leaf. + * + * @param value value of the leaf + */ + public void value(String value) { + this.value = value; + } + + /** + * Returns value namespace. + * + * @return value namespace + */ + public Namespace valueNs() { + return valueNs; + } + + /** + * Sets value namespace. + * + * @param valueNs value namespace + */ + public void valueNs(Namespace valueNs) { + this.valueNs = valueNs; + } + + @Override + public PropertiesNode addChild(String name, Namespace namespace, + NodeType type, + Object appInfo) throws SvcLogicException { + throw new SvcLogicException("Leaf cannot hold child nodes"); + } + + @Override + public PropertiesNode addChild(String name, Namespace namespace, + NodeType type, String value, + Namespace valueNs, + Object appInfo) throws SvcLogicException { + throw new SvcLogicException("Leaf cannot hold child nodes"); + } + + @Override + public PropertiesNode addChild(String index, String name, + Namespace namespace, + NodeType type, + Object appInfo) throws SvcLogicException { + throw new SvcLogicException("Leaf cannot hold child nodes"); + } + + @Override + public PropertiesNode addChild(String index, String name, + Namespace namespace, + NodeType type, String value, + Namespace valueNs, + Object appInfo) throws SvcLogicException { + throw new SvcLogicException("Leaf cannot hold child nodes"); + } +} diff --git a/restconf-client/provider/src/main/java/org/onap/ccsdk/sli/plugins/yangserializers/pnserializer/ListHolderChild.java b/restconf-client/provider/src/main/java/org/onap/ccsdk/sli/plugins/yangserializers/pnserializer/ListHolderChild.java new file mode 100644 index 000000000..ec9cc2a0f --- /dev/null +++ b/restconf-client/provider/src/main/java/org/onap/ccsdk/sli/plugins/yangserializers/pnserializer/ListHolderChild.java @@ -0,0 +1,28 @@ +/*- + * ============LICENSE_START======================================================= + * ONAP - CCSDK + * ================================================================================ + * Copyright (C) 2018 Huawei Technologies Co., Ltd. All rights reserved. + * ================================================================================ + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============LICENSE_END========================================================= + */ + +package org.onap.ccsdk.sli.plugins.yangserializers.pnserializer; + +/** + * Abstraction of entity representing child's to list holder. + */ +public interface ListHolderChild extends NodeChild { + +} diff --git a/restconf-client/provider/src/main/java/org/onap/ccsdk/sli/plugins/yangserializers/pnserializer/ListHolderNode.java b/restconf-client/provider/src/main/java/org/onap/ccsdk/sli/plugins/yangserializers/pnserializer/ListHolderNode.java new file mode 100644 index 000000000..9d1168b8f --- /dev/null +++ b/restconf-client/provider/src/main/java/org/onap/ccsdk/sli/plugins/yangserializers/pnserializer/ListHolderNode.java @@ -0,0 +1,66 @@ +/*- + * ============LICENSE_START======================================================= + * ONAP - CCSDK + * ================================================================================ + * Copyright (C) 2018 Huawei Technologies Co., Ltd. All rights reserved. + * ================================================================================ + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============LICENSE_END========================================================= + */ + +package org.onap.ccsdk.sli.plugins.yangserializers.pnserializer; + +import org.onap.ccsdk.sli.core.sli.SvcLogicException; + +/** + * Representation of list holder node which will hold multi instance node in + * properties data tree. + */ +public class ListHolderNode extends HolderNode implements DataNodeChild { + + protected ListHolderNode(String name, Namespace namespace, String uri, + PropertiesNode parent, Object appInfo, NodeType nodeType) { + super(name, namespace, uri, parent, appInfo, nodeType); + } + + @Override + public PropertiesNode addChild(String name, Namespace namespace, + NodeType type, String value, + Namespace valueNs, + Object appInfo) throws SvcLogicException { + throw new SvcLogicException("Leaf cannot be child of list holder node"); + } + + @Override + public PropertiesNode addChild(String name, Namespace namespace, + NodeType type, + Object appInfo) throws SvcLogicException { + throw new SvcLogicException("Container cannot be child of list holder node"); + } + + @Override + public PropertiesNode addChild(String index, String name, + Namespace namespace, NodeType type, + Object appInfo) throws SvcLogicException { + // TODO : to be implemented + return null; + } + + @Override + public PropertiesNode addChild(String index, String name, + Namespace namespace, NodeType type, + String value, Namespace valueNs, + Object appInfo) throws SvcLogicException { + throw new SvcLogicException("Leaf-list cannot be child of list holder node"); + } +} diff --git a/restconf-client/provider/src/main/java/org/onap/ccsdk/sli/plugins/yangserializers/pnserializer/MdsalPropertiesNodeSerializer.java b/restconf-client/provider/src/main/java/org/onap/ccsdk/sli/plugins/yangserializers/pnserializer/MdsalPropertiesNodeSerializer.java index 67e9c1e59..05e1ac1e6 100644 --- a/restconf-client/provider/src/main/java/org/onap/ccsdk/sli/plugins/yangserializers/pnserializer/MdsalPropertiesNodeSerializer.java +++ b/restconf-client/provider/src/main/java/org/onap/ccsdk/sli/plugins/yangserializers/pnserializer/MdsalPropertiesNodeSerializer.java @@ -20,10 +20,12 @@ package org.onap.ccsdk.sli.plugins.yangserializers.pnserializer; -import java.util.Map; import org.opendaylight.yangtools.yang.model.api.SchemaContext; import org.opendaylight.yangtools.yang.model.api.SchemaNode; import org.slf4j.Logger; + +import java.util.Map; + import static org.slf4j.LoggerFactory.getLogger; /** diff --git a/restconf-client/provider/src/main/java/org/onap/ccsdk/sli/plugins/yangserializers/pnserializer/MultiInstanceNode.java b/restconf-client/provider/src/main/java/org/onap/ccsdk/sli/plugins/yangserializers/pnserializer/MultiInstanceNode.java new file mode 100644 index 000000000..c251cdaea --- /dev/null +++ b/restconf-client/provider/src/main/java/org/onap/ccsdk/sli/plugins/yangserializers/pnserializer/MultiInstanceNode.java @@ -0,0 +1,32 @@ +/*- + * ============LICENSE_START======================================================= + * ONAP - CCSDK + * ================================================================================ + * Copyright (C) 2018 Huawei Technologies Co., Ltd. All rights reserved. + * ================================================================================ + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============LICENSE_END========================================================= + */ + +package org.onap.ccsdk.sli.plugins.yangserializers.pnserializer; + +/** + * Representation of multi instance node in properties data tree. + */ +public class MultiInstanceNode extends InnerNode implements ListHolderChild { + + public MultiInstanceNode(String name, Namespace namespace, String uri, + PropertiesNode parent, Object appinfo, NodeType nodeType) { + super(name, namespace, uri, parent, appinfo, nodeType); + } +} diff --git a/restconf-client/provider/src/main/java/org/onap/ccsdk/sli/plugins/yangserializers/pnserializer/Namespace.java b/restconf-client/provider/src/main/java/org/onap/ccsdk/sli/plugins/yangserializers/pnserializer/Namespace.java new file mode 100644 index 000000000..4f27ee1e7 --- /dev/null +++ b/restconf-client/provider/src/main/java/org/onap/ccsdk/sli/plugins/yangserializers/pnserializer/Namespace.java @@ -0,0 +1,100 @@ +/*- + * ============LICENSE_START======================================================= + * ONAP - CCSDK + * ================================================================================ + * Copyright (C) 2018 Huawei Technologies Co., Ltd. All rights reserved. + * ================================================================================ + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============LICENSE_END========================================================= + */ + +package org.onap.ccsdk.sli.plugins.yangserializers.pnserializer; + +import java.net.URI; + +/** + * Representation of YANG namespace. + */ +public class Namespace { + private String moduleName; + private URI moduleNs; + private String revision; + + /** + * Creates an instance of namespace with specified module name, + * namespace and revision. + * + * @param modulename module name + * @param moduleNs module namespace + * @param revision revision + */ + public Namespace(String modulename, URI moduleNs, String revision) { + this.moduleName = modulename; + this.moduleNs = moduleNs; + this.revision = revision; + } + + /** + * Returns module name. + * + * @return module name + */ + public String moduleName() { + return moduleName; + } + + /** + * Sets module name. + * + * @param moduleName module name + */ + public void moduleName(String moduleName) { + this.moduleName = moduleName; + } + + /** + * Sets module namespace. + * + * @return module namespace + */ + public URI moduleNs() { + return moduleNs; + } + + /** + * Sets module namespace. + * + * @param moduleNs module namespace + */ + public void moduleNs(URI moduleNs) { + this.moduleNs = moduleNs; + } + + /** + * Returns revision. + * + * @return revision + */ + public String revision() { + return revision; + } + + /** + * Sets revision. + * + * @param revision revision + */ + public void revision(String revision) { + this.revision = revision; + } +} diff --git a/restconf-client/provider/src/main/java/org/onap/ccsdk/sli/plugins/yangserializers/pnserializer/NodeChild.java b/restconf-client/provider/src/main/java/org/onap/ccsdk/sli/plugins/yangserializers/pnserializer/NodeChild.java new file mode 100644 index 000000000..d482c6763 --- /dev/null +++ b/restconf-client/provider/src/main/java/org/onap/ccsdk/sli/plugins/yangserializers/pnserializer/NodeChild.java @@ -0,0 +1,28 @@ +/*- + * ============LICENSE_START======================================================= + * ONAP - CCSDK + * ================================================================================ + * Copyright (C) 2018 Huawei Technologies Co., Ltd. All rights reserved. + * ================================================================================ + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============LICENSE_END========================================================= + */ + +package org.onap.ccsdk.sli.plugins.yangserializers.pnserializer; + +/** + * Abstraction of an entity that represents child's of a node. + */ +public interface NodeChild { + +} diff --git a/restconf-client/provider/src/main/java/org/onap/ccsdk/sli/plugins/yangserializers/pnserializer/PropertiesNode.java b/restconf-client/provider/src/main/java/org/onap/ccsdk/sli/plugins/yangserializers/pnserializer/PropertiesNode.java index fccfa6a9d..bb07382a4 100644 --- a/restconf-client/provider/src/main/java/org/onap/ccsdk/sli/plugins/yangserializers/pnserializer/PropertiesNode.java +++ b/restconf-client/provider/src/main/java/org/onap/ccsdk/sli/plugins/yangserializers/pnserializer/PropertiesNode.java @@ -20,24 +20,25 @@ package org.onap.ccsdk.sli.plugins.yangserializers.pnserializer; +import com.google.common.collect.ArrayListMultimap; +import com.google.common.collect.Multimap; +import org.onap.ccsdk.sli.core.sli.SvcLogicException; + /** * Abstraction of properties node data tree. This intermediate representation * will enable data format serializers to be agnostic of DG context memory - * nuances and thereby will enable faster development of new data faormat + * nuances and thereby will enable faster development of new data format * serializers. */ public abstract class PropertiesNode { private String name; - private String namespace; + private Namespace namespace; private String uri; private PropertiesNode parent; - - /** - * Creates an instance of properties node. - */ - protected PropertiesNode() { - } + private Object appInfo; + private NodeType nodeType; + private Multimap augmentations = ArrayListMultimap.create(); /** * Creates an instance of properties node. @@ -47,78 +48,213 @@ public abstract class PropertiesNode { * @param uri URI of this node, if null its calculated based on parent and * current value of name and namespace * @param parent parent's node + * @param appInfo application related information + * @param nodeType node type */ - protected PropertiesNode(String name, String namespace, String uri, PropertiesNode parent) { + protected PropertiesNode(String name, Namespace namespace, String uri, + PropertiesNode parent, Object appInfo, NodeType nodeType) { this.name = name; this.namespace = namespace; this.uri = uri; this.parent = parent; + this.appInfo = appInfo; + this.nodeType = nodeType; } /** - * Adds a child to a current node. + * Sets name. * - * @param name name of child - * @param namespace namespace of child, null represents parent namespace - * @param type type of node - * @return added properties node + * @param name name of the node */ - public abstract PropertiesNode addChild(String name, String namespace, NodeType type); + public void name(String name) { + this.name = name; + } /** - * Adds a child with value to a current node. + * Sets namespace. * - * @param name name of child - * @param namespace namespace of child, null represents parent namespace - * @param type type of node - * @param value value of node - * @return added properties node + * @param namespace namespace of the node */ - public abstract PropertiesNode addChild(String name, String namespace, NodeType type, String value); + public void namespace(Namespace namespace) { + this.namespace = namespace; + } /** - * Adds a child at a given index to a current node. To be used in case of - * leaf holder child's which is multi instance node. + * Sets uri. * - * @param index index at which node is to be added - * @param name name of child - * @param namespace namespace of child, null represents parent namespace - * @param type type of node - * @return added properties node + * @param uri uri of the node */ - public abstract PropertiesNode addChild(String index, String name, String namespace, NodeType type); - - public void name(String name) { - this.name = name; - } - - public void namespace(String namespace) { - this.namespace = namespace; - } - public void uri(String uri) { this.uri = uri; } + /** + * Sets parent node. + * + * @param parent parent node + */ public void parent(PropertiesNode parent) { this.parent = parent; } + /** + * Sets application info. + * + * @param appInfo application info + */ + public void appInfo(Object appInfo) { + this.appInfo = appInfo; + } + + /** + * Returns parent. + * + * @return parent node + */ public PropertiesNode parent() { return parent; } + /** + * Returns name. + * + * @return name of the node + */ public String name() { return name; } - public String namespace() { + /** + * Returns namespace. + * + * @return namespace of the node + */ + public Namespace namespace() { return namespace; } + /** + * Returns uri. + * + * @return uri of the node + */ public String uri() { return uri; } + /** + * Returns application info. + * + * @return application info + */ + public Object appInfo() { + return appInfo; + } + + /** + * Returns node type. + * + * @return node type + */ + public NodeType nodeType() { + return nodeType; + } + + /** + * Returns augmentations. + * + * @return augmentations + */ + public Multimap augmentations() { + return augmentations; + } + + /** + * Sets augmentations. + * + * @param augmentations augmentations of the node + */ + public void augmentations(Multimap augmentations) { + this.augmentations = augmentations; + } + + /** + * Adds a child to a current node. + * + * @param name name of child + * @param namespace namespace of child, null represents parent namespace + * @param type type of node + * @param appInfo application info + * @return added properties node + */ + public abstract PropertiesNode addChild(String name, Namespace namespace, + NodeType type, + Object appInfo) throws SvcLogicException; + + /** + * Adds a child with value to a current node. + * + * @param name name of child + * @param namespace namespace of child, null represents parent namespace + * @param type type of node + * @param value value of node + * @param valueNs value namespace + * @param appInfo application info + * @throws SvcLogicException if failed to add child + * @return added properties node + */ + public abstract PropertiesNode addChild(String name, Namespace namespace, + NodeType type, String value, + Namespace valueNs, + Object appInfo) throws SvcLogicException; + + /** + * Adds a child at a given index to a current node. To be used in case of + * leaf holder child's which is multi instance node. + * + * @param index index at which node is to be added + * @param name name of child + * @param namespace namespace of child, null represents parent namespace + * @param type type of node + * @param appInfo application info + * @throws SvcLogicException if failed to add child + * @return added properties node + */ + public abstract PropertiesNode addChild(String index, String name, + Namespace namespace, + NodeType type, + Object appInfo) throws SvcLogicException; + + /** + * Adds a child at a given index to a current node. To be used in case of + * leaf holder child's which is multi instance node. + * + * @param index index at which node is to be added + * @param name name of child + * @param namespace namespace of child, null represents parent namespace + * @param type type of node + * @param value value of node + * @param valueNs value namespace + * @param appInfo application info + * @throws SvcLogicException if failed to add child + * @return added properties node + */ + public abstract PropertiesNode addChild(String index, String name, + Namespace namespace, NodeType type, + String value, Namespace valueNs, + Object appInfo) throws SvcLogicException; + + /** + * Returns root node. + * + * @return root node + */ + public PropertiesNode endNode() { + PropertiesNode node = this; + while (node.parent() != null){ + node = node.parent(); + } + return node; + } } diff --git a/restconf-client/provider/src/main/java/org/onap/ccsdk/sli/plugins/yangserializers/pnserializer/PropertiesNodeSerializer.java b/restconf-client/provider/src/main/java/org/onap/ccsdk/sli/plugins/yangserializers/pnserializer/PropertiesNodeSerializer.java index 81609a6da..3e3483721 100644 --- a/restconf-client/provider/src/main/java/org/onap/ccsdk/sli/plugins/yangserializers/pnserializer/PropertiesNodeSerializer.java +++ b/restconf-client/provider/src/main/java/org/onap/ccsdk/sli/plugins/yangserializers/pnserializer/PropertiesNodeSerializer.java @@ -20,6 +20,8 @@ package org.onap.ccsdk.sli.plugins.yangserializers.pnserializer; +import org.onap.ccsdk.sli.core.sli.SvcLogicException; + import java.util.Map; /** @@ -62,29 +64,30 @@ public abstract class PropertiesNodeSerializer { this.uri = uri; } - /** * Encodes from properties to properties-node tree. * * @param paramMap parameter map + * @throws SvcLogicException fails to encode properties to properties node * @return properties node */ - public abstract PropertiesNode encode(Map paramMap); + public abstract PropertiesNode encode(Map paramMap) throws SvcLogicException; /** * Decodes from properties-node to properties map. * * @param propertiesNode properties-node + * @throws SvcLogicException fails to decode properties node to properties * @return parameter map */ - public abstract Map decode(PropertiesNode propertiesNode); + public abstract Map decode(PropertiesNode propertiesNode) throws SvcLogicException; /** * Returns the schema node of the property * * @return schema node */ - public T getSchemaNode(){ + public T schemaNode(){ return schemaNode; } @@ -93,7 +96,7 @@ public abstract class PropertiesNodeSerializer { * * @return schema node */ - public P getSchemaCtx() { + public P schemaCtx() { return schemaCtx; } @@ -102,7 +105,7 @@ public abstract class PropertiesNodeSerializer { * * @return uri */ - public String getUri() { + public String uri() { return uri; } } diff --git a/restconf-client/provider/src/main/java/org/onap/ccsdk/sli/plugins/yangserializers/pnserializer/RootNode.java b/restconf-client/provider/src/main/java/org/onap/ccsdk/sli/plugins/yangserializers/pnserializer/RootNode.java new file mode 100644 index 000000000..5cb8e4c97 --- /dev/null +++ b/restconf-client/provider/src/main/java/org/onap/ccsdk/sli/plugins/yangserializers/pnserializer/RootNode.java @@ -0,0 +1,91 @@ +/*- + * ============LICENSE_START======================================================= + * ONAP - CCSDK + * ================================================================================ + * Copyright (C) 2018 Huawei Technologies Co., Ltd. All rights reserved. + * ================================================================================ + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============LICENSE_END========================================================= + */ + +package org.onap.ccsdk.sli.plugins.yangserializers.pnserializer; + +import org.onap.ccsdk.sli.core.sli.SvcLogicException; + +import java.util.HashMap; +import java.util.Map; + +/** + * Abstraction of node representing properties data tree. + */ +public class RootNode extends PropertiesNode { + + private Map children = new HashMap(); + + protected RootNode(String name, Namespace namespace, + Object appInfo, String uri) { + super(name, namespace, uri, null, appInfo, null); + } + + /** + * Returns children. + * + * @return children + */ + public Map children() { + return children; + } + + /** + * Sets children. + * + * @param children child nodes + */ + public void children(Map children) { + this.children = children; + } + + @Override + public PropertiesNode addChild(String name, Namespace namespace, + NodeType type, + Object appInfo) throws SvcLogicException { + // TODO : to be implemented + return null; + } + + @Override + public PropertiesNode addChild(String name, Namespace namespace, + NodeType type, String value, + Namespace valuens, + Object appInfo) throws SvcLogicException { + // TODO : to be implemented + return null; + } + + @Override + public PropertiesNode addChild(String index, String name, + Namespace namespace, NodeType type, + Object appInfo) throws SvcLogicException { + // TODO : to be implemented + return null; + } + + @Override + public PropertiesNode addChild(String index, String name, + Namespace namespace, NodeType type, + String value, Namespace valueNs, + Object appInfo) throws SvcLogicException { + // TODO : to be implemented + return null; + } +} diff --git a/restconf-client/provider/src/main/java/org/onap/ccsdk/sli/plugins/yangserializers/pnserializer/SingleInstanceNode.java b/restconf-client/provider/src/main/java/org/onap/ccsdk/sli/plugins/yangserializers/pnserializer/SingleInstanceNode.java new file mode 100644 index 000000000..6eb24c1a4 --- /dev/null +++ b/restconf-client/provider/src/main/java/org/onap/ccsdk/sli/plugins/yangserializers/pnserializer/SingleInstanceNode.java @@ -0,0 +1,33 @@ +/*- + * ============LICENSE_START======================================================= + * ONAP - CCSDK + * ================================================================================ + * Copyright (C) 2018 Huawei Technologies Co., Ltd. All rights reserved. + * ================================================================================ + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============LICENSE_END========================================================= + */ + +package org.onap.ccsdk.sli.plugins.yangserializers.pnserializer; + +/** + * Representation of single instance node in properties data tree. + */ +public class SingleInstanceNode extends InnerNode implements DataNodeChild { + + public SingleInstanceNode(String name, Namespace namespace, String uri, + PropertiesNode parent, Object appInfo, + NodeType nodeType) { + super(name, namespace, uri, parent, appInfo, nodeType); + } +} -- cgit 1.2.3-korg From 21190939f08b40c46f908fefabf8cc13e7365f2a Mon Sep 17 00:00:00 2001 From: Vidyashree Rama Date: Fri, 17 Aug 2018 12:21:05 +0530 Subject: Implementation for properties node serializer properties node serializer implementation Issue-ID: CCSDK-378 Change-Id: I4eeecb45227e4152d9ff81551fd98efdd1371f84 Signed-off-by: Vidyashree Rama --- restconf-client/provider/pom.xml | 6 + .../yangserializers/pnserializer/InnerNode.java | 133 ++++++++- .../pnserializer/LeafListHolderNode.java | 11 +- .../pnserializer/ListHolderNode.java | 11 +- .../MdsalPropertiesNodeSerializer.java | 84 +++++- .../pnserializer/MdsalPropertiesNodeUtils.java | 297 +++++++++++++++++++++ .../yangserializers/pnserializer/RootNode.java | 129 ++++++++- 7 files changed, 645 insertions(+), 26 deletions(-) create mode 100644 restconf-client/provider/src/main/java/org/onap/ccsdk/sli/plugins/yangserializers/pnserializer/MdsalPropertiesNodeUtils.java (limited to 'restconf-client/provider') diff --git a/restconf-client/provider/pom.xml b/restconf-client/provider/pom.xml index 5a74d8fc0..46e000094 100755 --- a/restconf-client/provider/pom.xml +++ b/restconf-client/provider/pom.xml @@ -70,5 +70,11 @@ properties-node-provider 0.3.0-SNAPSHOT + + org.opendaylight.yangtools + yang-data-impl + 2.0.3 + + diff --git a/restconf-client/provider/src/main/java/org/onap/ccsdk/sli/plugins/yangserializers/pnserializer/InnerNode.java b/restconf-client/provider/src/main/java/org/onap/ccsdk/sli/plugins/yangserializers/pnserializer/InnerNode.java index 21f0b7c03..063c3d050 100644 --- a/restconf-client/provider/src/main/java/org/onap/ccsdk/sli/plugins/yangserializers/pnserializer/InnerNode.java +++ b/restconf-client/provider/src/main/java/org/onap/ccsdk/sli/plugins/yangserializers/pnserializer/InnerNode.java @@ -21,10 +21,22 @@ package org.onap.ccsdk.sli.plugins.yangserializers.pnserializer; import org.onap.ccsdk.sli.core.sli.SvcLogicException; +import org.opendaylight.yangtools.yang.model.api.AugmentationSchemaNode; +import org.opendaylight.yangtools.yang.model.api.DataSchemaNode; import java.util.HashMap; import java.util.Map; +import static org.onap.ccsdk.sli.plugins.yangserializers.pnserializer.MdsalPropertiesNodeUtils.addToAugmentations; +import static org.onap.ccsdk.sli.plugins.yangserializers.pnserializer.MdsalPropertiesNodeUtils.createNode; +import static org.onap.ccsdk.sli.plugins.yangserializers.pnserializer.MdsalPropertiesNodeUtils.getAugmentationNode; +import static org.onap.ccsdk.sli.plugins.yangserializers.pnserializer.MdsalPropertiesNodeUtils.getUri; +import static org.onap.ccsdk.sli.plugins.yangserializers.pnserializer.MdsalPropertiesNodeUtils.isNamespaceAsParent; +import static org.onap.ccsdk.sli.plugins.yangserializers.pnserializer.MdsalPropertiesNodeUtils.resolveName; +import static org.onap.ccsdk.sli.plugins.yangserializers.pnserializer.NodeType.MULTI_INSTANCE_HOLDER_NODE; +import static org.onap.ccsdk.sli.plugins.yangserializers.pnserializer.NodeType.MULTI_INSTANCE_LEAF_HOLDER_NODE; +import static org.opendaylight.yangtools.yang.data.impl.schema.SchemaUtils.findCorrespondingAugment; + /** * Abstraction of an entity that represents an inner node to properties data * tree. @@ -62,8 +74,31 @@ public abstract class InnerNode extends PropertiesNode { public PropertiesNode addChild(String name, Namespace namespace, NodeType type, Object appInfo) throws SvcLogicException { - // TODO : to be implemented - return null; + PropertiesNode node = ((PropertiesNode) children.get(name)); + if (node != null) { + return node; + } + + // get augment schema, if it is augmented node + AugmentationSchemaNode augSchema = null; + if (((DataSchemaNode) appInfo).isAugmenting()) { + augSchema = findCorrespondingAugment(((DataSchemaNode) this.appInfo()), ((DataSchemaNode) appInfo)); + node = getAugmentationNode(augSchema, this, name); + } + + // create node based on type + if (node == null) { + String uri = getUri(this, name, namespace); + node = createNode(name, namespace, uri, this, appInfo, type); + } + + // If namespace is not same as parent then it is augmented node + if (augSchema != null && !isNamespaceAsParent(this, node)) { + addToAugmentations(augSchema, this, node); + } else { + children.put(name, ((T) node)); + } + return node; } @Override @@ -71,16 +106,65 @@ public abstract class InnerNode extends PropertiesNode { NodeType type, String value, Namespace valuens, Object appInfo) throws SvcLogicException { - // TODO : to be implemented - return null; + LeafNode node = ((LeafNode) children.get(name)); + if (node != null) { + return node; + } + + AugmentationSchemaNode augSchema = null; + if (((DataSchemaNode) appInfo).isAugmenting()) { + augSchema = findCorrespondingAugment(((DataSchemaNode) this.appInfo()), + ((DataSchemaNode) appInfo)); + } + + String uri = getUri(this, name, namespace); + node = new LeafNode(name, namespace, uri, this, + appInfo, type, value); + + if (augSchema != null && !isNamespaceAsParent(this, node)) { + addToAugmentations(augSchema, this, node); + } else { + children.put(name, ((T) node)); + } + return node; } @Override public PropertiesNode addChild(String index, String name, Namespace namespace, NodeType type, Object appInfo) throws SvcLogicException { - // TODO : to be implemented - return null; + String localname = resolveName(name); + PropertiesNode node = ((PropertiesNode) children.get(localname)); + + if (node == null) { + AugmentationSchemaNode augSchema = null; + if (((DataSchemaNode) appInfo).isAugmenting()) { + augSchema = findCorrespondingAugment(((DataSchemaNode) this.appInfo()), + ((DataSchemaNode) appInfo)); + node = getAugmentationNode(augSchema, this, localname); + } + + if (node == null) { + String uri = getUri(this, name, namespace); + node = new ListHolderNode(localname, namespace, uri, + this, appInfo, MULTI_INSTANCE_HOLDER_NODE); + } + + if (augSchema != null && !isNamespaceAsParent(this, node)) { + addToAugmentations(augSchema, this, node); + } else { + children.put(localname, ((T) node)); + } + + node = node.addChild(index, localname, namespace, type, appInfo); + } else if (node instanceof ListHolderNode) { + ListHolderChild child = ((ListHolderNode) node).child(index); + node = (child != null ? ((MultiInstanceNode) child) : + node.addChild(index, localname, namespace, type, appInfo)); + } else { + throw new SvcLogicException("Duplicate node exist with same node"); + } + return node; } @Override @@ -88,7 +172,40 @@ public abstract class InnerNode extends PropertiesNode { Namespace namespace, NodeType type, String value, Namespace valueNs, Object appInfo) throws SvcLogicException { - // TODO : to be implemented - return null; + String localName = resolveName(name); + PropertiesNode node = ((PropertiesNode) children.get(localName)); + + if (node == null) { + + AugmentationSchemaNode augSchema = null; + if (((DataSchemaNode) appInfo).isAugmenting()) { + augSchema = findCorrespondingAugment(((DataSchemaNode) this.appInfo()), + ((DataSchemaNode) appInfo)); + node = getAugmentationNode(augSchema, this, localName); + } + + if (node == null) { + String uri = getUri(this, name, namespace); + node = new LeafListHolderNode(localName, namespace, uri, this, + appInfo, MULTI_INSTANCE_LEAF_HOLDER_NODE); + } + + if (augSchema != null && !isNamespaceAsParent(this, node)) { + addToAugmentations(augSchema, this, node); + } else { + children.put(localName, ((T) node)); + } + + node = node.addChild(index, localName, namespace, type, value, null, appInfo); + } else if (node instanceof LeafListHolderNode) { + LeafNode child = ((LeafNode) ((HolderNode) node).child(index)); + node = (child != null ? child : node.addChild(index, localName, + namespace, type, + value, null, + appInfo)); + } else { + throw new SvcLogicException("Duplicate node exist with same node"); + } + return node; } } diff --git a/restconf-client/provider/src/main/java/org/onap/ccsdk/sli/plugins/yangserializers/pnserializer/LeafListHolderNode.java b/restconf-client/provider/src/main/java/org/onap/ccsdk/sli/plugins/yangserializers/pnserializer/LeafListHolderNode.java index aa10e3307..94892dcac 100644 --- a/restconf-client/provider/src/main/java/org/onap/ccsdk/sli/plugins/yangserializers/pnserializer/LeafListHolderNode.java +++ b/restconf-client/provider/src/main/java/org/onap/ccsdk/sli/plugins/yangserializers/pnserializer/LeafListHolderNode.java @@ -75,7 +75,14 @@ public class LeafListHolderNode extends HolderNode implemen Namespace namespace, NodeType type, String value, Namespace valueNs, Object appInfo) throws SvcLogicException { - // TODO : to be implemented - return null; + LeafNode node = ((LeafNode) children().get(index)); + if (index == null) { + index = String.valueOf(children().size()); + } + String uri = this.uri() + "[" + index + "]"; + node = (node != null) ? node : new LeafNode(name, namespace, uri, + this, appInfo, type, value); + children().put(index, node); + return node; } } diff --git a/restconf-client/provider/src/main/java/org/onap/ccsdk/sli/plugins/yangserializers/pnserializer/ListHolderNode.java b/restconf-client/provider/src/main/java/org/onap/ccsdk/sli/plugins/yangserializers/pnserializer/ListHolderNode.java index 9d1168b8f..ba9da54cf 100644 --- a/restconf-client/provider/src/main/java/org/onap/ccsdk/sli/plugins/yangserializers/pnserializer/ListHolderNode.java +++ b/restconf-client/provider/src/main/java/org/onap/ccsdk/sli/plugins/yangserializers/pnserializer/ListHolderNode.java @@ -52,8 +52,15 @@ public class ListHolderNode extends HolderNode implements DataN public PropertiesNode addChild(String index, String name, Namespace namespace, NodeType type, Object appInfo) throws SvcLogicException { - // TODO : to be implemented - return null; + MultiInstanceNode node = ((MultiInstanceNode) children().get(index)); + if (index == null) { + index = String.valueOf(children().size()); + } + String uri = this.uri() + "[" + index + "]"; + node = (node != null) ? node : new MultiInstanceNode(name, namespace, uri, + this, appInfo, type); + children().put(index, node); + return node; } @Override diff --git a/restconf-client/provider/src/main/java/org/onap/ccsdk/sli/plugins/yangserializers/pnserializer/MdsalPropertiesNodeSerializer.java b/restconf-client/provider/src/main/java/org/onap/ccsdk/sli/plugins/yangserializers/pnserializer/MdsalPropertiesNodeSerializer.java index 05e1ac1e6..405e24127 100644 --- a/restconf-client/provider/src/main/java/org/onap/ccsdk/sli/plugins/yangserializers/pnserializer/MdsalPropertiesNodeSerializer.java +++ b/restconf-client/provider/src/main/java/org/onap/ccsdk/sli/plugins/yangserializers/pnserializer/MdsalPropertiesNodeSerializer.java @@ -20,13 +20,25 @@ package org.onap.ccsdk.sli.plugins.yangserializers.pnserializer; +import org.onap.ccsdk.sli.core.sli.SvcLogicException; +import org.opendaylight.yangtools.yang.model.api.Module; import org.opendaylight.yangtools.yang.model.api.SchemaContext; import org.opendaylight.yangtools.yang.model.api.SchemaNode; -import org.slf4j.Logger; +import org.opendaylight.yangtools.yang.model.util.SchemaContextUtil; import java.util.Map; -import static org.slf4j.LoggerFactory.getLogger; +import static org.onap.ccsdk.sli.plugins.yangserializers.pnserializer.MdsalPropertiesNodeUtils.getChildSchemaNode; +import static org.onap.ccsdk.sli.plugins.yangserializers.pnserializer.MdsalPropertiesNodeUtils.getIndex; +import static org.onap.ccsdk.sli.plugins.yangserializers.pnserializer.MdsalPropertiesNodeUtils.getListName; +import static org.onap.ccsdk.sli.plugins.yangserializers.pnserializer.MdsalPropertiesNodeUtils.getNamespace; +import static org.onap.ccsdk.sli.plugins.yangserializers.pnserializer.MdsalPropertiesNodeUtils.getNodeType; +import static org.onap.ccsdk.sli.plugins.yangserializers.pnserializer.MdsalPropertiesNodeUtils.getRevision; +import static org.onap.ccsdk.sli.plugins.yangserializers.pnserializer.MdsalPropertiesNodeUtils.resolveName; +import static org.onap.ccsdk.sli.plugins.yangserializers.pnserializer.NodeType.MULTI_INSTANCE_LEAF_NODE; +import static org.onap.ccsdk.sli.plugins.yangserializers.pnserializer.NodeType.MULTI_INSTANCE_NODE; +import static org.onap.ccsdk.sli.plugins.yangserializers.pnserializer.NodeType.SINGLE_INSTANCE_LEAF_NODE; +import static org.onap.ccsdk.sli.plugins.yangserializers.pnserializer.NodeType.SINGLE_INSTANCE_NODE; /** * Representation of mdsal based properties node serializer implementation. @@ -35,7 +47,6 @@ public class MdsalPropertiesNodeSerializer extends PropertiesNodeSerializer paramMap) { - return null; + public PropertiesNode encode(Map paramMap) throws SvcLogicException { + curSchema = schemaNode(); + String nodeInUri[] = uri().split("\\/"); + String lastNodeName = nodeInUri[nodeInUri.length - 1]; + String rootUri = uri().replaceAll("\\/", "\\."); + node = createRootNode(lastNodeName, rootUri); + + for (Map.Entry entry : paramMap.entrySet()) { + String[] names = entry.getKey().split("\\."); + for (int i = 0; i < names.length; i++) { + if (i < nodeInUri.length) { + if (!(nodeInUri[i].equals(names[i]))) { + break; + } + } else { + createPropertyNode(i, names.length, names[i], + entry.getValue()); + } + } + } + return node; } @Override @@ -58,4 +89,45 @@ public class MdsalPropertiesNodeSerializer extends PropertiesNodeSerializer 1; + } + + /** + * Returns name of the property after pruning namespace and + * index if the property is multi instance. + * + * @param name name of the property + * @return name of the property + */ + public static String resolveName(String name) { + String localName = getListName(name); + final int lastIndexOfColon = localName.lastIndexOf(":"); + if (lastIndexOfColon != -1) { + localName = localName.substring(lastIndexOfColon + 1); + } + return localName; + } + + /** + * Adds current node to parent's augmentation map. + * + * @param augSchema augment schema + * @param parent parent property node + * @param curNode current property node + */ + public static void addToAugmentations(AugmentationSchemaNode augSchema, + PropertiesNode parent, + PropertiesNode curNode) { + Collection childsFromAugmentation = parent + .augmentations().get(augSchema); + if (!childsFromAugmentation.isEmpty()) { + for (PropertiesNode pNode : childsFromAugmentation) { + if (pNode.name().equals(curNode.name())) { + return; + } + } + } + parent.augmentations().put(augSchema, curNode); + } + + + /** + * Returns augmented properties node if it is already + * added in properties tree. + * + * @param augSchema augmented schema node + * @param parent parent properties node + * @param name name of the properties + * @return augmented properties node if it is already added + */ + public static PropertiesNode getAugmentationNode( + AugmentationSchemaNode augSchema, + PropertiesNode parent, String name) { + if (augSchema != null) { + Collection childsFromAugmentation = parent + .augmentations().get(augSchema); + if (!childsFromAugmentation.isEmpty()) { + for (PropertiesNode pNode : childsFromAugmentation) { + if (pNode.name().equals(name)) { + return pNode; + } + } + } + } + return null; + } + + /** + * Creates uri with specified name and namespace. + * + * @param parent parent properties node + * @param name name of the node + * @param ns namespace of the node + * @return uri with specified name and namespace + */ + public static String getUri(PropertiesNode parent, String name, + Namespace ns) { + String uri = name; + if (!(parent.namespace().moduleNs().equals(ns.moduleNs()))) { + uri = ns.moduleName() + ":" + name; + } + return parent.uri() + "." + uri; + } + + /** + * Creates new properties with specified parameters. + * + * @param name name of the properties node + * @param namespace namespace of the properties node + * @param uri uri of the properties node + * @param parent parent node + * @param appInfo application info + * @param type node type + * @return new properties node + */ + public static PropertiesNode createNode(String name, Namespace namespace, + String uri, PropertiesNode parent, + Object appInfo, NodeType type) { + switch (type) { + case SINGLE_INSTANCE_NODE: + return new SingleInstanceNode(name, namespace, uri, parent, appInfo, type); + case MULTI_INSTANCE_HOLDER_NODE: + return new ListHolderNode(name, namespace, uri, parent, appInfo, type); + case MULTI_INSTANCE_LEAF_HOLDER_NODE: + return new LeafListHolderNode(name, namespace, uri, parent, appInfo, type); + default: + throw new RuntimeException("Invalid node type"); + } + } + + /** + * Returns true if namespace is same as parent's namespace. + * + * @param parent parent property node + * @param curNode current property node + * @return true if namespace is same as parent namespace + */ + public static boolean isNamespaceAsParent(PropertiesNode parent, + PropertiesNode curNode) { + return parent.namespace().moduleNs().equals(curNode.namespace().moduleNs()); + } + + /** + * Returns namespace. + * + * @param childName name of the property + * @param ctx schema context + * @param parent parent property node + * @return namespace + */ + public static Namespace getNamespace(String childName, + SchemaContext ctx, + PropertiesNode parent) { + int lastIndexOfColon = childName.lastIndexOf(":"); + if (lastIndexOfColon != -1) { + String moduleName = childName.substring(0, lastIndexOfColon); + Iterator it = ctx.findModules(moduleName).iterator(); + if (!it.hasNext()) { + // module is not present in context + return null; + } + Module m = it.next(); + return new Namespace(moduleName, m.getQNameModule().getNamespace(), + getRevision(m.getRevision())); + } + Namespace parentNs = parent.namespace(); + return new Namespace(parentNs.moduleName(), parentNs.moduleNs(), + parentNs.revision()); + } + + /** + * Returns child schema node. + * + * @param curSchema current schema node + * @param name name of the property + * @param namespace namespace of the property + * @return child schema node + */ + public static SchemaNode getChildSchemaNode(SchemaNode curSchema, + String name, + Namespace namespace) { + if (namespace == null) { + return null; + } + + QName qname = QName.create(namespace.moduleNs(), + Revision.of(namespace.revision()), name); + + // YANG RPC will not be instance of DataSchemaNode + if (curSchema instanceof DataSchemaNode) { + Deque schemaNodeDeque = ParserStreamUtils. + findSchemaNodeByNameAndNamespace(((DataSchemaNode) + curSchema), name, namespace.moduleNs()); + if (schemaNodeDeque.isEmpty()) { + // could not find schema node + return null; + } + + DataSchemaNode schemaNode = schemaNodeDeque.pop(); + if (schemaNodeDeque.isEmpty()){ + // Simple node + return schemaNode; + } + + // node is child of Choice/case + return SchemaUtils.findSchemaForChild(((ChoiceSchemaNode) schemaNode), + qname); + } else { + return SchemaUtils.findDataChildSchemaByQName(curSchema, qname); + } + } + + /** + * Returns the property node type. + * + * @param index current index + * @param length length of the properties + * @param name name of the property + * @return the property node type + */ + public static NodeType getNodeType(int index, int length, String name) { + if (index == length-1) { + return (isListEntry(name) ? NodeType.MULTI_INSTANCE_LEAF_NODE : + NodeType.SINGLE_INSTANCE_LEAF_NODE); + } else { + return (isListEntry(name) ? NodeType.MULTI_INSTANCE_NODE : + NodeType.SINGLE_INSTANCE_NODE); + } + } + + /** + * Returns revision in string. + * + * @param r YANG revision + * @return revision in string + */ + public static String getRevision(Optional r) { + return (r.isPresent()) ? r.get().toString() : null; + } +} diff --git a/restconf-client/provider/src/main/java/org/onap/ccsdk/sli/plugins/yangserializers/pnserializer/RootNode.java b/restconf-client/provider/src/main/java/org/onap/ccsdk/sli/plugins/yangserializers/pnserializer/RootNode.java index 5cb8e4c97..0159683ac 100644 --- a/restconf-client/provider/src/main/java/org/onap/ccsdk/sli/plugins/yangserializers/pnserializer/RootNode.java +++ b/restconf-client/provider/src/main/java/org/onap/ccsdk/sli/plugins/yangserializers/pnserializer/RootNode.java @@ -21,10 +21,22 @@ package org.onap.ccsdk.sli.plugins.yangserializers.pnserializer; import org.onap.ccsdk.sli.core.sli.SvcLogicException; +import org.opendaylight.yangtools.yang.model.api.AugmentationSchemaNode; +import org.opendaylight.yangtools.yang.model.api.DataSchemaNode; import java.util.HashMap; import java.util.Map; +import static org.onap.ccsdk.sli.plugins.yangserializers.pnserializer.MdsalPropertiesNodeUtils.addToAugmentations; +import static org.onap.ccsdk.sli.plugins.yangserializers.pnserializer.MdsalPropertiesNodeUtils.createNode; +import static org.onap.ccsdk.sli.plugins.yangserializers.pnserializer.MdsalPropertiesNodeUtils.getAugmentationNode; +import static org.onap.ccsdk.sli.plugins.yangserializers.pnserializer.MdsalPropertiesNodeUtils.getUri; +import static org.onap.ccsdk.sli.plugins.yangserializers.pnserializer.MdsalPropertiesNodeUtils.isNamespaceAsParent; +import static org.onap.ccsdk.sli.plugins.yangserializers.pnserializer.MdsalPropertiesNodeUtils.resolveName; +import static org.onap.ccsdk.sli.plugins.yangserializers.pnserializer.NodeType.MULTI_INSTANCE_HOLDER_NODE; +import static org.onap.ccsdk.sli.plugins.yangserializers.pnserializer.NodeType.MULTI_INSTANCE_LEAF_HOLDER_NODE; +import static org.opendaylight.yangtools.yang.data.impl.schema.SchemaUtils.findCorrespondingAugment; + /** * Abstraction of node representing properties data tree. */ @@ -59,8 +71,32 @@ public class RootNode extends PropertiesNode { public PropertiesNode addChild(String name, Namespace namespace, NodeType type, Object appInfo) throws SvcLogicException { - // TODO : to be implemented - return null; + PropertiesNode node = ((PropertiesNode) children.get(name)); + if (node != null) { + return node; + } + + // get augment schema, if it is augmented node + AugmentationSchemaNode augSchema = null; + if (((DataSchemaNode) appInfo).isAugmenting()) { + augSchema = findCorrespondingAugment(((DataSchemaNode) this.appInfo()), + ((DataSchemaNode) appInfo)); + node = getAugmentationNode(augSchema, this, name); + } + + // create node based on type, this api will be invoked only for these three types + if (node == null) { + String uri = getUri(this, name, namespace); + node = createNode(name, namespace, uri, this, appInfo, type); + } + + // If namespace is not same as parent then it is augmented node + if (augSchema != null && !isNamespaceAsParent(this, node)) { + addToAugmentations(augSchema, this, node); + } else { + children.put(name, ((T) node)); + } + return node; } @Override @@ -68,16 +104,63 @@ public class RootNode extends PropertiesNode { NodeType type, String value, Namespace valuens, Object appInfo) throws SvcLogicException { - // TODO : to be implemented - return null; + LeafNode node = ((LeafNode) children.get(name)); + if (node != null) { + return node; + } + + AugmentationSchemaNode augSchema = null; + if (((DataSchemaNode) appInfo).isAugmenting()) { + augSchema = findCorrespondingAugment(((DataSchemaNode) this.appInfo()), + ((DataSchemaNode) appInfo)); + } + + String uri = getUri(this, name, namespace); + node = new LeafNode(name, namespace, uri, this, + appInfo, type, value); + + if (augSchema != null && !isNamespaceAsParent(this, node)) { + addToAugmentations(augSchema, this, node); + } else { + children.put(name, ((T) node)); + } + return node; } @Override public PropertiesNode addChild(String index, String name, Namespace namespace, NodeType type, Object appInfo) throws SvcLogicException { - // TODO : to be implemented - return null; + String localname = resolveName(name); + PropertiesNode node = ((PropertiesNode) children.get(localname)); + if (node == null) { + String uri = getUri(this, name, namespace); + AugmentationSchemaNode augSchema = null; + if (((DataSchemaNode) appInfo).isAugmenting()) { + augSchema = findCorrespondingAugment(((DataSchemaNode) this.appInfo()), + ((DataSchemaNode) appInfo)); + node = getAugmentationNode(augSchema, this, localname); + } + + if (node == null) { + node = new ListHolderNode(localname, namespace, uri, + this, appInfo, MULTI_INSTANCE_HOLDER_NODE); + } + + if (augSchema != null && !isNamespaceAsParent(this, node)) { + addToAugmentations(augSchema, this, node); + } else { + children.put(localname, ((T) node)); + } + node = node.addChild(index, localname, namespace, type, appInfo); + } else if (node instanceof ListHolderNode) { + ListHolderChild child = ((ListHolderNode) node).child(index); + node = (child != null ? ((MultiInstanceNode) child) : + node.addChild(index, localname, namespace, type, appInfo)); + } else { + throw new SvcLogicException("Duplicate node exist with same node"); + } + return node; } @Override @@ -85,7 +168,37 @@ public class RootNode extends PropertiesNode { Namespace namespace, NodeType type, String value, Namespace valueNs, Object appInfo) throws SvcLogicException { - // TODO : to be implemented - return null; + String localName = resolveName(name); + PropertiesNode node = ((PropertiesNode) children.get(localName)); + if (node == null) { + String uri = getUri(this, name, namespace); + AugmentationSchemaNode augSchema = null; + if (((DataSchemaNode) appInfo).isAugmenting()) { + augSchema = findCorrespondingAugment(((DataSchemaNode) this.appInfo()), + ((DataSchemaNode) appInfo)); + node = getAugmentationNode(augSchema, this, localName); + } + + if (node == null) { + node = new LeafListHolderNode(localName, namespace, uri, this, + appInfo, MULTI_INSTANCE_LEAF_HOLDER_NODE); + } + + if (augSchema != null && !isNamespaceAsParent(this, node)) { + addToAugmentations(augSchema, this, node); + } else { + children.put(localName, ((T) node)); + } + node = node.addChild(index, localName, namespace, type, value, null, appInfo); + } else if (node instanceof LeafListHolderNode) { + LeafNode child = ((LeafNode) ((HolderNode) node).child(index)); + node = (child != null ? child : node.addChild(index, localName, + namespace, type, + value, null, + appInfo)); + } else { + throw new SvcLogicException("Duplicate node exist with same node"); + } + return node; } } -- cgit 1.2.3-korg From 06f4a6531b11b1e841f4c63b968d2b8a7a65eaf6 Mon Sep 17 00:00:00 2001 From: janani b Date: Fri, 17 Aug 2018 15:32:26 +0530 Subject: Outline code for Restconf Api Call Node Initial level implementation for Restconf api call node Issue-ID: CCSDK-372 Change-Id: I9d77f4c7806b0e239a3ecb134424f4fc09d6865e Signed-off-by: janani b --- restconf-client/provider/pom.xml | 20 ++++- .../yangserializers/dfserializer/Annotation.java | 7 ++ .../yangserializers/dfserializer/DataFormat.java | 8 ++ .../dfserializer/DataFormatSerializer.java | 19 +++-- .../dfserializer/DataFormatSerializerContext.java | 52 ++++++++++--- .../dfserializer/DefaultJsonListener.java | 71 ++++++++++++++++++ .../dfserializer/DefaultJsonWalker.java | 60 +++++++++++++++ .../dfserializer/DefaultXmlListener.java | 58 +++++++++++++++ .../dfserializer/DefaultXmlWalker.java | 34 +++++++++ .../dfserializer/DfListenerFactory.java | 74 ++++++++++++++++++ .../dfserializer/DfSerializerFactory.java | 75 +++++++++++++++++++ .../yangserializers/dfserializer/JsonListener.java | 51 +++++++++++++ .../dfserializer/JsonSerializer.java | 12 ++- .../yangserializers/dfserializer/JsonWalker.java | 41 ++++++++++ .../dfserializer/MdsalSerializerHelper.java | 58 ++++++++++----- .../yangserializers/dfserializer/NodeType.java | 31 -------- .../dfserializer/PropertiesNodeJsonListener.java | 70 +++++++++++++++++ .../dfserializer/PropertiesNodeXmlListener.java | 80 ++++++++++++++++++++ .../dfserializer/SerializerHelper.java | 86 ++++++++++++--------- .../yangserializers/dfserializer/XmlListener.java | 49 ++++++++++++ .../yangserializers/dfserializer/XmlNodeType.java | 37 +++++++++ .../dfserializer/XmlSerializer.java | 12 ++- .../yangserializers/dfserializer/XmlWalker.java | 41 ++++++++++ .../dfserializer/YangParameters.java | 41 ++++++++++ .../pnserializer/DefaultPropertiesNodeWalker.java | 87 ++++++++++++++++++++++ .../pnserializer/PropertiesNodeListener.java | 55 ++++++++++++++ .../pnserializer/PropertiesNodeWalker.java | 35 +++++++++ 27 files changed, 1157 insertions(+), 107 deletions(-) create mode 100644 restconf-client/provider/src/main/java/org/onap/ccsdk/sli/plugins/yangserializers/dfserializer/DefaultJsonListener.java create mode 100644 restconf-client/provider/src/main/java/org/onap/ccsdk/sli/plugins/yangserializers/dfserializer/DefaultJsonWalker.java create mode 100644 restconf-client/provider/src/main/java/org/onap/ccsdk/sli/plugins/yangserializers/dfserializer/DefaultXmlListener.java create mode 100644 restconf-client/provider/src/main/java/org/onap/ccsdk/sli/plugins/yangserializers/dfserializer/DefaultXmlWalker.java create mode 100644 restconf-client/provider/src/main/java/org/onap/ccsdk/sli/plugins/yangserializers/dfserializer/DfListenerFactory.java create mode 100644 restconf-client/provider/src/main/java/org/onap/ccsdk/sli/plugins/yangserializers/dfserializer/DfSerializerFactory.java create mode 100644 restconf-client/provider/src/main/java/org/onap/ccsdk/sli/plugins/yangserializers/dfserializer/JsonListener.java create mode 100644 restconf-client/provider/src/main/java/org/onap/ccsdk/sli/plugins/yangserializers/dfserializer/JsonWalker.java delete mode 100644 restconf-client/provider/src/main/java/org/onap/ccsdk/sli/plugins/yangserializers/dfserializer/NodeType.java create mode 100644 restconf-client/provider/src/main/java/org/onap/ccsdk/sli/plugins/yangserializers/dfserializer/PropertiesNodeJsonListener.java create mode 100644 restconf-client/provider/src/main/java/org/onap/ccsdk/sli/plugins/yangserializers/dfserializer/PropertiesNodeXmlListener.java create mode 100644 restconf-client/provider/src/main/java/org/onap/ccsdk/sli/plugins/yangserializers/dfserializer/XmlListener.java create mode 100644 restconf-client/provider/src/main/java/org/onap/ccsdk/sli/plugins/yangserializers/dfserializer/XmlNodeType.java create mode 100644 restconf-client/provider/src/main/java/org/onap/ccsdk/sli/plugins/yangserializers/dfserializer/XmlWalker.java create mode 100644 restconf-client/provider/src/main/java/org/onap/ccsdk/sli/plugins/yangserializers/dfserializer/YangParameters.java create mode 100644 restconf-client/provider/src/main/java/org/onap/ccsdk/sli/plugins/yangserializers/pnserializer/DefaultPropertiesNodeWalker.java create mode 100644 restconf-client/provider/src/main/java/org/onap/ccsdk/sli/plugins/yangserializers/pnserializer/PropertiesNodeListener.java create mode 100644 restconf-client/provider/src/main/java/org/onap/ccsdk/sli/plugins/yangserializers/pnserializer/PropertiesNodeWalker.java (limited to 'restconf-client/provider') diff --git a/restconf-client/provider/pom.xml b/restconf-client/provider/pom.xml index 46e000094..8995f1dd3 100755 --- a/restconf-client/provider/pom.xml +++ b/restconf-client/provider/pom.xml @@ -75,6 +75,24 @@ yang-data-impl 2.0.3 - + + com.fasterxml.jackson.core + jackson-databind + + + dom4j + dom4j + 1.6.1 + + + com.google.code.gson + gson + 2.7 + + + org.onap.ccsdk.sli.plugins + restapi-call-node-provider + 0.3.0-SNAPSHOT + diff --git a/restconf-client/provider/src/main/java/org/onap/ccsdk/sli/plugins/yangserializers/dfserializer/Annotation.java b/restconf-client/provider/src/main/java/org/onap/ccsdk/sli/plugins/yangserializers/dfserializer/Annotation.java index 7271c3d71..185f70ba0 100644 --- a/restconf-client/provider/src/main/java/org/onap/ccsdk/sli/plugins/yangserializers/dfserializer/Annotation.java +++ b/restconf-client/provider/src/main/java/org/onap/ccsdk/sli/plugins/yangserializers/dfserializer/Annotation.java @@ -25,7 +25,14 @@ package org.onap.ccsdk.sli.plugins.yangserializers.dfserializer; */ public class Annotation { + /** + * Name of the annotation. + */ private String name; + + /** + * Value of the annotation. + */ private String value; /** diff --git a/restconf-client/provider/src/main/java/org/onap/ccsdk/sli/plugins/yangserializers/dfserializer/DataFormat.java b/restconf-client/provider/src/main/java/org/onap/ccsdk/sli/plugins/yangserializers/dfserializer/DataFormat.java index 6fb11e70f..c692f1dd2 100644 --- a/restconf-client/provider/src/main/java/org/onap/ccsdk/sli/plugins/yangserializers/dfserializer/DataFormat.java +++ b/restconf-client/provider/src/main/java/org/onap/ccsdk/sli/plugins/yangserializers/dfserializer/DataFormat.java @@ -24,6 +24,14 @@ package org.onap.ccsdk.sli.plugins.yangserializers.dfserializer; * Representation of data format. */ public enum DataFormat { + + /** + * XML data format. + */ XML, + + /** + * JSON data format. + */ JSON } diff --git a/restconf-client/provider/src/main/java/org/onap/ccsdk/sli/plugins/yangserializers/dfserializer/DataFormatSerializer.java b/restconf-client/provider/src/main/java/org/onap/ccsdk/sli/plugins/yangserializers/dfserializer/DataFormatSerializer.java index e703b1732..57280e2e9 100644 --- a/restconf-client/provider/src/main/java/org/onap/ccsdk/sli/plugins/yangserializers/dfserializer/DataFormatSerializer.java +++ b/restconf-client/provider/src/main/java/org/onap/ccsdk/sli/plugins/yangserializers/dfserializer/DataFormatSerializer.java @@ -29,19 +29,26 @@ import java.util.Map; */ public abstract class DataFormatSerializer { + /** + * Data format type of the serializer. + */ private DataFormat dataFormat; + + /** + * Data format serializer context. + */ private DataFormatSerializerContext serializerContext; /** * Creates an instance of data format serializer. * - * @param dataFormat type of data format - * @param serializerContext data format serializer context + * @param d type of data format + * @param s data format serializer context */ - protected DataFormatSerializer(DataFormat dataFormat, - DataFormatSerializerContext serializerContext) { - this.dataFormat = dataFormat; - this.serializerContext = serializerContext; + protected DataFormatSerializer(DataFormat d, + DataFormatSerializerContext s) { + this.dataFormat = d; + this.serializerContext = s; } /** diff --git a/restconf-client/provider/src/main/java/org/onap/ccsdk/sli/plugins/yangserializers/dfserializer/DataFormatSerializerContext.java b/restconf-client/provider/src/main/java/org/onap/ccsdk/sli/plugins/yangserializers/dfserializer/DataFormatSerializerContext.java index e2ead53fb..919e82af3 100644 --- a/restconf-client/provider/src/main/java/org/onap/ccsdk/sli/plugins/yangserializers/dfserializer/DataFormatSerializerContext.java +++ b/restconf-client/provider/src/main/java/org/onap/ccsdk/sli/plugins/yangserializers/dfserializer/DataFormatSerializerContext.java @@ -20,6 +20,8 @@ package org.onap.ccsdk.sli.plugins.yangserializers.dfserializer; +import org.onap.ccsdk.sli.plugins.yangserializers.pnserializer.PropertiesNodeSerializer; + import java.util.Map; /** @@ -27,26 +29,45 @@ import java.util.Map; */ public class DataFormatSerializerContext { + /** + * Data format listener. + */ private Listener listener; + + /** + * URI corresponding to the instance identifier. + */ private String uri; + + /** + * Protocol annotation. + */ private Map protocolAnnotation; + /** + * Properties node serializer. + */ + private PropertiesNodeSerializer propNodeSerializer; + /** * Creates an instance of data format serializer context. * - * @param listener data format listener - * @param uri URI corresponding to instance identifier - * @param protocolAnnotation protocol annotations + * @param l data format listener + * @param u URI corresponding to instance identifier + * @param p protocol annotations + * @param s properties node serializer */ - public DataFormatSerializerContext(Listener listener, String uri, - Map protocolAnnotation) { - this.listener = listener; - this.uri = uri; - this.protocolAnnotation = protocolAnnotation; + public DataFormatSerializerContext(Listener l, String u, + Map p, + PropertiesNodeSerializer s) { + listener = l; + uri = u; + protocolAnnotation = p; + propNodeSerializer = s; } /** - * Retruns data format listener. + * Returns the data format listener. * * @return data format listener */ @@ -55,7 +76,7 @@ public class DataFormatSerializerContext { } /** - * Returns URI. + * Returns the URI. * * @return URI */ @@ -64,11 +85,20 @@ public class DataFormatSerializerContext { } /** - * Returns protocol annotations. + * Returns the protocol annotations. * * @return protocol annotations */ public Map getProtocolAnnotation() { return protocolAnnotation; } + + /** + * Returns the properties node serializer. + * + * @return properties node serializer + */ + public PropertiesNodeSerializer getPropNodeSerializer() { + return propNodeSerializer; + } } \ No newline at end of file diff --git a/restconf-client/provider/src/main/java/org/onap/ccsdk/sli/plugins/yangserializers/dfserializer/DefaultJsonListener.java b/restconf-client/provider/src/main/java/org/onap/ccsdk/sli/plugins/yangserializers/dfserializer/DefaultJsonListener.java new file mode 100644 index 000000000..5e71eea3b --- /dev/null +++ b/restconf-client/provider/src/main/java/org/onap/ccsdk/sli/plugins/yangserializers/dfserializer/DefaultJsonListener.java @@ -0,0 +1,71 @@ +/*- + * ============LICENSE_START======================================================= + * ONAP - CCSDK + * ================================================================================ + * Copyright (C) 2018 Huawei Technologies Co., Ltd. All rights reserved. + * ================================================================================ + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============LICENSE_END========================================================= + */ + +package org.onap.ccsdk.sli.plugins.yangserializers.dfserializer; + +import com.fasterxml.jackson.databind.JsonNode; +import org.onap.ccsdk.sli.plugins.yangserializers.pnserializer.NodeType; + + +/** + * Representation of default implementation of JSON listener. + */ +public class DefaultJsonListener implements JsonListener { + + /** + * Serializer helper to convert to properties node. + */ + private SerializerHelper serializerHelper; + + /** + * Name of the current JSON node. + */ + private String name; + + /** + * Module name of the current JSON node. + */ + private String modName; + + /** + * Creates an instance of default json listener with its serializer helper. + * + * @param serializerHelper serializer helper + */ + public DefaultJsonListener(SerializerHelper serializerHelper) { + this.serializerHelper = serializerHelper; + } + + @Override + public void enterJsonNode(String nodeName, JsonNode node, NodeType nodeType) { + //TODO: Implementation code. + } + + @Override + public void exitJsonNode(JsonNode node) { + //TODO: Implementation code. + } + + @Override + public SerializerHelper serializerHelper() { + return serializerHelper; + } + +} diff --git a/restconf-client/provider/src/main/java/org/onap/ccsdk/sli/plugins/yangserializers/dfserializer/DefaultJsonWalker.java b/restconf-client/provider/src/main/java/org/onap/ccsdk/sli/plugins/yangserializers/dfserializer/DefaultJsonWalker.java new file mode 100644 index 000000000..20d4fa772 --- /dev/null +++ b/restconf-client/provider/src/main/java/org/onap/ccsdk/sli/plugins/yangserializers/dfserializer/DefaultJsonWalker.java @@ -0,0 +1,60 @@ +/*- + * ============LICENSE_START======================================================= + * ONAP - CCSDK + * ================================================================================ + * Copyright (C) 2018 Huawei Technologies Co., Ltd. All rights reserved. + * ================================================================================ + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============LICENSE_END========================================================= + */ + +package org.onap.ccsdk.sli.plugins.yangserializers.dfserializer; + +import com.fasterxml.jackson.databind.JsonNode; + +/** + * Implementation of JSON walker to walk through the nodes and process it. + */ +public class DefaultJsonWalker implements JsonWalker { + + @Override + public void walk(JsonListener listener, JsonNode jsonNode) { + //TODO: Implementation code. + } + + /** + * Processes single instance node or leaf, by adding the node to from + * JSON and walking through all its children recursively. + * + * @param key JSON name + * @param value JSON node + * @param listener JSON listener + */ + private void processSingleNode(String key, JsonNode value, + JsonListener listener) { + //TODO: Implementation code. + } + + /** + * Processes multi instance node or leaf, by adding the node to from JSON + * and walking through all its instance recursively. + * + * @param key JSON name + * @param value JSON node + * @param listener JSON listener + */ + private void processMultiNodes(String key, JsonNode value, + JsonListener listener) { + //TODO: Implementation code. + } +} diff --git a/restconf-client/provider/src/main/java/org/onap/ccsdk/sli/plugins/yangserializers/dfserializer/DefaultXmlListener.java b/restconf-client/provider/src/main/java/org/onap/ccsdk/sli/plugins/yangserializers/dfserializer/DefaultXmlListener.java new file mode 100644 index 000000000..7946d8d0d --- /dev/null +++ b/restconf-client/provider/src/main/java/org/onap/ccsdk/sli/plugins/yangserializers/dfserializer/DefaultXmlListener.java @@ -0,0 +1,58 @@ +/*- + * ============LICENSE_START======================================================= + * ONAP - CCSDK + * ================================================================================ + * Copyright (C) 2018 Huawei Technologies Co., Ltd. All rights reserved. + * ================================================================================ + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============LICENSE_END========================================================= + */ + +package org.onap.ccsdk.sli.plugins.yangserializers.dfserializer; + +import org.dom4j.Element; + +/** + * Representation of default implementation of XML listener. + */ +public class DefaultXmlListener implements XmlListener { + + /** + * Serializer helper to convert to properties node. + */ + private SerializerHelper serializerHelper; + + /** + * Creates an instance of default XML listener with its serializer helper. + * + * @param serializerHelper serializer helper + */ + public DefaultXmlListener(SerializerHelper serializerHelper) { + this.serializerHelper = serializerHelper; + } + + @Override + public void enterXmlElement(Element element, XmlNodeType nodeType) { + //TODO: Implementation code. + } + + @Override + public void exitXmlElement(Element element) { + //TODO: Implementation code. + } + + @Override + public SerializerHelper serializerHelper() { + return serializerHelper; + } + } diff --git a/restconf-client/provider/src/main/java/org/onap/ccsdk/sli/plugins/yangserializers/dfserializer/DefaultXmlWalker.java b/restconf-client/provider/src/main/java/org/onap/ccsdk/sli/plugins/yangserializers/dfserializer/DefaultXmlWalker.java new file mode 100644 index 000000000..cd2a3d494 --- /dev/null +++ b/restconf-client/provider/src/main/java/org/onap/ccsdk/sli/plugins/yangserializers/dfserializer/DefaultXmlWalker.java @@ -0,0 +1,34 @@ +/*- + * ============LICENSE_START======================================================= + * ONAP - CCSDK + * ================================================================================ + * Copyright (C) 2018 Huawei Technologies Co., Ltd. All rights reserved. + * ================================================================================ + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============LICENSE_END========================================================= + */ + +package org.onap.ccsdk.sli.plugins.yangserializers.dfserializer; + +import org.dom4j.Element; + +/** + * Implementation of XML walker to walk through the nodes and process it. + */ +public class DefaultXmlWalker implements XmlWalker { + + @Override + public void walk(XmlListener listener, Element xmlElement) { + //TODO: Implementation code. + } +} diff --git a/restconf-client/provider/src/main/java/org/onap/ccsdk/sli/plugins/yangserializers/dfserializer/DfListenerFactory.java b/restconf-client/provider/src/main/java/org/onap/ccsdk/sli/plugins/yangserializers/dfserializer/DfListenerFactory.java new file mode 100644 index 000000000..851f1b488 --- /dev/null +++ b/restconf-client/provider/src/main/java/org/onap/ccsdk/sli/plugins/yangserializers/dfserializer/DfListenerFactory.java @@ -0,0 +1,74 @@ +/*- + * ============LICENSE_START======================================================= + * ONAP - CCSDK + * ================================================================================ + * Copyright (C) 2018 Huawei Technologies Co., Ltd. All rights reserved. + * ================================================================================ + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============LICENSE_END========================================================= + */ + +package org.onap.ccsdk.sli.plugins.yangserializers.dfserializer; + +/** + * Represents the data format listener factory which will return JSON or XML + * listener according to the serializer helper. + */ +public final class DfListenerFactory { + + /** + * Returns the instance of the data format listener factory. + * + * @return instance of the data format listener factory + */ + public static DfListenerFactory instance() { + return DfListenerFactory.LazyHolder.INSTANCE; + } + + /** + * Bill pugh singleton pattern. Instance will not be instantiated until + * the lazy holder class is loaded via a call to the instance of method + * below. + */ + private static class LazyHolder { + private static final DfListenerFactory INSTANCE = + new DfListenerFactory(); + } + + /** + * Returns the data format listener by deciding it based on the format of + * the parameter. + * + * @param serHelper serializer helper + * @param params parameters + * @return data format listener + */ + public Listener getListener(SerializerHelper serHelper, + YangParameters params) { + Listener listener; + switch (params.format) { + case JSON: + listener = new DefaultJsonListener(serHelper); + break; + + case XML: + listener = new DefaultXmlListener(serHelper); + break; + + //TODO: DataFormat Exception code to be added. + default: + throw new IllegalArgumentException("In correct format"); + } + return listener; + } +} diff --git a/restconf-client/provider/src/main/java/org/onap/ccsdk/sli/plugins/yangserializers/dfserializer/DfSerializerFactory.java b/restconf-client/provider/src/main/java/org/onap/ccsdk/sli/plugins/yangserializers/dfserializer/DfSerializerFactory.java new file mode 100644 index 000000000..25b23fe26 --- /dev/null +++ b/restconf-client/provider/src/main/java/org/onap/ccsdk/sli/plugins/yangserializers/dfserializer/DfSerializerFactory.java @@ -0,0 +1,75 @@ +/*- + * ============LICENSE_START======================================================= + * ONAP - CCSDK + * ================================================================================ + * Copyright (C) 2018 Huawei Technologies Co., Ltd. All rights reserved. + * ================================================================================ + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============LICENSE_END========================================================= + */ + +package org.onap.ccsdk.sli.plugins.yangserializers.dfserializer; + +/** + * Represents the data format serializer factory which will return JSON or XML + * serializer according to the serializer context. + */ +public final class DfSerializerFactory { + + /** + * Returns the instance of the data format serializer factory. + * + * @return instance of the data format serializer factory + */ + public static DfSerializerFactory instance() { + return DfSerializerFactory.LazyHolder.INSTANCE; + } + + /** + * Bill pugh singleton pattern. Instance will not be instantiated until + * the lazy holder class is loaded via a call to the instance of method + * below. + */ + private static class LazyHolder { + private static final DfSerializerFactory INSTANCE = + new DfSerializerFactory(); + } + + /** + * Returns the data format serializer by deciding it based on the format of + * the parameter. + * + * @param serCtx serializer context + * @param params parameters + * @return data format serializer + */ + public DataFormatSerializer getSerializer(DataFormatSerializerContext + serCtx, + YangParameters params) { + DataFormatSerializer serializer; + switch (params.format) { + case JSON: + serializer = new JsonSerializer(serCtx); + break; + + case XML: + serializer = new XmlSerializer(serCtx); + break; + + //TODO: DataFormat Exception code to be added. + default: + throw new IllegalArgumentException("In correct format"); + } + return serializer; + } +} diff --git a/restconf-client/provider/src/main/java/org/onap/ccsdk/sli/plugins/yangserializers/dfserializer/JsonListener.java b/restconf-client/provider/src/main/java/org/onap/ccsdk/sli/plugins/yangserializers/dfserializer/JsonListener.java new file mode 100644 index 000000000..2a9220ac1 --- /dev/null +++ b/restconf-client/provider/src/main/java/org/onap/ccsdk/sli/plugins/yangserializers/dfserializer/JsonListener.java @@ -0,0 +1,51 @@ +/*- + * ============LICENSE_START======================================================= + * ONAP - CCSDK + * ================================================================================ + * Copyright (C) 2018 Huawei Technologies Co., Ltd. All rights reserved. + * ================================================================================ + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============LICENSE_END========================================================= + */ + +package org.onap.ccsdk.sli.plugins.yangserializers.dfserializer; + +import com.fasterxml.jackson.databind.JsonNode; +import org.onap.ccsdk.sli.plugins.yangserializers.pnserializer.NodeType; + +/** + * Abstraction of an entity which provides call back methods, which in turn + * are called by JSON walker while walking the JSON tree. This interface + * needs to be implemented by protocol, implementing listener based call + * while doing JSON walk. + */ +public interface JsonListener extends Listener { + + /** + * Call back invoked during JSON node entry. All other related + * information can be obtained from the JSON node. + * + * @param nodeName JSON node name + * @param node JSON node + * @param nodeType JSON node type + */ + void enterJsonNode(String nodeName, JsonNode node, NodeType nodeType); + + /** + * Call back invoked during JSON node exit. All the related information + * can be obtained from the JSON node. + * + * @param node JSON node + */ + void exitJsonNode(JsonNode node); +} diff --git a/restconf-client/provider/src/main/java/org/onap/ccsdk/sli/plugins/yangserializers/dfserializer/JsonSerializer.java b/restconf-client/provider/src/main/java/org/onap/ccsdk/sli/plugins/yangserializers/dfserializer/JsonSerializer.java index 6013664cb..b562e71db 100644 --- a/restconf-client/provider/src/main/java/org/onap/ccsdk/sli/plugins/yangserializers/dfserializer/JsonSerializer.java +++ b/restconf-client/provider/src/main/java/org/onap/ccsdk/sli/plugins/yangserializers/dfserializer/JsonSerializer.java @@ -23,8 +23,11 @@ package org.onap.ccsdk.sli.plugins.yangserializers.dfserializer; import java.util.List; import java.util.Map; +import static org.onap.ccsdk.sli.plugins.yangserializers.dfserializer.DataFormat.JSON; + /** - * Representation of JSON serializer. + * Representation of JSON serializer which encodes properties to JSON and + * decodes properties from JSON with the data format serializer. */ public class JsonSerializer extends DataFormatSerializer { @@ -34,16 +37,19 @@ public class JsonSerializer extends DataFormatSerializer { * @param serializerContext data format serializer context */ protected JsonSerializer(DataFormatSerializerContext serializerContext) { - super(DataFormat.JSON, serializerContext); + super(JSON, serializerContext); } @Override - public String encode(Map param, Map> annotations) { + public String encode(Map param, + Map> annotations) { + //TODO: Implementation code. return null; } @Override public Map decode(String dataFormatBody) { + //TODO: Implementation code. return null; } } diff --git a/restconf-client/provider/src/main/java/org/onap/ccsdk/sli/plugins/yangserializers/dfserializer/JsonWalker.java b/restconf-client/provider/src/main/java/org/onap/ccsdk/sli/plugins/yangserializers/dfserializer/JsonWalker.java new file mode 100644 index 000000000..e3fb4d513 --- /dev/null +++ b/restconf-client/provider/src/main/java/org/onap/ccsdk/sli/plugins/yangserializers/dfserializer/JsonWalker.java @@ -0,0 +1,41 @@ +/*- + * ============LICENSE_START======================================================= + * ONAP - CCSDK + * ================================================================================ + * Copyright (C) 2018 Huawei Technologies Co., Ltd. All rights reserved. + * ================================================================================ + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============LICENSE_END========================================================= + */ + +package org.onap.ccsdk.sli.plugins.yangserializers.dfserializer; + +import com.fasterxml.jackson.databind.JsonNode; + +/** + * Abstraction of an entity which provides interface for JSON walk. This + * interface serves as a common tool for anyone who needs to parse the JSON + * node with depth-first algorithm. + */ +public interface JsonWalker { + + /** + * Walks the JSON data tree. Protocols implement JSON listener service + * and walks the JSON tree with input as implemented object. JSON walker + * provides call back to the implemented methods. + * + * @param listener JSON listener implemented by the protocol + * @param jsonNode root node of the JSON data tree + */ + void walk(JsonListener listener, JsonNode jsonNode); +} 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 311fc2d6b..1f8195e2d 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 @@ -20,48 +20,70 @@ package org.onap.ccsdk.sli.plugins.yangserializers.dfserializer; -import java.util.Map; +import org.onap.ccsdk.sli.plugins.yangserializers.pnserializer.NodeType; +import org.onap.ccsdk.sli.plugins.yangserializers.pnserializer.PropertiesNode; +import org.opendaylight.yangtools.yang.model.api.SchemaContext; import org.opendaylight.yangtools.yang.model.api.SchemaNode; /** - * Representation of MDSAL based schema helper. + * Representation of MDSAL based serializer helper, which adds properties + * node to the properties tree based on its types. */ -public class MdsalSerializerHelper extends SerializerHelper { +public class MdsalSerializerHelper extends SerializerHelper { - protected MdsalSerializerHelper(SchemaNode node, String uri) { - super(node, uri); - } + /** + * Current properties node. + */ + private PropertiesNode propNode; - @Override - public SchemaNode getRootContext() { - return null; + /** + * Current schema node. + */ + private SchemaNode curSchemaNode; + + + /** + * Creates MDSAL serializer helper with root schema node, schema context + * and URI. + * + * @param n schema node of the URI's last node + * @param c schema context + * @param u URI of the request + */ + protected MdsalSerializerHelper(SchemaNode n, SchemaContext c, + String u) { + super(n, c, u); } @Override - public SchemaNode getCurContext() { - return null; + protected SchemaNode getSchemaNode() { + return schemaNode; } @Override - public SchemaNode getChildContext(SchemaNode schemaNode, String name, String namespace) { - return null; + protected SchemaContext getSchemaCtx() { + return schemaCtx; } @Override - public NodeType getNodeType(SchemaNode schemaNode) { - return null; + protected SchemaNode getCurSchema() { + return curSchemaNode; } @Override - public void addNode(String name, String namespace, String value, String valNamespace, NodeType type) { + protected void addNode(String name, String nameSpace, String value, + String valNameSpace, NodeType type) { + //TODO: Implementation code. } @Override - public void exitNode() { + protected void exitNode() { + //TODO: Implementation code. } @Override - public Map getProperties() { + protected PropertiesNode getPropertiesNode() { + //TODO: Implementation code. return null; } } diff --git a/restconf-client/provider/src/main/java/org/onap/ccsdk/sli/plugins/yangserializers/dfserializer/NodeType.java b/restconf-client/provider/src/main/java/org/onap/ccsdk/sli/plugins/yangserializers/dfserializer/NodeType.java deleted file mode 100644 index ffa35e2b6..000000000 --- a/restconf-client/provider/src/main/java/org/onap/ccsdk/sli/plugins/yangserializers/dfserializer/NodeType.java +++ /dev/null @@ -1,31 +0,0 @@ -/*- - * ============LICENSE_START======================================================= - * ONAP - CCSDK - * ================================================================================ - * Copyright (C) 2018 Huawei Technologies Co., Ltd. All rights reserved. - * ================================================================================ - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * ============LICENSE_END========================================================= - */ - -package org.onap.ccsdk.sli.plugins.yangserializers.dfserializer; - -/** - * Representation of type of data node. - */ -public enum NodeType { - SINGLE_INSTANCE, - MULTI_INSTANCE, - SINGLE_INSTANCE_LEAF, - MULTI_INSTANCE_LEAF -} diff --git a/restconf-client/provider/src/main/java/org/onap/ccsdk/sli/plugins/yangserializers/dfserializer/PropertiesNodeJsonListener.java b/restconf-client/provider/src/main/java/org/onap/ccsdk/sli/plugins/yangserializers/dfserializer/PropertiesNodeJsonListener.java new file mode 100644 index 000000000..ec1306731 --- /dev/null +++ b/restconf-client/provider/src/main/java/org/onap/ccsdk/sli/plugins/yangserializers/dfserializer/PropertiesNodeJsonListener.java @@ -0,0 +1,70 @@ +/*- + * ============LICENSE_START======================================================= + * ONAP - CCSDK + * ================================================================================ + * Copyright (C) 2018 Huawei Technologies Co., Ltd. All rights reserved. + * ================================================================================ + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============LICENSE_END========================================================= + */ + +package org.onap.ccsdk.sli.plugins.yangserializers.dfserializer; + +import com.google.gson.stream.JsonWriter; +import org.onap.ccsdk.sli.plugins.yangserializers.pnserializer.PropertiesNode; +import org.onap.ccsdk.sli.plugins.yangserializers.pnserializer.PropertiesNodeListener; + +import java.io.Writer; + +/** + * Representation of JSON implementation of properties node listener. + */ +public class PropertiesNodeJsonListener implements PropertiesNodeListener{ + + /** + * JSON writer to write the JSON data format. + */ + private JsonWriter jsonWriter; + + /** + * Writer to write the JSON. + */ + private Writer writer; + + /** + * Creates the properties node JSON listener by instantiating and + * indenting the writer. + */ + public PropertiesNodeJsonListener() { + } + + @Override + public void start(PropertiesNode node) { + //TODO: Implementation code. + } + + @Override + public void end(PropertiesNode node) { + //TODO: Implementation code. + } + + @Override + public void enterPropertiesNode(PropertiesNode node) { + //TODO: Implementation code. + } + + @Override + public void exitPropertiesNode(PropertiesNode node) { + //TODO: Implementation code. + } +} diff --git a/restconf-client/provider/src/main/java/org/onap/ccsdk/sli/plugins/yangserializers/dfserializer/PropertiesNodeXmlListener.java b/restconf-client/provider/src/main/java/org/onap/ccsdk/sli/plugins/yangserializers/dfserializer/PropertiesNodeXmlListener.java new file mode 100644 index 000000000..cfc59ca10 --- /dev/null +++ b/restconf-client/provider/src/main/java/org/onap/ccsdk/sli/plugins/yangserializers/dfserializer/PropertiesNodeXmlListener.java @@ -0,0 +1,80 @@ +/*- + * ============LICENSE_START======================================================= + * ONAP - CCSDK + * ================================================================================ + * Copyright (C) 2018 Huawei Technologies Co., Ltd. All rights reserved. + * ================================================================================ + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============LICENSE_END========================================================= + */ + +package org.onap.ccsdk.sli.plugins.yangserializers.dfserializer; + +import org.dom4j.Element; +import org.onap.ccsdk.sli.plugins.yangserializers.pnserializer.PropertiesNode; +import org.onap.ccsdk.sli.plugins.yangserializers.pnserializer.PropertiesNodeListener; + +import java.io.Writer; +import java.util.Stack; + +/** + * Representation of XML implementation of properties node listener. + */ +public class PropertiesNodeXmlListener implements PropertiesNodeListener { + + /** + * XML data from the element. + */ + private String xmlData; + + /** + * Root element of the XML document. + */ + private Element rootElement; + + /** + * Writer to write the XML. + */ + private Writer writer; + + /** + * XML element stack to store the elements. + */ + private final Stack elementStack = new Stack<>(); + + /** + * Creates the properties node XML listener. + */ + public PropertiesNodeXmlListener() { + } + + @Override + public void start(PropertiesNode node) { + //TODO: Implementation code. + } + + @Override + public void end(PropertiesNode node) { + //TODO: Implementation code. + } + + @Override + public void enterPropertiesNode(PropertiesNode node) { + //TODO: Implementation code. + } + + @Override + public void exitPropertiesNode(PropertiesNode node) { + //TODO: Implementation code. + } +} diff --git a/restconf-client/provider/src/main/java/org/onap/ccsdk/sli/plugins/yangserializers/dfserializer/SerializerHelper.java b/restconf-client/provider/src/main/java/org/onap/ccsdk/sli/plugins/yangserializers/dfserializer/SerializerHelper.java index 4e6d2944d..2466023fa 100644 --- a/restconf-client/provider/src/main/java/org/onap/ccsdk/sli/plugins/yangserializers/dfserializer/SerializerHelper.java +++ b/restconf-client/provider/src/main/java/org/onap/ccsdk/sli/plugins/yangserializers/dfserializer/SerializerHelper.java @@ -20,74 +20,92 @@ package org.onap.ccsdk.sli.plugins.yangserializers.dfserializer; -import java.util.Map; +import org.onap.ccsdk.sli.plugins.yangserializers.pnserializer.NodeType; +import org.onap.ccsdk.sli.plugins.yangserializers.pnserializer.PropertiesNode; /** * Abstraction of an entity which helps the data format serializers to obtain * schema context details and to build properties from data. * * @param type of schema node + * @param

type of schema context */ -public abstract class SerializerHelper { +public abstract class SerializerHelper { - private T rootSchema; - private String rootURI; + /** + * Schema node of the last element in the URI. + */ + protected T schemaNode; - protected SerializerHelper(T t, String uri) { - rootSchema = t; - } + /** + * Root schema context. + */ + protected P schemaCtx; + + /** + * Root URI. + */ + protected String rootUri; /** - * Returns root schema context node. + * Creates an instance of the serializer helper with the schema node, + * schema context and the URI. * - * @return root schema context node + * @param t schema node + * @param p schema context + * @param u root URI */ - protected abstract T getRootContext(); + protected SerializerHelper(T t, P p, String u) { + schemaNode = t; + schemaCtx = p; + rootUri = u; + } /** - * Returns current schema context node. + * Returns schema node of the last element in the URI. * - * @return current schema context node + * @return schema node */ - protected abstract T getCurContext(); + protected abstract T getSchemaNode(); /** - * Returns child schema context node. + * Returns the root schema context. * - * @return child schema context node + * @return schema context */ - protected abstract T getChildContext(T t, String name, String namespace); + protected abstract P getSchemaCtx(); /** - * Returns type of node - * @param t node - * @return node type + * Returns the current schema context node. + * + * @return current schema context node */ - protected abstract NodeType getNodeType(T t); + protected abstract T getCurSchema(); /** - * Adds a node to current tree. + * Adds a node to the properties node tree. * - * @param name name of node - * @param namespace namespace of node, it can be either module name or - * namespace, null indicates parent namespace - * @param value value of node, in case it's leaf/leaf-list node - * @param valNamespace value namespace for identityref, could be module - * name or namespace - * @param type type of node if known like in case of JSON + * @param name name of the node + * @param nameSpace name space of the node, it can be either module + * name or namespace; null indicates parent namespace + * @param value value of the node; applicable for leaf/leaf-list node + * @param valNameSpace value namespace for identityref, could be module + * name or namespace + * @param type type of node if known like in case of JSON */ - protected abstract void addNode(String name, String namespace, String value, - String valNamespace, NodeType type); + protected abstract void addNode(String name, String nameSpace, String value, + String valNameSpace, NodeType type); /** - * Exits the node, in case if it's leaf node add to properties map. + * Exits the node, in case if it's leaf node then it adds to the properties + * map. */ protected abstract void exitNode(); /** - * Returns the properties built corresponding to data. + * Returns the built properties corresponding to the data. * - * @return properties map + * @return properties node. */ - protected abstract Map getProperties(); + protected abstract PropertiesNode getPropertiesNode(); } diff --git a/restconf-client/provider/src/main/java/org/onap/ccsdk/sli/plugins/yangserializers/dfserializer/XmlListener.java b/restconf-client/provider/src/main/java/org/onap/ccsdk/sli/plugins/yangserializers/dfserializer/XmlListener.java new file mode 100644 index 000000000..0fbf4c338 --- /dev/null +++ b/restconf-client/provider/src/main/java/org/onap/ccsdk/sli/plugins/yangserializers/dfserializer/XmlListener.java @@ -0,0 +1,49 @@ +/*- + * ============LICENSE_START======================================================= + * ONAP - CCSDK + * ================================================================================ + * Copyright (C) 2018 Huawei Technologies Co., Ltd. All rights reserved. + * ================================================================================ + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============LICENSE_END========================================================= + */ + +package org.onap.ccsdk.sli.plugins.yangserializers.dfserializer; + +import org.dom4j.Element; + +/** + * Abstraction of an entity which provides call back methods, which in turn + * are called by XML walker while walking the XML tree. This interface needs + * to be implemented by protocol implementing listener based call while doing + * XML walk. + */ +public interface XmlListener extends Listener { + + /** + * Callback invoked during a node entry. All the related information + * about the node can be obtained from the element. + * + * @param element current XML element + * @param nodeType node type of the element + */ + void enterXmlElement(Element element, XmlNodeType nodeType); + + /** + * Callback invoked during a node exit. All the related information about + * the node can be obtained from the element. + * + * @param element current xml element. + */ + void exitXmlElement(Element element); +} diff --git a/restconf-client/provider/src/main/java/org/onap/ccsdk/sli/plugins/yangserializers/dfserializer/XmlNodeType.java b/restconf-client/provider/src/main/java/org/onap/ccsdk/sli/plugins/yangserializers/dfserializer/XmlNodeType.java new file mode 100644 index 000000000..7a6db3c86 --- /dev/null +++ b/restconf-client/provider/src/main/java/org/onap/ccsdk/sli/plugins/yangserializers/dfserializer/XmlNodeType.java @@ -0,0 +1,37 @@ +/*- + * ============LICENSE_START======================================================= + * ONAP - CCSDK + * ================================================================================ + * Copyright (C) 2018 Huawei Technologies Co., Ltd. All rights reserved. + * ================================================================================ + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============LICENSE_END========================================================= + */ + +package org.onap.ccsdk.sli.plugins.yangserializers.dfserializer; + +/** + * Represents the XML node type. + */ +public enum XmlNodeType { + + /** + * Object XML node type. + */ + OBJECT_NODE, + + /** + * Text XML node type. + */ + TEXT_NODE +} diff --git a/restconf-client/provider/src/main/java/org/onap/ccsdk/sli/plugins/yangserializers/dfserializer/XmlSerializer.java b/restconf-client/provider/src/main/java/org/onap/ccsdk/sli/plugins/yangserializers/dfserializer/XmlSerializer.java index 0cfb4d17f..516470059 100644 --- a/restconf-client/provider/src/main/java/org/onap/ccsdk/sli/plugins/yangserializers/dfserializer/XmlSerializer.java +++ b/restconf-client/provider/src/main/java/org/onap/ccsdk/sli/plugins/yangserializers/dfserializer/XmlSerializer.java @@ -23,8 +23,11 @@ package org.onap.ccsdk.sli.plugins.yangserializers.dfserializer; import java.util.List; import java.util.Map; +import static org.onap.ccsdk.sli.plugins.yangserializers.dfserializer.DataFormat.XML; + /** - * Representation of XML serializer. + * Representation of XML serializer which encodes properties to XML and + * decodes properties from XML with the data format serializer. */ public class XmlSerializer extends DataFormatSerializer { @@ -34,16 +37,19 @@ public class XmlSerializer extends DataFormatSerializer { * @param serializerContext data format serializer context */ protected XmlSerializer(DataFormatSerializerContext serializerContext) { - super(DataFormat.XML, serializerContext); + super(XML, serializerContext); } @Override - public String encode(Map param, Map> annotations) { + public String encode(Map param, + Map> annotations) { + //TODO: Implementation code. return null; } @Override public Map decode(String dataFormatBody) { + //TODO: Implementation code. return null; } } \ No newline at end of file diff --git a/restconf-client/provider/src/main/java/org/onap/ccsdk/sli/plugins/yangserializers/dfserializer/XmlWalker.java b/restconf-client/provider/src/main/java/org/onap/ccsdk/sli/plugins/yangserializers/dfserializer/XmlWalker.java new file mode 100644 index 000000000..6fed510a3 --- /dev/null +++ b/restconf-client/provider/src/main/java/org/onap/ccsdk/sli/plugins/yangserializers/dfserializer/XmlWalker.java @@ -0,0 +1,41 @@ +/*- + * ============LICENSE_START======================================================= + * ONAP - CCSDK + * ================================================================================ + * Copyright (C) 2018 Huawei Technologies Co., Ltd. All rights reserved. + * ================================================================================ + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============LICENSE_END========================================================= + */ + +package org.onap.ccsdk.sli.plugins.yangserializers.dfserializer; + +import org.dom4j.Element; + +/** + * Abstraction of an entity which provides interface for XML walk. This + * interface serves as a common tool for anyone who needs to parse the XML + * node with depth-first algorithm. + */ +public interface XmlWalker { + + /** + * Walks the XML data tree. Protocols implement XML listener service and + * walks the XML tree with input as implemented object. XML walker + * provides call back to the implemented methods. + * + * @param listener XML listener implemented by the protocol + * @param xmlElement root element of the XML data tree + */ + void walk(XmlListener listener, Element xmlElement); +} diff --git a/restconf-client/provider/src/main/java/org/onap/ccsdk/sli/plugins/yangserializers/dfserializer/YangParameters.java b/restconf-client/provider/src/main/java/org/onap/ccsdk/sli/plugins/yangserializers/dfserializer/YangParameters.java new file mode 100644 index 000000000..c94a22975 --- /dev/null +++ b/restconf-client/provider/src/main/java/org/onap/ccsdk/sli/plugins/yangserializers/dfserializer/YangParameters.java @@ -0,0 +1,41 @@ +/*- + * ============LICENSE_START======================================================= + * ONAP - CCSDK + * ================================================================================ + * Copyright (C) 2018 Huawei Technologies Co., Ltd. All rights reserved. + * ================================================================================ + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============LICENSE_END========================================================= + */ + +package org.onap.ccsdk.sli.plugins.yangserializers.dfserializer; + +import org.onap.ccsdk.sli.plugins.restapicall.Parameters; + +/** + * Representation of the YANG parameters for the restconf api call node. + */ +public class YangParameters extends Parameters { + + /** + * Creates an instance of the YANG parameters. + */ + public YangParameters() { + super(); + } + + /** + * Directory path of the YANG file. + */ + public String dirPath; +} diff --git a/restconf-client/provider/src/main/java/org/onap/ccsdk/sli/plugins/yangserializers/pnserializer/DefaultPropertiesNodeWalker.java b/restconf-client/provider/src/main/java/org/onap/ccsdk/sli/plugins/yangserializers/pnserializer/DefaultPropertiesNodeWalker.java new file mode 100644 index 000000000..041210f22 --- /dev/null +++ b/restconf-client/provider/src/main/java/org/onap/ccsdk/sli/plugins/yangserializers/pnserializer/DefaultPropertiesNodeWalker.java @@ -0,0 +1,87 @@ +/*- + * ============LICENSE_START======================================================= + * ONAP - CCSDK + * ================================================================================ + * Copyright (C) 2018 Huawei Technologies Co., Ltd. All rights reserved. + * ================================================================================ + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============LICENSE_END========================================================= + */ + +package org.onap.ccsdk.sli.plugins.yangserializers.pnserializer; + +import java.util.Map; + +/** + * Implementation of properties node walker which helps in forming a new tree from properties node. + * + * @param node child of properties node. + */ +public class DefaultPropertiesNodeWalker implements PropertiesNodeWalker { + + @Override + public void walk(PropertiesNodeListener listener, + PropertiesNode propertiesNode) { + listener.start(propertiesNode); + walkChildNode(listener, propertiesNode); + listener.end(propertiesNode); + } + + /** + * Walks the children node from the parent node. + * + * @param listener properties node listener + * @param propertiesNode properties node + */ + public void walkChildNode(PropertiesNodeListener listener, + PropertiesNode propertiesNode) { + Map children = getChildren(propertiesNode); + if (children != null) { + for (Map.Entry entry : children.entrySet()) { + PropertiesNode node = ((PropertiesNode) entry.getValue()); + listener.enterPropertiesNode(node); + walkChildNode(listener, node); + listener.exitPropertiesNode(node); + } + } + } + + /** + * Returns the children node according to the property node type. + * + * @param value property node + * @return property node children + */ + private Map getChildren(PropertiesNode value) { + if (value instanceof RootNode) { + return ((RootNode) value).children(); + } + switch (value.nodeType()) { + case SINGLE_INSTANCE_NODE: + return ((InnerNode) value).children(); + case MULTI_INSTANCE_HOLDER_NODE: + return ((Map) ((ListHolderNode) value).children()); + case MULTI_INSTANCE_NODE: + return ((Map) ((MultiInstanceNode) value) + .children()); + case MULTI_INSTANCE_LEAF_HOLDER_NODE: + return ((Map) ((LeafListHolderNode) value) + .children()); + case SINGLE_INSTANCE_LEAF_NODE: + case MULTI_INSTANCE_LEAF_NODE: + return null; + default: + throw new IllegalArgumentException("No more types allowed"); + } + } +} diff --git a/restconf-client/provider/src/main/java/org/onap/ccsdk/sli/plugins/yangserializers/pnserializer/PropertiesNodeListener.java b/restconf-client/provider/src/main/java/org/onap/ccsdk/sli/plugins/yangserializers/pnserializer/PropertiesNodeListener.java new file mode 100644 index 000000000..5bf7fe9dc --- /dev/null +++ b/restconf-client/provider/src/main/java/org/onap/ccsdk/sli/plugins/yangserializers/pnserializer/PropertiesNodeListener.java @@ -0,0 +1,55 @@ +/*- + * ============LICENSE_START======================================================= + * ONAP - CCSDK + * ================================================================================ + * Copyright (C) 2018 Huawei Technologies Co., Ltd. All rights reserved. + * ================================================================================ + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============LICENSE_END========================================================= + */ + +package org.onap.ccsdk.sli.plugins.yangserializers.pnserializer; + +/** + * Abstraction of properties node listener. + */ +public interface PropertiesNodeListener { + + /** + * Pre-configurations required before starting the walking. + * + * @param node properties node + */ + void start(PropertiesNode node); + + /** + * Post-configurations required after starting the walking. + * + * @param node properties node + */ + void end(PropertiesNode node); + + /** + * Enters the properties node. + * + * @param node properties node + */ + void enterPropertiesNode(PropertiesNode node); + + /** + * Enters the properties node. + * + * @param node properties node + */ + void exitPropertiesNode(PropertiesNode node); +} diff --git a/restconf-client/provider/src/main/java/org/onap/ccsdk/sli/plugins/yangserializers/pnserializer/PropertiesNodeWalker.java b/restconf-client/provider/src/main/java/org/onap/ccsdk/sli/plugins/yangserializers/pnserializer/PropertiesNodeWalker.java new file mode 100644 index 000000000..48433e2b2 --- /dev/null +++ b/restconf-client/provider/src/main/java/org/onap/ccsdk/sli/plugins/yangserializers/pnserializer/PropertiesNodeWalker.java @@ -0,0 +1,35 @@ +/*- + * ============LICENSE_START======================================================= + * ONAP - CCSDK + * ================================================================================ + * Copyright (C) 2018 Huawei Technologies Co., Ltd. All rights reserved. + * ================================================================================ + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============LICENSE_END========================================================= + */ + +package org.onap.ccsdk.sli.plugins.yangserializers.pnserializer; + +/** + * Abstraction of properties node walker + */ +public interface PropertiesNodeWalker { + + /** + * Walks the properties node with the listener. + * + * @param listener properties node listener. + * @param propertiesNode properties node + */ + void walk(PropertiesNodeListener listener, PropertiesNode propertiesNode); +} -- cgit 1.2.3-korg From 224d394cda8a832f8d8c9db03795343ac82f7058 Mon Sep 17 00:00:00 2001 From: Vidyashree Rama Date: Fri, 17 Aug 2018 17:15:20 +0530 Subject: Unit test and decode implementation properties node serializer decode implementation and unit test cases Issue-ID: CCSDK-378 Change-Id: I586fd534f441eb361e8d75af18cc778f7ad4cc67 Signed-off-by: Vidyashree Rama --- restconf-client/provider/pom.xml | 18 + .../DefaultPropertiesNodeListener.java | 95 ++ .../yangserializers/pnserializer/InnerNode.java | 7 +- .../pnserializer/LeafListHolderNode.java | 1 + .../MdsalPropertiesNodeSerializer.java | 7 +- .../yangserializers/pnserializer/RootNode.java | 4 +- .../pnserializer/PropertiesSerializerTest.java | 1090 ++++++++++++++++++++ .../src/test/resources/yang/test-augment.yang | 85 ++ .../src/test/resources/yang/test-yang.yang | 231 +++++ 9 files changed, 1532 insertions(+), 6 deletions(-) create mode 100644 restconf-client/provider/src/main/java/org/onap/ccsdk/sli/plugins/yangserializers/pnserializer/DefaultPropertiesNodeListener.java create mode 100644 restconf-client/provider/src/test/java/org/onap/ccsdk/sli/plugins/yangserializers/pnserializer/PropertiesSerializerTest.java create mode 100644 restconf-client/provider/src/test/resources/yang/test-augment.yang create mode 100644 restconf-client/provider/src/test/resources/yang/test-yang.yang (limited to 'restconf-client/provider') diff --git a/restconf-client/provider/pom.xml b/restconf-client/provider/pom.xml index 8995f1dd3..2b5be877a 100755 --- a/restconf-client/provider/pom.xml +++ b/restconf-client/provider/pom.xml @@ -94,5 +94,23 @@ restapi-call-node-provider 0.3.0-SNAPSHOT + + org.hamcrest + hamcrest-library + 1.3 + test + + + org.opendaylight.yangtools + yang-test-util + 2.0.3 + test + + + org.opendaylight.netconf + restconf-nb-rfc8040 + 1.7.4-SNAPSHOT + test + diff --git a/restconf-client/provider/src/main/java/org/onap/ccsdk/sli/plugins/yangserializers/pnserializer/DefaultPropertiesNodeListener.java b/restconf-client/provider/src/main/java/org/onap/ccsdk/sli/plugins/yangserializers/pnserializer/DefaultPropertiesNodeListener.java new file mode 100644 index 000000000..a8a9b4935 --- /dev/null +++ b/restconf-client/provider/src/main/java/org/onap/ccsdk/sli/plugins/yangserializers/pnserializer/DefaultPropertiesNodeListener.java @@ -0,0 +1,95 @@ +/*- + * ============LICENSE_START======================================================= + * ONAP - CCSDK + * ================================================================================ + * Copyright (C) 2018 Huawei Technologies Co., Ltd. All rights reserved. + * ================================================================================ + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============LICENSE_END========================================================= + */ + +package org.onap.ccsdk.sli.plugins.yangserializers.pnserializer; + +import java.util.Collection; +import java.util.HashMap; +import java.util.Map; + +import static org.onap.ccsdk.sli.plugins.yangserializers.pnserializer.NodeType.MULTI_INSTANCE_LEAF_NODE; +import static org.onap.ccsdk.sli.plugins.yangserializers.pnserializer.NodeType.SINGLE_INSTANCE_LEAF_NODE; + +/** + * Represents implementation of PropertiesNodeListener. + */ +public class DefaultPropertiesNodeListener implements PropertiesNodeListener { + + private Map params = new HashMap<>(); + + @Override + public void start(PropertiesNode node) { + // do nothing + } + + @Override + public void end(PropertiesNode node) { + exitPropertiesNode(node); + } + + @Override + public void enterPropertiesNode(PropertiesNode node) { + /* + * Only if it is leaf node or leaf-list node, + * then create a property entry and add to map + */ + if (node.nodeType() == SINGLE_INSTANCE_LEAF_NODE + || node.nodeType() == MULTI_INSTANCE_LEAF_NODE) { + params.put(node.uri(), ((LeafNode) node).value()); + } + } + + @Override + public void exitPropertiesNode(PropertiesNode node) { + if (!node.augmentations().isEmpty()) { + for (Map.Entry> augmentationTochild + : node.augmentations().asMap().entrySet()) { + Collection childsFromAugmentations = augmentationTochild + .getValue(); + if (!childsFromAugmentations.isEmpty()) { + PropertiesNodeWalker walker = new DefaultPropertiesNodeWalker<>(); + for (PropertiesNode pNode : childsFromAugmentations) { + enterPropertiesNode(pNode); + walker.walk(this, pNode); + exitPropertiesNode(pNode); + } + } + } + } + } + + /** + * Returns properties. + * + * @return properties + */ + public Map params() { + return params; + } + + /** + * Sets properties. + * + * @param params properties + */ + public void params(Map params) { + this.params = params; + } +} diff --git a/restconf-client/provider/src/main/java/org/onap/ccsdk/sli/plugins/yangserializers/pnserializer/InnerNode.java b/restconf-client/provider/src/main/java/org/onap/ccsdk/sli/plugins/yangserializers/pnserializer/InnerNode.java index 063c3d050..0711a7cff 100644 --- a/restconf-client/provider/src/main/java/org/onap/ccsdk/sli/plugins/yangserializers/pnserializer/InnerNode.java +++ b/restconf-client/provider/src/main/java/org/onap/ccsdk/sli/plugins/yangserializers/pnserializer/InnerNode.java @@ -104,7 +104,7 @@ public abstract class InnerNode extends PropertiesNode { @Override public PropertiesNode addChild(String name, Namespace namespace, NodeType type, String value, - Namespace valuens, + Namespace valueNs, Object appInfo) throws SvcLogicException { LeafNode node = ((LeafNode) children.get(name)); if (node != null) { @@ -120,6 +120,7 @@ public abstract class InnerNode extends PropertiesNode { String uri = getUri(this, name, namespace); node = new LeafNode(name, namespace, uri, this, appInfo, type, value); + node.valueNs(valueNs); if (augSchema != null && !isNamespaceAsParent(this, node)) { addToAugmentations(augSchema, this, node); @@ -196,12 +197,12 @@ public abstract class InnerNode extends PropertiesNode { children.put(localName, ((T) node)); } - node = node.addChild(index, localName, namespace, type, value, null, appInfo); + node = node.addChild(index, localName, namespace, type, value, valueNs, appInfo); } else if (node instanceof LeafListHolderNode) { LeafNode child = ((LeafNode) ((HolderNode) node).child(index)); node = (child != null ? child : node.addChild(index, localName, namespace, type, - value, null, + value, valueNs, appInfo)); } else { throw new SvcLogicException("Duplicate node exist with same node"); diff --git a/restconf-client/provider/src/main/java/org/onap/ccsdk/sli/plugins/yangserializers/pnserializer/LeafListHolderNode.java b/restconf-client/provider/src/main/java/org/onap/ccsdk/sli/plugins/yangserializers/pnserializer/LeafListHolderNode.java index 94892dcac..985bc1da1 100644 --- a/restconf-client/provider/src/main/java/org/onap/ccsdk/sli/plugins/yangserializers/pnserializer/LeafListHolderNode.java +++ b/restconf-client/provider/src/main/java/org/onap/ccsdk/sli/plugins/yangserializers/pnserializer/LeafListHolderNode.java @@ -82,6 +82,7 @@ public class LeafListHolderNode extends HolderNode implemen String uri = this.uri() + "[" + index + "]"; node = (node != null) ? node : new LeafNode(name, namespace, uri, this, appInfo, type, value); + node.valueNs(valueNs); children().put(index, node); return node; } diff --git a/restconf-client/provider/src/main/java/org/onap/ccsdk/sli/plugins/yangserializers/pnserializer/MdsalPropertiesNodeSerializer.java b/restconf-client/provider/src/main/java/org/onap/ccsdk/sli/plugins/yangserializers/pnserializer/MdsalPropertiesNodeSerializer.java index 405e24127..146e581fa 100644 --- a/restconf-client/provider/src/main/java/org/onap/ccsdk/sli/plugins/yangserializers/pnserializer/MdsalPropertiesNodeSerializer.java +++ b/restconf-client/provider/src/main/java/org/onap/ccsdk/sli/plugins/yangserializers/pnserializer/MdsalPropertiesNodeSerializer.java @@ -86,7 +86,10 @@ public class MdsalPropertiesNodeSerializer extends PropertiesNodeSerializer decode(PropertiesNode propertiesNode) { - return null; + PropertiesNodeWalker walker = new DefaultPropertiesNodeWalker<>(); + DefaultPropertiesNodeListener listener = new DefaultPropertiesNodeListener(); + walker.walk(listener, propertiesNode); + return listener.params(); } private RootNode createRootNode(String lastNodeName, String rootUri) { @@ -128,6 +131,8 @@ public class MdsalPropertiesNodeSerializer extends PropertiesNodeSerializer extends PropertiesNode { } else { children.put(localName, ((T) node)); } - node = node.addChild(index, localName, namespace, type, value, null, appInfo); + node = node.addChild(index, localName, namespace, type, value, valueNs, appInfo); } else if (node instanceof LeafListHolderNode) { LeafNode child = ((LeafNode) ((HolderNode) node).child(index)); node = (child != null ? child : node.addChild(index, localName, namespace, type, - value, null, + value, valueNs, appInfo)); } else { throw new SvcLogicException("Duplicate node exist with same node"); diff --git a/restconf-client/provider/src/test/java/org/onap/ccsdk/sli/plugins/yangserializers/pnserializer/PropertiesSerializerTest.java b/restconf-client/provider/src/test/java/org/onap/ccsdk/sli/plugins/yangserializers/pnserializer/PropertiesSerializerTest.java new file mode 100644 index 000000000..fddfe2d40 --- /dev/null +++ b/restconf-client/provider/src/test/java/org/onap/ccsdk/sli/plugins/yangserializers/pnserializer/PropertiesSerializerTest.java @@ -0,0 +1,1090 @@ +/*- + * ============LICENSE_START======================================================= + * ONAP - CCSDK + * ================================================================================ + * Copyright (C) 2018 Huawei Technologies Co., Ltd. All rights reserved. + * ================================================================================ + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============LICENSE_END========================================================= + */ +package org.onap.ccsdk.sli.plugins.yangserializers.pnserializer; + +import org.junit.Before; +import org.junit.Test; + +import org.onap.ccsdk.sli.core.sli.SvcLogicException; +import org.opendaylight.restconf.common.context.InstanceIdentifierContext; +import org.opendaylight.restconf.nb.rfc8040.utils.parser.ParserIdentifier; +import org.opendaylight.yangtools.yang.model.api.SchemaContext; +import org.opendaylight.yangtools.yang.test.util.YangParserTestUtils; + +import java.io.File; +import java.io.FileNotFoundException; +import java.util.ArrayList; +import java.util.Collection; +import java.util.HashMap; +import java.util.LinkedList; +import java.util.List; +import java.util.Map; + +import static org.hamcrest.MatcherAssert.assertThat; +import static org.hamcrest.Matchers.is; +import static org.junit.Assert.assertTrue; + +public final class PropertiesSerializerTest { + private SchemaContext context; + + @Before + public void initialization() throws FileNotFoundException { + context = compileYangFile(); + } + + @Test + public void testBasicConstructs() throws SvcLogicException { + String uri = "test-yang:cont1/cont2"; + Map params = new HashMap<>(); + params.put("test-yang:cont1.cont2.cont3.leaf10", "abc"); + params.put("test-yang:cont1.cont2.list1[0].leaf1", "abc"); + params.put("test-yang:cont1.cont2.list1[0].leaf2", "abc"); + params.put("test-yang:cont1.cont2.list1[0].leaf3", "abc"); + params.put("test-yang:cont1.cont2.list1[0].ll1[0]", "abc"); + params.put("test-yang:cont1.cont2.list1[0].ll1[1]", "abc"); + params.put("test-yang:cont1.cont2.list1[0].ll2[0]", "abc"); + params.put("test-yang:cont1.cont2.list1[0].ll2[1]", "abc"); + params.put("test-yang:cont1.cont2.list1[0].cont4.leaf11", "abc"); + params.put("test-yang:cont1.cont2.list1[0].list4[0].leaf8", "abc"); + params.put("test-yang:cont1.cont2.list1[0].list4[1].leaf8", "abc"); + params.put("test-yang:cont1.cont2.list1[0].list5[0].leaf9", "abc"); + params.put("test-yang:cont1.cont2.list1[0].list5[1].leaf9", "abc"); + params.put("test-yang:cont1.cont2.list1[1].leaf1", "abc"); + params.put("test-yang:cont1.cont2.list1[1].leaf2", "abc"); + params.put("test-yang:cont1.cont2.list1[1].leaf3", "abc"); + params.put("test-yang:cont1.cont2.list1[1].ll1[0]", "abc"); + params.put("test-yang:cont1.cont2.list1[1].ll1[1]", "abc"); + params.put("test-yang:cont1.cont2.list1[1].ll2[0]", "abc"); + params.put("test-yang:cont1.cont2.list1[1].ll2[1]", "abc"); + params.put("test-yang:cont1.cont2.list1[1].cont4.leaf11", "abc"); + params.put("test-yang:cont1.cont2.list1[1].list4[0].leaf8", "abc"); + params.put("test-yang:cont1.cont2.list1[1].list4[1].leaf8", "abc"); + params.put("test-yang:cont1.cont2.list1[1].list5[0].leaf9", "abc"); + params.put("test-yang:cont1.cont2.list1[1].list5[1].leaf9", "abc"); + params.put("test-yang:cont1.cont2.list2[0].leaf4", "abc"); + params.put("test-yang:cont1.cont2.list2[1].leaf4", "abc"); + params.put("test-yang:cont1.cont2.leaf5", "abc"); + params.put("test-yang:cont1.cont2.leaf6", "abc"); + params.put("test-yang:cont1.cont2.ll3[0]", "abc"); + params.put("test-yang:cont1.cont2.ll3[1]", "abc"); + params.put("test-yang:cont1.cont2.ll4[0]", "abc"); + params.put("test-yang:cont1.cont2.ll4[1]", "abc"); + InstanceIdentifierContext iCtx = ParserIdentifier + .toInstanceIdentifier(uri, context, null); + + PropertiesNodeSerializer ser = new MdsalPropertiesNodeSerializer( + iCtx.getSchemaNode(), context, uri); + PropertiesNode node = ser.encode(params); + + Map childNodes = ((RootNode) node).children(); + + assertThat(childNodes.containsKey("cont3"), is(true)); + SingleInstanceNode cont3 = ((SingleInstanceNode) childNodes.get("cont3")); + assertThat(cont3.uri(), is("test-yang:cont1.cont2.cont3")); + assertThat(cont3.children().containsKey("leaf10"), is(true)); + + assertThat(childNodes.containsKey("list1"), is(true)); + HolderNode list1Holder = ((ListHolderNode) childNodes.get("list1")); + assertThat(list1Holder.uri(), is("test-yang:cont1.cont2.list1")); + MultiInstanceNode list10 = ((MultiInstanceNode) list1Holder.child("0")); + assertThat(list10.uri(), is("test-yang:cont1.cont2.list1[0]")); + Map list10Child = list10.children(); + assertThat(list10Child.containsKey("leaf1"), is(true)); + LeafNode l = ((LeafNode) list10Child.get("leaf1")); + assertThat(l.uri(), is("test-yang:cont1.cont2.list1[0].leaf1")); + assertThat(list10Child.containsKey("leaf2"), is(true)); + l = ((LeafNode) list10Child.get("leaf2")); + assertThat(l.uri(), is("test-yang:cont1.cont2.list1[0].leaf2")); + assertThat(list10Child.containsKey("leaf2"), is(true)); + l = ((LeafNode) list10Child.get("leaf3")); + assertThat(l.uri(), is("test-yang:cont1.cont2.list1[0].leaf3")); + + LeafListHolderNode ll1Holder = ((LeafListHolderNode) list10Child.get("ll1")); + assertThat(ll1Holder.uri(), is("test-yang:cont1.cont2.list1[0].ll1")); + assertThat(ll1Holder.children().containsKey("0"), is(true)); + l = ((LeafNode) ll1Holder.child("0")); + assertThat(l.uri(), is("test-yang:cont1.cont2.list1[0].ll1[0]")); + assertThat(ll1Holder.children().containsKey("1"), is(true)); + l = ((LeafNode) ll1Holder.child("1")); + assertThat(l.uri(), is("test-yang:cont1.cont2.list1[0].ll1[1]")); + + LeafListHolderNode ll2Holder = ((LeafListHolderNode) list10Child.get("ll2")); + assertThat(ll2Holder.uri(), is("test-yang:cont1.cont2.list1[0].ll2")); + assertThat(ll2Holder.children().containsKey("0"), is(true)); + l = ((LeafNode) ll2Holder.child("0")); + assertThat(l.uri(), is("test-yang:cont1.cont2.list1[0].ll2[0]")); + assertThat(ll2Holder.children().containsKey("1"), is(true)); + l = ((LeafNode) ll2Holder.child("1")); + assertThat(l.uri(), is("test-yang:cont1.cont2.list1[0].ll2[1]")); + + SingleInstanceNode cont4 = ((SingleInstanceNode) list10Child.get("cont4")); + assertThat(cont4.uri(), is("test-yang:cont1.cont2.list1[0].cont4")); + assertThat(cont4.children().containsKey("leaf11"), is(true)); + l = ((LeafNode) cont4.children().get("leaf11")); + assertThat(l.uri(), is("test-yang:cont1.cont2.list1[0].cont4.leaf11")); + + HolderNode list4Holder = ((HolderNode) list10Child.get("list4")); + assertThat(list4Holder.uri(), is("test-yang:cont1.cont2.list1[0].list4")); + Map c = list4Holder.children(); + MultiInstanceNode list40 = ((MultiInstanceNode) c.get("0")); + assertThat(list40.uri(), is("test-yang:cont1.cont2.list1[0].list4[0]")); + assertThat(list40.children().containsKey("leaf8"), is(true)); + l = ((LeafNode) list40.children().get("leaf8")); + assertThat(l.uri(), is("test-yang:cont1.cont2.list1[0].list4[0].leaf8")); + MultiInstanceNode list41 = ((MultiInstanceNode) c.get("1")); + assertThat(list41.uri(), is("test-yang:cont1.cont2.list1[0].list4[1]")); + assertThat(list41.children().containsKey("leaf8"), is(true)); + l = ((LeafNode) list41.children().get("leaf8")); + assertThat(l.uri(), is("test-yang:cont1.cont2.list1[0].list4[1].leaf8")); + + HolderNode list5Holder = ((HolderNode) list10Child.get("list5")); + assertThat(list5Holder.uri(), is("test-yang:cont1.cont2.list1[0].list5")); + c = list5Holder.children(); + MultiInstanceNode list50 = ((MultiInstanceNode) c.get("0")); + assertThat(list50.uri(), is("test-yang:cont1.cont2.list1[0].list5[0]")); + assertThat(list50.children().containsKey("leaf9"), is(true)); + l = ((LeafNode) list50.children().get("leaf9")); + assertThat(l.uri(), is("test-yang:cont1.cont2.list1[0].list5[0].leaf9")); + MultiInstanceNode list51 = ((MultiInstanceNode) c.get("1")); + assertThat(list51.uri(), is("test-yang:cont1.cont2.list1[0].list5[1]")); + assertThat(list51.children().containsKey("leaf9"), is(true)); + l = ((LeafNode) list51.children().get("leaf9")); + assertThat(l.uri(), is("test-yang:cont1.cont2.list1[0].list5[1].leaf9")); + + MultiInstanceNode list11 = ((MultiInstanceNode) list1Holder.child("1")); + assertThat(list11.uri(), is("test-yang:cont1.cont2.list1[1]")); + Map list11Child = list11.children(); + assertThat(list11Child.containsKey("leaf1"), is(true)); + l = ((LeafNode) list11Child.get("leaf1")); + assertThat(l.uri(), is("test-yang:cont1.cont2.list1[1].leaf1")); + assertThat(list11Child.containsKey("leaf2"), is(true)); + l = ((LeafNode) list11Child.get("leaf2")); + assertThat(l.uri(), is("test-yang:cont1.cont2.list1[1].leaf2")); + assertThat(list11Child.containsKey("leaf3"), is(true)); + l = ((LeafNode) list11Child.get("leaf3")); + assertThat(l.uri(), is("test-yang:cont1.cont2.list1[1].leaf3")); + + ll1Holder = ((LeafListHolderNode) list11Child.get("ll1")); + assertThat(ll1Holder.uri(), is("test-yang:cont1.cont2.list1[1].ll1")); + assertThat(ll1Holder.children().containsKey("0"), is(true)); + l = ((LeafNode) ll1Holder.children().get("0")); + assertThat(l.uri(), is("test-yang:cont1.cont2.list1[1].ll1[0]")); + assertThat(ll1Holder.children().containsKey("1"), is(true)); + l = ((LeafNode) ll1Holder.children().get("1")); + assertThat(l.uri(), is("test-yang:cont1.cont2.list1[1].ll1[1]")); + + ll2Holder = ((LeafListHolderNode) list11Child.get("ll2")); + assertThat(ll2Holder.uri(), is("test-yang:cont1.cont2.list1[1].ll2")); + assertThat(ll2Holder.children().containsKey("0"), is(true)); + l = ((LeafNode) ll2Holder.children().get("0")); + assertThat(l.uri(), is("test-yang:cont1.cont2.list1[1].ll2[0]")); + assertThat(ll2Holder.children().containsKey("1"), is(true)); + l = ((LeafNode) ll2Holder.children().get("1")); + assertThat(l.uri(), is("test-yang:cont1.cont2.list1[1].ll2[1]")); + + cont4 = ((SingleInstanceNode) list11Child.get("cont4")); + assertThat(cont4.uri(), is("test-yang:cont1.cont2.list1[1].cont4")); + assertThat(cont4.children().containsKey("leaf11"), is(true)); + l = ((LeafNode) cont4.children().get("leaf11")); + assertThat(l.uri(), is("test-yang:cont1.cont2.list1[1].cont4.leaf11")); + + list4Holder = ((HolderNode) list11Child.get("list4")); + assertThat(list4Holder.uri(), is("test-yang:cont1.cont2.list1[1].list4")); + c = list4Holder.children(); + list40 = ((MultiInstanceNode) c.get("0")); + assertThat(list40.uri(), is("test-yang:cont1.cont2.list1[1].list4[0]")); + assertThat(list40.children().containsKey("leaf8"), is(true)); + l = ((LeafNode) list40.children().get("leaf8")); + assertThat(l.uri(), is("test-yang:cont1.cont2.list1[1].list4[0].leaf8")); + list41 = ((MultiInstanceNode) c.get("1")); + assertThat(list41.uri(), is("test-yang:cont1.cont2.list1[1].list4[1]")); + assertThat(list41.children().containsKey("leaf8"), is(true)); + l = ((LeafNode) list41.children().get("leaf8")); + assertThat(l.uri(), is("test-yang:cont1.cont2.list1[1].list4[1].leaf8")); + + list5Holder = ((HolderNode) list11Child.get("list5")); + assertThat(list5Holder.uri(), is("test-yang:cont1.cont2.list1[1].list5")); + c = list5Holder.children(); + list50 = ((MultiInstanceNode) c.get("0")); + assertThat(list50.uri(), is("test-yang:cont1.cont2.list1[1].list5[0]")); + assertThat(list50.children().containsKey("leaf9"), is(true)); + l = ((LeafNode) list50.children().get("leaf9")); + assertThat(l.uri(), is("test-yang:cont1.cont2.list1[1].list5[0].leaf9")); + list51 = ((MultiInstanceNode) c.get("1")); + assertThat(list51.uri(), is("test-yang:cont1.cont2.list1[1].list5[1]")); + assertThat(list51.children().containsKey("leaf9"), is(true)); + l = ((LeafNode) list51.children().get("leaf9")); + assertThat(l.uri(), is("test-yang:cont1.cont2.list1[1].list5[1].leaf9")); + + assertThat(childNodes.containsKey("list2"), is(true)); + HolderNode list2Holder = ((HolderNode) childNodes.get("list2")); + assertThat(list2Holder.uri(), is("test-yang:cont1.cont2.list2")); + InnerNode list20 = ((InnerNode) list2Holder.children().get("0")); + assertThat(list20.uri(), is("test-yang:cont1.cont2.list2[0]")); + assertThat(list20.children().containsKey("leaf4"), is(true)); + l = ((LeafNode) list20.children().get("leaf4")); + assertThat(l.uri(), is("test-yang:cont1.cont2.list2[0].leaf4")); + InnerNode list21 = ((InnerNode) list2Holder.children().get("1")); + assertThat(list21.uri(), is("test-yang:cont1.cont2.list2[1]")); + assertThat(list21.children().containsKey("leaf4"), is(true)); + l = ((LeafNode) list21.children().get("leaf4")); + assertThat(l.uri(), is("test-yang:cont1.cont2.list2[1].leaf4")); + + assertThat(childNodes.containsKey("leaf5"), is(true)); + l = ((LeafNode) childNodes.get("leaf5")); + assertThat(l.uri(), is("test-yang:cont1.cont2.leaf5")); + assertThat(childNodes.containsKey("leaf6"), is(true)); + l = ((LeafNode) childNodes.get("leaf6")); + assertThat(l.uri(), is("test-yang:cont1.cont2.leaf6")); + + HolderNode ll3Holder = ((HolderNode) childNodes.get("ll3")); + assertThat(ll3Holder.uri(), is("test-yang:cont1.cont2.ll3")); + assertThat(((LeafNode) ll3Holder.children().get("0")).name(), is("ll3")); + l = ((LeafNode) ll3Holder.children().get("0")); + assertThat(l.uri(), is("test-yang:cont1.cont2.ll3[0]")); + assertThat(((LeafNode) ll3Holder.children().get("1")).name(), is("ll3")); + l = ((LeafNode) ll3Holder.children().get("1")); + assertThat(l.uri(), is("test-yang:cont1.cont2.ll3[1]")); + + HolderNode ll4Holder = ((HolderNode) childNodes.get("ll4")); + assertThat(ll4Holder.uri(), is("test-yang:cont1.cont2.ll4")); + assertThat(((LeafNode) ll4Holder.children().get("0")).name(), is("ll4")); + l = ((LeafNode) ll4Holder.children().get("0")); + assertThat(l.uri(), is("test-yang:cont1.cont2.ll4[0]")); + assertThat(((LeafNode) ll4Holder.children().get("1")).name(), is("ll4")); + l = ((LeafNode) ll4Holder.children().get("1")); + assertThat(l.uri(), is("test-yang:cont1.cont2.ll4[1]")); + + Map output = ser.decode(node); + assertThat(output.size(), is(params.size())); + for (Map.Entry entry : output.entrySet()) { + assertTrue(params.containsKey(entry.getKey())); + } + } + + @Test + public void testAugment() throws SvcLogicException { + String uri = "test-yang:cont1/cont2"; + Map params = new HashMap<>(); + params.put("test-yang:cont1.cont2.cont4.leaf10", "abc"); + params.put("test-yang:cont1.cont2.cont4.test-augment:cont5.leaf13", "abc"); + params.put("test-yang:cont1.cont2.cont4.test-augment:list7[0].leaf14", "abc"); + params.put("test-yang:cont1.cont2.cont4.test-augment:list7[1].leaf14", "abc"); + params.put("test-yang:cont1.cont2.cont4.test-augment:leaf15", "abc"); + params.put("test-yang:cont1.cont2.cont4.test-augment:ll6[0]", "abc"); + params.put("test-yang:cont1.cont2.cont4.test-augment:ll6[1]", "abc"); + params.put("test-yang:cont1.cont2.list6[0].leaf11", "abc"); + params.put("test-yang:cont1.cont2.list6[1].leaf11", "abc"); + params.put("test-yang:cont1.cont2.leaf12", "abc"); + params.put("test-yang:cont1.cont2.ll5[0]", "abc"); + params.put("test-yang:cont1.cont2.ll5[1]", "abc"); + + InstanceIdentifierContext iCtx = ParserIdentifier + .toInstanceIdentifier(uri, context, null); + PropertiesNodeSerializer ser = new MdsalPropertiesNodeSerializer( + iCtx.getSchemaNode(), context, uri); + PropertiesNode node = ser.encode(params); + + Map childNodes = ((RootNode) node).children(); + + assertThat(childNodes.containsKey("cont4"), is(true)); + SingleInstanceNode cont4 = ((SingleInstanceNode) childNodes.get("cont4")); + for (Map.Entry> augToChild + : cont4.augmentations().asMap().entrySet()) { + Collection child = augToChild.getValue(); + if (!child.isEmpty()) { + List expectedNodes = new LinkedList<>(); + expectedNodes.add("test-yang:cont1.cont2.cont4.test-augment:cont5"); + expectedNodes.add("test-yang:cont1.cont2.cont4.test-augment:list7"); + expectedNodes.add("test-yang:cont1.cont2.cont4.test-augment:leaf15"); + expectedNodes.add("test-yang:cont1.cont2.cont4.test-augment:ll6"); + assertThat(expectedNodes.size(), is(child.size())); + for (PropertiesNode pNode : child) { + assertThat(expectedNodes.contains(pNode.uri()), is(true)); + if (pNode.uri().equals("test-yang:cont1.cont2.cont4.test-augment:cont5")) { + assertThat(((SingleInstanceNode) pNode).children().containsKey("leaf13"), is(true)); + LeafNode l = ((LeafNode) ((SingleInstanceNode) pNode).children().get("leaf13")); + assertThat(l.uri(), is("test-yang:cont1.cont2.cont4.test-augment:cont5.leaf13")); + } else if (pNode.uri().equals("test-yang:cont1.cont2.cont4.test-augment:list7")) { + ListHolderNode list7Holder = ((ListHolderNode) pNode); + MultiInstanceNode list7 = ((MultiInstanceNode) list7Holder.child("0")); + assertThat(list7.uri(), is("test-yang:cont1.cont2.cont4.test-augment:list7[0]")); + Map list7Child = list7.children(); + assertThat(list7Child.containsKey("leaf14"), is(true)); + LeafNode l = ((LeafNode) list7Child.get("leaf14")); + assertThat(l.uri(), is("test-yang:cont1.cont2.cont4.test-augment:list7[0].leaf14")); + list7 = ((MultiInstanceNode) list7Holder.child("1")); + assertThat(list7.uri(), is("test-yang:cont1.cont2.cont4.test-augment:list7[1]")); + list7Child = list7.children(); + assertThat(list7Child.containsKey("leaf14"), is(true)); + l = ((LeafNode) list7Child.get("leaf14")); + assertThat(l.uri(), is("test-yang:cont1.cont2.cont4.test-augment:list7[1].leaf14")); + } else if (pNode.uri().equals("test-yang:cont1.cont2.cont4.test-augment:leaf15")) { + LeafNode leaf15 = ((LeafNode) pNode); + assertThat(leaf15.name(), is("leaf15")); + assertThat(leaf15.uri(), is("test-yang:cont1.cont2.cont4.test-augment:leaf15")); + } else if (pNode.uri().equals("test-yang:cont1.cont2.cont4.test-augment:ll6")) { + LeafListHolderNode ll6Holder = ((LeafListHolderNode) pNode); + assertThat(ll6Holder.children().containsKey("0"), is(true)); + LeafNode l = ((LeafNode) ll6Holder.children().get("0")); + assertThat(l.uri(), is("test-yang:cont1.cont2.cont4.test-augment:ll6[0]")); + assertThat(ll6Holder.children().containsKey("1"), is(true)); + l = ((LeafNode) ll6Holder.children().get("1")); + assertThat(l.uri(), is("test-yang:cont1.cont2.cont4.test-augment:ll6[1]")); + } + } + } + } + assertThat(cont4.uri(), is("test-yang:cont1.cont2.cont4")); + assertThat(cont4.children().containsKey("leaf10"), is(true)); + LeafNode l = ((LeafNode) cont4.children().get("leaf10")); + assertThat(l.uri(), is("test-yang:cont1.cont2.cont4.leaf10")); + + assertThat(childNodes.containsKey("list6"), is(true)); + HolderNode list6Holder = ((ListHolderNode) childNodes.get("list6")); + assertThat(list6Holder.uri(), is("test-yang:cont1.cont2.list6")); + MultiInstanceNode list6 = ((MultiInstanceNode) list6Holder.child("0")); + assertThat(list6.uri(), is("test-yang:cont1.cont2.list6[0]")); + Map list6Child = list6.children(); + assertThat(list6Child.containsKey("leaf11"), is(true)); + l = ((LeafNode) list6Child.get("leaf11")); + assertThat(l.uri(), is("test-yang:cont1.cont2.list6[0].leaf11")); + list6 = ((MultiInstanceNode) list6Holder.child("1")); + assertThat(list6.uri(), is("test-yang:cont1.cont2.list6[1]")); + list6Child = list6.children(); + assertThat(list6Child.containsKey("leaf11"), is(true)); + l = ((LeafNode) list6Child.get("leaf11")); + assertThat(l.uri(), is("test-yang:cont1.cont2.list6[1].leaf11")); + + assertThat(childNodes.containsKey("leaf12"), is(true)); + LeafNode leaf12 = ((LeafNode) childNodes.get("leaf12")); + assertThat(leaf12.name(), is("leaf12")); + assertThat(leaf12.uri(), is("test-yang:cont1.cont2.leaf12")); + + LeafListHolderNode ll5Holder = ((LeafListHolderNode) childNodes.get("ll5")); + assertThat(ll5Holder.uri(), is("test-yang:cont1.cont2.ll5")); + assertThat(ll5Holder.children().containsKey("0"), is(true)); + l = ((LeafNode) ll5Holder.children().get("0")); + assertThat(l.uri(), is("test-yang:cont1.cont2.ll5[0]")); + assertThat(ll5Holder.children().containsKey("1"), is(true)); + l = ((LeafNode) ll5Holder.children().get("1")); + assertThat(l.uri(), is("test-yang:cont1.cont2.ll5[1]")); + + Map output = ser.decode(node); + for (Map.Entry entry : output.entrySet()) { + assertTrue(params.containsKey(entry.getKey())); + } + } + + @Test + public void testChoiceCase1() throws SvcLogicException { + String uri = "test-yang:cont8"; + Map params = new HashMap<>(); + params.put("test-yang:cont8.cont6.leaf16", "abc"); + params.put("test-yang:cont8.list8[0].leaf18", "abc"); + params.put("test-yang:cont8.list8[1].leaf18", "abc"); + params.put("test-yang:cont8.leaf19", "abc"); + params.put("test-yang:cont8.ll7[0]", "abc"); + params.put("test-yang:cont8.ll7[1]", "abc"); + + InstanceIdentifierContext iCtx = ParserIdentifier + .toInstanceIdentifier(uri, context, null); + PropertiesNodeSerializer ser = new MdsalPropertiesNodeSerializer( + iCtx.getSchemaNode(), context, uri); + PropertiesNode node = ser.encode(params); + + Map childNodes = ((RootNode) node).children(); + + assertThat(childNodes.containsKey("cont6"), is(true)); + SingleInstanceNode cont6 = ((SingleInstanceNode) childNodes.get("cont6")); + assertThat(cont6.uri(), is("test-yang:cont8.cont6")); + assertThat(cont6.children().containsKey("leaf16"), is(true)); + LeafNode l = ((LeafNode) cont6.children().get("leaf16")); + assertThat(l.uri(), is("test-yang:cont8.cont6.leaf16")); + + assertThat(childNodes.containsKey("list8"), is(true)); + HolderNode list6Holder = ((ListHolderNode) childNodes.get("list8")); + assertThat(list6Holder.uri(), is("test-yang:cont8.list8")); + MultiInstanceNode list6 = ((MultiInstanceNode) list6Holder.child("0")); + assertThat(list6.uri(), is("test-yang:cont8.list8[0]")); + Map list6Child = list6.children(); + assertThat(list6Child.containsKey("leaf18"), is(true)); + l = ((LeafNode) list6Child.get("leaf18")); + assertThat(l.uri(), is("test-yang:cont8.list8[0].leaf18")); + list6 = ((MultiInstanceNode) list6Holder.child("1")); + list6Child = list6.children(); + assertThat(list6Child.containsKey("leaf18"), is(true)); + l = ((LeafNode) list6Child.get("leaf18")); + assertThat(l.uri(), is("test-yang:cont8.list8[1].leaf18")); + + assertThat(childNodes.containsKey("leaf19"), is(true)); + LeafNode leaf12 = ((LeafNode) childNodes.get("leaf19")); + assertThat(leaf12.name(), is("leaf19")); + assertThat(leaf12.uri(), is("test-yang:cont8.leaf19")); + + LeafListHolderNode ll5Holder = ((LeafListHolderNode) childNodes.get("ll7")); + assertThat(ll5Holder.uri(), is("test-yang:cont8.ll7")); + assertThat(ll5Holder.children().containsKey("0"), is(true)); + l = ((LeafNode) ll5Holder.children().get("0")); + assertThat(l.uri(), is("test-yang:cont8.ll7[0]")); + assertThat(ll5Holder.children().containsKey("1"), is(true)); + l = ((LeafNode) ll5Holder.children().get("1")); + assertThat(l.uri(), is("test-yang:cont8.ll7[1]")); + + Map output = ser.decode(node); + assertThat(output.size(), is(params.size())); + for (Map.Entry entry : output.entrySet()) { + assertTrue(params.containsKey(entry.getKey())); + } + } + + @Test + public void testChoiceCase2() throws SvcLogicException { + String uri = "test-yang:cont9"; + Map params = new HashMap<>(); + params.put("test-yang:cont9.leaf20", "abc"); + params.put("test-yang:cont9.ll8[0]", "abc"); + params.put("test-yang:cont9.cont11.leaf25", "abc"); + + InstanceIdentifierContext iCtx = ParserIdentifier + .toInstanceIdentifier(uri, context, null); + PropertiesNodeSerializer ser = new MdsalPropertiesNodeSerializer( + iCtx.getSchemaNode(), context, uri); + PropertiesNode node = ser.encode(params); + + Map childNodes = ((RootNode) node).children(); + + assertThat(childNodes.containsKey("cont11"), is(true)); + SingleInstanceNode cont4 = ((SingleInstanceNode) childNodes.get("cont11")); + assertThat(cont4.uri(), is("test-yang:cont9.cont11")); + assertThat(cont4.children().containsKey("leaf25"), is(true)); + LeafNode l = ((LeafNode) cont4.children().get("leaf25")); + assertThat(l.uri(), is("test-yang:cont9.cont11.leaf25")); + + assertThat(childNodes.containsKey("leaf20"), is(true)); + l = ((LeafNode) childNodes.get("leaf20")); + assertThat(l.uri(), is("test-yang:cont9.leaf20")); + + LeafListHolderNode ll5Holder = ((LeafListHolderNode) childNodes.get("ll8")); + assertThat(ll5Holder.uri(), is("test-yang:cont9.ll8")); + assertThat(ll5Holder.children().containsKey("0"), is(true)); + l = ((LeafNode) ll5Holder.children().get("0")); + assertThat(l.uri(), is("test-yang:cont9.ll8[0]")); + + Map output = ser.decode(node); + assertThat(output.size(), is(params.size())); + for (Map.Entry entry : output.entrySet()) { + assertTrue(params.containsKey(entry.getKey())); + } + } + + @Test + public void testChoiceCase3() throws SvcLogicException { + String uri = "test-yang:cont8/cont6"; + Map params = new HashMap<>(); + params.put("test-yang:cont8.cont6.test-augment:leaf21", "abc"); + + InstanceIdentifierContext iCtx = ParserIdentifier + .toInstanceIdentifier(uri, context, null); + PropertiesNodeSerializer ser = new MdsalPropertiesNodeSerializer( + iCtx.getSchemaNode(), context, uri); + PropertiesNode node = ser.encode(params); + + for (Map.Entry> augToChild + : node.augmentations().asMap().entrySet()) { + Collection child = augToChild.getValue(); + if (!child.isEmpty()) { + List expectedNodes = new LinkedList<>(); + expectedNodes.add("test-yang:cont8.cont6.test-augment:leaf21"); + assertThat(expectedNodes.size(), is(child.size())); + for (PropertiesNode pNode : child) { + assertThat(expectedNodes.contains(pNode.uri()), is(true)); + } + } + } + + Map childNodes = ((RootNode) node).children(); + + assertThat(childNodes.containsKey("leaf21"), is(true)); + LeafNode leaf12 = ((LeafNode) childNodes.get("leaf21")); + assertThat(leaf12.name(), is("leaf21")); + assertThat(leaf12.uri(), is("test-yang:cont8.cont6.test-augment:leaf21")); + + Map output = ser.decode(node); + assertThat(output.size(), is(params.size())); + for (Map.Entry entry : output.entrySet()) { + assertTrue(params.containsKey(entry.getKey())); + } + } + + @Test + public void testGrouping() throws SvcLogicException { + String uri = "test-yang:cont13"; + Map params = new HashMap<>(); + params.put("test-yang:cont13.cont12.leaf26", "abc"); + params.put("test-yang:cont13.list9[0].leaf27", "abc"); + params.put("test-yang:cont13.leaf28", "abc"); + params.put("test-yang:cont13.ll9[0]", "abc"); + + InstanceIdentifierContext iCtx = ParserIdentifier + .toInstanceIdentifier(uri, context, null); + PropertiesNodeSerializer ser = new MdsalPropertiesNodeSerializer( + iCtx.getSchemaNode(), context, uri); + PropertiesNode node = ser.encode(params); + + Map childNodes = ((RootNode) node).children(); + + assertThat(childNodes.containsKey("cont12"), is(true)); + SingleInstanceNode cont4 = ((SingleInstanceNode) childNodes.get("cont12")); + assertThat(cont4.uri(), is("test-yang:cont13.cont12")); + assertThat(cont4.children().containsKey("leaf26"), is(true)); + LeafNode l = ((LeafNode) cont4.children().get("leaf26")); + assertThat(l.uri(), is("test-yang:cont13.cont12.leaf26")); + + assertThat(childNodes.containsKey("list9"), is(true)); + HolderNode list6Holder = ((ListHolderNode) childNodes.get("list9")); + assertThat(list6Holder.uri(), is("test-yang:cont13.list9")); + MultiInstanceNode list6 = ((MultiInstanceNode) list6Holder.child("0")); + assertThat(list6.uri(), is("test-yang:cont13.list9[0]")); + Map list6Child = list6.children(); + assertThat(list6Child.containsKey("leaf27"), is(true)); + l = ((LeafNode) list6Child.get("leaf27")); + assertThat(l.uri(), is("test-yang:cont13.list9[0].leaf27")); + + assertThat(childNodes.containsKey("leaf28"), is(true)); + LeafNode leaf12 = ((LeafNode) childNodes.get("leaf28")); + assertThat(leaf12.name(), is("leaf28")); + assertThat(leaf12.uri(), is("test-yang:cont13.leaf28")); + + LeafListHolderNode ll5Holder = ((LeafListHolderNode) childNodes.get("ll9")); + assertThat(ll5Holder.children().containsKey("0"), is(true)); + + Map output = ser.decode(node); + assertThat(output.size(), is(params.size())); + for (Map.Entry entry : output.entrySet()) { + assertTrue(params.containsKey(entry.getKey())); + } + } + + @Test + public void testGrouping2() throws SvcLogicException { + String uri = "test-yang:cont9/cont11"; + Map params = new HashMap<>(); + params.put("test-yang:cont9.cont11.leaf25", "abc"); + params.put("test-yang:cont9.cont11.cont13.cont12.leaf26", "abc"); + params.put("test-yang:cont9.cont11.cont13.list9[0].leaf27", "abc"); + params.put("test-yang:cont9.cont11.cont13.leaf28", "abc"); + params.put("test-yang:cont9.cont11.cont13.ll9[0]", "abc"); + InstanceIdentifierContext iCtx = ParserIdentifier + .toInstanceIdentifier(uri, context, null); + PropertiesNodeSerializer ser = new MdsalPropertiesNodeSerializer( + iCtx.getSchemaNode(), context, uri); + PropertiesNode node = ser.encode(params); + + Map childNodes = ((RootNode) node).children(); + + assertThat(childNodes.containsKey("cont13"), is(true)); + SingleInstanceNode cont13 = ((SingleInstanceNode) childNodes.get("cont13")); + assertThat(cont13.uri(), is("test-yang:cont9.cont11.cont13")); + SingleInstanceNode cont12 = ((SingleInstanceNode) cont13.children().get("cont12")); + assertThat(cont12.children().containsKey("leaf26"), is(true)); + assertThat(cont12.uri(), is("test-yang:cont9.cont11.cont13.cont12")); + assertThat(cont12.children().containsKey("leaf26"), is(true)); + LeafNode l = ((LeafNode) cont12.children().get("leaf26")); + assertThat(l.uri(), is("test-yang:cont9.cont11.cont13.cont12.leaf26")); + + assertThat(cont13.children().containsKey("list9"), is(true)); + HolderNode list6Holder = ((ListHolderNode) cont13.children().get("list9")); + assertThat(list6Holder.uri(), is("test-yang:cont9.cont11.cont13.list9")); + MultiInstanceNode list6 = ((MultiInstanceNode) list6Holder.child("0")); + assertThat(list6.uri(), is("test-yang:cont9.cont11.cont13.list9[0]")); + Map list6Child = list6.children(); + assertThat(list6Child.containsKey("leaf27"), is(true)); + l = ((LeafNode) list6Child.get("leaf27")); + assertThat(l.uri(), is("test-yang:cont9.cont11.cont13.list9[0].leaf27")); + + assertThat(cont13.children().containsKey("leaf28"), is(true)); + LeafNode leaf12 = ((LeafNode) cont13.children().get("leaf28")); + assertThat(leaf12.name(), is("leaf28")); + assertThat(leaf12.uri(), is("test-yang:cont9.cont11.cont13.leaf28")); + + LeafListHolderNode ll5Holder = ((LeafListHolderNode) cont13.children().get("ll9")); + assertThat(ll5Holder.uri(), is("test-yang:cont9.cont11.cont13.ll9")); + assertThat(ll5Holder.children().containsKey("0"), is(true)); + l = ((LeafNode) ll5Holder.children().get("0")); + assertThat(l.uri(), is("test-yang:cont9.cont11.cont13.ll9[0]")); + + Map output = ser.decode(node); + assertThat(output.size(), is(params.size())); + for (Map.Entry entry : output.entrySet()) { + assertTrue(params.containsKey(entry.getKey())); + } + } + + @Test + public void testGrouping3() throws SvcLogicException { + String uri = "test-augment:cont13"; + Map params = new HashMap<>(); + params.put("test-augment:cont13.cont12.leaf26", "abc"); + params.put("test-augment:cont13.list9[0].leaf27", "abc"); + params.put("test-augment:cont13.leaf28", "abc"); + params.put("test-augment:cont13.ll9[0]", "abc"); + InstanceIdentifierContext iCtx = ParserIdentifier + .toInstanceIdentifier(uri, context, null); + PropertiesNodeSerializer ser = new MdsalPropertiesNodeSerializer( + iCtx.getSchemaNode(), context, uri); + PropertiesNode node = ser.encode(params); + + Map childNodes = ((RootNode) node).children(); + + assertThat(childNodes.containsKey("cont12"), is(true)); + SingleInstanceNode cont12 = ((SingleInstanceNode) childNodes.get("cont12")); + assertThat(cont12.uri(), is("test-augment:cont13.cont12")); + assertThat(cont12.children().containsKey("leaf26"), is(true)); + LeafNode l = ((LeafNode) cont12.children().get("leaf26")); + assertThat(l.uri(), is("test-augment:cont13.cont12.leaf26")); + + assertThat(childNodes.containsKey("list9"), is(true)); + HolderNode list6Holder = ((ListHolderNode) childNodes.get("list9")); + assertThat(list6Holder.uri(), is("test-augment:cont13.list9")); + MultiInstanceNode list6 = ((MultiInstanceNode) list6Holder.child("0")); + assertThat(list6.uri(), is("test-augment:cont13.list9[0]")); + Map list6Child = list6.children(); + assertThat(list6Child.containsKey("leaf27"), is(true)); + l = ((LeafNode) list6Child.get("leaf27")); + assertThat(l.uri(), is("test-augment:cont13.list9[0].leaf27")); + + assertThat(childNodes.containsKey("leaf28"), is(true)); + LeafNode leaf12 = ((LeafNode) childNodes.get("leaf28")); + assertThat(leaf12.name(), is("leaf28")); + assertThat(leaf12.uri(), is("test-augment:cont13.leaf28")); + + LeafListHolderNode ll5Holder = ((LeafListHolderNode) childNodes.get("ll9")); + assertThat(ll5Holder.uri(), is("test-augment:cont13.ll9")); + assertThat(ll5Holder.children().containsKey("0"), is(true)); + l = ((LeafNode) ll5Holder.children().get("0")); + assertThat(l.uri(), is("test-augment:cont13.ll9[0]")); + + Map output = ser.decode(node); + assertThat(output.size(), is(params.size())); + for (Map.Entry entry : output.entrySet()) { + assertTrue(params.containsKey(entry.getKey())); + } + } + + @Test + public void testGrouping4() throws SvcLogicException { + String uri = "test-yang:cont1/cont2/cont4"; + Map params = new HashMap<>(); + params.put("test-yang:cont1.cont2.cont4.test-augment:cont13.cont12.leaf26", "abc"); + params.put("test-yang:cont1.cont2.cont4.test-augment:cont13.list9[0].leaf27", "abc"); + params.put("test-yang:cont1.cont2.cont4.test-augment:cont13.leaf28", "abc"); + params.put("test-yang:cont1.cont2.cont4.test-augment:cont13.ll9[0]", "abc"); + + InstanceIdentifierContext iCtx = ParserIdentifier + .toInstanceIdentifier(uri, context, null); + PropertiesNodeSerializer ser = new MdsalPropertiesNodeSerializer( + iCtx.getSchemaNode(), context, uri); + PropertiesNode node = ser.encode(params); + + for (Map.Entry> augToChild + : node.augmentations().asMap().entrySet()) { + Collection child = augToChild.getValue(); + if (!child.isEmpty()) { + List expectedNodes = new LinkedList<>(); + expectedNodes.add("test-yang:cont1.cont2.cont4.test-augment:cont13"); + assertThat(expectedNodes.size(), is(child.size())); + for (PropertiesNode pNode : child) { + assertThat(expectedNodes.contains(pNode.uri()), is(true)); + SingleInstanceNode cont13 = ((SingleInstanceNode) pNode); + assertThat(cont13.uri(), is("test-yang:cont1.cont2.cont4.test-augment:cont13")); + SingleInstanceNode cont12 = ((SingleInstanceNode) cont13.children().get("cont12")); + assertThat(cont12.children().containsKey("leaf26"), is(true)); + LeafNode l = ((LeafNode) cont12.children().get("leaf26")); + assertThat(l.uri(), is("test-yang:cont1.cont2.cont4.test-augment:cont13.cont12.leaf26")); + + assertThat(cont13.children().containsKey("list9"), is(true)); + HolderNode list6Holder = ((ListHolderNode) cont13.children().get("list9")); + assertThat(list6Holder.uri(), is("test-yang:cont1.cont2.cont4.test-augment:cont13.list9")); + MultiInstanceNode list6 = ((MultiInstanceNode) list6Holder.child("0")); + assertThat(list6.uri(), is("test-yang:cont1.cont2.cont4.test-augment:cont13.list9[0]")); + Map list6Child = list6.children(); + assertThat(list6Child.containsKey("leaf27"), is(true)); + l = ((LeafNode) list6Child.get("leaf27")); + assertThat(l.uri(), is("test-yang:cont1.cont2.cont4.test-augment:cont13.list9[0].leaf27")); + + assertThat(cont13.children().containsKey("leaf28"), is(true)); + LeafNode leaf12 = ((LeafNode) cont13.children().get("leaf28")); + assertThat(leaf12.name(), is("leaf28")); + assertThat(leaf12.uri(), is("test-yang:cont1.cont2.cont4.test-augment:cont13.leaf28")); + + LeafListHolderNode ll5Holder = ((LeafListHolderNode) cont13.children().get("ll9")); + assertThat(ll5Holder.uri(), is("test-yang:cont1.cont2.cont4.test-augment:cont13.ll9")); + assertThat(ll5Holder.children().containsKey("0"), is(true)); + l = ((LeafNode) ll5Holder.children().get("0")); + assertThat(l.uri(), is("test-yang:cont1.cont2.cont4.test-augment:cont13.ll9[0]")); + } + } + } + + Map output = ser.decode(node); + assertThat(output.size(), is(params.size())); + for (Map.Entry entry : output.entrySet()) { + assertTrue(params.containsKey(entry.getKey())); + } + } + + @Test + public void testRpcInput() throws SvcLogicException { + String uri = "test-yang:create-sfc"; + Map params = new HashMap<>(); + params.put("test-yang:create-sfc.input.cont14.leaf28", "abc"); + params.put("test-yang:create-sfc.input.list10[0].leaf29", "abc"); + params.put("test-yang:create-sfc.input.leaf30", "abc"); + params.put("test-yang:create-sfc.input.ll10[0]", "abc"); + params.put("test-yang:create-sfc.input.cont15.leaf31", "abc"); + params.put("test-yang:create-sfc.input.cont13.cont12.leaf26", "abc"); + params.put("test-yang:create-sfc.input.cont13.list9[0].leaf27", "abc"); + params.put("test-yang:create-sfc.input.cont13.leaf28", "abc"); + params.put("test-yang:create-sfc.input.cont13.ll9[0]", "abc"); + params.put("test-yang:create-sfc.input.test-augment:leaf36", "abc"); + + InstanceIdentifierContext iCtx = ParserIdentifier + .toInstanceIdentifier(uri, context, null); + PropertiesNodeSerializer ser = new MdsalPropertiesNodeSerializer( + iCtx.getSchemaNode(), context, uri); + PropertiesNode node = ser.encode(params); + + Map childNodes = ((RootNode) node).children(); + + PropertiesNode input = childNodes.get("input"); + assertThat(input.uri(), is("test-yang:create-sfc.input")); + for (Map.Entry> augToChild + : node.augmentations().asMap().entrySet()) { + Collection child = augToChild.getValue(); + if (!child.isEmpty()) { + List expectedNodes = new LinkedList<>(); + expectedNodes.add("test-yang:create-sfc.input.test-augment:leaf36"); + assertThat(expectedNodes.size(), is(child.size())); + for (PropertiesNode pNode : child) { + assertThat(expectedNodes.contains(pNode.uri()), is(true)); + LeafNode leaf37 = ((LeafNode) pNode); + assertThat(leaf37.name(), is("leaf36")); + assertThat(leaf37.uri(), is("test-yang:create-sfc.input.test-augment:leaf36")); + } + } + } + childNodes = ((InnerNode) input).children(); + + assertThat(childNodes.containsKey("cont14"), is(true)); + SingleInstanceNode cont14 = ((SingleInstanceNode) childNodes.get("cont14")); + assertThat(cont14.uri(), is("test-yang:create-sfc.input.cont14")); + assertThat(cont14.children().containsKey("leaf28"), is(true)); + LeafNode l = ((LeafNode) cont14.children().get("leaf28")); + assertThat(l.uri(), is("test-yang:create-sfc.input.cont14.leaf28")); + + assertThat(childNodes.containsKey("list10"), is(true)); + HolderNode list10Holder = ((ListHolderNode) childNodes.get("list10")); + assertThat(list10Holder.uri(), is("test-yang:create-sfc.input.list10")); + MultiInstanceNode list10 = ((MultiInstanceNode) list10Holder.child("0")); + assertThat(list10.uri(), is("test-yang:create-sfc.input.list10[0]")); + Map list10Child = list10.children(); + assertThat(list10Child.containsKey("leaf29"), is(true)); + l = ((LeafNode) list10Child.get("leaf29")); + assertThat(l.uri(), is("test-yang:create-sfc.input.list10[0].leaf29")); + + assertThat(childNodes.containsKey("leaf30"), is(true)); + LeafNode leaf30 = ((LeafNode) childNodes.get("leaf30")); + assertThat(leaf30.name(), is("leaf30")); + assertThat(leaf30.uri(), is("test-yang:create-sfc.input.leaf30")); + + LeafListHolderNode ll10Holder = ((LeafListHolderNode) childNodes.get("ll10")); + assertThat(ll10Holder.uri(), is("test-yang:create-sfc.input.ll10")); + assertThat(ll10Holder.children().containsKey("0"), is(true)); + l = ((LeafNode) ll10Holder.children().get("0")); + assertThat(l.uri(), is("test-yang:create-sfc.input.ll10[0]")); + + assertThat(childNodes.containsKey("cont15"), is(true)); + SingleInstanceNode cont15 = ((SingleInstanceNode) childNodes.get("cont15")); + assertThat(cont15.uri(), is("test-yang:create-sfc.input.cont15")); + assertThat(cont15.children().containsKey("leaf31"), is(true)); + l = ((LeafNode) cont15.children().get("leaf31")); + assertThat(l.uri(), is("test-yang:create-sfc.input.cont15.leaf31")); + + assertThat(childNodes.containsKey("cont13"), is(true)); + SingleInstanceNode cont13 = ((SingleInstanceNode) childNodes.get("cont13")); + assertThat(cont13.uri(), is("test-yang:create-sfc.input.cont13")); + SingleInstanceNode cont12 = ((SingleInstanceNode) cont13.children().get("cont12")); + assertThat(cont12.uri(), is("test-yang:create-sfc.input.cont13.cont12")); + assertThat(cont12.children().containsKey("leaf26"), is(true)); + l = ((LeafNode) cont12.children().get("leaf26")); + assertThat(l.uri(), is("test-yang:create-sfc.input.cont13.cont12.leaf26")); + + assertThat(cont13.children().containsKey("list9"), is(true)); + HolderNode list9Holder = ((ListHolderNode) cont13.children().get("list9")); + assertThat(list9Holder.uri(), is("test-yang:create-sfc.input.cont13.list9")); + MultiInstanceNode list9 = ((MultiInstanceNode) list9Holder.child("0")); + assertThat(list9.uri(), is("test-yang:create-sfc.input.cont13.list9[0]")); + Map list6Child = list9.children(); + assertThat(list6Child.containsKey("leaf27"), is(true)); + l = ((LeafNode) list6Child.get("leaf27")); + assertThat(l.uri(), is("test-yang:create-sfc.input.cont13.list9[0].leaf27")); + + assertThat(cont13.children().containsKey("leaf28"), is(true)); + LeafNode leaf12 = ((LeafNode) cont13.children().get("leaf28")); + assertThat(leaf12.name(), is("leaf28")); + assertThat(leaf12.uri(), is("test-yang:create-sfc.input.cont13.leaf28")); + + LeafListHolderNode ll5Holder = ((LeafListHolderNode) cont13.children().get("ll9")); + assertThat(ll5Holder.uri(), is("test-yang:create-sfc.input.cont13.ll9")); + assertThat(ll5Holder.children().containsKey("0"), is(true)); + l = ((LeafNode) ll5Holder.children().get("0")); + assertThat(l.uri(), is("test-yang:create-sfc.input.cont13.ll9[0]")); + + Map output = ser.decode(node); + assertThat(output.size(), is(params.size())); + for (Map.Entry entry : output.entrySet()) { + assertTrue(params.containsKey(entry.getKey())); + } + } + + @Test + public void testRpcOutput() throws SvcLogicException { + String uri = "test-yang:create-sfc"; + Map params = new HashMap<>(); + params.put("test-yang:create-sfc.output.cont16.leaf32", "abc"); + params.put("test-yang:create-sfc.output.list11[0].leaf33", "abc"); + params.put("test-yang:create-sfc.output.leaf34", "abc"); + params.put("test-yang:create-sfc.output.ll11[0]", "abc"); + params.put("test-yang:create-sfc.output.cont17.leaf35", "abc"); + params.put("test-yang:create-sfc.output.cont13.cont12.leaf26", "abc"); + params.put("test-yang:create-sfc.output.cont13.list9[0].leaf27", "abc"); + params.put("test-yang:create-sfc.output.cont13.leaf28", "abc"); + params.put("test-yang:create-sfc.output.cont13.ll9[0]", "abc"); + params.put("test-yang:create-sfc.output.test-augment:leaf37", "abc"); + + InstanceIdentifierContext iCtx = ParserIdentifier + .toInstanceIdentifier(uri, context, null); + PropertiesNodeSerializer ser = new MdsalPropertiesNodeSerializer( + iCtx.getSchemaNode(), context, uri); + PropertiesNode node = ser.encode(params); + + Map childNodes = ((RootNode) node).children(); + + PropertiesNode output = childNodes.get("output"); + assertThat(output.uri(), is("test-yang:create-sfc.output")); + for (Map.Entry> augmentationToChild : + node.augmentations().asMap().entrySet()) { + Collection c = augmentationToChild.getValue(); + if(!c.isEmpty()) { + List expectedNodes = new LinkedList<>(); + expectedNodes.add("test-yang:create-sfc.output.test-augment:leaf37"); + assertThat(expectedNodes.size(), is(expectedNodes)); + for (PropertiesNode pNode : c) { + assertThat(expectedNodes.contains(pNode.uri()), is(true)); + LeafNode leaf37 = ((LeafNode) pNode); + assertThat(leaf37.name(), is("leaf37")); + assertThat(leaf37.uri(), is("test-yang:create-sfc.output.test-augment:leaf37")); + } + } + } + childNodes = ((InnerNode) output).children(); + + assertThat(childNodes.containsKey("cont16"), is(true)); + SingleInstanceNode cont16 = ((SingleInstanceNode) childNodes.get("cont16")); + assertThat(cont16.uri(), is("test-yang:create-sfc.output.cont16")); + assertThat(cont16.children().containsKey("leaf32"), is(true)); + LeafNode l = ((LeafNode) cont16.children().get("leaf32")); + assertThat(l.uri(), is("test-yang:create-sfc.output.cont16.leaf32")); + + assertThat(childNodes.containsKey("list11"), is(true)); + HolderNode list11Holder = ((ListHolderNode) childNodes.get("list11")); + assertThat(list11Holder.uri(), is("test-yang:create-sfc.output.list11")); + MultiInstanceNode list11 = ((MultiInstanceNode) list11Holder.child("0")); + assertThat(list11.uri(), is("test-yang:create-sfc.output.list11[0]")); + Map list11Child = list11.children(); + assertThat(list11Child.containsKey("leaf33"), is(true)); + l = ((LeafNode) list11Child.get("leaf33")); + assertThat(l.uri(), is("test-yang:create-sfc.output.list11[0].leaf33")); + + assertThat(childNodes.containsKey("leaf34"), is(true)); + LeafNode leaf34 = ((LeafNode) childNodes.get("leaf34")); + assertThat(leaf34.name(), is("leaf34")); + assertThat(leaf34.uri(), is("test-yang:create-sfc.output.leaf34")); + + LeafListHolderNode ll10Holder = ((LeafListHolderNode) childNodes.get("ll11")); + assertThat(ll10Holder.uri(), is("test-yang:create-sfc.output.ll11")); + assertThat(ll10Holder.children().containsKey("0"), is(true)); + l = ((LeafNode) ll10Holder.children().get("0")); + assertThat(l.uri(), is("test-yang:create-sfc.output.ll11[0]")); + + assertThat(childNodes.containsKey("cont17"), is(true)); + SingleInstanceNode cont17 = ((SingleInstanceNode) childNodes.get("cont17")); + assertThat(cont17.uri(), is("test-yang:create-sfc.output.cont17")); + assertThat(cont17.children().containsKey("leaf35"), is(true)); + l = ((LeafNode) cont17.children().get("leaf35")); + assertThat(l.uri(), is("test-yang:create-sfc.output.cont17.leaf35")); + + assertThat(childNodes.containsKey("cont13"), is(true)); + SingleInstanceNode cont13 = ((SingleInstanceNode) childNodes.get("cont13")); + assertThat(cont13.uri(), is("test-yang:create-sfc.output.cont13")); + SingleInstanceNode cont12 = ((SingleInstanceNode) cont13.children().get("cont12")); + assertThat(cont12.uri(), is("test-yang:create-sfc.output.cont13.cont12")); + assertThat(cont12.children().containsKey("leaf26"), is(true)); + l = ((LeafNode) cont12.children().get("leaf26")); + assertThat(l.uri(), is("test-yang:create-sfc.output.cont13.cont12.leaf26")); + + assertThat(cont13.children().containsKey("list9"), is(true)); + HolderNode list9Holder = ((ListHolderNode) cont13.children().get("list9")); + assertThat(list9Holder.uri(), is("test-yang:create-sfc.output.cont13.list9")); + MultiInstanceNode list9 = ((MultiInstanceNode) list9Holder.child("0")); + assertThat(list9.uri(), is("test-yang:create-sfc.output.cont13.list9[0]")); + Map list6Child = list9.children(); + assertThat(list6Child.containsKey("leaf27"), is(true)); + l = ((LeafNode) list6Child.get("leaf27")); + assertThat(l.uri(), is("test-yang:create-sfc.output.cont13.list9[0].leaf27")); + + assertThat(cont13.children().containsKey("leaf28"), is(true)); + LeafNode leaf12 = ((LeafNode) cont13.children().get("leaf28")); + assertThat(leaf12.name(), is("leaf28")); + assertThat(leaf12.uri(), is("test-yang:create-sfc.output.cont13.leaf28")); + + LeafListHolderNode ll5Holder = ((LeafListHolderNode) cont13.children().get("ll9")); + assertThat(ll5Holder.uri(), is("test-yang:create-sfc.output.cont13.ll9")); + assertThat(ll5Holder.children().containsKey("0"), is(true)); + l = ((LeafNode) ll5Holder.children().get("0")); + assertThat(l.uri(), is("test-yang:create-sfc.output.cont13.ll9[0]")); + + Map output1 = ser.decode(node); + assertThat(output1.size(), is(params.size())); + for (Map.Entry entry : output1.entrySet()) { + assertTrue(params.containsKey(entry.getKey())); + } + } + + @Test + public void testContainerSameName() throws SvcLogicException { + String uri = "test-yang:cont18"; + Map params = new HashMap<>(); + params.put("test-yang:cont18.cont18.list12[0].list12[0].leaf36", "abc"); + params.put("test-yang:cont18.cont18.list12[0].leaf36", "hi"); + params.put("test-yang:cont18.cont18.list12[1].list12[0].leaf36", "xyz"); + params.put("test-yang:cont18.cont18.list12[1].list12[1].leaf36", "hey!"); + + InstanceIdentifierContext iCtx = ParserIdentifier + .toInstanceIdentifier(uri, context, null); + PropertiesNodeSerializer ser = new MdsalPropertiesNodeSerializer( + iCtx.getSchemaNode(), context, uri); + PropertiesNode node = ser.encode(params); + + Map childNodes = ((RootNode) node).children(); + + assertThat(childNodes.containsKey("cont18"), is(true)); + node = childNodes.get("cont18"); + assertThat(node.uri(), is("test-yang:cont18.cont18")); + childNodes = ((InnerNode) node).children(); + + assertThat(childNodes.containsKey("list12"), is(true)); + HolderNode holder = ((ListHolderNode) childNodes.get("list12")); + assertThat(holder.uri(), is("test-yang:cont18.cont18.list12")); + MultiInstanceNode node1 = ((MultiInstanceNode) holder.child("0")); + assertThat(node1.uri(), is("test-yang:cont18.cont18.list12[0]")); + Map list12Child = node1.children(); + + assertThat(list12Child.containsKey("leaf36"), is(true)); + LeafNode leaf = ((LeafNode) list12Child.get("leaf36")); + assertThat(leaf.value(), is("hi")); + assertThat(leaf.uri(), is("test-yang:cont18.cont18.list12[0].leaf36")); + + assertThat(list12Child.containsKey("list12"), is(true)); + HolderNode holder1 = ((ListHolderNode) list12Child.get("list12")); + assertThat(holder1.uri(), is("test-yang:cont18.cont18.list12[0].list12")); + node1 = ((MultiInstanceNode) holder1.child("0")); + assertThat(node1.uri(), is("test-yang:cont18.cont18.list12[0].list12[0]")); + list12Child = node1.children(); + assertThat(list12Child.containsKey("leaf36"), is(true)); + leaf = ((LeafNode) list12Child.get("leaf36")); + assertThat(leaf.value(), is("abc")); + assertThat(leaf.uri(), is("test-yang:cont18.cont18.list12[0].list12[0].leaf36")); + + node1 = ((MultiInstanceNode) holder.child("1")); + assertThat(node1.uri(), is("test-yang:cont18.cont18.list12[1]")); + list12Child = node1.children(); + assertThat(list12Child.containsKey("list12"), is(true)); + holder = ((ListHolderNode) list12Child.get("list12")); + assertThat(holder.uri(), is("test-yang:cont18.cont18.list12[1].list12")); + node1 = ((MultiInstanceNode) holder.child("0")); + assertThat(node1.uri(), is("test-yang:cont18.cont18.list12[1].list12[0]")); + assertThat(node1.children().containsKey("leaf36"), is(true)); + leaf = ((LeafNode) node1.children().get("leaf36")); + assertThat(leaf.value(), is("xyz")); + assertThat(leaf.uri(), is("test-yang:cont18.cont18.list12[1].list12[0].leaf36")); + + node1 = ((MultiInstanceNode) holder.child("1")); + assertThat(node1.uri(), is("test-yang:cont18.cont18.list12[1].list12[1]")); + assertThat(node1.children().containsKey("leaf36"), is(true)); + leaf = ((LeafNode) node1.children().get("leaf36")); + assertThat(leaf.value(), is("hey!")); + assertThat(leaf.uri(), is("test-yang:cont18.cont18.list12[1].list12[1].leaf36")); + + Map output1 = ser.decode(node); + assertThat(output1.size(), is(params.size())); + for (Map.Entry entry : output1.entrySet()) { + assertTrue(params.containsKey(entry.getKey())); + } + } + + @Test + public void testPropertiesWithoutSchema() throws SvcLogicException { + String uri = "test-yang:cont18"; + Map params = new HashMap<>(); + params.put("test-yang:cont18.leaf40", "abc"); + params.put("leaf41", "hi"); + params.put("test-yang:cont18.leaf41", "abc"); + + InstanceIdentifierContext iCtx = ParserIdentifier + .toInstanceIdentifier(uri, context, null); + PropertiesNodeSerializer ser = new MdsalPropertiesNodeSerializer( + iCtx.getSchemaNode(), context, uri); + PropertiesNode node = ser.encode(params); + + Map childNodes = ((RootNode) node).children(); + assertThat(childNodes.containsKey("leaf40"), is(true)); + node = childNodes.get("leaf40"); + assertThat(node.uri(), is("test-yang:cont18.leaf40")); + } + + public static SchemaContext compileYangFile() throws FileNotFoundException { + String path = PropertiesSerializerTest.class.getResource("/yang").getPath(); + File dir = new File(path); + String[] fileList = dir.list(); + List yangFiles = new ArrayList(); + if (fileList == null) { + throw new FileNotFoundException("/yang"); + } + for (int i = 0; i < fileList.length; i++) { + final String fileName = fileList[i]; + if (new File(dir, fileName).isDirectory() == false) { + yangFiles.add(new File(dir, fileName)); + } + } + return YangParserTestUtils.parseYangFiles(yangFiles); + } +} \ No newline at end of file diff --git a/restconf-client/provider/src/test/resources/yang/test-augment.yang b/restconf-client/provider/src/test/resources/yang/test-augment.yang new file mode 100644 index 000000000..bac19171b --- /dev/null +++ b/restconf-client/provider/src/test/resources/yang/test-augment.yang @@ -0,0 +1,85 @@ +module test-augment { + yang-version 1; + namespace "urn:opendaylight:params:xml:ns:yang:augment"; + prefix "hello"; + + import test-yang { + prefix t; + } + + revision "2015-01-05" { + description "Initial revision of hello model"; + } + + augment "/t:cont1/t:cont2/t:cont4" { + container cont5 { + leaf leaf13 { + type string; + } + } + list list7 { + leaf leaf14 { + type string; + } + } + leaf leaf15 { + type string; + } + leaf-list ll6 { + type string; + } + uses "t:g1"; + } + + uses "t:g1"; + augment "/t:ch1/t:c1/t:cont8/t:cont6" { + choice ch2 { + case c3 { + leaf leaf21 { + type string; + } + } + case c4 { + leaf leaf22 { + type string; + } + } + } + } + + augment "/t:ch1" { + case c5 { + container cont10 { + leaf leaf23 { + type string; + } + } + } + } + + augment "/t:ch1/t:c1" { + container cont7 { + leaf leaf24 { + type string; + } + } + } + + augment "/t:cont13/t:cont12" { + leaf leaf29 { + type string; + } + } + + augment "/t:create-sfc/t:input" { + leaf leaf36 { + type string; + } + } + + augment "/t:create-sfc/t:output" { + leaf leaf37 { + type string; + } + } +} \ No newline at end of file diff --git a/restconf-client/provider/src/test/resources/yang/test-yang.yang b/restconf-client/provider/src/test/resources/yang/test-yang.yang new file mode 100644 index 000000000..e99d87bf8 --- /dev/null +++ b/restconf-client/provider/src/test/resources/yang/test-yang.yang @@ -0,0 +1,231 @@ +module test-yang { + yang-version 1; + namespace "urn:opendaylight:params:xml:ns:yang:test"; + prefix "hello"; + + revision "2015-01-05" { + description "Initial revision of hello model"; + } + + container cont1 { + container cont2 { + container cont3 { + leaf leaf10 { + type string; + } + } + list list1 { + key "leaf1 leaf2"; + leaf leaf1 { + type string; + } + leaf leaf2 { + type string; + } + leaf leaf3 { + type string; + } + leaf-list ll1 { + type string; + } + leaf-list ll2 { + type string; + } + container cont4 { + leaf leaf11 { + type string; + } + } + list list4 { + leaf leaf8 { + type string; + } + } + list list5 { + leaf leaf9 { + type string; + } + } + } + list list2 { + leaf leaf4 { + type string; + } + } + leaf leaf5 { + type string; + } + leaf leaf6 { + type string; + } + leaf-list ll3 { + type string; + } + leaf-list ll4 { + type string; + } + } + } + + augment "/cont1/cont2" { + container cont4 { + leaf leaf10 { + type string; + } + } + list list6 { + leaf leaf11 { + type string; + } + } + leaf leaf12 { + type string; + } + leaf-list ll5 { + type string; + } + } + + choice ch1 { + case c1 { + container cont8 { + container cont6 { + leaf leaf16 { + type string; + } + } + list list8 { + leaf leaf18 { + type string; + } + } + leaf leaf19 { + type string; + } + leaf-list ll7 { + type string; + } + } + } + case c2 { + container cont9 { + leaf leaf20 { + type string; + } + leaf-list ll8 { + type string; + } + container cont11 { + choice ch3 { + case c1 { + leaf leaf25 { + type string; + } + uses g1; + } + } + } + } + } + } + + grouping g1 { + container cont13 { + container cont12 { + leaf leaf26 { + type string; + } + } + list list9 { + leaf leaf27 { + type string; + } + } + leaf leaf28 { + type string; + } + leaf-list ll9 { + type string; + } + } + } + + uses g1; + + rpc create-sfc { + input { + container cont14 { + leaf leaf28 { + type string; + } + } + list list10 { + leaf leaf29 { + type string; + } + } + leaf leaf30 { + type string; + } + leaf-list ll10 { + type string; + } + choice ch3 { + case c1 { + container cont15 { + leaf leaf31 { + type string; + } + } + } + } + uses g1; + } + output { + container cont16 { + leaf leaf32 { + type string; + } + } + list list11 { + leaf leaf33 { + type string; + } + } + leaf leaf34 { + type string; + } + leaf-list ll11 { + type string; + } + choice ch4 { + case c1 { + container cont17 { + leaf leaf35 { + type string; + } + } + } + } + uses g1; + } + } + + container cont18 { + container cont18 { + list list12 { + list list12 { + leaf leaf36 { + type string; + } + } + leaf leaf36 { + type string; + } + } + } + leaf leaf40 { + type string; + } + } +} \ No newline at end of file -- cgit 1.2.3-korg From 4633416831f2d98ca50668d4514cbd1905749201 Mon Sep 17 00:00:00 2001 From: Vidyashree Rama Date: Tue, 21 Aug 2018 13:47:16 +0530 Subject: Handling identity ref type Handling identity ref type in properties node serializer Issue-ID: CCSDK-378 Change-Id: Ie74088a5e2449c09f9712048f1856990b81d05e7 Signed-off-by: Vidyashree Rama --- .../MdsalPropertiesNodeSerializer.java | 8 ++- .../pnserializer/MdsalPropertiesNodeUtils.java | 56 ++++++++++++++++ .../pnserializer/PropertiesSerializerTest.java | 54 +++++++++++++++ .../src/test/resources/yang/identity-test.yang | 77 ++++++++++++++++++++++ .../test/resources/yang/identity-types-second.yang | 25 +++++++ .../src/test/resources/yang/identity-types.yang | 17 +++++ 6 files changed, 235 insertions(+), 2 deletions(-) create mode 100644 restconf-client/provider/src/test/resources/yang/identity-test.yang create mode 100644 restconf-client/provider/src/test/resources/yang/identity-types-second.yang create mode 100644 restconf-client/provider/src/test/resources/yang/identity-types.yang (limited to 'restconf-client/provider') diff --git a/restconf-client/provider/src/main/java/org/onap/ccsdk/sli/plugins/yangserializers/pnserializer/MdsalPropertiesNodeSerializer.java b/restconf-client/provider/src/main/java/org/onap/ccsdk/sli/plugins/yangserializers/pnserializer/MdsalPropertiesNodeSerializer.java index 146e581fa..20b06d0bc 100644 --- a/restconf-client/provider/src/main/java/org/onap/ccsdk/sli/plugins/yangserializers/pnserializer/MdsalPropertiesNodeSerializer.java +++ b/restconf-client/provider/src/main/java/org/onap/ccsdk/sli/plugins/yangserializers/pnserializer/MdsalPropertiesNodeSerializer.java @@ -34,6 +34,7 @@ import static org.onap.ccsdk.sli.plugins.yangserializers.pnserializer.MdsalPrope import static org.onap.ccsdk.sli.plugins.yangserializers.pnserializer.MdsalPropertiesNodeUtils.getNamespace; import static org.onap.ccsdk.sli.plugins.yangserializers.pnserializer.MdsalPropertiesNodeUtils.getNodeType; import static org.onap.ccsdk.sli.plugins.yangserializers.pnserializer.MdsalPropertiesNodeUtils.getRevision; +import static org.onap.ccsdk.sli.plugins.yangserializers.pnserializer.MdsalPropertiesNodeUtils.getValueNamespace; import static org.onap.ccsdk.sli.plugins.yangserializers.pnserializer.MdsalPropertiesNodeUtils.resolveName; import static org.onap.ccsdk.sli.plugins.yangserializers.pnserializer.NodeType.MULTI_INSTANCE_LEAF_NODE; import static org.onap.ccsdk.sli.plugins.yangserializers.pnserializer.NodeType.MULTI_INSTANCE_NODE; @@ -121,13 +122,16 @@ public class MdsalPropertiesNodeSerializer extends PropertiesNodeSerializer r) { return (r.isPresent()) ? r.get().toString() : null; } + + /** + * Returns value namespace for leaf value. + * + * @param value value of the leaf + * @param ctx schema context + * @return value namespace + * @throws SvcLogicException if identity/module could not be found + */ + static Namespace getValueNamespace(String value, + SchemaContext ctx) + throws SvcLogicException { + String prefix = getPrefixFromValue(value); + if (prefix == null) { + return null; + } + + IdentitySchemaNode id = IdentityCodecUtil.parseIdentity(value, + ctx, + prefixToModule -> { + final Iterator modules = ctx.findModules(prefix).iterator(); + checkArgument(modules.hasNext(), "Could not find " + + "module %s", prefix); + return modules.next().getQNameModule(); + }); + + if (id == null) { + throw new SvcLogicException("Could not find identity"); + } + + return getModuleNamespace(id.getQName(), ctx); + } + + private static String getPrefixFromValue(String value) { + int lastIndexOfColon = value.lastIndexOf(":"); + if (lastIndexOfColon != -1) { + return value.substring(0, lastIndexOfColon); + } + return null; + } + + private static Namespace getModuleNamespace(QName qName, SchemaContext ctx) + throws SvcLogicException { + Optional module = ctx.findModule(qName.getModule()); + if (!module.isPresent()) { + throw new SvcLogicException("Could not find module node"); + } + Module m = module.get(); + return new Namespace(m.getName(), m.getQNameModule().getNamespace(), + getRevision(m.getRevision())); + } } diff --git a/restconf-client/provider/src/test/java/org/onap/ccsdk/sli/plugins/yangserializers/pnserializer/PropertiesSerializerTest.java b/restconf-client/provider/src/test/java/org/onap/ccsdk/sli/plugins/yangserializers/pnserializer/PropertiesSerializerTest.java index fddfe2d40..dc0da6f7c 100644 --- a/restconf-client/provider/src/test/java/org/onap/ccsdk/sli/plugins/yangserializers/pnserializer/PropertiesSerializerTest.java +++ b/restconf-client/provider/src/test/java/org/onap/ccsdk/sli/plugins/yangserializers/pnserializer/PropertiesSerializerTest.java @@ -1071,6 +1071,60 @@ public final class PropertiesSerializerTest { assertThat(node.uri(), is("test-yang:cont18.leaf40")); } + @Test + public void testIdentityRef() throws SvcLogicException { + String uri = "identity-test:test"; + Map params = new HashMap<>(); + params.put("identity-test:test.con1.interface", "identity-types:physical"); + params.put("identity-test:test.con1.interfaces.int-list[0].iden", "identity-test:Giga"); + params.put("identity-test:test.con1.interfaces.int-list[0].available.ll[0]", "identity-types:Loopback"); + params.put("identity-test:test.con1.interfaces.int-list[0].available.leaf1", "identity-types-second:Ethernet"); + params.put("identity-test:test.con1.interfaces.int-list[0].available.leaf2", "identity-types-second:iden2"); + InstanceIdentifierContext iCtx = ParserIdentifier + .toInstanceIdentifier(uri, context, null); + + PropertiesNodeSerializer ser = new MdsalPropertiesNodeSerializer( + iCtx.getSchemaNode(), context, uri); + PropertiesNode node = ser.encode(params); + Map childNodes = ((RootNode) node).children(); + assertThat(childNodes.containsKey("con1"), is(true)); + node = childNodes.get("con1"); + assertThat(node.uri(), is("identity-test:test.con1")); + LeafNode l = ((LeafNode) ((SingleInstanceNode) node).children().get("interface")); + assertThat(l.uri(), is("identity-test:test.con1.interface")); + assertThat(l.valueNs().moduleName(), is("identity-types")); + assertThat(l.valueNs().moduleNs().toString(), is("identity:list:ns:test:json:ser")); + + // identity type inside union + node = ((SingleInstanceNode) ((SingleInstanceNode) node).children().get("interfaces")); + node = ((ListHolderNode) ((SingleInstanceNode) node).children().get("int-list")); + node = ((MultiInstanceNode) ((ListHolderNode) node).children().get("0")); + l = ((LeafNode) ((MultiInstanceNode) node).children().get("iden")); + assertThat(l.uri(), is("identity-test:test.con1.interfaces.int-list[0].iden")); + assertThat(l.valueNs().moduleName(), is("identity-test")); + assertThat(l.valueNs().moduleNs().toString(), is("identity:ns:test:json:ser")); + + // leaf-list test + node = (SingleInstanceNode) ((MultiInstanceNode) node).children().get("available"); + LeafListHolderNode holder = (LeafListHolderNode) ((SingleInstanceNode) node).children().get("ll"); + l = ((LeafNode) holder.children().get("0")); + assertThat(l.uri(), is("identity-test:test.con1.interfaces.int-list[0].available.ll[0]")); + assertThat(l.valueNs().moduleName(), is("identity-types")); + assertThat(l.valueNs().moduleNs().toString(), is("identity:list:ns:test:json:ser")); + + // leaf-ref test + l = ((LeafNode) ((SingleInstanceNode) node).children().get("leaf1")); + assertThat(l.uri(), is("identity-test:test.con1.interfaces.int-list[0].available.leaf1")); + assertThat(l.valueNs().moduleName(), is("identity-types-second")); + assertThat(l.valueNs().moduleNs().toString(), is("identity:list:second:ns:test:json:ser")); + + // list of base identity test + l = ((LeafNode) ((SingleInstanceNode) node).children().get("leaf2")); + assertThat(l.uri(), is("identity-test:test.con1.interfaces.int-list[0].available.leaf2")); + assertThat(l.valueNs().moduleName(), is("identity-types-second")); + assertThat(l.valueNs().moduleNs().toString(), is("identity:list:second:ns:test:json:ser")); + } + public static SchemaContext compileYangFile() throws FileNotFoundException { String path = PropertiesSerializerTest.class.getResource("/yang").getPath(); File dir = new File(path); diff --git a/restconf-client/provider/src/test/resources/yang/identity-test.yang b/restconf-client/provider/src/test/resources/yang/identity-test.yang new file mode 100644 index 000000000..81d3f0a0b --- /dev/null +++ b/restconf-client/provider/src/test/resources/yang/identity-test.yang @@ -0,0 +1,77 @@ +module identity-test { + yang-version 1.1; + namespace "identity:ns:test:json:ser"; + prefix "id"; + + import identity-types { + prefix "type"; + } + + import identity-types-second { + prefix "sec"; + } + + revision "2013-07-15"; + + identity optical { + base type:int-type; + } + + identity Giga { + base type:physical; + } + + typedef available { + type identityref { + base "type:physical"; + } + } + + typedef typed{ + type union { + type int32; + type int8; + type identityref { + base type:int-type; + } + } + } + + container test { + leaf l { + type string; + } + container con1 { + leaf interface { + type identityref { + base "type:int-type"; + } + } + container interfaces { + list int-list { + key "iden"; + leaf iden { + type "id:typed"; + } + container available { + leaf-list ll { + type available; + } + leaf leaf1 { + type leafref { + path "../../iden"; + } + } + + leaf leaf2 { + type identityref { + base type:int-type; + base sec:iden1; + } + } + } + } + } + } + } +} diff --git a/restconf-client/provider/src/test/resources/yang/identity-types-second.yang b/restconf-client/provider/src/test/resources/yang/identity-types-second.yang new file mode 100644 index 000000000..ad752de31 --- /dev/null +++ b/restconf-client/provider/src/test/resources/yang/identity-types-second.yang @@ -0,0 +1,25 @@ +module identity-types-second{ + yang-version 1; + namespace "identity:list:second:ns:test:json:ser"; + prefix "sec"; + + import identity-types { + prefix "type"; + } + + revision "2013-07-15"; + + identity virtual { + base type:int-type; + } + + identity Ethernet { + base type:physical; + } + + identity iden1; + + identity iden2 { + base iden1; + } +} diff --git a/restconf-client/provider/src/test/resources/yang/identity-types.yang b/restconf-client/provider/src/test/resources/yang/identity-types.yang new file mode 100644 index 000000000..25c8fa54f --- /dev/null +++ b/restconf-client/provider/src/test/resources/yang/identity-types.yang @@ -0,0 +1,17 @@ +module identity-types { + yang-version 1; + namespace "identity:list:ns:test:json:ser"; + prefix "type"; + revision "2013-07-15"; + + identity int-type { + } + + identity physical { + base int-type; + } + + identity Loopback { + base physical; + } +} -- cgit 1.2.3-korg From 51608f7e35fdad0242b3d801f2015a9db5fa93a1 Mon Sep 17 00:00:00 2001 From: janani b Date: Thu, 23 Aug 2018 14:41:22 +0530 Subject: Implementation of Data Format serializer Data format serializer code Issue-ID: CCSDK-376 Change-Id: Ie1954e6237374411ce3f07039030027042581d33 Signed-off-by: janani b --- .../dfserializer/DataFormatSerializer.java | 9 +- .../dfserializer/DefaultJsonListener.java | 59 +++++- .../dfserializer/DefaultJsonWalker.java | 93 ++++++++- .../dfserializer/DefaultXmlListener.java | 31 ++- .../dfserializer/DefaultXmlWalker.java | 18 +- .../dfserializer/DfListenerFactory.java | 13 +- .../dfserializer/DfSerializerFactory.java | 16 +- .../dfserializer/DfSerializerUtil.java | 216 +++++++++++++++++++++ .../yangserializers/dfserializer/JsonListener.java | 8 +- .../dfserializer/JsonSerializer.java | 46 ++++- .../yangserializers/dfserializer/JsonWalker.java | 5 +- .../dfserializer/MdsalSerializerHelper.java | 192 +++++++++++++++++- .../dfserializer/PropertiesNodeJsonListener.java | 165 +++++++++++++++- .../dfserializer/PropertiesNodeXmlListener.java | 178 ++++++++++++++++- .../dfserializer/SerializerHelper.java | 9 +- .../yangserializers/dfserializer/XmlListener.java | 8 +- .../dfserializer/XmlSerializer.java | 45 ++++- .../yangserializers/dfserializer/XmlWalker.java | 5 +- .../DefaultPropertiesNodeListener.java | 7 +- .../pnserializer/DefaultPropertiesNodeWalker.java | 8 +- .../MdsalPropertiesNodeSerializer.java | 3 +- .../pnserializer/PropertiesNodeListener.java | 14 +- .../pnserializer/PropertiesNodeSerializer.java | 5 +- .../pnserializer/PropertiesNodeWalker.java | 7 +- .../yangserializers/pnserializer/RootNode.java | 10 +- 25 files changed, 1088 insertions(+), 82 deletions(-) create mode 100644 restconf-client/provider/src/main/java/org/onap/ccsdk/sli/plugins/yangserializers/dfserializer/DfSerializerUtil.java (limited to 'restconf-client/provider') diff --git a/restconf-client/provider/src/main/java/org/onap/ccsdk/sli/plugins/yangserializers/dfserializer/DataFormatSerializer.java b/restconf-client/provider/src/main/java/org/onap/ccsdk/sli/plugins/yangserializers/dfserializer/DataFormatSerializer.java index 57280e2e9..cab64391a 100644 --- a/restconf-client/provider/src/main/java/org/onap/ccsdk/sli/plugins/yangserializers/dfserializer/DataFormatSerializer.java +++ b/restconf-client/provider/src/main/java/org/onap/ccsdk/sli/plugins/yangserializers/dfserializer/DataFormatSerializer.java @@ -20,6 +20,8 @@ package org.onap.ccsdk.sli.plugins.yangserializers.dfserializer; +import org.onap.ccsdk.sli.core.sli.SvcLogicException; + import java.util.List; import java.util.Map; @@ -57,17 +59,20 @@ public abstract class DataFormatSerializer { * @param param context memory parameter * @param annotations annotations * @return data format body + * @throws SvcLogicException when serialization fails */ public abstract String encode(Map param, - Map> annotations); + Map> annotations) throws SvcLogicException; /** * Decodes data format body to context memory parameters. * * @param dataFormatBody abstract node * @return context memory parameters + * @throws SvcLogicException when serialization fails */ - public abstract Map decode(String dataFormatBody); + public abstract Map decode(String dataFormatBody) + throws SvcLogicException; /** * Returns data format serializer context. diff --git a/restconf-client/provider/src/main/java/org/onap/ccsdk/sli/plugins/yangserializers/dfserializer/DefaultJsonListener.java b/restconf-client/provider/src/main/java/org/onap/ccsdk/sli/plugins/yangserializers/dfserializer/DefaultJsonListener.java index 5e71eea3b..107585a72 100644 --- a/restconf-client/provider/src/main/java/org/onap/ccsdk/sli/plugins/yangserializers/dfserializer/DefaultJsonListener.java +++ b/restconf-client/provider/src/main/java/org/onap/ccsdk/sli/plugins/yangserializers/dfserializer/DefaultJsonListener.java @@ -21,8 +21,16 @@ package org.onap.ccsdk.sli.plugins.yangserializers.dfserializer; import com.fasterxml.jackson.databind.JsonNode; +import org.onap.ccsdk.sli.core.sli.SvcLogicException; import org.onap.ccsdk.sli.plugins.yangserializers.pnserializer.NodeType; +import static java.lang.String.format; +import static org.onap.ccsdk.sli.plugins.yangserializers.dfserializer.DfSerializerUtil.NODE_TYPE_ERR; +import static org.onap.ccsdk.sli.plugins.yangserializers.pnserializer.NodeType.MULTI_INSTANCE_LEAF_NODE; +import static org.onap.ccsdk.sli.plugins.yangserializers.pnserializer.NodeType.MULTI_INSTANCE_NODE; +import static org.onap.ccsdk.sli.plugins.yangserializers.pnserializer.NodeType.SINGLE_INSTANCE_LEAF_NODE; +import static org.onap.ccsdk.sli.plugins.yangserializers.pnserializer.NodeType.SINGLE_INSTANCE_NODE; + /** * Representation of default implementation of JSON listener. @@ -54,13 +62,40 @@ public class DefaultJsonListener implements JsonListener { } @Override - public void enterJsonNode(String nodeName, JsonNode node, NodeType nodeType) { - //TODO: Implementation code. + public void enterJsonNode(String nodeName, JsonNode node, + NodeType nodeType) throws SvcLogicException { + getNodeName(nodeName); + + switch (nodeType) { + case SINGLE_INSTANCE_LEAF_NODE: + serializerHelper.addNode(name, modName, node.asText(), null, + SINGLE_INSTANCE_LEAF_NODE); + break; + + case MULTI_INSTANCE_LEAF_NODE: + serializerHelper.addNode(name, modName, node.asText(), null, + MULTI_INSTANCE_LEAF_NODE); + break; + + case SINGLE_INSTANCE_NODE: + serializerHelper.addNode(name, modName, null, null, + SINGLE_INSTANCE_NODE); + break; + + case MULTI_INSTANCE_NODE: + serializerHelper.addNode(name, modName, null, null, + MULTI_INSTANCE_NODE); + break; + + default: + throw new SvcLogicException(format(NODE_TYPE_ERR, + nodeType.toString())); + } } @Override - public void exitJsonNode(JsonNode node) { - //TODO: Implementation code. + public void exitJsonNode(JsonNode node) throws SvcLogicException { + serializerHelper.exitNode(); } @Override @@ -68,4 +103,20 @@ public class DefaultJsonListener implements JsonListener { return serializerHelper; } + /** + * Parses the abstract JSON name and fills the node name and node + * namespace of the current JSON node. + * + * @param abstractName abstract JSON name + */ + private void getNodeName(String abstractName) { + String[] val = abstractName.split(":"); + if (val.length == 2) { + modName = val[0]; + name = val[1]; + } else { + name = val[0]; + } + } + } diff --git a/restconf-client/provider/src/main/java/org/onap/ccsdk/sli/plugins/yangserializers/dfserializer/DefaultJsonWalker.java b/restconf-client/provider/src/main/java/org/onap/ccsdk/sli/plugins/yangserializers/dfserializer/DefaultJsonWalker.java index 20d4fa772..47cb8b292 100644 --- a/restconf-client/provider/src/main/java/org/onap/ccsdk/sli/plugins/yangserializers/dfserializer/DefaultJsonWalker.java +++ b/restconf-client/provider/src/main/java/org/onap/ccsdk/sli/plugins/yangserializers/dfserializer/DefaultJsonWalker.java @@ -21,6 +21,20 @@ package org.onap.ccsdk.sli.plugins.yangserializers.dfserializer; import com.fasterxml.jackson.databind.JsonNode; +import com.fasterxml.jackson.databind.node.ArrayNode; +import com.fasterxml.jackson.databind.node.JsonNodeType; +import org.onap.ccsdk.sli.core.sli.SvcLogicException; +import org.onap.ccsdk.sli.plugins.yangserializers.pnserializer.NodeType; + +import java.util.Iterator; +import java.util.Map; + +import static com.fasterxml.jackson.databind.node.JsonNodeType.NUMBER; +import static com.fasterxml.jackson.databind.node.JsonNodeType.STRING; +import static org.onap.ccsdk.sli.plugins.yangserializers.pnserializer.NodeType.MULTI_INSTANCE_LEAF_NODE; +import static org.onap.ccsdk.sli.plugins.yangserializers.pnserializer.NodeType.MULTI_INSTANCE_NODE; +import static org.onap.ccsdk.sli.plugins.yangserializers.pnserializer.NodeType.SINGLE_INSTANCE_LEAF_NODE; +import static org.onap.ccsdk.sli.plugins.yangserializers.pnserializer.NodeType.SINGLE_INSTANCE_NODE; /** * Implementation of JSON walker to walk through the nodes and process it. @@ -28,8 +42,19 @@ import com.fasterxml.jackson.databind.JsonNode; public class DefaultJsonWalker implements JsonWalker { @Override - public void walk(JsonListener listener, JsonNode jsonNode) { - //TODO: Implementation code. + public void walk(JsonListener listener, JsonNode jsonNode) throws + SvcLogicException { + Iterator> children = jsonNode.fields(); + while (children.hasNext()) { + Map.Entry child = children.next(); + JsonNode value = child.getValue(); + String key = child.getKey(); + if (value.isArray()) { + processMultiNodes(key, value, listener); + } else { + processSingleNode(key, value, listener); + } + } } /** @@ -39,10 +64,18 @@ public class DefaultJsonWalker implements JsonWalker { * @param key JSON name * @param value JSON node * @param listener JSON listener + * @throws SvcLogicException when processing the node fails */ private void processSingleNode(String key, JsonNode value, - JsonListener listener) { - //TODO: Implementation code. + JsonListener listener) + throws SvcLogicException { + NodeType nodeType; + if (!value.isContainerNode()) { + nodeType = SINGLE_INSTANCE_LEAF_NODE; + } else { + nodeType = SINGLE_INSTANCE_NODE; + } + processNode(key, value, nodeType, listener); } /** @@ -52,9 +85,57 @@ public class DefaultJsonWalker implements JsonWalker { * @param key JSON name * @param value JSON node * @param listener JSON listener + * @throws SvcLogicException when processing a single instance fails */ private void processMultiNodes(String key, JsonNode value, - JsonListener listener) { - //TODO: Implementation code. + JsonListener listener) + throws SvcLogicException { + NodeType nodeType; + Iterator multiNodes = value.elements(); + while (multiNodes.hasNext()) { + if (isLeafListNode((ArrayNode) value)) { + nodeType = MULTI_INSTANCE_LEAF_NODE; + } else { + nodeType = MULTI_INSTANCE_NODE; + } + JsonNode multiNode = multiNodes.next(); + processNode(key, multiNode, nodeType, listener); + } + } + + /** + * Processes each node by first entering the JSON node through JSON + * listener, second a call back to walking the rest of the tree of the + * node and finally exiting the node. + * + * @param key JSON name + * @param node JSON node + * @param nodeType JSON node type + * @param listener JSON listener + * @throws SvcLogicException when entering a JSON node fails + */ + private void processNode(String key, JsonNode node, NodeType nodeType, + JsonListener listener) throws SvcLogicException { + listener.enterJsonNode(key, node, nodeType); + walk(listener, node); + listener.exitJsonNode(node); + } + + /** + * Returns true if the node corresponds to a leaf-list node; false + * otherwise. + * + * @param node JSON node + * @return true if node corresponds to leaf-list node; false otherwise + */ + private boolean isLeafListNode(ArrayNode node) { + Iterator children = node.elements(); + while (children.hasNext()) { + JsonNodeType type = children.next().getNodeType(); + if (type != STRING && type != NUMBER) { + return false; + } + } + return true; } } diff --git a/restconf-client/provider/src/main/java/org/onap/ccsdk/sli/plugins/yangserializers/dfserializer/DefaultXmlListener.java b/restconf-client/provider/src/main/java/org/onap/ccsdk/sli/plugins/yangserializers/dfserializer/DefaultXmlListener.java index 7946d8d0d..57969146d 100644 --- a/restconf-client/provider/src/main/java/org/onap/ccsdk/sli/plugins/yangserializers/dfserializer/DefaultXmlListener.java +++ b/restconf-client/provider/src/main/java/org/onap/ccsdk/sli/plugins/yangserializers/dfserializer/DefaultXmlListener.java @@ -21,6 +21,10 @@ package org.onap.ccsdk.sli.plugins.yangserializers.dfserializer; import org.dom4j.Element; +import org.onap.ccsdk.sli.core.sli.SvcLogicException; + +import static java.lang.String.format; +import static org.onap.ccsdk.sli.plugins.yangserializers.dfserializer.DfSerializerUtil.NODE_TYPE_ERR; /** * Representation of default implementation of XML listener. @@ -42,17 +46,34 @@ public class DefaultXmlListener implements XmlListener { } @Override - public void enterXmlElement(Element element, XmlNodeType nodeType) { - //TODO: Implementation code. + public void enterXmlElement(Element element, XmlNodeType nodeType) + throws SvcLogicException { + switch (nodeType) { + case TEXT_NODE: + serializerHelper.addNode(element.getName(), + element.getNamespace().getURI(), + element.getText(), null, null); + break; + + case OBJECT_NODE: + serializerHelper.addNode(element.getName(), + element.getNamespace().getURI(), + null, null, null); + break; + + default: + throw new SvcLogicException(format(NODE_TYPE_ERR, + nodeType.toString())); + } } @Override - public void exitXmlElement(Element element) { - //TODO: Implementation code. + public void exitXmlElement(Element element) throws SvcLogicException { + serializerHelper.exitNode(); } @Override public SerializerHelper serializerHelper() { return serializerHelper; } - } +} diff --git a/restconf-client/provider/src/main/java/org/onap/ccsdk/sli/plugins/yangserializers/dfserializer/DefaultXmlWalker.java b/restconf-client/provider/src/main/java/org/onap/ccsdk/sli/plugins/yangserializers/dfserializer/DefaultXmlWalker.java index cd2a3d494..cdc713f31 100644 --- a/restconf-client/provider/src/main/java/org/onap/ccsdk/sli/plugins/yangserializers/dfserializer/DefaultXmlWalker.java +++ b/restconf-client/provider/src/main/java/org/onap/ccsdk/sli/plugins/yangserializers/dfserializer/DefaultXmlWalker.java @@ -21,6 +21,11 @@ package org.onap.ccsdk.sli.plugins.yangserializers.dfserializer; import org.dom4j.Element; +import org.onap.ccsdk.sli.core.sli.SvcLogicException; + +import java.util.Iterator; + +import static org.onap.ccsdk.sli.plugins.yangserializers.dfserializer.DfSerializerUtil.getXmlNodeType; /** * Implementation of XML walker to walk through the nodes and process it. @@ -28,7 +33,16 @@ import org.dom4j.Element; public class DefaultXmlWalker implements XmlWalker { @Override - public void walk(XmlListener listener, Element xmlElement) { - //TODO: Implementation code. + public void walk(XmlListener listener, Element xmlElement) throws + SvcLogicException { + listener.enterXmlElement(xmlElement, getXmlNodeType(xmlElement)); + if (xmlElement.hasContent() && !xmlElement.isTextOnly()) { + Iterator i = xmlElement.elementIterator(); + while (i.hasNext()) { + Element childElement = (Element) i.next(); + walk(listener, childElement); + } + } + listener.exitXmlElement(xmlElement); } } diff --git a/restconf-client/provider/src/main/java/org/onap/ccsdk/sli/plugins/yangserializers/dfserializer/DfListenerFactory.java b/restconf-client/provider/src/main/java/org/onap/ccsdk/sli/plugins/yangserializers/dfserializer/DfListenerFactory.java index 851f1b488..e10a085a6 100644 --- a/restconf-client/provider/src/main/java/org/onap/ccsdk/sli/plugins/yangserializers/dfserializer/DfListenerFactory.java +++ b/restconf-client/provider/src/main/java/org/onap/ccsdk/sli/plugins/yangserializers/dfserializer/DfListenerFactory.java @@ -20,6 +20,11 @@ package org.onap.ccsdk.sli.plugins.yangserializers.dfserializer; +import org.onap.ccsdk.sli.core.sli.SvcLogicException; + +import static java.lang.String.format; +import static org.onap.ccsdk.sli.plugins.yangserializers.dfserializer.DfSerializerUtil.FORMAT_ERR; + /** * Represents the data format listener factory which will return JSON or XML * listener according to the serializer helper. @@ -52,9 +57,11 @@ public final class DfListenerFactory { * @param serHelper serializer helper * @param params parameters * @return data format listener + * @throws SvcLogicException when the data format type is wrong */ public Listener getListener(SerializerHelper serHelper, - YangParameters params) { + YangParameters params) + throws SvcLogicException { Listener listener; switch (params.format) { case JSON: @@ -65,9 +72,9 @@ public final class DfListenerFactory { listener = new DefaultXmlListener(serHelper); break; - //TODO: DataFormat Exception code to be added. default: - throw new IllegalArgumentException("In correct format"); + throw new SvcLogicException(format(FORMAT_ERR, + params.format)); } return listener; } diff --git a/restconf-client/provider/src/main/java/org/onap/ccsdk/sli/plugins/yangserializers/dfserializer/DfSerializerFactory.java b/restconf-client/provider/src/main/java/org/onap/ccsdk/sli/plugins/yangserializers/dfserializer/DfSerializerFactory.java index 25b23fe26..bd0285e8e 100644 --- a/restconf-client/provider/src/main/java/org/onap/ccsdk/sli/plugins/yangserializers/dfserializer/DfSerializerFactory.java +++ b/restconf-client/provider/src/main/java/org/onap/ccsdk/sli/plugins/yangserializers/dfserializer/DfSerializerFactory.java @@ -20,6 +20,11 @@ package org.onap.ccsdk.sli.plugins.yangserializers.dfserializer; +import org.onap.ccsdk.sli.core.sli.SvcLogicException; + +import static java.lang.String.format; +import static org.onap.ccsdk.sli.plugins.yangserializers.dfserializer.DfSerializerUtil.FORMAT_ERR; + /** * Represents the data format serializer factory which will return JSON or XML * serializer according to the serializer context. @@ -52,10 +57,11 @@ public final class DfSerializerFactory { * @param serCtx serializer context * @param params parameters * @return data format serializer + * @throws SvcLogicException when the data format type is wrong */ - public DataFormatSerializer getSerializer(DataFormatSerializerContext - serCtx, - YangParameters params) { + public DataFormatSerializer getSerializer(DataFormatSerializerContext serCtx, + YangParameters params) + throws SvcLogicException { DataFormatSerializer serializer; switch (params.format) { case JSON: @@ -66,9 +72,9 @@ public final class DfSerializerFactory { serializer = new XmlSerializer(serCtx); break; - //TODO: DataFormat Exception code to be added. default: - throw new IllegalArgumentException("In correct format"); + throw new SvcLogicException(format(FORMAT_ERR, + params.format)); } return serializer; } diff --git a/restconf-client/provider/src/main/java/org/onap/ccsdk/sli/plugins/yangserializers/dfserializer/DfSerializerUtil.java b/restconf-client/provider/src/main/java/org/onap/ccsdk/sli/plugins/yangserializers/dfserializer/DfSerializerUtil.java new file mode 100644 index 000000000..6acb04a81 --- /dev/null +++ b/restconf-client/provider/src/main/java/org/onap/ccsdk/sli/plugins/yangserializers/dfserializer/DfSerializerUtil.java @@ -0,0 +1,216 @@ +/*- + * ============LICENSE_START======================================================= + * ONAP - CCSDK + * ================================================================================ + * Copyright (C) 2018 Huawei Technologies Co., Ltd. All rights reserved. + * ================================================================================ + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============LICENSE_END========================================================= + */ + +package org.onap.ccsdk.sli.plugins.yangserializers.dfserializer; + +import org.dom4j.Element; +import org.onap.ccsdk.sli.core.sli.SvcLogicException; +import org.onap.ccsdk.sli.plugins.yangserializers.pnserializer.Namespace; +import org.onap.ccsdk.sli.plugins.yangserializers.pnserializer.PropertiesNode; +import org.opendaylight.yangtools.yang.model.api.Module; +import org.opendaylight.yangtools.yang.model.api.SchemaContext; +import org.opendaylight.yangtools.yang.model.api.SchemaNode; +import org.opendaylight.yangtools.yang.model.api.TypeDefinition; +import org.w3c.dom.Document; +import org.xml.sax.InputSource; +import org.xml.sax.SAXException; + +import javax.xml.parsers.DocumentBuilder; +import javax.xml.parsers.DocumentBuilderFactory; +import javax.xml.parsers.ParserConfigurationException; +import javax.xml.transform.Transformer; +import javax.xml.transform.TransformerException; +import javax.xml.transform.TransformerFactory; +import javax.xml.transform.dom.DOMSource; +import javax.xml.transform.stream.StreamResult; +import java.io.IOException; +import java.io.StringReader; +import java.io.StringWriter; +import java.io.Writer; +import java.net.URI; +import java.net.URISyntaxException; + +import static javax.xml.transform.OutputKeys.INDENT; +import static org.onap.ccsdk.sli.plugins.yangserializers.dfserializer.XmlNodeType.OBJECT_NODE; +import static org.onap.ccsdk.sli.plugins.yangserializers.dfserializer.XmlNodeType.TEXT_NODE; +import static org.onap.ccsdk.sli.plugins.yangserializers.pnserializer.MdsalPropertiesNodeUtils.getRevision; + +/** + * Utilities for data format serializer. + */ +public final class DfSerializerUtil { + + static final String JSON_WRITE_ERR = "Unable to write to JSON from " + + "properties."; + + static final String NODE_TYPE_ERR = "The node type %s is not supported."; + + static final String JSON_LIS_ERR = "The JSON serializer doesn't have " + + "JSON listener"; + + static final String XML_LIS_ERR = "The XML serializer doesn't have XML " + + "listener"; + + static final String JSON_TREE_ERR = "Unable to form JSON tree object from" + + " the JSON body provided."; + + static final String XML_TREE_ERR = "Unable to form XML tree object from " + + "the XML body provided."; + + static final String FORMAT_ERR = "Only JSON and XML formats are supported" + + ". %s is not supported"; + + static final String PROP_NODE_ERR = "The property node doesn't have " + + "schema node bound to it."; + + static final String DF_ERR = "Type mismatch for the node %s. The schema " + + "node does not match with the data format node type %s."; + + static final String UTF_HEADER = ""; + + static final String XML_PREFIX = "yangid"; + + private static final String YES = "yes"; + + private static final String INDENT_XMLNS = "{http://xml.apache" + + ".org/xslt}indent-amount"; + + private static final String XML_PARSE_ERR = "Unable to parse the xml to " + + "document : \n"; + + private static final String URI_ERR = "Unable to parse the URI"; + + //No instantiation. + private DfSerializerUtil() { + } + + /** + * Returns the writer which contains the pretty formatted XML string. + * + * @param input input XML + * @param indent indentation level + * @return writer with XML + * @throws SvcLogicException when transformation of source fails + */ + static Writer getXmlWriter(String input, String indent) + throws SvcLogicException { + try { + Transformer transformer = TransformerFactory.newInstance() + .newTransformer(); + transformer.setOutputProperty(INDENT, YES); + transformer.setOutputProperty(INDENT_XMLNS, indent); + StreamResult result = new StreamResult(new StringWriter()); + DOMSource source = new DOMSource(parseXml(input)); + transformer.transform(source, result); + return result.getWriter(); + } catch (TransformerException e) { + throw new SvcLogicException(XML_PARSE_ERR + input, e); + } + } + + /** + * Parses the XML and converts it into dom document which can be used for + * formatting the XML. + * + * @param in input XML + * @return dom document of XML + * @throws SvcLogicException when document building fails + */ + private static Document parseXml(String in) throws SvcLogicException { + DocumentBuilderFactory dbf = DocumentBuilderFactory.newInstance(); + DocumentBuilder db; + try { + db = dbf.newDocumentBuilder(); + InputSource is = new InputSource(new StringReader(in)); + return db.parse(is); + } catch (SAXException | IOException | ParserConfigurationException e) { + throw new SvcLogicException(XML_PARSE_ERR + in, e); + } + } + + /** + * Returns the resolved namespace object from the input received from the + * abstract data format. + * + * @param mName module name + * @param curSchema current schema + * @param ctx schema context + * @param mUri module URI + * @param pNode properties node + * @return namespace + * @throws SvcLogicException when resolving namespace fails + */ + static Namespace getResolvedNamespace(String mName, SchemaNode curSchema, + SchemaContext ctx, String mUri, + PropertiesNode pNode) + throws SvcLogicException { + Module m = null; + URI namespace = curSchema.getQName().getNamespace(); + + if (mName != null) { + m = ctx.findModule(mName).get(); + namespace = m == null ? null : m.getNamespace(); + } + if (mUri != null) { + try { + m = ctx.findModule(new URI(mUri)).get(); + } catch (URISyntaxException e) { + throw new SvcLogicException(URI_ERR, e); + } + namespace = m == null ? null : m.getNamespace(); + mName = m.getName(); + } + + if (mName == null && mUri == null) { + return pNode.namespace(); + } + + return new Namespace(mName, namespace, getRevision(m.getRevision())); + } + + /** + * Returns the node type of a XML element. + * + * @param element XML element + * @return node type of the XML element + */ + static XmlNodeType getXmlNodeType(Element element) { + Element newElement = element.createCopy(); + newElement.remove(element.getNamespace()); + return newElement.hasContent() && newElement.isTextOnly() ? + TEXT_NODE : OBJECT_NODE; + } + + /** + * Resolves the super type to the base type from type definition. + * + * @param type super type + * @return base type definition + */ + static TypeDefinition resolveBaseTypeFrom(TypeDefinition type) { + TypeDefinition superType; + for(superType = type; superType.getBaseType() != null; + superType = superType.getBaseType()) { + } + return superType; + } + +} diff --git a/restconf-client/provider/src/main/java/org/onap/ccsdk/sli/plugins/yangserializers/dfserializer/JsonListener.java b/restconf-client/provider/src/main/java/org/onap/ccsdk/sli/plugins/yangserializers/dfserializer/JsonListener.java index 2a9220ac1..89fd4c8c8 100644 --- a/restconf-client/provider/src/main/java/org/onap/ccsdk/sli/plugins/yangserializers/dfserializer/JsonListener.java +++ b/restconf-client/provider/src/main/java/org/onap/ccsdk/sli/plugins/yangserializers/dfserializer/JsonListener.java @@ -21,6 +21,7 @@ package org.onap.ccsdk.sli.plugins.yangserializers.dfserializer; import com.fasterxml.jackson.databind.JsonNode; +import org.onap.ccsdk.sli.core.sli.SvcLogicException; import org.onap.ccsdk.sli.plugins.yangserializers.pnserializer.NodeType; /** @@ -38,14 +39,17 @@ public interface JsonListener extends Listener { * @param nodeName JSON node name * @param node JSON node * @param nodeType JSON node type + * @throws SvcLogicException when node type is of wrong format */ - void enterJsonNode(String nodeName, JsonNode node, NodeType nodeType); + void enterJsonNode(String nodeName, JsonNode node, NodeType nodeType) + throws SvcLogicException; /** * Call back invoked during JSON node exit. All the related information * can be obtained from the JSON node. * * @param node JSON node + * @throws SvcLogicException when JSON node exit doesn't happen */ - void exitJsonNode(JsonNode node); + void exitJsonNode(JsonNode node) throws SvcLogicException; } diff --git a/restconf-client/provider/src/main/java/org/onap/ccsdk/sli/plugins/yangserializers/dfserializer/JsonSerializer.java b/restconf-client/provider/src/main/java/org/onap/ccsdk/sli/plugins/yangserializers/dfserializer/JsonSerializer.java index b562e71db..1be1309bb 100644 --- a/restconf-client/provider/src/main/java/org/onap/ccsdk/sli/plugins/yangserializers/dfserializer/JsonSerializer.java +++ b/restconf-client/provider/src/main/java/org/onap/ccsdk/sli/plugins/yangserializers/dfserializer/JsonSerializer.java @@ -20,10 +20,20 @@ package org.onap.ccsdk.sli.plugins.yangserializers.dfserializer; +import com.fasterxml.jackson.databind.JsonNode; +import com.fasterxml.jackson.databind.ObjectMapper; +import org.onap.ccsdk.sli.core.sli.SvcLogicException; +import org.onap.ccsdk.sli.plugins.yangserializers.pnserializer.DefaultPropertiesNodeWalker; +import org.onap.ccsdk.sli.plugins.yangserializers.pnserializer.PropertiesNode; +import org.onap.ccsdk.sli.plugins.yangserializers.pnserializer.PropertiesNodeWalker; + +import java.io.IOException; +import java.io.Writer; import java.util.List; import java.util.Map; import static org.onap.ccsdk.sli.plugins.yangserializers.dfserializer.DataFormat.JSON; +import static org.onap.ccsdk.sli.plugins.yangserializers.dfserializer.DfSerializerUtil.*; /** * Representation of JSON serializer which encodes properties to JSON and @@ -42,14 +52,38 @@ public class JsonSerializer extends DataFormatSerializer { @Override public String encode(Map param, - Map> annotations) { - //TODO: Implementation code. - return null; + Map> annotations) + throws SvcLogicException { + PropertiesNode propNode = serializerContext().getPropNodeSerializer() + .encode(param); + PropertiesNodeWalker nodeWalker = new DefaultPropertiesNodeWalker<>(); + PropertiesNodeJsonListener jsonLis = new PropertiesNodeJsonListener(); + nodeWalker.walk(jsonLis, propNode); + Writer writer = jsonLis.getWriter(); + return writer.toString(); } @Override - public Map decode(String dataFormatBody) { - //TODO: Implementation code. - return null; + public Map decode(String dataFormatBody) + throws SvcLogicException { + if (!(serializerContext().listener() instanceof JsonListener)) { + throw new SvcLogicException(JSON_LIS_ERR); + } + + JsonListener listener = (JsonListener) serializerContext().listener(); + JsonWalker walker = new DefaultJsonWalker(); + ObjectMapper mapper = new ObjectMapper(); + JsonNode jsonNode; + + try { + jsonNode = mapper.readTree(dataFormatBody); + } catch (IOException e) { + throw new SvcLogicException(JSON_TREE_ERR, e); + } + + walker.walk(listener, jsonNode); + + return serializerContext().getPropNodeSerializer().decode( + listener.serializerHelper().getPropertiesNode()); } } diff --git a/restconf-client/provider/src/main/java/org/onap/ccsdk/sli/plugins/yangserializers/dfserializer/JsonWalker.java b/restconf-client/provider/src/main/java/org/onap/ccsdk/sli/plugins/yangserializers/dfserializer/JsonWalker.java index e3fb4d513..588070a12 100644 --- a/restconf-client/provider/src/main/java/org/onap/ccsdk/sli/plugins/yangserializers/dfserializer/JsonWalker.java +++ b/restconf-client/provider/src/main/java/org/onap/ccsdk/sli/plugins/yangserializers/dfserializer/JsonWalker.java @@ -21,6 +21,7 @@ package org.onap.ccsdk.sli.plugins.yangserializers.dfserializer; import com.fasterxml.jackson.databind.JsonNode; +import org.onap.ccsdk.sli.core.sli.SvcLogicException; /** * Abstraction of an entity which provides interface for JSON walk. This @@ -36,6 +37,8 @@ public interface JsonWalker { * * @param listener JSON listener implemented by the protocol * @param jsonNode root node of the JSON data tree + * @throws SvcLogicException when walking the JSON node fails */ - void walk(JsonListener listener, JsonNode jsonNode); + void walk(JsonListener listener, JsonNode jsonNode) + throws SvcLogicException; } 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 1f8195e2d..a3e30c4b7 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 @@ -20,10 +20,36 @@ package org.onap.ccsdk.sli.plugins.yangserializers.dfserializer; +import org.onap.ccsdk.sli.core.sli.SvcLogicException; +import org.onap.ccsdk.sli.plugins.yangserializers.pnserializer.Namespace; import org.onap.ccsdk.sli.plugins.yangserializers.pnserializer.NodeType; import org.onap.ccsdk.sli.plugins.yangserializers.pnserializer.PropertiesNode; +import org.onap.ccsdk.sli.plugins.yangserializers.pnserializer.RootNode; +import org.opendaylight.yangtools.yang.model.api.DataSchemaNode; +import org.opendaylight.yangtools.yang.model.api.LeafListSchemaNode; +import org.opendaylight.yangtools.yang.model.api.LeafSchemaNode; +import org.opendaylight.yangtools.yang.model.api.ListSchemaNode; import org.opendaylight.yangtools.yang.model.api.SchemaContext; import org.opendaylight.yangtools.yang.model.api.SchemaNode; +import org.opendaylight.yangtools.yang.model.api.TypeDefinition; +import org.opendaylight.yangtools.yang.model.api.type.IdentityrefTypeDefinition; + +import java.util.Deque; + +import static java.lang.String.format; +import static org.onap.ccsdk.sli.plugins.yangserializers.dfserializer.DfSerializerUtil.DF_ERR; +import static org.onap.ccsdk.sli.plugins.yangserializers.dfserializer.DfSerializerUtil.NODE_TYPE_ERR; +import static org.onap.ccsdk.sli.plugins.yangserializers.dfserializer.DfSerializerUtil.PROP_NODE_ERR; +import static org.onap.ccsdk.sli.plugins.yangserializers.dfserializer.DfSerializerUtil.getResolvedNamespace; +import static org.onap.ccsdk.sli.plugins.yangserializers.dfserializer.DfSerializerUtil.resolveBaseTypeFrom; +import static org.onap.ccsdk.sli.plugins.yangserializers.pnserializer.MdsalPropertiesNodeUtils.getRevision; +import static org.onap.ccsdk.sli.plugins.yangserializers.pnserializer.NodeType.MULTI_INSTANCE_HOLDER_NODE; +import static org.onap.ccsdk.sli.plugins.yangserializers.pnserializer.NodeType.MULTI_INSTANCE_LEAF_HOLDER_NODE; +import static org.onap.ccsdk.sli.plugins.yangserializers.pnserializer.NodeType.MULTI_INSTANCE_LEAF_NODE; +import static org.onap.ccsdk.sli.plugins.yangserializers.pnserializer.NodeType.MULTI_INSTANCE_NODE; +import static org.onap.ccsdk.sli.plugins.yangserializers.pnserializer.NodeType.SINGLE_INSTANCE_LEAF_NODE; +import static org.onap.ccsdk.sli.plugins.yangserializers.pnserializer.NodeType.SINGLE_INSTANCE_NODE; +import static org.opendaylight.yangtools.yang.data.util.ParserStreamUtils.findSchemaNodeByNameAndNamespace; /** * Representation of MDSAL based serializer helper, which adds properties @@ -53,6 +79,12 @@ public class MdsalSerializerHelper extends SerializerHelper(n.getQName().getLocalName(), ns, + getSchemaNode(), u); + curSchemaNode = getSchemaNode(); } @Override @@ -72,18 +104,166 @@ public class MdsalSerializerHelper extends SerializerHelper baseType = resolveBaseTypeFrom(type); + if (baseType instanceof IdentityrefTypeDefinition) { + if (nodeType == null) { + ns = getResolvedNamespace(null,schemaNode, getSchemaCtx(), + valNs, propNode); + } else { + ns = getResolvedNamespace(valNs, schemaNode, getSchemaCtx(), + null, propNode); + } + } + } + return ns; + } + + /** + * Validates that the node type from the data format matches with that of + * the corresponding schema node. + * + * @param type node type from the abstract data format + * @throws SvcLogicException when the node type is wrong + */ + private void validateNodeType(NodeType type) throws SvcLogicException { + boolean verify; + switch (type) { + case SINGLE_INSTANCE_LEAF_NODE: + verify = curSchemaNode instanceof LeafSchemaNode; + break; + + case MULTI_INSTANCE_LEAF_NODE: + verify = curSchemaNode instanceof LeafListSchemaNode; + break; + + case MULTI_INSTANCE_NODE: + verify = curSchemaNode instanceof ListSchemaNode; + break; + + case SINGLE_INSTANCE_NODE: + verify = (!(curSchemaNode instanceof LeafSchemaNode) && + !(curSchemaNode instanceof LeafListSchemaNode) && + !(curSchemaNode instanceof ListSchemaNode)); + break; + + default: + throw new SvcLogicException(format(NODE_TYPE_ERR, + type.toString())); + } + if (!verify) { + throw new SvcLogicException(format(DF_ERR, curSchemaNode + .getQName().getLocalName(), type.toString())); + } + } + + /** + * Returns true if the child schema is present with the name and + * namespace inside the current schema node, if present updates the + * current schema node; false otherwise. + * + * @param name name of the child schema node + * @param namespace namespace of the child schema node + * @return returns true if the child schema is available; false otherwise + */ + private boolean isChildPresent(String name, Namespace namespace) { + Deque dataSchema = findSchemaNodeByNameAndNamespace( + (DataSchemaNode) curSchemaNode, name, namespace.moduleNs()); + if (dataSchema != null) { + DataSchemaNode node = dataSchema.pop(); + if (node != null) { + curSchemaNode = node; + return true; + } + } + return false; } } diff --git a/restconf-client/provider/src/main/java/org/onap/ccsdk/sli/plugins/yangserializers/dfserializer/PropertiesNodeJsonListener.java b/restconf-client/provider/src/main/java/org/onap/ccsdk/sli/plugins/yangserializers/dfserializer/PropertiesNodeJsonListener.java index ec1306731..e51ccf7a6 100644 --- a/restconf-client/provider/src/main/java/org/onap/ccsdk/sli/plugins/yangserializers/dfserializer/PropertiesNodeJsonListener.java +++ b/restconf-client/provider/src/main/java/org/onap/ccsdk/sli/plugins/yangserializers/dfserializer/PropertiesNodeJsonListener.java @@ -21,10 +21,24 @@ package org.onap.ccsdk.sli.plugins.yangserializers.dfserializer; import com.google.gson.stream.JsonWriter; +import org.onap.ccsdk.sli.core.sli.SvcLogicException; +import org.onap.ccsdk.sli.plugins.yangserializers.pnserializer.DefaultPropertiesNodeWalker; +import org.onap.ccsdk.sli.plugins.yangserializers.pnserializer.LeafNode; +import org.onap.ccsdk.sli.plugins.yangserializers.pnserializer.Namespace; import org.onap.ccsdk.sli.plugins.yangserializers.pnserializer.PropertiesNode; import org.onap.ccsdk.sli.plugins.yangserializers.pnserializer.PropertiesNodeListener; +import org.onap.ccsdk.sli.plugins.yangserializers.pnserializer.RootNode; +import java.io.IOException; +import java.io.StringWriter; import java.io.Writer; +import java.util.Collection; +import java.util.Map; + +import static com.google.common.base.Strings.repeat; +import static java.lang.String.format; +import static org.onap.ccsdk.sli.plugins.yangserializers.dfserializer.DfSerializerUtil.JSON_WRITE_ERR; +import static org.onap.ccsdk.sli.plugins.yangserializers.dfserializer.DfSerializerUtil.NODE_TYPE_ERR; /** * Representation of JSON implementation of properties node listener. @@ -46,25 +60,160 @@ public class PropertiesNodeJsonListener implements PropertiesNodeListener{ * indenting the writer. */ public PropertiesNodeJsonListener() { + writer = new StringWriter(); + jsonWriter = new JsonWriter(writer); + jsonWriter.setIndent(repeat(" ", 4)); } @Override - public void start(PropertiesNode node) { - //TODO: Implementation code. + public void start(PropertiesNode node) throws SvcLogicException { + try { + jsonWriter.beginObject(); + } catch (IOException e) { + throw new SvcLogicException(JSON_WRITE_ERR, e); + } } @Override - public void end(PropertiesNode node) { - //TODO: Implementation code. + public void end(PropertiesNode node) throws SvcLogicException { + try { + jsonWriter.endObject(); + jsonWriter.flush(); + } catch (IOException e) { + throw new SvcLogicException(JSON_WRITE_ERR, e); + } } @Override - public void enterPropertiesNode(PropertiesNode node) { - //TODO: Implementation code. + public void enterPropertiesNode(PropertiesNode node) + throws SvcLogicException { + String val; + String nodeName = getNodeName(node); + try { + switch (node.nodeType()) { + case SINGLE_INSTANCE_NODE: + jsonWriter.name(nodeName); + jsonWriter.beginObject(); + break; + + case MULTI_INSTANCE_NODE: + jsonWriter.beginObject(); + break; + + case SINGLE_INSTANCE_LEAF_NODE: + val = getValueWithNs((LeafNode) node); + jsonWriter.name(nodeName).value(val); + break; + + case MULTI_INSTANCE_HOLDER_NODE: + case MULTI_INSTANCE_LEAF_HOLDER_NODE: + jsonWriter.name(nodeName); + jsonWriter.beginArray(); + break; + + case MULTI_INSTANCE_LEAF_NODE: + val = getValueWithNs((LeafNode) node); + jsonWriter.value(val); + break; + + default: + throw new SvcLogicException(format( + NODE_TYPE_ERR, node.nodeType().toString())); + + } + } catch (IOException e) { + throw new SvcLogicException(JSON_WRITE_ERR, e); + } } @Override - public void exitPropertiesNode(PropertiesNode node) { - //TODO: Implementation code. + public void exitPropertiesNode(PropertiesNode node) throws SvcLogicException { + walkAugmentationNode(node); + try { + switch (node.nodeType()) { + case SINGLE_INSTANCE_NODE: + case MULTI_INSTANCE_NODE: + jsonWriter.endObject(); + break; + + case MULTI_INSTANCE_HOLDER_NODE: + case MULTI_INSTANCE_LEAF_HOLDER_NODE: + jsonWriter.endArray(); + break; + + case SINGLE_INSTANCE_LEAF_NODE: + case MULTI_INSTANCE_LEAF_NODE: + break; + + default: + throw new SvcLogicException(format( + NODE_TYPE_ERR, node.nodeType().toString())); + } + } catch (IOException e) { + throw new SvcLogicException(JSON_WRITE_ERR, e); + } + } + + /** + * Returns the writer. + * + * @return writer + */ + public Writer getWriter() { + return writer; + } + + /** + * Returns the abstract JSON node name to be used in JSON data format + * from the properties node. + * + * @param node properties node + * @return abstract JSON node + */ + private String getNodeName(PropertiesNode node) { + PropertiesNode parent = node.parent(); + if (parent instanceof RootNode || !parent.namespace().moduleName() + .equals(node.namespace().moduleName())) { + return node.namespace().moduleName() + ":" + node.name(); + } + return node.name(); + } + + /** + * Returns the value of JSON leaf node with module name if required. + * + * @param node properties node + * @return value with namespace + */ + private String getValueWithNs(LeafNode node) { + Namespace valNs = node.valueNs(); + String modName = (valNs == null) ? null : valNs.moduleName(); + if (modName != null) { + return modName + ":" + node.value(); + } + return node.value(); + } + + /** + * Gets all the augmentation of the given node and walks through it. + * + * @param node properties node + * @throws SvcLogicException when walking the properties node fails + */ + private void walkAugmentationNode(PropertiesNode node) + throws SvcLogicException { + for (Map.Entry> + augToChild : node.augmentations().asMap().entrySet()) { + Collection augChild = augToChild.getValue(); + if (!augChild.isEmpty()) { + DefaultPropertiesNodeWalker walker = new + DefaultPropertiesNodeWalker(); + for (PropertiesNode p : augChild) { + enterPropertiesNode(p); + walker.walkChildNode(this, p); + exitPropertiesNode(p); + } + } + } } } diff --git a/restconf-client/provider/src/main/java/org/onap/ccsdk/sli/plugins/yangserializers/dfserializer/PropertiesNodeXmlListener.java b/restconf-client/provider/src/main/java/org/onap/ccsdk/sli/plugins/yangserializers/dfserializer/PropertiesNodeXmlListener.java index cfc59ca10..cf59b7794 100644 --- a/restconf-client/provider/src/main/java/org/onap/ccsdk/sli/plugins/yangserializers/dfserializer/PropertiesNodeXmlListener.java +++ b/restconf-client/provider/src/main/java/org/onap/ccsdk/sli/plugins/yangserializers/dfserializer/PropertiesNodeXmlListener.java @@ -20,13 +20,29 @@ package org.onap.ccsdk.sli.plugins.yangserializers.dfserializer; +import org.dom4j.Document; +import org.dom4j.DocumentHelper; import org.dom4j.Element; +import org.onap.ccsdk.sli.core.sli.SvcLogicException; +import org.onap.ccsdk.sli.plugins.yangserializers.pnserializer.DefaultPropertiesNodeWalker; +import org.onap.ccsdk.sli.plugins.yangserializers.pnserializer.LeafNode; +import org.onap.ccsdk.sli.plugins.yangserializers.pnserializer.Namespace; import org.onap.ccsdk.sli.plugins.yangserializers.pnserializer.PropertiesNode; import org.onap.ccsdk.sli.plugins.yangserializers.pnserializer.PropertiesNodeListener; +import org.onap.ccsdk.sli.plugins.yangserializers.pnserializer.RootNode; import java.io.Writer; +import java.net.URI; +import java.util.Collection; +import java.util.Map; import java.util.Stack; +import static java.lang.String.format; +import static org.onap.ccsdk.sli.plugins.yangserializers.dfserializer.DfSerializerUtil.NODE_TYPE_ERR; +import static org.onap.ccsdk.sli.plugins.yangserializers.dfserializer.DfSerializerUtil.UTF_HEADER; +import static org.onap.ccsdk.sli.plugins.yangserializers.dfserializer.DfSerializerUtil.XML_PREFIX; +import static org.onap.ccsdk.sli.plugins.yangserializers.dfserializer.DfSerializerUtil.getXmlWriter; + /** * Representation of XML implementation of properties node listener. */ @@ -60,21 +76,169 @@ public class PropertiesNodeXmlListener implements PropertiesNodeListener { @Override public void start(PropertiesNode node) { - //TODO: Implementation code. + //Do Nothing. } @Override - public void end(PropertiesNode node) { - //TODO: Implementation code. + public void end(PropertiesNode node) throws SvcLogicException { + xmlData = UTF_HEADER + xmlData; + writer = getXmlWriter(xmlData, "4"); } @Override - public void enterPropertiesNode(PropertiesNode node) { - //TODO: Implementation code. + public void enterPropertiesNode(PropertiesNode node) + throws SvcLogicException { + Element element = null; + String ns = getNodeNamespace(node); + switch (node.nodeType()) { + case MULTI_INSTANCE_LEAF_HOLDER_NODE: + case MULTI_INSTANCE_HOLDER_NODE: + break; + + case SINGLE_INSTANCE_NODE: + case MULTI_INSTANCE_NODE: + element = addElement(ns, node); + break; + + case MULTI_INSTANCE_LEAF_NODE: + case SINGLE_INSTANCE_LEAF_NODE: + element = addElement(ns, node); + setValueWithNs(element, (LeafNode) node); + break; + + default: + throw new SvcLogicException(format( + NODE_TYPE_ERR, node.nodeType().toString())); + } + if (element != null) { + if (elementStack.isEmpty()) { + rootElement = element; + } + elementStack.push(element); + } } @Override - public void exitPropertiesNode(PropertiesNode node) { - //TODO: Implementation code. + public void exitPropertiesNode(PropertiesNode node) + throws SvcLogicException { + walkAugmentationNode(node); + switch (node.nodeType()) { + case MULTI_INSTANCE_LEAF_HOLDER_NODE: + case MULTI_INSTANCE_HOLDER_NODE: + break; + + case SINGLE_INSTANCE_NODE: + case MULTI_INSTANCE_NODE: + case MULTI_INSTANCE_LEAF_NODE: + case SINGLE_INSTANCE_LEAF_NODE: + if (!elementStack.isEmpty() && + elementStack.peek().equals(rootElement)) { + xmlData = rootElement.asXML(); + } else { + elementStack.pop(); + } + break; + + default: + throw new SvcLogicException(format( + NODE_TYPE_ERR, node.nodeType().toString())); + } + } + + /** + * Returns the writer. + * + * @return writer + */ + public Writer getWriter() { + return writer; + } + + /** + * Adds an XML element to the stack with namespace if present. If the + * stack is empty it creates new document and adds element else adds to + * the parent element. + * + * @param ns namespace of the element + * @param node properties node + * @return new added element + */ + private Element addElement(String ns, PropertiesNode node) { + Element element; + if (elementStack.isEmpty()) { + Document doc = DocumentHelper.createDocument(); + if (ns != null) { + element = doc.addElement(node.name(), ns); + } else { + element = doc.addElement(node.name()); + } + } else { + element = elementStack.peek(); + if (ns != null) { + element = element.addElement(node.name(), ns); + } else { + element = element.addElement(node.name()); + } + } + + return element; + } + + /** + * Returns the abstract XML namespace to be used in XML data format from + * the properties node. + * + * @param node properties node + * @return abstract XML namespace + */ + private String getNodeNamespace(PropertiesNode node) { + PropertiesNode parent = node.parent(); + if (parent instanceof RootNode || !parent.namespace().moduleName() + .equals(node.namespace().moduleName())) { + return node.namespace().moduleNs().toString(); + } + return null; + } + + /** + * Sets the value to the element for a leaf node and adds the value + * namespace if required. + * + * @param element XML element + * @param node leaf properties node + */ + private void setValueWithNs(Element element, LeafNode node) { + Namespace valNs = node.valueNs(); + URI modNs = (valNs == null) ? null : valNs.moduleNs(); + String val = node.value(); + if (modNs != null) { + element.addNamespace(XML_PREFIX, modNs.toString()); + element.setText(XML_PREFIX + ":" + val); + } else { + element.setText(val); + } + } + + /** + * Gets all the augmentation of the given node and walks through it. + * + * @param node properties node + * @throws SvcLogicException when walking the properties node fails + */ + private void walkAugmentationNode(PropertiesNode node) + throws SvcLogicException { + for (Map.Entry> + augToChild : node.augmentations().asMap().entrySet()) { + Collection augChild = augToChild.getValue(); + if (!augChild.isEmpty()) { + DefaultPropertiesNodeWalker walker = new + DefaultPropertiesNodeWalker(); + for (PropertiesNode p : augChild) { + enterPropertiesNode(p); + walker.walkChildNode(this, p); + exitPropertiesNode(p); + } + } + } } } diff --git a/restconf-client/provider/src/main/java/org/onap/ccsdk/sli/plugins/yangserializers/dfserializer/SerializerHelper.java b/restconf-client/provider/src/main/java/org/onap/ccsdk/sli/plugins/yangserializers/dfserializer/SerializerHelper.java index 2466023fa..db9befb21 100644 --- a/restconf-client/provider/src/main/java/org/onap/ccsdk/sli/plugins/yangserializers/dfserializer/SerializerHelper.java +++ b/restconf-client/provider/src/main/java/org/onap/ccsdk/sli/plugins/yangserializers/dfserializer/SerializerHelper.java @@ -20,6 +20,7 @@ package org.onap.ccsdk.sli.plugins.yangserializers.dfserializer; +import org.onap.ccsdk.sli.core.sli.SvcLogicException; import org.onap.ccsdk.sli.plugins.yangserializers.pnserializer.NodeType; import org.onap.ccsdk.sli.plugins.yangserializers.pnserializer.PropertiesNode; @@ -92,15 +93,19 @@ public abstract class SerializerHelper { * @param valNameSpace value namespace for identityref, could be module * name or namespace * @param type type of node if known like in case of JSON + * @throws SvcLogicException when adding node fails */ protected abstract void addNode(String name, String nameSpace, String value, - String valNameSpace, NodeType type); + String valNameSpace, NodeType type) + throws SvcLogicException; /** * Exits the node, in case if it's leaf node then it adds to the properties * map. + * + * @throws SvcLogicException when properties node tree is improper */ - protected abstract void exitNode(); + protected abstract void exitNode() throws SvcLogicException; /** * Returns the built properties corresponding to the data. diff --git a/restconf-client/provider/src/main/java/org/onap/ccsdk/sli/plugins/yangserializers/dfserializer/XmlListener.java b/restconf-client/provider/src/main/java/org/onap/ccsdk/sli/plugins/yangserializers/dfserializer/XmlListener.java index 0fbf4c338..784e7af1f 100644 --- a/restconf-client/provider/src/main/java/org/onap/ccsdk/sli/plugins/yangserializers/dfserializer/XmlListener.java +++ b/restconf-client/provider/src/main/java/org/onap/ccsdk/sli/plugins/yangserializers/dfserializer/XmlListener.java @@ -21,6 +21,7 @@ package org.onap.ccsdk.sli.plugins.yangserializers.dfserializer; import org.dom4j.Element; +import org.onap.ccsdk.sli.core.sli.SvcLogicException; /** * Abstraction of an entity which provides call back methods, which in turn @@ -36,14 +37,17 @@ public interface XmlListener extends Listener { * * @param element current XML element * @param nodeType node type of the element + * @throws SvcLogicException when node type is of wrong format */ - void enterXmlElement(Element element, XmlNodeType nodeType); + void enterXmlElement(Element element, XmlNodeType nodeType) + throws SvcLogicException; /** * Callback invoked during a node exit. All the related information about * the node can be obtained from the element. * * @param element current xml element. + * @throws SvcLogicException when XML node exit doesn't happen */ - void exitXmlElement(Element element); + void exitXmlElement(Element element) throws SvcLogicException; } diff --git a/restconf-client/provider/src/main/java/org/onap/ccsdk/sli/plugins/yangserializers/dfserializer/XmlSerializer.java b/restconf-client/provider/src/main/java/org/onap/ccsdk/sli/plugins/yangserializers/dfserializer/XmlSerializer.java index 516470059..6eeb4b82c 100644 --- a/restconf-client/provider/src/main/java/org/onap/ccsdk/sli/plugins/yangserializers/dfserializer/XmlSerializer.java +++ b/restconf-client/provider/src/main/java/org/onap/ccsdk/sli/plugins/yangserializers/dfserializer/XmlSerializer.java @@ -20,10 +20,21 @@ package org.onap.ccsdk.sli.plugins.yangserializers.dfserializer; +import org.dom4j.Document; +import org.dom4j.DocumentException; +import org.dom4j.DocumentHelper; +import org.onap.ccsdk.sli.core.sli.SvcLogicException; +import org.onap.ccsdk.sli.plugins.yangserializers.pnserializer.DefaultPropertiesNodeWalker; +import org.onap.ccsdk.sli.plugins.yangserializers.pnserializer.PropertiesNode; +import org.onap.ccsdk.sli.plugins.yangserializers.pnserializer.PropertiesNodeWalker; + +import java.io.Writer; import java.util.List; import java.util.Map; import static org.onap.ccsdk.sli.plugins.yangserializers.dfserializer.DataFormat.XML; +import static org.onap.ccsdk.sli.plugins.yangserializers.dfserializer.DfSerializerUtil.XML_LIS_ERR; +import static org.onap.ccsdk.sli.plugins.yangserializers.dfserializer.DfSerializerUtil.XML_TREE_ERR; /** * Representation of XML serializer which encodes properties to XML and @@ -42,14 +53,36 @@ public class XmlSerializer extends DataFormatSerializer { @Override public String encode(Map param, - Map> annotations) { - //TODO: Implementation code. - return null; + Map> annotations) + throws SvcLogicException { + PropertiesNode propNode = serializerContext().getPropNodeSerializer() + .encode(param); + PropertiesNodeWalker nodeWalker = new DefaultPropertiesNodeWalker<>(); + PropertiesNodeXmlListener xmlListener = new PropertiesNodeXmlListener(); + nodeWalker.walk(xmlListener, propNode); + Writer writer = xmlListener.getWriter(); + return writer.toString(); } @Override - public Map decode(String dataFormatBody) { - //TODO: Implementation code. - return null; + public Map decode(String dataFormatBody) + throws SvcLogicException { + if (!(serializerContext().listener() instanceof XmlListener)) { + throw new SvcLogicException(XML_LIS_ERR); + } + + XmlListener listener = (XmlListener) serializerContext().listener(); + XmlWalker walker = new DefaultXmlWalker(); + Document document; + + try { + document = DocumentHelper.parseText(dataFormatBody); + } catch (DocumentException e) { + throw new SvcLogicException(XML_TREE_ERR, e); + } + walker.walk(listener, document.getRootElement()); + + return serializerContext().getPropNodeSerializer().decode( + listener.serializerHelper().getPropertiesNode()); } } \ No newline at end of file diff --git a/restconf-client/provider/src/main/java/org/onap/ccsdk/sli/plugins/yangserializers/dfserializer/XmlWalker.java b/restconf-client/provider/src/main/java/org/onap/ccsdk/sli/plugins/yangserializers/dfserializer/XmlWalker.java index 6fed510a3..3835faa7e 100644 --- a/restconf-client/provider/src/main/java/org/onap/ccsdk/sli/plugins/yangserializers/dfserializer/XmlWalker.java +++ b/restconf-client/provider/src/main/java/org/onap/ccsdk/sli/plugins/yangserializers/dfserializer/XmlWalker.java @@ -21,6 +21,7 @@ package org.onap.ccsdk.sli.plugins.yangserializers.dfserializer; import org.dom4j.Element; +import org.onap.ccsdk.sli.core.sli.SvcLogicException; /** * Abstraction of an entity which provides interface for XML walk. This @@ -36,6 +37,8 @@ public interface XmlWalker { * * @param listener XML listener implemented by the protocol * @param xmlElement root element of the XML data tree + * @throws SvcLogicException when walking the XML node fails */ - void walk(XmlListener listener, Element xmlElement); + void walk(XmlListener listener, Element xmlElement) throws + SvcLogicException; } diff --git a/restconf-client/provider/src/main/java/org/onap/ccsdk/sli/plugins/yangserializers/pnserializer/DefaultPropertiesNodeListener.java b/restconf-client/provider/src/main/java/org/onap/ccsdk/sli/plugins/yangserializers/pnserializer/DefaultPropertiesNodeListener.java index a8a9b4935..d91209121 100644 --- a/restconf-client/provider/src/main/java/org/onap/ccsdk/sli/plugins/yangserializers/pnserializer/DefaultPropertiesNodeListener.java +++ b/restconf-client/provider/src/main/java/org/onap/ccsdk/sli/plugins/yangserializers/pnserializer/DefaultPropertiesNodeListener.java @@ -20,6 +20,8 @@ package org.onap.ccsdk.sli.plugins.yangserializers.pnserializer; +import org.onap.ccsdk.sli.core.sli.SvcLogicException; + import java.util.Collection; import java.util.HashMap; import java.util.Map; @@ -40,7 +42,7 @@ public class DefaultPropertiesNodeListener implements PropertiesNodeListener { } @Override - public void end(PropertiesNode node) { + public void end(PropertiesNode node) throws SvcLogicException { exitPropertiesNode(node); } @@ -57,7 +59,8 @@ public class DefaultPropertiesNodeListener implements PropertiesNodeListener { } @Override - public void exitPropertiesNode(PropertiesNode node) { + public void exitPropertiesNode(PropertiesNode node) throws + SvcLogicException { if (!node.augmentations().isEmpty()) { for (Map.Entry> augmentationTochild : node.augmentations().asMap().entrySet()) { diff --git a/restconf-client/provider/src/main/java/org/onap/ccsdk/sli/plugins/yangserializers/pnserializer/DefaultPropertiesNodeWalker.java b/restconf-client/provider/src/main/java/org/onap/ccsdk/sli/plugins/yangserializers/pnserializer/DefaultPropertiesNodeWalker.java index 041210f22..8497805c2 100644 --- a/restconf-client/provider/src/main/java/org/onap/ccsdk/sli/plugins/yangserializers/pnserializer/DefaultPropertiesNodeWalker.java +++ b/restconf-client/provider/src/main/java/org/onap/ccsdk/sli/plugins/yangserializers/pnserializer/DefaultPropertiesNodeWalker.java @@ -20,6 +20,8 @@ package org.onap.ccsdk.sli.plugins.yangserializers.pnserializer; +import org.onap.ccsdk.sli.core.sli.SvcLogicException; + import java.util.Map; /** @@ -31,7 +33,7 @@ public class DefaultPropertiesNodeWalker implements Propert @Override public void walk(PropertiesNodeListener listener, - PropertiesNode propertiesNode) { + PropertiesNode propertiesNode) throws SvcLogicException { listener.start(propertiesNode); walkChildNode(listener, propertiesNode); listener.end(propertiesNode); @@ -42,9 +44,11 @@ public class DefaultPropertiesNodeWalker implements Propert * * @param listener properties node listener * @param propertiesNode properties node + * @throws SvcLogicException when properties node walking fails */ public void walkChildNode(PropertiesNodeListener listener, - PropertiesNode propertiesNode) { + PropertiesNode propertiesNode) + throws SvcLogicException { Map children = getChildren(propertiesNode); if (children != null) { for (Map.Entry entry : children.entrySet()) { diff --git a/restconf-client/provider/src/main/java/org/onap/ccsdk/sli/plugins/yangserializers/pnserializer/MdsalPropertiesNodeSerializer.java b/restconf-client/provider/src/main/java/org/onap/ccsdk/sli/plugins/yangserializers/pnserializer/MdsalPropertiesNodeSerializer.java index 20b06d0bc..c24146267 100644 --- a/restconf-client/provider/src/main/java/org/onap/ccsdk/sli/plugins/yangserializers/pnserializer/MdsalPropertiesNodeSerializer.java +++ b/restconf-client/provider/src/main/java/org/onap/ccsdk/sli/plugins/yangserializers/pnserializer/MdsalPropertiesNodeSerializer.java @@ -86,7 +86,8 @@ public class MdsalPropertiesNodeSerializer extends PropertiesNodeSerializer decode(PropertiesNode propertiesNode) { + public Map decode(PropertiesNode propertiesNode) + throws SvcLogicException { PropertiesNodeWalker walker = new DefaultPropertiesNodeWalker<>(); DefaultPropertiesNodeListener listener = new DefaultPropertiesNodeListener(); walker.walk(listener, propertiesNode); diff --git a/restconf-client/provider/src/main/java/org/onap/ccsdk/sli/plugins/yangserializers/pnserializer/PropertiesNodeListener.java b/restconf-client/provider/src/main/java/org/onap/ccsdk/sli/plugins/yangserializers/pnserializer/PropertiesNodeListener.java index 5bf7fe9dc..7b97ffaf8 100644 --- a/restconf-client/provider/src/main/java/org/onap/ccsdk/sli/plugins/yangserializers/pnserializer/PropertiesNodeListener.java +++ b/restconf-client/provider/src/main/java/org/onap/ccsdk/sli/plugins/yangserializers/pnserializer/PropertiesNodeListener.java @@ -20,6 +20,8 @@ package org.onap.ccsdk.sli.plugins.yangserializers.pnserializer; +import org.onap.ccsdk.sli.core.sli.SvcLogicException; + /** * Abstraction of properties node listener. */ @@ -29,27 +31,31 @@ public interface PropertiesNodeListener { * Pre-configurations required before starting the walking. * * @param node properties node + * @throws SvcLogicException when the pre-configuration fails */ - void start(PropertiesNode node); + void start(PropertiesNode node) throws SvcLogicException; /** * Post-configurations required after starting the walking. * * @param node properties node + * @throws SvcLogicException when the post-configuration fails */ - void end(PropertiesNode node); + void end(PropertiesNode node) throws SvcLogicException; /** * Enters the properties node. * * @param node properties node + * @throws SvcLogicException when entering the properties node fails */ - void enterPropertiesNode(PropertiesNode node); + void enterPropertiesNode(PropertiesNode node) throws SvcLogicException; /** * Enters the properties node. * * @param node properties node + * @throws SvcLogicException when exiting the properties node fails */ - void exitPropertiesNode(PropertiesNode node); + void exitPropertiesNode(PropertiesNode node) throws SvcLogicException; } diff --git a/restconf-client/provider/src/main/java/org/onap/ccsdk/sli/plugins/yangserializers/pnserializer/PropertiesNodeSerializer.java b/restconf-client/provider/src/main/java/org/onap/ccsdk/sli/plugins/yangserializers/pnserializer/PropertiesNodeSerializer.java index 3e3483721..fe6fed484 100644 --- a/restconf-client/provider/src/main/java/org/onap/ccsdk/sli/plugins/yangserializers/pnserializer/PropertiesNodeSerializer.java +++ b/restconf-client/provider/src/main/java/org/onap/ccsdk/sli/plugins/yangserializers/pnserializer/PropertiesNodeSerializer.java @@ -77,10 +77,11 @@ public abstract class PropertiesNodeSerializer { * Decodes from properties-node to properties map. * * @param propertiesNode properties-node - * @throws SvcLogicException fails to decode properties node to properties * @return parameter map + * @throws SvcLogicException fails to decode properties node to properties */ - public abstract Map decode(PropertiesNode propertiesNode) throws SvcLogicException; + public abstract Map decode(PropertiesNode propertiesNode) + throws SvcLogicException; /** * Returns the schema node of the property diff --git a/restconf-client/provider/src/main/java/org/onap/ccsdk/sli/plugins/yangserializers/pnserializer/PropertiesNodeWalker.java b/restconf-client/provider/src/main/java/org/onap/ccsdk/sli/plugins/yangserializers/pnserializer/PropertiesNodeWalker.java index 48433e2b2..36ee4dd9d 100644 --- a/restconf-client/provider/src/main/java/org/onap/ccsdk/sli/plugins/yangserializers/pnserializer/PropertiesNodeWalker.java +++ b/restconf-client/provider/src/main/java/org/onap/ccsdk/sli/plugins/yangserializers/pnserializer/PropertiesNodeWalker.java @@ -20,16 +20,19 @@ package org.onap.ccsdk.sli.plugins.yangserializers.pnserializer; +import org.onap.ccsdk.sli.core.sli.SvcLogicException; + /** * Abstraction of properties node walker */ public interface PropertiesNodeWalker { - /** * Walks the properties node with the listener. * * @param listener properties node listener. * @param propertiesNode properties node + * @throws SvcLogicException when walking the properties node fails */ - void walk(PropertiesNodeListener listener, PropertiesNode propertiesNode); + void walk(PropertiesNodeListener listener, PropertiesNode propertiesNode) + throws SvcLogicException; } diff --git a/restconf-client/provider/src/main/java/org/onap/ccsdk/sli/plugins/yangserializers/pnserializer/RootNode.java b/restconf-client/provider/src/main/java/org/onap/ccsdk/sli/plugins/yangserializers/pnserializer/RootNode.java index 7d9035e06..c7f7340fd 100644 --- a/restconf-client/provider/src/main/java/org/onap/ccsdk/sli/plugins/yangserializers/pnserializer/RootNode.java +++ b/restconf-client/provider/src/main/java/org/onap/ccsdk/sli/plugins/yangserializers/pnserializer/RootNode.java @@ -44,7 +44,15 @@ public class RootNode extends PropertiesNode { private Map children = new HashMap(); - protected RootNode(String name, Namespace namespace, + /** + * Creates an instance of the root node to build the properties. + * + * @param name name of the node + * @param namespace namespace of the node + * @param appInfo application info + * @param uri URI of the node + */ + public RootNode(String name, Namespace namespace, Object appInfo, String uri) { super(name, namespace, uri, null, appInfo, null); } -- cgit 1.2.3-korg From 671c85f81d5263cc64309e4e97dd5c8a0ee1465c Mon Sep 17 00:00:00 2001 From: gaurav Date: Tue, 21 Aug 2018 19:00:55 +0530 Subject: Update 3rd party dependency version Updated 3rd party dependency version for RestconfClient. Change-Id: If5bf93030ae98ea5479ba1f70e1cb22e900a7f5d Issue-ID: CCSDK-325 Signed-off-by: Gaurav Agrawal --- restconf-client/provider/pom.xml | 59 ++++++++++++++++++++++------------------ 1 file changed, 32 insertions(+), 27 deletions(-) (limited to 'restconf-client/provider') diff --git a/restconf-client/provider/pom.xml b/restconf-client/provider/pom.xml index 2b5be877a..4183d48be 100755 --- a/restconf-client/provider/pom.xml +++ b/restconf-client/provider/pom.xml @@ -1,5 +1,6 @@ - + 4.0.0 @@ -21,11 +22,6 @@ - - junit - junit - test - org.springframework spring-beans @@ -37,30 +33,13 @@ org.glassfish.jersey.media jersey-media-sse - 2.27 - provided + ${glassfish.version} javax.ws.rs javax.ws.rs-api 2.1 - - org.glassfish.jersey.inject - jersey-hk2 - 2.27 - - - org.glassfish.jersey.containers - jersey-container-servlet - 2.27 - - - org.glassfish.jersey.containers - jersey-container-grizzly2-http - 2.27 - test - org.onap.ccsdk.sli.core sli-common @@ -73,7 +52,7 @@ org.opendaylight.yangtools yang-data-impl - 2.0.3 + 2.0.6.1 com.fasterxml.jackson.core @@ -87,13 +66,39 @@ com.google.code.gson gson - 2.7 + ${gson.version} org.onap.ccsdk.sli.plugins restapi-call-node-provider 0.3.0-SNAPSHOT + + + + + junit + junit + test + + + org.glassfish.jersey.inject + jersey-hk2 + ${glassfish.version} + test + + + org.glassfish.jersey.containers + jersey-container-servlet + ${glassfish.version} + test + + + org.glassfish.jersey.containers + jersey-container-grizzly2-http + ${glassfish.version} + test + org.hamcrest hamcrest-library @@ -103,7 +108,7 @@ org.opendaylight.yangtools yang-test-util - 2.0.3 + 2.0.6.1 test -- cgit 1.2.3-korg From c8a20b7cdc2b563e1ea86a9e25f4ac0e748995f9 Mon Sep 17 00:00:00 2001 From: janani b Date: Wed, 29 Aug 2018 11:52:41 +0530 Subject: Implementation for Restconf api call node Restconf Api Call Node Issue-ID: CCSDK-372 Change-Id: I1820e97d54e734ccf73c6f48a9afcc4b59dff549 Signed-off-by: janani b --- .../sli/plugins/restapicall/RestapiCallNode.java | 171 ++++++---- restconf-client/provider/pom.xml | 17 +- .../restconfapicall/RestconfApiCallNode.java | 362 +++++++++++++++++++++ .../plugins/restconfapicall/RestconfApiUtils.java | 213 ++++++++++++ .../restconfapicall/RestconfapiCallNode.java | 65 ---- .../restconfdiscovery/RestconfDiscoveryNode.java | 14 +- .../dfserializer/MdsalSerializerHelper.java | 4 +- .../META-INF/spring/restconf-client-context.xml | 4 +- .../spring/restconf-client-osgi-context.xml | 2 +- .../blueprint/restconf-client-blueprint.xml | 4 +- 10 files changed, 720 insertions(+), 136 deletions(-) create mode 100644 restconf-client/provider/src/main/java/org/onap/ccsdk/sli/plugins/restconfapicall/RestconfApiCallNode.java create mode 100644 restconf-client/provider/src/main/java/org/onap/ccsdk/sli/plugins/restconfapicall/RestconfApiUtils.java delete mode 100644 restconf-client/provider/src/main/java/org/onap/ccsdk/sli/plugins/restconfapicall/RestconfapiCallNode.java (limited to 'restconf-client/provider') diff --git a/restapi-call-node/provider/src/main/java/org/onap/ccsdk/sli/plugins/restapicall/RestapiCallNode.java b/restapi-call-node/provider/src/main/java/org/onap/ccsdk/sli/plugins/restapicall/RestapiCallNode.java index 46c74ff8a..6a9e81bcc 100644 --- a/restapi-call-node/provider/src/main/java/org/onap/ccsdk/sli/plugins/restapicall/RestapiCallNode.java +++ b/restapi-call-node/provider/src/main/java/org/onap/ccsdk/sli/plugins/restapicall/RestapiCallNode.java @@ -21,8 +21,33 @@ package org.onap.ccsdk.sli.plugins.restapicall; +import com.sun.jersey.api.client.Client; import com.sun.jersey.api.client.ClientHandlerException; +import com.sun.jersey.api.client.ClientResponse; import com.sun.jersey.api.client.UniformInterfaceException; +import com.sun.jersey.api.client.WebResource; +import com.sun.jersey.api.client.config.ClientConfig; +import com.sun.jersey.api.client.config.DefaultClientConfig; +import com.sun.jersey.api.client.filter.HTTPBasicAuthFilter; +import com.sun.jersey.api.client.filter.HTTPDigestAuthFilter; +import com.sun.jersey.client.urlconnection.HTTPSProperties; +import com.sun.jersey.oauth.client.OAuthClientFilter; +import com.sun.jersey.oauth.signature.OAuthParameters; +import com.sun.jersey.oauth.signature.OAuthSecrets; +import org.apache.commons.lang3.StringUtils; +import org.onap.ccsdk.sli.core.sli.SvcLogicContext; +import org.onap.ccsdk.sli.core.sli.SvcLogicException; +import org.onap.ccsdk.sli.core.sli.SvcLogicJavaPlugin; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +import javax.net.ssl.HostnameVerifier; +import javax.net.ssl.HttpsURLConnection; +import javax.net.ssl.KeyManagerFactory; +import javax.net.ssl.SSLContext; +import javax.ws.rs.core.EntityTag; +import javax.ws.rs.core.MultivaluedMap; +import javax.ws.rs.core.UriBuilder; import java.io.FileInputStream; import java.io.IOException; import java.net.SocketException; @@ -40,34 +65,8 @@ import java.util.Map.Entry; import java.util.Properties; import java.util.Set; -import javax.net.ssl.HostnameVerifier; -import javax.net.ssl.HttpsURLConnection; -import javax.net.ssl.KeyManagerFactory; -import javax.net.ssl.SSLContext; -import javax.net.ssl.SSLSession; -import javax.ws.rs.core.EntityTag; -import javax.ws.rs.core.MultivaluedMap; -import javax.ws.rs.core.UriBuilder; - -import org.apache.commons.lang3.StringUtils; -import org.codehaus.jettison.json.JSONException; -import org.onap.ccsdk.sli.core.sli.SvcLogicContext; -import org.onap.ccsdk.sli.core.sli.SvcLogicException; -import org.onap.ccsdk.sli.core.sli.SvcLogicJavaPlugin; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - -import com.sun.jersey.api.client.Client; -import com.sun.jersey.api.client.ClientResponse; -import com.sun.jersey.api.client.WebResource; -import com.sun.jersey.api.client.config.ClientConfig; -import com.sun.jersey.api.client.config.DefaultClientConfig; -import com.sun.jersey.api.client.filter.HTTPBasicAuthFilter; -import com.sun.jersey.api.client.filter.HTTPDigestAuthFilter; -import com.sun.jersey.oauth.client.OAuthClientFilter; -import com.sun.jersey.oauth.signature.OAuthParameters; -import com.sun.jersey.oauth.signature.OAuthSecrets; -import com.sun.jersey.client.urlconnection.HTTPSProperties; +import static java.lang.Boolean.valueOf; +import static org.onap.ccsdk.sli.plugins.restapicall.AuthType.fromString; public class RestapiCallNode implements SvcLogicJavaPlugin { @@ -81,7 +80,7 @@ public class RestapiCallNode implements SvcLogicJavaPlugin { protected static final String DEFAULT_PROPERTIES_DIR = "/opt/onap/ccsdk/data/properties"; protected static final String PROPERTIES_DIR_KEY = "SDNC_CONFIG_DIR"; - protected RetryPolicyStore getRetryPolicyStore() { + public RetryPolicyStore getRetryPolicyStore() { return retryPolicyStore; } @@ -154,7 +153,7 @@ public class RestapiCallNode implements SvcLogicJavaPlugin { RetryPolicy retryPolicy = null; HttpResponse r = new HttpResponse(); try { - Parameters p = getParameters(paramMap); + Parameters p = getParameters(paramMap, new Parameters()); if (p.partner != null) { retryPolicy = retryPolicyStore.getRetryPolicy(p.partner); } @@ -245,49 +244,88 @@ public class RestapiCallNode implements SvcLogicJavaPlugin { throw new SvcLogicException(String.valueOf(r.code) + ": " + r.message); } - protected Parameters getParameters(Map paramMap) throws SvcLogicException { - Parameters p = new Parameters(); - p.templateFileName = parseParam(paramMap, "templateFileName", false, null); + /** + * Returns parameters from the parameter map. + * + * @param paramMap parameter map + * @param p parameters instance + * @return parameters filed instance + * @throws SvcLogicException when svc logic exception occurs + */ + public static Parameters getParameters(Map paramMap, + Parameters p) + throws SvcLogicException { + p.templateFileName = parseParam(paramMap, "templateFileName", + false, null); p.requestBody = parseParam(paramMap, "requestBody", false, null); p.restapiUrl = parseParam(paramMap, "restapiUrl", true, null); validateUrl(p.restapiUrl); p.restapiUser = parseParam(paramMap, "restapiUser", false, null); - p.restapiPassword = parseParam(paramMap, "restapiPassword", false, null); - p.oAuthConsumerKey = parseParam(paramMap, "oAuthConsumerKey", false, null); - p.oAuthConsumerSecret = parseParam(paramMap, "oAuthConsumerSecret", false, null); - p.oAuthSignatureMethod = parseParam(paramMap, "oAuthSignatureMethod", false, null); + p.restapiPassword = parseParam(paramMap, "restapiPassword", false, + null); + p.oAuthConsumerKey = parseParam(paramMap, "oAuthConsumerKey", + false, null); + p.oAuthConsumerSecret = parseParam(paramMap, "oAuthConsumerSecret", + false, null); + p.oAuthSignatureMethod = parseParam(paramMap, "oAuthSignatureMethod", + false, null); p.oAuthVersion = parseParam(paramMap, "oAuthVersion", false, null); p.contentType = parseParam(paramMap, "contentType", false, null); - p.format = Format.fromString(parseParam(paramMap, "format", false, "json")); - p.authtype = AuthType.fromString(parseParam(paramMap, "authType", false, "unspecified")); - p.httpMethod = HttpMethod.fromString(parseParam(paramMap, "httpMethod", false, "post")); + p.format = Format.fromString(parseParam(paramMap, "format", false, + "json")); + p.authtype = fromString(parseParam(paramMap, "authType", false, + "unspecified")); + p.httpMethod = HttpMethod.fromString(parseParam(paramMap, "httpMethod", + false, "post")); p.responsePrefix = parseParam(paramMap, "responsePrefix", false, null); p.listNameList = getListNameList(paramMap); String skipSendingStr = paramMap.get("skipSending"); p.skipSending = "true".equalsIgnoreCase(skipSendingStr); - p.convertResponse = Boolean.valueOf(parseParam(paramMap, "convertResponse", false, "true")); - p.trustStoreFileName = parseParam(paramMap, "trustStoreFileName", false, null); - p.trustStorePassword = parseParam(paramMap, "trustStorePassword", false, null); - p.keyStoreFileName = parseParam(paramMap, "keyStoreFileName", false, null); - p.keyStorePassword = parseParam(paramMap, "keyStorePassword", false, null); - p.ssl = p.trustStoreFileName != null && p.trustStorePassword != null && p.keyStoreFileName != null && - p.keyStorePassword != null; - p.customHttpHeaders = parseParam(paramMap, "customHttpHeaders", false, null); + p.convertResponse = valueOf(parseParam(paramMap, "convertResponse", + false, "true")); + p.trustStoreFileName = parseParam(paramMap, "trustStoreFileName", + false, null); + p.trustStorePassword = parseParam(paramMap, "trustStorePassword", + false, null); + p.keyStoreFileName = parseParam(paramMap, "keyStoreFileName", + false, null); + p.keyStorePassword = parseParam(paramMap, "keyStorePassword", + false, null); + p.ssl = p.trustStoreFileName != null && p.trustStorePassword != null + && p.keyStoreFileName != null && p.keyStorePassword != null; + p.customHttpHeaders = parseParam(paramMap, "customHttpHeaders", + false, null); p.partner = parseParam(paramMap, "partner", false, null); - p.dumpHeaders = Boolean.valueOf(parseParam(paramMap, "dumpHeaders", false, null)); - p.returnRequestPayload = Boolean.valueOf(parseParam(paramMap, "returnRequestPayload", false, null)); + p.dumpHeaders = valueOf(parseParam(paramMap, "dumpHeaders", + false, null)); + p.returnRequestPayload = valueOf(parseParam( + paramMap, "returnRequestPayload", false, null)); return p; } - private void validateUrl(String restapiUrl) throws SvcLogicException { + /** + * Validates the given URL in the parameters. + * + * @param restapiUrl rest api URL + * @throws SvcLogicException when URL validation fails + */ + private static void validateUrl(String restapiUrl) + throws SvcLogicException { try { URI.create(restapiUrl); } catch (IllegalArgumentException e) { - throw new SvcLogicException("Invalid input of url " + e.getLocalizedMessage(), e); + throw new SvcLogicException("Invalid input of url " + + e.getLocalizedMessage(), e); } } - protected Set getListNameList(Map paramMap) { + /** + * Returns the list of list name. + * + * @param paramMap parameters map + * @return list of list name + */ + private static Set getListNameList(Map paramMap) { Set ll = new HashSet<>(); for (Map.Entry entry : paramMap.entrySet()) if (entry.getKey().startsWith("listName")) @@ -295,7 +333,19 @@ public class RestapiCallNode implements SvcLogicJavaPlugin { return ll; } - protected String parseParam(Map paramMap, String name, boolean required, String def) + /** + * Parses the parameter string map of property, validates if required, + * assigns default value if present and returns the value. + * + * @param paramMap string param map + * @param name name of the property + * @param required if value required + * @param def default value + * @return value of the property + * @throws SvcLogicException if required parameter value is empty + */ + public static String parseParam(Map paramMap, String name, + boolean required, String def) throws SvcLogicException { String s = paramMap.get(name); @@ -524,7 +574,16 @@ public class RestapiCallNode implements SvcLogicJavaPlugin { return client; } - protected HttpResponse sendHttpRequest(String request, Parameters p) throws SvcLogicException { + /** + * Receives the http response for the http request sent. + * + * @param request request msg + * @param p parameters + * @return HTTP response + * @throws SvcLogicException when sending http request fails + */ + public HttpResponse sendHttpRequest(String request, Parameters p) + throws SvcLogicException { ClientConfig config = new DefaultClientConfig(); SSLContext ssl = null; @@ -693,7 +752,7 @@ public class RestapiCallNode implements SvcLogicJavaPlugin { p.oAuthVersion = parseParam(paramMap, "oAuthVersion", false, null); p.oAuthConsumerSecret = parseParam(paramMap, "oAuthConsumerSecret", false, null); p.oAuthSignatureMethod = parseParam(paramMap, "oAuthSignatureMethod", false, null); - p.authtype = AuthType.fromString(parseParam(paramMap, "authType", false, "unspecified")); + p.authtype = fromString(parseParam(paramMap, "authType", false, "unspecified")); return p; } diff --git a/restconf-client/provider/pom.xml b/restconf-client/provider/pom.xml index 4183d48be..099412642 100755 --- a/restconf-client/provider/pom.xml +++ b/restconf-client/provider/pom.xml @@ -114,8 +114,23 @@ org.opendaylight.netconf restconf-nb-rfc8040 - 1.7.4-SNAPSHOT + 1.7.3 test + + org.opendaylight.yangtools + yang-parser-impl + 2.0.6.1 + + + org.opendaylight.netconf + restconf-common + 1.7.3 + + + org.opendaylight.netconf + restconf-nb-bierman02 + 1.7.3 + 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 new file mode 100644 index 000000000..c5f73305b --- /dev/null +++ b/restconf-client/provider/src/main/java/org/onap/ccsdk/sli/plugins/restconfapicall/RestconfApiCallNode.java @@ -0,0 +1,362 @@ +/*- + * ============LICENSE_START======================================================= + * ONAP - CCSDK + * ================================================================================ + * Copyright (C) 2018 Huawei Technologies Co., Ltd. All rights reserved. + * ================================================================================ + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============LICENSE_END========================================================= + */ + +package org.onap.ccsdk.sli.plugins.restconfapicall; + +import org.onap.ccsdk.sli.core.sli.SvcLogicContext; +import org.onap.ccsdk.sli.core.sli.SvcLogicException; +import org.onap.ccsdk.sli.core.sli.SvcLogicJavaPlugin; +import org.onap.ccsdk.sli.plugins.restapicall.HttpResponse; +import org.onap.ccsdk.sli.plugins.restapicall.RestapiCallNode; +import org.onap.ccsdk.sli.plugins.restapicall.RetryException; +import org.onap.ccsdk.sli.plugins.restapicall.RetryPolicy; +import org.onap.ccsdk.sli.plugins.yangserializers.dfserializer.DataFormatSerializer; +import org.onap.ccsdk.sli.plugins.yangserializers.dfserializer.DataFormatSerializerContext; +import org.onap.ccsdk.sli.plugins.yangserializers.dfserializer.DfSerializerFactory; +import org.onap.ccsdk.sli.plugins.yangserializers.dfserializer.Listener; +import org.onap.ccsdk.sli.plugins.yangserializers.dfserializer.MdsalSerializerHelper; +import org.onap.ccsdk.sli.plugins.yangserializers.dfserializer.SerializerHelper; +import org.onap.ccsdk.sli.plugins.yangserializers.dfserializer.YangParameters; +import org.onap.ccsdk.sli.plugins.yangserializers.pnserializer.MdsalPropertiesNodeSerializer; +import org.onap.ccsdk.sli.plugins.yangserializers.pnserializer.PropertiesNodeSerializer; +import org.opendaylight.netconf.sal.restconf.impl.ControllerContext; +import org.opendaylight.restconf.common.context.InstanceIdentifierContext; +import org.opendaylight.yangtools.yang.model.api.SchemaContext; +import org.osgi.framework.BundleContext; +import org.osgi.framework.ServiceReference; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +import javax.ws.rs.core.UriBuilder; +import java.net.SocketException; +import java.net.URI; +import java.net.URISyntaxException; +import java.util.HashMap; +import java.util.List; +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.POST; +import static org.onap.ccsdk.sli.plugins.restapicall.HttpMethod.PUT; +import static org.onap.ccsdk.sli.plugins.restapicall.RestapiCallNode.parseParam; +import static org.onap.ccsdk.sli.plugins.restconfapicall.RestconfApiUtils.ATTEMPTS_MSG; +import static org.onap.ccsdk.sli.plugins.restconfapicall.RestconfApiUtils.COMMA; +import static org.onap.ccsdk.sli.plugins.restconfapicall.RestconfApiUtils.COMM_FAIL; +import static org.onap.ccsdk.sli.plugins.restconfapicall.RestconfApiUtils.HEADER; +import static org.onap.ccsdk.sli.plugins.restconfapicall.RestconfApiUtils.HTTP_REQ; +import static org.onap.ccsdk.sli.plugins.restconfapicall.RestconfApiUtils.HTTP_RES; +import static org.onap.ccsdk.sli.plugins.restconfapicall.RestconfApiUtils.MAX_RETRY_ERR; +import static org.onap.ccsdk.sli.plugins.restconfapicall.RestconfApiUtils.NO_MORE_RETRY; +import static org.onap.ccsdk.sli.plugins.restconfapicall.RestconfApiUtils.REQ_ERR; +import static org.onap.ccsdk.sli.plugins.restconfapicall.RestconfApiUtils.REST_API_URL; +import static org.onap.ccsdk.sli.plugins.restconfapicall.RestconfApiUtils.RES_CODE; +import static org.onap.ccsdk.sli.plugins.restconfapicall.RestconfApiUtils.RES_MSG; +import static org.onap.ccsdk.sli.plugins.restconfapicall.RestconfApiUtils.RES_PRE; +import static org.onap.ccsdk.sli.plugins.restconfapicall.RestconfApiUtils.RETRY_COUNT; +import static org.onap.ccsdk.sli.plugins.restconfapicall.RestconfApiUtils.RETRY_FAIL; +import static org.onap.ccsdk.sli.plugins.restconfapicall.RestconfApiUtils.UPDATED_URL; +import static org.onap.ccsdk.sli.plugins.restconfapicall.RestconfApiUtils.getSchemaCtxFromDir; +import static org.onap.ccsdk.sli.plugins.restconfapicall.RestconfApiUtils.getYangParameters; +import static org.onap.ccsdk.sli.plugins.restconfapicall.RestconfApiUtils.parseUrl; +import static org.onap.ccsdk.sli.plugins.yangserializers.dfserializer.DfListenerFactory.instance; +import static org.osgi.framework.FrameworkUtil.getBundle; + +/** + * Representation of a plugin to enable RESTCONF based CRUD operations from DG. + */ +public class RestconfApiCallNode implements SvcLogicJavaPlugin { + + /** + * Logger for the restconf api call node class. + */ + private static final Logger log = LoggerFactory.getLogger( + RestconfApiCallNode.class); + + /** + * Creates an instance of restconf api call node. + */ + public RestconfApiCallNode() { + } + + /** + * Sends the restconf request using the parameters map and the memory + * context. And this method allows the directed graphs to interact with + * the restconf api call node + * + * @param paramMap parameters map + * @param ctx service logic context + * @throws SvcLogicException when svc logic exception occurs + */ + public void sendRequest(Map paramMap, SvcLogicContext ctx) + throws SvcLogicException { + sendRequest(paramMap, ctx, 0); + } + + /** + * Sends the restconf request using the parameters map and the memory + * context along with the retry count. + * + * @param paramMap parameters map + * @param ctx service logic context + * @param retryCount number of retry counts + * @throws SvcLogicException when svc logic exception occurs + */ + public void sendRequest(Map paramMap, SvcLogicContext ctx, + Integer retryCount) throws SvcLogicException { + RestapiCallNode rest = new RestapiCallNode(); + RetryPolicy retryPolicy = null; + HttpResponse r = new HttpResponse(); + try { + YangParameters p = getYangParameters(paramMap); + if (p.partner != null) { + retryPolicy = rest.getRetryPolicyStore() + .getRetryPolicy(p.partner); + } + + String pp = p.responsePrefix != null ? p.responsePrefix + '.' : ""; + Map props = new HashMap<>((Map)ctx.toProperties()); + String uri = parseUrl(p.restapiUrl, p.httpMethod); + InstanceIdentifierContext insIdCtx = getInsIdCtx(p, uri); + + String req = null; + if (p.httpMethod == POST || p.httpMethod == PUT) { + req = serializeRequest(props, p, uri, insIdCtx); + } + if (req == null && p.requestBody != null) { + req = p.requestBody; + } + + r = rest.sendHttpRequest(req, p); + if (p.returnRequestPayload && req != null) { + ctx.setAttribute(pp + HTTP_REQ, req); + } + + String response = getResponse(ctx, p, pp, r); + if (response != null) { + Map resProp = serializeResponse( + p, uri, response, insIdCtx); + for (Map.Entry pro : resProp.entrySet()) { + ctx.setAttribute(pro.getKey(), pro.getValue()); + } + } + } catch (SvcLogicException e) { + boolean shouldRetry = false; + if (e.getCause().getCause() instanceof SocketException) { + shouldRetry = true; + } + + 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); + } else { + if (retryCount == null) { + retryCount = 0; + } + log.debug(format(ATTEMPTS_MSG, retryCount, + retryPolicy.getMaximumRetries())); + try { + retryCount = retryCount + 1; + if (retryCount < retryPolicy.getMaximumRetries() + 1) { + setRetryUri(paramMap, retryPolicy); + log.debug(format(RETRY_COUNT, retryCount, retryPolicy + .getMaximumRetries())); + sendRequest(paramMap, ctx, retryCount); + } else { + log.debug(MAX_RETRY_ERR); + setFailureResponseStatus(ctx, prefix, + e.getMessage(), r); + } + } catch (Exception ex) { + log.error(NO_MORE_RETRY, ex); + setFailureResponseStatus(ctx, prefix, RETRY_FAIL, r); + } + } + } + + if (r != null && r.code >= 300) { + throw new SvcLogicException( + String.valueOf(r.code) + ": " + r.message); + } + } + + /** + * Serializes the request message to JSON or XML from the properties. + * + * @param properties properties + * @param params YANG parameters + * @param uri URI + * @param insIdCtx instance identifier context + * @return JSON or XML message to be sent + * @throws SvcLogicException when serializing the request fails + */ + protected String serializeRequest(Map properties, + YangParameters params, String uri, + InstanceIdentifierContext insIdCtx) + throws SvcLogicException { + PropertiesNodeSerializer propSer = new MdsalPropertiesNodeSerializer( + insIdCtx.getSchemaNode(), insIdCtx.getSchemaContext(), uri); + DataFormatSerializerContext serCtx = new DataFormatSerializerContext( + null, uri, null, propSer); + DataFormatSerializer ser = DfSerializerFactory.instance() + .getSerializer(serCtx, params); + //TODO: Handling of XML annotations + return ser.encode(properties, null); + } + + /** + * Serializes the response message from JSON or XML to the properties. + * + * @param params YANG parameters + * @param uri URI + * @param response response message + * @param insIdCtx instance identifier context + * @return response message as properties + * @throws SvcLogicException when serializing the response fails + */ + protected Map serializeResponse(YangParameters params, + String uri, String response, + InstanceIdentifierContext insIdCtx) + throws SvcLogicException { + PropertiesNodeSerializer propSer = new MdsalPropertiesNodeSerializer( + insIdCtx.getSchemaNode(), insIdCtx.getSchemaContext(), uri); + SerializerHelper helper = new MdsalSerializerHelper( + insIdCtx.getSchemaNode(), insIdCtx.getSchemaContext(), uri); + Listener listener = instance().getListener(helper, params); + DataFormatSerializerContext serCtx = new DataFormatSerializerContext( + listener, uri, null, propSer); + DataFormatSerializer ser = DfSerializerFactory.instance() + .getSerializer(serCtx, params); + return ser.decode(response); + } + + /** + * Returns instance identifier context for a uri using the schema context. + * + * @param params YANG parameters + * @param uri URI + * @return instance identifier context + * @throws SvcLogicException when getting schema context fails + */ + private InstanceIdentifierContext getInsIdCtx(YangParameters params, + String uri) + throws SvcLogicException { + SchemaContext context = getSchemaContext(params); + ControllerContext contCtx = ControllerContext.getInstance(); + contCtx.onGlobalContextUpdated(context); + return contCtx.toInstanceIdentifier(uri); + } + + /** + * Returns the global schema context or schema context of particular YANG + * files present in a directory path. + * + * @param params YANG parameters + * @return schema context + * @throws SvcLogicException when schema context fetching fails + */ + private SchemaContext getSchemaContext(YangParameters params) + throws SvcLogicException { + if (params.dirPath != null) { + return getSchemaCtxFromDir(params.dirPath); + } + BundleContext bc = getBundle(SchemaContext.class).getBundleContext(); + SchemaContext schemaContext = null; + if (bc != null) { + ServiceReference reference = bc.getServiceReference( + SchemaContext.class); + if (reference != null) { + schemaContext = (SchemaContext) bc.getService(reference); + } + } + return schemaContext; + } + + /** + * Returns the response message body of a http response message. + * + * @param ctx svc logic context + * @param params parameters + * @param pre prefix to be appended + * @param res http response + * @return response message body + */ + private String getResponse(SvcLogicContext ctx, YangParameters params, + String pre, HttpResponse res) { + ctx.setAttribute(pre + RES_CODE, String.valueOf(res.code)); + ctx.setAttribute(pre + RES_MSG, res.message); + + if (params.dumpHeaders && res.headers != null) { + for (Map.Entry> a : res.headers.entrySet()) { + ctx.setAttribute(pre + HEADER + a.getKey(), + join(a.getValue(), COMMA)); + } + } + + if (res.body != null && res.body.trim().length() > 0) { + ctx.setAttribute(pre + HTTP_RES, res.body); + return res.body; + } + return null; + } + + /** + * Sets the failure response status in the context memory. + * + * @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(); + res.code = 500; + res.message = errMsg; + ctx.setAttribute(prefix + RES_CODE, String.valueOf(res.code)); + ctx.setAttribute(prefix + RES_MSG, res.message); + } + + /** + * Sets the retry URI to the param map from the retry policies different + * host. + * + * @param paramMap parameter map + * @param retryPolicy retry policy + * @throws URISyntaxException when new URI creation fails + * @throws RetryException when retry policy cannot give another host + */ + private void setRetryUri(Map paramMap, + RetryPolicy retryPolicy) + throws URISyntaxException, RetryException { + URI uri = new URI(paramMap.get(REST_API_URL)); + String hostName = uri.getHost(); + String retryString = retryPolicy.getNextHostName(uri.toString()); + + URI uriTwo = new URI(retryString); + URI retryUri = UriBuilder.fromUri(uri).host(uriTwo.getHost()).port( + uriTwo.getPort()).scheme(uriTwo.getScheme()).build(); + + paramMap.put(REST_API_URL, retryUri.toString()); + log.debug(UPDATED_URL + retryUri.toString()); + log.debug(format(COMM_FAIL, hostName, retryString)); + } +} 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 new file mode 100644 index 000000000..e066671b1 --- /dev/null +++ b/restconf-client/provider/src/main/java/org/onap/ccsdk/sli/plugins/restconfapicall/RestconfApiUtils.java @@ -0,0 +1,213 @@ +/*- + * ============LICENSE_START======================================================= + * ONAP - CCSDK + * ================================================================================ + * Copyright (C) 2018 Huawei Technologies Co., Ltd. All rights reserved. + * ================================================================================ + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============LICENSE_END========================================================= + */ + +package org.onap.ccsdk.sli.plugins.restconfapicall; + +import org.onap.ccsdk.sli.core.sli.SvcLogicException; +import org.onap.ccsdk.sli.plugins.restapicall.HttpMethod; +import org.onap.ccsdk.sli.plugins.yangserializers.dfserializer.YangParameters; +import org.opendaylight.yangtools.yang.model.api.SchemaContext; +import org.opendaylight.yangtools.yang.model.parser.api.YangSyntaxErrorException; +import org.opendaylight.yangtools.yang.parser.rfc7950.repo.YangStatementStreamSource; +import org.opendaylight.yangtools.yang.parser.spi.meta.ReactorException; +import org.opendaylight.yangtools.yang.parser.stmt.reactor.CrossSourceStatementReactor; + +import java.io.File; +import java.io.IOException; +import java.net.URI; +import java.net.URISyntaxException; +import java.nio.file.Path; +import java.nio.file.Paths; +import java.util.ArrayList; +import java.util.Collection; +import java.util.LinkedList; +import java.util.List; +import java.util.Map; + +import static org.onap.ccsdk.sli.plugins.restapicall.HttpMethod.PUT; +import static org.onap.ccsdk.sli.plugins.restapicall.RestapiCallNode.getParameters; +import static org.onap.ccsdk.sli.plugins.restapicall.RestapiCallNode.parseParam; +import static org.opendaylight.yangtools.yang.model.repo.api.StatementParserMode.DEFAULT_MODE; +import static org.opendaylight.yangtools.yang.model.repo.api.YangTextSchemaSource.forFile; +import static org.opendaylight.yangtools.yang.parser.rfc7950.reactor.RFC7950Reactors.defaultReactor; +import static org.opendaylight.yangtools.yang.parser.rfc7950.repo.YangStatementStreamSource.create; + +/** + * Utilities for restconf api call node. + */ +public final class RestconfApiUtils { + + static final String RES_CODE = "response-code"; + + static final String HTTP_REQ ="httpRequest"; + + static final String RES_PRE = "responsePrefix"; + + static final String RES_MSG = "response-message"; + + static final String HEADER = "header."; + + static final String COMMA = ","; + + static final String HTTP_RES = "httpResponse"; + + static final String REST_API_URL = "restapiUrl"; + + static final String UPDATED_URL = "URL was set to"; + + static final String COMM_FAIL = "Failed to communicate with host %s." + + "Request will be re-attempted using the host %s."; + + static final String RETRY_COUNT = "This is retry attempt %d out of %d"; + + static final String RETRY_FAIL = "Retry attempt has failed. No further " + + "retry shall be attempted, calling setFailureResponseStatus"; + + static final String NO_MORE_RETRY = "Could not attempt retry"; + + static final String MAX_RETRY_ERR = "Maximum retries reached, calling " + + "setFailureResponseStatus"; + + static final String ATTEMPTS_MSG = "%d attempts were made out of %d " + + "maximum retries"; + + static final String REQ_ERR = "Error sending the request: "; + + private static final String SLASH = "/"; + + private static final String DIR_PATH = "dirPath"; + + 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."; + + private static final String YANG = ".yang"; + + private static final String YANG_FILE_ERR = "Unable to parse the YANG " + + "file provided"; + + //No instantiation. + private RestconfApiUtils() { + } + + /** + * Returns the YANG parameters after parsing it from the map. + * + * @param paramMap parameters map + * @return YANG parameters + * @throws SvcLogicException when parsing of parameters map fail + */ + static YangParameters getYangParameters(Map paramMap) + throws SvcLogicException { + YangParameters param = (YangParameters) getParameters( + paramMap, new YangParameters()); + param.dirPath = parseParam(paramMap, DIR_PATH, false, null); + return param; + } + + /** + * Parses the restconf URL and gives the YANG path from it, which can be + * used to get schema node. If it is a PUT operation, then a node must be + * reduced from the url to make it always point to the parent. + * + * @param url restconf URL + * @param method HTTP operation + * @return YANG path pointing to parent + * @throws SvcLogicException when parsing the URL fails + */ + static String parseUrl(String url, HttpMethod method) + throws SvcLogicException { + URI uri; + try { + uri = new URI(url); + } catch (URISyntaxException e) { + throw new SvcLogicException(URL_SYNTAX + url, e); + } + + String path = uri.getPath(); + if (path.contains(RESTCONF_PATH)) { + path = path.replaceFirst(RESTCONF_PATH, ""); + } + if (method == PUT) { + if (!path.contains(SLASH)) { + throw new SvcLogicException(PUT_NODE_ERR + url); + } + path = path.substring(0, path.lastIndexOf(SLASH)); + } + return path; + } + + /** + * Returns the schema context of the YANG files present in a directory. + * + * @param di directory path + * @return YANG schema context + * @throws SvcLogicException when YANG file reading fails + */ + static SchemaContext getSchemaCtxFromDir(String di) + throws SvcLogicException { + Path d = Paths.get(di); + File dir = d.toFile(); + List yangFiles = new LinkedList<>(); + getYangFiles(dir, yangFiles); + final Collection sources = + new ArrayList<>(yangFiles.size()); + for (File file : yangFiles) { + try { + sources.add(create(forFile(file))); + } catch (IOException | YangSyntaxErrorException e) { + throw new SvcLogicException(YANG_FILE_ERR + e.getMessage(), e); + } + } + + final CrossSourceStatementReactor.BuildAction reactor = defaultReactor() + .newBuild(DEFAULT_MODE).addSources(sources); + try { + return reactor.buildEffective(); + } catch (ReactorException e) { + throw new SvcLogicException(YANG_FILE_ERR + e.getMessage(), e); + } + } + + /** + * Returns all the YANG files present in a directory recursively. + * + * @param dir path of the directory + * @param yangFiles list of YANG files + */ + private static void getYangFiles(File dir, List yangFiles) { + if (dir.exists()) { + File[] files = dir.listFiles(); + if (files != null) { + for (File file : files) { + if (file.isFile() && file.getName().endsWith(YANG)) { + yangFiles.add(file); + } else if (file.isDirectory()) { + getYangFiles(file, yangFiles); + } + } + } + } + } +} 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 deleted file mode 100644 index 87cb92bc5..000000000 --- a/restconf-client/provider/src/main/java/org/onap/ccsdk/sli/plugins/restconfapicall/RestconfapiCallNode.java +++ /dev/null @@ -1,65 +0,0 @@ -/*- - * ============LICENSE_START======================================================= - * ONAP - CCSDK - * ================================================================================ - * Copyright (C) 2018 Huawei Technologies Co., Ltd. All rights reserved. - * ================================================================================ - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * ============LICENSE_END========================================================= - */ - -package org.onap.ccsdk.sli.plugins.restconfapicall; - -import java.util.Map; -import org.onap.ccsdk.sli.core.sli.SvcLogicContext; -import org.onap.ccsdk.sli.core.sli.SvcLogicException; -import org.onap.ccsdk.sli.core.sli.SvcLogicJavaPlugin; - -/** - * Representation of a plugin to enable RESTCONF based CRUD operations from DG. - */ -public class RestconfapiCallNode implements SvcLogicJavaPlugin { - - public RestconfapiCallNode() { - } - - /** - * Allows Directed Graphs the ability to interact with RESTCONF APIs. - * @param parameters HashMap of parameters passed by the DG to this function - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - *
parameterMandatory/Optionaldescriptionexample values
templateFileNameOptionalfull path to YANG directory that can be used to build a request/sdncopt/bvc/resconfapi/test
restapiUrlMandatoryurl to send the request tohttps://sdncodl:8543/restconf/operations/L3VNF-API:create-update-vnf-request
restapiUserOptionaluser name to use for http basic authenticationsdnc_ws
restapiPasswordOptionalunencrypted password to use for http basic authenticationplain_password
contentTypeOptionalhttp content type to set in the http headerusually application/json or application/xml
formatOptionalshould match request body formatjson or xml
httpMethodOptionalhttp method to use when sending the requestget post put delete patch
responsePrefixOptionallocation the response will be written to in context memorytmp.resconftapi.result
skipSendingOptionaltrue or false
convertResponse Optionalwhether the response should be convertedtrue or false
customHttpHeadersOptionala list additional http headers to be passed in, follow the format in the exampleX-CSI-MessageId=messageId,headerFieldName=headerFieldValue
dumpHeadersOptionalwhen true writes http header content to context memorytrue or false
- * @param ctx Reference to context memory - * @throws SvcLogicException - * @since 11.0.2 - * @see String#split(String, int) - */ - public void sendRequest(Map paramMap, SvcLogicContext ctx) throws SvcLogicException { - //TODO - } - -} diff --git a/restconf-client/provider/src/main/java/org/onap/ccsdk/sli/plugins/restconfdiscovery/RestconfDiscoveryNode.java b/restconf-client/provider/src/main/java/org/onap/ccsdk/sli/plugins/restconfdiscovery/RestconfDiscoveryNode.java index 34bb2ee6e..0490b3a51 100644 --- a/restconf-client/provider/src/main/java/org/onap/ccsdk/sli/plugins/restconfdiscovery/RestconfDiscoveryNode.java +++ b/restconf-client/provider/src/main/java/org/onap/ccsdk/sli/plugins/restconfdiscovery/RestconfDiscoveryNode.java @@ -24,7 +24,7 @@ import org.glassfish.jersey.media.sse.EventSource; import org.glassfish.jersey.media.sse.SseFeature; import org.onap.ccsdk.sli.core.sli.SvcLogicContext; import org.onap.ccsdk.sli.core.sli.SvcLogicException; -import org.onap.ccsdk.sli.plugins.restconfapicall.RestconfapiCallNode; +import org.onap.ccsdk.sli.plugins.restconfapicall.RestconfApiCallNode; import org.slf4j.Logger; import org.slf4j.LoggerFactory; @@ -46,7 +46,7 @@ public class RestconfDiscoveryNode implements SvcLogicDiscoveryPlugin { private ExecutorService executor = Executors.newCachedThreadPool(); private Map runnableInfo = new ConcurrentHashMap<>(); - private RestconfapiCallNode restconfapiCallNode; + private RestconfApiCallNode restconfApiCallNode; private volatile Map subscriptionInfoMap = new ConcurrentHashMap<>(); private volatile LinkedBlockingQueue eventQueue = new LinkedBlockingQueue<>(); @@ -78,7 +78,7 @@ public class RestconfDiscoveryNode implements SvcLogicDiscoveryPlugin { throw new SvcLogicException("Subscriber Id is null"); } - restconfapiCallNode.sendRequest(paramMap, ctx); + restconfApiCallNode.sendRequest(paramMap, ctx); if (getResponseCode(paramMap.get(RESPONSE_PREFIX), ctx).equals(RESPONSE_CODE_200)) { // TODO: save subscription id and subscriber in MYSQL @@ -207,8 +207,8 @@ public class RestconfDiscoveryNode implements SvcLogicDiscoveryPlugin { * * @return restconfApiCallNode */ - protected RestconfapiCallNode restconfapiCallNode() { - return restconfapiCallNode; + protected RestconfApiCallNode restconfapiCallNode() { + return restconfApiCallNode; } /** @@ -216,8 +216,8 @@ public class RestconfDiscoveryNode implements SvcLogicDiscoveryPlugin { * * @param node restconfApiCallNode */ - void restconfapiCallNode(RestconfapiCallNode node) { - restconfapiCallNode = node; + void restconfapiCallNode(RestconfApiCallNode node) { + restconfApiCallNode = node; } Map subscriptionInfoMap() { 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 a3e30c4b7..5a898dfc5 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 @@ -76,8 +76,8 @@ public class MdsalSerializerHelper extends SerializerHelper - + - + diff --git a/restconf-client/provider/src/main/resources/META-INF/spring/restconf-client-osgi-context.xml b/restconf-client/provider/src/main/resources/META-INF/spring/restconf-client-osgi-context.xml index d56e2fc11..5a9f22bed 100644 --- a/restconf-client/provider/src/main/resources/META-INF/spring/restconf-client-osgi-context.xml +++ b/restconf-client/provider/src/main/resources/META-INF/spring/restconf-client-osgi-context.xml @@ -26,7 +26,7 @@ http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd"> - + diff --git a/restconf-client/provider/src/main/resources/org/opendaylight/blueprint/restconf-client-blueprint.xml b/restconf-client/provider/src/main/resources/org/opendaylight/blueprint/restconf-client-blueprint.xml index 149ed9fcf..91c31efc5 100755 --- a/restconf-client/provider/src/main/resources/org/opendaylight/blueprint/restconf-client-blueprint.xml +++ b/restconf-client/provider/src/main/resources/org/opendaylight/blueprint/restconf-client-blueprint.xml @@ -23,12 +23,12 @@ xmlns:odl="http://opendaylight.org/xmlns/blueprint/v1.0.0" odl:use-default-for-reference-types="true"> - + - org.onap.ccsdk.sli.plugins.restconfapicall.RestconfapiCallNode + org.onap.ccsdk.sli.plugins.restconfapicall.RestconfApiCallNode -- cgit 1.2.3-korg From 72e46e2c1d7ab69503a26a545ed7ef1a49f2fb43 Mon Sep 17 00:00:00 2001 From: gaurav Date: Tue, 11 Sep 2018 14:59:59 +0530 Subject: Fixed security issue of Restconf Client Removed the spring dependencies as they are not required. Change-Id: I4a95a26d5a615897527dbe543d938459c1651081 Issue-ID: CCSDK-444 Signed-off-by: Gaurav Agrawal --- .../features/src/main/resources/features.xml | 38 --- restconf-client/installer/pom.xml | 260 ++++++++++----------- restconf-client/provider/pom.xml | 8 - .../META-INF/spring/restconf-client-context.xml | 48 ---- .../spring/restconf-client-osgi-context.xml | 32 --- 5 files changed, 127 insertions(+), 259 deletions(-) delete mode 100644 restconf-client/features/src/main/resources/features.xml delete mode 100644 restconf-client/provider/src/main/resources/META-INF/spring/restconf-client-context.xml delete mode 100644 restconf-client/provider/src/main/resources/META-INF/spring/restconf-client-osgi-context.xml (limited to 'restconf-client/provider') diff --git a/restconf-client/features/src/main/resources/features.xml b/restconf-client/features/src/main/resources/features.xml deleted file mode 100644 index c07cddffb..000000000 --- a/restconf-client/features/src/main/resources/features.xml +++ /dev/null @@ -1,38 +0,0 @@ - - - - - - - mvn:org.opendaylight.mdsal/features-mdsal/${odl.mdsal.features.version}/xml/features - - - sdnc-sli - spring - spring-dm - mvn:org.onap.ccsdk.sli.plugins/properties-node-provider/0.3.0-SNAPSHOT - mvn:org.onap.ccsdk.sli.plugins/restconf-client-provider/0.3.0-SNAPSHOT - - - diff --git a/restconf-client/installer/pom.xml b/restconf-client/installer/pom.xml index ee632d434..b28cefde9 100755 --- a/restconf-client/installer/pom.xml +++ b/restconf-client/installer/pom.xml @@ -1,148 +1,142 @@ - - 4.0.0 + + 4.0.0 - - org.onap.ccsdk.parent - odlparent-lite - 1.1.0-SNAPSHOT - + + org.onap.ccsdk.parent + odlparent-lite + 1.1.0-SNAPSHOT + - org.onap.ccsdk.sli.plugins - restconf-client-installer - 0.3.0-SNAPSHOT - pom + org.onap.ccsdk.sli.plugins + restconf-client-installer + 0.3.0-SNAPSHOT + pom - ccsdk-sli-plugins :: restconf-client :: ${project.artifactId} + ccsdk-sli-plugins :: restconf-client :: ${project.artifactId} - - ccsdk-restconf-client - ${application.name} - mvn:org.onap.ccsdk.sli.plugins/${features.boot}/${project.version}/xml/features - false - + + ccsdk-restconf-client + ${application.name} + mvn:org.onap.ccsdk.sli.plugins/${features.boot}/${project.version}/xml/features + + false + - + - - org.onap.ccsdk.sli.plugins - ${application.name} - ${project.version} - xml - features - - - * - * - - - - - - org.onap.ccsdk.sli.plugins - restconf-client-provider - ${project.version} - - org.springframework - spring-beans + org.onap.ccsdk.sli.plugins + ${application.name} + ${project.version} + xml + features + + + * + * + + + - org.springframework - spring-context + org.onap.ccsdk.sli.plugins + restconf-client-provider + ${project.version} - + - - - - maven-assembly-plugin - 2.6 - - - maven-repo-zip - - single - - package - - true - stage/${application.name}-${project.version} - - src/assembly/assemble_mvnrepo_zip.xml - - true - - - - installer-zip - - single - - package - - true - ${application.name}-${project.version}-installer - - src/assembly/assemble_installer_zip.xml - - false - - - - - - org.apache.maven.plugins - maven-dependency-plugin - - - copy-dependencies - - copy-dependencies - - prepare-package - - false - ${project.build.directory}/assembly/system - false - true - true - true - false - false - org.onap.ccsdk.sli.core - provided - - - - - - maven-resources-plugin - 2.6 - - - copy-version - - copy-resources - - validate - - ${basedir}/target/stage - - - src/main/resources/scripts - - install-feature.sh - - true - - - - + + + + maven-assembly-plugin + 2.6 + + + maven-repo-zip + + single + + package + + true + stage/${application.name}-${project.version} + + src/assembly/assemble_mvnrepo_zip.xml + + true + + + + installer-zip + + single + + package + + true + ${application.name}-${project.version}-installer + + src/assembly/assemble_installer_zip.xml + + false + + + + + + org.apache.maven.plugins + maven-dependency-plugin + + + copy-dependencies + + copy-dependencies + + prepare-package + + false + ${project.build.directory}/assembly/system + false + true + true + true + false + false + org.onap.ccsdk.sli.core + provided + + + + + + maven-resources-plugin + 2.6 + + + copy-version + + copy-resources + + validate + + ${basedir}/target/stage + + + src/main/resources/scripts + + install-feature.sh + + true + + + + - - + + - - + + diff --git a/restconf-client/provider/pom.xml b/restconf-client/provider/pom.xml index 099412642..c063c9bd1 100755 --- a/restconf-client/provider/pom.xml +++ b/restconf-client/provider/pom.xml @@ -22,14 +22,6 @@ - - org.springframework - spring-beans - - - org.springframework - spring-context - org.glassfish.jersey.media jersey-media-sse diff --git a/restconf-client/provider/src/main/resources/META-INF/spring/restconf-client-context.xml b/restconf-client/provider/src/main/resources/META-INF/spring/restconf-client-context.xml deleted file mode 100644 index f99f4f843..000000000 --- a/restconf-client/provider/src/main/resources/META-INF/spring/restconf-client-context.xml +++ /dev/null @@ -1,48 +0,0 @@ - - - - - - - - - file:${SDNC_CONFIG_DIR}/ueb.properties - file:${SDNC_CONFIG_DIR}/dme2.properties - - - - - - - - - - - - - - - - - diff --git a/restconf-client/provider/src/main/resources/META-INF/spring/restconf-client-osgi-context.xml b/restconf-client/provider/src/main/resources/META-INF/spring/restconf-client-osgi-context.xml deleted file mode 100644 index 5a9f22bed..000000000 --- a/restconf-client/provider/src/main/resources/META-INF/spring/restconf-client-osgi-context.xml +++ /dev/null @@ -1,32 +0,0 @@ - - - - - - - - - -- cgit 1.2.3-korg From 056df35d0f9b894c1adf8ea9a2d9bdc21497a0e8 Mon Sep 17 00:00:00 2001 From: gaurav Date: Tue, 11 Sep 2018 15:43:16 +0530 Subject: Fix for sonar critical issues. Fixed sonar critical issues fixes for Restconf Client. Change-Id: If946c43ec98d31999da0829df41efb0a60ff5f7f Issue-ID: CCSDK-325 Signed-off-by: Gaurav Agrawal --- .../plugins/restconfapicall/RestconfApiCallNode.java | 5 ----- .../sli/plugins/restconfapicall/RestconfApiUtils.java | 18 +++++++++++------- .../sli/plugins/restconfdiscovery/EventHandler.java | 6 +----- .../sli/plugins/restconfdiscovery/EventProcessor.java | 17 +++++++++++------ .../restconfdiscovery/RestconfDiscoveryNode.java | 5 +++-- 5 files changed, 26 insertions(+), 25 deletions(-) (limited to 'restconf-client/provider') 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 c5f73305b..42caf3685 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 @@ -90,11 +90,6 @@ public class RestconfApiCallNode implements SvcLogicJavaPlugin { private static final Logger log = LoggerFactory.getLogger( RestconfApiCallNode.class); - /** - * Creates an instance of restconf api call node. - */ - public RestconfApiCallNode() { - } /** * Sends the restconf request using the parameters map and the memory 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 e066671b1..0f9c9401c 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 @@ -200,13 +200,17 @@ public final class RestconfApiUtils { if (dir.exists()) { File[] files = dir.listFiles(); if (files != null) { - for (File file : files) { - if (file.isFile() && file.getName().endsWith(YANG)) { - yangFiles.add(file); - } else if (file.isDirectory()) { - getYangFiles(file, yangFiles); - } - } + processFiles(files, yangFiles); + } + } + } + + private static void processFiles(File[] files, List yangFiles) { + for (File file : files) { + if (file.isFile() && file.getName().endsWith(YANG)) { + yangFiles.add(file); + } else if (file.isDirectory()) { + getYangFiles(file, yangFiles); } } } diff --git a/restconf-client/provider/src/main/java/org/onap/ccsdk/sli/plugins/restconfdiscovery/EventHandler.java b/restconf-client/provider/src/main/java/org/onap/ccsdk/sli/plugins/restconfdiscovery/EventHandler.java index 155656e27..a76554d5a 100644 --- a/restconf-client/provider/src/main/java/org/onap/ccsdk/sli/plugins/restconfdiscovery/EventHandler.java +++ b/restconf-client/provider/src/main/java/org/onap/ccsdk/sli/plugins/restconfdiscovery/EventHandler.java @@ -40,11 +40,7 @@ class EventHandler implements EventListener { public void onEvent(InboundEvent event) { String payload = event.readData(); if (!node.eventQueue().offer(payload)) { - log.error("Unable to process event " - + payload + "as processing queue is full"); - throw new RuntimeException("Unable to process event " - + payload - + "as processing queue is full"); + log.error("Unable to process event {} as processing queue is full", payload); } } } diff --git a/restconf-client/provider/src/main/java/org/onap/ccsdk/sli/plugins/restconfdiscovery/EventProcessor.java b/restconf-client/provider/src/main/java/org/onap/ccsdk/sli/plugins/restconfdiscovery/EventProcessor.java index a85876cae..aae808155 100644 --- a/restconf-client/provider/src/main/java/org/onap/ccsdk/sli/plugins/restconfdiscovery/EventProcessor.java +++ b/restconf-client/provider/src/main/java/org/onap/ccsdk/sli/plugins/restconfdiscovery/EventProcessor.java @@ -53,17 +53,22 @@ class EventProcessor implements Runnable { String id = param.get(EVENT_SUBSCRIPTION_ID); SubscriptionInfo info = node.subscriptionInfoMap().get(id); if (info != null) { - SvcLogicContext ctx = new SvcLogicContext(); - for (Map.Entry entry : param.entrySet()) { - ctx.setAttribute(entry.getKey(), entry.getValue()); - } + SvcLogicContext ctx = setContext(param); SvcLogicGraphInfo callbackDG = info.callBackDG(); callbackDG.executeGraph(ctx); } } catch (InterruptedException | SvcLogicException e) { - log.error(e.getMessage()); - throw new RuntimeException(e.getMessage()); + log.error("Interrupted!", e); + Thread.currentThread().interrupt(); } } } + + private SvcLogicContext setContext(Map param) { + SvcLogicContext ctx = new SvcLogicContext(); + for (Map.Entry entry : param.entrySet()) { + ctx.setAttribute(entry.getKey(), entry.getValue()); + } + return ctx; + } } diff --git a/restconf-client/provider/src/main/java/org/onap/ccsdk/sli/plugins/restconfdiscovery/RestconfDiscoveryNode.java b/restconf-client/provider/src/main/java/org/onap/ccsdk/sli/plugins/restconfdiscovery/RestconfDiscoveryNode.java index 0490b3a51..f5366a544 100644 --- a/restconf-client/provider/src/main/java/org/onap/ccsdk/sli/plugins/restconfdiscovery/RestconfDiscoveryNode.java +++ b/restconf-client/provider/src/main/java/org/onap/ccsdk/sli/plugins/restconfdiscovery/RestconfDiscoveryNode.java @@ -85,7 +85,7 @@ public class RestconfDiscoveryNode implements SvcLogicDiscoveryPlugin { establishPersistentConnection(paramMap, ctx, subscriberId); } else { - log.info("Failed to subscribe " + subscriberId); + log.info("Failed to subscribe {}", subscriberId); throw new SvcLogicException(ctx.getAttribute(RESPONSE_CODE)); } } @@ -131,7 +131,8 @@ public class RestconfDiscoveryNode implements SvcLogicDiscoveryPlugin { try { Thread.sleep(5000); } catch (InterruptedException e) { - log.error("Exception: " + e.getMessage()); + log.error("Interrupted!", e); + Thread.currentThread().interrupt(); } } eventSource.close(); -- cgit 1.2.3-korg From 259eece936114ccacf9acc8f412eeed033fd10c4 Mon Sep 17 00:00:00 2001 From: janani b Date: Wed, 12 Sep 2018 18:30:28 +0530 Subject: UT and defect fixes for DF serializer UT and defect fixes Issue-ID: CCSDK-376 Change-Id: Ia5f04a0d7e07caad0e3b380fdfa6cc109ec43b4e Signed-off-by: janani b --- restconf-client/provider/pom.xml | 20 +- .../restconfapicall/RestconfApiCallNode.java | 39 +- .../dfserializer/DefaultJsonListener.java | 43 +- .../dfserializer/DefaultXmlListener.java | 41 ++ .../dfserializer/DfSerializerUtil.java | 46 +- .../dfserializer/MdsalSerializerHelper.java | 59 +- .../dfserializer/PropertiesNodeXmlListener.java | 8 +- .../DefaultPropertiesNodeListener.java | 6 +- .../MdsalPropertiesNodeSerializer.java | 15 +- .../pnserializer/MdsalPropertiesNodeUtils.java | 8 + .../blueprint/restconf-client-blueprint.xml | 10 +- .../dfserializer/DataFormatSerializerTest.java | 612 +++++++++++++++++++++ .../dfserializer/DataFormatUtilsTest.java | 504 +++++++++++++++++ .../src/test/resources/yang/identity-test.yang | 10 +- .../test/resources/yang/identity-types-second.yang | 2 +- .../src/test/resources/yang/test-augment.yang | 59 +- .../src/test/resources/yang/test-yang.yang | 114 ++-- 17 files changed, 1438 insertions(+), 158 deletions(-) create mode 100644 restconf-client/provider/src/test/java/org/onap/ccsdk/sli/plugins/yangserializers/dfserializer/DataFormatSerializerTest.java create mode 100644 restconf-client/provider/src/test/java/org/onap/ccsdk/sli/plugins/yangserializers/dfserializer/DataFormatUtilsTest.java (limited to 'restconf-client/provider') diff --git a/restconf-client/provider/pom.xml b/restconf-client/provider/pom.xml index c063c9bd1..db0bee061 100755 --- a/restconf-client/provider/pom.xml +++ b/restconf-client/provider/pom.xml @@ -73,6 +73,12 @@ junit test + + org.mockito + mockito-core + ${mockito.version} + test + org.glassfish.jersey.inject jersey-hk2 @@ -106,23 +112,13 @@ org.opendaylight.netconf restconf-nb-rfc8040 - 1.7.3 - test + ${odl.mdsal.version} org.opendaylight.yangtools yang-parser-impl 2.0.6.1 - - org.opendaylight.netconf - restconf-common - 1.7.3 - - - org.opendaylight.netconf - restconf-nb-bierman02 - 1.7.3 - + 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 42caf3685..f9a1ecbf3 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 @@ -36,8 +36,8 @@ import org.onap.ccsdk.sli.plugins.yangserializers.dfserializer.SerializerHelper; import org.onap.ccsdk.sli.plugins.yangserializers.dfserializer.YangParameters; import org.onap.ccsdk.sli.plugins.yangserializers.pnserializer.MdsalPropertiesNodeSerializer; import org.onap.ccsdk.sli.plugins.yangserializers.pnserializer.PropertiesNodeSerializer; -import org.opendaylight.netconf.sal.restconf.impl.ControllerContext; import org.opendaylight.restconf.common.context.InstanceIdentifierContext; +import org.opendaylight.restconf.nb.rfc8040.utils.parser.ParserIdentifier; import org.opendaylight.yangtools.yang.model.api.SchemaContext; import org.osgi.framework.BundleContext; import org.osgi.framework.ServiceReference; @@ -90,6 +90,27 @@ public class RestconfApiCallNode implements SvcLogicJavaPlugin { private static final Logger log = LoggerFactory.getLogger( RestconfApiCallNode.class); + /** + * Rest api call node service instance + */ + private RestapiCallNode restapiCallNode; + + /** + * Creates an instance of restconf api call node with restapi call node. + * + * @param r restapi call node + */ + public RestconfApiCallNode(RestapiCallNode r) { + this.restapiCallNode = r; + } + + /** + * Returns the restapi call node instance. + * @return + */ + public RestapiCallNode getRestapiCallNode() { + return restapiCallNode; + } /** * Sends the restconf request using the parameters map and the memory @@ -116,7 +137,7 @@ public class RestconfApiCallNode implements SvcLogicJavaPlugin { */ public void sendRequest(Map paramMap, SvcLogicContext ctx, Integer retryCount) throws SvcLogicException { - RestapiCallNode rest = new RestapiCallNode(); + RestapiCallNode rest = getRestapiCallNode(); RetryPolicy retryPolicy = null; HttpResponse r = new HttpResponse(); try { @@ -203,7 +224,7 @@ public class RestconfApiCallNode implements SvcLogicJavaPlugin { * @return JSON or XML message to be sent * @throws SvcLogicException when serializing the request fails */ - protected String serializeRequest(Map properties, + public String serializeRequest(Map properties, YangParameters params, String uri, InstanceIdentifierContext insIdCtx) throws SvcLogicException { @@ -227,9 +248,9 @@ public class RestconfApiCallNode implements SvcLogicJavaPlugin { * @return response message as properties * @throws SvcLogicException when serializing the response fails */ - protected Map serializeResponse(YangParameters params, - String uri, String response, - InstanceIdentifierContext insIdCtx) + public Map serializeResponse(YangParameters params, + String uri, String response, + InstanceIdentifierContext insIdCtx) throws SvcLogicException { PropertiesNodeSerializer propSer = new MdsalPropertiesNodeSerializer( insIdCtx.getSchemaNode(), insIdCtx.getSchemaContext(), uri); @@ -255,9 +276,7 @@ public class RestconfApiCallNode implements SvcLogicJavaPlugin { String uri) throws SvcLogicException { SchemaContext context = getSchemaContext(params); - ControllerContext contCtx = ControllerContext.getInstance(); - contCtx.onGlobalContextUpdated(context); - return contCtx.toInstanceIdentifier(uri); + return ParserIdentifier.toInstanceIdentifier(uri, context, null); } /** @@ -294,7 +313,7 @@ public class RestconfApiCallNode implements SvcLogicJavaPlugin { * @param res http response * @return response message body */ - private String getResponse(SvcLogicContext ctx, YangParameters params, + public String getResponse(SvcLogicContext ctx, YangParameters params, String pre, HttpResponse res) { ctx.setAttribute(pre + RES_CODE, String.valueOf(res.code)); ctx.setAttribute(pre + RES_MSG, res.message); diff --git a/restconf-client/provider/src/main/java/org/onap/ccsdk/sli/plugins/yangserializers/dfserializer/DefaultJsonListener.java b/restconf-client/provider/src/main/java/org/onap/ccsdk/sli/plugins/yangserializers/dfserializer/DefaultJsonListener.java index 107585a72..45317522a 100644 --- a/restconf-client/provider/src/main/java/org/onap/ccsdk/sli/plugins/yangserializers/dfserializer/DefaultJsonListener.java +++ b/restconf-client/provider/src/main/java/org/onap/ccsdk/sli/plugins/yangserializers/dfserializer/DefaultJsonListener.java @@ -52,6 +52,16 @@ public class DefaultJsonListener implements JsonListener { */ private String modName; + /** + * Value of the current JSON node. + */ + private String value; + + /** + * Value namespace of the current JSON node. + */ + private String valueNs; + /** * Creates an instance of default json listener with its serializer helper. * @@ -64,16 +74,18 @@ public class DefaultJsonListener implements JsonListener { @Override public void enterJsonNode(String nodeName, JsonNode node, NodeType nodeType) throws SvcLogicException { - getNodeName(nodeName); + getNodeName(nodeName, false); switch (nodeType) { case SINGLE_INSTANCE_LEAF_NODE: - serializerHelper.addNode(name, modName, node.asText(), null, + getNodeName(node.asText(), true); + serializerHelper.addNode(name, modName, value, valueNs, SINGLE_INSTANCE_LEAF_NODE); break; case MULTI_INSTANCE_LEAF_NODE: - serializerHelper.addNode(name, modName, node.asText(), null, + getNodeName(node.asText(), true); + serializerHelper.addNode(name, modName, value, valueNs, MULTI_INSTANCE_LEAF_NODE); break; @@ -105,18 +117,29 @@ public class DefaultJsonListener implements JsonListener { /** * Parses the abstract JSON name and fills the node name and node - * namespace of the current JSON node. + * namespace or value and value namespace of the current JSON node . * - * @param abstractName abstract JSON name + * @param abstractName full name value + * @param isVal if it is for value parsing */ - private void getNodeName(String abstractName) { + private void getNodeName(String abstractName, boolean isVal) { String[] val = abstractName.split(":"); if (val.length == 2) { - modName = val[0]; - name = val[1]; + if (isVal) { + valueNs = val[0]; + value = val[1]; + } else { + modName = val[0]; + name = val[1]; + } } else { - name = val[0]; + if (isVal) { + value = val[0]; + valueNs = null; + } else { + name = val[0]; + modName = null; + } } } - } diff --git a/restconf-client/provider/src/main/java/org/onap/ccsdk/sli/plugins/yangserializers/dfserializer/DefaultXmlListener.java b/restconf-client/provider/src/main/java/org/onap/ccsdk/sli/plugins/yangserializers/dfserializer/DefaultXmlListener.java index 57969146d..03abf44fd 100644 --- a/restconf-client/provider/src/main/java/org/onap/ccsdk/sli/plugins/yangserializers/dfserializer/DefaultXmlListener.java +++ b/restconf-client/provider/src/main/java/org/onap/ccsdk/sli/plugins/yangserializers/dfserializer/DefaultXmlListener.java @@ -21,8 +21,11 @@ package org.onap.ccsdk.sli.plugins.yangserializers.dfserializer; import org.dom4j.Element; +import org.dom4j.Namespace; import org.onap.ccsdk.sli.core.sli.SvcLogicException; +import java.util.List; + import static java.lang.String.format; import static org.onap.ccsdk.sli.plugins.yangserializers.dfserializer.DfSerializerUtil.NODE_TYPE_ERR; @@ -56,6 +59,11 @@ public class DefaultXmlListener implements XmlListener { break; case OBJECT_NODE: + List cont = element.content(); + if (cont != null && cont.size() == 2 && + isValueNsForLeaf(cont, element)) { + return; + } serializerHelper.addNode(element.getName(), element.getNamespace().getURI(), null, null, null); @@ -67,6 +75,39 @@ public class DefaultXmlListener implements XmlListener { } } + /** + * Returns true if element has value namespace and adds the node to + * property tree; false otherwise. + * + * @param cont content of the element + * @param element element + * @return true if element has value namespace; false otherwise + * @throws SvcLogicException + */ + private boolean isValueNsForLeaf(List cont, Element element) + throws SvcLogicException { + for (Object c : cont) { + if (c instanceof Namespace) { + String value = element.getText(); + if (value != null) { + String[] val = value.split(":"); + String valPrefix = val[0]; + String actVal = val[1]; + if (valPrefix != null && actVal != null && + valPrefix.equals(((Namespace) c).getPrefix())) { + serializerHelper.addNode( + element.getName(), + element.getNamespace().getURI(), + actVal, + ((Namespace) c).getURI(), null); + return true; + } + } + } + } + return false; + } + @Override public void exitXmlElement(Element element) throws SvcLogicException { serializerHelper.exitNode(); diff --git a/restconf-client/provider/src/main/java/org/onap/ccsdk/sli/plugins/yangserializers/dfserializer/DfSerializerUtil.java b/restconf-client/provider/src/main/java/org/onap/ccsdk/sli/plugins/yangserializers/dfserializer/DfSerializerUtil.java index 6acb04a81..598b08c1b 100644 --- a/restconf-client/provider/src/main/java/org/onap/ccsdk/sli/plugins/yangserializers/dfserializer/DfSerializerUtil.java +++ b/restconf-client/provider/src/main/java/org/onap/ccsdk/sli/plugins/yangserializers/dfserializer/DfSerializerUtil.java @@ -26,7 +26,6 @@ import org.onap.ccsdk.sli.plugins.yangserializers.pnserializer.Namespace; import org.onap.ccsdk.sli.plugins.yangserializers.pnserializer.PropertiesNode; import org.opendaylight.yangtools.yang.model.api.Module; import org.opendaylight.yangtools.yang.model.api.SchemaContext; -import org.opendaylight.yangtools.yang.model.api.SchemaNode; import org.opendaylight.yangtools.yang.model.api.TypeDefinition; import org.w3c.dom.Document; import org.xml.sax.InputSource; @@ -46,6 +45,7 @@ import java.io.StringWriter; import java.io.Writer; import java.net.URI; import java.net.URISyntaxException; +import java.util.Iterator; import static javax.xml.transform.OutputKeys.INDENT; import static org.onap.ccsdk.sli.plugins.yangserializers.dfserializer.XmlNodeType.OBJECT_NODE; @@ -150,40 +150,44 @@ public final class DfSerializerUtil { * Returns the resolved namespace object from the input received from the * abstract data format. * - * @param mName module name - * @param curSchema current schema - * @param ctx schema context - * @param mUri module URI - * @param pNode properties node + * @param mName module name + * @param mUri module URI + * @param ctx schema context + * @param parent parent properties node * @return namespace * @throws SvcLogicException when resolving namespace fails */ - static Namespace getResolvedNamespace(String mName, SchemaNode curSchema, - SchemaContext ctx, String mUri, - PropertiesNode pNode) + static Namespace getResolvedNamespace(String mName, String mUri, + SchemaContext ctx, + PropertiesNode parent) throws SvcLogicException { - Module m = null; - URI namespace = curSchema.getQName().getNamespace(); + if (mName == null && mUri == null) { + Namespace parentNs = parent.namespace(); + return new Namespace(parentNs.moduleName(), parentNs.moduleNs(), + parentNs.revision()); + } + Iterator it; + Module mod; if (mName != null) { - m = ctx.findModule(mName).get(); - namespace = m == null ? null : m.getNamespace(); - } - if (mUri != null) { + it = ctx.findModules(mName).iterator(); + } else { + URI modUri = null; try { - m = ctx.findModule(new URI(mUri)).get(); + modUri = new URI(mUri); } catch (URISyntaxException e) { throw new SvcLogicException(URI_ERR, e); } - namespace = m == null ? null : m.getNamespace(); - mName = m.getName(); + it = ctx.findModules(modUri).iterator(); } - if (mName == null && mUri == null) { - return pNode.namespace(); + if (!it.hasNext()) { + return null; } + mod = it.next(); - return new Namespace(mName, namespace, getRevision(m.getRevision())); + return new Namespace(mod.getName(), mod.getQNameModule().getNamespace(), + getRevision(mod.getRevision())); } /** 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 5a898dfc5..6f9f9070a 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 @@ -25,6 +25,9 @@ import org.onap.ccsdk.sli.plugins.yangserializers.pnserializer.Namespace; import org.onap.ccsdk.sli.plugins.yangserializers.pnserializer.NodeType; import org.onap.ccsdk.sli.plugins.yangserializers.pnserializer.PropertiesNode; import org.onap.ccsdk.sli.plugins.yangserializers.pnserializer.RootNode; +import org.opendaylight.yangtools.yang.common.QName; +import org.opendaylight.yangtools.yang.common.Revision; +import org.opendaylight.yangtools.yang.model.api.ChoiceSchemaNode; import org.opendaylight.yangtools.yang.model.api.DataSchemaNode; import org.opendaylight.yangtools.yang.model.api.LeafListSchemaNode; import org.opendaylight.yangtools.yang.model.api.LeafSchemaNode; @@ -49,6 +52,8 @@ import static org.onap.ccsdk.sli.plugins.yangserializers.pnserializer.NodeType.M import static org.onap.ccsdk.sli.plugins.yangserializers.pnserializer.NodeType.MULTI_INSTANCE_NODE; import static org.onap.ccsdk.sli.plugins.yangserializers.pnserializer.NodeType.SINGLE_INSTANCE_LEAF_NODE; import static org.onap.ccsdk.sli.plugins.yangserializers.pnserializer.NodeType.SINGLE_INSTANCE_NODE; +import static org.opendaylight.yangtools.yang.data.impl.schema.SchemaUtils.findDataChildSchemaByQName; +import static org.opendaylight.yangtools.yang.data.impl.schema.SchemaUtils.findSchemaForChild; import static org.opendaylight.yangtools.yang.data.util.ParserStreamUtils.findSchemaNodeByNameAndNamespace; /** @@ -108,14 +113,17 @@ public class MdsalSerializerHelper extends SerializerHelper baseType = resolveBaseTypeFrom(type); if (baseType instanceof IdentityrefTypeDefinition) { if (nodeType == null) { - ns = getResolvedNamespace(null,schemaNode, getSchemaCtx(), - valNs, propNode); + ns = getResolvedNamespace(null, valNs, getSchemaCtx(), + propNode); } else { - ns = getResolvedNamespace(valNs, schemaNode, getSchemaCtx(), - null, propNode); + ns = getResolvedNamespace(valNs, null, getSchemaCtx(), + propNode); } } } @@ -255,14 +268,28 @@ public class MdsalSerializerHelper extends SerializerHelper dataSchema = findSchemaNodeByNameAndNamespace( - (DataSchemaNode) curSchemaNode, name, namespace.moduleNs()); - if (dataSchema != null) { - DataSchemaNode node = dataSchema.pop(); - if (node != null) { - curSchemaNode = node; - return true; + QName qname = QName.create(namespace.moduleNs(), + Revision.of(namespace.revision()), name); + SchemaNode childNode = null; + if (curSchemaNode instanceof DataSchemaNode) { + Deque dataSchema = findSchemaNodeByNameAndNamespace( + (DataSchemaNode) curSchemaNode, name, namespace.moduleNs()); + if (dataSchema != null && !dataSchema.isEmpty()) { + childNode = dataSchema.pop(); + } + + if (!dataSchema.isEmpty()) { + childNode = findSchemaForChild(((ChoiceSchemaNode) childNode), + qname); } + + } else { + childNode = findDataChildSchemaByQName(curSchemaNode, qname); + } + + if (childNode != null) { + curSchemaNode = childNode; + return true; } return false; } diff --git a/restconf-client/provider/src/main/java/org/onap/ccsdk/sli/plugins/yangserializers/dfserializer/PropertiesNodeXmlListener.java b/restconf-client/provider/src/main/java/org/onap/ccsdk/sli/plugins/yangserializers/dfserializer/PropertiesNodeXmlListener.java index cf59b7794..39a08e387 100644 --- a/restconf-client/provider/src/main/java/org/onap/ccsdk/sli/plugins/yangserializers/dfserializer/PropertiesNodeXmlListener.java +++ b/restconf-client/provider/src/main/java/org/onap/ccsdk/sli/plugins/yangserializers/dfserializer/PropertiesNodeXmlListener.java @@ -42,6 +42,8 @@ import static org.onap.ccsdk.sli.plugins.yangserializers.dfserializer.DfSerializ import static org.onap.ccsdk.sli.plugins.yangserializers.dfserializer.DfSerializerUtil.UTF_HEADER; import static org.onap.ccsdk.sli.plugins.yangserializers.dfserializer.DfSerializerUtil.XML_PREFIX; import static org.onap.ccsdk.sli.plugins.yangserializers.dfserializer.DfSerializerUtil.getXmlWriter; +import static org.onap.ccsdk.sli.plugins.yangserializers.pnserializer.NodeType.MULTI_INSTANCE_HOLDER_NODE; +import static org.onap.ccsdk.sli.plugins.yangserializers.pnserializer.NodeType.MULTI_INSTANCE_LEAF_HOLDER_NODE; /** * Representation of XML implementation of properties node listener. @@ -193,7 +195,11 @@ public class PropertiesNodeXmlListener implements PropertiesNodeListener { */ private String getNodeNamespace(PropertiesNode node) { PropertiesNode parent = node.parent(); - if (parent instanceof RootNode || !parent.namespace().moduleName() + if (parent.nodeType() == MULTI_INSTANCE_HOLDER_NODE || + parent.nodeType() == MULTI_INSTANCE_LEAF_HOLDER_NODE) { + parent = parent.parent(); + } + if (parent instanceof RootNode || ! parent.namespace().moduleName() .equals(node.namespace().moduleName())) { return node.namespace().moduleNs().toString(); } diff --git a/restconf-client/provider/src/main/java/org/onap/ccsdk/sli/plugins/yangserializers/pnserializer/DefaultPropertiesNodeListener.java b/restconf-client/provider/src/main/java/org/onap/ccsdk/sli/plugins/yangserializers/pnserializer/DefaultPropertiesNodeListener.java index d91209121..491dcb099 100644 --- a/restconf-client/provider/src/main/java/org/onap/ccsdk/sli/plugins/yangserializers/pnserializer/DefaultPropertiesNodeListener.java +++ b/restconf-client/provider/src/main/java/org/onap/ccsdk/sli/plugins/yangserializers/pnserializer/DefaultPropertiesNodeListener.java @@ -54,7 +54,11 @@ public class DefaultPropertiesNodeListener implements PropertiesNodeListener { */ if (node.nodeType() == SINGLE_INSTANCE_LEAF_NODE || node.nodeType() == MULTI_INSTANCE_LEAF_NODE) { - params.put(node.uri(), ((LeafNode) node).value()); + String val = ((LeafNode) node).value(); + if (((LeafNode) node).valueNs() != null) { + val = ((LeafNode) node).valueNs().moduleName() + ":" + val; + } + params.put(node.uri(), val); } } diff --git a/restconf-client/provider/src/main/java/org/onap/ccsdk/sli/plugins/yangserializers/pnserializer/MdsalPropertiesNodeSerializer.java b/restconf-client/provider/src/main/java/org/onap/ccsdk/sli/plugins/yangserializers/pnserializer/MdsalPropertiesNodeSerializer.java index c24146267..13a5c5a01 100644 --- a/restconf-client/provider/src/main/java/org/onap/ccsdk/sli/plugins/yangserializers/pnserializer/MdsalPropertiesNodeSerializer.java +++ b/restconf-client/provider/src/main/java/org/onap/ccsdk/sli/plugins/yangserializers/pnserializer/MdsalPropertiesNodeSerializer.java @@ -33,6 +33,7 @@ import static org.onap.ccsdk.sli.plugins.yangserializers.pnserializer.MdsalPrope import static org.onap.ccsdk.sli.plugins.yangserializers.pnserializer.MdsalPropertiesNodeUtils.getListName; import static org.onap.ccsdk.sli.plugins.yangserializers.pnserializer.MdsalPropertiesNodeUtils.getNamespace; import static org.onap.ccsdk.sli.plugins.yangserializers.pnserializer.MdsalPropertiesNodeUtils.getNodeType; +import static org.onap.ccsdk.sli.plugins.yangserializers.pnserializer.MdsalPropertiesNodeUtils.getParsedValue; import static org.onap.ccsdk.sli.plugins.yangserializers.pnserializer.MdsalPropertiesNodeUtils.getRevision; import static org.onap.ccsdk.sli.plugins.yangserializers.pnserializer.MdsalPropertiesNodeUtils.getValueNamespace; import static org.onap.ccsdk.sli.plugins.yangserializers.pnserializer.MdsalPropertiesNodeUtils.resolveName; @@ -116,26 +117,32 @@ public class MdsalPropertiesNodeSerializer extends PropertiesNodeSerializer - + + + + + + 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 new file mode 100644 index 000000000..0f46d625b --- /dev/null +++ b/restconf-client/provider/src/test/java/org/onap/ccsdk/sli/plugins/yangserializers/dfserializer/DataFormatSerializerTest.java @@ -0,0 +1,612 @@ +/*- + * ============LICENSE_START======================================================= + * ONAP - CCSDK + * ================================================================================ + * Copyright (C) 2018 Huawei Technologies Co., Ltd. All rights reserved. + * ================================================================================ + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============LICENSE_END========================================================= + */ + +package org.onap.ccsdk.sli.plugins.yangserializers.dfserializer; + +import org.junit.Before; +import org.junit.Test; +import org.mockito.invocation.InvocationOnMock; +import org.mockito.stubbing.Answer; +import org.onap.ccsdk.sli.core.sli.SvcLogicContext; +import org.onap.ccsdk.sli.core.sli.SvcLogicException; +import org.onap.ccsdk.sli.plugins.restapicall.HttpResponse; +import org.onap.ccsdk.sli.plugins.restapicall.RestapiCallNode; +import org.onap.ccsdk.sli.plugins.restconfapicall.RestconfApiCallNode; +import org.opendaylight.restconf.common.context.InstanceIdentifierContext; + +import java.util.HashMap; +import java.util.Map; + +import static org.hamcrest.MatcherAssert.assertThat; +import static org.hamcrest.core.Is.is; +import static org.mockito.Matchers.any; +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.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; +import static org.onap.ccsdk.sli.plugins.yangserializers.dfserializer.DataFormatUtilsTest.ENCODE_TO_JSON_RPC; +import static org.onap.ccsdk.sli.plugins.yangserializers.dfserializer.DataFormatUtilsTest.ENCODE_TO_JSON_YANG; +import static org.onap.ccsdk.sli.plugins.yangserializers.dfserializer.DataFormatUtilsTest.ENCODE_TO_XML_ID; +import static org.onap.ccsdk.sli.plugins.yangserializers.dfserializer.DataFormatUtilsTest.ENCODE_TO_XML_RPC; +import static org.onap.ccsdk.sli.plugins.yangserializers.dfserializer.DataFormatUtilsTest.ENCODE_TO_XML_YANG; + + +/** + * Unit test cases for data format serialization and restconf api call node. + */ +public class DataFormatSerializerTest { + + private Map p; + + private RestconfApiCallNode restconf; + + private RestapiCallNode restApi; + + private DfCaptor dfCaptor; + + /** + * Sets up the pre-requisite for each test case. + * + * @throws SvcLogicException when test case fails + */ + @Before + public void setUp() throws SvcLogicException { + p = new HashMap<>(); + p.put("restapiUser", "user1"); + p.put("restapiPassword", "abc123"); + p.put("responsePrefix", "response"); + p.put("skipSending", "true"); + restApi = new RestapiCallNode(); + restconf = mock(RestconfApiCallNode.class); + dfCaptor = new DfCaptor(); + createMethodMocks(); + } + + /** + * Creates method mocks using mockito for RestconfApiCallNode class. + * + * @throws SvcLogicException when test case fails + */ + private void createMethodMocks() throws SvcLogicException { + doReturn(restApi).when(restconf).getRestapiCallNode(); + doCallRealMethod().when(restconf).sendRequest( + any(Map.class), any(SvcLogicContext.class)); + doCallRealMethod().when(restconf).sendRequest( + any(Map.class), any(SvcLogicContext.class), any(Integer.class)); + doAnswer(dfCaptor).when(restconf).serializeRequest( + any(Map.class), any(YangParameters.class), any(String.class), + any(InstanceIdentifierContext.class)); + } + + /** + * Creates mock using mockito with input data for decoding. + * + * @param decodeData input data + * @throws SvcLogicException when test case fails + */ + private void createMockForDecode(String decodeData) + throws SvcLogicException { + doReturn(decodeData).when(restconf).getResponse( + any(SvcLogicContext.class), any(YangParameters.class), + any(String.class), any(HttpResponse.class)); + doCallRealMethod().when(restconf).serializeResponse( + any(YangParameters.class), any(String.class), any(String.class), + any(InstanceIdentifierContext.class)); + } + + /** + * Verifies encoding of parameters to JSON data format with identity-ref + * and inter-file linking. + * + * @throws SvcLogicException when test case fails + */ + @Test + public void encodeToJsonId() throws SvcLogicException { + String pre = "identity-test:test."; + SvcLogicContext ctx = createAttList(pre); + ctx.setAttribute(pre + "l", "abc"); + p.put("dirPath", "src/test/resources"); + p.put("format", "json"); + p.put("httpMethod", "post"); + p.put("restapiUrl", "http://echo.getpostman" + + ".com/restconf/operations/identity-test:test"); + restconf.sendRequest(p, ctx); + assertThat(dfCaptor.getResult(), is(ENCODE_TO_JSON_ID)); + } + + /** + * Verifies encoding of parameters to XML data format with identity-ref + * and inter-file linking. + * + * @throws SvcLogicException when test case fails + */ + @Test + public void encodeToXmlId() throws SvcLogicException { + String pre = "identity-test:test."; + SvcLogicContext ctx = createAttList(pre); + p.put("dirPath", "src/test/resources"); + p.put("format", "xml"); + p.put("httpMethod", "post"); + p.put("restapiUrl", "http://echo.getpostman" + + ".com/restconf/operations/identity-test:test"); + restconf.sendRequest(p, ctx); + assertThat(dfCaptor.getResult(), is(ENCODE_TO_XML_ID)); + } + + /** + * Verifies decoding of parameters from JSON data format with identity-ref + * and inter-file linking. + * + * @throws SvcLogicException when test case fails + */ + @Test + public void decodeToJsonId() throws SvcLogicException { + createMockForDecode(ENCODE_TO_JSON_ID); + SvcLogicContext ctx = new SvcLogicContext(); + String pre = "identity-test:test."; + p.put("dirPath", "src/test/resources"); + p.put("format", "json"); + p.put("httpMethod", "get"); + p.put("restapiUrl", "http://echo.getpostman" + + ".com/restconf/operations/identity-test:test"); + restconf.sendRequest(p, ctx); + assertThat(ctx.getAttribute(pre + "l"), is("abc")); + verifyAttList(ctx, pre); + } + + /** + * Verifies decoding of parameters from XML data format with identity-ref + * and inter-file linking. + * + * @throws SvcLogicException when test case fails + */ + @Test + public void decodeToXmlId() throws SvcLogicException { + createMockForDecode(ENCODE_TO_XML_ID); + SvcLogicContext ctx = new SvcLogicContext(); + String pre = "identity-test:test."; + p.put("dirPath", "src/test/resources"); + p.put("format", "xml"); + p.put("httpMethod", "get"); + p.put("restapiUrl", "http://echo.getpostman" + + ".com/restconf/operations/identity-test:test"); + restconf.sendRequest(p, ctx); + verifyAttList(ctx, pre); + } + + /** + * Verifies encoding of parameters to JSON data format with containers, + * grouping and augment. + * + * @throws SvcLogicException when test case fails + */ + @Test + public void encodeToJsonYang() throws SvcLogicException { + String pre = "test-yang:cont1.cont2."; + SvcLogicContext ctx = createAttListYang(pre); + p.put("dirPath", "src/test/resources"); + p.put("format", "json"); + p.put("httpMethod", "post"); + p.put("restapiUrl", "http://echo.getpostman" + + ".com/restconf/operations/test-yang:cont1"); + restconf.sendRequest(p, ctx); + assertThat(dfCaptor.getResult(), is(ENCODE_TO_JSON_YANG)); + } + + /** + * Verifies decoding of parameters from JSON data format with containers, + * grouping and augment. + * + * @throws SvcLogicException when test case fails + */ + @Test + public void decodeToJsonYang() throws SvcLogicException { + createMockForDecode(ENCODE_TO_JSON_YANG); + SvcLogicContext ctx = new SvcLogicContext(); + String pre = "test-yang:cont1.cont2."; + p.put("dirPath", "src/test/resources"); + p.put("format", "json"); + p.put("httpMethod", "get"); + p.put("restapiUrl", "http://echo.getpostman" + + ".com/restconf/operations/test-yang:cont1"); + restconf.sendRequest(p, ctx); + verifyAttListYang(ctx, pre); + } + + /** + * Verifies encoding of parameters to XML data format with containers, + * grouping and augment. + * + * @throws SvcLogicException when test case fails + */ + @Test + public void encodeToXmlYang() throws SvcLogicException { + String pre = "test-yang:cont1.cont2."; + SvcLogicContext ctx = createAttListYang(pre); + p.put("dirPath", "src/test/resources"); + p.put("format", "xml"); + p.put("httpMethod", "post"); + p.put("restapiUrl", "http://echo.getpostman" + + ".com/restconf/operations/test-yang:cont1"); + restconf.sendRequest(p, ctx); + assertThat(dfCaptor.getResult(), is(ENCODE_TO_XML_YANG)); + } + + /** + * Verifies decoding of parameters from XML data format with containers, + * grouping and augment. + * + * @throws SvcLogicException when test case fails + */ + @Test + public void decodeToXmlYang() throws SvcLogicException { + createMockForDecode(ENCODE_TO_XML_YANG); + SvcLogicContext ctx = new SvcLogicContext(); + String pre = "test-yang:cont1.cont2."; + p.put("dirPath", "src/test/resources"); + p.put("format", "xml"); + p.put("httpMethod", "get"); + p.put("restapiUrl", "http://echo.getpostman" + + ".com/restconf/operations/test-yang:cont1"); + restconf.sendRequest(p, ctx); + verifyAttListYang(ctx, pre); + } + + /** + * Verifies encoding of and decoding from, JSON respectively for data + * format with containers, grouping and augment. + * + * @throws SvcLogicException when test case fails + */ + @Test + public void codecToJsonRpc() throws SvcLogicException { + createMockForDecode(DECODE_FROM_JSON_RPC); + String inPre = "test-yang:create-sfc.input."; + String outPre = "test-yang:create-sfc.output."; + SvcLogicContext ctx = createAttListRpc(inPre); + p.put("dirPath", "src/test/resources"); + p.put("format", "json"); + p.put("httpMethod", "post"); + p.put("restapiUrl", "http://echo.getpostman" + + ".com/restconf/operations/test-yang:create-sfc"); + restconf.sendRequest(p, ctx); + assertThat(dfCaptor.getResult(), is(ENCODE_TO_JSON_RPC)); + verifyAttListRpc(ctx, outPre); + } + + /** + * Verifies encoding of and decoding from, XML respectively for data + * format with containers, grouping and augment. + * + * @throws SvcLogicException when test case fails + */ + @Test + public void codecToXmlRpc() throws SvcLogicException { + createMockForDecode(DECODE_FROM_XML_RPC); + String inPre = "test-yang:create-sfc.input."; + String outPre = "test-yang:create-sfc.output."; + SvcLogicContext ctx = createAttListRpc(inPre); + p.put("dirPath", "src/test/resources"); + p.put("format", "xml"); + p.put("httpMethod", "post"); + p.put("restapiUrl", "http://echo.getpostman" + + ".com/restconf/operations/test-yang:create-sfc"); + restconf.sendRequest(p, ctx); + assertThat(dfCaptor.getResult(), is(ENCODE_TO_XML_RPC)); + verifyAttListRpc(ctx, outPre); + } + + /** + * Creates attribute list for encoding JSON or XML with identity-ref YANG + * file. + * + * @param pre prefix + * @return service logic context + */ + private SvcLogicContext createAttList(String pre) { + SvcLogicContext ctx = new SvcLogicContext(); + String pre1 = pre + "con1.interfaces."; + ctx.setAttribute(pre + "con1.interface", "identity-types:physical"); + ctx.setAttribute(pre1 + "int-list[0].iden", "optical"); + ctx.setAttribute(pre1 + "int-list[0].available.ll[0]", "Giga"); + ctx.setAttribute(pre1 + "int-list[0].available.ll[1]", + "identity-types:Loopback"); + ctx.setAttribute(pre1 + "int-list[0].available.ll[2]", + "identity-types-second:Ethernet"); + ctx.setAttribute(pre1 + "int-list[0].available.leaf1", "58"); + ctx.setAttribute(pre1 + "int-list[0].available.leaf2", + "identity-types-second:iden2"); + + ctx.setAttribute(pre1 + "int-list[1].iden", "214748364"); + ctx.setAttribute(pre1 + "int-list[1].available.ll[0]", "Giga"); + ctx.setAttribute(pre1 + "int-list[1].available.ll[1]", + "identity-types:Loopback"); + ctx.setAttribute(pre1 + "int-list[1].available.ll[2]", + "identity-types-second:Ethernet"); + ctx.setAttribute(pre1 + "int-list[1].available.leaf1", + "8888"); + ctx.setAttribute(pre1 + "int-list[1].available.leaf2", + "identity-types-second:iden2"); + return ctx; + } + + /** + * Creates attribute list for encoding JSON or XML with container, + * grouping and augmented YANG file. + * + * @param pre prefix + * @return service logic context + */ + private SvcLogicContext createAttListYang(String pre) { + SvcLogicContext ctx = new SvcLogicContext(); + ctx.setAttribute(pre + "cont3.leaf10", "abc"); + ctx.setAttribute(pre + "list1[0].leaf1", "true"); + ctx.setAttribute(pre + "list1[0].leaf2", "abc"); + ctx.setAttribute(pre + "list1[0].leaf3", "abc"); + ctx.setAttribute(pre + "list1[0].ll1[0]", "abc"); + ctx.setAttribute(pre + "list1[0].ll1[1]", "abc"); + ctx.setAttribute(pre + "list1[0].ll2[0]", "abc"); + ctx.setAttribute(pre + "list1[0].ll2[1]", "abc"); + ctx.setAttribute(pre + "list1[0].cont4.leaf11", "abc"); + ctx.setAttribute(pre + "list1[0].list4[0].leaf8", "abc"); + ctx.setAttribute(pre + "list1[0].list4[1].leaf8", "abc"); + ctx.setAttribute(pre + "list1[0].list5[0].leaf9", "abc"); + ctx.setAttribute(pre + "list1[0].list5[1].leaf9", "abc"); + ctx.setAttribute(pre + "list1[1].leaf1", "true"); + ctx.setAttribute(pre + "list1[1].leaf2", "abc"); + ctx.setAttribute(pre + "list1[1].leaf3", "abc"); + ctx.setAttribute(pre + "list1[1].ll1[0]", "abc"); + ctx.setAttribute(pre + "list1[1].ll1[1]", "abc"); + ctx.setAttribute(pre + "list1[1].ll2[0]", "abc"); + ctx.setAttribute(pre + "list1[1].ll2[1]", "abc"); + ctx.setAttribute(pre + "list1[1].cont4.leaf11", "abc"); + ctx.setAttribute(pre + "list1[1].list4[0].leaf8", "abc"); + ctx.setAttribute(pre + "list1[1].list4[1].leaf8", "abc"); + ctx.setAttribute(pre + "list1[1].list5[0].leaf9", "abc"); + ctx.setAttribute(pre + "list1[1].list5[1].leaf9", "abc"); + ctx.setAttribute(pre + "list2[0].leaf4", "abc"); + ctx.setAttribute(pre + "list2[1].leaf4", "abc"); + ctx.setAttribute(pre + "leaf5", "abc"); + ctx.setAttribute(pre + "leaf6", "abc"); + ctx.setAttribute(pre + "ll3[0]", "abc"); + ctx.setAttribute(pre + "ll3[1]", "abc"); + ctx.setAttribute(pre + "ll4[0]", "abc"); + ctx.setAttribute(pre + "ll4[1]", "abc"); + ctx.setAttribute(pre + "cont4.leaf10", "abc"); + ctx.setAttribute(pre + "list6[0].leaf11", "abc"); + ctx.setAttribute(pre + "list6[1].leaf11", "abc"); + ctx.setAttribute(pre + "leaf12", "abc"); + ctx.setAttribute(pre + "ll5[0]", "abc"); + ctx.setAttribute(pre + "ll5[1]", "abc"); + ctx.setAttribute(pre + "cont4.test-augment:cont5.leaf13", "true"); + ctx.setAttribute(pre + "cont4.test-augment:list7[0].leaf14", "test"); + ctx.setAttribute(pre + "cont4.test-augment:list7[1].leaf14", "create"); + ctx.setAttribute(pre + "cont4.test-augment:leaf15", "abc"); + ctx.setAttribute(pre + "cont4.test-augment:ll6[0]", "unbounded"); + ctx.setAttribute(pre + "cont4.test-augment:ll6[1]", "8"); + ctx.setAttribute(pre + "cont4.test-augment:cont13.cont12.leaf26", + "abc"); + ctx.setAttribute(pre + "cont4.test-augment:cont13.list9[0].leaf27", + "abc"); + ctx.setAttribute(pre + "cont4.test-augment:cont13.list9[1].leaf27", + "abc"); + ctx.setAttribute(pre + "cont4.test-augment:cont13.leaf28", "abc"); + ctx.setAttribute(pre + "cont4.test-augment:cont13.ll9[0]", "abc"); + ctx.setAttribute(pre + "cont4.test-augment:cont13.ll9[1]", "abc"); + return ctx; + } + + /** + * Creates attribute list for encoding JSON or XML with RPC YANG file. + * + * @param pre prefix + * @return service logic context + */ + private SvcLogicContext createAttListRpc(String pre) { + SvcLogicContext ctx = new SvcLogicContext(); + ctx.setAttribute(pre + "cont14.leaf28", "abc"); + ctx.setAttribute(pre + "list10[0].leaf29", "abc"); + ctx.setAttribute(pre + "list10[1].leaf29", "abc"); + ctx.setAttribute(pre + "leaf30", "abc"); + ctx.setAttribute(pre + "ll10[0]", "abc"); + ctx.setAttribute(pre + "ll10[1]", "abc"); + ctx.setAttribute(pre + "cont15.leaf31", "abc"); + ctx.setAttribute(pre + "cont13.list9[0].leaf27", "abc"); + ctx.setAttribute(pre + "cont13.list9[1].leaf27", "abc"); + ctx.setAttribute(pre + "cont13.leaf28", "abc"); + ctx.setAttribute(pre + "cont13.ll9[0]", "abc"); + ctx.setAttribute(pre + "cont13.ll9[1]", "abc"); + return ctx; + } + + /** + * Verifies the attribute list for decoding from JSON or XML with + * identity-ref YANG file. + * + * @param ctx service logic context + * @param pre prefix + */ + private void verifyAttList(SvcLogicContext ctx, String pre) { + String pre1 = pre + "con1.interfaces."; + assertThat(ctx.getAttribute(pre + "con1.interface"), is( + "identity-types:physical")); + assertThat(ctx.getAttribute(pre + "con1.interface"), is( + "identity-types:physical")); + assertThat(ctx.getAttribute(pre1 + "int-list[0].iden"), is("optical")); + assertThat(ctx.getAttribute(pre1 + "int-list[0].available.ll[0]"), is( + "Giga")); + assertThat(ctx.getAttribute(pre1 + "int-list[0].available.ll[1]"), is( + "identity-types:Loopback")); + assertThat(ctx.getAttribute(pre1 + "int-list[0].available.ll[2]"), is( + "identity-types-second:Ethernet")); + assertThat(ctx.getAttribute(pre1 + "int-list[0].available.leaf1"), is( + "58")); + assertThat(ctx.getAttribute(pre1 + "int-list[0].available.leaf2"), is( + "identity-types-second:iden2")); + + assertThat(ctx.getAttribute(pre1 + "int-list[1].iden"), is( + "214748364")); + assertThat(ctx.getAttribute(pre1 + "int-list[1].available.ll[0]"), is( + "Giga")); + assertThat(ctx.getAttribute(pre1 + "int-list[1].available.ll[1]"), is( + "identity-types:Loopback")); + assertThat(ctx.getAttribute(pre1 + "int-list[1].available.ll[2]"), is( + "identity-types-second:Ethernet")); + assertThat(ctx.getAttribute(pre1 + "int-list[1].available.leaf1"), is( + "8888")); + assertThat(ctx.getAttribute(pre1 + "int-list[1].available.leaf2"), is( + "identity-types-second:iden2")); + } + + /** + * Verifies the attribute list for decoding from JSON or XML with + * container, grouping and augmented file. + * + * @param ctx service logic context + * @param pre prefix + */ + private void verifyAttListYang(SvcLogicContext ctx, String pre) { + assertThat(ctx.getAttribute(pre + "cont3.leaf10"), is("abc")); + assertThat(ctx.getAttribute(pre + "list1[0].leaf1"), is("true")); + assertThat(ctx.getAttribute(pre + "list1[0].leaf2"), is("abc")); + assertThat(ctx.getAttribute(pre + "list1[0].leaf3"), is("abc")); + assertThat(ctx.getAttribute(pre + "list1[0].ll1[0]"), is("abc")); + assertThat(ctx.getAttribute(pre + "list1[0].ll1[1]"), is("abc")); + assertThat(ctx.getAttribute(pre + "list1[0].ll2[0]"), is("abc")); + assertThat(ctx.getAttribute(pre + "list1[0].ll2[1]"), is("abc")); + assertThat(ctx.getAttribute(pre + "list1[0].cont4.leaf11"), is("abc")); + assertThat(ctx.getAttribute(pre + "list1[0].list4[0].leaf8"), + is("abc")); + assertThat(ctx.getAttribute(pre + "list1[0].list4[1].leaf8"), + is("abc")); + assertThat(ctx.getAttribute(pre + "list1[0].list5[0].leaf9"), + is("abc")); + assertThat(ctx.getAttribute(pre + "list1[0].list5[1].leaf9"), + is("abc")); + assertThat(ctx.getAttribute(pre + "list1[1].leaf1"), is("true")); + assertThat(ctx.getAttribute(pre + "list1[1].leaf2"), is("abc")); + assertThat(ctx.getAttribute(pre + "list1[1].leaf3"), is("abc")); + assertThat(ctx.getAttribute(pre + "list1[1].ll1[0]"), is("abc")); + assertThat(ctx.getAttribute(pre + "list1[1].ll1[1]"), is("abc")); + assertThat(ctx.getAttribute(pre + "list1[1].ll2[0]"), is("abc")); + assertThat(ctx.getAttribute(pre + "list1[1].ll2[1]"), is("abc")); + assertThat(ctx.getAttribute(pre + "list1[1].cont4.leaf11"), is("abc")); + assertThat(ctx.getAttribute(pre + "list1[1].list4[0].leaf8"), + is("abc")); + assertThat(ctx.getAttribute(pre + "list1[1].list4[1].leaf8"), + is("abc")); + assertThat(ctx.getAttribute(pre + "list1[1].list5[0].leaf9"), + is("abc")); + assertThat(ctx.getAttribute(pre + "list1[1].list5[1].leaf9"), + is("abc")); + assertThat(ctx.getAttribute(pre + "list2[0].leaf4"), is("abc")); + assertThat(ctx.getAttribute(pre + "list2[1].leaf4"), is("abc")); + assertThat(ctx.getAttribute(pre + "leaf5"), is("abc")); + assertThat(ctx.getAttribute(pre + "leaf6"), is("abc")); + assertThat(ctx.getAttribute(pre + "ll3[0]"), is("abc")); + assertThat(ctx.getAttribute(pre + "ll3[1]"), is("abc")); + assertThat(ctx.getAttribute(pre + "ll4[0]"), is("abc")); + assertThat(ctx.getAttribute(pre + "ll4[1]"), is("abc")); + assertThat(ctx.getAttribute(pre + "cont4.leaf10"), is( "abc")); + assertThat(ctx.getAttribute(pre + "list6[0].leaf11"), is("abc")); + assertThat(ctx.getAttribute(pre + "list6[1].leaf11"), is("abc")); + assertThat(ctx.getAttribute(pre + "leaf12"), is("abc")); + assertThat(ctx.getAttribute(pre + "ll5[0]"), is("abc")); + assertThat(ctx.getAttribute(pre + "ll5[1]"), is("abc")); + assertThat(ctx.getAttribute(pre + "cont4.test-augment:cont5.leaf13"), + is("true")); + assertThat(ctx.getAttribute(pre + "cont4.test-augment:list7[0].leaf14"), + is("test")); + assertThat(ctx.getAttribute(pre + "cont4.test-augment:list7[1].leaf14"), + is("create")); + assertThat(ctx.getAttribute(pre + "cont4.test-augment:leaf15"), + is("abc")); + assertThat(ctx.getAttribute(pre + "cont4.test-augment:ll6[0]"), + is("unbounded")); + assertThat(ctx.getAttribute(pre + "cont4.test-augment:ll6[1]"), + is("8")); + assertThat(ctx.getAttribute(pre + "cont4.test-augment:cont13" + + ".cont12.leaf26"), is("abc")); + assertThat(ctx.getAttribute(pre + "cont4.test-augment:cont13.list9[0]" + + ".leaf27"), is("abc")); + assertThat(ctx.getAttribute(pre + "cont4.test-augment:cont13.list9[1]" + + ".leaf27"), is("abc")); + assertThat(ctx.getAttribute(pre + "cont4.test-augment:cont13.leaf28"), + is("abc")); + assertThat(ctx.getAttribute(pre + "cont4.test-augment:cont13.ll9[0]"), + is("abc")); + assertThat(ctx.getAttribute(pre + "cont4.test-augment:cont13.ll9[1]"), + is("abc")); + } + + /** + * Verifies the attribute list for decoding from JSON or XML with + * RPC YANG file. + * + * @param ctx service logic context + * @param pre prefix + */ + private void verifyAttListRpc(SvcLogicContext ctx, String pre) { + assertThat(ctx.getAttribute(pre + "cont16.leaf32"), is("abc")); + assertThat(ctx.getAttribute(pre + "list11[0].leaf33"), is("abc")); + assertThat(ctx.getAttribute(pre + "list11[1].leaf33"), is("abc")); + assertThat(ctx.getAttribute(pre + "leaf34"), is("abc")); + assertThat(ctx.getAttribute(pre + "ll11[0]"), is("abc")); + assertThat(ctx.getAttribute(pre + "ll11[1]"), is("abc")); + assertThat(ctx.getAttribute(pre + "cont17.leaf35"), is("abc")); + assertThat(ctx.getAttribute(pre + "cont13.cont12.leaf26"), is("abc")); + assertThat(ctx.getAttribute(pre + "cont13.list9[0].leaf27"), is("abc")); + assertThat(ctx.getAttribute(pre + "cont13.list9[1].leaf27"), is("abc")); + assertThat(ctx.getAttribute(pre + "cont13.ll9[0]"), is("abc")); + assertThat(ctx.getAttribute(pre + "cont13.ll9[1]"), is("abc")); + assertThat(ctx.getAttribute(pre + "cont13.leaf28"), is("abc")); + } + + /** + * Captures the data format messages by mocking it, which can be used in + * testing the value. + * + * @param capturing data format + */ + public class DfCaptor implements Answer { + + private String result; + + /** + * Returns the captured data format message. + * + * @return data format message. + */ + public String getResult() { + return result; + } + + @Override + public String answer(InvocationOnMock invocationOnMock) + throws Throwable { + result = (String) invocationOnMock.callRealMethod(); + return result; + } + } + +} diff --git a/restconf-client/provider/src/test/java/org/onap/ccsdk/sli/plugins/yangserializers/dfserializer/DataFormatUtilsTest.java b/restconf-client/provider/src/test/java/org/onap/ccsdk/sli/plugins/yangserializers/dfserializer/DataFormatUtilsTest.java new file mode 100644 index 000000000..c7efdeb37 --- /dev/null +++ b/restconf-client/provider/src/test/java/org/onap/ccsdk/sli/plugins/yangserializers/dfserializer/DataFormatUtilsTest.java @@ -0,0 +1,504 @@ +/*- + * ============LICENSE_START======================================================= + * ONAP - CCSDK + * ================================================================================ + * Copyright (C) 2018 Huawei Technologies Co., Ltd. All rights reserved. + * ================================================================================ + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============LICENSE_END========================================================= + */ + +package org.onap.ccsdk.sli.plugins.yangserializers.dfserializer; + +/** + * Unit test case utilities for data format serializer and restconf api call + * node. + */ +public final class DataFormatUtilsTest { + + static final String ENCODE_TO_JSON_ID = "{\n" + + " \"identity-test:con1\": {\n" + + " \"interfaces\": {\n" + + " \"int-list\": [\n" + + " {\n" + + " \"iden\": \"optical\",\n" + + " \"available\": {\n" + + " \"ll\": [\n" + + " \"Giga\",\n" + + " \"identity-types:Loopback\",\n" + + " \"identity-types-second:Ethernet" + + "\"\n" + + " ],\n" + + " \"leaf1\": \"58\",\n" + + " \"leaf2\": \"identity-types-second:iden" + + "2\"\n" + + " }\n" + + " },\n" + + " {\n" + + " \"iden\": \"214748364\",\n" + + " \"available\": {\n" + + " \"ll\": [\n" + + " \"Giga\",\n" + + " \"identity-types:Loopback\",\n" + + " \"identity-types-second:Ethernet" + + "\"\n" + + " ],\n" + + " \"leaf1\": \"8888\",\n" + + " \"leaf2\": \"identity-types-second:ide" + + "n2\"\n" + + " }\n" + + " }\n" + + " ]\n" + + " },\n" + + " \"interface\": \"identity-types:physical\"\n" + + " },\n" + + " \"identity-test:l\": \"abc\"\n" + + "}"; + + static final String ENCODE_TO_XML_ID = "\n" + + "\n" + + " \n" + + " \n" + + " optical\n" + + " \n" + + " Giga\n" + + " yangid:Loopback\n" + + " yangid:Ethernet\n" + + " 58\n" + + " yangid:iden2\n" + + " \n" + + " \n" + + " \n" + + " 214748364\n" + + " \n" + + " Giga\n" + + " yangid:Loopback\n" + + " yangid:Ethernet\n" + + " 8888\n" + + " yangid:iden2\n" + + " \n" + + " \n" + + " \n" + + " " + + "yangid:physical\n" + + "\n"; + + static final String ENCODE_TO_JSON_YANG = "{\n" + + " \"test-yang:cont2\": {\n" + + " \"list1\": [\n" + + " {\n" + + " \"ll1\": [\n" + + " \"abc\",\n" + + " \"abc\"\n" + + " ],\n" + + " \"leaf1\": \"true\",\n" + + " \"ll2\": [\n" + + " \"abc\",\n" + + " \"abc\"\n" + + " ],\n" + + " \"list5\": [\n" + + " {\n" + + " \"leaf9\": \"abc\"\n" + + " },\n" + + " {\n" + + " \"leaf9\": \"abc\"\n" + + " }\n" + + " ],\n" + + " \"leaf3\": \"abc\",\n" + + " \"leaf2\": \"abc\",\n" + + " \"list4\": [\n" + + " {\n" + + " \"leaf8\": \"abc\"\n" + + " },\n" + + " {\n" + + " \"leaf8\": \"abc\"\n" + + " }\n" + + " ],\n" + + " \"cont4\": {\n" + + " \"leaf11\": \"abc\"\n" + + " }\n" + + " },\n" + + " {\n" + + " \"ll1\": [\n" + + " \"abc\",\n" + + " \"abc\"\n" + + " ],\n" + + " \"leaf1\": \"true\",\n" + + " \"ll2\": [\n" + + " \"abc\",\n" + + " \"abc\"\n" + + " ],\n" + + " \"leaf3\": \"abc\",\n" + + " \"list5\": [\n" + + " {\n" + + " \"leaf9\": \"abc\"\n" + + " },\n" + + " {\n" + + " \"leaf9\": \"abc\"\n" + + " }\n" + + " ],\n" + + " \"list4\": [\n" + + " {\n" + + " \"leaf8\": \"abc\"\n" + + " },\n" + + " {\n" + + " \"leaf8\": \"abc\"\n" + + " }\n" + + " ],\n" + + " \"leaf2\": \"abc\",\n" + + " \"cont4\": {\n" + + " \"leaf11\": \"abc\"\n" + + " }\n" + + " }\n" + + " ],\n" + + " \"ll3\": [\n" + + " \"abc\",\n" + + " \"abc\"\n" + + " ],\n" + + " \"ll5\": [\n" + + " \"abc\",\n" + + " \"abc\"\n" + + " ],\n" + + " \"cont4\": {\n" + + " \"leaf10\": \"abc\",\n" + + " \"test-augment:cont13\": {\n" + + " \"ll9\": [\n" + + " \"abc\",\n" + + " \"abc\"\n" + + " ],\n" + + " \"list9\": [\n" + + " {\n" + + " \"leaf27\": \"abc\"\n" + + " },\n" + + " {\n" + + " \"leaf27\": \"abc\"\n" + + " }\n" + + " ],\n" + + " \"leaf28\": \"abc\",\n" + + " \"cont12\": {\n" + + " \"leaf26\": \"abc\"\n" + + " }\n" + + " },\n" + + " \"test-augment:list7\": [\n" + + " {\n" + + " \"leaf14\": \"test\"\n" + + " },\n" + + " {\n" + + " \"leaf14\": \"create\"\n" + + " }\n" + + " ],\n" + + " \"test-augment:leaf15\": \"abc\",\n" + + " \"test-augment:ll6\": [\n" + + " \"unbounded\",\n" + + " \"8\"\n" + + " ],\n" + + " \"test-augment:cont5\": {\n" + + " \"leaf13\": \"true\"\n" + + " }\n" + + " },\n" + + " \"ll4\": [\n" + + " \"abc\",\n" + + " \"abc\"\n" + + " ],\n" + + " \"cont3\": {\n" + + " \"leaf10\": \"abc\"\n" + + " },\n" + + " \"leaf5\": \"abc\",\n" + + " \"list2\": [\n" + + " {\n" + + " \"leaf4\": \"abc\"\n" + + " },\n" + + " {\n" + + " \"leaf4\": \"abc\"\n" + + " }\n" + + " ],\n" + + " \"leaf12\": \"abc\",\n" + + " \"leaf6\": \"abc\",\n" + + " \"list6\": [\n" + + " {\n" + + " \"leaf11\": \"abc\"\n" + + " },\n" + + " {\n" + + " \"leaf11\": \"abc\"\n" + + " }\n" + + " ]\n" + + " }\n" + + "}"; + + static final String ENCODE_TO_XML_YANG = "\n" + + "\n" + + " \n" + + " abc\n" + + " abc\n" + + " true\n" + + " abc\n" + + " abc\n" + + " \n" + + " abc\n" + + " \n" + + " \n" + + " abc\n" + + " \n" + + " abc\n" + + " abc\n" + + " \n" + + " abc\n" + + " \n" + + " \n" + + " abc\n" + + " \n" + + " \n" + + " abc\n" + + " \n" + + " \n" + + " \n" + + " abc\n" + + " abc\n" + + " true\n" + + " abc\n" + + " abc\n" + + " abc\n" + + " \n" + + " abc\n" + + " \n" + + " \n" + + " abc\n" + + " \n" + + " \n" + + " abc\n" + + " \n" + + " \n" + + " abc\n" + + " \n" + + " abc\n" + + " \n" + + " abc\n" + + " \n" + + " \n" + + " abc\n" + + " abc\n" + + " abc\n" + + " abc\n" + + " \n" + + " abc\n" + + " \n" + + " abc\n" + + " abc\n" + + " \n" + + " abc\n" + + " \n" + + " \n" + + " abc\n" + + " \n" + + " abc\n" + + " \n" + + " abc\n" + + " \n" + + " \n" + + " \n" + + " test\n" + + " \n" + + " \n" + + " create\n" + + " \n" + + " abc\n" + + " unbounded\n" + + " 8\n" + + " \n" + + " true\n" + + " \n" + + " \n" + + " abc\n" + + " abc\n" + + " \n" + + " abc\n" + + " \n" + + " abc\n" + + " \n" + + " abc\n" + + " \n" + + " \n" + + " abc\n" + + " \n" + + " abc\n" + + " abc\n" + + " \n" + + " abc\n" + + " \n" + + " \n" + + " abc\n" + + " \n" + + "\n"; + + + static final String ENCODE_TO_JSON_RPC = "{\n" + + " \"test-yang:input\": {\n" + + " \"leaf30\": \"abc\",\n" + + " \"list10\": [\n" + + " {\n" + + " \"leaf29\": \"abc\"\n" + + " },\n" + + " {\n" + + " \"leaf29\": \"abc\"\n" + + " }\n" + + " ],\n" + + " \"cont15\": {\n" + + " \"leaf31\": \"abc\"\n" + + " },\n" + + " \"cont14\": {\n" + + " \"leaf28\": \"abc\"\n" + + " },\n" + + " \"cont13\": {\n" + + " \"list9\": [\n" + + " {\n" + + " \"leaf27\": \"abc\"\n" + + " },\n" + + " {\n" + + " \"leaf27\": \"abc\"\n" + + " }\n" + + " ],\n" + + " \"ll9\": [\n" + + " \"abc\",\n" + + " \"abc\"\n" + + " ],\n" + + " \"leaf28\": \"abc\"\n" + + " },\n" + + " \"ll10\": [\n" + + " \"abc\",\n" + + " \"abc\"\n" + + " ]\n" + + " }\n" + + "}"; + + static final String DECODE_FROM_JSON_RPC = "{\n" + + " \"test-yang:output\": {\n" + + " \"cont16\": {\n" + + " \"leaf32\": \"abc\"\n" + + " },\n" + + " \"list11\": [\n" + + " {\n" + + " \"leaf33\": \"abc\"\n" + + " },\n" + + " {\n" + + " \"leaf33\": \"abc\"\n" + + " }\n" + + " ],\n" + + " \"leaf34\": \"abc\",\n" + + " \"ll11\": [\n" + + " \"abc\",\n" + + " \"abc\"\n" + + " ],\n" + + " \"cont17\": {\n" + + " \"leaf35\": \"abc\"\n" + + " },\n" + + " \"cont13\": {\n" + + " \"cont12\": {\n" + + " \"leaf26\": \"abc\"\n" + + " },\n" + + " \"list9\": [\n" + + " {\n" + + " \"leaf27\": \"abc\"\n" + + " },\n" + + " {\n" + + " \"leaf27\": \"abc\"\n" + + " }\n" + + " ],\n" + + " \"ll9\": [\n" + + " \"abc\",\n" + + " \"abc\"\n" + + " ],\n" + + " \"leaf28\": \"abc\"\n" + + " }\n" + + " }\n" + + "}"; + + static final String ENCODE_TO_XML_RPC = "\n" + + "\n" + + " abc\n" + + " \n" + + " abc\n" + + " \n" + + " \n" + + " abc\n" + + " \n" + + " \n" + + " abc\n" + + " \n" + + " \n" + + " abc\n" + + " \n" + + " \n" + + " \n" + + " abc\n" + + " \n" + + " \n" + + " abc\n" + + " \n" + + " abc\n" + + " abc\n" + + " abc\n" + + " \n" + + " abc\n" + + " abc\n" + + "\n"; + + static final String DECODE_FROM_XML_RPC = "\n" + + "\n" + + " \n" + + " abc\n" + + " \n" + + " \n" + + " abc\n" + + " \n" + + " \n" + + " abc\n" + + " \n" + + " abc\n" + + " abc\n" + + " abc\n" + + " \n" + + " abc\n" + + " \n" + + " \n" + + " \n" + + " abc\n" + + " \n" + + " \n" + + " abc\n" + + " \n" + + " \n" + + " abc\n" + + " \n" + + " abc\n" + + " abc\n" + + " abc\n" + + " \n" + + ""; +} diff --git a/restconf-client/provider/src/test/resources/yang/identity-test.yang b/restconf-client/provider/src/test/resources/yang/identity-test.yang index 81d3f0a0b..12ef717f6 100644 --- a/restconf-client/provider/src/test/resources/yang/identity-test.yang +++ b/restconf-client/provider/src/test/resources/yang/identity-test.yang @@ -58,16 +58,16 @@ module identity-test { type available; } leaf leaf1 { - type leafref { - path "../../iden"; - } + type leafref { + path "../../iden"; + } } leaf leaf2 { - type identityref { + type identityref { base type:int-type; base sec:iden1; - } + } } } } diff --git a/restconf-client/provider/src/test/resources/yang/identity-types-second.yang b/restconf-client/provider/src/test/resources/yang/identity-types-second.yang index ad752de31..98d6a6e60 100644 --- a/restconf-client/provider/src/test/resources/yang/identity-types-second.yang +++ b/restconf-client/provider/src/test/resources/yang/identity-types-second.yang @@ -1,4 +1,4 @@ -module identity-types-second{ +module identity-types-second { yang-version 1; namespace "identity:list:second:ns:test:json:ser"; prefix "sec"; diff --git a/restconf-client/provider/src/test/resources/yang/test-augment.yang b/restconf-client/provider/src/test/resources/yang/test-augment.yang index bac19171b..795000d39 100644 --- a/restconf-client/provider/src/test/resources/yang/test-augment.yang +++ b/restconf-client/provider/src/test/resources/yang/test-augment.yang @@ -14,19 +14,24 @@ module test-augment { augment "/t:cont1/t:cont2/t:cont4" { container cont5 { leaf leaf13 { - type string; + type empty; } } list list7 { - leaf leaf14 { - type string; - } + leaf leaf14 { + type instance-identifier; + } } leaf leaf15 { type string; } leaf-list ll6 { - type string; + type union { + type int32; + type enumeration { + enum "unbounded"; + } + } } uses "t:g1"; } @@ -34,16 +39,22 @@ module test-augment { uses "t:g1"; augment "/t:ch1/t:c1/t:cont8/t:cont6" { choice ch2 { - case c3 { - leaf leaf21 { - type string; - } - } - case c4 { - leaf leaf22 { - type string; - } - } + case c3 { + leaf leaf21 { + type string; + } + } + case c4 { + leaf leaf22 { + type enumeration { + enum zero; + enum one; + enum seven { + value 7; + } + } + } + } } } @@ -72,14 +83,24 @@ module test-augment { } augment "/t:create-sfc/t:input" { - leaf leaf36 { - type string; - } + leaf leaf36 { + type bits { + bit angle { + position 0; + } + bit degree { + position 1; + } + bit movement { + position 2; + } + } + } } augment "/t:create-sfc/t:output" { leaf leaf37 { - type string; + type boolean; } } } \ No newline at end of file diff --git a/restconf-client/provider/src/test/resources/yang/test-yang.yang b/restconf-client/provider/src/test/resources/yang/test-yang.yang index e99d87bf8..b2bf06003 100644 --- a/restconf-client/provider/src/test/resources/yang/test-yang.yang +++ b/restconf-client/provider/src/test/resources/yang/test-yang.yang @@ -17,7 +17,7 @@ module test-yang { list list1 { key "leaf1 leaf2"; leaf leaf1 { - type string; + type empty; } leaf leaf2 { type string; @@ -87,66 +87,66 @@ module test-yang { } choice ch1 { - case c1 { - container cont8 { - container cont6 { - leaf leaf16 { - type string; - } - } - list list8 { - leaf leaf18 { - type string; - } - } - leaf leaf19 { - type string; - } - leaf-list ll7 { - type string; - } - } - } - case c2 { - container cont9 { - leaf leaf20 { - type string; - } - leaf-list ll8 { - type string; - } - container cont11 { - choice ch3 { - case c1 { - leaf leaf25 { + case c1 { + container cont8 { + container cont6 { + leaf leaf16 { type string; - } - uses g1; - } - } - } - } - } + } + } + list list8 { + leaf leaf18 { + type string; + } + } + leaf leaf19 { + type string; + } + leaf-list ll7 { + type string; + } + } + } + case c2 { + container cont9 { + leaf leaf20 { + type string; + } + leaf-list ll8 { + type string; + } + container cont11 { + choice ch3 { + case c1 { + leaf leaf25 { + type string; + } + uses g1; + } + } + } + } + } } grouping g1 { - container cont13 { - container cont12 { - leaf leaf26 { - type string; - } - } - list list9 { - leaf leaf27 { - type string; - } - } - leaf leaf28 { - type string; - } - leaf-list ll9 { - type string; - } + container cont13 { + container cont12 { + leaf leaf26 { + type string; + } + } + list list9 { + leaf leaf27 { + type string; + } + } + leaf leaf28 { + type string; + } + leaf-list ll9 { + type string; + } } } -- cgit 1.2.3-korg From 2092b7c383f1a3280da05b71517fae6521b73327 Mon Sep 17 00:00:00 2001 From: janani b Date: Wed, 19 Sep 2018 21:10:17 +0530 Subject: Issue fix for RestconfApiCallNode Sonar and Issue fix Issue-ID: CCSDK-325 Change-Id: I469fcc5c4da2ec26c3a39b48d52736d45c1718d4 Signed-off-by: janani b --- .../restconfapicall/RestconfApiCallNode.java | 18 ++++---- .../plugins/restconfapicall/RestconfApiUtils.java | 29 ++++++++++--- .../dfserializer/MdsalSerializerHelper.java | 3 +- .../dfserializer/DataFormatSerializerTest.java | 49 ++++++++++++++++++++++ 4 files changed, 83 insertions(+), 16 deletions(-) (limited to 'restconf-client/provider') 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); @@ -158,6 +154,27 @@ public final class RestconfApiUtils { return path; } + /** + * 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. * 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 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; @@ -316,6 +320,51 @@ public class DataFormatSerializerTest { verifyAttListRpc(ctx, outPre); } + /** + * 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. -- cgit 1.2.3-korg From 00182e7710a239e871c33a42cf9eaf9a12d90ecb Mon Sep 17 00:00:00 2001 From: "Timoney, Dan (dt5972)" Date: Wed, 26 Sep 2018 10:44:42 -0400 Subject: Prepare for release build Update for release build : (a) Remove -STAGING tag from release version in version.properties (b) Update to use released version of parent poms (c) Disable single-feature-test (which does not work with released dependencies from ONAP) Change-Id: I97ecca353e8e2b4e96699980c90fda9047d22791 Issue-ID: CCSDK-597 Signed-off-by: Timoney, Dan (dt5972) --- features/ccsdk-sli-plugins-all/pom.xml | 7 ++++++- features/features-sli-plugins/pom.xml | 2 +- features/installer/pom.xml | 2 +- features/pom.xml | 2 +- pom.xml | 2 +- properties-node/features/ccsdk-properties-node/pom.xml | 7 ++++++- properties-node/features/features-properties-node/pom.xml | 2 +- properties-node/features/pom.xml | 2 +- properties-node/installer/pom.xml | 2 +- properties-node/pom.xml | 2 +- properties-node/provider/pom.xml | 2 +- restapi-call-node/features/ccsdk-restapi-call-node/pom.xml | 7 ++++++- restapi-call-node/features/features-restapi-call-node/pom.xml | 2 +- restapi-call-node/features/pom.xml | 2 +- restapi-call-node/installer/pom.xml | 2 +- restapi-call-node/pom.xml | 2 +- restapi-call-node/provider/pom.xml | 2 +- restconf-client/features/ccsdk-restconf-client/pom.xml | 7 ++++++- restconf-client/features/features-restconf-client/pom.xml | 2 +- restconf-client/features/pom.xml | 2 +- restconf-client/installer/pom.xml | 2 +- restconf-client/pom.xml | 2 +- restconf-client/provider/pom.xml | 2 +- sshapi-call-node/features/ccsdk-sshapi-call-node/pom.xml | 7 ++++++- sshapi-call-node/features/features-sshapi-call-node/pom.xml | 2 +- sshapi-call-node/features/pom.xml | 2 +- sshapi-call-node/installer/pom.xml | 2 +- sshapi-call-node/pom.xml | 2 +- sshapi-call-node/provider/pom.xml | 2 +- template-node/features/ccsdk-template-node/pom.xml | 2 +- template-node/features/features-template-node/pom.xml | 2 +- template-node/features/pom.xml | 2 +- template-node/installer/pom.xml | 2 +- template-node/pom.xml | 2 +- template-node/provider/pom.xml | 2 +- version.properties | 2 +- 36 files changed, 61 insertions(+), 36 deletions(-) (limited to 'restconf-client/provider') diff --git a/features/ccsdk-sli-plugins-all/pom.xml b/features/ccsdk-sli-plugins-all/pom.xml index 051f3a463..b053dcb5b 100644 --- a/features/ccsdk-sli-plugins-all/pom.xml +++ b/features/ccsdk-sli-plugins-all/pom.xml @@ -7,7 +7,7 @@ org.onap.ccsdk.parent single-feature-parent - 1.1.0-SNAPSHOT + 1.1.0 @@ -17,6 +17,11 @@ feature ccsdk-sli-plugins :: features :: ${project.artifactId} + + + true + + diff --git a/features/features-sli-plugins/pom.xml b/features/features-sli-plugins/pom.xml index 0b43d1a0d..c1758f8c4 100644 --- a/features/features-sli-plugins/pom.xml +++ b/features/features-sli-plugins/pom.xml @@ -5,7 +5,7 @@ org.onap.ccsdk.parent feature-repo-parent - 1.1.0-SNAPSHOT + 1.1.0 diff --git a/features/installer/pom.xml b/features/installer/pom.xml index 050d3e9d5..c81c6a275 100755 --- a/features/installer/pom.xml +++ b/features/installer/pom.xml @@ -6,7 +6,7 @@ org.onap.ccsdk.parent odlparent-lite - 1.1.0-SNAPSHOT + 1.1.0 diff --git a/features/pom.xml b/features/pom.xml index 3ac87bf6b..d342ee8a8 100755 --- a/features/pom.xml +++ b/features/pom.xml @@ -5,7 +5,7 @@ org.onap.ccsdk.parent odlparent-lite - 1.1.0-SNAPSHOT + 1.1.0 diff --git a/pom.xml b/pom.xml index a41f2311c..376433d52 100755 --- a/pom.xml +++ b/pom.xml @@ -5,7 +5,7 @@ org.onap.ccsdk.parent odlparent-lite - 1.1.0-SNAPSHOT + 1.1.0 org.onap.ccsdk.sli.plugins diff --git a/properties-node/features/ccsdk-properties-node/pom.xml b/properties-node/features/ccsdk-properties-node/pom.xml index fd38cb224..b2dc224a8 100644 --- a/properties-node/features/ccsdk-properties-node/pom.xml +++ b/properties-node/features/ccsdk-properties-node/pom.xml @@ -5,7 +5,7 @@ org.onap.ccsdk.parent single-feature-parent - 1.1.0-SNAPSHOT + 1.1.0 @@ -17,6 +17,11 @@ ccsdk-sli-plugins :: properties-node :: ${project.artifactId} + + true + + + diff --git a/properties-node/features/features-properties-node/pom.xml b/properties-node/features/features-properties-node/pom.xml index e8f168e2b..1d0535d43 100644 --- a/properties-node/features/features-properties-node/pom.xml +++ b/properties-node/features/features-properties-node/pom.xml @@ -5,7 +5,7 @@ org.onap.ccsdk.parent feature-repo-parent - 1.1.0-SNAPSHOT + 1.1.0 diff --git a/properties-node/features/pom.xml b/properties-node/features/pom.xml index dd0e824f0..9cccc4991 100755 --- a/properties-node/features/pom.xml +++ b/properties-node/features/pom.xml @@ -5,7 +5,7 @@ org.onap.ccsdk.parent odlparent-lite - 1.1.0-SNAPSHOT + 1.1.0 org.onap.ccsdk.sli.plugins diff --git a/properties-node/installer/pom.xml b/properties-node/installer/pom.xml index 965bdbb77..bff0978ce 100755 --- a/properties-node/installer/pom.xml +++ b/properties-node/installer/pom.xml @@ -5,7 +5,7 @@ org.onap.ccsdk.parent odlparent-lite - 1.1.0-SNAPSHOT + 1.1.0 org.onap.ccsdk.sli.plugins diff --git a/properties-node/pom.xml b/properties-node/pom.xml index eb7dcbb51..73098287b 100755 --- a/properties-node/pom.xml +++ b/properties-node/pom.xml @@ -5,7 +5,7 @@ org.onap.ccsdk.parent odlparent-lite - 1.1.0-SNAPSHOT + 1.1.0 org.onap.ccsdk.sli.plugins diff --git a/properties-node/provider/pom.xml b/properties-node/provider/pom.xml index a9a3c94d5..ad9a8fe6c 100755 --- a/properties-node/provider/pom.xml +++ b/properties-node/provider/pom.xml @@ -5,7 +5,7 @@ org.onap.ccsdk.parent binding-parent - 1.1.0-SNAPSHOT + 1.1.0 org.onap.ccsdk.sli.plugins 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..a73a14286 100644 --- a/restapi-call-node/features/ccsdk-restapi-call-node/pom.xml +++ b/restapi-call-node/features/ccsdk-restapi-call-node/pom.xml @@ -7,7 +7,7 @@ org.onap.ccsdk.parent single-feature-parent - 1.1.0-SNAPSHOT + 1.1.0 @@ -18,6 +18,11 @@ ccsdk-sli-plugins :: restapi-call-node :: ${project.artifactId} + + + true + + 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..507b86628 100644 --- a/restapi-call-node/features/features-restapi-call-node/pom.xml +++ b/restapi-call-node/features/features-restapi-call-node/pom.xml @@ -5,7 +5,7 @@ org.onap.ccsdk.parent feature-repo-parent - 1.1.0-SNAPSHOT + 1.1.0 diff --git a/restapi-call-node/features/pom.xml b/restapi-call-node/features/pom.xml index 14e9ae022..fb23ebda1 100755 --- a/restapi-call-node/features/pom.xml +++ b/restapi-call-node/features/pom.xml @@ -5,7 +5,7 @@ org.onap.ccsdk.parent odlparent-lite - 1.1.0-SNAPSHOT + 1.1.0 org.onap.ccsdk.sli.plugins diff --git a/restapi-call-node/installer/pom.xml b/restapi-call-node/installer/pom.xml index 8e2f402eb..24c5f44ec 100755 --- a/restapi-call-node/installer/pom.xml +++ b/restapi-call-node/installer/pom.xml @@ -5,7 +5,7 @@ org.onap.ccsdk.parent odlparent-lite - 1.1.0-SNAPSHOT + 1.1.0 org.onap.ccsdk.sli.plugins diff --git a/restapi-call-node/pom.xml b/restapi-call-node/pom.xml index 641bcc863..3333dc546 100755 --- a/restapi-call-node/pom.xml +++ b/restapi-call-node/pom.xml @@ -5,7 +5,7 @@ org.onap.ccsdk.parent odlparent-lite - 1.1.0-SNAPSHOT + 1.1.0 org.onap.ccsdk.sli.plugins diff --git a/restapi-call-node/provider/pom.xml b/restapi-call-node/provider/pom.xml index 6670cfd8c..844a6b5e7 100755 --- a/restapi-call-node/provider/pom.xml +++ b/restapi-call-node/provider/pom.xml @@ -5,7 +5,7 @@ org.onap.ccsdk.parent binding-parent - 1.1.0-SNAPSHOT + 1.1.0 org.onap.ccsdk.sli.plugins diff --git a/restconf-client/features/ccsdk-restconf-client/pom.xml b/restconf-client/features/ccsdk-restconf-client/pom.xml index 1877f19d8..64b8216b4 100644 --- a/restconf-client/features/ccsdk-restconf-client/pom.xml +++ b/restconf-client/features/ccsdk-restconf-client/pom.xml @@ -7,7 +7,7 @@ org.onap.ccsdk.parent single-feature-parent - 1.1.0-SNAPSHOT + 1.1.0 @@ -18,6 +18,11 @@ ccsdk-sli-plugins :: restconf-client :: ${project.artifactId} + + + true + + diff --git a/restconf-client/features/features-restconf-client/pom.xml b/restconf-client/features/features-restconf-client/pom.xml index 8ee5e7e21..13be4bb5d 100644 --- a/restconf-client/features/features-restconf-client/pom.xml +++ b/restconf-client/features/features-restconf-client/pom.xml @@ -5,7 +5,7 @@ org.onap.ccsdk.parent feature-repo-parent - 1.1.0-SNAPSHOT + 1.1.0 diff --git a/restconf-client/features/pom.xml b/restconf-client/features/pom.xml index c94be00be..cd58d20e1 100755 --- a/restconf-client/features/pom.xml +++ b/restconf-client/features/pom.xml @@ -5,7 +5,7 @@ org.onap.ccsdk.parent odlparent-lite - 1.1.0-SNAPSHOT + 1.1.0 org.onap.ccsdk.sli.plugins diff --git a/restconf-client/installer/pom.xml b/restconf-client/installer/pom.xml index b28cefde9..c71d5dad5 100755 --- a/restconf-client/installer/pom.xml +++ b/restconf-client/installer/pom.xml @@ -6,7 +6,7 @@ org.onap.ccsdk.parent odlparent-lite - 1.1.0-SNAPSHOT + 1.1.0 org.onap.ccsdk.sli.plugins diff --git a/restconf-client/pom.xml b/restconf-client/pom.xml index fecbd2b93..af55f8037 100755 --- a/restconf-client/pom.xml +++ b/restconf-client/pom.xml @@ -5,7 +5,7 @@ org.onap.ccsdk.parent odlparent-lite - 1.1.0-SNAPSHOT + 1.1.0 org.onap.ccsdk.sli.plugins diff --git a/restconf-client/provider/pom.xml b/restconf-client/provider/pom.xml index db0bee061..35944f4f4 100755 --- a/restconf-client/provider/pom.xml +++ b/restconf-client/provider/pom.xml @@ -6,7 +6,7 @@ org.onap.ccsdk.parent binding-parent - 1.1.0-SNAPSHOT + 1.1.0 org.onap.ccsdk.sli.plugins 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..fd0dacaed 100644 --- a/sshapi-call-node/features/ccsdk-sshapi-call-node/pom.xml +++ b/sshapi-call-node/features/ccsdk-sshapi-call-node/pom.xml @@ -7,7 +7,7 @@ org.onap.ccsdk.parent single-feature-parent - 1.1.0-SNAPSHOT + 1.1.0 @@ -18,6 +18,11 @@ ccsdk-sli-plugins :: sshapi-call-node :: ${project.artifactId} + + true + + + 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..7435e602a 100644 --- a/sshapi-call-node/features/features-sshapi-call-node/pom.xml +++ b/sshapi-call-node/features/features-sshapi-call-node/pom.xml @@ -7,7 +7,7 @@ org.onap.ccsdk.parent feature-repo-parent - 1.1.0-SNAPSHOT + 1.1.0 diff --git a/sshapi-call-node/features/pom.xml b/sshapi-call-node/features/pom.xml index 49b96e3fd..5ff6cceb5 100755 --- a/sshapi-call-node/features/pom.xml +++ b/sshapi-call-node/features/pom.xml @@ -7,7 +7,7 @@ org.onap.ccsdk.parent odlparent-lite - 1.1.0-SNAPSHOT + 1.1.0 org.onap.ccsdk.sli.plugins diff --git a/sshapi-call-node/installer/pom.xml b/sshapi-call-node/installer/pom.xml index 51bed972f..d33ecb58a 100755 --- a/sshapi-call-node/installer/pom.xml +++ b/sshapi-call-node/installer/pom.xml @@ -5,7 +5,7 @@ org.onap.ccsdk.parent odlparent-lite - 1.1.0-SNAPSHOT + 1.1.0 org.onap.ccsdk.sli.plugins diff --git a/sshapi-call-node/pom.xml b/sshapi-call-node/pom.xml index 91b52e123..b2aa2b9c4 100755 --- a/sshapi-call-node/pom.xml +++ b/sshapi-call-node/pom.xml @@ -5,7 +5,7 @@ org.onap.ccsdk.parent odlparent-lite - 1.1.0-SNAPSHOT + 1.1.0 org.onap.ccsdk.sli.plugins diff --git a/sshapi-call-node/provider/pom.xml b/sshapi-call-node/provider/pom.xml index d37972efc..0cb0294c2 100755 --- a/sshapi-call-node/provider/pom.xml +++ b/sshapi-call-node/provider/pom.xml @@ -5,7 +5,7 @@ org.onap.ccsdk.parent binding-parent - 1.1.0-SNAPSHOT + 1.1.0 org.onap.ccsdk.sli.plugins diff --git a/template-node/features/ccsdk-template-node/pom.xml b/template-node/features/ccsdk-template-node/pom.xml index fd3a92457..166b74674 100644 --- a/template-node/features/ccsdk-template-node/pom.xml +++ b/template-node/features/ccsdk-template-node/pom.xml @@ -5,7 +5,7 @@ org.onap.ccsdk.parent single-feature-parent - 1.1.0-SNAPSHOT + 1.1.0 diff --git a/template-node/features/features-template-node/pom.xml b/template-node/features/features-template-node/pom.xml index c352ba514..ef58da04c 100644 --- a/template-node/features/features-template-node/pom.xml +++ b/template-node/features/features-template-node/pom.xml @@ -5,7 +5,7 @@ org.onap.ccsdk.parent feature-repo-parent - 1.1.0-SNAPSHOT + 1.1.0 diff --git a/template-node/features/pom.xml b/template-node/features/pom.xml index 1abcdbe3e..25e6cb904 100644 --- a/template-node/features/pom.xml +++ b/template-node/features/pom.xml @@ -5,7 +5,7 @@ org.onap.ccsdk.parent odlparent-lite - 1.1.0-SNAPSHOT + 1.1.0 org.onap.ccsdk.sli.plugins diff --git a/template-node/installer/pom.xml b/template-node/installer/pom.xml index 1e4d24cd3..c21ffcf9f 100644 --- a/template-node/installer/pom.xml +++ b/template-node/installer/pom.xml @@ -5,7 +5,7 @@ org.onap.ccsdk.parent odlparent-lite - 1.1.0-SNAPSHOT + 1.1.0 org.onap.ccsdk.sli.plugins diff --git a/template-node/pom.xml b/template-node/pom.xml index 21ab127f3..e1f08b4a4 100644 --- a/template-node/pom.xml +++ b/template-node/pom.xml @@ -5,7 +5,7 @@ org.onap.ccsdk.parent odlparent-lite - 1.1.0-SNAPSHOT + 1.1.0 org.onap.ccsdk.sli.plugins diff --git a/template-node/provider/pom.xml b/template-node/provider/pom.xml index 936f76f37..28beb9dc8 100644 --- a/template-node/provider/pom.xml +++ b/template-node/provider/pom.xml @@ -5,7 +5,7 @@ org.onap.ccsdk.parent binding-parent - 1.1.0-SNAPSHOT + 1.1.0 org.onap.ccsdk.sli.plugins diff --git a/version.properties b/version.properties index 53760c8c7..ba4200853 100644 --- a/version.properties +++ b/version.properties @@ -11,6 +11,6 @@ feature_revision=0 base_version=${release_name}.${sprint_number}.${feature_revision} -release_version=${base_version}-STAGING +release_version=${base_version} snapshot_version=${base_version}-SNAPSHOT -- cgit 1.2.3-korg From 85737499b931441be3013831d7ce76a5c4734032 Mon Sep 17 00:00:00 2001 From: "Timoney, Dan (dt5972)" Date: Wed, 26 Sep 2018 15:33:59 -0400 Subject: Roll to next snapshot Roll to next snapshot release Change-Id: I179602134b518295b4b6a1d53cea8136ad0ba666 Issue-ID: CCSDK-597 Signed-off-by: Timoney, Dan (dt5972) --- features/ccsdk-sli-plugins-all/pom.xml | 7 ++----- features/features-sli-plugins/pom.xml | 4 ++-- features/installer/pom.xml | 4 ++-- features/pom.xml | 4 ++-- pom.xml | 4 ++-- properties-node/features/ccsdk-properties-node/pom.xml | 7 ++----- properties-node/features/features-properties-node/pom.xml | 4 ++-- properties-node/features/pom.xml | 4 ++-- properties-node/installer/pom.xml | 4 ++-- properties-node/pom.xml | 4 ++-- properties-node/provider/pom.xml | 4 ++-- restapi-call-node/features/ccsdk-restapi-call-node/pom.xml | 7 ++----- restapi-call-node/features/features-restapi-call-node/pom.xml | 4 ++-- restapi-call-node/features/pom.xml | 4 ++-- restapi-call-node/installer/pom.xml | 4 ++-- restapi-call-node/pom.xml | 4 ++-- restapi-call-node/provider/pom.xml | 4 ++-- restconf-client/features/ccsdk-restconf-client/pom.xml | 7 ++----- restconf-client/features/features-restconf-client/pom.xml | 4 ++-- restconf-client/features/pom.xml | 4 ++-- restconf-client/installer/pom.xml | 4 ++-- restconf-client/pom.xml | 4 ++-- restconf-client/provider/pom.xml | 8 ++++---- sshapi-call-node/features/ccsdk-sshapi-call-node/pom.xml | 7 ++----- sshapi-call-node/features/features-sshapi-call-node/pom.xml | 4 ++-- sshapi-call-node/features/pom.xml | 4 ++-- sshapi-call-node/installer/pom.xml | 4 ++-- sshapi-call-node/pom.xml | 4 ++-- sshapi-call-node/provider/pom.xml | 4 ++-- template-node/features/ccsdk-template-node/pom.xml | 7 ++----- template-node/features/features-template-node/pom.xml | 4 ++-- template-node/features/pom.xml | 4 ++-- template-node/installer/pom.xml | 4 ++-- template-node/pom.xml | 4 ++-- template-node/provider/pom.xml | 4 ++-- version.properties | 4 ++-- 36 files changed, 74 insertions(+), 92 deletions(-) (limited to 'restconf-client/provider') diff --git a/features/ccsdk-sli-plugins-all/pom.xml b/features/ccsdk-sli-plugins-all/pom.xml index b053dcb5b..d4715be62 100644 --- a/features/ccsdk-sli-plugins-all/pom.xml +++ b/features/ccsdk-sli-plugins-all/pom.xml @@ -7,20 +7,17 @@ org.onap.ccsdk.parent single-feature-parent - 1.1.0 + 1.1.1-SNAPSHOT org.onap.ccsdk.sli.plugins ccsdk-sli-plugins-all - 0.3.0-SNAPSHOT + 0.3.1-SNAPSHOT feature ccsdk-sli-plugins :: features :: ${project.artifactId} - - true - diff --git a/features/features-sli-plugins/pom.xml b/features/features-sli-plugins/pom.xml index c1758f8c4..b3333b600 100644 --- a/features/features-sli-plugins/pom.xml +++ b/features/features-sli-plugins/pom.xml @@ -5,13 +5,13 @@ org.onap.ccsdk.parent feature-repo-parent - 1.1.0 + 1.1.1-SNAPSHOT org.onap.ccsdk.sli.plugins features-sli-plugins - 0.3.0-SNAPSHOT + 0.3.1-SNAPSHOT feature ccsdk-sli-plugins :: features :: ${project.artifactId} diff --git a/features/installer/pom.xml b/features/installer/pom.xml index c81c6a275..c2b77d0fd 100755 --- a/features/installer/pom.xml +++ b/features/installer/pom.xml @@ -6,13 +6,13 @@ org.onap.ccsdk.parent odlparent-lite - 1.1.0 + 1.1.1-SNAPSHOT org.onap.ccsdk.sli.plugins sliplugins-features-installer - 0.3.0-SNAPSHOT + 0.3.1-SNAPSHOT pom ccsdk-sli-plugins :: features :: ${project.artifactId} diff --git a/features/pom.xml b/features/pom.xml index d342ee8a8..257627da4 100755 --- a/features/pom.xml +++ b/features/pom.xml @@ -5,13 +5,13 @@ org.onap.ccsdk.parent odlparent-lite - 1.1.0 + 1.1.1-SNAPSHOT org.onap.ccsdk.sli.plugins sliplugins-feature-aggregator - 0.3.0-SNAPSHOT + 0.3.1-SNAPSHOT pom ccsdk-sli-plugins :: features diff --git a/pom.xml b/pom.xml index 376433d52..7a0f84a9f 100755 --- a/pom.xml +++ b/pom.xml @@ -5,12 +5,12 @@ org.onap.ccsdk.parent odlparent-lite - 1.1.0 + 1.1.1-SNAPSHOT org.onap.ccsdk.sli.plugins ccsdk-sli-plugins - 0.3.0-SNAPSHOT + 0.3.1-SNAPSHOT pom ccsdk-sli-plugins diff --git a/properties-node/features/ccsdk-properties-node/pom.xml b/properties-node/features/ccsdk-properties-node/pom.xml index b2dc224a8..744d6d892 100644 --- a/properties-node/features/ccsdk-properties-node/pom.xml +++ b/properties-node/features/ccsdk-properties-node/pom.xml @@ -5,21 +5,18 @@ org.onap.ccsdk.parent single-feature-parent - 1.1.0 + 1.1.1-SNAPSHOT org.onap.ccsdk.sli.plugins ccsdk-properties-node - 0.3.0-SNAPSHOT + 0.3.1-SNAPSHOT feature ccsdk-sli-plugins :: properties-node :: ${project.artifactId} - - true - diff --git a/properties-node/features/features-properties-node/pom.xml b/properties-node/features/features-properties-node/pom.xml index 1d0535d43..0f1b28c88 100644 --- a/properties-node/features/features-properties-node/pom.xml +++ b/properties-node/features/features-properties-node/pom.xml @@ -5,13 +5,13 @@ org.onap.ccsdk.parent feature-repo-parent - 1.1.0 + 1.1.1-SNAPSHOT org.onap.ccsdk.sli.plugins features-properties-node - 0.3.0-SNAPSHOT + 0.3.1-SNAPSHOT feature ccsdk-sli-plugins :: properties-node :: ${project.artifactId} diff --git a/properties-node/features/pom.xml b/properties-node/features/pom.xml index 9cccc4991..32e139b4f 100755 --- a/properties-node/features/pom.xml +++ b/properties-node/features/pom.xml @@ -5,12 +5,12 @@ org.onap.ccsdk.parent odlparent-lite - 1.1.0 + 1.1.1-SNAPSHOT org.onap.ccsdk.sli.plugins properties-node-features - 0.3.0-SNAPSHOT + 0.3.1-SNAPSHOT pom ccsdk-sli-plugins :: properties-node :: ${project.artifactId} diff --git a/properties-node/installer/pom.xml b/properties-node/installer/pom.xml index bff0978ce..0a6918a3e 100755 --- a/properties-node/installer/pom.xml +++ b/properties-node/installer/pom.xml @@ -5,12 +5,12 @@ org.onap.ccsdk.parent odlparent-lite - 1.1.0 + 1.1.1-SNAPSHOT org.onap.ccsdk.sli.plugins properties-node-installer - 0.3.0-SNAPSHOT + 0.3.1-SNAPSHOT pom ccsdk-sli-plugins :: properties-node :: ${project.artifactId} diff --git a/properties-node/pom.xml b/properties-node/pom.xml index 73098287b..25c2cf225 100755 --- a/properties-node/pom.xml +++ b/properties-node/pom.xml @@ -5,12 +5,12 @@ org.onap.ccsdk.parent odlparent-lite - 1.1.0 + 1.1.1-SNAPSHOT org.onap.ccsdk.sli.plugins properties-node - 0.3.0-SNAPSHOT + 0.3.1-SNAPSHOT pom ccsdk-sli-plugins :: properties-node diff --git a/properties-node/provider/pom.xml b/properties-node/provider/pom.xml index ad9a8fe6c..7f9352341 100755 --- a/properties-node/provider/pom.xml +++ b/properties-node/provider/pom.xml @@ -5,12 +5,12 @@ org.onap.ccsdk.parent binding-parent - 1.1.0 + 1.1.1-SNAPSHOT org.onap.ccsdk.sli.plugins properties-node-provider - 0.3.0-SNAPSHOT + 0.3.1-SNAPSHOT bundle ccsdk-sli-plugins :: properties-node :: ${project.artifactId} 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 a73a14286..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,21 +7,18 @@ org.onap.ccsdk.parent single-feature-parent - 1.1.0 + 1.1.1-SNAPSHOT org.onap.ccsdk.sli.plugins ccsdk-restapi-call-node - 0.3.0-SNAPSHOT + 0.3.1-SNAPSHOT feature ccsdk-sli-plugins :: restapi-call-node :: ${project.artifactId} - - true - 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 507b86628..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 @@ org.onap.ccsdk.parent feature-repo-parent - 1.1.0 + 1.1.1-SNAPSHOT org.onap.ccsdk.sli.plugins features-restapi-call-node - 0.3.0-SNAPSHOT + 0.3.1-SNAPSHOT feature ccsdk-sli-plugins :: restapi-call-node :: ${project.artifactId} diff --git a/restapi-call-node/features/pom.xml b/restapi-call-node/features/pom.xml index fb23ebda1..55e0945e7 100755 --- a/restapi-call-node/features/pom.xml +++ b/restapi-call-node/features/pom.xml @@ -5,12 +5,12 @@ org.onap.ccsdk.parent odlparent-lite - 1.1.0 + 1.1.1-SNAPSHOT org.onap.ccsdk.sli.plugins restapi-call-node-features - 0.3.0-SNAPSHOT + 0.3.1-SNAPSHOT pom ccsdk-sli-plugins :: restapi-call-node :: ${project.artifactId} diff --git a/restapi-call-node/installer/pom.xml b/restapi-call-node/installer/pom.xml index 24c5f44ec..acb6ae899 100755 --- a/restapi-call-node/installer/pom.xml +++ b/restapi-call-node/installer/pom.xml @@ -5,12 +5,12 @@ org.onap.ccsdk.parent odlparent-lite - 1.1.0 + 1.1.1-SNAPSHOT org.onap.ccsdk.sli.plugins restapi-call-node-installer - 0.3.0-SNAPSHOT + 0.3.1-SNAPSHOT pom ccsdk-sli-plugins :: restapi-call-node :: ${project.artifactId} diff --git a/restapi-call-node/pom.xml b/restapi-call-node/pom.xml index 3333dc546..f704647ab 100755 --- a/restapi-call-node/pom.xml +++ b/restapi-call-node/pom.xml @@ -5,12 +5,12 @@ org.onap.ccsdk.parent odlparent-lite - 1.1.0 + 1.1.1-SNAPSHOT org.onap.ccsdk.sli.plugins restapi-call-node - 0.3.0-SNAPSHOT + 0.3.1-SNAPSHOT pom ccsdk-sli-plugins :: restapi-call-node diff --git a/restapi-call-node/provider/pom.xml b/restapi-call-node/provider/pom.xml index 844a6b5e7..84b4131c7 100755 --- a/restapi-call-node/provider/pom.xml +++ b/restapi-call-node/provider/pom.xml @@ -5,12 +5,12 @@ org.onap.ccsdk.parent binding-parent - 1.1.0 + 1.1.1-SNAPSHOT org.onap.ccsdk.sli.plugins restapi-call-node-provider - 0.3.0-SNAPSHOT + 0.3.1-SNAPSHOT bundle ccsdk-sli-plugins :: restapi-call-node :: ${project.artifactId} diff --git a/restconf-client/features/ccsdk-restconf-client/pom.xml b/restconf-client/features/ccsdk-restconf-client/pom.xml index 64b8216b4..03d935296 100644 --- a/restconf-client/features/ccsdk-restconf-client/pom.xml +++ b/restconf-client/features/ccsdk-restconf-client/pom.xml @@ -7,21 +7,18 @@ org.onap.ccsdk.parent single-feature-parent - 1.1.0 + 1.1.1-SNAPSHOT org.onap.ccsdk.sli.plugins ccsdk-restconf-client - 0.3.0-SNAPSHOT + 0.3.1-SNAPSHOT feature ccsdk-sli-plugins :: restconf-client :: ${project.artifactId} - - true - diff --git a/restconf-client/features/features-restconf-client/pom.xml b/restconf-client/features/features-restconf-client/pom.xml index 13be4bb5d..166ddc53d 100644 --- a/restconf-client/features/features-restconf-client/pom.xml +++ b/restconf-client/features/features-restconf-client/pom.xml @@ -5,13 +5,13 @@ org.onap.ccsdk.parent feature-repo-parent - 1.1.0 + 1.1.1-SNAPSHOT org.onap.ccsdk.sli.plugins features-restconf-client - 0.3.0-SNAPSHOT + 0.3.1-SNAPSHOT feature ccsdk-sli-plugins :: restconf-client :: ${project.artifactId} diff --git a/restconf-client/features/pom.xml b/restconf-client/features/pom.xml index cd58d20e1..6aa3fde88 100755 --- a/restconf-client/features/pom.xml +++ b/restconf-client/features/pom.xml @@ -5,12 +5,12 @@ org.onap.ccsdk.parent odlparent-lite - 1.1.0 + 1.1.1-SNAPSHOT org.onap.ccsdk.sli.plugins restconf-client-features - 0.3.0-SNAPSHOT + 0.3.1-SNAPSHOT pom ccsdk-sli-plugins :: restconf-client :: ${project.artifactId} diff --git a/restconf-client/installer/pom.xml b/restconf-client/installer/pom.xml index c71d5dad5..fd675c80a 100755 --- a/restconf-client/installer/pom.xml +++ b/restconf-client/installer/pom.xml @@ -6,12 +6,12 @@ org.onap.ccsdk.parent odlparent-lite - 1.1.0 + 1.1.1-SNAPSHOT org.onap.ccsdk.sli.plugins restconf-client-installer - 0.3.0-SNAPSHOT + 0.3.1-SNAPSHOT pom ccsdk-sli-plugins :: restconf-client :: ${project.artifactId} diff --git a/restconf-client/pom.xml b/restconf-client/pom.xml index af55f8037..fccd697bb 100755 --- a/restconf-client/pom.xml +++ b/restconf-client/pom.xml @@ -5,12 +5,12 @@ org.onap.ccsdk.parent odlparent-lite - 1.1.0 + 1.1.1-SNAPSHOT org.onap.ccsdk.sli.plugins restconf-client - 0.3.0-SNAPSHOT + 0.3.1-SNAPSHOT pom ccsdk-sli-plugins :: restconf-client diff --git a/restconf-client/provider/pom.xml b/restconf-client/provider/pom.xml index 35944f4f4..ac5c4cc32 100755 --- a/restconf-client/provider/pom.xml +++ b/restconf-client/provider/pom.xml @@ -6,12 +6,12 @@ org.onap.ccsdk.parent binding-parent - 1.1.0 + 1.1.1-SNAPSHOT org.onap.ccsdk.sli.plugins restconf-client-provider - 0.3.0-SNAPSHOT + 0.3.1-SNAPSHOT bundle ccsdk-sli-plugins :: restconf-client :: ${project.artifactId} @@ -39,7 +39,7 @@ org.onap.ccsdk.sli.plugins properties-node-provider - 0.3.0-SNAPSHOT + 0.3.1-SNAPSHOT org.opendaylight.yangtools @@ -63,7 +63,7 @@ org.onap.ccsdk.sli.plugins restapi-call-node-provider - 0.3.0-SNAPSHOT + 0.3.1-SNAPSHOT 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 fd0dacaed..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,20 +7,17 @@ org.onap.ccsdk.parent single-feature-parent - 1.1.0 + 1.1.1-SNAPSHOT org.onap.ccsdk.sli.plugins ccsdk-sshapi-call-node - 0.3.0-SNAPSHOT + 0.3.1-SNAPSHOT feature ccsdk-sli-plugins :: sshapi-call-node :: ${project.artifactId} - - true - 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 7435e602a..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 @@ org.onap.ccsdk.parent feature-repo-parent - 1.1.0 + 1.1.1-SNAPSHOT org.onap.ccsdk.sli.plugins features-sshapi-call-node - 0.3.0-SNAPSHOT + 0.3.1-SNAPSHOT feature ccsdk-sli-plugins :: sshapi-call-node :: ${project.artifactId} diff --git a/sshapi-call-node/features/pom.xml b/sshapi-call-node/features/pom.xml index 5ff6cceb5..82e69b9b6 100755 --- a/sshapi-call-node/features/pom.xml +++ b/sshapi-call-node/features/pom.xml @@ -7,12 +7,12 @@ org.onap.ccsdk.parent odlparent-lite - 1.1.0 + 1.1.1-SNAPSHOT org.onap.ccsdk.sli.plugins sshapi-call-node-features - 0.3.0-SNAPSHOT + 0.3.1-SNAPSHOT pom ccsdk-sli-plugins :: sshapi-call-node :: ${project.artifactId} diff --git a/sshapi-call-node/installer/pom.xml b/sshapi-call-node/installer/pom.xml index d33ecb58a..9d570fd36 100755 --- a/sshapi-call-node/installer/pom.xml +++ b/sshapi-call-node/installer/pom.xml @@ -5,12 +5,12 @@ org.onap.ccsdk.parent odlparent-lite - 1.1.0 + 1.1.1-SNAPSHOT org.onap.ccsdk.sli.plugins sshapi-call-node-installer - 0.3.0-SNAPSHOT + 0.3.1-SNAPSHOT pom ccsdk-sli-plugins :: sshapi-call-node :: ${project.artifactId} diff --git a/sshapi-call-node/pom.xml b/sshapi-call-node/pom.xml index b2aa2b9c4..7dda908e5 100755 --- a/sshapi-call-node/pom.xml +++ b/sshapi-call-node/pom.xml @@ -5,12 +5,12 @@ org.onap.ccsdk.parent odlparent-lite - 1.1.0 + 1.1.1-SNAPSHOT org.onap.ccsdk.sli.plugins sshapi-call-node - 0.3.0-SNAPSHOT + 0.3.1-SNAPSHOT pom ccsdk-sli-plugins :: sshapi-call-node diff --git a/sshapi-call-node/provider/pom.xml b/sshapi-call-node/provider/pom.xml index 0cb0294c2..e4619ca04 100755 --- a/sshapi-call-node/provider/pom.xml +++ b/sshapi-call-node/provider/pom.xml @@ -5,12 +5,12 @@ org.onap.ccsdk.parent binding-parent - 1.1.0 + 1.1.1-SNAPSHOT org.onap.ccsdk.sli.plugins sshapi-call-node-provider - 0.3.0-SNAPSHOT + 0.3.1-SNAPSHOT bundle ccsdk-sli-plugins :: sshapi-call-node :: ${project.artifactId} diff --git a/template-node/features/ccsdk-template-node/pom.xml b/template-node/features/ccsdk-template-node/pom.xml index 166b74674..b7d329e59 100644 --- a/template-node/features/ccsdk-template-node/pom.xml +++ b/template-node/features/ccsdk-template-node/pom.xml @@ -5,18 +5,15 @@ org.onap.ccsdk.parent single-feature-parent - 1.1.0 + 1.1.1-SNAPSHOT org.onap.ccsdk.sli.plugins ccsdk-template-node - 0.3.3-SNAPSHOT + 0.3.1-SNAPSHOT feature - - true - diff --git a/template-node/features/features-template-node/pom.xml b/template-node/features/features-template-node/pom.xml index ef58da04c..021e5921b 100644 --- a/template-node/features/features-template-node/pom.xml +++ b/template-node/features/features-template-node/pom.xml @@ -5,13 +5,13 @@ org.onap.ccsdk.parent feature-repo-parent - 1.1.0 + 1.1.1-SNAPSHOT org.onap.ccsdk.sli.plugins features-template-node - 0.3.3-SNAPSHOT + 0.3.1-SNAPSHOT feature diff --git a/template-node/features/pom.xml b/template-node/features/pom.xml index 25e6cb904..c918417ca 100644 --- a/template-node/features/pom.xml +++ b/template-node/features/pom.xml @@ -5,12 +5,12 @@ org.onap.ccsdk.parent odlparent-lite - 1.1.0 + 1.1.1-SNAPSHOT org.onap.ccsdk.sli.plugins template-node-features - 0.3.3-SNAPSHOT + 0.3.1-SNAPSHOT pom diff --git a/template-node/installer/pom.xml b/template-node/installer/pom.xml index c21ffcf9f..f588f49ce 100644 --- a/template-node/installer/pom.xml +++ b/template-node/installer/pom.xml @@ -5,12 +5,12 @@ org.onap.ccsdk.parent odlparent-lite - 1.1.0 + 1.1.1-SNAPSHOT org.onap.ccsdk.sli.plugins template-node-installer - 0.3.3-SNAPSHOT + 0.3.1-SNAPSHOT pom diff --git a/template-node/pom.xml b/template-node/pom.xml index e1f08b4a4..c2668f869 100644 --- a/template-node/pom.xml +++ b/template-node/pom.xml @@ -5,12 +5,12 @@ org.onap.ccsdk.parent odlparent-lite - 1.1.0 + 1.1.1-SNAPSHOT org.onap.ccsdk.sli.plugins template-node - 0.3.3-SNAPSHOT + 0.3.1-SNAPSHOT pom diff --git a/template-node/provider/pom.xml b/template-node/provider/pom.xml index 28beb9dc8..fa2ba9d91 100644 --- a/template-node/provider/pom.xml +++ b/template-node/provider/pom.xml @@ -5,12 +5,12 @@ org.onap.ccsdk.parent binding-parent - 1.1.0 + 1.1.1-SNAPSHOT org.onap.ccsdk.sli.plugins template-node-provider - 0.3.3-SNAPSHOT + 0.3.1-SNAPSHOT bundle diff --git a/version.properties b/version.properties index ba4200853..1c849dae1 100644 --- a/version.properties +++ b/version.properties @@ -7,10 +7,10 @@ release_name=0 sprint_number=3 -feature_revision=0 +feature_revision=1 base_version=${release_name}.${sprint_number}.${feature_revision} -release_version=${base_version} +release_version=${base_version}-STAGING snapshot_version=${base_version}-SNAPSHOT -- cgit 1.2.3-korg From c8e5aa9f493ec5f80e4444285816ceed27b1752b Mon Sep 17 00:00:00 2001 From: janani b Date: Thu, 27 Sep 2018 15:26:39 +0530 Subject: Issue fixes for Restconf discovery node i) Adding constructor param ii) execute dg param order fix iii) Constants value fix. Issue-ID: CCSDK-325 Change-Id: I5aaf4b66b3982e4a1d3736362be3a5e8d7ab6d00 Signed-off-by: janani b --- .../plugins/restconfdiscovery/EventProcessor.java | 9 ++++--- .../restconfdiscovery/RestconfDiscoveryNode.java | 18 ++++++++----- .../restconfdiscovery/SvcLogicGraphInfo.java | 2 +- .../blueprint/restconf-client-blueprint.xml | 4 ++- .../TestRestconfDiscoveryNode.java | 31 ++++++++++++++-------- 5 files changed, 41 insertions(+), 23 deletions(-) (limited to 'restconf-client/provider') diff --git a/restconf-client/provider/src/main/java/org/onap/ccsdk/sli/plugins/restconfdiscovery/EventProcessor.java b/restconf-client/provider/src/main/java/org/onap/ccsdk/sli/plugins/restconfdiscovery/EventProcessor.java index aae808155..e46e47a9b 100644 --- a/restconf-client/provider/src/main/java/org/onap/ccsdk/sli/plugins/restconfdiscovery/EventProcessor.java +++ b/restconf-client/provider/src/main/java/org/onap/ccsdk/sli/plugins/restconfdiscovery/EventProcessor.java @@ -28,17 +28,18 @@ import org.slf4j.LoggerFactory; import java.util.Map; import static org.onap.ccsdk.sli.plugins.prop.JsonParser.convertToProperties; +import static org.slf4j.LoggerFactory.getLogger; /** * Processes the events from event queue and executes callback DG. */ class EventProcessor implements Runnable { - private static final Logger log = LoggerFactory.getLogger(EventProcessor.class); + + private static final Logger log = getLogger(EventProcessor.class); private RestconfDiscoveryNode node; - private static final String EVENT_SUBSCRIPTION_ID = "ietf-notification:notification" + - ".ietf-yang-push:push-change-update" + - ".subscription-id"; + private static final String EVENT_SUBSCRIPTION_ID = "ietf-restconf:" + + "notification.ietf-yang-push:push-change-update.subscription-id"; public EventProcessor(RestconfDiscoveryNode node) { this.node = node; diff --git a/restconf-client/provider/src/main/java/org/onap/ccsdk/sli/plugins/restconfdiscovery/RestconfDiscoveryNode.java b/restconf-client/provider/src/main/java/org/onap/ccsdk/sli/plugins/restconfdiscovery/RestconfDiscoveryNode.java index f5366a544..111d62847 100644 --- a/restconf-client/provider/src/main/java/org/onap/ccsdk/sli/plugins/restconfdiscovery/RestconfDiscoveryNode.java +++ b/restconf-client/provider/src/main/java/org/onap/ccsdk/sli/plugins/restconfdiscovery/RestconfDiscoveryNode.java @@ -26,7 +26,6 @@ import org.onap.ccsdk.sli.core.sli.SvcLogicContext; import org.onap.ccsdk.sli.core.sli.SvcLogicException; import org.onap.ccsdk.sli.plugins.restconfapicall.RestconfApiCallNode; import org.slf4j.Logger; -import org.slf4j.LoggerFactory; import javax.ws.rs.client.Client; import javax.ws.rs.client.ClientBuilder; @@ -37,12 +36,15 @@ import java.util.concurrent.ExecutorService; import java.util.concurrent.Executors; import java.util.concurrent.LinkedBlockingQueue; +import static org.slf4j.LoggerFactory.getLogger; + /** * Representation of a plugin to subscribe for notification and then * to handle the received notifications. */ public class RestconfDiscoveryNode implements SvcLogicDiscoveryPlugin { - private static final Logger log = LoggerFactory.getLogger(RestconfDiscoveryNode.class); + + private static final Logger log = getLogger(RestconfDiscoveryNode.class); private ExecutorService executor = Executors.newCachedThreadPool(); private Map runnableInfo = new ConcurrentHashMap<>(); @@ -54,15 +56,19 @@ public class RestconfDiscoveryNode implements SvcLogicDiscoveryPlugin { private static final String SUBSCRIBER_ID = "subscriberId"; private static final String RESPONSE_CODE = "response-code"; private static final String RESPONSE_PREFIX = "responsePrefix"; - private static final String OUTPUT_IDENTIFIER = "ietf-subscribed-notifications:output.identifier"; + private static final String OUTPUT_IDENTIFIER = "ietf-subscribed-notif" + + "ications:establish-subscription.output.identifier"; private static final String RESPONSE_CODE_200 = "200"; private static final String SSE_URL = "sseConnectURL"; /** - * Creates an instance of RestconfDiscoveryNode and - * starts processing of event. + * Creates an instance of RestconfDiscoveryNode and starts processing of + * event. + * + * @param r restconf api call node */ - public RestconfDiscoveryNode() { + public RestconfDiscoveryNode(RestconfApiCallNode r) { + this.restconfApiCallNode = r; ExecutorService e = Executors.newFixedThreadPool(20); EventProcessor p = new EventProcessor(this); for (int i = 0; i < 20; ++i) { diff --git a/restconf-client/provider/src/main/java/org/onap/ccsdk/sli/plugins/restconfdiscovery/SvcLogicGraphInfo.java b/restconf-client/provider/src/main/java/org/onap/ccsdk/sli/plugins/restconfdiscovery/SvcLogicGraphInfo.java index 725826bda..1cc6261ab 100644 --- a/restconf-client/provider/src/main/java/org/onap/ccsdk/sli/plugins/restconfdiscovery/SvcLogicGraphInfo.java +++ b/restconf-client/provider/src/main/java/org/onap/ccsdk/sli/plugins/restconfdiscovery/SvcLogicGraphInfo.java @@ -142,7 +142,7 @@ class SvcLogicGraphInfo { SvcLogicStore store = service.getStore(); if (store != null) { - SvcLogicGraph subGraph = store.fetch(module, rpc, version, mode); + SvcLogicGraph subGraph = store.fetch(module, rpc, mode, version); if (subGraph != null) { ctx.setAttribute("subGraph", subGraph.toString()); service.execute(subGraph, ctx); diff --git a/restconf-client/provider/src/main/resources/org/opendaylight/blueprint/restconf-client-blueprint.xml b/restconf-client/provider/src/main/resources/org/opendaylight/blueprint/restconf-client-blueprint.xml index c8f2dc4c9..45c335b13 100755 --- a/restconf-client/provider/src/main/resources/org/opendaylight/blueprint/restconf-client-blueprint.xml +++ b/restconf-client/provider/src/main/resources/org/opendaylight/blueprint/restconf-client-blueprint.xml @@ -32,7 +32,9 @@ - + + + diff --git a/restconf-client/provider/src/test/java/org/onap/ccsdk/sli/plugins/restconfdiscovery/TestRestconfDiscoveryNode.java b/restconf-client/provider/src/test/java/org/onap/ccsdk/sli/plugins/restconfdiscovery/TestRestconfDiscoveryNode.java index db878f0af..b2094ca73 100644 --- a/restconf-client/provider/src/test/java/org/onap/ccsdk/sli/plugins/restconfdiscovery/TestRestconfDiscoveryNode.java +++ b/restconf-client/provider/src/test/java/org/onap/ccsdk/sli/plugins/restconfdiscovery/TestRestconfDiscoveryNode.java @@ -20,16 +20,19 @@ package org.onap.ccsdk.sli.plugins.restconfdiscovery; -import java.net.URI; -import java.util.HashMap; -import java.util.Map; - import org.glassfish.jersey.grizzly2.httpserver.GrizzlyHttpServerFactory; import org.glassfish.jersey.media.sse.SseFeature; import org.glassfish.jersey.server.ResourceConfig; import org.junit.Test; import org.onap.ccsdk.sli.core.sli.SvcLogicContext; import org.onap.ccsdk.sli.core.sli.SvcLogicException; +import org.onap.ccsdk.sli.plugins.restapicall.RestapiCallNode; +import org.onap.ccsdk.sli.plugins.restconfapicall.RestconfApiCallNode; + +import java.net.URI; +import java.util.HashMap; +import java.util.Map; + import static org.hamcrest.MatcherAssert.assertThat; import static org.hamcrest.core.Is.is; @@ -47,13 +50,15 @@ public class TestRestconfDiscoveryNode { ctx.setAttribute("prop.encoding-json", "encoding-json"); ctx.setAttribute("restapi-result.response-code", "200"); ctx.setAttribute("restapi-result.ietf-subscribed-notifications" + - ":output.identifier", "100"); + ":establish-subscription.output.identifier", + "100"); Map p = new HashMap<>(); p.put("sseConnectURL", "http://localhost:8080/events"); p.put("subscriberId", "networkId"); p.put("responsePrefix", "restapi-result"); - RestconfDiscoveryNode rdn = new RestconfDiscoveryNode(); + RestconfDiscoveryNode rdn = new RestconfDiscoveryNode( + new RestconfApiCallNode(new RestapiCallNode())); rdn.establishPersistentConnection(p, ctx, "networkId"); Thread.sleep(2000); rdn.deleteSubscription(p, ctx); @@ -75,7 +80,8 @@ public class TestRestconfDiscoveryNode { throws SvcLogicException{ SvcLogicContext ctx = new SvcLogicContext(); Map p = new HashMap<>(); - RestconfDiscoveryNode rdn = new RestconfDiscoveryNode(); + RestconfDiscoveryNode rdn = new RestconfDiscoveryNode( + new RestconfApiCallNode(new RestapiCallNode())); rdn.establishSubscription(p, ctx); } @@ -84,7 +90,8 @@ public class TestRestconfDiscoveryNode { SvcLogicContext ctx = new SvcLogicContext(); ctx.setAttribute("restapi-result.response-code", "200"); ctx.setAttribute("response-code", "404"); - RestconfDiscoveryNode rdn = new RestconfDiscoveryNode(); + RestconfDiscoveryNode rdn = new RestconfDiscoveryNode( + new RestconfApiCallNode(new RestapiCallNode())); assertThat(rdn.getResponseCode("restapi-result", ctx), is("200")); assertThat(rdn.getResponseCode(null, ctx), @@ -95,10 +102,12 @@ public class TestRestconfDiscoveryNode { public void testOutputIdentifier() { SvcLogicContext ctx = new SvcLogicContext(); ctx.setAttribute("restapi-result.ietf-subscribed-notifications:" + - "output.identifier", "89"); - ctx.setAttribute("ietf-subscribed-notifications:output.identifier", + "establish-subscription.output.identifier", "89"); - RestconfDiscoveryNode rdn = new RestconfDiscoveryNode(); + ctx.setAttribute("ietf-subscribed-notifications:establish-subscripti" + + "on.output.identifier", "89"); + RestconfDiscoveryNode rdn = new RestconfDiscoveryNode( + new RestconfApiCallNode(new RestapiCallNode())); assertThat(rdn.getOutputIdentifier("restapi-result", ctx), is("89")); } -- cgit 1.2.3-korg From 2c99dfb113ca8a960b08de00b90165f0c1565836 Mon Sep 17 00:00:00 2001 From: gaurav Date: Fri, 14 Sep 2018 14:36:21 +0530 Subject: Dependency management for Restconf Client Changes includes: - Disable karaf.feature.test to pass SingleFeatureTest as there is no problem in running env. - Removed Restconf Client from plugins-all to pass SingleFeatureTest. Will submit seperate patch to add Restconf client to boot features list in DockerFile directly. Change-Id: I6193284e9e3c3f9a816133255611df03339937f9 Issue-ID: CCSDK-567 Signed-off-by: Gaurav Agrawal --- features/ccsdk-sli-plugins-all/pom.xml | 7 ------- .../features/ccsdk-restconf-client/pom.xml | 14 +++++++++----- restconf-client/provider/pom.xml | 22 ++++++++++------------ 3 files changed, 19 insertions(+), 24 deletions(-) (limited to 'restconf-client/provider') diff --git a/features/ccsdk-sli-plugins-all/pom.xml b/features/ccsdk-sli-plugins-all/pom.xml index d4715be62..714ad58a5 100644 --- a/features/ccsdk-sli-plugins-all/pom.xml +++ b/features/ccsdk-sli-plugins-all/pom.xml @@ -60,12 +60,5 @@ xml features - - ${project.groupId} - ccsdk-restconf-client - ${project.version} - xml - features -
diff --git a/restconf-client/features/ccsdk-restconf-client/pom.xml b/restconf-client/features/ccsdk-restconf-client/pom.xml index 03d935296..462036e73 100644 --- a/restconf-client/features/ccsdk-restconf-client/pom.xml +++ b/restconf-client/features/ccsdk-restconf-client/pom.xml @@ -16,6 +16,10 @@ 0.3.1-SNAPSHOT feature + + true + + ccsdk-sli-plugins :: restconf-client :: ${project.artifactId} @@ -48,10 +52,10 @@ xml features - - - - - + + ${project.groupId} + restconf-client-provider + ${project.version} + diff --git a/restconf-client/provider/pom.xml b/restconf-client/provider/pom.xml index ac5c4cc32..43c9d1737 100755 --- a/restconf-client/provider/pom.xml +++ b/restconf-client/provider/pom.xml @@ -65,7 +65,16 @@ restapi-call-node-provider 0.3.1-SNAPSHOT - + + org.opendaylight.netconf + restconf-nb-rfc8040 + ${odl.mdsal.version} + + + org.opendaylight.yangtools + yang-parser-impl + 2.0.6.1 + @@ -109,16 +118,5 @@ 2.0.6.1 test - - org.opendaylight.netconf - restconf-nb-rfc8040 - ${odl.mdsal.version} - - - org.opendaylight.yangtools - yang-parser-impl - 2.0.6.1 - - -- cgit 1.2.3-korg From 769622040a1fa819d2708c50d4904ac24b867a38 Mon Sep 17 00:00:00 2001 From: janani b Date: Mon, 8 Oct 2018 14:17:51 +0530 Subject: Resolving root level augment nodes Issue fix for root level augment nodes being added to the data format Issue-ID: CCSDK-324 Change-Id: I1c69f97739c6cb56c74b5f22bc4283f2f927719b Signed-off-by: janani b --- .../pnserializer/DefaultPropertiesNodeWalker.java | 27 +++++++ .../dfserializer/DataFormatSerializerTest.java | 20 +++++ .../dfserializer/DataFormatUtilsTest.java | 92 ++++++++++++++-------- 3 files changed, 104 insertions(+), 35 deletions(-) (limited to 'restconf-client/provider') diff --git a/restconf-client/provider/src/main/java/org/onap/ccsdk/sli/plugins/yangserializers/pnserializer/DefaultPropertiesNodeWalker.java b/restconf-client/provider/src/main/java/org/onap/ccsdk/sli/plugins/yangserializers/pnserializer/DefaultPropertiesNodeWalker.java index 8497805c2..f23452653 100644 --- a/restconf-client/provider/src/main/java/org/onap/ccsdk/sli/plugins/yangserializers/pnserializer/DefaultPropertiesNodeWalker.java +++ b/restconf-client/provider/src/main/java/org/onap/ccsdk/sli/plugins/yangserializers/pnserializer/DefaultPropertiesNodeWalker.java @@ -22,6 +22,7 @@ package org.onap.ccsdk.sli.plugins.yangserializers.pnserializer; import org.onap.ccsdk.sli.core.sli.SvcLogicException; +import java.util.Collection; import java.util.Map; /** @@ -58,6 +59,32 @@ public class DefaultPropertiesNodeWalker implements Propert listener.exitPropertiesNode(node); } } + if (propertiesNode instanceof RootNode) { + processAugments(propertiesNode, listener); + } + } + + /** + * Processes the augments present in the root node. + * + * @param node root node + * @param listener properties node listener + * @throws SvcLogicException when augment node walking fails + */ + private void processAugments(PropertiesNode node, + PropertiesNodeListener listener) + throws SvcLogicException { + for (Map.Entry> + augToChild : node.augmentations().asMap().entrySet()) { + Collection child = augToChild.getValue(); + if (!child.isEmpty()) { + for (PropertiesNode p : child) { + listener.enterPropertiesNode(p); + walkChildNode(listener, p); + listener.exitPropertiesNode(p); + } + } + } } /** 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 6c11206c9..40f4c4b1b 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 @@ -50,6 +50,7 @@ import static org.onap.ccsdk.sli.plugins.yangserializers.dfserializer.DataFormat import static org.onap.ccsdk.sli.plugins.yangserializers.dfserializer.DataFormatUtilsTest.ENCODE_TO_JSON_ID; import static org.onap.ccsdk.sli.plugins.yangserializers.dfserializer.DataFormatUtilsTest.ENCODE_TO_JSON_RPC; import static org.onap.ccsdk.sli.plugins.yangserializers.dfserializer.DataFormatUtilsTest.ENCODE_TO_JSON_YANG; +import static org.onap.ccsdk.sli.plugins.yangserializers.dfserializer.DataFormatUtilsTest.ENCODE_TO_JSON_YANG_AUG_POST; import static org.onap.ccsdk.sli.plugins.yangserializers.dfserializer.DataFormatUtilsTest.ENCODE_TO_XML_ID; import static org.onap.ccsdk.sli.plugins.yangserializers.dfserializer.DataFormatUtilsTest.ENCODE_TO_XML_RPC; import static org.onap.ccsdk.sli.plugins.yangserializers.dfserializer.DataFormatUtilsTest.ENCODE_TO_XML_YANG; @@ -217,6 +218,25 @@ public class DataFormatSerializerTest { assertThat(dfCaptor.getResult(), is(ENCODE_TO_JSON_YANG)); } + /** + * Verifies encoding of parameters to JSON data format with augment as + * root child. + * + * @throws SvcLogicException when test case fails + */ + @Test + public void encodeToJsonWithAugAsRootChild() throws SvcLogicException { + String pre = "test-yang:cont1.cont2."; + SvcLogicContext ctx = createAttListYang(pre); + p.put("dirPath", "src/test/resources"); + p.put("format", "json"); + p.put("httpMethod", "post"); + p.put("restapiUrl", "http://echo.getpostman" + + ".com/restconf/operations/test-yang:cont1/cont2/cont4"); + restconf.sendRequest(p, ctx); + assertThat(dfCaptor.getResult(), is(ENCODE_TO_JSON_YANG_AUG_POST)); + } + /** * Verifies decoding of parameters from JSON data format with containers, * grouping and augment. diff --git a/restconf-client/provider/src/test/java/org/onap/ccsdk/sli/plugins/yangserializers/dfserializer/DataFormatUtilsTest.java b/restconf-client/provider/src/test/java/org/onap/ccsdk/sli/plugins/yangserializers/dfserializer/DataFormatUtilsTest.java index c7efdeb37..7e6445fcd 100644 --- a/restconf-client/provider/src/test/java/org/onap/ccsdk/sli/plugins/yangserializers/dfserializer/DataFormatUtilsTest.java +++ b/restconf-client/provider/src/test/java/org/onap/ccsdk/sli/plugins/yangserializers/dfserializer/DataFormatUtilsTest.java @@ -100,6 +100,46 @@ public final class DataFormatUtilsTest { "yangid:physical\n" + "\n"; + static final String ENCODE_TO_JSON_YANG_COMMON = "\n " + + "\"test-augment:cont13\": {\n" + + " \"ll9\": [\n" + + " \"abc\",\n" + + " \"abc\"\n" + + " ],\n" + + " \"list9\": [\n" + + " {\n" + + " \"leaf27\": \"abc\"\n" + + " },\n" + + " {\n" + + " \"leaf27\": \"abc\"\n" + + " }\n" + + " ],\n" + + " \"leaf28\": \"abc\",\n" + + " \"cont12\": {\n" + + " \"leaf26\": \"abc\"\n" + + " }\n" + + " },\n" + + " \"test-augment:list7\": [\n" + + " {\n" + + " \"leaf14\": \"test\"\n" + + " },\n" + + " {\n" + + " \"leaf14\": \"create\"\n" + + " }\n" + + " ],\n" + + " \"test-augment:leaf15\": \"abc\",\n" + + " \"test-augment:ll6\": [\n" + + " \"unbounded\",\n" + + " \"8\"\n" + + " ],\n" + + " \"test-augment:cont5\": {\n" + + " \"leaf13\": \"true\"\n" + + " }"; + + static final String ENCODE_TO_JSON_YANG_AUG_POST = "{\n" + + " \"test-yang:leaf10\": \"abc\"," + + ENCODE_TO_JSON_YANG_COMMON + "\n}"; + static final String ENCODE_TO_JSON_YANG = "{\n" + " \"test-yang:cont2\": {\n" + " \"list1\": [\n" + @@ -177,41 +217,8 @@ public final class DataFormatUtilsTest { " \"abc\"\n" + " ],\n" + " \"cont4\": {\n" + - " \"leaf10\": \"abc\",\n" + - " \"test-augment:cont13\": {\n" + - " \"ll9\": [\n" + - " \"abc\",\n" + - " \"abc\"\n" + - " ],\n" + - " \"list9\": [\n" + - " {\n" + - " \"leaf27\": \"abc\"\n" + - " },\n" + - " {\n" + - " \"leaf27\": \"abc\"\n" + - " }\n" + - " ],\n" + - " \"leaf28\": \"abc\",\n" + - " \"cont12\": {\n" + - " \"leaf26\": \"abc\"\n" + - " }\n" + - " },\n" + - " \"test-augment:list7\": [\n" + - " {\n" + - " \"leaf14\": \"test\"\n" + - " },\n" + - " {\n" + - " \"leaf14\": \"create\"\n" + - " }\n" + - " ],\n" + - " \"test-augment:leaf15\": \"abc\",\n" + - " \"test-augment:ll6\": [\n" + - " \"unbounded\",\n" + - " \"8\"\n" + - " ],\n" + - " \"test-augment:cont5\": {\n" + - " \"leaf13\": \"true\"\n" + - " }\n" + + " \"leaf10\": \"abc\"," + + addSpace(ENCODE_TO_JSON_YANG_COMMON, 8) + "\n" + " },\n" + " \"ll4\": [\n" + " \"abc\",\n" + @@ -501,4 +508,19 @@ public final class DataFormatUtilsTest { " abc\n" + " \n" + ""; + + /** + * Adds the specified number of space required for a req in each line. + * + * @param req request message + * @param i number of space + * @return space appended string + */ + private static String addSpace(String req, int i) { + StringBuilder space = new StringBuilder(""); + for (int sp = 0; sp < i; sp++) { + space = space.append(" "); + } + return req.replaceAll("\n", "\n" + space.toString()); + } } -- cgit 1.2.3-korg From da54fc49d3f16d7028a42cd90ad1500973814790 Mon Sep 17 00:00:00 2001 From: janani b Date: Mon, 8 Oct 2018 16:13:36 +0530 Subject: Appending dummy root node to XML data format To hold all the children in XML message a dummy root node is added Issue-ID: CCSDK-324 Change-Id: I7cf0266d15e6bfaa2b9207e77d8bd5372a164b4f Signed-off-by: janani b --- .../dfserializer/DfSerializerUtil.java | 7 +- .../dfserializer/PropertiesNodeXmlListener.java | 12 ++-- .../dfserializer/XmlSerializer.java | 18 ++++- .../dfserializer/DataFormatSerializerTest.java | 20 ++++++ .../dfserializer/DataFormatUtilsTest.java | 78 ++++++++++++---------- 5 files changed, 87 insertions(+), 48 deletions(-) (limited to 'restconf-client/provider') diff --git a/restconf-client/provider/src/main/java/org/onap/ccsdk/sli/plugins/yangserializers/dfserializer/DfSerializerUtil.java b/restconf-client/provider/src/main/java/org/onap/ccsdk/sli/plugins/yangserializers/dfserializer/DfSerializerUtil.java index 598b08c1b..fbebd2b2d 100644 --- a/restconf-client/provider/src/main/java/org/onap/ccsdk/sli/plugins/yangserializers/dfserializer/DfSerializerUtil.java +++ b/restconf-client/provider/src/main/java/org/onap/ccsdk/sli/plugins/yangserializers/dfserializer/DfSerializerUtil.java @@ -210,11 +210,10 @@ public final class DfSerializerUtil { * @return base type definition */ static TypeDefinition resolveBaseTypeFrom(TypeDefinition type) { - TypeDefinition superType; - for(superType = type; superType.getBaseType() != null; - superType = superType.getBaseType()) { + TypeDefinition superType = type; + while (superType.getBaseType() != null) { + superType = superType.getBaseType(); } return superType; } - } diff --git a/restconf-client/provider/src/main/java/org/onap/ccsdk/sli/plugins/yangserializers/dfserializer/PropertiesNodeXmlListener.java b/restconf-client/provider/src/main/java/org/onap/ccsdk/sli/plugins/yangserializers/dfserializer/PropertiesNodeXmlListener.java index 39a08e387..f098195e4 100644 --- a/restconf-client/provider/src/main/java/org/onap/ccsdk/sli/plugins/yangserializers/dfserializer/PropertiesNodeXmlListener.java +++ b/restconf-client/provider/src/main/java/org/onap/ccsdk/sli/plugins/yangserializers/dfserializer/PropertiesNodeXmlListener.java @@ -78,11 +78,13 @@ public class PropertiesNodeXmlListener implements PropertiesNodeListener { @Override public void start(PropertiesNode node) { - //Do Nothing. + rootElement = addElement(null, node); + elementStack.push(rootElement); } @Override public void end(PropertiesNode node) throws SvcLogicException { + xmlData = rootElement.asXML(); xmlData = UTF_HEADER + xmlData; writer = getXmlWriter(xmlData, "4"); } @@ -113,9 +115,6 @@ public class PropertiesNodeXmlListener implements PropertiesNodeListener { NODE_TYPE_ERR, node.nodeType().toString())); } if (element != null) { - if (elementStack.isEmpty()) { - rootElement = element; - } elementStack.push(element); } } @@ -133,10 +132,7 @@ public class PropertiesNodeXmlListener implements PropertiesNodeListener { case MULTI_INSTANCE_NODE: case MULTI_INSTANCE_LEAF_NODE: case SINGLE_INSTANCE_LEAF_NODE: - if (!elementStack.isEmpty() && - elementStack.peek().equals(rootElement)) { - xmlData = rootElement.asXML(); - } else { + if (!elementStack.isEmpty()) { elementStack.pop(); } break; diff --git a/restconf-client/provider/src/main/java/org/onap/ccsdk/sli/plugins/yangserializers/dfserializer/XmlSerializer.java b/restconf-client/provider/src/main/java/org/onap/ccsdk/sli/plugins/yangserializers/dfserializer/XmlSerializer.java index 6eeb4b82c..f3c6723e1 100644 --- a/restconf-client/provider/src/main/java/org/onap/ccsdk/sli/plugins/yangserializers/dfserializer/XmlSerializer.java +++ b/restconf-client/provider/src/main/java/org/onap/ccsdk/sli/plugins/yangserializers/dfserializer/XmlSerializer.java @@ -61,7 +61,7 @@ public class XmlSerializer extends DataFormatSerializer { PropertiesNodeXmlListener xmlListener = new PropertiesNodeXmlListener(); nodeWalker.walk(xmlListener, propNode); Writer writer = xmlListener.getWriter(); - return writer.toString(); + return removeRootNode(writer.toString(), propNode.name()); } @Override @@ -85,4 +85,20 @@ public class XmlSerializer extends DataFormatSerializer { return serializerContext().getPropNodeSerializer().decode( listener.serializerHelper().getPropertiesNode()); } + + /** + * Removes root node from the XML data format message and makes the + * string to be pretty print. + * + * @param xml XML data format message + * @param rootName root node name + * @return pretty print format XML message + */ + private static String removeRootNode(String xml, String rootName) { + xml = xml.replace("\n<" + rootName + ">", "\n"); + xml = xml.replace("" + "\n", ""); + xml = xml.replaceAll("\n" + " ", "\n"); + xml = xml.replaceFirst("\n", ""); + return xml; + } } \ No newline at end of file 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 40f4c4b1b..1185eea1c 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 @@ -54,6 +54,7 @@ import static org.onap.ccsdk.sli.plugins.yangserializers.dfserializer.DataFormat import static org.onap.ccsdk.sli.plugins.yangserializers.dfserializer.DataFormatUtilsTest.ENCODE_TO_XML_ID; import static org.onap.ccsdk.sli.plugins.yangserializers.dfserializer.DataFormatUtilsTest.ENCODE_TO_XML_RPC; import static org.onap.ccsdk.sli.plugins.yangserializers.dfserializer.DataFormatUtilsTest.ENCODE_TO_XML_YANG; +import static org.onap.ccsdk.sli.plugins.yangserializers.dfserializer.DataFormatUtilsTest.ENCODE_TO_XML_YANG_AUG_POST; /** @@ -276,6 +277,25 @@ public class DataFormatSerializerTest { assertThat(dfCaptor.getResult(), is(ENCODE_TO_XML_YANG)); } + /** + * Verifies encoding of parameters to XML data format with augment as + * root child. + * + * @throws SvcLogicException when test case fails + */ + @Test + public void encodeToXmlWithAugAsRootChild() throws SvcLogicException { + String pre = "test-yang:cont1.cont2."; + SvcLogicContext ctx = createAttListYang(pre); + p.put("dirPath", "src/test/resources"); + p.put("format", "xml"); + p.put("httpMethod", "post"); + p.put("restapiUrl", "http://echo.getpostman" + + ".com/restconf/operations/test-yang:cont1/cont2/cont4"); + restconf.sendRequest(p, ctx); + assertThat(dfCaptor.getResult(), is(ENCODE_TO_XML_YANG_AUG_POST)); + } + /** * Verifies decoding of parameters from XML data format with containers, * grouping and augment. diff --git a/restconf-client/provider/src/test/java/org/onap/ccsdk/sli/plugins/yangserializers/dfserializer/DataFormatUtilsTest.java b/restconf-client/provider/src/test/java/org/onap/ccsdk/sli/plugins/yangserializers/dfserializer/DataFormatUtilsTest.java index 7e6445fcd..a0a154bf3 100644 --- a/restconf-client/provider/src/test/java/org/onap/ccsdk/sli/plugins/yangserializers/dfserializer/DataFormatUtilsTest.java +++ b/restconf-client/provider/src/test/java/org/onap/ccsdk/sli/plugins/yangserializers/dfserializer/DataFormatUtilsTest.java @@ -249,6 +249,47 @@ public final class DataFormatUtilsTest { " }\n" + "}"; + static final String ENCODE_TO_XML_YANG_COMMON = "\n" + + "\n" + + " abc\n" + + " abc\n" + + " \n" + + " abc\n" + + " \n" + + " \n" + + " abc\n" + + " \n" + + " abc\n" + + " \n" + + " abc\n" + + " \n" + + "\n" + + "\n" + + " test\n" + + "\n" + + "\n" + + " create\n" + + "\n" + + "abc\n" + + "unbounded\n" + + "8\n" + + "\n" + + " true\n" + + ""; + + static final String ENCODE_TO_XML_YANG_AUG_POST = "\n" + + "abc" + + "" + + ENCODE_TO_XML_YANG_COMMON + "\n"; + static final String ENCODE_TO_XML_YANG = "\n" + "\n" + @@ -305,40 +346,8 @@ public final class DataFormatUtilsTest { " abc\n" + " abc\n" + " \n" + - " abc\n" + - " \n" + - " abc\n" + - " abc\n" + - " \n" + - " abc\n" + - " \n" + - " \n" + - " abc\n" + - " \n" + - " abc\n" + - " \n" + - " abc\n" + - " \n" + - " \n" + - " \n" + - " test\n" + - " \n" + - " \n" + - " create\n" + - " \n" + - " abc\n" + - " unbounded\n" + - " 8\n" + - " \n" + - " true\n" + - " \n" + + " abc"+ + addSpace(ENCODE_TO_XML_YANG_COMMON, 8) + "\n" + " \n" + " abc\n" + " abc\n" + @@ -362,7 +371,6 @@ public final class DataFormatUtilsTest { " \n" + "\n"; - static final String ENCODE_TO_JSON_RPC = "{\n" + " \"test-yang:input\": {\n" + " \"leaf30\": \"abc\",\n" + -- cgit 1.2.3-korg From bc2c9899ae7d71d0e4a970c146a5121822913ff9 Mon Sep 17 00:00:00 2001 From: janani b Date: Mon, 8 Oct 2018 19:11:02 +0530 Subject: PUT and PATCH operation support Changes to add a additional root node to the data format req to support PUT and PATCH operations in RestconfApiCallNode Issue-ID: CCSDK-614 Change-Id: If094810861f8152a2a6d6ee86e9f81c8812b8ad6 Signed-off-by: janani b --- .../restconfapicall/RestconfApiCallNode.java | 149 +++++++++++++++++- .../plugins/restconfapicall/RestconfApiUtils.java | 41 +++-- .../dfserializer/DfSerializerUtil.java | 38 +++-- .../pnserializer/MdsalPropertiesNodeUtils.java | 10 +- .../dfserializer/DataFormatSerializerTest.java | 173 ++++++++++++++++++++- .../dfserializer/DataFormatUtilsTest.java | 53 +++++-- 6 files changed, 415 insertions(+), 49 deletions(-) (limited to 'restconf-client/provider') 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 91ce3338a..a76b27d0b 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 @@ -20,6 +20,14 @@ package org.onap.ccsdk.sli.plugins.restconfapicall; +import com.google.gson.Gson; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParser; +import com.google.gson.stream.JsonWriter; +import org.dom4j.Document; +import org.dom4j.DocumentException; +import org.dom4j.DocumentHelper; import org.onap.ccsdk.sli.core.sli.SvcLogicContext; import org.onap.ccsdk.sli.core.sli.SvcLogicException; import org.onap.ccsdk.sli.core.sli.SvcLogicJavaPlugin; @@ -35,30 +43,39 @@ import org.onap.ccsdk.sli.plugins.yangserializers.dfserializer.MdsalSerializerHe import org.onap.ccsdk.sli.plugins.yangserializers.dfserializer.SerializerHelper; import org.onap.ccsdk.sli.plugins.yangserializers.dfserializer.YangParameters; import org.onap.ccsdk.sli.plugins.yangserializers.pnserializer.MdsalPropertiesNodeSerializer; +import org.onap.ccsdk.sli.plugins.yangserializers.pnserializer.Namespace; import org.onap.ccsdk.sli.plugins.yangserializers.pnserializer.PropertiesNodeSerializer; import org.opendaylight.restconf.common.context.InstanceIdentifierContext; import org.opendaylight.restconf.nb.rfc8040.utils.parser.ParserIdentifier; import org.opendaylight.yangtools.yang.model.api.SchemaContext; +import org.opendaylight.yangtools.yang.model.api.SchemaNode; import org.osgi.framework.BundleContext; import org.osgi.framework.ServiceReference; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import javax.ws.rs.core.UriBuilder; +import java.io.StringWriter; +import java.io.Writer; import java.net.SocketException; import java.net.URI; import java.net.URISyntaxException; import java.util.HashMap; +import java.util.Iterator; import java.util.List; import java.util.Map; +import static com.google.common.base.Strings.repeat; import static java.lang.String.format; +import static java.lang.String.valueOf; import static org.apache.commons.lang3.StringUtils.join; +import static org.onap.ccsdk.sli.plugins.restapicall.HttpMethod.DELETE; +import static org.onap.ccsdk.sli.plugins.restapicall.HttpMethod.GET; 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; import static org.onap.ccsdk.sli.plugins.restconfapicall.RestconfApiUtils.ATTEMPTS_MSG; +import static org.onap.ccsdk.sli.plugins.restconfapicall.RestconfApiUtils.COLON; import static org.onap.ccsdk.sli.plugins.restconfapicall.RestconfApiUtils.COMMA; import static org.onap.ccsdk.sli.plugins.restconfapicall.RestconfApiUtils.COMM_FAIL; import static org.onap.ccsdk.sli.plugins.restconfapicall.RestconfApiUtils.HEADER; @@ -74,10 +91,16 @@ import static org.onap.ccsdk.sli.plugins.restconfapicall.RestconfApiUtils.RES_PR import static org.onap.ccsdk.sli.plugins.restconfapicall.RestconfApiUtils.RETRY_COUNT; import static org.onap.ccsdk.sli.plugins.restconfapicall.RestconfApiUtils.RETRY_FAIL; import static org.onap.ccsdk.sli.plugins.restconfapicall.RestconfApiUtils.UPDATED_URL; +import static org.onap.ccsdk.sli.plugins.restconfapicall.RestconfApiUtils.getUpdatedXmlReq; import static org.onap.ccsdk.sli.plugins.restconfapicall.RestconfApiUtils.getSchemaCtxFromDir; import static org.onap.ccsdk.sli.plugins.restconfapicall.RestconfApiUtils.getYangParameters; import static org.onap.ccsdk.sli.plugins.restconfapicall.RestconfApiUtils.parseUrl; import static org.onap.ccsdk.sli.plugins.yangserializers.dfserializer.DfListenerFactory.instance; +import static org.onap.ccsdk.sli.plugins.yangserializers.dfserializer.DfSerializerUtil.FORMAT_ERR; +import static org.onap.ccsdk.sli.plugins.yangserializers.dfserializer.DfSerializerUtil.UTF_HEADER; +import static org.onap.ccsdk.sli.plugins.yangserializers.dfserializer.DfSerializerUtil.XML_TREE_ERR; +import static org.onap.ccsdk.sli.plugins.yangserializers.dfserializer.DfSerializerUtil.getXmlWriter; +import static org.onap.ccsdk.sli.plugins.yangserializers.pnserializer.MdsalPropertiesNodeUtils.getModuleNamespace; import static org.osgi.framework.FrameworkUtil.getBundle; /** @@ -154,9 +177,11 @@ public class RestconfApiCallNode implements SvcLogicJavaPlugin { InstanceIdentifierContext insIdCtx = getInsIdCtx(p, uri); String req = null; - if (p.httpMethod == POST || p.httpMethod == PUT - || p.httpMethod == PATCH) { + if (p.httpMethod != GET && p.httpMethod != DELETE) { req = serializeRequest(props, p, uri, insIdCtx); + if (p.httpMethod == PUT || p.httpMethod == PATCH) { + updateReq(req, p, insIdCtx); + } } if (req == null && p.requestBody != null) { req = p.requestBody; @@ -210,8 +235,8 @@ public class RestconfApiCallNode implements SvcLogicJavaPlugin { } if (r != null && r.code >= 300) { - throw new SvcLogicException( - String.valueOf(r.code) + ": " + r.message); + throw new SvcLogicException(valueOf(r.code) + + COLON + " " + r.message); } } @@ -316,7 +341,7 @@ public class RestconfApiCallNode implements SvcLogicJavaPlugin { */ public String getResponse(SvcLogicContext ctx, YangParameters params, String pre, HttpResponse res) { - ctx.setAttribute(pre + RES_CODE, String.valueOf(res.code)); + ctx.setAttribute(pre + RES_CODE, valueOf(res.code)); ctx.setAttribute(pre + RES_MSG, res.message); if (params.dumpHeaders && res.headers != null) { @@ -345,7 +370,7 @@ public class RestconfApiCallNode implements SvcLogicJavaPlugin { HttpResponse res = new HttpResponse(); res.code = 500; res.message = errMsg; - ctx.setAttribute(prefix + RES_CODE, String.valueOf(res.code)); + ctx.setAttribute(prefix + RES_CODE, valueOf(res.code)); ctx.setAttribute(prefix + RES_MSG, res.message); } @@ -373,4 +398,114 @@ public class RestconfApiCallNode implements SvcLogicJavaPlugin { log.debug(UPDATED_URL + retryUri.toString()); log.debug(format(COMM_FAIL, hostName, retryString)); } + + /** + * Updates request message for JSON and XML data format, when the HTTP + * method points it as PUT or PATCH. + * + * @param req current request message + * @param p YANG parameters + * @param insIdCtx instance identifier context + * @return update request message + * @throws SvcLogicException when the data format type is wrong + */ + public String updateReq(String req, YangParameters p, + InstanceIdentifierContext insIdCtx) + throws SvcLogicException { + + SchemaNode schemaNode = insIdCtx.getSchemaNode(); + Namespace modNs = getModuleNamespace(schemaNode.getQName(), + insIdCtx.getSchemaContext()); + String nodeName = schemaNode.getQName().getLocalName(); + + switch (p.format) { + case JSON: + return getUpdatedJsonReq(req, nodeName, modNs.moduleName()); + + case XML: + return getXmlReqForPutOp(req, nodeName, modNs.moduleNs()); + + default: + throw new SvcLogicException(format(FORMAT_ERR, p.format)); + } + } + + /** + * Returns the updated JSON request message, when the HTTP method + * points to PUT or PATCH. + * + * @param req current JSON request message + * @param nodeName root node name + * @param modName module name of the root node + * @return update JSON request message + */ + private String getUpdatedJsonReq(String req, String nodeName, + String modName) { + Writer writer = new StringWriter(); + JsonWriter jsonWriter = new JsonWriter(writer); + jsonWriter.setIndent(repeat(" ", 4)); + + JsonParser jsonParser = new JsonParser(); + JsonObject oldJson = (JsonObject)jsonParser.parse(req); + oldJson = remChildModName(oldJson, modName); + JsonObject newJson = new JsonObject(); + newJson.add(modName + COLON + nodeName, oldJson.deepCopy()); + + Gson gson= new Gson(); + gson.toJson(newJson, jsonWriter); + return writer.toString(); + } + + /** + * Removes module name from all the updated first level child node, if it + * is same as the root node added. + * + * @param oldJson JSON object for old request + * @param modName module name of root node + * @return JSON object for old request with updated child module name + */ + private JsonObject remChildModName(JsonObject oldJson, String modName) { + Iterator> it = oldJson.entrySet().iterator(); + Map m = new HashMap<>(); + while (it.hasNext()) { + Map.Entry jNode = it.next(); + if (jNode.getKey().contains(COLON)) { + String[] modArr = jNode.getKey().split(COLON); + if (modArr[0].equals(modName)) { + it.remove(); + m.put(modArr[1], jNode.getValue()); + } + } + } + if (!m.isEmpty()) { + for (Map.Entry element : m.entrySet()) { + oldJson.add(element.getKey(), element.getValue()); + } + } + return oldJson; + } + + /** + * Returns the updated XML request message, when the HTTP method points + * to PUT or PATCH. + * + * @param req current JSON request message + * @param nodeName root node name + * @param modNs module namespace of the root node + * @return update JSON request message + * @throws SvcLogicException when XML parsing fails + */ + private String getXmlReqForPutOp(String req, String nodeName, + URI modNs) throws SvcLogicException { + req = getUpdatedXmlReq(req, nodeName, modNs.toString()); + Document oldDoc; + try { + oldDoc = DocumentHelper.parseText(req); + } catch (DocumentException e) { + throw new SvcLogicException(XML_TREE_ERR, e); + } + Writer writer = getXmlWriter( + UTF_HEADER + oldDoc.getRootElement().asXML(), "4"); + return writer.toString(); + } } 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 b51272f7e..3a0b5fb35 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 @@ -41,7 +41,6 @@ import java.util.LinkedList; import java.util.List; import java.util.Map; -import static org.onap.ccsdk.sli.plugins.restapicall.HttpMethod.PUT; import static org.onap.ccsdk.sli.plugins.restapicall.RestapiCallNode.getParameters; import static org.onap.ccsdk.sli.plugins.restapicall.RestapiCallNode.parseParam; import static org.opendaylight.yangtools.yang.model.repo.api.StatementParserMode.DEFAULT_MODE; @@ -66,6 +65,8 @@ public final class RestconfApiUtils { static final String COMMA = ","; + static final String COLON = ":"; + static final String HTTP_RES = "httpResponse"; static final String REST_API_URL = "restapiUrl"; @@ -97,9 +98,6 @@ public final class RestconfApiUtils { private static final String URL_SYNTAX = "The following URL cannot be " + "parsed into URI : "; - private static final String PUT_NODE_ERR = "The following URL does not " + - "contain minimum two nodes for PUT operation."; - private static final String YANG = ".yang"; private static final String YANG_FILE_ERR = "Unable to parse the YANG " + @@ -145,12 +143,6 @@ public final class RestconfApiUtils { String path = uri.getPath(); path = getParsedPath(path); - if (method == PUT) { - if (!path.contains(SLASH)) { - throw new SvcLogicException(PUT_NODE_ERR + url); - } - path = path.substring(0, path.lastIndexOf(SLASH)); - } return path; } @@ -162,15 +154,15 @@ public final class RestconfApiUtils { */ private static String getParsedPath(String path) { String firstHalf; - if (path.contains(":")) { - String[] p = path.split(":"); + if (path.contains(COLON)) { + String[] p = path.split(COLON); 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 firstHalf + COLON + p[1]; } return path; } @@ -222,6 +214,13 @@ public final class RestconfApiUtils { } } + /** + * Processes all the obtained files by isolating all the YANG files from + * all the directory of the given path recursively. + * + * @param files files in the given path + * @param yangFiles YANG files list + */ private static void processFiles(File[] files, List yangFiles) { for (File file : files) { if (file.isFile() && file.getName().endsWith(YANG)) { @@ -231,4 +230,20 @@ public final class RestconfApiUtils { } } } + + /** + * Returns the updated XML request message by adding root node to it. + * + * @param req XML request + * @param nodeName root node name + * @param modNs module namespace of the root node + * @return updated XML request message + */ + static String getUpdatedXmlReq(String req, String nodeName, String modNs) { + String rootNode = "\n<" + nodeName + " xmlns=\"" + modNs.toString() + + "\">\n"; + req = req.replaceFirst("\n", rootNode); + req = req + ""; + return req.replaceAll(">\\s+<", "><"); + } } diff --git a/restconf-client/provider/src/main/java/org/onap/ccsdk/sli/plugins/yangserializers/dfserializer/DfSerializerUtil.java b/restconf-client/provider/src/main/java/org/onap/ccsdk/sli/plugins/yangserializers/dfserializer/DfSerializerUtil.java index fbebd2b2d..707c29444 100644 --- a/restconf-client/provider/src/main/java/org/onap/ccsdk/sli/plugins/yangserializers/dfserializer/DfSerializerUtil.java +++ b/restconf-client/provider/src/main/java/org/onap/ccsdk/sli/plugins/yangserializers/dfserializer/DfSerializerUtil.java @@ -68,24 +68,12 @@ public final class DfSerializerUtil { static final String XML_LIS_ERR = "The XML serializer doesn't have XML " + "listener"; - static final String JSON_TREE_ERR = "Unable to form JSON tree object from" + - " the JSON body provided."; - - static final String XML_TREE_ERR = "Unable to form XML tree object from " + - "the XML body provided."; - - static final String FORMAT_ERR = "Only JSON and XML formats are supported" + - ". %s is not supported"; - static final String PROP_NODE_ERR = "The property node doesn't have " + "schema node bound to it."; static final String DF_ERR = "Type mismatch for the node %s. The schema " + "node does not match with the data format node type %s."; - static final String UTF_HEADER = ""; - static final String XML_PREFIX = "yangid"; private static final String YES = "yes"; @@ -98,6 +86,30 @@ public final class DfSerializerUtil { private static final String URI_ERR = "Unable to parse the URI"; + /** + * Data format error message for unsupported types. + */ + public static final String FORMAT_ERR = "Only JSON and XML formats are " + + "supported. %s is not supported"; + + /** + * UTF header message for XML data format message. + */ + public static final String UTF_HEADER = ""; + + /** + * Error message when a JSON tree creation fails. + */ + public static final String JSON_TREE_ERR = "Unable to form JSON tree " + + "object from the JSON body provided."; + + /** + * Error message when a XML tree creation fails. + */ + public static final String XML_TREE_ERR = "Unable to form XML tree object" + + " from the XML body provided."; + //No instantiation. private DfSerializerUtil() { } @@ -110,7 +122,7 @@ public final class DfSerializerUtil { * @return writer with XML * @throws SvcLogicException when transformation of source fails */ - static Writer getXmlWriter(String input, String indent) + public static Writer getXmlWriter(String input, String indent) throws SvcLogicException { try { Transformer transformer = TransformerFactory.newInstance() diff --git a/restconf-client/provider/src/main/java/org/onap/ccsdk/sli/plugins/yangserializers/pnserializer/MdsalPropertiesNodeUtils.java b/restconf-client/provider/src/main/java/org/onap/ccsdk/sli/plugins/yangserializers/pnserializer/MdsalPropertiesNodeUtils.java index d7b4818b4..ccc4f2bdd 100644 --- a/restconf-client/provider/src/main/java/org/onap/ccsdk/sli/plugins/yangserializers/pnserializer/MdsalPropertiesNodeUtils.java +++ b/restconf-client/provider/src/main/java/org/onap/ccsdk/sli/plugins/yangserializers/pnserializer/MdsalPropertiesNodeUtils.java @@ -340,7 +340,15 @@ public final class MdsalPropertiesNodeUtils { return null; } - private static Namespace getModuleNamespace(QName qName, SchemaContext ctx) + /** + * Returns module namespace from a given qName. + * + * @param qName qName of a node + * @param ctx schema context + * @return module namespace of the node + * @throws SvcLogicException when the module is not available + */ + public static Namespace getModuleNamespace(QName qName, SchemaContext ctx) throws SvcLogicException { Optional module = ctx.findModule(qName.getModule()); if (!module.isPresent()) { 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 1185eea1c..08fa33ee7 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 @@ -42,19 +42,24 @@ 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.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.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; +import static org.onap.ccsdk.sli.plugins.yangserializers.dfserializer.DataFormatUtilsTest.ENCODE_TO_JSON_ID_PUT; import static org.onap.ccsdk.sli.plugins.yangserializers.dfserializer.DataFormatUtilsTest.ENCODE_TO_JSON_RPC; import static org.onap.ccsdk.sli.plugins.yangserializers.dfserializer.DataFormatUtilsTest.ENCODE_TO_JSON_YANG; import static org.onap.ccsdk.sli.plugins.yangserializers.dfserializer.DataFormatUtilsTest.ENCODE_TO_JSON_YANG_AUG_POST; +import static org.onap.ccsdk.sli.plugins.yangserializers.dfserializer.DataFormatUtilsTest.ENCODE_TO_JSON_YANG_PUT; import static org.onap.ccsdk.sli.plugins.yangserializers.dfserializer.DataFormatUtilsTest.ENCODE_TO_XML_ID; +import static org.onap.ccsdk.sli.plugins.yangserializers.dfserializer.DataFormatUtilsTest.ENCODE_TO_XML_ID_PUT; import static org.onap.ccsdk.sli.plugins.yangserializers.dfserializer.DataFormatUtilsTest.ENCODE_TO_XML_RPC; import static org.onap.ccsdk.sli.plugins.yangserializers.dfserializer.DataFormatUtilsTest.ENCODE_TO_XML_YANG; import static org.onap.ccsdk.sli.plugins.yangserializers.dfserializer.DataFormatUtilsTest.ENCODE_TO_XML_YANG_AUG_POST; +import static org.onap.ccsdk.sli.plugins.yangserializers.dfserializer.DataFormatUtilsTest.ENCODE_TO_XML_YANG_PUT; /** @@ -102,6 +107,9 @@ public class DataFormatSerializerTest { doAnswer(dfCaptor).when(restconf).serializeRequest( any(Map.class), any(YangParameters.class), any(String.class), any(InstanceIdentifierContext.class)); + doAnswer(dfCaptor).when(restconf).updateReq( + any(String.class), any(YangParameters.class), + any(InstanceIdentifierContext.class)); } /** @@ -140,6 +148,46 @@ public class DataFormatSerializerTest { assertThat(dfCaptor.getResult(), is(ENCODE_TO_JSON_ID)); } + /** + * Verifies encoding of parameters to JSON data format with identity-ref + * and inter-file linking for put operation-type. + * + * @throws SvcLogicException when test case fails + */ + @Test + public void encodeToJsonIdWithPut() throws SvcLogicException { + String pre = "identity-test:test."; + SvcLogicContext ctx = createAttList(pre); + ctx.setAttribute(pre + "l", "abc"); + p.put("dirPath", "src/test/resources"); + p.put("format", "json"); + p.put("httpMethod", "put"); + p.put("restapiUrl", "http://echo.getpostman" + + ".com/restconf/operations/identity-test:test"); + restconf.sendRequest(p, ctx); + assertThat(dfCaptor.getResult(), is(ENCODE_TO_JSON_ID_PUT)); + } + + /** + * Verifies encoding of parameters to JSON data format with identity-ref + * and inter-file linking for patch operation-type. + * + * @throws SvcLogicException when test case fails + */ + @Test + public void encodeToJsonIdWithPatch() throws SvcLogicException { + String pre = "identity-test:test."; + SvcLogicContext ctx = createAttList(pre); + ctx.setAttribute(pre + "l", "abc"); + p.put("dirPath", "src/test/resources"); + p.put("format", "json"); + p.put("httpMethod", "patch"); + p.put("restapiUrl", "http://echo.getpostman" + + ".com/restconf/operations/identity-test:test"); + restconf.sendRequest(p, ctx); + assertThat(dfCaptor.getResult(), is(ENCODE_TO_JSON_ID_PUT)); + } + /** * Verifies encoding of parameters to XML data format with identity-ref * and inter-file linking. @@ -159,6 +207,44 @@ public class DataFormatSerializerTest { assertThat(dfCaptor.getResult(), is(ENCODE_TO_XML_ID)); } + /** + * Verifies encoding of parameters to XML data format with identity-ref + * and inter-file linking for put operation-type. + * + * @throws SvcLogicException when test case fails + */ + @Test + public void encodeToXmlIdWithPut() throws SvcLogicException { + String pre = "identity-test:test."; + SvcLogicContext ctx = createAttList(pre); + p.put("dirPath", "src/test/resources"); + p.put("format", "xml"); + p.put("httpMethod", "put"); + p.put("restapiUrl", "http://echo.getpostman" + + ".com/restconf/operations/identity-test:test"); + restconf.sendRequest(p, ctx); + assertThat(dfCaptor.getResult(), is(ENCODE_TO_XML_ID_PUT)); + } + + /** + * Verifies encoding of parameters to XML data format with identity-ref + * and inter-file linking for patch operation-type. + * + * @throws SvcLogicException when test case fails + */ + @Test + public void encodeToXmlIdWithPatch() throws SvcLogicException { + String pre = "identity-test:test."; + SvcLogicContext ctx = createAttList(pre); + p.put("dirPath", "src/test/resources"); + p.put("format", "xml"); + p.put("httpMethod", "patch"); + p.put("restapiUrl", "http://echo.getpostman" + + ".com/restconf/operations/identity-test:test"); + restconf.sendRequest(p, ctx); + assertThat(dfCaptor.getResult(), is(ENCODE_TO_XML_ID_PUT)); + } + /** * Verifies decoding of parameters from JSON data format with identity-ref * and inter-file linking. @@ -219,6 +305,44 @@ public class DataFormatSerializerTest { assertThat(dfCaptor.getResult(), is(ENCODE_TO_JSON_YANG)); } + /** + * Verifies encoding of parameters to JSON data format with containers, + * grouping and augment for put operation-type. + * + * @throws SvcLogicException when test case fails + */ + @Test + public void encodeToJsonYangWithPut() throws SvcLogicException { + String pre = "test-yang:cont1.cont2."; + SvcLogicContext ctx = createAttListYang(pre); + p.put("dirPath", "src/test/resources"); + p.put("format", "json"); + p.put("httpMethod", "put"); + p.put("restapiUrl", "http://echo.getpostman" + + ".com/restconf/operations/test-yang:cont1/cont2/cont4"); + restconf.sendRequest(p, ctx); + assertThat(dfCaptor.getResult(), is(ENCODE_TO_JSON_YANG_PUT)); + } + + /** + * Verifies encoding of parameters to JSON data format with containers, + * grouping and augment for patch operation-type. + * + * @throws SvcLogicException when test case fails + */ + @Test + public void encodeToJsonYangWithPatch() throws SvcLogicException { + String pre = "test-yang:cont1.cont2."; + SvcLogicContext ctx = createAttListYang(pre); + p.put("dirPath", "src/test/resources"); + p.put("format", "json"); + p.put("httpMethod", "patch"); + p.put("restapiUrl", "http://echo.getpostman" + + ".com/restconf/operations/test-yang:cont1/cont2/cont4"); + restconf.sendRequest(p, ctx); + assertThat(dfCaptor.getResult(), is(ENCODE_TO_JSON_YANG_PUT)); + } + /** * Verifies encoding of parameters to JSON data format with augment as * root child. @@ -277,6 +401,44 @@ public class DataFormatSerializerTest { assertThat(dfCaptor.getResult(), is(ENCODE_TO_XML_YANG)); } + /** + * Verifies encoding of parameters to XML data format with containers, + * grouping and augment for put operation-type + * + * @throws SvcLogicException when test case fails + */ + @Test + public void encodeToXmlYangWithPut() throws SvcLogicException { + String pre = "test-yang:cont1.cont2."; + SvcLogicContext ctx = createAttListYang(pre); + p.put("dirPath", "src/test/resources"); + p.put("format", "xml"); + p.put("httpMethod", "put"); + p.put("restapiUrl", "http://echo.getpostman" + + ".com/restconf/operations/test-yang:cont1/cont2/cont4"); + restconf.sendRequest(p, ctx); + assertThat(dfCaptor.getResult(), is(ENCODE_TO_XML_YANG_PUT)); + } + + /** + * Verifies encoding of parameters to XML data format with containers, + * grouping and augment for patch operation-type + * + * @throws SvcLogicException when test case fails + */ + @Test + public void encodeToXmlYangWithPatch() throws SvcLogicException { + String pre = "test-yang:cont1.cont2."; + SvcLogicContext ctx = createAttListYang(pre); + p.put("dirPath", "src/test/resources"); + p.put("format", "xml"); + p.put("httpMethod", "put"); + p.put("restapiUrl", "http://echo.getpostman" + + ".com/restconf/operations/test-yang:cont1/cont2/cont4"); + restconf.sendRequest(p, ctx); + assertThat(dfCaptor.getResult(), is(ENCODE_TO_XML_YANG_PUT)); + } + /** * Verifies encoding of parameters to XML data format with augment as * root child. @@ -369,23 +531,24 @@ public class DataFormatSerializerTest { @Test public void validateUrlParser() throws SvcLogicException { String actVal = "identity-test:test"; + String putId = "/for-put"; 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"; + putId; 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"; + putId; 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 val3 = parseUrl(url3, PATCH); String val4 = parseUrl(url4, PUT); String val5 = parseUrl(url5, GET); String val6 = parseUrl(url6, POST); @@ -396,10 +559,10 @@ public class DataFormatSerializerTest { assertThat(val1, is(actVal)); assertThat(val2, is(actVal)); assertThat(val3, is(actVal)); - assertThat(val4, is(actVal)); + assertThat(val4, is(actVal + putId)); assertThat(val5, is(actVal)); assertThat(val6, is(actVal)); - assertThat(val7, is(actVal)); + assertThat(val7, is(actVal + putId)); assertThat(val8, is(actVal)); assertThat(val9, is(actVal)); assertThat(val10, is(actVal)); diff --git a/restconf-client/provider/src/test/java/org/onap/ccsdk/sli/plugins/yangserializers/dfserializer/DataFormatUtilsTest.java b/restconf-client/provider/src/test/java/org/onap/ccsdk/sli/plugins/yangserializers/dfserializer/DataFormatUtilsTest.java index a0a154bf3..027604480 100644 --- a/restconf-client/provider/src/test/java/org/onap/ccsdk/sli/plugins/yangserializers/dfserializer/DataFormatUtilsTest.java +++ b/restconf-client/provider/src/test/java/org/onap/ccsdk/sli/plugins/yangserializers/dfserializer/DataFormatUtilsTest.java @@ -26,9 +26,9 @@ package org.onap.ccsdk.sli.plugins.yangserializers.dfserializer; */ public final class DataFormatUtilsTest { - static final String ENCODE_TO_JSON_ID = "{\n" + - " \"identity-test:con1\": {\n" + - " \"interfaces\": {\n" + + static final String ENCODE_TO_JSON_ID_COMMON = "\n \"interfaces\"" + + ": " + + "{\n" + " \"int-list\": [\n" + " {\n" + " \"iden\": \"optical\",\n" + @@ -61,14 +61,23 @@ public final class DataFormatUtilsTest { " ]\n" + " },\n" + " \"interface\": \"identity-types:physical\"\n" + - " },\n" + + " }"; + + static final String ENCODE_TO_JSON_ID = "{\n" + + " \"identity-test:con1\": {" + ENCODE_TO_JSON_ID_COMMON + + ",\n" + " \"identity-test:l\": \"abc\"\n" + "}"; - static final String ENCODE_TO_XML_ID = "\n" + - "\n" + - " \n" + + static final String ENCODE_TO_JSON_ID_PUT = "{\n" + + " \"identity-test:test\": {\n" + + " \"con1\": {" + addSpace(ENCODE_TO_JSON_ID_COMMON, 4) + + ",\n" + + " \"l\": \"abc\"\n" + + " }\n" + + "}"; + + static final String ENCODE_TO_XML_ID_COMMON = "\n \n" + " \n" + " optical\n" + " \n" + @@ -97,8 +106,19 @@ public final class DataFormatUtilsTest { " \n" + " \n" + " " + - "yangid:physical\n" + - "\n"; + "yangid:physical"; + + static final String ENCODE_TO_XML_ID = "\n" + + "" + + ENCODE_TO_XML_ID_COMMON + "\n\n"; + + static final String ENCODE_TO_XML_ID_PUT = "\n" + + "\n" + + " " + addSpace(ENCODE_TO_XML_ID_COMMON, 4) + + "\n \n" + + "\n"; static final String ENCODE_TO_JSON_YANG_COMMON = "\n " + "\"test-augment:cont13\": {\n" + @@ -249,6 +269,13 @@ public final class DataFormatUtilsTest { " }\n" + "}"; + static final String ENCODE_TO_JSON_YANG_PUT = "{\n" + + " \"test-yang:cont4\": {" + addSpace( + ENCODE_TO_JSON_YANG_COMMON, 4) + ",\n" + + " \"leaf10\": \"abc\"\n" + + " }\n" + + "}"; + static final String ENCODE_TO_XML_YANG_COMMON = "\n" + "\n" + @@ -290,6 +317,12 @@ public final class DataFormatUtilsTest { "" + ENCODE_TO_XML_YANG_COMMON + "\n"; + static final String ENCODE_TO_XML_YANG_PUT = "\n" + + "\n" + + " abc" + + addSpace(ENCODE_TO_XML_YANG_COMMON, 4) + "\n\n"; + static final String ENCODE_TO_XML_YANG = "\n" + "\n" + -- cgit 1.2.3-korg From 792a8cc436079f9667308a43786de015be0d1513 Mon Sep 17 00:00:00 2001 From: janani b Date: Mon, 8 Oct 2018 19:50:02 +0530 Subject: Issue fix Factory pattern constructor issue fix Issue-ID: CCSDK-614 Change-Id: I3aee79894cfddd47273289878e5ba079926b8054 Signed-off-by: janani b --- .../sli/plugins/yangserializers/dfserializer/DfListenerFactory.java | 6 ++++++ .../plugins/yangserializers/dfserializer/DfSerializerFactory.java | 6 ++++++ 2 files changed, 12 insertions(+) (limited to 'restconf-client/provider') diff --git a/restconf-client/provider/src/main/java/org/onap/ccsdk/sli/plugins/yangserializers/dfserializer/DfListenerFactory.java b/restconf-client/provider/src/main/java/org/onap/ccsdk/sli/plugins/yangserializers/dfserializer/DfListenerFactory.java index e10a085a6..06a811e15 100644 --- a/restconf-client/provider/src/main/java/org/onap/ccsdk/sli/plugins/yangserializers/dfserializer/DfListenerFactory.java +++ b/restconf-client/provider/src/main/java/org/onap/ccsdk/sli/plugins/yangserializers/dfserializer/DfListenerFactory.java @@ -31,6 +31,12 @@ import static org.onap.ccsdk.sli.plugins.yangserializers.dfserializer.DfSerializ */ public final class DfListenerFactory { + /** + * Creates a new DfListenerFactory. + */ + private DfListenerFactory() { + } + /** * Returns the instance of the data format listener factory. * diff --git a/restconf-client/provider/src/main/java/org/onap/ccsdk/sli/plugins/yangserializers/dfserializer/DfSerializerFactory.java b/restconf-client/provider/src/main/java/org/onap/ccsdk/sli/plugins/yangserializers/dfserializer/DfSerializerFactory.java index bd0285e8e..4d95235e5 100644 --- a/restconf-client/provider/src/main/java/org/onap/ccsdk/sli/plugins/yangserializers/dfserializer/DfSerializerFactory.java +++ b/restconf-client/provider/src/main/java/org/onap/ccsdk/sli/plugins/yangserializers/dfserializer/DfSerializerFactory.java @@ -31,6 +31,12 @@ import static org.onap.ccsdk.sli.plugins.yangserializers.dfserializer.DfSerializ */ public final class DfSerializerFactory { + /** + * Creates a new DfSerializerFactory. + */ + private DfSerializerFactory() { + } + /** * Returns the instance of the data format serializer factory. * -- cgit 1.2.3-korg From c7971703e0455c2ea71ac1b7072d4d1d2f99577f Mon Sep 17 00:00:00 2001 From: "Timoney, Dan (dt5972)" Date: Thu, 11 Oct 2018 16:25:06 -0400 Subject: Prepare for RC0 release Update to prepare for RC0 release build: remove -STAGING tag from release version and use released parent poms. Change-Id: I4411cbd86164f0e2739196d78fd1670f92bc1edd Issue-ID: CCSDK-617 Signed-off-by: Timoney, Dan (dt5972) --- features/ccsdk-sli-plugins-all/pom.xml | 2 +- features/features-sli-plugins/pom.xml | 2 +- features/installer/pom.xml | 2 +- features/pom.xml | 2 +- pom.xml | 2 +- properties-node/features/ccsdk-properties-node/pom.xml | 2 +- properties-node/features/features-properties-node/pom.xml | 2 +- properties-node/features/pom.xml | 2 +- properties-node/installer/pom.xml | 2 +- properties-node/pom.xml | 2 +- properties-node/provider/pom.xml | 2 +- restapi-call-node/features/ccsdk-restapi-call-node/pom.xml | 2 +- restapi-call-node/features/features-restapi-call-node/pom.xml | 2 +- restapi-call-node/features/pom.xml | 2 +- restapi-call-node/installer/pom.xml | 2 +- restapi-call-node/pom.xml | 2 +- restapi-call-node/provider/pom.xml | 2 +- restconf-client/features/ccsdk-restconf-client/pom.xml | 2 +- restconf-client/features/features-restconf-client/pom.xml | 2 +- restconf-client/features/pom.xml | 2 +- restconf-client/installer/pom.xml | 2 +- restconf-client/pom.xml | 2 +- restconf-client/provider/pom.xml | 2 +- sshapi-call-node/features/ccsdk-sshapi-call-node/pom.xml | 2 +- sshapi-call-node/features/features-sshapi-call-node/pom.xml | 2 +- sshapi-call-node/features/pom.xml | 2 +- sshapi-call-node/installer/pom.xml | 2 +- sshapi-call-node/pom.xml | 2 +- sshapi-call-node/provider/pom.xml | 2 +- template-node/features/ccsdk-template-node/pom.xml | 2 +- template-node/features/features-template-node/pom.xml | 2 +- template-node/features/pom.xml | 2 +- template-node/installer/pom.xml | 2 +- template-node/pom.xml | 2 +- template-node/provider/pom.xml | 2 +- version.properties | 2 +- 36 files changed, 36 insertions(+), 36 deletions(-) (limited to 'restconf-client/provider') diff --git a/features/ccsdk-sli-plugins-all/pom.xml b/features/ccsdk-sli-plugins-all/pom.xml index 714ad58a5..65c648ae6 100644 --- a/features/ccsdk-sli-plugins-all/pom.xml +++ b/features/ccsdk-sli-plugins-all/pom.xml @@ -7,7 +7,7 @@ org.onap.ccsdk.parent single-feature-parent - 1.1.1-SNAPSHOT + 1.1.1 diff --git a/features/features-sli-plugins/pom.xml b/features/features-sli-plugins/pom.xml index b3333b600..66519ef5d 100644 --- a/features/features-sli-plugins/pom.xml +++ b/features/features-sli-plugins/pom.xml @@ -5,7 +5,7 @@ org.onap.ccsdk.parent feature-repo-parent - 1.1.1-SNAPSHOT + 1.1.1 diff --git a/features/installer/pom.xml b/features/installer/pom.xml index c2b77d0fd..d984bd80b 100755 --- a/features/installer/pom.xml +++ b/features/installer/pom.xml @@ -6,7 +6,7 @@ org.onap.ccsdk.parent odlparent-lite - 1.1.1-SNAPSHOT + 1.1.1 diff --git a/features/pom.xml b/features/pom.xml index 257627da4..fae7a0e46 100755 --- a/features/pom.xml +++ b/features/pom.xml @@ -5,7 +5,7 @@ org.onap.ccsdk.parent odlparent-lite - 1.1.1-SNAPSHOT + 1.1.1 diff --git a/pom.xml b/pom.xml index 7a0f84a9f..5cae3e7f8 100755 --- a/pom.xml +++ b/pom.xml @@ -5,7 +5,7 @@ org.onap.ccsdk.parent odlparent-lite - 1.1.1-SNAPSHOT + 1.1.1 org.onap.ccsdk.sli.plugins diff --git a/properties-node/features/ccsdk-properties-node/pom.xml b/properties-node/features/ccsdk-properties-node/pom.xml index 744d6d892..86af69f99 100644 --- a/properties-node/features/ccsdk-properties-node/pom.xml +++ b/properties-node/features/ccsdk-properties-node/pom.xml @@ -5,7 +5,7 @@ org.onap.ccsdk.parent single-feature-parent - 1.1.1-SNAPSHOT + 1.1.1 diff --git a/properties-node/features/features-properties-node/pom.xml b/properties-node/features/features-properties-node/pom.xml index 0f1b28c88..4d8610c7e 100644 --- a/properties-node/features/features-properties-node/pom.xml +++ b/properties-node/features/features-properties-node/pom.xml @@ -5,7 +5,7 @@ org.onap.ccsdk.parent feature-repo-parent - 1.1.1-SNAPSHOT + 1.1.1 diff --git a/properties-node/features/pom.xml b/properties-node/features/pom.xml index 32e139b4f..3c6f9b74b 100755 --- a/properties-node/features/pom.xml +++ b/properties-node/features/pom.xml @@ -5,7 +5,7 @@ org.onap.ccsdk.parent odlparent-lite - 1.1.1-SNAPSHOT + 1.1.1 org.onap.ccsdk.sli.plugins diff --git a/properties-node/installer/pom.xml b/properties-node/installer/pom.xml index 0a6918a3e..ea0fd2db1 100755 --- a/properties-node/installer/pom.xml +++ b/properties-node/installer/pom.xml @@ -5,7 +5,7 @@ org.onap.ccsdk.parent odlparent-lite - 1.1.1-SNAPSHOT + 1.1.1 org.onap.ccsdk.sli.plugins diff --git a/properties-node/pom.xml b/properties-node/pom.xml index 25c2cf225..4cb284bc9 100755 --- a/properties-node/pom.xml +++ b/properties-node/pom.xml @@ -5,7 +5,7 @@ org.onap.ccsdk.parent odlparent-lite - 1.1.1-SNAPSHOT + 1.1.1 org.onap.ccsdk.sli.plugins diff --git a/properties-node/provider/pom.xml b/properties-node/provider/pom.xml index 7f9352341..5dd1a883e 100755 --- a/properties-node/provider/pom.xml +++ b/properties-node/provider/pom.xml @@ -5,7 +5,7 @@ org.onap.ccsdk.parent binding-parent - 1.1.1-SNAPSHOT + 1.1.1 org.onap.ccsdk.sli.plugins 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 2c616a298..885315131 100644 --- a/restapi-call-node/features/ccsdk-restapi-call-node/pom.xml +++ b/restapi-call-node/features/ccsdk-restapi-call-node/pom.xml @@ -7,7 +7,7 @@ org.onap.ccsdk.parent single-feature-parent - 1.1.1-SNAPSHOT + 1.1.1 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 8160611dd..aeb5ad6e1 100644 --- a/restapi-call-node/features/features-restapi-call-node/pom.xml +++ b/restapi-call-node/features/features-restapi-call-node/pom.xml @@ -5,7 +5,7 @@ org.onap.ccsdk.parent feature-repo-parent - 1.1.1-SNAPSHOT + 1.1.1 diff --git a/restapi-call-node/features/pom.xml b/restapi-call-node/features/pom.xml index 55e0945e7..89458bf9a 100755 --- a/restapi-call-node/features/pom.xml +++ b/restapi-call-node/features/pom.xml @@ -5,7 +5,7 @@ org.onap.ccsdk.parent odlparent-lite - 1.1.1-SNAPSHOT + 1.1.1 org.onap.ccsdk.sli.plugins diff --git a/restapi-call-node/installer/pom.xml b/restapi-call-node/installer/pom.xml index acb6ae899..97214a702 100755 --- a/restapi-call-node/installer/pom.xml +++ b/restapi-call-node/installer/pom.xml @@ -5,7 +5,7 @@ org.onap.ccsdk.parent odlparent-lite - 1.1.1-SNAPSHOT + 1.1.1 org.onap.ccsdk.sli.plugins diff --git a/restapi-call-node/pom.xml b/restapi-call-node/pom.xml index f704647ab..674e5dd21 100755 --- a/restapi-call-node/pom.xml +++ b/restapi-call-node/pom.xml @@ -5,7 +5,7 @@ org.onap.ccsdk.parent odlparent-lite - 1.1.1-SNAPSHOT + 1.1.1 org.onap.ccsdk.sli.plugins diff --git a/restapi-call-node/provider/pom.xml b/restapi-call-node/provider/pom.xml index 035f2fcf3..bdd980fec 100755 --- a/restapi-call-node/provider/pom.xml +++ b/restapi-call-node/provider/pom.xml @@ -6,7 +6,7 @@ org.onap.ccsdk.parent binding-parent - 1.1.1-SNAPSHOT + 1.1.1 org.onap.ccsdk.sli.plugins diff --git a/restconf-client/features/ccsdk-restconf-client/pom.xml b/restconf-client/features/ccsdk-restconf-client/pom.xml index 462036e73..1c45de213 100644 --- a/restconf-client/features/ccsdk-restconf-client/pom.xml +++ b/restconf-client/features/ccsdk-restconf-client/pom.xml @@ -7,7 +7,7 @@ org.onap.ccsdk.parent single-feature-parent - 1.1.1-SNAPSHOT + 1.1.1 diff --git a/restconf-client/features/features-restconf-client/pom.xml b/restconf-client/features/features-restconf-client/pom.xml index 166ddc53d..bd42f8cf0 100644 --- a/restconf-client/features/features-restconf-client/pom.xml +++ b/restconf-client/features/features-restconf-client/pom.xml @@ -5,7 +5,7 @@ org.onap.ccsdk.parent feature-repo-parent - 1.1.1-SNAPSHOT + 1.1.1 diff --git a/restconf-client/features/pom.xml b/restconf-client/features/pom.xml index 6aa3fde88..7c0a89ff7 100755 --- a/restconf-client/features/pom.xml +++ b/restconf-client/features/pom.xml @@ -5,7 +5,7 @@ org.onap.ccsdk.parent odlparent-lite - 1.1.1-SNAPSHOT + 1.1.1 org.onap.ccsdk.sli.plugins diff --git a/restconf-client/installer/pom.xml b/restconf-client/installer/pom.xml index fd675c80a..965786427 100755 --- a/restconf-client/installer/pom.xml +++ b/restconf-client/installer/pom.xml @@ -6,7 +6,7 @@ org.onap.ccsdk.parent odlparent-lite - 1.1.1-SNAPSHOT + 1.1.1 org.onap.ccsdk.sli.plugins diff --git a/restconf-client/pom.xml b/restconf-client/pom.xml index fccd697bb..fbfdf0710 100755 --- a/restconf-client/pom.xml +++ b/restconf-client/pom.xml @@ -5,7 +5,7 @@ org.onap.ccsdk.parent odlparent-lite - 1.1.1-SNAPSHOT + 1.1.1 org.onap.ccsdk.sli.plugins diff --git a/restconf-client/provider/pom.xml b/restconf-client/provider/pom.xml index 43c9d1737..cfa374548 100755 --- a/restconf-client/provider/pom.xml +++ b/restconf-client/provider/pom.xml @@ -6,7 +6,7 @@ org.onap.ccsdk.parent binding-parent - 1.1.1-SNAPSHOT + 1.1.1 org.onap.ccsdk.sli.plugins 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 9220b1f78..1cd200c33 100644 --- a/sshapi-call-node/features/ccsdk-sshapi-call-node/pom.xml +++ b/sshapi-call-node/features/ccsdk-sshapi-call-node/pom.xml @@ -7,7 +7,7 @@ org.onap.ccsdk.parent single-feature-parent - 1.1.1-SNAPSHOT + 1.1.1 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 dc924244a..f566268fb 100644 --- a/sshapi-call-node/features/features-sshapi-call-node/pom.xml +++ b/sshapi-call-node/features/features-sshapi-call-node/pom.xml @@ -7,7 +7,7 @@ org.onap.ccsdk.parent feature-repo-parent - 1.1.1-SNAPSHOT + 1.1.1 diff --git a/sshapi-call-node/features/pom.xml b/sshapi-call-node/features/pom.xml index 82e69b9b6..1327b7768 100755 --- a/sshapi-call-node/features/pom.xml +++ b/sshapi-call-node/features/pom.xml @@ -7,7 +7,7 @@ org.onap.ccsdk.parent odlparent-lite - 1.1.1-SNAPSHOT + 1.1.1 org.onap.ccsdk.sli.plugins diff --git a/sshapi-call-node/installer/pom.xml b/sshapi-call-node/installer/pom.xml index 9d570fd36..86b3cb23b 100755 --- a/sshapi-call-node/installer/pom.xml +++ b/sshapi-call-node/installer/pom.xml @@ -5,7 +5,7 @@ org.onap.ccsdk.parent odlparent-lite - 1.1.1-SNAPSHOT + 1.1.1 org.onap.ccsdk.sli.plugins diff --git a/sshapi-call-node/pom.xml b/sshapi-call-node/pom.xml index 7dda908e5..9f2cb8955 100755 --- a/sshapi-call-node/pom.xml +++ b/sshapi-call-node/pom.xml @@ -5,7 +5,7 @@ org.onap.ccsdk.parent odlparent-lite - 1.1.1-SNAPSHOT + 1.1.1 org.onap.ccsdk.sli.plugins diff --git a/sshapi-call-node/provider/pom.xml b/sshapi-call-node/provider/pom.xml index e4619ca04..e6787d642 100755 --- a/sshapi-call-node/provider/pom.xml +++ b/sshapi-call-node/provider/pom.xml @@ -5,7 +5,7 @@ org.onap.ccsdk.parent binding-parent - 1.1.1-SNAPSHOT + 1.1.1 org.onap.ccsdk.sli.plugins diff --git a/template-node/features/ccsdk-template-node/pom.xml b/template-node/features/ccsdk-template-node/pom.xml index b7d329e59..e926a439e 100644 --- a/template-node/features/ccsdk-template-node/pom.xml +++ b/template-node/features/ccsdk-template-node/pom.xml @@ -5,7 +5,7 @@ org.onap.ccsdk.parent single-feature-parent - 1.1.1-SNAPSHOT + 1.1.1 diff --git a/template-node/features/features-template-node/pom.xml b/template-node/features/features-template-node/pom.xml index 021e5921b..b6cf4cc9c 100644 --- a/template-node/features/features-template-node/pom.xml +++ b/template-node/features/features-template-node/pom.xml @@ -5,7 +5,7 @@ org.onap.ccsdk.parent feature-repo-parent - 1.1.1-SNAPSHOT + 1.1.1 diff --git a/template-node/features/pom.xml b/template-node/features/pom.xml index c918417ca..9c4cabd3e 100644 --- a/template-node/features/pom.xml +++ b/template-node/features/pom.xml @@ -5,7 +5,7 @@ org.onap.ccsdk.parent odlparent-lite - 1.1.1-SNAPSHOT + 1.1.1 org.onap.ccsdk.sli.plugins diff --git a/template-node/installer/pom.xml b/template-node/installer/pom.xml index f588f49ce..fa07539b8 100644 --- a/template-node/installer/pom.xml +++ b/template-node/installer/pom.xml @@ -5,7 +5,7 @@ org.onap.ccsdk.parent odlparent-lite - 1.1.1-SNAPSHOT + 1.1.1 org.onap.ccsdk.sli.plugins diff --git a/template-node/pom.xml b/template-node/pom.xml index c2668f869..40bb39da8 100644 --- a/template-node/pom.xml +++ b/template-node/pom.xml @@ -5,7 +5,7 @@ org.onap.ccsdk.parent odlparent-lite - 1.1.1-SNAPSHOT + 1.1.1 org.onap.ccsdk.sli.plugins diff --git a/template-node/provider/pom.xml b/template-node/provider/pom.xml index fa2ba9d91..a8e1de026 100644 --- a/template-node/provider/pom.xml +++ b/template-node/provider/pom.xml @@ -5,7 +5,7 @@ org.onap.ccsdk.parent binding-parent - 1.1.1-SNAPSHOT + 1.1.1 org.onap.ccsdk.sli.plugins diff --git a/version.properties b/version.properties index 1c849dae1..c5250c6c9 100644 --- a/version.properties +++ b/version.properties @@ -11,6 +11,6 @@ feature_revision=1 base_version=${release_name}.${sprint_number}.${feature_revision} -release_version=${base_version}-STAGING +release_version=${base_version} snapshot_version=${base_version}-SNAPSHOT -- cgit 1.2.3-korg From 5b0d0173096c0ac635b0edef71acb3244386e51a Mon Sep 17 00:00:00 2001 From: "Timoney, Dan (dt5972)" Date: Tue, 23 Oct 2018 08:46:38 -0400 Subject: Roll to initial Dublin snapshot Roll version to initial Dublin snapshot Change-Id: I48713fcb744f895842a52b2d48ba28cccd06817c Issue-ID: CCSDK-617 Signed-off-by: Timoney, Dan (dt5972) --- features/ccsdk-sli-plugins-all/pom.xml | 4 ++-- features/features-sli-plugins/pom.xml | 4 ++-- features/installer/pom.xml | 4 ++-- features/pom.xml | 4 ++-- pom.xml | 4 ++-- properties-node/features/ccsdk-properties-node/pom.xml | 4 ++-- properties-node/features/features-properties-node/pom.xml | 4 ++-- properties-node/features/pom.xml | 4 ++-- properties-node/installer/pom.xml | 4 ++-- properties-node/pom.xml | 4 ++-- properties-node/provider/pom.xml | 4 ++-- restapi-call-node/features/ccsdk-restapi-call-node/pom.xml | 4 ++-- restapi-call-node/features/features-restapi-call-node/pom.xml | 4 ++-- restapi-call-node/features/pom.xml | 4 ++-- restapi-call-node/installer/pom.xml | 4 ++-- restapi-call-node/pom.xml | 4 ++-- restapi-call-node/provider/pom.xml | 4 ++-- restconf-client/features/ccsdk-restconf-client/pom.xml | 4 ++-- restconf-client/features/features-restconf-client/pom.xml | 4 ++-- restconf-client/features/pom.xml | 4 ++-- restconf-client/installer/pom.xml | 4 ++-- restconf-client/pom.xml | 4 ++-- restconf-client/provider/pom.xml | 8 ++++---- sshapi-call-node/features/ccsdk-sshapi-call-node/pom.xml | 4 ++-- sshapi-call-node/features/features-sshapi-call-node/pom.xml | 4 ++-- sshapi-call-node/features/pom.xml | 4 ++-- sshapi-call-node/installer/pom.xml | 4 ++-- sshapi-call-node/pom.xml | 4 ++-- sshapi-call-node/provider/pom.xml | 4 ++-- template-node/features/ccsdk-template-node/pom.xml | 4 ++-- template-node/features/features-template-node/pom.xml | 4 ++-- template-node/features/pom.xml | 4 ++-- template-node/installer/pom.xml | 4 ++-- template-node/pom.xml | 4 ++-- template-node/provider/pom.xml | 4 ++-- version.properties | 6 +++--- 36 files changed, 75 insertions(+), 75 deletions(-) (limited to 'restconf-client/provider') diff --git a/features/ccsdk-sli-plugins-all/pom.xml b/features/ccsdk-sli-plugins-all/pom.xml index 65c648ae6..4d846bd1a 100644 --- a/features/ccsdk-sli-plugins-all/pom.xml +++ b/features/ccsdk-sli-plugins-all/pom.xml @@ -7,13 +7,13 @@ org.onap.ccsdk.parent single-feature-parent - 1.1.1 + 1.2.0-SNAPSHOT org.onap.ccsdk.sli.plugins ccsdk-sli-plugins-all - 0.3.1-SNAPSHOT + 0.4.0-SNAPSHOT feature ccsdk-sli-plugins :: features :: ${project.artifactId} diff --git a/features/features-sli-plugins/pom.xml b/features/features-sli-plugins/pom.xml index 66519ef5d..56d724285 100644 --- a/features/features-sli-plugins/pom.xml +++ b/features/features-sli-plugins/pom.xml @@ -5,13 +5,13 @@ org.onap.ccsdk.parent feature-repo-parent - 1.1.1 + 1.2.0-SNAPSHOT org.onap.ccsdk.sli.plugins features-sli-plugins - 0.3.1-SNAPSHOT + 0.4.0-SNAPSHOT feature ccsdk-sli-plugins :: features :: ${project.artifactId} diff --git a/features/installer/pom.xml b/features/installer/pom.xml index d984bd80b..ac8f620ba 100755 --- a/features/installer/pom.xml +++ b/features/installer/pom.xml @@ -6,13 +6,13 @@ org.onap.ccsdk.parent odlparent-lite - 1.1.1 + 1.2.0-SNAPSHOT org.onap.ccsdk.sli.plugins sliplugins-features-installer - 0.3.1-SNAPSHOT + 0.4.0-SNAPSHOT pom ccsdk-sli-plugins :: features :: ${project.artifactId} diff --git a/features/pom.xml b/features/pom.xml index fae7a0e46..18dbfbfc1 100755 --- a/features/pom.xml +++ b/features/pom.xml @@ -5,13 +5,13 @@ org.onap.ccsdk.parent odlparent-lite - 1.1.1 + 1.2.0-SNAPSHOT org.onap.ccsdk.sli.plugins sliplugins-feature-aggregator - 0.3.1-SNAPSHOT + 0.4.0-SNAPSHOT pom ccsdk-sli-plugins :: features diff --git a/pom.xml b/pom.xml index 5cae3e7f8..df1644572 100755 --- a/pom.xml +++ b/pom.xml @@ -5,12 +5,12 @@ org.onap.ccsdk.parent odlparent-lite - 1.1.1 + 1.2.0-SNAPSHOT org.onap.ccsdk.sli.plugins ccsdk-sli-plugins - 0.3.1-SNAPSHOT + 0.4.0-SNAPSHOT pom ccsdk-sli-plugins diff --git a/properties-node/features/ccsdk-properties-node/pom.xml b/properties-node/features/ccsdk-properties-node/pom.xml index 86af69f99..84709fa4e 100644 --- a/properties-node/features/ccsdk-properties-node/pom.xml +++ b/properties-node/features/ccsdk-properties-node/pom.xml @@ -5,13 +5,13 @@ org.onap.ccsdk.parent single-feature-parent - 1.1.1 + 1.2.0-SNAPSHOT org.onap.ccsdk.sli.plugins ccsdk-properties-node - 0.3.1-SNAPSHOT + 0.4.0-SNAPSHOT feature ccsdk-sli-plugins :: properties-node :: ${project.artifactId} diff --git a/properties-node/features/features-properties-node/pom.xml b/properties-node/features/features-properties-node/pom.xml index 4d8610c7e..13d056f10 100644 --- a/properties-node/features/features-properties-node/pom.xml +++ b/properties-node/features/features-properties-node/pom.xml @@ -5,13 +5,13 @@ org.onap.ccsdk.parent feature-repo-parent - 1.1.1 + 1.2.0-SNAPSHOT org.onap.ccsdk.sli.plugins features-properties-node - 0.3.1-SNAPSHOT + 0.4.0-SNAPSHOT feature ccsdk-sli-plugins :: properties-node :: ${project.artifactId} diff --git a/properties-node/features/pom.xml b/properties-node/features/pom.xml index 3c6f9b74b..c510a3ac3 100755 --- a/properties-node/features/pom.xml +++ b/properties-node/features/pom.xml @@ -5,12 +5,12 @@ org.onap.ccsdk.parent odlparent-lite - 1.1.1 + 1.2.0-SNAPSHOT org.onap.ccsdk.sli.plugins properties-node-features - 0.3.1-SNAPSHOT + 0.4.0-SNAPSHOT pom ccsdk-sli-plugins :: properties-node :: ${project.artifactId} diff --git a/properties-node/installer/pom.xml b/properties-node/installer/pom.xml index ea0fd2db1..c86901ee4 100755 --- a/properties-node/installer/pom.xml +++ b/properties-node/installer/pom.xml @@ -5,12 +5,12 @@ org.onap.ccsdk.parent odlparent-lite - 1.1.1 + 1.2.0-SNAPSHOT org.onap.ccsdk.sli.plugins properties-node-installer - 0.3.1-SNAPSHOT + 0.4.0-SNAPSHOT pom ccsdk-sli-plugins :: properties-node :: ${project.artifactId} diff --git a/properties-node/pom.xml b/properties-node/pom.xml index 4cb284bc9..0c167730f 100755 --- a/properties-node/pom.xml +++ b/properties-node/pom.xml @@ -5,12 +5,12 @@ org.onap.ccsdk.parent odlparent-lite - 1.1.1 + 1.2.0-SNAPSHOT org.onap.ccsdk.sli.plugins properties-node - 0.3.1-SNAPSHOT + 0.4.0-SNAPSHOT pom ccsdk-sli-plugins :: properties-node diff --git a/properties-node/provider/pom.xml b/properties-node/provider/pom.xml index 5dd1a883e..da1ff21ea 100755 --- a/properties-node/provider/pom.xml +++ b/properties-node/provider/pom.xml @@ -5,12 +5,12 @@ org.onap.ccsdk.parent binding-parent - 1.1.1 + 1.2.0-SNAPSHOT org.onap.ccsdk.sli.plugins properties-node-provider - 0.3.1-SNAPSHOT + 0.4.0-SNAPSHOT bundle ccsdk-sli-plugins :: properties-node :: ${project.artifactId} 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 885315131..80dcc0ac0 100644 --- a/restapi-call-node/features/ccsdk-restapi-call-node/pom.xml +++ b/restapi-call-node/features/ccsdk-restapi-call-node/pom.xml @@ -7,13 +7,13 @@ org.onap.ccsdk.parent single-feature-parent - 1.1.1 + 1.2.0-SNAPSHOT org.onap.ccsdk.sli.plugins ccsdk-restapi-call-node - 0.3.1-SNAPSHOT + 0.4.0-SNAPSHOT feature ccsdk-sli-plugins :: restapi-call-node :: ${project.artifactId} 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 aeb5ad6e1..d6b4a2635 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 @@ org.onap.ccsdk.parent feature-repo-parent - 1.1.1 + 1.2.0-SNAPSHOT org.onap.ccsdk.sli.plugins features-restapi-call-node - 0.3.1-SNAPSHOT + 0.4.0-SNAPSHOT feature ccsdk-sli-plugins :: restapi-call-node :: ${project.artifactId} diff --git a/restapi-call-node/features/pom.xml b/restapi-call-node/features/pom.xml index 89458bf9a..36f9d28fe 100755 --- a/restapi-call-node/features/pom.xml +++ b/restapi-call-node/features/pom.xml @@ -5,12 +5,12 @@ org.onap.ccsdk.parent odlparent-lite - 1.1.1 + 1.2.0-SNAPSHOT org.onap.ccsdk.sli.plugins restapi-call-node-features - 0.3.1-SNAPSHOT + 0.4.0-SNAPSHOT pom ccsdk-sli-plugins :: restapi-call-node :: ${project.artifactId} diff --git a/restapi-call-node/installer/pom.xml b/restapi-call-node/installer/pom.xml index 97214a702..9bbcf2a08 100755 --- a/restapi-call-node/installer/pom.xml +++ b/restapi-call-node/installer/pom.xml @@ -5,12 +5,12 @@ org.onap.ccsdk.parent odlparent-lite - 1.1.1 + 1.2.0-SNAPSHOT org.onap.ccsdk.sli.plugins restapi-call-node-installer - 0.3.1-SNAPSHOT + 0.4.0-SNAPSHOT pom ccsdk-sli-plugins :: restapi-call-node :: ${project.artifactId} diff --git a/restapi-call-node/pom.xml b/restapi-call-node/pom.xml index 674e5dd21..cdfee6bf4 100755 --- a/restapi-call-node/pom.xml +++ b/restapi-call-node/pom.xml @@ -5,12 +5,12 @@ org.onap.ccsdk.parent odlparent-lite - 1.1.1 + 1.2.0-SNAPSHOT org.onap.ccsdk.sli.plugins restapi-call-node - 0.3.1-SNAPSHOT + 0.4.0-SNAPSHOT pom ccsdk-sli-plugins :: restapi-call-node diff --git a/restapi-call-node/provider/pom.xml b/restapi-call-node/provider/pom.xml index bdd980fec..5423292f1 100755 --- a/restapi-call-node/provider/pom.xml +++ b/restapi-call-node/provider/pom.xml @@ -6,12 +6,12 @@ org.onap.ccsdk.parent binding-parent - 1.1.1 + 1.2.0-SNAPSHOT org.onap.ccsdk.sli.plugins restapi-call-node-provider - 0.3.1-SNAPSHOT + 0.4.0-SNAPSHOT bundle ccsdk-sli-plugins :: restapi-call-node :: ${project.artifactId} diff --git a/restconf-client/features/ccsdk-restconf-client/pom.xml b/restconf-client/features/ccsdk-restconf-client/pom.xml index 1c45de213..82eba3bd1 100644 --- a/restconf-client/features/ccsdk-restconf-client/pom.xml +++ b/restconf-client/features/ccsdk-restconf-client/pom.xml @@ -7,13 +7,13 @@ org.onap.ccsdk.parent single-feature-parent - 1.1.1 + 1.2.0-SNAPSHOT org.onap.ccsdk.sli.plugins ccsdk-restconf-client - 0.3.1-SNAPSHOT + 0.4.0-SNAPSHOT feature diff --git a/restconf-client/features/features-restconf-client/pom.xml b/restconf-client/features/features-restconf-client/pom.xml index bd42f8cf0..910e86574 100644 --- a/restconf-client/features/features-restconf-client/pom.xml +++ b/restconf-client/features/features-restconf-client/pom.xml @@ -5,13 +5,13 @@ org.onap.ccsdk.parent feature-repo-parent - 1.1.1 + 1.2.0-SNAPSHOT org.onap.ccsdk.sli.plugins features-restconf-client - 0.3.1-SNAPSHOT + 0.4.0-SNAPSHOT feature ccsdk-sli-plugins :: restconf-client :: ${project.artifactId} diff --git a/restconf-client/features/pom.xml b/restconf-client/features/pom.xml index 7c0a89ff7..df2abb123 100755 --- a/restconf-client/features/pom.xml +++ b/restconf-client/features/pom.xml @@ -5,12 +5,12 @@ org.onap.ccsdk.parent odlparent-lite - 1.1.1 + 1.2.0-SNAPSHOT org.onap.ccsdk.sli.plugins restconf-client-features - 0.3.1-SNAPSHOT + 0.4.0-SNAPSHOT pom ccsdk-sli-plugins :: restconf-client :: ${project.artifactId} diff --git a/restconf-client/installer/pom.xml b/restconf-client/installer/pom.xml index 965786427..23306c7cd 100755 --- a/restconf-client/installer/pom.xml +++ b/restconf-client/installer/pom.xml @@ -6,12 +6,12 @@ org.onap.ccsdk.parent odlparent-lite - 1.1.1 + 1.2.0-SNAPSHOT org.onap.ccsdk.sli.plugins restconf-client-installer - 0.3.1-SNAPSHOT + 0.4.0-SNAPSHOT pom ccsdk-sli-plugins :: restconf-client :: ${project.artifactId} diff --git a/restconf-client/pom.xml b/restconf-client/pom.xml index fbfdf0710..4a2609a9b 100755 --- a/restconf-client/pom.xml +++ b/restconf-client/pom.xml @@ -5,12 +5,12 @@ org.onap.ccsdk.parent odlparent-lite - 1.1.1 + 1.2.0-SNAPSHOT org.onap.ccsdk.sli.plugins restconf-client - 0.3.1-SNAPSHOT + 0.4.0-SNAPSHOT pom ccsdk-sli-plugins :: restconf-client diff --git a/restconf-client/provider/pom.xml b/restconf-client/provider/pom.xml index cfa374548..2618b5cca 100755 --- a/restconf-client/provider/pom.xml +++ b/restconf-client/provider/pom.xml @@ -6,12 +6,12 @@ org.onap.ccsdk.parent binding-parent - 1.1.1 + 1.2.0-SNAPSHOT org.onap.ccsdk.sli.plugins restconf-client-provider - 0.3.1-SNAPSHOT + 0.4.0-SNAPSHOT bundle ccsdk-sli-plugins :: restconf-client :: ${project.artifactId} @@ -39,7 +39,7 @@ org.onap.ccsdk.sli.plugins properties-node-provider - 0.3.1-SNAPSHOT + 0.4.0-SNAPSHOT org.opendaylight.yangtools @@ -63,7 +63,7 @@ org.onap.ccsdk.sli.plugins restapi-call-node-provider - 0.3.1-SNAPSHOT + 0.4.0-SNAPSHOT org.opendaylight.netconf 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 1cd200c33..cb42fcf18 100644 --- a/sshapi-call-node/features/ccsdk-sshapi-call-node/pom.xml +++ b/sshapi-call-node/features/ccsdk-sshapi-call-node/pom.xml @@ -7,13 +7,13 @@ org.onap.ccsdk.parent single-feature-parent - 1.1.1 + 1.2.0-SNAPSHOT org.onap.ccsdk.sli.plugins ccsdk-sshapi-call-node - 0.3.1-SNAPSHOT + 0.4.0-SNAPSHOT feature ccsdk-sli-plugins :: sshapi-call-node :: ${project.artifactId} 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 f566268fb..482c83f7b 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 @@ org.onap.ccsdk.parent feature-repo-parent - 1.1.1 + 1.2.0-SNAPSHOT org.onap.ccsdk.sli.plugins features-sshapi-call-node - 0.3.1-SNAPSHOT + 0.4.0-SNAPSHOT feature ccsdk-sli-plugins :: sshapi-call-node :: ${project.artifactId} diff --git a/sshapi-call-node/features/pom.xml b/sshapi-call-node/features/pom.xml index 1327b7768..25acf571d 100755 --- a/sshapi-call-node/features/pom.xml +++ b/sshapi-call-node/features/pom.xml @@ -7,12 +7,12 @@ org.onap.ccsdk.parent odlparent-lite - 1.1.1 + 1.2.0-SNAPSHOT org.onap.ccsdk.sli.plugins sshapi-call-node-features - 0.3.1-SNAPSHOT + 0.4.0-SNAPSHOT pom ccsdk-sli-plugins :: sshapi-call-node :: ${project.artifactId} diff --git a/sshapi-call-node/installer/pom.xml b/sshapi-call-node/installer/pom.xml index 86b3cb23b..3adfb69f4 100755 --- a/sshapi-call-node/installer/pom.xml +++ b/sshapi-call-node/installer/pom.xml @@ -5,12 +5,12 @@ org.onap.ccsdk.parent odlparent-lite - 1.1.1 + 1.2.0-SNAPSHOT org.onap.ccsdk.sli.plugins sshapi-call-node-installer - 0.3.1-SNAPSHOT + 0.4.0-SNAPSHOT pom ccsdk-sli-plugins :: sshapi-call-node :: ${project.artifactId} diff --git a/sshapi-call-node/pom.xml b/sshapi-call-node/pom.xml index 9f2cb8955..88456c5ed 100755 --- a/sshapi-call-node/pom.xml +++ b/sshapi-call-node/pom.xml @@ -5,12 +5,12 @@ org.onap.ccsdk.parent odlparent-lite - 1.1.1 + 1.2.0-SNAPSHOT org.onap.ccsdk.sli.plugins sshapi-call-node - 0.3.1-SNAPSHOT + 0.4.0-SNAPSHOT pom ccsdk-sli-plugins :: sshapi-call-node diff --git a/sshapi-call-node/provider/pom.xml b/sshapi-call-node/provider/pom.xml index e6787d642..91ecfabca 100755 --- a/sshapi-call-node/provider/pom.xml +++ b/sshapi-call-node/provider/pom.xml @@ -5,12 +5,12 @@ org.onap.ccsdk.parent binding-parent - 1.1.1 + 1.2.0-SNAPSHOT org.onap.ccsdk.sli.plugins sshapi-call-node-provider - 0.3.1-SNAPSHOT + 0.4.0-SNAPSHOT bundle ccsdk-sli-plugins :: sshapi-call-node :: ${project.artifactId} diff --git a/template-node/features/ccsdk-template-node/pom.xml b/template-node/features/ccsdk-template-node/pom.xml index e926a439e..f544fb5a1 100644 --- a/template-node/features/ccsdk-template-node/pom.xml +++ b/template-node/features/ccsdk-template-node/pom.xml @@ -5,13 +5,13 @@ org.onap.ccsdk.parent single-feature-parent - 1.1.1 + 1.2.0-SNAPSHOT org.onap.ccsdk.sli.plugins ccsdk-template-node - 0.3.1-SNAPSHOT + 0.4.0-SNAPSHOT feature diff --git a/template-node/features/features-template-node/pom.xml b/template-node/features/features-template-node/pom.xml index b6cf4cc9c..7a61f8caa 100644 --- a/template-node/features/features-template-node/pom.xml +++ b/template-node/features/features-template-node/pom.xml @@ -5,13 +5,13 @@ org.onap.ccsdk.parent feature-repo-parent - 1.1.1 + 1.2.0-SNAPSHOT org.onap.ccsdk.sli.plugins features-template-node - 0.3.1-SNAPSHOT + 0.4.0-SNAPSHOT feature diff --git a/template-node/features/pom.xml b/template-node/features/pom.xml index 9c4cabd3e..3b9688ed2 100644 --- a/template-node/features/pom.xml +++ b/template-node/features/pom.xml @@ -5,12 +5,12 @@ org.onap.ccsdk.parent odlparent-lite - 1.1.1 + 1.2.0-SNAPSHOT org.onap.ccsdk.sli.plugins template-node-features - 0.3.1-SNAPSHOT + 0.4.0-SNAPSHOT pom diff --git a/template-node/installer/pom.xml b/template-node/installer/pom.xml index fa07539b8..fb1cd1f2f 100644 --- a/template-node/installer/pom.xml +++ b/template-node/installer/pom.xml @@ -5,12 +5,12 @@ org.onap.ccsdk.parent odlparent-lite - 1.1.1 + 1.2.0-SNAPSHOT org.onap.ccsdk.sli.plugins template-node-installer - 0.3.1-SNAPSHOT + 0.4.0-SNAPSHOT pom diff --git a/template-node/pom.xml b/template-node/pom.xml index 40bb39da8..8cfea743b 100644 --- a/template-node/pom.xml +++ b/template-node/pom.xml @@ -5,12 +5,12 @@ org.onap.ccsdk.parent odlparent-lite - 1.1.1 + 1.2.0-SNAPSHOT org.onap.ccsdk.sli.plugins template-node - 0.3.1-SNAPSHOT + 0.4.0-SNAPSHOT pom diff --git a/template-node/provider/pom.xml b/template-node/provider/pom.xml index a8e1de026..456cb19c4 100644 --- a/template-node/provider/pom.xml +++ b/template-node/provider/pom.xml @@ -5,12 +5,12 @@ org.onap.ccsdk.parent binding-parent - 1.1.1 + 1.2.0-SNAPSHOT org.onap.ccsdk.sli.plugins template-node-provider - 0.3.1-SNAPSHOT + 0.4.0-SNAPSHOT bundle diff --git a/version.properties b/version.properties index c5250c6c9..c8f383798 100644 --- a/version.properties +++ b/version.properties @@ -6,11 +6,11 @@ # Comment release_name=0 -sprint_number=3 -feature_revision=1 +sprint_number=4 +feature_revision=0 base_version=${release_name}.${sprint_number}.${feature_revision} -release_version=${base_version} +release_version=${base_version}-STAGING snapshot_version=${base_version}-SNAPSHOT -- cgit 1.2.3-korg From 69d612621915cf9793b5e8c5a4e9ec42187a557d Mon Sep 17 00:00:00 2001 From: Vidyashree Rama Date: Thu, 25 Oct 2018 14:50:31 +0530 Subject: Add authorization header in SSE request Add authorization header in SSE request to support https Issue-ID: CCSDK-628 Change-Id: I031cbed94e21e1f6d90bc0b00b2d70905d47bd69 Signed-off-by: Vidyashree Rama --- .../sli/plugins/restapicall/RestapiCallNode.java | 2 +- .../AdditionalHeaderWebTarget.java | 162 +++++++++++++++++++++ .../restconfdiscovery/RestconfDiscoveryNode.java | 75 +++++++++- .../plugins/restconfdiscovery/SseServerMock.java | 2 +- .../TestRestconfDiscoveryNode.java | 21 +++ 5 files changed, 255 insertions(+), 7 deletions(-) create mode 100644 restconf-client/provider/src/main/java/org/onap/ccsdk/sli/plugins/restconfdiscovery/AdditionalHeaderWebTarget.java (limited to 'restconf-client/provider') diff --git a/restapi-call-node/provider/src/main/java/org/onap/ccsdk/sli/plugins/restapicall/RestapiCallNode.java b/restapi-call-node/provider/src/main/java/org/onap/ccsdk/sli/plugins/restapicall/RestapiCallNode.java index 9a89af6b5..39399a25a 100644 --- a/restapi-call-node/provider/src/main/java/org/onap/ccsdk/sli/plugins/restapicall/RestapiCallNode.java +++ b/restapi-call-node/provider/src/main/java/org/onap/ccsdk/sli/plugins/restapicall/RestapiCallNode.java @@ -543,7 +543,7 @@ public class RestapiCallNode implements SvcLogicJavaPlugin { return addAuthType(c, p); } - protected Client addAuthType(Client client, Parameters p) throws SvcLogicException { + public Client addAuthType(Client client, Parameters p) throws SvcLogicException { if (p.authtype == AuthType.Unspecified) { if (p.restapiUser != null && p.restapiPassword != null) { client.register(HttpAuthenticationFeature.basic(p.restapiUser, p.restapiPassword)); diff --git a/restconf-client/provider/src/main/java/org/onap/ccsdk/sli/plugins/restconfdiscovery/AdditionalHeaderWebTarget.java b/restconf-client/provider/src/main/java/org/onap/ccsdk/sli/plugins/restconfdiscovery/AdditionalHeaderWebTarget.java new file mode 100644 index 000000000..1a0ddbc5f --- /dev/null +++ b/restconf-client/provider/src/main/java/org/onap/ccsdk/sli/plugins/restconfdiscovery/AdditionalHeaderWebTarget.java @@ -0,0 +1,162 @@ +/*- + * ============LICENSE_START======================================================= + * ONAP - CCSDK + * ================================================================================ + * Copyright (C) 2018 Huawei Technologies Co., Ltd. All rights reserved. + * ================================================================================ + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============LICENSE_END========================================================= + */ + +package org.onap.ccsdk.sli.plugins.restconfdiscovery; + +import javax.ws.rs.client.Invocation; +import javax.ws.rs.client.WebTarget; +import javax.ws.rs.core.Configuration; +import javax.ws.rs.core.MediaType; +import javax.ws.rs.core.UriBuilder; +import java.net.URI; +import java.util.Map; + +/** + * Adds additional headers for SSE request. + */ +class AdditionalHeaderWebTarget implements WebTarget { + private WebTarget base; + private String token; + + public AdditionalHeaderWebTarget(WebTarget target, String token) { + base = target; + this.token = token; + } + + @Override + public Invocation.Builder request() { + return base.request().header("X-ACCESS-TOKEN", token); + } + + @Override + public Invocation.Builder request(String... acceptedResponseTypes) { + return base.request().header("X-ACCESS-TOKEN", token); + } + + @Override + public Invocation.Builder request(MediaType... acceptedResponseTypes) { + return base.request().header("X-ACCESS-TOKEN", token); + } + + @Override + public Configuration getConfiguration() { + return base.getConfiguration(); + } + + @Override + public URI getUri() { + return base.getUri(); + } + + @Override + public UriBuilder getUriBuilder() { + return base.getUriBuilder(); + } + + @Override + public WebTarget path(String path) { + return base.path(path); + } + + @Override + public WebTarget resolveTemplate(String name, Object value) { + return base.resolveTemplate(name, value); + } + + @Override + public WebTarget resolveTemplate(String name, Object value, boolean encodeSlashInPath) { + return base.resolveTemplate(name, value, encodeSlashInPath); + } + + @Override + public WebTarget resolveTemplateFromEncoded(String name, Object value) { + return base.resolveTemplateFromEncoded(name, value); + } + + @Override + public WebTarget resolveTemplates(Map templateValues) { + return base.resolveTemplates(templateValues); + } + + @Override + public WebTarget resolveTemplates(Map templateValues, boolean encodeSlashInPath) { + return base.resolveTemplates(templateValues, encodeSlashInPath); + } + + @Override + public WebTarget resolveTemplatesFromEncoded(Map templateValues) { + return base.resolveTemplatesFromEncoded(templateValues); + } + + @Override + public WebTarget matrixParam(String name, Object... values) { + return base.matrixParam(name, values); + } + + @Override + public WebTarget queryParam(String name, Object... values) { + return base.queryParam(name, values); + } + + @Override + public WebTarget property(String name, Object value) { + return base.property(name, value); + } + + @Override + public WebTarget register(Class componentClass) { + return base.register(componentClass); + } + + @Override + public WebTarget register(Class componentClass, int priority) { + return base.register(componentClass, priority); + } + + @Override + public WebTarget register(Class componentClass, Class... contracts) { + return base.register(componentClass, contracts); + } + + @Override + public WebTarget register(Class componentClass, Map, Integer> contracts) { + return base.register(componentClass, contracts); + } + + @Override + public WebTarget register(Object component) { + return base.register(component); + } + + @Override + public WebTarget register(Object component, int priority) { + return base.register(component, priority); + } + + @Override + public WebTarget register(Object component, Class... contracts) { + return base.register(component, contracts); + } + + @Override + public WebTarget register(Object component, Map, Integer> contracts) { + return base.register(component, contracts); + } +} diff --git a/restconf-client/provider/src/main/java/org/onap/ccsdk/sli/plugins/restconfdiscovery/RestconfDiscoveryNode.java b/restconf-client/provider/src/main/java/org/onap/ccsdk/sli/plugins/restconfdiscovery/RestconfDiscoveryNode.java index 111d62847..5c7d695d9 100644 --- a/restconf-client/provider/src/main/java/org/onap/ccsdk/sli/plugins/restconfdiscovery/RestconfDiscoveryNode.java +++ b/restconf-client/provider/src/main/java/org/onap/ccsdk/sli/plugins/restconfdiscovery/RestconfDiscoveryNode.java @@ -24,12 +24,21 @@ import org.glassfish.jersey.media.sse.EventSource; import org.glassfish.jersey.media.sse.SseFeature; import org.onap.ccsdk.sli.core.sli.SvcLogicContext; import org.onap.ccsdk.sli.core.sli.SvcLogicException; +import org.onap.ccsdk.sli.plugins.restapicall.Parameters; +import org.onap.ccsdk.sli.plugins.restapicall.RestapiCallNode; import org.onap.ccsdk.sli.plugins.restconfapicall.RestconfApiCallNode; import org.slf4j.Logger; +import javax.net.ssl.SSLContext; +import javax.net.ssl.TrustManager; +import javax.net.ssl.X509TrustManager; import javax.ws.rs.client.Client; import javax.ws.rs.client.ClientBuilder; import javax.ws.rs.client.WebTarget; +import java.security.KeyManagementException; +import java.security.NoSuchAlgorithmException; +import java.security.cert.CertificateException; +import java.security.cert.X509Certificate; import java.util.Map; import java.util.concurrent.ConcurrentHashMap; import java.util.concurrent.ExecutorService; @@ -115,9 +124,11 @@ public class RestconfDiscoveryNode implements SvcLogicDiscoveryPlugin { class PersistentConnection implements Runnable { private String url; private volatile boolean running = true; + private Map paramMap; - PersistentConnection(String url) { + PersistentConnection(String url, Map paramMap) { this.url = url; + this.paramMap = paramMap; } private void terminate() { @@ -126,15 +137,26 @@ public class RestconfDiscoveryNode implements SvcLogicDiscoveryPlugin { @Override public void run() { - Client client = ClientBuilder.newBuilder() - .register(SseFeature.class).build(); - WebTarget target = client.target(url); + Parameters p; + WebTarget target = null; + try { + RestapiCallNode restapi = restconfApiCallNode.getRestapiCallNode(); + p = restapi.getParameters(paramMap, new Parameters()); + Client client = ignoreSslClient().register(SseFeature.class); + target = restapi.addAuthType(client, p).target(url); + } catch (SvcLogicException e) { + log.error("Exception occured!", e); + Thread.currentThread().interrupt(); + } + + target = addToken(target, paramMap.get("customHttpHeaders")); EventSource eventSource = EventSource.target(target).build(); eventSource.register(new EventHandler(RestconfDiscoveryNode.this)); eventSource.open(); log.info("Connected to SSE source"); while (running) { try { + log.info("SSE state " + eventSource.isOpen()); Thread.sleep(5000); } catch (InterruptedException e) { log.error("Interrupted!", e); @@ -146,6 +168,49 @@ public class RestconfDiscoveryNode implements SvcLogicDiscoveryPlugin { } } + private Client ignoreSslClient() { + SSLContext sslcontext = null; + + try { + sslcontext = SSLContext.getInstance("TLS"); + sslcontext.init(null, new TrustManager[]{new X509TrustManager() { + @Override + public void checkClientTrusted(X509Certificate[] arg0, String arg1) throws CertificateException { + } + + @Override + public void checkServerTrusted(X509Certificate[] arg0, String arg1) throws CertificateException { + } + + @Override + public X509Certificate[] getAcceptedIssuers() { + return new X509Certificate[0]; + } + } }, new java.security.SecureRandom()); + } catch (NoSuchAlgorithmException | KeyManagementException e) { + throw new IllegalStateException(e); + } + + return ClientBuilder.newBuilder().sslContext(sslcontext).hostnameVerifier((s1, s2) -> true).build(); + } + + protected String getTokenId(String customHttpHeaders) { + if (customHttpHeaders.contains("=")) { + String s[] = customHttpHeaders.split("="); + return s[1]; + } + return customHttpHeaders; + } + + protected WebTarget addToken(WebTarget target, String customHttpHeaders) { + if (customHttpHeaders == null) { + return target; + } + + return new AdditionalHeaderWebTarget( + target, getTokenId(customHttpHeaders)); + } + /** * Establishes a persistent between the client and server. * @@ -167,7 +232,7 @@ public class RestconfDiscoveryNode implements SvcLogicDiscoveryPlugin { subscriptionInfoMap.put(id, info); String url = paramMap.get(SSE_URL); - PersistentConnection connection = new PersistentConnection(url); + PersistentConnection connection = new PersistentConnection(url, paramMap); runnableInfo.put(id, connection); executor.execute(connection); } diff --git a/restconf-client/provider/src/test/java/org/onap/ccsdk/sli/plugins/restconfdiscovery/SseServerMock.java b/restconf-client/provider/src/test/java/org/onap/ccsdk/sli/plugins/restconfdiscovery/SseServerMock.java index 1b234a236..35ac221fb 100644 --- a/restconf-client/provider/src/test/java/org/onap/ccsdk/sli/plugins/restconfdiscovery/SseServerMock.java +++ b/restconf-client/provider/src/test/java/org/onap/ccsdk/sli/plugins/restconfdiscovery/SseServerMock.java @@ -35,7 +35,7 @@ public class SseServerMock { @Produces(SseFeature.SERVER_SENT_EVENTS) public EventOutput getServerSentEvents() throws IOException { String data = "{" + - "\"ietf-notification:notification\" : {" + + "\"ietf-restconf:notification\" : {" + " \"eventTime\" : \"2017-10-25T08:22:33.44Z\"," + " \"ietf-yang-push:push-change-update\": {" + "\"subscription-id\":\"89\"," + diff --git a/restconf-client/provider/src/test/java/org/onap/ccsdk/sli/plugins/restconfdiscovery/TestRestconfDiscoveryNode.java b/restconf-client/provider/src/test/java/org/onap/ccsdk/sli/plugins/restconfdiscovery/TestRestconfDiscoveryNode.java index b2094ca73..af354e9bf 100644 --- a/restconf-client/provider/src/test/java/org/onap/ccsdk/sli/plugins/restconfdiscovery/TestRestconfDiscoveryNode.java +++ b/restconf-client/provider/src/test/java/org/onap/ccsdk/sli/plugins/restconfdiscovery/TestRestconfDiscoveryNode.java @@ -57,6 +57,13 @@ public class TestRestconfDiscoveryNode { p.put("sseConnectURL", "http://localhost:8080/events"); p.put("subscriberId", "networkId"); p.put("responsePrefix", "restapi-result"); + p.put("restapiUser", "access"); + p.put("restapiPassword", "abc@123"); + p.put("customHttpHeaders", "X-ACCESS-TOKEN=x-ik2ps4ikvzupbx0486ft" + + "1ebzs7rt85futh9ho6eofy3wjsap7wqktemlqm4bbsmnar3vrtbyrzuk" + + "bv5itd6m1cftldpjarnyle3sdcqq9hftc4lebz464b5ffxmlbvg9"); + p.put("restapiUrl", "https://localhost:8080/restconf/operations/" + + "ietf-subscribed-notifications:establish-subscription"); RestconfDiscoveryNode rdn = new RestconfDiscoveryNode( new RestconfApiCallNode(new RestapiCallNode())); rdn.establishPersistentConnection(p, ctx, "networkId"); @@ -111,4 +118,18 @@ public class TestRestconfDiscoveryNode { assertThat(rdn.getOutputIdentifier("restapi-result", ctx), is("89")); } + + @Test + public void testGetTokenId() { + String customHttpHeaders = "X-ACCESS-TOKEN=x-ik2ps4ikvzupbx0486ft1ebzs7rt85" + + "futh9ho6eofy3wjsap7wqktemlqm4bbsmnar3vrtbyrzukbv5itd6m1cftldpjarny" + + "le3sdcqq9hftc4lebz464b5ffxmlbvg9"; + RestconfDiscoveryNode rdn = new RestconfDiscoveryNode( + new RestconfApiCallNode(new RestapiCallNode())); + + assertThat(rdn.getTokenId(customHttpHeaders), + is("x-ik2ps4ikvzupbx0486ft1ebzs7rt85futh9ho6eofy3wjsap7wqkt" + + "emlqm4bbsmnar3vrtbyrzukbv5itd6m1cftldpjarnyle3sdcqq9h" + + "ftc4lebz464b5ffxmlbvg9")); + } } -- cgit 1.2.3-korg From 88628ba71be31e9a9863accd450472aa3f3c51f8 Mon Sep 17 00:00:00 2001 From: janani b Date: Mon, 26 Nov 2018 12:59:03 +0530 Subject: Restconf Discovery Node bug fix COLON removal while updating to ctx param from JSON reply of notification Issue-ID: CCSDK-745 Change-Id: I4af4de47a550a7f6b47216409484d9a0ab3acdfb Signed-off-by: janani b --- .../onap/ccsdk/sli/plugins/restconfdiscovery/EventProcessor.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'restconf-client/provider') diff --git a/restconf-client/provider/src/main/java/org/onap/ccsdk/sli/plugins/restconfdiscovery/EventProcessor.java b/restconf-client/provider/src/main/java/org/onap/ccsdk/sli/plugins/restconfdiscovery/EventProcessor.java index e46e47a9b..0eed42c64 100644 --- a/restconf-client/provider/src/main/java/org/onap/ccsdk/sli/plugins/restconfdiscovery/EventProcessor.java +++ b/restconf-client/provider/src/main/java/org/onap/ccsdk/sli/plugins/restconfdiscovery/EventProcessor.java @@ -27,7 +27,7 @@ import org.slf4j.LoggerFactory; import java.util.Map; -import static org.onap.ccsdk.sli.plugins.prop.JsonParser.convertToProperties; +import static org.onap.ccsdk.sli.plugins.restapicall.JsonParser.convertToProperties; import static org.slf4j.LoggerFactory.getLogger; /** @@ -38,8 +38,8 @@ class EventProcessor implements Runnable { private static final Logger log = getLogger(EventProcessor.class); private RestconfDiscoveryNode node; - private static final String EVENT_SUBSCRIPTION_ID = "ietf-restconf:" + - "notification.ietf-yang-push:push-change-update.subscription-id"; + private static final String EVENT_SUBSCRIPTION_ID = "notification." + + "push-change-update.subscription-id"; public EventProcessor(RestconfDiscoveryNode node) { this.node = node; -- cgit 1.2.3-korg From d0ecfcdedbf5bf2084d41580791fca34557ba2ee Mon Sep 17 00:00:00 2001 From: Arundathi Patil Date: Mon, 17 Dec 2018 22:12:17 +0530 Subject: Sonar Fix: RestconfApiUtils.java Fixed sonar issues/code-smells across this file Issue-ID: CCSDK-847 Change-Id: I5e528e23d8691fffca9b3732b7ff5e68a4827162 Signed-off-by: Arundathi Patil --- .../org/onap/ccsdk/sli/plugins/restconfapicall/RestconfApiUtils.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'restconf-client/provider') 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 3a0b5fb35..c5c7a919b 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 @@ -3,6 +3,8 @@ * ONAP - CCSDK * ================================================================================ * Copyright (C) 2018 Huawei Technologies Co., Ltd. All rights reserved. + * + * Modifications Copyright © 2018 IBM. * ================================================================================ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -240,7 +242,7 @@ public final class RestconfApiUtils { * @return updated XML request message */ static String getUpdatedXmlReq(String req, String nodeName, String modNs) { - String rootNode = "\n<" + nodeName + " xmlns=\"" + modNs.toString() + + String rootNode = "\n<" + nodeName + " xmlns=\"" + modNs + "\">\n"; req = req.replaceFirst("\n", rootNode); req = req + ""; -- cgit 1.2.3-korg From 62e62331a294052109f02686e4529fe613355990 Mon Sep 17 00:00:00 2001 From: Arundathi Patil Date: Thu, 20 Dec 2018 23:04:44 +0530 Subject: Sonar fix: AdditionalHeaderWebTarget.java Fixed sonar issues/code-smells across this file Issue-ID: CCSDK-868 Change-Id: I9a6d0d7791838bf8bc524c7b108df3752cc1a24c Signed-off-by: Arundathi Patil --- .../plugins/restconfdiscovery/AdditionalHeaderWebTarget.java | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) (limited to 'restconf-client/provider') diff --git a/restconf-client/provider/src/main/java/org/onap/ccsdk/sli/plugins/restconfdiscovery/AdditionalHeaderWebTarget.java b/restconf-client/provider/src/main/java/org/onap/ccsdk/sli/plugins/restconfdiscovery/AdditionalHeaderWebTarget.java index 1a0ddbc5f..3213cae15 100644 --- a/restconf-client/provider/src/main/java/org/onap/ccsdk/sli/plugins/restconfdiscovery/AdditionalHeaderWebTarget.java +++ b/restconf-client/provider/src/main/java/org/onap/ccsdk/sli/plugins/restconfdiscovery/AdditionalHeaderWebTarget.java @@ -3,6 +3,8 @@ * ONAP - CCSDK * ================================================================================ * Copyright (C) 2018 Huawei Technologies Co., Ltd. All rights reserved. + * + * Modifications Copyright © 2018 IBM * ================================================================================ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -35,6 +37,8 @@ class AdditionalHeaderWebTarget implements WebTarget { private WebTarget base; private String token; + private String accessToken = "X-ACCESS-TOKEN"; + public AdditionalHeaderWebTarget(WebTarget target, String token) { base = target; this.token = token; @@ -42,17 +46,17 @@ class AdditionalHeaderWebTarget implements WebTarget { @Override public Invocation.Builder request() { - return base.request().header("X-ACCESS-TOKEN", token); + return base.request().header(accessToken, token); } @Override public Invocation.Builder request(String... acceptedResponseTypes) { - return base.request().header("X-ACCESS-TOKEN", token); + return base.request().header(accessToken, token); } @Override public Invocation.Builder request(MediaType... acceptedResponseTypes) { - return base.request().header("X-ACCESS-TOKEN", token); + return base.request().header(accessToken, token); } @Override -- cgit 1.2.3-korg From e6e3164b0c4e583593d5d9bd10f2de2485a056f6 Mon Sep 17 00:00:00 2001 From: Arundathi Patil Date: Fri, 28 Dec 2018 23:36:14 +0530 Subject: Sonar fix: EventProcessor.java Fixed sonar issues/code-smells across this file Issue-ID: CCSDK-880 Change-Id: Icfb71fec369ec34944db7e57268e5d1e08af8c42 Signed-off-by: Arundathi Patil --- .../org/onap/ccsdk/sli/plugins/restconfdiscovery/EventProcessor.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'restconf-client/provider') diff --git a/restconf-client/provider/src/main/java/org/onap/ccsdk/sli/plugins/restconfdiscovery/EventProcessor.java b/restconf-client/provider/src/main/java/org/onap/ccsdk/sli/plugins/restconfdiscovery/EventProcessor.java index 0eed42c64..4f28072d3 100644 --- a/restconf-client/provider/src/main/java/org/onap/ccsdk/sli/plugins/restconfdiscovery/EventProcessor.java +++ b/restconf-client/provider/src/main/java/org/onap/ccsdk/sli/plugins/restconfdiscovery/EventProcessor.java @@ -3,6 +3,8 @@ * ONAP - CCSDK * ================================================================================ * Copyright (C) 2018 Huawei Technologies Co., Ltd. All rights reserved. + * + * Modifications Copyright © 2018 IBM * ================================================================================ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -23,7 +25,6 @@ package org.onap.ccsdk.sli.plugins.restconfdiscovery; import org.onap.ccsdk.sli.core.sli.SvcLogicContext; import org.onap.ccsdk.sli.core.sli.SvcLogicException; import org.slf4j.Logger; -import org.slf4j.LoggerFactory; import java.util.Map; -- cgit 1.2.3-korg From d2a1f4b8723a7c0205e3b70dc5e819416a7f97a3 Mon Sep 17 00:00:00 2001 From: Arundathi Patil Date: Tue, 1 Jan 2019 12:27:52 +0530 Subject: Sonar Fix: YangParameters.java Fixed sonar issues/code-smells across this file Issue-ID: CCSDK-884 Change-Id: I20949cb665dfd4c1a28cce5fb629a30057a80dbc Signed-off-by: Arundathi Patil --- .../plugins/yangserializers/dfserializer/YangParameters.java | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) (limited to 'restconf-client/provider') diff --git a/restconf-client/provider/src/main/java/org/onap/ccsdk/sli/plugins/yangserializers/dfserializer/YangParameters.java b/restconf-client/provider/src/main/java/org/onap/ccsdk/sli/plugins/yangserializers/dfserializer/YangParameters.java index c94a22975..8eb3fb6e8 100644 --- a/restconf-client/provider/src/main/java/org/onap/ccsdk/sli/plugins/yangserializers/dfserializer/YangParameters.java +++ b/restconf-client/provider/src/main/java/org/onap/ccsdk/sli/plugins/yangserializers/dfserializer/YangParameters.java @@ -4,6 +4,8 @@ * ================================================================================ * Copyright (C) 2018 Huawei Technologies Co., Ltd. All rights reserved. * ================================================================================ + * Modifications Copyright © 2018 IBM + * ================================================================================ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at @@ -26,6 +28,10 @@ import org.onap.ccsdk.sli.plugins.restapicall.Parameters; * Representation of the YANG parameters for the restconf api call node. */ public class YangParameters extends Parameters { + /** + * Directory path of the YANG file. + */ + public String dirPath; /** * Creates an instance of the YANG parameters. @@ -33,9 +39,4 @@ public class YangParameters extends Parameters { public YangParameters() { super(); } - - /** - * Directory path of the YANG file. - */ - public String dirPath; } -- cgit 1.2.3-korg From 970e528c4996b4994d3e40d1c3a2296af4760563 Mon Sep 17 00:00:00 2001 From: Arundathi Patil Date: Tue, 1 Jan 2019 12:44:46 +0530 Subject: Sonar fix: LeafNode.java Fixed sonar issues/code-smells across this file Issue-ID: CCSDK-886 Change-Id: I7a5b73549b98571e207e0ed70e49873785478e70 Signed-off-by: Arundathi Patil --- .../ccsdk/sli/plugins/yangserializers/pnserializer/LeafNode.java | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'restconf-client/provider') diff --git a/restconf-client/provider/src/main/java/org/onap/ccsdk/sli/plugins/yangserializers/pnserializer/LeafNode.java b/restconf-client/provider/src/main/java/org/onap/ccsdk/sli/plugins/yangserializers/pnserializer/LeafNode.java index c9cf95ba3..041175ca7 100644 --- a/restconf-client/provider/src/main/java/org/onap/ccsdk/sli/plugins/yangserializers/pnserializer/LeafNode.java +++ b/restconf-client/provider/src/main/java/org/onap/ccsdk/sli/plugins/yangserializers/pnserializer/LeafNode.java @@ -3,6 +3,8 @@ * ONAP - CCSDK * ================================================================================ * Copyright (C) 2018 Huawei Technologies Co., Ltd. All rights reserved. + * + * Modifications Copyright © 2018 IBM * ================================================================================ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -29,6 +31,7 @@ public class LeafNode extends PropertiesNode implements LeafListHolderChild, Dat private String value; private Namespace valueNs; + private static final String svcLogicException = "Leaf cannot hold child nodes"; /** * Creates an instance of leaf node. @@ -89,7 +92,7 @@ public class LeafNode extends PropertiesNode implements LeafListHolderChild, Dat public PropertiesNode addChild(String name, Namespace namespace, NodeType type, Object appInfo) throws SvcLogicException { - throw new SvcLogicException("Leaf cannot hold child nodes"); + throw new SvcLogicException(svcLogicException); } @Override @@ -97,7 +100,7 @@ public class LeafNode extends PropertiesNode implements LeafListHolderChild, Dat NodeType type, String value, Namespace valueNs, Object appInfo) throws SvcLogicException { - throw new SvcLogicException("Leaf cannot hold child nodes"); + throw new SvcLogicException(svcLogicException); } @Override @@ -105,7 +108,7 @@ public class LeafNode extends PropertiesNode implements LeafListHolderChild, Dat Namespace namespace, NodeType type, Object appInfo) throws SvcLogicException { - throw new SvcLogicException("Leaf cannot hold child nodes"); + throw new SvcLogicException(svcLogicException); } @Override -- cgit 1.2.3-korg From aab34607358d2a9f8f6dd1879dc3c5bc26e796b0 Mon Sep 17 00:00:00 2001 From: Arundathi Patil Date: Tue, 1 Jan 2019 12:39:07 +0530 Subject: Sonar fix: LeafListHolderNode.java Fixed sonar isues/code-smells across this file Issue-ID: CCSDK-885 Change-Id: I6c49463b3d0fa387caecc8023e2fdcac5a2c98c2 Signed-off-by: Arundathi Patil --- .../yangserializers/pnserializer/LeafListHolderNode.java | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) (limited to 'restconf-client/provider') diff --git a/restconf-client/provider/src/main/java/org/onap/ccsdk/sli/plugins/yangserializers/pnserializer/LeafListHolderNode.java b/restconf-client/provider/src/main/java/org/onap/ccsdk/sli/plugins/yangserializers/pnserializer/LeafListHolderNode.java index 985bc1da1..46ab5bb63 100644 --- a/restconf-client/provider/src/main/java/org/onap/ccsdk/sli/plugins/yangserializers/pnserializer/LeafListHolderNode.java +++ b/restconf-client/provider/src/main/java/org/onap/ccsdk/sli/plugins/yangserializers/pnserializer/LeafListHolderNode.java @@ -4,6 +4,8 @@ * ================================================================================ * Copyright (C) 2018 Huawei Technologies Co., Ltd. All rights reserved. * ================================================================================ + * Modifications Copyright © 2018 IBM + * ================================================================================ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at @@ -28,6 +30,8 @@ import org.onap.ccsdk.sli.core.sli.SvcLogicException; */ public class LeafListHolderNode extends HolderNode implements DataNodeChild { + private static final String node = " holder node"; + /** * Creates an instance of LeafListHolderNode. * @@ -50,7 +54,7 @@ public class LeafListHolderNode extends HolderNode implemen Namespace valueNs, Object appInfo) throws SvcLogicException { throw new SvcLogicException("Leaf cannot be child of leaf-list" + - " holder node"); + node); } @Override @@ -58,7 +62,7 @@ public class LeafListHolderNode extends HolderNode implemen NodeType type, Object appInfo) throws SvcLogicException { throw new SvcLogicException("Container cannot be child of leaf-list" + - " holder node"); + node); } @Override @@ -67,7 +71,7 @@ public class LeafListHolderNode extends HolderNode implemen NodeType type, Object appInfo) throws SvcLogicException { throw new SvcLogicException("List cannot be child of leaf-list" + - " holder node"); + node); } @Override -- cgit 1.2.3-korg From 1e3fada75a8990292c71878c13d9f8dd5a7c60f8 Mon Sep 17 00:00:00 2001 From: "Timoney, Dan (dt5972)" Date: Tue, 8 Jan 2019 12:39:26 -0500 Subject: Prepare for release build Prepare for release of early ODL-Oxygen based CCSDK Dublin Change-Id: I2ea09c398025c9578a2da8ff32360be9672292c7 Issue-ID: CCSDK-870 Signed-off-by: Timoney, Dan (dt5972) --- artifacts/pom.xml | 204 +++++++++-------- features/features-sli-plugins/pom.xml | 6 +- features/installer/pom.xml | 245 ++++++++++---------- features/pom.xml | 2 +- pom.xml | 2 +- .../features/ccsdk-properties-node/pom.xml | 19 +- .../features/features-properties-node/pom.xml | 46 ++-- properties-node/features/pom.xml | 44 ++-- properties-node/installer/pom.xml | 2 +- properties-node/pom.xml | 50 ++-- properties-node/provider/pom.xml | 103 ++++----- .../features/ccsdk-restapi-call-node/pom.xml | 112 ++++----- .../features/features-restapi-call-node/pom.xml | 46 ++-- restapi-call-node/features/pom.xml | 2 +- restapi-call-node/installer/pom.xml | 252 ++++++++++----------- restapi-call-node/pom.xml | 2 +- restapi-call-node/provider/pom.xml | 6 +- .../features/ccsdk-restconf-client/pom.xml | 117 +++++----- .../features/features-restconf-client/pom.xml | 46 ++-- restconf-client/features/pom.xml | 2 +- restconf-client/installer/pom.xml | 5 +- restconf-client/pom.xml | 2 +- restconf-client/provider/pom.xml | 6 +- .../features/ccsdk-sshapi-call-node/pom.xml | 12 +- .../features/features-sshapi-call-node/pom.xml | 10 +- sshapi-call-node/features/pom.xml | 6 +- sshapi-call-node/installer/pom.xml | 2 +- sshapi-call-node/pom.xml | 2 +- sshapi-call-node/provider/pom.xml | 3 +- version.properties | 2 +- 30 files changed, 692 insertions(+), 666 deletions(-) (limited to 'restconf-client/provider') diff --git a/artifacts/pom.xml b/artifacts/pom.xml index b8c11c897..8679f7fb0 100755 --- a/artifacts/pom.xml +++ b/artifacts/pom.xml @@ -1,106 +1,110 @@ - 4.0.0 + 4.0.0 - org.onap.ccsdk.sli.plugins - sli-plugins-artifacts - 0.4.0-SNAPSHOT - pom + org.onap.ccsdk.sli.plugins + sli-plugins-artifacts + 0.4.0-SNAPSHOT + pom - ccsdk-sli-plugins :: sli-plugins-artifacts - CCSDK plugins components Bill of Materials (BOM) - https://wiki.onap.org - - ONAP - - - - org.onap.ccsdk.parent - parent - 1.2.0-SNAPSHOT - - - - - - org.onap.ccsdk.sli.plugins - ccsdk-properties-node - ${project.version} - xml - feature - - - org.onap.ccsdk.sli.plugins - ccsdk-restapi-call-node - ${project.version} - xml - feature - - - org.onap.ccsdk.sli.plugins - ccsdk-restconf-client - ${project.version} - xml - feature - - - org.onap.ccsdk.sli.plugins - ccsdk-template-node - ${project.version} - xml - feature - - - org.onap.ccsdk.sli.plugins - fabric-discovery-plugin-provider - ${project.version} - - - org.onap.ccsdk.sli.plugins - fabric-discovery-plugin-installer - ${project.version} - - - org.onap.ccsdk.sli.plugins - properties-node-provider - ${project.version} - - - org.onap.ccsdk.sli.plugins - properties-node-installer - ${project.version} - - - org.onap.ccsdk.sli.plugins - restapi-call-node-provider - ${project.version} - - - org.onap.ccsdk.sli.plugins - restapi-call-node-installer - ${project.version} - - - org.onap.ccsdk.sli.plugins - restconf-client-provider - ${project.version} - - - org.onap.ccsdk.sli.plugins - restconf-client-installer - ${project.version} - - - org.onap.ccsdk.sli.plugins - template-node-provider - ${project.version} - - - org.onap.ccsdk.sli.plugins - template-node-installer - ${project.version} - - - + ccsdk-sli-plugins :: sli-plugins-artifacts + CCSDK plugins components Bill of Materials (BOM) + https://wiki.onap.org + + ONAP + + + + org.onap.ccsdk.parent + parent + 1.2.0 + + + + ${project.version} + + + + + + org.onap.ccsdk.sli.plugins + ccsdk-properties-node + ${project.version} + xml + feature + + + org.onap.ccsdk.sli.plugins + ccsdk-restapi-call-node + ${project.version} + xml + feature + + + org.onap.ccsdk.sli.plugins + ccsdk-restconf-client + ${project.version} + xml + feature + + + org.onap.ccsdk.sli.plugins + ccsdk-template-node + ${project.version} + xml + feature + + + org.onap.ccsdk.sli.plugins + fabric-discovery-plugin-provider + ${project.version} + + + org.onap.ccsdk.sli.plugins + fabric-discovery-plugin-installer + ${project.version} + + + org.onap.ccsdk.sli.plugins + properties-node-provider + ${project.version} + + + org.onap.ccsdk.sli.plugins + properties-node-installer + ${project.version} + + + org.onap.ccsdk.sli.plugins + restapi-call-node-provider + ${project.version} + + + org.onap.ccsdk.sli.plugins + restapi-call-node-installer + ${project.version} + + + org.onap.ccsdk.sli.plugins + restconf-client-provider + ${project.version} + + + org.onap.ccsdk.sli.plugins + restconf-client-installer + ${project.version} + + + org.onap.ccsdk.sli.plugins + template-node-provider + ${project.version} + + + org.onap.ccsdk.sli.plugins + template-node-installer + ${project.version} + + + diff --git a/features/features-sli-plugins/pom.xml b/features/features-sli-plugins/pom.xml index 56d724285..ac28d7878 100644 --- a/features/features-sli-plugins/pom.xml +++ b/features/features-sli-plugins/pom.xml @@ -5,7 +5,7 @@ org.onap.ccsdk.parent feature-repo-parent - 1.2.0-SNAPSHOT + 1.2.0 @@ -16,6 +16,10 @@ ccsdk-sli-plugins :: features :: ${project.artifactId} + + ${project.version} + + ${project.groupId} diff --git a/features/installer/pom.xml b/features/installer/pom.xml index ac8f620ba..222d203d6 100755 --- a/features/installer/pom.xml +++ b/features/installer/pom.xml @@ -1,137 +1,136 @@ - - 4.0.0 + + 4.0.0 - - org.onap.ccsdk.parent - odlparent-lite - 1.2.0-SNAPSHOT - - + + org.onap.ccsdk.parent + odlparent-lite + 1.2.0 + + - org.onap.ccsdk.sli.plugins - sliplugins-features-installer - 0.4.0-SNAPSHOT - pom + org.onap.ccsdk.sli.plugins + sliplugins-features-installer + 0.4.0-SNAPSHOT + pom - ccsdk-sli-plugins :: features :: ${project.artifactId} + ccsdk-sli-plugins :: features :: ${project.artifactId} - - ccsdk-sli-plugins-all - ${application.name} - mvn:org.onap.ccsdk.sli.plugins/${features.boot}/${project.version}/xml/features - false - + + ccsdk-sli-plugins-all + ${application.name} + mvn:org.onap.ccsdk.sli.plugins/${features.boot}/${project.version}/xml/features + false + - + - - org.onap.ccsdk.sli.plugins - ${application.name} - ${project.version} - xml - features - - - * - * - - - + + org.onap.ccsdk.sli.plugins + ${application.name} + ${project.version} + xml + features + + + * + * + + + - + - - - - maven-assembly-plugin - - - maven-repo-zip - - single - - package - - true - stage/${application.name}-${project.version} - - src/assembly/assemble_mvnrepo_zip.xml - - true - - - - installer-zip - - single - - package - - true - ${application.name}-${project.version}-installer - - src/assembly/assemble_installer_zip.xml - - false - - - - - - org.apache.maven.plugins - maven-dependency-plugin - - - copy-dependencies - - copy-dependencies - - prepare-package - - false - ${project.build.directory}/assembly/system - false - true - true - true - false - false + + + + maven-assembly-plugin + + + maven-repo-zip + + single + + package + + true + stage/${application.name}-${project.version} + + src/assembly/assemble_mvnrepo_zip.xml + + true + + + + installer-zip + + single + + package + + true + ${application.name}-${project.version}-installer + + src/assembly/assemble_installer_zip.xml + + false + + + + + + org.apache.maven.plugins + maven-dependency-plugin + + + copy-dependencies + + copy-dependencies + + prepare-package + + false + ${project.build.directory}/assembly/system + false + true + true + true + false + false org.onap.ccsdk.sli.plugins - provided - - - - - - maven-resources-plugin - 2.6 - - - copy-version - - copy-resources - - validate - - ${basedir}/target/stage - - - src/main/resources/scripts - - install-feature.sh - - true - - - - + provided + + + + + + maven-resources-plugin + 2.6 + + + copy-version + + copy-resources + + validate + + ${basedir}/target/stage + + + src/main/resources/scripts + + install-feature.sh + + true + + + + - - + + - - + + diff --git a/features/pom.xml b/features/pom.xml index 18dbfbfc1..d2e0828e2 100755 --- a/features/pom.xml +++ b/features/pom.xml @@ -5,7 +5,7 @@ org.onap.ccsdk.parent odlparent-lite - 1.2.0-SNAPSHOT + 1.2.0 diff --git a/pom.xml b/pom.xml index 1eb8b8bbf..dbc4c0e36 100755 --- a/pom.xml +++ b/pom.xml @@ -5,7 +5,7 @@ org.onap.ccsdk.parent odlparent-lite - 1.2.0-SNAPSHOT + 1.2.0 org.onap.ccsdk.sli.plugins diff --git a/properties-node/features/ccsdk-properties-node/pom.xml b/properties-node/features/ccsdk-properties-node/pom.xml index 84709fa4e..9e7988e39 100644 --- a/properties-node/features/ccsdk-properties-node/pom.xml +++ b/properties-node/features/ccsdk-properties-node/pom.xml @@ -5,8 +5,8 @@ org.onap.ccsdk.parent single-feature-parent - 1.2.0-SNAPSHOT - + 1.2.0 + org.onap.ccsdk.sli.plugins @@ -18,10 +18,13 @@ + + ${project.version} + - - - + + + org.opendaylight.mdsal.model mdsal-model-artifacts ${odl.mdsal.model.version} @@ -35,9 +38,9 @@ pom import - - - + + + diff --git a/properties-node/features/features-properties-node/pom.xml b/properties-node/features/features-properties-node/pom.xml index 13d056f10..61365c4fe 100644 --- a/properties-node/features/features-properties-node/pom.xml +++ b/properties-node/features/features-properties-node/pom.xml @@ -1,29 +1,33 @@ - 4.0.0 + 4.0.0 - - org.onap.ccsdk.parent - feature-repo-parent - 1.2.0-SNAPSHOT - - + + org.onap.ccsdk.parent + feature-repo-parent + 1.2.0 + + - org.onap.ccsdk.sli.plugins - features-properties-node - 0.4.0-SNAPSHOT - feature + org.onap.ccsdk.sli.plugins + features-properties-node + 0.4.0-SNAPSHOT + feature - ccsdk-sli-plugins :: properties-node :: ${project.artifactId} + ccsdk-sli-plugins :: properties-node :: ${project.artifactId} - - - ${project.groupId} - ccsdk-properties-node - ${project.version} - xml - features - + + ${project.version} + - + + + ${project.groupId} + ccsdk-properties-node + ${project.version} + xml + features + + + diff --git a/properties-node/features/pom.xml b/properties-node/features/pom.xml index c510a3ac3..339e9f7c0 100755 --- a/properties-node/features/pom.xml +++ b/properties-node/features/pom.xml @@ -1,22 +1,22 @@ - - - 4.0.0 - - - org.onap.ccsdk.parent - odlparent-lite - 1.2.0-SNAPSHOT - - - org.onap.ccsdk.sli.plugins - properties-node-features - 0.4.0-SNAPSHOT - pom - - ccsdk-sli-plugins :: properties-node :: ${project.artifactId} - - - ccsdk-properties-node - features-properties-node - - + + + 4.0.0 + + + org.onap.ccsdk.parent + odlparent-lite + 1.2.0 + + + org.onap.ccsdk.sli.plugins + properties-node-features + 0.4.0-SNAPSHOT + pom + + ccsdk-sli-plugins :: properties-node :: ${project.artifactId} + + + ccsdk-properties-node + features-properties-node + + diff --git a/properties-node/installer/pom.xml b/properties-node/installer/pom.xml index c86901ee4..5c95c0233 100755 --- a/properties-node/installer/pom.xml +++ b/properties-node/installer/pom.xml @@ -5,7 +5,7 @@ org.onap.ccsdk.parent odlparent-lite - 1.2.0-SNAPSHOT + 1.2.0 org.onap.ccsdk.sli.plugins diff --git a/properties-node/pom.xml b/properties-node/pom.xml index 0c167730f..ac1b28816 100755 --- a/properties-node/pom.xml +++ b/properties-node/pom.xml @@ -1,25 +1,25 @@ - - - 4.0.0 - - - org.onap.ccsdk.parent - odlparent-lite - 1.2.0-SNAPSHOT - - - org.onap.ccsdk.sli.plugins - properties-node - 0.4.0-SNAPSHOT - pom - - ccsdk-sli-plugins :: properties-node - This is an implementation of DG Execute Node that reads property file and - puts the properties in the DG context - - - provider - features - installer - - + + + 4.0.0 + + + org.onap.ccsdk.parent + odlparent-lite + 1.2.0 + + + org.onap.ccsdk.sli.plugins + properties-node + 0.4.0-SNAPSHOT + pom + + ccsdk-sli-plugins :: properties-node + This is an implementation of DG Execute Node that reads property file and + puts the properties in the DG context + + + provider + features + installer + + diff --git a/properties-node/provider/pom.xml b/properties-node/provider/pom.xml index da1ff21ea..668e1168a 100755 --- a/properties-node/provider/pom.xml +++ b/properties-node/provider/pom.xml @@ -1,51 +1,52 @@ - - - 4.0.0 - - - org.onap.ccsdk.parent - binding-parent - 1.2.0-SNAPSHOT - - - org.onap.ccsdk.sli.plugins - properties-node-provider - 0.4.0-SNAPSHOT - bundle - - ccsdk-sli-plugins :: properties-node :: ${project.artifactId} - http://maven.apache.org - - - UTF-8 - - - - - junit - junit - test - - - org.springframework - spring-test - test - - - org.onap.ccsdk.sli.core - sli-common - - - org.onap.ccsdk.sli.core - sli-provider - - - org.slf4j - slf4j-api - - - org.codehaus.jettison - jettison - - - + + + 4.0.0 + + + org.onap.ccsdk.parent + binding-parent + 1.2.0 + + + org.onap.ccsdk.sli.plugins + properties-node-provider + 0.4.0-SNAPSHOT + bundle + + ccsdk-sli-plugins :: properties-node :: ${project.artifactId} + http://maven.apache.org + + + UTF-8 + ${project.version} + + + + + junit + junit + test + + + org.springframework + spring-test + test + + + org.onap.ccsdk.sli.core + sli-common + + + org.onap.ccsdk.sli.core + sli-provider + + + org.slf4j + slf4j-api + + + org.codehaus.jettison + jettison + + + 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 80dcc0ac0..6a07d2d99 100644 --- a/restapi-call-node/features/ccsdk-restapi-call-node/pom.xml +++ b/restapi-call-node/features/ccsdk-restapi-call-node/pom.xml @@ -1,57 +1,59 @@ - - 4.0.0 - - - org.onap.ccsdk.parent - single-feature-parent - 1.2.0-SNAPSHOT - - - - org.onap.ccsdk.sli.plugins - ccsdk-restapi-call-node - 0.4.0-SNAPSHOT - feature - - ccsdk-sli-plugins :: restapi-call-node :: ${project.artifactId} - - - - - - - org.opendaylight.mdsal.model - mdsal-model-artifacts - ${odl.mdsal.model.version} - pom - import - - - org.opendaylight.controller - mdsal-artifacts - ${odl.mdsal.version} - pom - import - - - - - - - - org.onap.ccsdk.sli.core - ccsdk-sli - ${ccsdk.sli.core.version} - xml - features - - - ${project.groupId} - restapi-call-node-provider - ${project.version} - - + + 4.0.0 + + + org.onap.ccsdk.parent + single-feature-parent + 1.2.0 + + + + org.onap.ccsdk.sli.plugins + ccsdk-restapi-call-node + 0.4.0-SNAPSHOT + feature + + ccsdk-sli-plugins :: restapi-call-node :: ${project.artifactId} + + + + ${project.version} + + + + + + + org.opendaylight.mdsal.model + mdsal-model-artifacts + ${odl.mdsal.model.version} + pom + import + + + org.opendaylight.controller + mdsal-artifacts + ${odl.mdsal.version} + pom + import + + + + + + + + org.onap.ccsdk.sli.core + ccsdk-sli + ${ccsdk.sli.core.version} + xml + features + + + ${project.groupId} + restapi-call-node-provider + ${project.version} + + 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 d6b4a2635..3ca5fa2f3 100644 --- a/restapi-call-node/features/features-restapi-call-node/pom.xml +++ b/restapi-call-node/features/features-restapi-call-node/pom.xml @@ -1,29 +1,33 @@ - 4.0.0 + 4.0.0 - - org.onap.ccsdk.parent - feature-repo-parent - 1.2.0-SNAPSHOT - - + + org.onap.ccsdk.parent + feature-repo-parent + 1.2.0 + + - org.onap.ccsdk.sli.plugins - features-restapi-call-node - 0.4.0-SNAPSHOT - feature + org.onap.ccsdk.sli.plugins + features-restapi-call-node + 0.4.0-SNAPSHOT + feature - ccsdk-sli-plugins :: restapi-call-node :: ${project.artifactId} + ccsdk-sli-plugins :: restapi-call-node :: ${project.artifactId} - - - ${project.groupId} - ccsdk-restapi-call-node - ${project.version} - xml - features - + + ${project.version} + - + + + ${project.groupId} + ccsdk-restapi-call-node + ${project.version} + xml + features + + + diff --git a/restapi-call-node/features/pom.xml b/restapi-call-node/features/pom.xml index 36f9d28fe..b8351b34b 100755 --- a/restapi-call-node/features/pom.xml +++ b/restapi-call-node/features/pom.xml @@ -5,7 +5,7 @@ org.onap.ccsdk.parent odlparent-lite - 1.2.0-SNAPSHOT + 1.2.0 org.onap.ccsdk.sli.plugins diff --git a/restapi-call-node/installer/pom.xml b/restapi-call-node/installer/pom.xml index 9bbcf2a08..399bcf3f2 100755 --- a/restapi-call-node/installer/pom.xml +++ b/restapi-call-node/installer/pom.xml @@ -1,48 +1,48 @@ - 4.0.0 + 4.0.0 - - org.onap.ccsdk.parent - odlparent-lite - 1.2.0-SNAPSHOT - + + org.onap.ccsdk.parent + odlparent-lite + 1.2.0 + - org.onap.ccsdk.sli.plugins - restapi-call-node-installer - 0.4.0-SNAPSHOT - pom + org.onap.ccsdk.sli.plugins + restapi-call-node-installer + 0.4.0-SNAPSHOT + pom - ccsdk-sli-plugins :: restapi-call-node :: ${project.artifactId} + ccsdk-sli-plugins :: restapi-call-node :: ${project.artifactId} - - ccsdk-restapi-call-node - ${application.name} + + ccsdk-restapi-call-node + ${application.name} mvn:org.onap.ccsdk.sli.plugins/${features.boot}/${project.version}/xml/features - false - + false + - + - - org.onap.ccsdk.sli.plugins - ${application.name} - ${project.version} - xml - features - - - * - * - - - + + org.onap.ccsdk.sli.plugins + ${application.name} + ${project.version} + xml + features + + + * + * + + + - - org.onap.ccsdk.sli.plugins - restapi-call-node-provider - ${project.version} - + + org.onap.ccsdk.sli.plugins + restapi-call-node-provider + ${project.version} + org.springframework spring-beans @@ -51,98 +51,98 @@ org.springframework spring-context - + - - - - maven-assembly-plugin - 2.6 - - - maven-repo-zip - - single - - package - - true - stage/${application.name}-${project.version} - - src/assembly/assemble_mvnrepo_zip.xml - - true - - - - installer-zip - - single - - package - - true - ${application.name}-${project.version}-installer - - src/assembly/assemble_installer_zip.xml - - false - - - - - - org.apache.maven.plugins - maven-dependency-plugin - - - copy-dependencies - - copy-dependencies - - prepare-package - - false - ${project.build.directory}/assembly/system - false - true - true - true - false - false - org.onap.ccsdk.sli.core - provided - - - - - - maven-resources-plugin - 2.6 - - - copy-version - - copy-resources - - validate - - ${basedir}/target/stage - - - src/main/resources/scripts - - install-feature.sh - - true - - - - + + + + maven-assembly-plugin + 2.6 + + + maven-repo-zip + + single + + package + + true + stage/${application.name}-${project.version} + + src/assembly/assemble_mvnrepo_zip.xml + + true + + + + installer-zip + + single + + package + + true + ${application.name}-${project.version}-installer + + src/assembly/assemble_installer_zip.xml + + false + + + + + + org.apache.maven.plugins + maven-dependency-plugin + + + copy-dependencies + + copy-dependencies + + prepare-package + + false + ${project.build.directory}/assembly/system + false + true + true + true + false + false + org.onap.ccsdk.sli.core + provided + + + + + + maven-resources-plugin + 2.6 + + + copy-version + + copy-resources + + validate + + ${basedir}/target/stage + + + src/main/resources/scripts + + install-feature.sh + + true + + + + - - + + - - + + diff --git a/restapi-call-node/pom.xml b/restapi-call-node/pom.xml index cdfee6bf4..093497e90 100755 --- a/restapi-call-node/pom.xml +++ b/restapi-call-node/pom.xml @@ -5,7 +5,7 @@ org.onap.ccsdk.parent odlparent-lite - 1.2.0-SNAPSHOT + 1.2.0 org.onap.ccsdk.sli.plugins diff --git a/restapi-call-node/provider/pom.xml b/restapi-call-node/provider/pom.xml index 5423292f1..74127832e 100755 --- a/restapi-call-node/provider/pom.xml +++ b/restapi-call-node/provider/pom.xml @@ -1,12 +1,11 @@ - + 4.0.0 org.onap.ccsdk.parent binding-parent - 1.2.0-SNAPSHOT + 1.2.0 org.onap.ccsdk.sli.plugins @@ -18,6 +17,7 @@ UTF-8 + ${project.version} diff --git a/restconf-client/features/ccsdk-restconf-client/pom.xml b/restconf-client/features/ccsdk-restconf-client/pom.xml index 82eba3bd1..97f36121e 100644 --- a/restconf-client/features/ccsdk-restconf-client/pom.xml +++ b/restconf-client/features/ccsdk-restconf-client/pom.xml @@ -1,61 +1,60 @@ - - 4.0.0 - - - org.onap.ccsdk.parent - single-feature-parent - 1.2.0-SNAPSHOT - - - - org.onap.ccsdk.sli.plugins - ccsdk-restconf-client - 0.4.0-SNAPSHOT - feature - - - true - - - ccsdk-sli-plugins :: restconf-client :: ${project.artifactId} - - - - - - - org.opendaylight.mdsal.model - mdsal-model-artifacts - ${odl.mdsal.model.version} - pom - import - - - org.opendaylight.controller - mdsal-artifacts - ${odl.mdsal.version} - pom - import - - - - - - - - org.onap.ccsdk.sli.core - ccsdk-sli - ${ccsdk.sli.core.version} - xml - features - - - ${project.groupId} - restconf-client-provider - ${project.version} - - + + 4.0.0 + + + org.onap.ccsdk.parent + single-feature-parent + 1.2.0 + + + + org.onap.ccsdk.sli.plugins + ccsdk-restconf-client + 0.4.0-SNAPSHOT + feature + + + true + ${project.version} + + + ccsdk-sli-plugins :: restconf-client :: ${project.artifactId} + + + + + + + org.opendaylight.mdsal.model + mdsal-model-artifacts + ${odl.mdsal.model.version} + pom + import + + + org.opendaylight.controller + mdsal-artifacts + ${odl.mdsal.version} + pom + import + + + + + + + + org.onap.ccsdk.sli.core + ccsdk-sli + ${ccsdk.sli.core.version} + xml + features + + + ${project.groupId} + restconf-client-provider + ${project.version} + + diff --git a/restconf-client/features/features-restconf-client/pom.xml b/restconf-client/features/features-restconf-client/pom.xml index 910e86574..32c7feb1b 100644 --- a/restconf-client/features/features-restconf-client/pom.xml +++ b/restconf-client/features/features-restconf-client/pom.xml @@ -1,29 +1,33 @@ - 4.0.0 + 4.0.0 - - org.onap.ccsdk.parent - feature-repo-parent - 1.2.0-SNAPSHOT - - + + org.onap.ccsdk.parent + feature-repo-parent + 1.2.0 + + - org.onap.ccsdk.sli.plugins - features-restconf-client - 0.4.0-SNAPSHOT - feature + org.onap.ccsdk.sli.plugins + features-restconf-client + 0.4.0-SNAPSHOT + feature - ccsdk-sli-plugins :: restconf-client :: ${project.artifactId} + ccsdk-sli-plugins :: restconf-client :: ${project.artifactId} - - - ${project.groupId} - ccsdk-restconf-client - ${project.version} - xml - features - + + ${project.version} + - + + + ${project.groupId} + ccsdk-restconf-client + ${project.version} + xml + features + + + diff --git a/restconf-client/features/pom.xml b/restconf-client/features/pom.xml index df2abb123..e0595c1fc 100755 --- a/restconf-client/features/pom.xml +++ b/restconf-client/features/pom.xml @@ -5,7 +5,7 @@ org.onap.ccsdk.parent odlparent-lite - 1.2.0-SNAPSHOT + 1.2.0 org.onap.ccsdk.sli.plugins diff --git a/restconf-client/installer/pom.xml b/restconf-client/installer/pom.xml index 23306c7cd..cbf003d23 100755 --- a/restconf-client/installer/pom.xml +++ b/restconf-client/installer/pom.xml @@ -1,12 +1,11 @@ - + 4.0.0 org.onap.ccsdk.parent odlparent-lite - 1.2.0-SNAPSHOT + 1.2.0 org.onap.ccsdk.sli.plugins diff --git a/restconf-client/pom.xml b/restconf-client/pom.xml index 4a2609a9b..1097d721e 100755 --- a/restconf-client/pom.xml +++ b/restconf-client/pom.xml @@ -5,7 +5,7 @@ org.onap.ccsdk.parent odlparent-lite - 1.2.0-SNAPSHOT + 1.2.0 org.onap.ccsdk.sli.plugins diff --git a/restconf-client/provider/pom.xml b/restconf-client/provider/pom.xml index 2618b5cca..78bbc1693 100755 --- a/restconf-client/provider/pom.xml +++ b/restconf-client/provider/pom.xml @@ -1,12 +1,11 @@ - + 4.0.0 org.onap.ccsdk.parent binding-parent - 1.2.0-SNAPSHOT + 1.2.0 org.onap.ccsdk.sli.plugins @@ -19,6 +18,7 @@ UTF-8 + ${project.version} 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 cb42fcf18..ead54c77f 100644 --- a/sshapi-call-node/features/ccsdk-sshapi-call-node/pom.xml +++ b/sshapi-call-node/features/ccsdk-sshapi-call-node/pom.xml @@ -1,14 +1,12 @@ - + 4.0.0 org.onap.ccsdk.parent single-feature-parent - 1.2.0-SNAPSHOT - + 1.2.0 + org.onap.ccsdk.sli.plugins @@ -20,6 +18,10 @@ + + ${project.version} + + 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 482c83f7b..430a305f5 100644 --- a/sshapi-call-node/features/features-sshapi-call-node/pom.xml +++ b/sshapi-call-node/features/features-sshapi-call-node/pom.xml @@ -1,13 +1,11 @@ - + 4.0.0 org.onap.ccsdk.parent feature-repo-parent - 1.2.0-SNAPSHOT + 1.2.0 @@ -18,6 +16,10 @@ ccsdk-sli-plugins :: sshapi-call-node :: ${project.artifactId} + + ${project.version} + + ${project.groupId} diff --git a/sshapi-call-node/features/pom.xml b/sshapi-call-node/features/pom.xml index 25acf571d..aae34a5ce 100755 --- a/sshapi-call-node/features/pom.xml +++ b/sshapi-call-node/features/pom.xml @@ -1,13 +1,11 @@ - + 4.0.0 org.onap.ccsdk.parent odlparent-lite - 1.2.0-SNAPSHOT + 1.2.0 org.onap.ccsdk.sli.plugins diff --git a/sshapi-call-node/installer/pom.xml b/sshapi-call-node/installer/pom.xml index 3adfb69f4..a726f6350 100755 --- a/sshapi-call-node/installer/pom.xml +++ b/sshapi-call-node/installer/pom.xml @@ -5,7 +5,7 @@ org.onap.ccsdk.parent odlparent-lite - 1.2.0-SNAPSHOT + 1.2.0 org.onap.ccsdk.sli.plugins diff --git a/sshapi-call-node/pom.xml b/sshapi-call-node/pom.xml index 88456c5ed..b6167c45b 100755 --- a/sshapi-call-node/pom.xml +++ b/sshapi-call-node/pom.xml @@ -5,7 +5,7 @@ org.onap.ccsdk.parent odlparent-lite - 1.2.0-SNAPSHOT + 1.2.0 org.onap.ccsdk.sli.plugins diff --git a/sshapi-call-node/provider/pom.xml b/sshapi-call-node/provider/pom.xml index 91ecfabca..b25b69e47 100755 --- a/sshapi-call-node/provider/pom.xml +++ b/sshapi-call-node/provider/pom.xml @@ -5,7 +5,7 @@ org.onap.ccsdk.parent binding-parent - 1.2.0-SNAPSHOT + 1.2.0 org.onap.ccsdk.sli.plugins @@ -18,6 +18,7 @@ UTF-8 + ${project.version} diff --git a/version.properties b/version.properties index c8f383798..8c1e34f3b 100644 --- a/version.properties +++ b/version.properties @@ -11,6 +11,6 @@ feature_revision=0 base_version=${release_name}.${sprint_number}.${feature_revision} -release_version=${base_version}-STAGING +release_version=${base_version} snapshot_version=${base_version}-SNAPSHOT -- cgit 1.2.3-korg From 057bc260e7752bc11960cf9cab4005efec1739c7 Mon Sep 17 00:00:00 2001 From: "Timoney, Dan (dt5972)" Date: Fri, 4 Jan 2019 09:22:20 -0500 Subject: Changes for Fluorine Updates to sli/plugins to run in OpenDaylight Fluorine Change-Id: I093a663ff5459df5eacdb632ad3217c322cc9cfa Issue-ID: CCSDK-870 Signed-off-by: Timoney, Dan (dt5972) --- artifacts/pom.xml | 204 ++++++++--------- features/ccsdk-sli-plugins-all/pom.xml | 29 +-- features/features-sli-plugins/pom.xml | 8 +- features/installer/pom.xml | 242 ++++++++++---------- features/pom.xml | 4 +- pom.xml | 4 +- .../features/ccsdk-properties-node/pom.xml | 30 +-- .../features/features-properties-node/pom.xml | 46 ++-- properties-node/features/pom.xml | 4 +- properties-node/installer/pom.xml | 4 +- properties-node/pom.xml | 4 +- properties-node/provider/pom.xml | 17 +- .../features/ccsdk-restapi-call-node/pom.xml | 88 +++---- .../features/features-restapi-call-node/pom.xml | 46 ++-- restapi-call-node/features/pom.xml | 4 +- restapi-call-node/installer/pom.xml | 252 ++++++++++----------- restapi-call-node/pom.xml | 4 +- restapi-call-node/provider/pom.xml | 17 +- .../features/ccsdk-restconf-client/pom.xml | 95 ++++---- .../features/features-restconf-client/pom.xml | 46 ++-- restconf-client/features/pom.xml | 4 +- restconf-client/installer/pom.xml | 4 +- restconf-client/pom.xml | 4 +- restconf-client/provider/pom.xml | 27 ++- .../features/ccsdk-sshapi-call-node/pom.xml | 26 +-- .../features/features-sshapi-call-node/pom.xml | 8 +- sshapi-call-node/features/pom.xml | 4 +- sshapi-call-node/installer/pom.xml | 4 +- sshapi-call-node/pom.xml | 4 +- sshapi-call-node/provider/pom.xml | 17 +- template-node/features/ccsdk-template-node/pom.xml | 6 +- .../features/features-template-node/pom.xml | 12 +- template-node/features/pom.xml | 34 ++- template-node/installer/pom.xml | 4 +- template-node/pom.xml | 37 ++- template-node/provider/pom.xml | 16 +- version.properties | 2 +- 37 files changed, 637 insertions(+), 724 deletions(-) (limited to 'restconf-client/provider') diff --git a/artifacts/pom.xml b/artifacts/pom.xml index 8679f7fb0..26dbaa59d 100755 --- a/artifacts/pom.xml +++ b/artifacts/pom.xml @@ -1,110 +1,106 @@ - 4.0.0 + 4.0.0 - org.onap.ccsdk.sli.plugins - sli-plugins-artifacts - 0.4.0-SNAPSHOT - pom + org.onap.ccsdk.sli.plugins + sli-plugins-artifacts + 0.4.1-SNAPSHOT + pom - ccsdk-sli-plugins :: sli-plugins-artifacts - CCSDK plugins components Bill of Materials (BOM) - https://wiki.onap.org - - ONAP - - - - org.onap.ccsdk.parent - parent - 1.2.0 - - - - ${project.version} - - - - - - org.onap.ccsdk.sli.plugins - ccsdk-properties-node - ${project.version} - xml - feature - - - org.onap.ccsdk.sli.plugins - ccsdk-restapi-call-node - ${project.version} - xml - feature - - - org.onap.ccsdk.sli.plugins - ccsdk-restconf-client - ${project.version} - xml - feature - - - org.onap.ccsdk.sli.plugins - ccsdk-template-node - ${project.version} - xml - feature - - - org.onap.ccsdk.sli.plugins - fabric-discovery-plugin-provider - ${project.version} - - - org.onap.ccsdk.sli.plugins - fabric-discovery-plugin-installer - ${project.version} - - - org.onap.ccsdk.sli.plugins - properties-node-provider - ${project.version} - - - org.onap.ccsdk.sli.plugins - properties-node-installer - ${project.version} - - - org.onap.ccsdk.sli.plugins - restapi-call-node-provider - ${project.version} - - - org.onap.ccsdk.sli.plugins - restapi-call-node-installer - ${project.version} - - - org.onap.ccsdk.sli.plugins - restconf-client-provider - ${project.version} - - - org.onap.ccsdk.sli.plugins - restconf-client-installer - ${project.version} - - - org.onap.ccsdk.sli.plugins - template-node-provider - ${project.version} - - - org.onap.ccsdk.sli.plugins - template-node-installer - ${project.version} - - - + ccsdk-sli-plugins :: sli-plugins-artifacts + CCSDK plugins components Bill of Materials (BOM) + https://wiki.onap.org + + ONAP + + + + org.onap.ccsdk.parent + parent + 1.2.1-SNAPSHOT + + + + + + org.onap.ccsdk.sli.plugins + ccsdk-properties-node + ${project.version} + xml + feature + + + org.onap.ccsdk.sli.plugins + ccsdk-restapi-call-node + ${project.version} + xml + feature + + + org.onap.ccsdk.sli.plugins + ccsdk-restconf-client + ${project.version} + xml + feature + + + org.onap.ccsdk.sli.plugins + ccsdk-template-node + ${project.version} + xml + feature + + + org.onap.ccsdk.sli.plugins + fabric-discovery-plugin-provider + ${project.version} + + + org.onap.ccsdk.sli.plugins + fabric-discovery-plugin-installer + ${project.version} + + + org.onap.ccsdk.sli.plugins + properties-node-provider + ${project.version} + + + org.onap.ccsdk.sli.plugins + properties-node-installer + ${project.version} + + + org.onap.ccsdk.sli.plugins + restapi-call-node-provider + ${project.version} + + + org.onap.ccsdk.sli.plugins + restapi-call-node-installer + ${project.version} + + + org.onap.ccsdk.sli.plugins + restconf-client-provider + ${project.version} + + + org.onap.ccsdk.sli.plugins + restconf-client-installer + ${project.version} + + + org.onap.ccsdk.sli.plugins + template-node-provider + ${project.version} + + + org.onap.ccsdk.sli.plugins + template-node-installer + ${project.version} + + + diff --git a/features/ccsdk-sli-plugins-all/pom.xml b/features/ccsdk-sli-plugins-all/pom.xml index 37692c0de..271cbb186 100644 --- a/features/ccsdk-sli-plugins-all/pom.xml +++ b/features/ccsdk-sli-plugins-all/pom.xml @@ -1,43 +1,22 @@ - + 4.0.0 org.onap.ccsdk.parent single-feature-parent - 1.2.0-SNAPSHOT - + 1.2.1-SNAPSHOT + org.onap.ccsdk.sli.plugins ccsdk-sli-plugins-all - 0.4.0-SNAPSHOT + 0.4.1-SNAPSHOT feature ccsdk-sli-plugins :: features :: ${project.artifactId} - - - - org.opendaylight.mdsal.model - mdsal-model-artifacts - ${odl.mdsal.model.version} - pom - import - - - org.opendaylight.controller - mdsal-artifacts - ${odl.mdsal.version} - pom - import - - - - ${project.groupId} diff --git a/features/features-sli-plugins/pom.xml b/features/features-sli-plugins/pom.xml index ac28d7878..eb84c5b93 100644 --- a/features/features-sli-plugins/pom.xml +++ b/features/features-sli-plugins/pom.xml @@ -5,21 +5,17 @@ org.onap.ccsdk.parent feature-repo-parent - 1.2.0 + 1.2.1-SNAPSHOT org.onap.ccsdk.sli.plugins features-sli-plugins - 0.4.0-SNAPSHOT + 0.4.1-SNAPSHOT feature ccsdk-sli-plugins :: features :: ${project.artifactId} - - ${project.version} - - ${project.groupId} diff --git a/features/installer/pom.xml b/features/installer/pom.xml index 222d203d6..ad751891f 100755 --- a/features/installer/pom.xml +++ b/features/installer/pom.xml @@ -1,136 +1,136 @@ - 4.0.0 + 4.0.0 - - org.onap.ccsdk.parent - odlparent-lite - 1.2.0 - - + + org.onap.ccsdk.parent + odlparent-lite + 1.2.1-SNAPSHOT + + - org.onap.ccsdk.sli.plugins - sliplugins-features-installer - 0.4.0-SNAPSHOT - pom + org.onap.ccsdk.sli.plugins + sliplugins-features-installer + 0.4.1-SNAPSHOT + pom - ccsdk-sli-plugins :: features :: ${project.artifactId} + ccsdk-sli-plugins :: features :: ${project.artifactId} - - ccsdk-sli-plugins-all - ${application.name} - mvn:org.onap.ccsdk.sli.plugins/${features.boot}/${project.version}/xml/features - false - + + ccsdk-sli-plugins-all + ${application.name} + mvn:org.onap.ccsdk.sli.plugins/${features.boot}/${project.version}/xml/features + false + - + - - org.onap.ccsdk.sli.plugins - ${application.name} - ${project.version} - xml - features - - - * - * - - - + + org.onap.ccsdk.sli.plugins + ${application.name} + ${project.version} + xml + features + + + * + * + + + - + - - - - maven-assembly-plugin - - - maven-repo-zip - - single - - package - - true - stage/${application.name}-${project.version} - - src/assembly/assemble_mvnrepo_zip.xml - - true - - - - installer-zip - - single - - package - - true - ${application.name}-${project.version}-installer - - src/assembly/assemble_installer_zip.xml - - false - - - - - - org.apache.maven.plugins - maven-dependency-plugin - - - copy-dependencies - - copy-dependencies - - prepare-package - - false - ${project.build.directory}/assembly/system - false - true - true - true - false - false + + + + maven-assembly-plugin + + + maven-repo-zip + + single + + package + + true + stage/${application.name}-${project.version} + + src/assembly/assemble_mvnrepo_zip.xml + + true + + + + installer-zip + + single + + package + + true + ${application.name}-${project.version}-installer + + src/assembly/assemble_installer_zip.xml + + false + + + + + + org.apache.maven.plugins + maven-dependency-plugin + + + copy-dependencies + + copy-dependencies + + prepare-package + + false + ${project.build.directory}/assembly/system + false + true + true + true + false + false org.onap.ccsdk.sli.plugins - provided - - - - - - maven-resources-plugin - 2.6 - - - copy-version - - copy-resources - - validate - - ${basedir}/target/stage - - - src/main/resources/scripts - - install-feature.sh - - true - - - - + provided + + + + + + maven-resources-plugin + 2.6 + + + copy-version + + copy-resources + + validate + + ${basedir}/target/stage + + + src/main/resources/scripts + + install-feature.sh + + true + + + + - - + + - - + + diff --git a/features/pom.xml b/features/pom.xml index d2e0828e2..07d77718d 100755 --- a/features/pom.xml +++ b/features/pom.xml @@ -5,13 +5,13 @@ org.onap.ccsdk.parent odlparent-lite - 1.2.0 + 1.2.1-SNAPSHOT org.onap.ccsdk.sli.plugins sliplugins-feature-aggregator - 0.4.0-SNAPSHOT + 0.4.1-SNAPSHOT pom ccsdk-sli-plugins :: features diff --git a/pom.xml b/pom.xml index dbc4c0e36..201a59b39 100755 --- a/pom.xml +++ b/pom.xml @@ -5,12 +5,12 @@ org.onap.ccsdk.parent odlparent-lite - 1.2.0 + 1.2.1-SNAPSHOT org.onap.ccsdk.sli.plugins ccsdk-sli-plugins - 0.4.0-SNAPSHOT + 0.4.1-SNAPSHOT pom ccsdk-sli-plugins diff --git a/properties-node/features/ccsdk-properties-node/pom.xml b/properties-node/features/ccsdk-properties-node/pom.xml index 9e7988e39..1d5feae6c 100644 --- a/properties-node/features/ccsdk-properties-node/pom.xml +++ b/properties-node/features/ccsdk-properties-node/pom.xml @@ -5,42 +5,18 @@ org.onap.ccsdk.parent single-feature-parent - 1.2.0 + 1.2.1-SNAPSHOT org.onap.ccsdk.sli.plugins ccsdk-properties-node - 0.4.0-SNAPSHOT + 0.4.1-SNAPSHOT feature ccsdk-sli-plugins :: properties-node :: ${project.artifactId} - - - - ${project.version} - - - - - - org.opendaylight.mdsal.model - mdsal-model-artifacts - ${odl.mdsal.model.version} - pom - import - - - org.opendaylight.controller - mdsal-artifacts - ${odl.mdsal.version} - pom - import - - - - + diff --git a/properties-node/features/features-properties-node/pom.xml b/properties-node/features/features-properties-node/pom.xml index 61365c4fe..e00d2cfa4 100644 --- a/properties-node/features/features-properties-node/pom.xml +++ b/properties-node/features/features-properties-node/pom.xml @@ -1,33 +1,29 @@ - 4.0.0 + 4.0.0 - - org.onap.ccsdk.parent - feature-repo-parent - 1.2.0 - - + + org.onap.ccsdk.parent + feature-repo-parent + 1.2.1-SNAPSHOT + + - org.onap.ccsdk.sli.plugins - features-properties-node - 0.4.0-SNAPSHOT - feature + org.onap.ccsdk.sli.plugins + features-properties-node + 0.4.1-SNAPSHOT + feature - ccsdk-sli-plugins :: properties-node :: ${project.artifactId} + ccsdk-sli-plugins :: properties-node :: ${project.artifactId} - - ${project.version} - + + + ${project.groupId} + ccsdk-properties-node + ${project.version} + xml + features + - - - ${project.groupId} - ccsdk-properties-node - ${project.version} - xml - features - - - + diff --git a/properties-node/features/pom.xml b/properties-node/features/pom.xml index 339e9f7c0..27bea0291 100755 --- a/properties-node/features/pom.xml +++ b/properties-node/features/pom.xml @@ -5,12 +5,12 @@ org.onap.ccsdk.parent odlparent-lite - 1.2.0 + 1.2.1-SNAPSHOT org.onap.ccsdk.sli.plugins properties-node-features - 0.4.0-SNAPSHOT + 0.4.1-SNAPSHOT pom ccsdk-sli-plugins :: properties-node :: ${project.artifactId} diff --git a/properties-node/installer/pom.xml b/properties-node/installer/pom.xml index 5c95c0233..c431b521c 100755 --- a/properties-node/installer/pom.xml +++ b/properties-node/installer/pom.xml @@ -5,12 +5,12 @@ org.onap.ccsdk.parent odlparent-lite - 1.2.0 + 1.2.1-SNAPSHOT org.onap.ccsdk.sli.plugins properties-node-installer - 0.4.0-SNAPSHOT + 0.4.1-SNAPSHOT pom ccsdk-sli-plugins :: properties-node :: ${project.artifactId} diff --git a/properties-node/pom.xml b/properties-node/pom.xml index ac1b28816..c8d9c9a3c 100755 --- a/properties-node/pom.xml +++ b/properties-node/pom.xml @@ -5,12 +5,12 @@ org.onap.ccsdk.parent odlparent-lite - 1.2.0 + 1.2.1-SNAPSHOT org.onap.ccsdk.sli.plugins properties-node - 0.4.0-SNAPSHOT + 0.4.1-SNAPSHOT pom ccsdk-sli-plugins :: properties-node diff --git a/properties-node/provider/pom.xml b/properties-node/provider/pom.xml index 668e1168a..92cff9992 100755 --- a/properties-node/provider/pom.xml +++ b/properties-node/provider/pom.xml @@ -5,12 +5,12 @@ org.onap.ccsdk.parent binding-parent - 1.2.0 + 1.2.1-SNAPSHOT org.onap.ccsdk.sli.plugins properties-node-provider - 0.4.0-SNAPSHOT + 0.4.1-SNAPSHOT bundle ccsdk-sli-plugins :: properties-node :: ${project.artifactId} @@ -18,8 +18,19 @@ UTF-8 - ${project.version} + + + + + org.onap.ccsdk.sli.core + sli-core-artifacts + ${ccsdk.sli.core.version} + pom + import + + + 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 6a07d2d99..da6b8d0d2 100644 --- a/restapi-call-node/features/ccsdk-restapi-call-node/pom.xml +++ b/restapi-call-node/features/ccsdk-restapi-call-node/pom.xml @@ -1,59 +1,35 @@ - 4.0.0 - - - org.onap.ccsdk.parent - single-feature-parent - 1.2.0 - - - - org.onap.ccsdk.sli.plugins - ccsdk-restapi-call-node - 0.4.0-SNAPSHOT - feature - - ccsdk-sli-plugins :: restapi-call-node :: ${project.artifactId} - - - - ${project.version} - - - - - - - org.opendaylight.mdsal.model - mdsal-model-artifacts - ${odl.mdsal.model.version} - pom - import - - - org.opendaylight.controller - mdsal-artifacts - ${odl.mdsal.version} - pom - import - - - - - - - - org.onap.ccsdk.sli.core - ccsdk-sli - ${ccsdk.sli.core.version} - xml - features - - - ${project.groupId} - restapi-call-node-provider - ${project.version} - - + 4.0.0 + + + org.onap.ccsdk.parent + single-feature-parent + 1.2.1-SNAPSHOT + + + + org.onap.ccsdk.sli.plugins + ccsdk-restapi-call-node + 0.4.1-SNAPSHOT + feature + + ccsdk-sli-plugins :: restapi-call-node :: ${project.artifactId} + + + + + + org.onap.ccsdk.sli.core + ccsdk-sli + ${ccsdk.sli.core.version} + xml + features + + + ${project.groupId} + restapi-call-node-provider + ${project.version} + + 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 3ca5fa2f3..64541a74b 100644 --- a/restapi-call-node/features/features-restapi-call-node/pom.xml +++ b/restapi-call-node/features/features-restapi-call-node/pom.xml @@ -1,33 +1,29 @@ - 4.0.0 + 4.0.0 - - org.onap.ccsdk.parent - feature-repo-parent - 1.2.0 - - + + org.onap.ccsdk.parent + feature-repo-parent + 1.2.1-SNAPSHOT + + - org.onap.ccsdk.sli.plugins - features-restapi-call-node - 0.4.0-SNAPSHOT - feature + org.onap.ccsdk.sli.plugins + features-restapi-call-node + 0.4.1-SNAPSHOT + feature - ccsdk-sli-plugins :: restapi-call-node :: ${project.artifactId} + ccsdk-sli-plugins :: restapi-call-node :: ${project.artifactId} - - ${project.version} - + + + ${project.groupId} + ccsdk-restapi-call-node + ${project.version} + xml + features + - - - ${project.groupId} - ccsdk-restapi-call-node - ${project.version} - xml - features - - - + diff --git a/restapi-call-node/features/pom.xml b/restapi-call-node/features/pom.xml index b8351b34b..3ae7a2fc3 100755 --- a/restapi-call-node/features/pom.xml +++ b/restapi-call-node/features/pom.xml @@ -5,12 +5,12 @@ org.onap.ccsdk.parent odlparent-lite - 1.2.0 + 1.2.1-SNAPSHOT org.onap.ccsdk.sli.plugins restapi-call-node-features - 0.4.0-SNAPSHOT + 0.4.1-SNAPSHOT pom ccsdk-sli-plugins :: restapi-call-node :: ${project.artifactId} diff --git a/restapi-call-node/installer/pom.xml b/restapi-call-node/installer/pom.xml index 399bcf3f2..1675e4ed7 100755 --- a/restapi-call-node/installer/pom.xml +++ b/restapi-call-node/installer/pom.xml @@ -1,48 +1,48 @@ - 4.0.0 + 4.0.0 - - org.onap.ccsdk.parent - odlparent-lite - 1.2.0 - + + org.onap.ccsdk.parent + odlparent-lite + 1.2.1-SNAPSHOT + - org.onap.ccsdk.sli.plugins - restapi-call-node-installer - 0.4.0-SNAPSHOT - pom + org.onap.ccsdk.sli.plugins + restapi-call-node-installer + 0.4.1-SNAPSHOT + pom - ccsdk-sli-plugins :: restapi-call-node :: ${project.artifactId} + ccsdk-sli-plugins :: restapi-call-node :: ${project.artifactId} - - ccsdk-restapi-call-node - ${application.name} + + ccsdk-restapi-call-node + ${application.name} mvn:org.onap.ccsdk.sli.plugins/${features.boot}/${project.version}/xml/features - false - + false + - + - - org.onap.ccsdk.sli.plugins - ${application.name} - ${project.version} - xml - features - - - * - * - - - + + org.onap.ccsdk.sli.plugins + ${application.name} + ${project.version} + xml + features + + + * + * + + + - - org.onap.ccsdk.sli.plugins - restapi-call-node-provider - ${project.version} - + + org.onap.ccsdk.sli.plugins + restapi-call-node-provider + ${project.version} + org.springframework spring-beans @@ -51,98 +51,98 @@ org.springframework spring-context - + - - - - maven-assembly-plugin - 2.6 - - - maven-repo-zip - - single - - package - - true - stage/${application.name}-${project.version} - - src/assembly/assemble_mvnrepo_zip.xml - - true - - - - installer-zip - - single - - package - - true - ${application.name}-${project.version}-installer - - src/assembly/assemble_installer_zip.xml - - false - - - - - - org.apache.maven.plugins - maven-dependency-plugin - - - copy-dependencies - - copy-dependencies - - prepare-package - - false - ${project.build.directory}/assembly/system - false - true - true - true - false - false - org.onap.ccsdk.sli.core - provided - - - - - - maven-resources-plugin - 2.6 - - - copy-version - - copy-resources - - validate - - ${basedir}/target/stage - - - src/main/resources/scripts - - install-feature.sh - - true - - - - + + + + maven-assembly-plugin + 2.6 + + + maven-repo-zip + + single + + package + + true + stage/${application.name}-${project.version} + + src/assembly/assemble_mvnrepo_zip.xml + + true + + + + installer-zip + + single + + package + + true + ${application.name}-${project.version}-installer + + src/assembly/assemble_installer_zip.xml + + false + + + + + + org.apache.maven.plugins + maven-dependency-plugin + + + copy-dependencies + + copy-dependencies + + prepare-package + + false + ${project.build.directory}/assembly/system + false + true + true + true + false + false + org.onap.ccsdk.sli.core + provided + + + + + + maven-resources-plugin + 2.6 + + + copy-version + + copy-resources + + validate + + ${basedir}/target/stage + + + src/main/resources/scripts + + install-feature.sh + + true + + + + - - + + - - + + diff --git a/restapi-call-node/pom.xml b/restapi-call-node/pom.xml index 093497e90..de941aadc 100755 --- a/restapi-call-node/pom.xml +++ b/restapi-call-node/pom.xml @@ -5,12 +5,12 @@ org.onap.ccsdk.parent odlparent-lite - 1.2.0 + 1.2.1-SNAPSHOT org.onap.ccsdk.sli.plugins restapi-call-node - 0.4.0-SNAPSHOT + 0.4.1-SNAPSHOT pom ccsdk-sli-plugins :: restapi-call-node diff --git a/restapi-call-node/provider/pom.xml b/restapi-call-node/provider/pom.xml index 74127832e..52178540c 100755 --- a/restapi-call-node/provider/pom.xml +++ b/restapi-call-node/provider/pom.xml @@ -5,21 +5,32 @@ org.onap.ccsdk.parent binding-parent - 1.2.0 + 1.2.1-SNAPSHOT org.onap.ccsdk.sli.plugins restapi-call-node-provider - 0.4.0-SNAPSHOT + 0.4.1-SNAPSHOT bundle ccsdk-sli-plugins :: restapi-call-node :: ${project.artifactId} UTF-8 - ${project.version} + + + + org.onap.ccsdk.sli.core + sli-core-artifacts + ${ccsdk.sli.core.version} + pom + import + + + + javax.ws.rs diff --git a/restconf-client/features/ccsdk-restconf-client/pom.xml b/restconf-client/features/ccsdk-restconf-client/pom.xml index 97f36121e..e439eac70 100644 --- a/restconf-client/features/ccsdk-restconf-client/pom.xml +++ b/restconf-client/features/ccsdk-restconf-client/pom.xml @@ -1,60 +1,41 @@ - 4.0.0 - - - org.onap.ccsdk.parent - single-feature-parent - 1.2.0 - - - - org.onap.ccsdk.sli.plugins - ccsdk-restconf-client - 0.4.0-SNAPSHOT - feature - - - true - ${project.version} - - - ccsdk-sli-plugins :: restconf-client :: ${project.artifactId} - - - - - - - org.opendaylight.mdsal.model - mdsal-model-artifacts - ${odl.mdsal.model.version} - pom - import - - - org.opendaylight.controller - mdsal-artifacts - ${odl.mdsal.version} - pom - import - - - - - - - - org.onap.ccsdk.sli.core - ccsdk-sli - ${ccsdk.sli.core.version} - xml - features - - - ${project.groupId} - restconf-client-provider - ${project.version} - - + 4.0.0 + + + org.onap.ccsdk.parent + single-feature-parent + 1.2.1-SNAPSHOT + + + + org.onap.ccsdk.sli.plugins + ccsdk-restconf-client + 0.4.1-SNAPSHOT + feature + + + true + + + ccsdk-sli-plugins :: restconf-client :: ${project.artifactId} + + + + + + + + org.onap.ccsdk.sli.core + ccsdk-sli + ${ccsdk.sli.core.version} + xml + features + + + ${project.groupId} + restconf-client-provider + ${project.version} + + diff --git a/restconf-client/features/features-restconf-client/pom.xml b/restconf-client/features/features-restconf-client/pom.xml index 32c7feb1b..e82e355d8 100644 --- a/restconf-client/features/features-restconf-client/pom.xml +++ b/restconf-client/features/features-restconf-client/pom.xml @@ -1,33 +1,29 @@ - 4.0.0 + 4.0.0 - - org.onap.ccsdk.parent - feature-repo-parent - 1.2.0 - - + + org.onap.ccsdk.parent + feature-repo-parent + 1.2.1-SNAPSHOT + + - org.onap.ccsdk.sli.plugins - features-restconf-client - 0.4.0-SNAPSHOT - feature + org.onap.ccsdk.sli.plugins + features-restconf-client + 0.4.1-SNAPSHOT + feature - ccsdk-sli-plugins :: restconf-client :: ${project.artifactId} + ccsdk-sli-plugins :: restconf-client :: ${project.artifactId} - - ${project.version} - + + + ${project.groupId} + ccsdk-restconf-client + ${project.version} + xml + features + - - - ${project.groupId} - ccsdk-restconf-client - ${project.version} - xml - features - - - + diff --git a/restconf-client/features/pom.xml b/restconf-client/features/pom.xml index e0595c1fc..ae25b5d24 100755 --- a/restconf-client/features/pom.xml +++ b/restconf-client/features/pom.xml @@ -5,12 +5,12 @@ org.onap.ccsdk.parent odlparent-lite - 1.2.0 + 1.2.1-SNAPSHOT org.onap.ccsdk.sli.plugins restconf-client-features - 0.4.0-SNAPSHOT + 0.4.1-SNAPSHOT pom ccsdk-sli-plugins :: restconf-client :: ${project.artifactId} diff --git a/restconf-client/installer/pom.xml b/restconf-client/installer/pom.xml index cbf003d23..1bab5b3c1 100755 --- a/restconf-client/installer/pom.xml +++ b/restconf-client/installer/pom.xml @@ -5,12 +5,12 @@ org.onap.ccsdk.parent odlparent-lite - 1.2.0 + 1.2.1-SNAPSHOT org.onap.ccsdk.sli.plugins restconf-client-installer - 0.4.0-SNAPSHOT + 0.4.1-SNAPSHOT pom ccsdk-sli-plugins :: restconf-client :: ${project.artifactId} diff --git a/restconf-client/pom.xml b/restconf-client/pom.xml index 1097d721e..57fc99f43 100755 --- a/restconf-client/pom.xml +++ b/restconf-client/pom.xml @@ -5,12 +5,12 @@ org.onap.ccsdk.parent odlparent-lite - 1.2.0 + 1.2.1-SNAPSHOT org.onap.ccsdk.sli.plugins restconf-client - 0.4.0-SNAPSHOT + 0.4.1-SNAPSHOT pom ccsdk-sli-plugins :: restconf-client diff --git a/restconf-client/provider/pom.xml b/restconf-client/provider/pom.xml index 78bbc1693..e94671902 100755 --- a/restconf-client/provider/pom.xml +++ b/restconf-client/provider/pom.xml @@ -5,12 +5,12 @@ org.onap.ccsdk.parent binding-parent - 1.2.0 + 1.2.1-SNAPSHOT org.onap.ccsdk.sli.plugins restconf-client-provider - 0.4.0-SNAPSHOT + 0.4.1-SNAPSHOT bundle ccsdk-sli-plugins :: restconf-client :: ${project.artifactId} @@ -18,8 +18,19 @@ UTF-8 - ${project.version} + + + + + org.onap.ccsdk.sli.core + sli-core-artifacts + ${ccsdk.sli.core.version} + pom + import + + + @@ -39,7 +50,7 @@ org.onap.ccsdk.sli.plugins properties-node-provider - 0.4.0-SNAPSHOT + 0.4.1-SNAPSHOT org.opendaylight.yangtools @@ -63,18 +74,22 @@ org.onap.ccsdk.sli.plugins restapi-call-node-provider - 0.4.0-SNAPSHOT + 0.4.1-SNAPSHOT org.opendaylight.netconf restconf-nb-rfc8040 - ${odl.mdsal.version} org.opendaylight.yangtools yang-parser-impl 2.0.6.1 + + org.osgi + org.osgi.core + provided + 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 ead54c77f..3ac681f85 100644 --- a/sshapi-call-node/features/ccsdk-sshapi-call-node/pom.xml +++ b/sshapi-call-node/features/ccsdk-sshapi-call-node/pom.xml @@ -5,41 +5,19 @@ org.onap.ccsdk.parent single-feature-parent - 1.2.0 + 1.2.1-SNAPSHOT org.onap.ccsdk.sli.plugins ccsdk-sshapi-call-node - 0.4.0-SNAPSHOT + 0.4.1-SNAPSHOT feature ccsdk-sli-plugins :: sshapi-call-node :: ${project.artifactId} - - ${project.version} - - - - - - org.opendaylight.mdsal.model - mdsal-model-artifacts - ${odl.mdsal.model.version} - pom - import - - - org.opendaylight.controller - mdsal-artifacts - ${odl.mdsal.version} - pom - import - - - + ${project.groupId} ccsdk-template-node diff --git a/restapi-call-node/provider/pom.xml b/restapi-call-node/provider/pom.xml index 52178540c..5b34153d8 100755 --- a/restapi-call-node/provider/pom.xml +++ b/restapi-call-node/provider/pom.xml @@ -49,15 +49,20 @@ org.slf4j slf4j-api + + org.glassfish.jersey.bundles.repackaged + jersey-guava + 2.22.2 + org.glassfish.jersey.security oauth1-signature - ${glassfish.version} + ${jersey.version} org.glassfish.jersey.security oauth1-client - ${glassfish.version} + ${jersey.version} org.codehaus.jettison @@ -66,14 +71,10 @@ org.glassfish.jersey.core jersey-client - ${glassfish.version} - - - org.glassfish.jersey.inject - jersey-hk2 - ${glassfish.version} + ${jersey.version} + junit diff --git a/restconf-client/provider/pom.xml b/restconf-client/provider/pom.xml index e94671902..0dae6960e 100755 --- a/restconf-client/provider/pom.xml +++ b/restconf-client/provider/pom.xml @@ -36,7 +36,7 @@ org.glassfish.jersey.media jersey-media-sse - ${glassfish.version} + ${jersey.version} javax.ws.rs @@ -103,22 +103,16 @@ ${mockito.version} test - - org.glassfish.jersey.inject - jersey-hk2 - ${glassfish.version} - test - org.glassfish.jersey.containers jersey-container-servlet - ${glassfish.version} + ${jersey.version} test org.glassfish.jersey.containers jersey-container-grizzly2-http - ${glassfish.version} + ${jersey.version} test @@ -133,5 +127,11 @@ 2.0.6.1 test + + org.glassfish.jersey.core + jersey-client + ${jersey.version} + test + -- cgit 1.2.3-korg From 0320e9c271f8534ce867bd4c36ab1883e55cf6e6 Mon Sep 17 00:00:00 2001 From: "Timoney, Dan (dt5972)" Date: Thu, 14 Mar 2019 12:01:11 -0400 Subject: Prepare for release 0.4.1 Prepare to create release version 0.4.1 by using released version of parent pom Change-Id: I72b174efd82ab09b64e2c4c52225304f8174e07a Issue-ID: CCSDK-1156 Signed-off-by: Timoney, Dan (dt5972) --- artifacts/pom.xml | 2 +- features/ccsdk-sli-plugins-all/pom.xml | 2 +- features/features-sli-plugins/pom.xml | 2 +- features/installer/pom.xml | 2 +- features/pom.xml | 2 +- grToolkit/features/ccsdk-gr-toolkit/pom.xml | 7 +++---- grToolkit/features/features-gr-toolkit/pom.xml | 2 +- grToolkit/features/pom.xml | 2 +- grToolkit/installer/pom.xml | 2 +- grToolkit/model/pom.xml | 2 +- grToolkit/pom.xml | 2 +- grToolkit/provider/pom.xml | 2 +- pom.xml | 2 +- properties-node/features/ccsdk-properties-node/pom.xml | 2 +- properties-node/features/features-properties-node/pom.xml | 2 +- properties-node/features/pom.xml | 2 +- properties-node/installer/pom.xml | 2 +- properties-node/pom.xml | 2 +- properties-node/provider/pom.xml | 2 +- restapi-call-node/features/ccsdk-restapi-call-node/pom.xml | 2 +- restapi-call-node/features/features-restapi-call-node/pom.xml | 2 +- restapi-call-node/features/pom.xml | 2 +- restapi-call-node/installer/pom.xml | 2 +- restapi-call-node/pom.xml | 2 +- restapi-call-node/provider/pom.xml | 2 +- restconf-client/features/ccsdk-restconf-client/pom.xml | 2 +- restconf-client/features/features-restconf-client/pom.xml | 2 +- restconf-client/features/pom.xml | 2 +- restconf-client/installer/pom.xml | 2 +- restconf-client/pom.xml | 2 +- restconf-client/provider/pom.xml | 2 +- sshapi-call-node/features/ccsdk-sshapi-call-node/pom.xml | 2 +- sshapi-call-node/features/features-sshapi-call-node/pom.xml | 2 +- sshapi-call-node/features/pom.xml | 2 +- sshapi-call-node/installer/pom.xml | 2 +- sshapi-call-node/pom.xml | 2 +- sshapi-call-node/provider/pom.xml | 2 +- template-node/features/ccsdk-template-node/pom.xml | 6 ++---- template-node/features/features-template-node/pom.xml | 2 +- template-node/features/pom.xml | 2 +- template-node/installer/pom.xml | 6 ++---- template-node/pom.xml | 2 +- template-node/provider/pom.xml | 2 +- 43 files changed, 47 insertions(+), 52 deletions(-) (limited to 'restconf-client/provider') diff --git a/artifacts/pom.xml b/artifacts/pom.xml index 26dbaa59d..354e995a0 100755 --- a/artifacts/pom.xml +++ b/artifacts/pom.xml @@ -17,7 +17,7 @@ org.onap.ccsdk.parent parent - 1.2.1-SNAPSHOT + 1.2.1 diff --git a/features/ccsdk-sli-plugins-all/pom.xml b/features/ccsdk-sli-plugins-all/pom.xml index 7d9068e88..b75833c38 100644 --- a/features/ccsdk-sli-plugins-all/pom.xml +++ b/features/ccsdk-sli-plugins-all/pom.xml @@ -5,7 +5,7 @@ org.onap.ccsdk.parent single-feature-parent - 1.2.1-SNAPSHOT + 1.2.1 diff --git a/features/features-sli-plugins/pom.xml b/features/features-sli-plugins/pom.xml index eb84c5b93..a8e1ec967 100644 --- a/features/features-sli-plugins/pom.xml +++ b/features/features-sli-plugins/pom.xml @@ -5,7 +5,7 @@ org.onap.ccsdk.parent feature-repo-parent - 1.2.1-SNAPSHOT + 1.2.1 diff --git a/features/installer/pom.xml b/features/installer/pom.xml index ad751891f..6459adc78 100755 --- a/features/installer/pom.xml +++ b/features/installer/pom.xml @@ -5,7 +5,7 @@ org.onap.ccsdk.parent odlparent-lite - 1.2.1-SNAPSHOT + 1.2.1 diff --git a/features/pom.xml b/features/pom.xml index 07d77718d..163ec876d 100755 --- a/features/pom.xml +++ b/features/pom.xml @@ -5,7 +5,7 @@ org.onap.ccsdk.parent odlparent-lite - 1.2.1-SNAPSHOT + 1.2.1 diff --git a/grToolkit/features/ccsdk-gr-toolkit/pom.xml b/grToolkit/features/ccsdk-gr-toolkit/pom.xml index f4865a5b3..3b655ce17 100755 --- a/grToolkit/features/ccsdk-gr-toolkit/pom.xml +++ b/grToolkit/features/ccsdk-gr-toolkit/pom.xml @@ -1,13 +1,12 @@ - + 4.0.0 org.onap.ccsdk.parent single-feature-parent - 1.2.1-SNAPSHOT - + 1.2.1 + org.onap.ccsdk.sli.plugins diff --git a/grToolkit/features/features-gr-toolkit/pom.xml b/grToolkit/features/features-gr-toolkit/pom.xml index d74cbb63c..2c966a999 100755 --- a/grToolkit/features/features-gr-toolkit/pom.xml +++ b/grToolkit/features/features-gr-toolkit/pom.xml @@ -5,7 +5,7 @@ org.onap.ccsdk.parent feature-repo-parent - 1.2.1-SNAPSHOT + 1.2.1 diff --git a/grToolkit/features/pom.xml b/grToolkit/features/pom.xml index 3f6ab6186..cf3886ce0 100755 --- a/grToolkit/features/pom.xml +++ b/grToolkit/features/pom.xml @@ -4,7 +4,7 @@ org.onap.ccsdk.parent odlparent-lite - 1.2.1-SNAPSHOT + 1.2.1 diff --git a/grToolkit/installer/pom.xml b/grToolkit/installer/pom.xml index b15c877f7..9e44e8500 100755 --- a/grToolkit/installer/pom.xml +++ b/grToolkit/installer/pom.xml @@ -4,7 +4,7 @@ org.onap.ccsdk.parent odlparent-lite - 1.2.1-SNAPSHOT + 1.2.1 diff --git a/grToolkit/model/pom.xml b/grToolkit/model/pom.xml index 348b34784..ade2c6fa2 100755 --- a/grToolkit/model/pom.xml +++ b/grToolkit/model/pom.xml @@ -4,7 +4,7 @@ org.onap.ccsdk.parent binding-parent - 1.2.1-SNAPSHOT + 1.2.1 ccsdk-sli-plugins :: gr-toolkit :: ${project.artifactId} diff --git a/grToolkit/pom.xml b/grToolkit/pom.xml index c36e2f161..af3ada398 100755 --- a/grToolkit/pom.xml +++ b/grToolkit/pom.xml @@ -5,7 +5,7 @@ org.onap.ccsdk.parent odlparent-lite - 1.2.1-SNAPSHOT + 1.2.1 diff --git a/grToolkit/provider/pom.xml b/grToolkit/provider/pom.xml index 75b6d431b..6f23f9afa 100755 --- a/grToolkit/provider/pom.xml +++ b/grToolkit/provider/pom.xml @@ -4,7 +4,7 @@ org.onap.ccsdk.parent binding-parent - 1.2.1-SNAPSHOT + 1.2.1 ccsdk-sli-plugins :: gr-toolkit :: ${project.artifactId} diff --git a/pom.xml b/pom.xml index 7528a9b78..d21e9eee2 100755 --- a/pom.xml +++ b/pom.xml @@ -5,7 +5,7 @@ org.onap.ccsdk.parent odlparent-lite - 1.2.1-SNAPSHOT + 1.2.1 org.onap.ccsdk.sli.plugins diff --git a/properties-node/features/ccsdk-properties-node/pom.xml b/properties-node/features/ccsdk-properties-node/pom.xml index 1d5feae6c..66b6bb8fc 100644 --- a/properties-node/features/ccsdk-properties-node/pom.xml +++ b/properties-node/features/ccsdk-properties-node/pom.xml @@ -5,7 +5,7 @@ org.onap.ccsdk.parent single-feature-parent - 1.2.1-SNAPSHOT + 1.2.1 diff --git a/properties-node/features/features-properties-node/pom.xml b/properties-node/features/features-properties-node/pom.xml index e00d2cfa4..fc01a7491 100644 --- a/properties-node/features/features-properties-node/pom.xml +++ b/properties-node/features/features-properties-node/pom.xml @@ -5,7 +5,7 @@ org.onap.ccsdk.parent feature-repo-parent - 1.2.1-SNAPSHOT + 1.2.1 diff --git a/properties-node/features/pom.xml b/properties-node/features/pom.xml index 27bea0291..75b7b23fb 100755 --- a/properties-node/features/pom.xml +++ b/properties-node/features/pom.xml @@ -5,7 +5,7 @@ org.onap.ccsdk.parent odlparent-lite - 1.2.1-SNAPSHOT + 1.2.1 org.onap.ccsdk.sli.plugins diff --git a/properties-node/installer/pom.xml b/properties-node/installer/pom.xml index c431b521c..c06ee8beb 100755 --- a/properties-node/installer/pom.xml +++ b/properties-node/installer/pom.xml @@ -5,7 +5,7 @@ org.onap.ccsdk.parent odlparent-lite - 1.2.1-SNAPSHOT + 1.2.1 org.onap.ccsdk.sli.plugins diff --git a/properties-node/pom.xml b/properties-node/pom.xml index c8d9c9a3c..ec1b9980d 100755 --- a/properties-node/pom.xml +++ b/properties-node/pom.xml @@ -5,7 +5,7 @@ org.onap.ccsdk.parent odlparent-lite - 1.2.1-SNAPSHOT + 1.2.1 org.onap.ccsdk.sli.plugins diff --git a/properties-node/provider/pom.xml b/properties-node/provider/pom.xml index 92cff9992..3b72050db 100755 --- a/properties-node/provider/pom.xml +++ b/properties-node/provider/pom.xml @@ -5,7 +5,7 @@ org.onap.ccsdk.parent binding-parent - 1.2.1-SNAPSHOT + 1.2.1 org.onap.ccsdk.sli.plugins 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 638cff391..cae47c65f 100644 --- a/restapi-call-node/features/ccsdk-restapi-call-node/pom.xml +++ b/restapi-call-node/features/ccsdk-restapi-call-node/pom.xml @@ -5,7 +5,7 @@ org.onap.ccsdk.parent single-feature-parent - 1.2.1-SNAPSHOT + 1.2.1 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 64541a74b..f63a296c5 100644 --- a/restapi-call-node/features/features-restapi-call-node/pom.xml +++ b/restapi-call-node/features/features-restapi-call-node/pom.xml @@ -5,7 +5,7 @@ org.onap.ccsdk.parent feature-repo-parent - 1.2.1-SNAPSHOT + 1.2.1 diff --git a/restapi-call-node/features/pom.xml b/restapi-call-node/features/pom.xml index 3ae7a2fc3..6a2908d1c 100755 --- a/restapi-call-node/features/pom.xml +++ b/restapi-call-node/features/pom.xml @@ -5,7 +5,7 @@ org.onap.ccsdk.parent odlparent-lite - 1.2.1-SNAPSHOT + 1.2.1 org.onap.ccsdk.sli.plugins diff --git a/restapi-call-node/installer/pom.xml b/restapi-call-node/installer/pom.xml index 1675e4ed7..10ce3c2c8 100755 --- a/restapi-call-node/installer/pom.xml +++ b/restapi-call-node/installer/pom.xml @@ -5,7 +5,7 @@ org.onap.ccsdk.parent odlparent-lite - 1.2.1-SNAPSHOT + 1.2.1 org.onap.ccsdk.sli.plugins diff --git a/restapi-call-node/pom.xml b/restapi-call-node/pom.xml index de941aadc..42b9ea98a 100755 --- a/restapi-call-node/pom.xml +++ b/restapi-call-node/pom.xml @@ -5,7 +5,7 @@ org.onap.ccsdk.parent odlparent-lite - 1.2.1-SNAPSHOT + 1.2.1 org.onap.ccsdk.sli.plugins diff --git a/restapi-call-node/provider/pom.xml b/restapi-call-node/provider/pom.xml index 9f0f1cebf..fa69f5d0e 100755 --- a/restapi-call-node/provider/pom.xml +++ b/restapi-call-node/provider/pom.xml @@ -5,7 +5,7 @@ org.onap.ccsdk.parent binding-parent - 1.2.1-SNAPSHOT + 1.2.1 org.onap.ccsdk.sli.plugins diff --git a/restconf-client/features/ccsdk-restconf-client/pom.xml b/restconf-client/features/ccsdk-restconf-client/pom.xml index e439eac70..1255149b8 100644 --- a/restconf-client/features/ccsdk-restconf-client/pom.xml +++ b/restconf-client/features/ccsdk-restconf-client/pom.xml @@ -5,7 +5,7 @@ org.onap.ccsdk.parent single-feature-parent - 1.2.1-SNAPSHOT + 1.2.1 diff --git a/restconf-client/features/features-restconf-client/pom.xml b/restconf-client/features/features-restconf-client/pom.xml index e82e355d8..41c10f0ce 100644 --- a/restconf-client/features/features-restconf-client/pom.xml +++ b/restconf-client/features/features-restconf-client/pom.xml @@ -5,7 +5,7 @@ org.onap.ccsdk.parent feature-repo-parent - 1.2.1-SNAPSHOT + 1.2.1 diff --git a/restconf-client/features/pom.xml b/restconf-client/features/pom.xml index ae25b5d24..3e07de3e1 100755 --- a/restconf-client/features/pom.xml +++ b/restconf-client/features/pom.xml @@ -5,7 +5,7 @@ org.onap.ccsdk.parent odlparent-lite - 1.2.1-SNAPSHOT + 1.2.1 org.onap.ccsdk.sli.plugins diff --git a/restconf-client/installer/pom.xml b/restconf-client/installer/pom.xml index 1bab5b3c1..b3f61302d 100755 --- a/restconf-client/installer/pom.xml +++ b/restconf-client/installer/pom.xml @@ -5,7 +5,7 @@ org.onap.ccsdk.parent odlparent-lite - 1.2.1-SNAPSHOT + 1.2.1 org.onap.ccsdk.sli.plugins diff --git a/restconf-client/pom.xml b/restconf-client/pom.xml index 57fc99f43..c5b753048 100755 --- a/restconf-client/pom.xml +++ b/restconf-client/pom.xml @@ -5,7 +5,7 @@ org.onap.ccsdk.parent odlparent-lite - 1.2.1-SNAPSHOT + 1.2.1 org.onap.ccsdk.sli.plugins diff --git a/restconf-client/provider/pom.xml b/restconf-client/provider/pom.xml index 0dae6960e..ccc9ab869 100755 --- a/restconf-client/provider/pom.xml +++ b/restconf-client/provider/pom.xml @@ -5,7 +5,7 @@ org.onap.ccsdk.parent binding-parent - 1.2.1-SNAPSHOT + 1.2.1 org.onap.ccsdk.sli.plugins 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 3ac681f85..7ec23e9cf 100644 --- a/sshapi-call-node/features/ccsdk-sshapi-call-node/pom.xml +++ b/sshapi-call-node/features/ccsdk-sshapi-call-node/pom.xml @@ -5,7 +5,7 @@ org.onap.ccsdk.parent single-feature-parent - 1.2.1-SNAPSHOT + 1.2.1 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 69273c34e..f0752ffeb 100644 --- a/sshapi-call-node/features/features-sshapi-call-node/pom.xml +++ b/sshapi-call-node/features/features-sshapi-call-node/pom.xml @@ -5,7 +5,7 @@ org.onap.ccsdk.parent feature-repo-parent - 1.2.1-SNAPSHOT + 1.2.1 diff --git a/sshapi-call-node/features/pom.xml b/sshapi-call-node/features/pom.xml index fae9df428..e9931fe77 100755 --- a/sshapi-call-node/features/pom.xml +++ b/sshapi-call-node/features/pom.xml @@ -5,7 +5,7 @@ org.onap.ccsdk.parent odlparent-lite - 1.2.1-SNAPSHOT + 1.2.1 org.onap.ccsdk.sli.plugins diff --git a/sshapi-call-node/installer/pom.xml b/sshapi-call-node/installer/pom.xml index 7e703a7aa..169c4d481 100755 --- a/sshapi-call-node/installer/pom.xml +++ b/sshapi-call-node/installer/pom.xml @@ -5,7 +5,7 @@ org.onap.ccsdk.parent odlparent-lite - 1.2.1-SNAPSHOT + 1.2.1 org.onap.ccsdk.sli.plugins diff --git a/sshapi-call-node/pom.xml b/sshapi-call-node/pom.xml index cc3187bc4..4c866fdf9 100755 --- a/sshapi-call-node/pom.xml +++ b/sshapi-call-node/pom.xml @@ -5,7 +5,7 @@ org.onap.ccsdk.parent odlparent-lite - 1.2.1-SNAPSHOT + 1.2.1 org.onap.ccsdk.sli.plugins diff --git a/sshapi-call-node/provider/pom.xml b/sshapi-call-node/provider/pom.xml index 6dff42fb6..cad9b796f 100755 --- a/sshapi-call-node/provider/pom.xml +++ b/sshapi-call-node/provider/pom.xml @@ -5,7 +5,7 @@ org.onap.ccsdk.parent binding-parent - 1.2.1-SNAPSHOT + 1.2.1 org.onap.ccsdk.sli.plugins diff --git a/template-node/features/ccsdk-template-node/pom.xml b/template-node/features/ccsdk-template-node/pom.xml index e43381f39..4ce8a7d9b 100644 --- a/template-node/features/ccsdk-template-node/pom.xml +++ b/template-node/features/ccsdk-template-node/pom.xml @@ -1,13 +1,11 @@ - + 4.0.0 org.onap.ccsdk.parent single-feature-parent - 1.2.1-SNAPSHOT + 1.2.1 diff --git a/template-node/features/features-template-node/pom.xml b/template-node/features/features-template-node/pom.xml index 0e22b6137..6b2f28993 100644 --- a/template-node/features/features-template-node/pom.xml +++ b/template-node/features/features-template-node/pom.xml @@ -5,7 +5,7 @@ org.onap.ccsdk.parent feature-repo-parent - 1.2.1-SNAPSHOT + 1.2.1 diff --git a/template-node/features/pom.xml b/template-node/features/pom.xml index a7a2d67d7..a43a8f142 100644 --- a/template-node/features/pom.xml +++ b/template-node/features/pom.xml @@ -5,7 +5,7 @@ org.onap.ccsdk.parent odlparent-lite - 1.2.1-SNAPSHOT + 1.2.1 org.onap.ccsdk.sli.plugins diff --git a/template-node/installer/pom.xml b/template-node/installer/pom.xml index d8cdd69b3..f00714780 100644 --- a/template-node/installer/pom.xml +++ b/template-node/installer/pom.xml @@ -1,13 +1,11 @@ - + 4.0.0 org.onap.ccsdk.parent odlparent-lite - 1.2.1-SNAPSHOT + 1.2.1 org.onap.ccsdk.sli.plugins diff --git a/template-node/pom.xml b/template-node/pom.xml index 3bfe36279..d7277910a 100644 --- a/template-node/pom.xml +++ b/template-node/pom.xml @@ -5,7 +5,7 @@ org.onap.ccsdk.parent odlparent-lite - 1.2.1-SNAPSHOT + 1.2.1 org.onap.ccsdk.sli.plugins diff --git a/template-node/provider/pom.xml b/template-node/provider/pom.xml index 7434abc0f..38921305d 100644 --- a/template-node/provider/pom.xml +++ b/template-node/provider/pom.xml @@ -5,7 +5,7 @@ org.onap.ccsdk.parent binding-parent - 1.2.1-SNAPSHOT + 1.2.1 org.onap.ccsdk.sli.plugins -- cgit 1.2.3-korg From 38147a9470892ef00182b58f48fd661032ce8a11 Mon Sep 17 00:00:00 2001 From: "Timoney, Dan (dt5972)" Date: Tue, 19 Mar 2019 18:08:37 -0400 Subject: Compile against Fluorine SR2 Updated to compile against Fluorine SR2 Change-Id: I83208310f6386ac8c37433ac8af50de7c611fd06 Issue-ID: CCSDK-1156 Signed-off-by: Timoney, Dan (dt5972) --- artifacts/pom.xml | 2 +- features/ccsdk-sli-plugins-all/pom.xml | 2 +- features/features-sli-plugins/pom.xml | 2 +- features/installer/pom.xml | 2 +- features/pom.xml | 2 +- grToolkit/features/ccsdk-gr-toolkit/pom.xml | 2 +- grToolkit/features/features-gr-toolkit/pom.xml | 2 +- grToolkit/features/pom.xml | 2 +- grToolkit/installer/pom.xml | 2 +- grToolkit/model/pom.xml | 2 +- grToolkit/pom.xml | 2 +- grToolkit/provider/pom.xml | 2 +- pom.xml | 2 +- properties-node/features/ccsdk-properties-node/pom.xml | 2 +- properties-node/features/features-properties-node/pom.xml | 2 +- properties-node/features/pom.xml | 2 +- properties-node/installer/pom.xml | 2 +- properties-node/pom.xml | 2 +- properties-node/provider/pom.xml | 2 +- restapi-call-node/features/ccsdk-restapi-call-node/pom.xml | 2 +- restapi-call-node/features/features-restapi-call-node/pom.xml | 2 +- restapi-call-node/features/pom.xml | 2 +- restapi-call-node/installer/pom.xml | 2 +- restapi-call-node/pom.xml | 2 +- restapi-call-node/provider/pom.xml | 2 +- restconf-client/features/ccsdk-restconf-client/pom.xml | 2 +- restconf-client/features/features-restconf-client/pom.xml | 2 +- restconf-client/features/pom.xml | 2 +- restconf-client/installer/pom.xml | 2 +- restconf-client/pom.xml | 2 +- restconf-client/provider/pom.xml | 2 +- sshapi-call-node/features/ccsdk-sshapi-call-node/pom.xml | 2 +- sshapi-call-node/features/features-sshapi-call-node/pom.xml | 2 +- sshapi-call-node/features/pom.xml | 2 +- sshapi-call-node/installer/pom.xml | 2 +- sshapi-call-node/pom.xml | 2 +- sshapi-call-node/provider/pom.xml | 2 +- template-node/features/ccsdk-template-node/pom.xml | 2 +- template-node/features/features-template-node/pom.xml | 2 +- template-node/features/pom.xml | 2 +- template-node/installer/pom.xml | 2 +- template-node/pom.xml | 2 +- template-node/provider/pom.xml | 2 +- version.properties | 2 +- 44 files changed, 44 insertions(+), 44 deletions(-) (limited to 'restconf-client/provider') diff --git a/artifacts/pom.xml b/artifacts/pom.xml index 354e995a0..79ad7574d 100755 --- a/artifacts/pom.xml +++ b/artifacts/pom.xml @@ -17,7 +17,7 @@ org.onap.ccsdk.parent parent - 1.2.1 + 1.2.2-SNAPSHOT diff --git a/features/ccsdk-sli-plugins-all/pom.xml b/features/ccsdk-sli-plugins-all/pom.xml index b75833c38..c7a43a483 100644 --- a/features/ccsdk-sli-plugins-all/pom.xml +++ b/features/ccsdk-sli-plugins-all/pom.xml @@ -5,7 +5,7 @@ org.onap.ccsdk.parent single-feature-parent - 1.2.1 + 1.2.2-SNAPSHOT diff --git a/features/features-sli-plugins/pom.xml b/features/features-sli-plugins/pom.xml index a8e1ec967..3d6364689 100644 --- a/features/features-sli-plugins/pom.xml +++ b/features/features-sli-plugins/pom.xml @@ -5,7 +5,7 @@ org.onap.ccsdk.parent feature-repo-parent - 1.2.1 + 1.2.2-SNAPSHOT diff --git a/features/installer/pom.xml b/features/installer/pom.xml index 6459adc78..a83003c7c 100755 --- a/features/installer/pom.xml +++ b/features/installer/pom.xml @@ -5,7 +5,7 @@ org.onap.ccsdk.parent odlparent-lite - 1.2.1 + 1.2.2-SNAPSHOT diff --git a/features/pom.xml b/features/pom.xml index 163ec876d..4e8783475 100755 --- a/features/pom.xml +++ b/features/pom.xml @@ -5,7 +5,7 @@ org.onap.ccsdk.parent odlparent-lite - 1.2.1 + 1.2.2-SNAPSHOT diff --git a/grToolkit/features/ccsdk-gr-toolkit/pom.xml b/grToolkit/features/ccsdk-gr-toolkit/pom.xml index 3b655ce17..9c3a54a37 100755 --- a/grToolkit/features/ccsdk-gr-toolkit/pom.xml +++ b/grToolkit/features/ccsdk-gr-toolkit/pom.xml @@ -5,7 +5,7 @@ org.onap.ccsdk.parent single-feature-parent - 1.2.1 + 1.2.2-SNAPSHOT diff --git a/grToolkit/features/features-gr-toolkit/pom.xml b/grToolkit/features/features-gr-toolkit/pom.xml index 2c966a999..abde024b4 100755 --- a/grToolkit/features/features-gr-toolkit/pom.xml +++ b/grToolkit/features/features-gr-toolkit/pom.xml @@ -5,7 +5,7 @@ org.onap.ccsdk.parent feature-repo-parent - 1.2.1 + 1.2.2-SNAPSHOT diff --git a/grToolkit/features/pom.xml b/grToolkit/features/pom.xml index cf3886ce0..cd8f272cf 100755 --- a/grToolkit/features/pom.xml +++ b/grToolkit/features/pom.xml @@ -4,7 +4,7 @@ org.onap.ccsdk.parent odlparent-lite - 1.2.1 + 1.2.2-SNAPSHOT diff --git a/grToolkit/installer/pom.xml b/grToolkit/installer/pom.xml index 9e44e8500..71b097999 100755 --- a/grToolkit/installer/pom.xml +++ b/grToolkit/installer/pom.xml @@ -4,7 +4,7 @@ org.onap.ccsdk.parent odlparent-lite - 1.2.1 + 1.2.2-SNAPSHOT diff --git a/grToolkit/model/pom.xml b/grToolkit/model/pom.xml index ade2c6fa2..1012e762b 100755 --- a/grToolkit/model/pom.xml +++ b/grToolkit/model/pom.xml @@ -4,7 +4,7 @@ org.onap.ccsdk.parent binding-parent - 1.2.1 + 1.2.2-SNAPSHOT ccsdk-sli-plugins :: gr-toolkit :: ${project.artifactId} diff --git a/grToolkit/pom.xml b/grToolkit/pom.xml index af3ada398..cf754dac5 100755 --- a/grToolkit/pom.xml +++ b/grToolkit/pom.xml @@ -5,7 +5,7 @@ org.onap.ccsdk.parent odlparent-lite - 1.2.1 + 1.2.2-SNAPSHOT diff --git a/grToolkit/provider/pom.xml b/grToolkit/provider/pom.xml index 6f23f9afa..cc4354b33 100755 --- a/grToolkit/provider/pom.xml +++ b/grToolkit/provider/pom.xml @@ -4,7 +4,7 @@ org.onap.ccsdk.parent binding-parent - 1.2.1 + 1.2.2-SNAPSHOT ccsdk-sli-plugins :: gr-toolkit :: ${project.artifactId} diff --git a/pom.xml b/pom.xml index 2cd2337e7..cdc24e08d 100755 --- a/pom.xml +++ b/pom.xml @@ -5,7 +5,7 @@ org.onap.ccsdk.parent odlparent-lite - 1.2.1 + 1.2.2-SNAPSHOT org.onap.ccsdk.sli.plugins diff --git a/properties-node/features/ccsdk-properties-node/pom.xml b/properties-node/features/ccsdk-properties-node/pom.xml index 66b6bb8fc..d30ee0ad3 100644 --- a/properties-node/features/ccsdk-properties-node/pom.xml +++ b/properties-node/features/ccsdk-properties-node/pom.xml @@ -5,7 +5,7 @@ org.onap.ccsdk.parent single-feature-parent - 1.2.1 + 1.2.2-SNAPSHOT diff --git a/properties-node/features/features-properties-node/pom.xml b/properties-node/features/features-properties-node/pom.xml index fc01a7491..faea526e8 100644 --- a/properties-node/features/features-properties-node/pom.xml +++ b/properties-node/features/features-properties-node/pom.xml @@ -5,7 +5,7 @@ org.onap.ccsdk.parent feature-repo-parent - 1.2.1 + 1.2.2-SNAPSHOT diff --git a/properties-node/features/pom.xml b/properties-node/features/pom.xml index 75b7b23fb..a1f58ab1f 100755 --- a/properties-node/features/pom.xml +++ b/properties-node/features/pom.xml @@ -5,7 +5,7 @@ org.onap.ccsdk.parent odlparent-lite - 1.2.1 + 1.2.2-SNAPSHOT org.onap.ccsdk.sli.plugins diff --git a/properties-node/installer/pom.xml b/properties-node/installer/pom.xml index c06ee8beb..dae92c36c 100755 --- a/properties-node/installer/pom.xml +++ b/properties-node/installer/pom.xml @@ -5,7 +5,7 @@ org.onap.ccsdk.parent odlparent-lite - 1.2.1 + 1.2.2-SNAPSHOT org.onap.ccsdk.sli.plugins diff --git a/properties-node/pom.xml b/properties-node/pom.xml index ec1b9980d..b3ecbc6e1 100755 --- a/properties-node/pom.xml +++ b/properties-node/pom.xml @@ -5,7 +5,7 @@ org.onap.ccsdk.parent odlparent-lite - 1.2.1 + 1.2.2-SNAPSHOT org.onap.ccsdk.sli.plugins diff --git a/properties-node/provider/pom.xml b/properties-node/provider/pom.xml index 3b72050db..e05a2b185 100755 --- a/properties-node/provider/pom.xml +++ b/properties-node/provider/pom.xml @@ -5,7 +5,7 @@ org.onap.ccsdk.parent binding-parent - 1.2.1 + 1.2.2-SNAPSHOT org.onap.ccsdk.sli.plugins 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 cae47c65f..1200f92ce 100644 --- a/restapi-call-node/features/ccsdk-restapi-call-node/pom.xml +++ b/restapi-call-node/features/ccsdk-restapi-call-node/pom.xml @@ -5,7 +5,7 @@ org.onap.ccsdk.parent single-feature-parent - 1.2.1 + 1.2.2-SNAPSHOT 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 f63a296c5..04645ee77 100644 --- a/restapi-call-node/features/features-restapi-call-node/pom.xml +++ b/restapi-call-node/features/features-restapi-call-node/pom.xml @@ -5,7 +5,7 @@ org.onap.ccsdk.parent feature-repo-parent - 1.2.1 + 1.2.2-SNAPSHOT diff --git a/restapi-call-node/features/pom.xml b/restapi-call-node/features/pom.xml index 6a2908d1c..d5967d591 100755 --- a/restapi-call-node/features/pom.xml +++ b/restapi-call-node/features/pom.xml @@ -5,7 +5,7 @@ org.onap.ccsdk.parent odlparent-lite - 1.2.1 + 1.2.2-SNAPSHOT org.onap.ccsdk.sli.plugins diff --git a/restapi-call-node/installer/pom.xml b/restapi-call-node/installer/pom.xml index 10ce3c2c8..187ed18d2 100755 --- a/restapi-call-node/installer/pom.xml +++ b/restapi-call-node/installer/pom.xml @@ -5,7 +5,7 @@ org.onap.ccsdk.parent odlparent-lite - 1.2.1 + 1.2.2-SNAPSHOT org.onap.ccsdk.sli.plugins diff --git a/restapi-call-node/pom.xml b/restapi-call-node/pom.xml index 42b9ea98a..e2167ec4a 100755 --- a/restapi-call-node/pom.xml +++ b/restapi-call-node/pom.xml @@ -5,7 +5,7 @@ org.onap.ccsdk.parent odlparent-lite - 1.2.1 + 1.2.2-SNAPSHOT org.onap.ccsdk.sli.plugins diff --git a/restapi-call-node/provider/pom.xml b/restapi-call-node/provider/pom.xml index fa69f5d0e..aa183c58b 100755 --- a/restapi-call-node/provider/pom.xml +++ b/restapi-call-node/provider/pom.xml @@ -5,7 +5,7 @@ org.onap.ccsdk.parent binding-parent - 1.2.1 + 1.2.2-SNAPSHOT org.onap.ccsdk.sli.plugins diff --git a/restconf-client/features/ccsdk-restconf-client/pom.xml b/restconf-client/features/ccsdk-restconf-client/pom.xml index 1255149b8..52c766d7a 100644 --- a/restconf-client/features/ccsdk-restconf-client/pom.xml +++ b/restconf-client/features/ccsdk-restconf-client/pom.xml @@ -5,7 +5,7 @@ org.onap.ccsdk.parent single-feature-parent - 1.2.1 + 1.2.2-SNAPSHOT diff --git a/restconf-client/features/features-restconf-client/pom.xml b/restconf-client/features/features-restconf-client/pom.xml index 41c10f0ce..8757bec22 100644 --- a/restconf-client/features/features-restconf-client/pom.xml +++ b/restconf-client/features/features-restconf-client/pom.xml @@ -5,7 +5,7 @@ org.onap.ccsdk.parent feature-repo-parent - 1.2.1 + 1.2.2-SNAPSHOT diff --git a/restconf-client/features/pom.xml b/restconf-client/features/pom.xml index 3e07de3e1..2471ece18 100755 --- a/restconf-client/features/pom.xml +++ b/restconf-client/features/pom.xml @@ -5,7 +5,7 @@ org.onap.ccsdk.parent odlparent-lite - 1.2.1 + 1.2.2-SNAPSHOT org.onap.ccsdk.sli.plugins diff --git a/restconf-client/installer/pom.xml b/restconf-client/installer/pom.xml index b3f61302d..32901f88b 100755 --- a/restconf-client/installer/pom.xml +++ b/restconf-client/installer/pom.xml @@ -5,7 +5,7 @@ org.onap.ccsdk.parent odlparent-lite - 1.2.1 + 1.2.2-SNAPSHOT org.onap.ccsdk.sli.plugins diff --git a/restconf-client/pom.xml b/restconf-client/pom.xml index c5b753048..cb63a81a9 100755 --- a/restconf-client/pom.xml +++ b/restconf-client/pom.xml @@ -5,7 +5,7 @@ org.onap.ccsdk.parent odlparent-lite - 1.2.1 + 1.2.2-SNAPSHOT org.onap.ccsdk.sli.plugins diff --git a/restconf-client/provider/pom.xml b/restconf-client/provider/pom.xml index ccc9ab869..1e6bfcc8e 100755 --- a/restconf-client/provider/pom.xml +++ b/restconf-client/provider/pom.xml @@ -5,7 +5,7 @@ org.onap.ccsdk.parent binding-parent - 1.2.1 + 1.2.2-SNAPSHOT org.onap.ccsdk.sli.plugins 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 7ec23e9cf..b6534393f 100644 --- a/sshapi-call-node/features/ccsdk-sshapi-call-node/pom.xml +++ b/sshapi-call-node/features/ccsdk-sshapi-call-node/pom.xml @@ -5,7 +5,7 @@ org.onap.ccsdk.parent single-feature-parent - 1.2.1 + 1.2.2-SNAPSHOT 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 f0752ffeb..f0a3e8041 100644 --- a/sshapi-call-node/features/features-sshapi-call-node/pom.xml +++ b/sshapi-call-node/features/features-sshapi-call-node/pom.xml @@ -5,7 +5,7 @@ org.onap.ccsdk.parent feature-repo-parent - 1.2.1 + 1.2.2-SNAPSHOT diff --git a/sshapi-call-node/features/pom.xml b/sshapi-call-node/features/pom.xml index e9931fe77..c04ad6095 100755 --- a/sshapi-call-node/features/pom.xml +++ b/sshapi-call-node/features/pom.xml @@ -5,7 +5,7 @@ org.onap.ccsdk.parent odlparent-lite - 1.2.1 + 1.2.2-SNAPSHOT org.onap.ccsdk.sli.plugins diff --git a/sshapi-call-node/installer/pom.xml b/sshapi-call-node/installer/pom.xml index 169c4d481..6b54e409a 100755 --- a/sshapi-call-node/installer/pom.xml +++ b/sshapi-call-node/installer/pom.xml @@ -5,7 +5,7 @@ org.onap.ccsdk.parent odlparent-lite - 1.2.1 + 1.2.2-SNAPSHOT org.onap.ccsdk.sli.plugins diff --git a/sshapi-call-node/pom.xml b/sshapi-call-node/pom.xml index 4c866fdf9..48adb81ba 100755 --- a/sshapi-call-node/pom.xml +++ b/sshapi-call-node/pom.xml @@ -5,7 +5,7 @@ org.onap.ccsdk.parent odlparent-lite - 1.2.1 + 1.2.2-SNAPSHOT org.onap.ccsdk.sli.plugins diff --git a/sshapi-call-node/provider/pom.xml b/sshapi-call-node/provider/pom.xml index cad9b796f..c3b7c281a 100755 --- a/sshapi-call-node/provider/pom.xml +++ b/sshapi-call-node/provider/pom.xml @@ -5,7 +5,7 @@ org.onap.ccsdk.parent binding-parent - 1.2.1 + 1.2.2-SNAPSHOT org.onap.ccsdk.sli.plugins diff --git a/template-node/features/ccsdk-template-node/pom.xml b/template-node/features/ccsdk-template-node/pom.xml index 4ce8a7d9b..b6cf31f2d 100644 --- a/template-node/features/ccsdk-template-node/pom.xml +++ b/template-node/features/ccsdk-template-node/pom.xml @@ -5,7 +5,7 @@ org.onap.ccsdk.parent single-feature-parent - 1.2.1 + 1.2.2-SNAPSHOT diff --git a/template-node/features/features-template-node/pom.xml b/template-node/features/features-template-node/pom.xml index 6b2f28993..0e1f5ec39 100644 --- a/template-node/features/features-template-node/pom.xml +++ b/template-node/features/features-template-node/pom.xml @@ -5,7 +5,7 @@ org.onap.ccsdk.parent feature-repo-parent - 1.2.1 + 1.2.2-SNAPSHOT diff --git a/template-node/features/pom.xml b/template-node/features/pom.xml index a43a8f142..1e0fdb12e 100644 --- a/template-node/features/pom.xml +++ b/template-node/features/pom.xml @@ -5,7 +5,7 @@ org.onap.ccsdk.parent odlparent-lite - 1.2.1 + 1.2.2-SNAPSHOT org.onap.ccsdk.sli.plugins diff --git a/template-node/installer/pom.xml b/template-node/installer/pom.xml index f00714780..26c745acc 100644 --- a/template-node/installer/pom.xml +++ b/template-node/installer/pom.xml @@ -5,7 +5,7 @@ org.onap.ccsdk.parent odlparent-lite - 1.2.1 + 1.2.2-SNAPSHOT org.onap.ccsdk.sli.plugins diff --git a/template-node/pom.xml b/template-node/pom.xml index d7277910a..719e97576 100644 --- a/template-node/pom.xml +++ b/template-node/pom.xml @@ -5,7 +5,7 @@ org.onap.ccsdk.parent odlparent-lite - 1.2.1 + 1.2.2-SNAPSHOT org.onap.ccsdk.sli.plugins diff --git a/template-node/provider/pom.xml b/template-node/provider/pom.xml index 38921305d..fc714240f 100644 --- a/template-node/provider/pom.xml +++ b/template-node/provider/pom.xml @@ -5,7 +5,7 @@ org.onap.ccsdk.parent binding-parent - 1.2.1 + 1.2.2-SNAPSHOT org.onap.ccsdk.sli.plugins diff --git a/version.properties b/version.properties index 6086d3c9f..80a47aef7 100644 --- a/version.properties +++ b/version.properties @@ -7,7 +7,7 @@ release_name=0 sprint_number=4 -feature_revision=1 +feature_revision=2 base_version=${release_name}.${sprint_number}.${feature_revision} -- cgit 1.2.3-korg From d9080716861ba46ea86fc7aebd4d4c42eea97016 Mon Sep 17 00:00:00 2001 From: "Timoney, Dan (dt5972)" Date: Fri, 22 Mar 2019 09:37:52 -0400 Subject: Roll version to 0.4.2-SNAPSHOT Roll version of ccsdk/sli/plugins to next snapshot version Change-Id: I142e7b2ec5e72e318007c329640f1818255c60f4 Issue-ID: CCSDK-1156 Signed-off-by: Timoney, Dan (dt5972) --- artifacts/pom.xml | 2 +- features/ccsdk-sli-plugins-all/pom.xml | 2 +- features/features-sli-plugins/pom.xml | 2 +- features/installer/pom.xml | 2 +- features/pom.xml | 2 +- grToolkit/features/ccsdk-gr-toolkit/pom.xml | 2 +- grToolkit/features/features-gr-toolkit/pom.xml | 2 +- grToolkit/features/pom.xml | 2 +- grToolkit/installer/pom.xml | 2 +- grToolkit/model/pom.xml | 2 +- grToolkit/pom.xml | 2 +- grToolkit/provider/pom.xml | 2 +- pom.xml | 2 +- properties-node/features/ccsdk-properties-node/pom.xml | 2 +- properties-node/features/features-properties-node/pom.xml | 2 +- properties-node/features/pom.xml | 2 +- properties-node/installer/pom.xml | 2 +- properties-node/pom.xml | 2 +- properties-node/provider/pom.xml | 2 +- restapi-call-node/features/ccsdk-restapi-call-node/pom.xml | 2 +- restapi-call-node/features/features-restapi-call-node/pom.xml | 2 +- restapi-call-node/features/pom.xml | 2 +- restapi-call-node/installer/pom.xml | 2 +- restapi-call-node/pom.xml | 2 +- restapi-call-node/provider/pom.xml | 2 +- restconf-client/features/ccsdk-restconf-client/pom.xml | 2 +- restconf-client/features/features-restconf-client/pom.xml | 2 +- restconf-client/features/pom.xml | 2 +- restconf-client/installer/pom.xml | 2 +- restconf-client/pom.xml | 2 +- restconf-client/provider/pom.xml | 6 +++--- sshapi-call-node/features/ccsdk-sshapi-call-node/pom.xml | 2 +- sshapi-call-node/features/features-sshapi-call-node/pom.xml | 2 +- sshapi-call-node/features/pom.xml | 2 +- sshapi-call-node/installer/pom.xml | 2 +- sshapi-call-node/pom.xml | 2 +- sshapi-call-node/provider/pom.xml | 2 +- template-node/features/ccsdk-template-node/pom.xml | 2 +- template-node/features/features-template-node/pom.xml | 2 +- template-node/features/pom.xml | 2 +- template-node/installer/pom.xml | 2 +- template-node/pom.xml | 2 +- template-node/provider/pom.xml | 2 +- 43 files changed, 45 insertions(+), 45 deletions(-) (limited to 'restconf-client/provider') diff --git a/artifacts/pom.xml b/artifacts/pom.xml index 79ad7574d..911a1d6ab 100755 --- a/artifacts/pom.xml +++ b/artifacts/pom.xml @@ -4,7 +4,7 @@ org.onap.ccsdk.sli.plugins sli-plugins-artifacts - 0.4.1-SNAPSHOT + 0.4.2-SNAPSHOT pom ccsdk-sli-plugins :: sli-plugins-artifacts diff --git a/features/ccsdk-sli-plugins-all/pom.xml b/features/ccsdk-sli-plugins-all/pom.xml index c7a43a483..0cd756eda 100644 --- a/features/ccsdk-sli-plugins-all/pom.xml +++ b/features/ccsdk-sli-plugins-all/pom.xml @@ -11,7 +11,7 @@ org.onap.ccsdk.sli.plugins ccsdk-sli-plugins-all - 0.4.1-SNAPSHOT + 0.4.2-SNAPSHOT feature ccsdk-sli-plugins :: features :: ${project.artifactId} diff --git a/features/features-sli-plugins/pom.xml b/features/features-sli-plugins/pom.xml index 3d6364689..aff865f0a 100644 --- a/features/features-sli-plugins/pom.xml +++ b/features/features-sli-plugins/pom.xml @@ -11,7 +11,7 @@ org.onap.ccsdk.sli.plugins features-sli-plugins - 0.4.1-SNAPSHOT + 0.4.2-SNAPSHOT feature ccsdk-sli-plugins :: features :: ${project.artifactId} diff --git a/features/installer/pom.xml b/features/installer/pom.xml index a83003c7c..ed909fc22 100755 --- a/features/installer/pom.xml +++ b/features/installer/pom.xml @@ -11,7 +11,7 @@ org.onap.ccsdk.sli.plugins sliplugins-features-installer - 0.4.1-SNAPSHOT + 0.4.2-SNAPSHOT pom ccsdk-sli-plugins :: features :: ${project.artifactId} diff --git a/features/pom.xml b/features/pom.xml index 4e8783475..efd6cbe68 100755 --- a/features/pom.xml +++ b/features/pom.xml @@ -11,7 +11,7 @@ org.onap.ccsdk.sli.plugins sliplugins-feature-aggregator - 0.4.1-SNAPSHOT + 0.4.2-SNAPSHOT pom ccsdk-sli-plugins :: features diff --git a/grToolkit/features/ccsdk-gr-toolkit/pom.xml b/grToolkit/features/ccsdk-gr-toolkit/pom.xml index 9c3a54a37..264ad7cf6 100755 --- a/grToolkit/features/ccsdk-gr-toolkit/pom.xml +++ b/grToolkit/features/ccsdk-gr-toolkit/pom.xml @@ -11,7 +11,7 @@ org.onap.ccsdk.sli.plugins ccsdk-gr-toolkit - 0.4.1-SNAPSHOT + 0.4.2-SNAPSHOT feature ccsdk-sli-plugins :: gr-toolkit :: ${project.artifactId} diff --git a/grToolkit/features/features-gr-toolkit/pom.xml b/grToolkit/features/features-gr-toolkit/pom.xml index abde024b4..db2887436 100755 --- a/grToolkit/features/features-gr-toolkit/pom.xml +++ b/grToolkit/features/features-gr-toolkit/pom.xml @@ -11,7 +11,7 @@ org.onap.ccsdk.sli.plugins features-gr-toolkit - 0.4.1-SNAPSHOT + 0.4.2-SNAPSHOT feature ccsdk-sli-plugins :: gr-toolkit :: ${project.artifactId} diff --git a/grToolkit/features/pom.xml b/grToolkit/features/pom.xml index cd8f272cf..c092a4b80 100755 --- a/grToolkit/features/pom.xml +++ b/grToolkit/features/pom.xml @@ -11,7 +11,7 @@ ccsdk-sli-plugins :: gr-toolkit :: ${project.artifactId} gr-toolkit-features org.onap.ccsdk.sli.plugins - 0.4.1-SNAPSHOT + 0.4.2-SNAPSHOT pom diff --git a/grToolkit/installer/pom.xml b/grToolkit/installer/pom.xml index 71b097999..5d1743389 100755 --- a/grToolkit/installer/pom.xml +++ b/grToolkit/installer/pom.xml @@ -11,7 +11,7 @@ ccsdk-sli-plugins :: gr-toolkit :: ${project.artifactId} org.onap.ccsdk.sli.plugins gr-toolkit-installer - 0.4.1-SNAPSHOT + 0.4.2-SNAPSHOT pom ccsdk-gr-toolkit diff --git a/grToolkit/model/pom.xml b/grToolkit/model/pom.xml index 1012e762b..c917c4567 100755 --- a/grToolkit/model/pom.xml +++ b/grToolkit/model/pom.xml @@ -10,7 +10,7 @@ ccsdk-sli-plugins :: gr-toolkit :: ${project.artifactId} org.onap.ccsdk.sli.plugins gr-toolkit-model - 0.4.1-SNAPSHOT + 0.4.2-SNAPSHOT bundle diff --git a/grToolkit/pom.xml b/grToolkit/pom.xml index cf754dac5..d2d79c706 100755 --- a/grToolkit/pom.xml +++ b/grToolkit/pom.xml @@ -11,7 +11,7 @@ org.onap.ccsdk.sli.plugins gr-toolkit - 0.4.1-SNAPSHOT + 0.4.2-SNAPSHOT pom ccsdk-sli-plugins :: gr-toolkit diff --git a/grToolkit/provider/pom.xml b/grToolkit/provider/pom.xml index cc4354b33..951d2da60 100755 --- a/grToolkit/provider/pom.xml +++ b/grToolkit/provider/pom.xml @@ -10,7 +10,7 @@ ccsdk-sli-plugins :: gr-toolkit :: ${project.artifactId} org.onap.ccsdk.sli.plugins gr-toolkit-provider - 0.4.1-SNAPSHOT + 0.4.2-SNAPSHOT bundle diff --git a/pom.xml b/pom.xml index cdc24e08d..9e564d5e8 100755 --- a/pom.xml +++ b/pom.xml @@ -10,7 +10,7 @@ org.onap.ccsdk.sli.plugins ccsdk-sli-plugins - 0.4.1-SNAPSHOT + 0.4.2-SNAPSHOT pom ccsdk-sli-plugins diff --git a/properties-node/features/ccsdk-properties-node/pom.xml b/properties-node/features/ccsdk-properties-node/pom.xml index d30ee0ad3..6412ca3ae 100644 --- a/properties-node/features/ccsdk-properties-node/pom.xml +++ b/properties-node/features/ccsdk-properties-node/pom.xml @@ -11,7 +11,7 @@ org.onap.ccsdk.sli.plugins ccsdk-properties-node - 0.4.1-SNAPSHOT + 0.4.2-SNAPSHOT feature ccsdk-sli-plugins :: properties-node :: ${project.artifactId} diff --git a/properties-node/features/features-properties-node/pom.xml b/properties-node/features/features-properties-node/pom.xml index faea526e8..1f2da265c 100644 --- a/properties-node/features/features-properties-node/pom.xml +++ b/properties-node/features/features-properties-node/pom.xml @@ -11,7 +11,7 @@ org.onap.ccsdk.sli.plugins features-properties-node - 0.4.1-SNAPSHOT + 0.4.2-SNAPSHOT feature ccsdk-sli-plugins :: properties-node :: ${project.artifactId} diff --git a/properties-node/features/pom.xml b/properties-node/features/pom.xml index a1f58ab1f..23bfd53e2 100755 --- a/properties-node/features/pom.xml +++ b/properties-node/features/pom.xml @@ -10,7 +10,7 @@ org.onap.ccsdk.sli.plugins properties-node-features - 0.4.1-SNAPSHOT + 0.4.2-SNAPSHOT pom ccsdk-sli-plugins :: properties-node :: ${project.artifactId} diff --git a/properties-node/installer/pom.xml b/properties-node/installer/pom.xml index dae92c36c..d37160912 100755 --- a/properties-node/installer/pom.xml +++ b/properties-node/installer/pom.xml @@ -10,7 +10,7 @@ org.onap.ccsdk.sli.plugins properties-node-installer - 0.4.1-SNAPSHOT + 0.4.2-SNAPSHOT pom ccsdk-sli-plugins :: properties-node :: ${project.artifactId} diff --git a/properties-node/pom.xml b/properties-node/pom.xml index b3ecbc6e1..7ff022582 100755 --- a/properties-node/pom.xml +++ b/properties-node/pom.xml @@ -10,7 +10,7 @@ org.onap.ccsdk.sli.plugins properties-node - 0.4.1-SNAPSHOT + 0.4.2-SNAPSHOT pom ccsdk-sli-plugins :: properties-node diff --git a/properties-node/provider/pom.xml b/properties-node/provider/pom.xml index e05a2b185..532d5f7b9 100755 --- a/properties-node/provider/pom.xml +++ b/properties-node/provider/pom.xml @@ -10,7 +10,7 @@ org.onap.ccsdk.sli.plugins properties-node-provider - 0.4.1-SNAPSHOT + 0.4.2-SNAPSHOT bundle ccsdk-sli-plugins :: properties-node :: ${project.artifactId} 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 1200f92ce..a28cbbe4c 100644 --- a/restapi-call-node/features/ccsdk-restapi-call-node/pom.xml +++ b/restapi-call-node/features/ccsdk-restapi-call-node/pom.xml @@ -11,7 +11,7 @@ org.onap.ccsdk.sli.plugins ccsdk-restapi-call-node - 0.4.1-SNAPSHOT + 0.4.2-SNAPSHOT feature ccsdk-sli-plugins :: restapi-call-node :: ${project.artifactId} 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 04645ee77..23b8f84b5 100644 --- a/restapi-call-node/features/features-restapi-call-node/pom.xml +++ b/restapi-call-node/features/features-restapi-call-node/pom.xml @@ -11,7 +11,7 @@ org.onap.ccsdk.sli.plugins features-restapi-call-node - 0.4.1-SNAPSHOT + 0.4.2-SNAPSHOT feature ccsdk-sli-plugins :: restapi-call-node :: ${project.artifactId} diff --git a/restapi-call-node/features/pom.xml b/restapi-call-node/features/pom.xml index d5967d591..8ca913bb8 100755 --- a/restapi-call-node/features/pom.xml +++ b/restapi-call-node/features/pom.xml @@ -10,7 +10,7 @@ org.onap.ccsdk.sli.plugins restapi-call-node-features - 0.4.1-SNAPSHOT + 0.4.2-SNAPSHOT pom ccsdk-sli-plugins :: restapi-call-node :: ${project.artifactId} diff --git a/restapi-call-node/installer/pom.xml b/restapi-call-node/installer/pom.xml index 187ed18d2..cbc4a6ec1 100755 --- a/restapi-call-node/installer/pom.xml +++ b/restapi-call-node/installer/pom.xml @@ -10,7 +10,7 @@ org.onap.ccsdk.sli.plugins restapi-call-node-installer - 0.4.1-SNAPSHOT + 0.4.2-SNAPSHOT pom ccsdk-sli-plugins :: restapi-call-node :: ${project.artifactId} diff --git a/restapi-call-node/pom.xml b/restapi-call-node/pom.xml index e2167ec4a..7cdee7c50 100755 --- a/restapi-call-node/pom.xml +++ b/restapi-call-node/pom.xml @@ -10,7 +10,7 @@ org.onap.ccsdk.sli.plugins restapi-call-node - 0.4.1-SNAPSHOT + 0.4.2-SNAPSHOT pom ccsdk-sli-plugins :: restapi-call-node diff --git a/restapi-call-node/provider/pom.xml b/restapi-call-node/provider/pom.xml index aa183c58b..1d724c646 100755 --- a/restapi-call-node/provider/pom.xml +++ b/restapi-call-node/provider/pom.xml @@ -10,7 +10,7 @@ org.onap.ccsdk.sli.plugins restapi-call-node-provider - 0.4.1-SNAPSHOT + 0.4.2-SNAPSHOT bundle ccsdk-sli-plugins :: restapi-call-node :: ${project.artifactId} diff --git a/restconf-client/features/ccsdk-restconf-client/pom.xml b/restconf-client/features/ccsdk-restconf-client/pom.xml index 52c766d7a..56fa2ebaf 100644 --- a/restconf-client/features/ccsdk-restconf-client/pom.xml +++ b/restconf-client/features/ccsdk-restconf-client/pom.xml @@ -11,7 +11,7 @@ org.onap.ccsdk.sli.plugins ccsdk-restconf-client - 0.4.1-SNAPSHOT + 0.4.2-SNAPSHOT feature diff --git a/restconf-client/features/features-restconf-client/pom.xml b/restconf-client/features/features-restconf-client/pom.xml index 8757bec22..56846fb45 100644 --- a/restconf-client/features/features-restconf-client/pom.xml +++ b/restconf-client/features/features-restconf-client/pom.xml @@ -11,7 +11,7 @@ org.onap.ccsdk.sli.plugins features-restconf-client - 0.4.1-SNAPSHOT + 0.4.2-SNAPSHOT feature ccsdk-sli-plugins :: restconf-client :: ${project.artifactId} diff --git a/restconf-client/features/pom.xml b/restconf-client/features/pom.xml index 2471ece18..5a882ebcd 100755 --- a/restconf-client/features/pom.xml +++ b/restconf-client/features/pom.xml @@ -10,7 +10,7 @@ org.onap.ccsdk.sli.plugins restconf-client-features - 0.4.1-SNAPSHOT + 0.4.2-SNAPSHOT pom ccsdk-sli-plugins :: restconf-client :: ${project.artifactId} diff --git a/restconf-client/installer/pom.xml b/restconf-client/installer/pom.xml index 32901f88b..4a454b14a 100755 --- a/restconf-client/installer/pom.xml +++ b/restconf-client/installer/pom.xml @@ -10,7 +10,7 @@ org.onap.ccsdk.sli.plugins restconf-client-installer - 0.4.1-SNAPSHOT + 0.4.2-SNAPSHOT pom ccsdk-sli-plugins :: restconf-client :: ${project.artifactId} diff --git a/restconf-client/pom.xml b/restconf-client/pom.xml index cb63a81a9..7f2e9c825 100755 --- a/restconf-client/pom.xml +++ b/restconf-client/pom.xml @@ -10,7 +10,7 @@ org.onap.ccsdk.sli.plugins restconf-client - 0.4.1-SNAPSHOT + 0.4.2-SNAPSHOT pom ccsdk-sli-plugins :: restconf-client diff --git a/restconf-client/provider/pom.xml b/restconf-client/provider/pom.xml index 1e6bfcc8e..0d5ee180a 100755 --- a/restconf-client/provider/pom.xml +++ b/restconf-client/provider/pom.xml @@ -10,7 +10,7 @@ org.onap.ccsdk.sli.plugins restconf-client-provider - 0.4.1-SNAPSHOT + 0.4.2-SNAPSHOT bundle ccsdk-sli-plugins :: restconf-client :: ${project.artifactId} @@ -50,7 +50,7 @@ org.onap.ccsdk.sli.plugins properties-node-provider - 0.4.1-SNAPSHOT + 0.4.2-SNAPSHOT org.opendaylight.yangtools @@ -74,7 +74,7 @@ org.onap.ccsdk.sli.plugins restapi-call-node-provider - 0.4.1-SNAPSHOT + 0.4.2-SNAPSHOT org.opendaylight.netconf 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 b6534393f..ee153ad4e 100644 --- a/sshapi-call-node/features/ccsdk-sshapi-call-node/pom.xml +++ b/sshapi-call-node/features/ccsdk-sshapi-call-node/pom.xml @@ -11,7 +11,7 @@ org.onap.ccsdk.sli.plugins ccsdk-sshapi-call-node - 0.4.1-SNAPSHOT + 0.4.2-SNAPSHOT feature ccsdk-sli-plugins :: sshapi-call-node :: ${project.artifactId} 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 f0a3e8041..421cbbaa7 100644 --- a/sshapi-call-node/features/features-sshapi-call-node/pom.xml +++ b/sshapi-call-node/features/features-sshapi-call-node/pom.xml @@ -11,7 +11,7 @@ org.onap.ccsdk.sli.plugins features-sshapi-call-node - 0.4.1-SNAPSHOT + 0.4.2-SNAPSHOT feature ccsdk-sli-plugins :: sshapi-call-node :: ${project.artifactId} diff --git a/sshapi-call-node/features/pom.xml b/sshapi-call-node/features/pom.xml index c04ad6095..cd045fde3 100755 --- a/sshapi-call-node/features/pom.xml +++ b/sshapi-call-node/features/pom.xml @@ -10,7 +10,7 @@ org.onap.ccsdk.sli.plugins sshapi-call-node-features - 0.4.1-SNAPSHOT + 0.4.2-SNAPSHOT pom ccsdk-sli-plugins :: sshapi-call-node :: ${project.artifactId} diff --git a/sshapi-call-node/installer/pom.xml b/sshapi-call-node/installer/pom.xml index 6b54e409a..39c01db1b 100755 --- a/sshapi-call-node/installer/pom.xml +++ b/sshapi-call-node/installer/pom.xml @@ -10,7 +10,7 @@ org.onap.ccsdk.sli.plugins sshapi-call-node-installer - 0.4.1-SNAPSHOT + 0.4.2-SNAPSHOT pom ccsdk-sli-plugins :: sshapi-call-node :: ${project.artifactId} diff --git a/sshapi-call-node/pom.xml b/sshapi-call-node/pom.xml index 48adb81ba..6583e69bf 100755 --- a/sshapi-call-node/pom.xml +++ b/sshapi-call-node/pom.xml @@ -10,7 +10,7 @@ org.onap.ccsdk.sli.plugins sshapi-call-node - 0.4.1-SNAPSHOT + 0.4.2-SNAPSHOT pom ccsdk-sli-plugins :: sshapi-call-node diff --git a/sshapi-call-node/provider/pom.xml b/sshapi-call-node/provider/pom.xml index c3b7c281a..bdf471b25 100755 --- a/sshapi-call-node/provider/pom.xml +++ b/sshapi-call-node/provider/pom.xml @@ -10,7 +10,7 @@ org.onap.ccsdk.sli.plugins sshapi-call-node-provider - 0.4.1-SNAPSHOT + 0.4.2-SNAPSHOT bundle ccsdk-sli-plugins :: sshapi-call-node :: ${project.artifactId} diff --git a/template-node/features/ccsdk-template-node/pom.xml b/template-node/features/ccsdk-template-node/pom.xml index b6cf31f2d..c5152dbc4 100644 --- a/template-node/features/ccsdk-template-node/pom.xml +++ b/template-node/features/ccsdk-template-node/pom.xml @@ -11,7 +11,7 @@ org.onap.ccsdk.sli.plugins ccsdk-template-node - 0.4.1-SNAPSHOT + 0.4.2-SNAPSHOT feature ccsdk-sli-plugins :: template-node :: ${project.artifactId} diff --git a/template-node/features/features-template-node/pom.xml b/template-node/features/features-template-node/pom.xml index 0e1f5ec39..dd9c8992f 100644 --- a/template-node/features/features-template-node/pom.xml +++ b/template-node/features/features-template-node/pom.xml @@ -11,7 +11,7 @@ org.onap.ccsdk.sli.plugins features-template-node - 0.4.1-SNAPSHOT + 0.4.2-SNAPSHOT feature diff --git a/template-node/features/pom.xml b/template-node/features/pom.xml index 1e0fdb12e..b498051f6 100644 --- a/template-node/features/pom.xml +++ b/template-node/features/pom.xml @@ -10,7 +10,7 @@ org.onap.ccsdk.sli.plugins template-node-features - 0.4.1-SNAPSHOT + 0.4.2-SNAPSHOT pom diff --git a/template-node/installer/pom.xml b/template-node/installer/pom.xml index 26c745acc..44425d1e8 100644 --- a/template-node/installer/pom.xml +++ b/template-node/installer/pom.xml @@ -10,7 +10,7 @@ org.onap.ccsdk.sli.plugins template-node-installer - 0.4.1-SNAPSHOT + 0.4.2-SNAPSHOT pom ccsdk-sli-plugins :: template-node :: ${project.artifactId} diff --git a/template-node/pom.xml b/template-node/pom.xml index 719e97576..c0843b787 100644 --- a/template-node/pom.xml +++ b/template-node/pom.xml @@ -10,7 +10,7 @@ org.onap.ccsdk.sli.plugins template-node - 0.4.1-SNAPSHOT + 0.4.2-SNAPSHOT pom diff --git a/template-node/provider/pom.xml b/template-node/provider/pom.xml index fc714240f..d52587922 100644 --- a/template-node/provider/pom.xml +++ b/template-node/provider/pom.xml @@ -10,7 +10,7 @@ org.onap.ccsdk.sli.plugins template-node-provider - 0.4.1-SNAPSHOT + 0.4.2-SNAPSHOT bundle ccsdk-sli-plugins :: template-node :: ${project.artifactId} -- cgit 1.2.3-korg From 2d465026f1ef738b1f4e0274c8608317c57bbdf5 Mon Sep 17 00:00:00 2001 From: janani b Date: Thu, 21 Mar 2019 22:56:13 +0530 Subject: Plugin points to 2.0.1 javax version RestapiCallNode and RestconfClient in plugins will point to the odl default javax version. Also RestconfClient is added to plugins-all features. Issue-ID: CCSDK-1045 Change-Id: I6f7173ec765bc21201f17a3bfd6801c18de610a9 Signed-off-by: janani b --- features/ccsdk-sli-plugins-all/pom.xml | 9 +++++++++ restapi-call-node/features/ccsdk-restapi-call-node/pom.xml | 1 - restapi-call-node/provider/pom.xml | 1 - restconf-client/provider/pom.xml | 1 - 4 files changed, 9 insertions(+), 3 deletions(-) (limited to 'restconf-client/provider') diff --git a/features/ccsdk-sli-plugins-all/pom.xml b/features/ccsdk-sli-plugins-all/pom.xml index b75833c38..3d5129b37 100644 --- a/features/ccsdk-sli-plugins-all/pom.xml +++ b/features/ccsdk-sli-plugins-all/pom.xml @@ -34,6 +34,14 @@ features + + ${project.groupId} + ccsdk-restconf-client + ${project.version} + xml + features + + ${project.groupId} ccsdk-template-node @@ -41,6 +49,7 @@ xml features + ${project.groupId} ccsdk-sshapi-call-node 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 cae47c65f..c9c08d669 100644 --- a/restapi-call-node/features/ccsdk-restapi-call-node/pom.xml +++ b/restapi-call-node/features/ccsdk-restapi-call-node/pom.xml @@ -21,7 +21,6 @@ javax.ws.rs javax.ws.rs-api - 2.1 org.onap.ccsdk.sli.core diff --git a/restapi-call-node/provider/pom.xml b/restapi-call-node/provider/pom.xml index fa69f5d0e..b927b4fc5 100755 --- a/restapi-call-node/provider/pom.xml +++ b/restapi-call-node/provider/pom.xml @@ -35,7 +35,6 @@ javax.ws.rs javax.ws.rs-api - 2.1 org.onap.ccsdk.sli.core diff --git a/restconf-client/provider/pom.xml b/restconf-client/provider/pom.xml index ccc9ab869..7cb2993c1 100755 --- a/restconf-client/provider/pom.xml +++ b/restconf-client/provider/pom.xml @@ -41,7 +41,6 @@ javax.ws.rs javax.ws.rs-api - 2.1 org.onap.ccsdk.sli.core -- cgit 1.2.3-korg From 614bd0b6897b1ece3ee7deb581089c301bb3f2e8 Mon Sep 17 00:00:00 2001 From: janani b Date: Fri, 5 Apr 2019 18:23:44 +0530 Subject: Replacing ":" by "_" for parameters Supporting "_" to be present for module name seperator while giving parameters in DG node. Issue-ID: CCSDK-1045 Change-Id: I008fa8503f1314e593f96393121a02f429bac636 Signed-off-by: janani b --- .../restconfapicall/RestconfApiCallNode.java | 25 +- .../plugins/restconfapicall/RestconfApiUtils.java | 22 +- .../DefaultPropertiesNodeListener.java | 11 +- .../MdsalPropertiesNodeSerializer.java | 41 +- .../pnserializer/MdsalPropertiesNodeUtils.java | 243 ++++++- .../pnserializer/SchemaPathHolder.java | 77 +++ .../dfserializer/DataFormatSerializerTest.java | 98 +-- .../dfserializer/DataFormatUtilsTest.java | 22 +- .../dfserializer/IdentifierValidationTest.java | 762 +++++++++++++++++++++ .../IdentifierValidationUtilsTest.java | 469 +++++++++++++ .../pnserializer/PropertiesSerializerTest.java | 224 +++--- .../resources/yang/test_augment_1_for_module.yang | 108 +++ .../resources/yang/test_name_of_the_module.yang | 231 +++++++ 13 files changed, 2107 insertions(+), 226 deletions(-) create mode 100644 restconf-client/provider/src/main/java/org/onap/ccsdk/sli/plugins/yangserializers/pnserializer/SchemaPathHolder.java create mode 100644 restconf-client/provider/src/test/java/org/onap/ccsdk/sli/plugins/yangserializers/dfserializer/IdentifierValidationTest.java create mode 100644 restconf-client/provider/src/test/java/org/onap/ccsdk/sli/plugins/yangserializers/dfserializer/IdentifierValidationUtilsTest.java create mode 100644 restconf-client/provider/src/test/resources/yang/test_augment_1_for_module.yang create mode 100644 restconf-client/provider/src/test/resources/yang/test_name_of_the_module.yang (limited to 'restconf-client/provider') 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 a76b27d0b..3007b5a1b 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 @@ -25,6 +25,18 @@ import com.google.gson.JsonElement; import com.google.gson.JsonObject; import com.google.gson.JsonParser; import com.google.gson.stream.JsonWriter; + +import javax.ws.rs.core.UriBuilder; +import java.io.StringWriter; +import java.io.Writer; +import java.net.SocketException; +import java.net.URI; +import java.net.URISyntaxException; +import java.util.HashMap; +import java.util.Iterator; +import java.util.List; +import java.util.Map; + import org.dom4j.Document; import org.dom4j.DocumentException; import org.dom4j.DocumentHelper; @@ -54,17 +66,6 @@ import org.osgi.framework.ServiceReference; import org.slf4j.Logger; import org.slf4j.LoggerFactory; -import javax.ws.rs.core.UriBuilder; -import java.io.StringWriter; -import java.io.Writer; -import java.net.SocketException; -import java.net.URI; -import java.net.URISyntaxException; -import java.util.HashMap; -import java.util.Iterator; -import java.util.List; -import java.util.Map; - import static com.google.common.base.Strings.repeat; import static java.lang.String.format; import static java.lang.String.valueOf; @@ -91,8 +92,8 @@ import static org.onap.ccsdk.sli.plugins.restconfapicall.RestconfApiUtils.RES_PR import static org.onap.ccsdk.sli.plugins.restconfapicall.RestconfApiUtils.RETRY_COUNT; import static org.onap.ccsdk.sli.plugins.restconfapicall.RestconfApiUtils.RETRY_FAIL; import static org.onap.ccsdk.sli.plugins.restconfapicall.RestconfApiUtils.UPDATED_URL; -import static org.onap.ccsdk.sli.plugins.restconfapicall.RestconfApiUtils.getUpdatedXmlReq; import static org.onap.ccsdk.sli.plugins.restconfapicall.RestconfApiUtils.getSchemaCtxFromDir; +import static org.onap.ccsdk.sli.plugins.restconfapicall.RestconfApiUtils.getUpdatedXmlReq; import static org.onap.ccsdk.sli.plugins.restconfapicall.RestconfApiUtils.getYangParameters; import static org.onap.ccsdk.sli.plugins.restconfapicall.RestconfApiUtils.parseUrl; import static org.onap.ccsdk.sli.plugins.yangserializers.dfserializer.DfListenerFactory.instance; 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 c5c7a919b..505089c44 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 @@ -22,15 +22,6 @@ package org.onap.ccsdk.sli.plugins.restconfapicall; -import org.onap.ccsdk.sli.core.sli.SvcLogicException; -import org.onap.ccsdk.sli.plugins.restapicall.HttpMethod; -import org.onap.ccsdk.sli.plugins.yangserializers.dfserializer.YangParameters; -import org.opendaylight.yangtools.yang.model.api.SchemaContext; -import org.opendaylight.yangtools.yang.model.parser.api.YangSyntaxErrorException; -import org.opendaylight.yangtools.yang.parser.rfc7950.repo.YangStatementStreamSource; -import org.opendaylight.yangtools.yang.parser.spi.meta.ReactorException; -import org.opendaylight.yangtools.yang.parser.stmt.reactor.CrossSourceStatementReactor; - import java.io.File; import java.io.IOException; import java.net.URI; @@ -43,6 +34,15 @@ import java.util.LinkedList; import java.util.List; import java.util.Map; +import org.onap.ccsdk.sli.core.sli.SvcLogicException; +import org.onap.ccsdk.sli.plugins.restapicall.HttpMethod; +import org.onap.ccsdk.sli.plugins.yangserializers.dfserializer.YangParameters; +import org.opendaylight.yangtools.yang.model.api.SchemaContext; +import org.opendaylight.yangtools.yang.model.parser.api.YangSyntaxErrorException; +import org.opendaylight.yangtools.yang.parser.rfc7950.repo.YangStatementStreamSource; +import org.opendaylight.yangtools.yang.parser.spi.meta.ReactorException; +import org.opendaylight.yangtools.yang.parser.stmt.reactor.CrossSourceStatementReactor; + import static org.onap.ccsdk.sli.plugins.restapicall.RestapiCallNode.getParameters; import static org.onap.ccsdk.sli.plugins.restapicall.RestapiCallNode.parseParam; import static org.opendaylight.yangtools.yang.model.repo.api.StatementParserMode.DEFAULT_MODE; @@ -156,6 +156,7 @@ public final class RestconfApiUtils { */ private static String getParsedPath(String path) { String firstHalf; + String secondHalf; if (path.contains(COLON)) { String[] p = path.split(COLON); if (p[0].contains(SLASH)) { @@ -164,7 +165,8 @@ public final class RestconfApiUtils { } else { firstHalf = p[0]; } - return firstHalf + COLON + p[1]; + secondHalf = path.substring(p[0].length() + 1); + return firstHalf + COLON + secondHalf; } return path; } diff --git a/restconf-client/provider/src/main/java/org/onap/ccsdk/sli/plugins/yangserializers/pnserializer/DefaultPropertiesNodeListener.java b/restconf-client/provider/src/main/java/org/onap/ccsdk/sli/plugins/yangserializers/pnserializer/DefaultPropertiesNodeListener.java index 491dcb099..2fa00bfb7 100644 --- a/restconf-client/provider/src/main/java/org/onap/ccsdk/sli/plugins/yangserializers/pnserializer/DefaultPropertiesNodeListener.java +++ b/restconf-client/provider/src/main/java/org/onap/ccsdk/sli/plugins/yangserializers/pnserializer/DefaultPropertiesNodeListener.java @@ -20,12 +20,14 @@ package org.onap.ccsdk.sli.plugins.yangserializers.pnserializer; -import org.onap.ccsdk.sli.core.sli.SvcLogicException; - import java.util.Collection; import java.util.HashMap; import java.util.Map; +import org.onap.ccsdk.sli.core.sli.SvcLogicException; + +import static org.onap.ccsdk.sli.plugins.yangserializers.pnserializer.MdsalPropertiesNodeUtils.COLON; +import static org.onap.ccsdk.sli.plugins.yangserializers.pnserializer.MdsalPropertiesNodeUtils.UNDERSCORE; import static org.onap.ccsdk.sli.plugins.yangserializers.pnserializer.NodeType.MULTI_INSTANCE_LEAF_NODE; import static org.onap.ccsdk.sli.plugins.yangserializers.pnserializer.NodeType.SINGLE_INSTANCE_LEAF_NODE; @@ -56,9 +58,10 @@ public class DefaultPropertiesNodeListener implements PropertiesNodeListener { || node.nodeType() == MULTI_INSTANCE_LEAF_NODE) { String val = ((LeafNode) node).value(); if (((LeafNode) node).valueNs() != null) { - val = ((LeafNode) node).valueNs().moduleName() + ":" + val; + val = ((LeafNode) node).valueNs().moduleName() + COLON + val; } - params.put(node.uri(), val); + String uri = node.uri().replaceAll(COLON, UNDERSCORE); + params.put(uri, val); } } diff --git a/restconf-client/provider/src/main/java/org/onap/ccsdk/sli/plugins/yangserializers/pnserializer/MdsalPropertiesNodeSerializer.java b/restconf-client/provider/src/main/java/org/onap/ccsdk/sli/plugins/yangserializers/pnserializer/MdsalPropertiesNodeSerializer.java index 13a5c5a01..759fe802e 100644 --- a/restconf-client/provider/src/main/java/org/onap/ccsdk/sli/plugins/yangserializers/pnserializer/MdsalPropertiesNodeSerializer.java +++ b/restconf-client/provider/src/main/java/org/onap/ccsdk/sli/plugins/yangserializers/pnserializer/MdsalPropertiesNodeSerializer.java @@ -20,20 +20,25 @@ package org.onap.ccsdk.sli.plugins.yangserializers.pnserializer; +import java.util.HashMap; +import java.util.Map; + import org.onap.ccsdk.sli.core.sli.SvcLogicException; +import org.opendaylight.restconf.common.errors.RestconfDocumentedException; import org.opendaylight.yangtools.yang.model.api.Module; import org.opendaylight.yangtools.yang.model.api.SchemaContext; import org.opendaylight.yangtools.yang.model.api.SchemaNode; import org.opendaylight.yangtools.yang.model.util.SchemaContextUtil; -import java.util.Map; - +import static org.onap.ccsdk.sli.plugins.yangserializers.pnserializer.MdsalPropertiesNodeUtils.DOT_REGEX; +import static org.onap.ccsdk.sli.plugins.yangserializers.pnserializer.MdsalPropertiesNodeUtils.SLASH; import static org.onap.ccsdk.sli.plugins.yangserializers.pnserializer.MdsalPropertiesNodeUtils.getChildSchemaNode; import static org.onap.ccsdk.sli.plugins.yangserializers.pnserializer.MdsalPropertiesNodeUtils.getIndex; import static org.onap.ccsdk.sli.plugins.yangserializers.pnserializer.MdsalPropertiesNodeUtils.getListName; import static org.onap.ccsdk.sli.plugins.yangserializers.pnserializer.MdsalPropertiesNodeUtils.getNamespace; import static org.onap.ccsdk.sli.plugins.yangserializers.pnserializer.MdsalPropertiesNodeUtils.getNodeType; import static org.onap.ccsdk.sli.plugins.yangserializers.pnserializer.MdsalPropertiesNodeUtils.getParsedValue; +import static org.onap.ccsdk.sli.plugins.yangserializers.pnserializer.MdsalPropertiesNodeUtils.getProcessedPath; import static org.onap.ccsdk.sli.plugins.yangserializers.pnserializer.MdsalPropertiesNodeUtils.getRevision; import static org.onap.ccsdk.sli.plugins.yangserializers.pnserializer.MdsalPropertiesNodeUtils.getValueNamespace; import static org.onap.ccsdk.sli.plugins.yangserializers.pnserializer.MdsalPropertiesNodeUtils.resolveName; @@ -70,6 +75,8 @@ public class MdsalPropertiesNodeSerializer extends PropertiesNodeSerializer entry : paramMap.entrySet()) { String[] names = entry.getKey().split("\\."); for (int i = 0; i < names.length; i++) { @@ -86,6 +93,30 @@ public class MdsalPropertiesNodeSerializer extends PropertiesNodeSerializer convertToValidParam(Map paramMap) { + Map fixedParams = new HashMap<>(); + for(Map.Entry entry : paramMap.entrySet()) { + String key = entry.getKey().replaceAll(DOT_REGEX, SLASH); + try { + SchemaPathHolder fixedUrl = getProcessedPath(key, schemaCtx()); + String fixedUri = fixedUrl.getUri().replaceAll( + SLASH, DOT_REGEX); + fixedParams.put(fixedUri, entry.getValue()); + } catch (IllegalArgumentException | RestconfDocumentedException + | NullPointerException e) { + fixedParams.put(entry.getKey(), entry.getValue()); + } + } + return fixedParams; + } + @Override public Map decode(PropertiesNode propertiesNode) throws SvcLogicException { @@ -104,8 +135,10 @@ public class MdsalPropertiesNodeSerializer extends PropertiesNodeSerializer id = toInstanceIdentifier( + uri1, context, null); + return new SchemaPathHolder(id, uri1); + } catch (IllegalArgumentException | RestconfDocumentedException + | NullPointerException e) { + return processNodesAndAppendPath(uri, context); + } + } + + /** + * Processes the nodes in the given uri and finds instance identifier + * context till it reaches the last node in uri. If its not able to find + * schema for the path, it appends the suffix part and puts it back in + * the param list. + * + * @param uri uri with underscore + * @param context schema context + * @return schema and path holder + */ + private static SchemaPathHolder processNodesAndAppendPath(String uri, + SchemaContext context) { + + String actPath = ""; + SchemaPathHolder id = new SchemaPathHolder(null, ""); + String[] uriParts = uri.split(SLASH); + String sec = ""; + if (uri.contains(UNDERSCORE)) { + sec = uri.substring(uriParts[0].length()+1); + } + for (int i = 0; i id; + for (int i = 0; i< values.length-1; i++) { + val = values[i]; + val = firstHalf + val + COLON + secondHalf; + try { + id = toInstanceIdentifier(prefix + val, context, null); + return new SchemaPathHolder(id, val); + } catch (IllegalArgumentException | RestconfDocumentedException | + NullPointerException e) { + log.info(format(INFO_MSG, val)); + } + firstHalf.append(values[i]).append(UNDERSCORE); + secondHalf = secondHalf.replaceFirst( + values[i + 1] + UNDERSCORE,""); + } + val = val.replace(COLON,UNDERSCORE); + try { + id = toInstanceIdentifier(prefix + val, context, null); + return new SchemaPathHolder(id, val); + } catch (IllegalArgumentException | RestconfDocumentedException | + NullPointerException e1) { + throw new IllegalArgumentException(EXC_MSG, e1); + } + } + + /** + * Returns the namespace of the given node name. If the node name is + * separated by colon, the it splits with colon and forms the namespace. + * If the node name is formed with underscore, then it splits the node + * name consecutively to figure out the proper module name. + * + * @param childName node name + * @param ctx schema context + * @param parent parent properties node + * @param curSchema current schema + * @return namespace of the given node + */ + static Namespace getNamespace(String childName, SchemaContext ctx, + PropertiesNode parent, SchemaNode curSchema) { + + Namespace parentNs = parent.namespace(); + Namespace ns = new Namespace(parentNs.moduleName(), + parentNs.moduleNs(), parentNs.revision()); + int lastIndexOfColon = childName.lastIndexOf(COLON); if (lastIndexOfColon != -1) { String moduleName = childName.substring(0, lastIndexOfColon); - Iterator it = ctx.findModules(moduleName).iterator(); - if (!it.hasNext()) { - // module is not present in context - return null; + childName = childName.substring(lastIndexOfColon+1); + Namespace ns1 = getNs(moduleName, ctx); + if (ns1 != null) { + ns = ns1; } + } + + SchemaNode child = getChildSchemaNode(curSchema, childName, ns); + + if (child == null && childName.contains(UNDERSCORE)) { + String[] children = childName.split(UNDERSCORE); + String second = childName.substring(children[0].length() + 1); + StringBuilder first = new StringBuilder(); + + for (int i =0; i< children.length; i++) { + String moduleName = first + children[i]; + Namespace newNs = getNs(moduleName, ctx); + if (newNs != null) { + return newNs; + } + first.append(children[i]).append(UNDERSCORE); + if (i + 1 < children.length) { + second = second.replaceFirst( + children[i + 1] + UNDERSCORE, ""); + } + } + return ns; + } + return ns; + } + + /** + * Returns the namespace by finding the given module in the schema context. + * + * @param modName module name + * @param ctx schema context + * @return namespace of the given node name + */ + private static Namespace getNs(String modName, SchemaContext ctx) { + Iterator it = ctx.findModules(modName).iterator(); + if (it.hasNext()) { Module m = it.next(); - return new Namespace(moduleName, m.getQNameModule().getNamespace(), + return new Namespace(modName, m.getQNameModule().getNamespace(), getRevision(m.getRevision())); } - Namespace parentNs = parent.namespace(); - return new Namespace(parentNs.moduleName(), parentNs.moduleNs(), - parentNs.revision()); + return null; } /** @@ -239,7 +434,7 @@ public final class MdsalPropertiesNodeUtils { * @return child schema node */ public static SchemaNode getChildSchemaNode(SchemaNode curSchema, - String name, + String name, Namespace namespace) { if (namespace == null) { return null; diff --git a/restconf-client/provider/src/main/java/org/onap/ccsdk/sli/plugins/yangserializers/pnserializer/SchemaPathHolder.java b/restconf-client/provider/src/main/java/org/onap/ccsdk/sli/plugins/yangserializers/pnserializer/SchemaPathHolder.java new file mode 100644 index 000000000..4ef1bc664 --- /dev/null +++ b/restconf-client/provider/src/main/java/org/onap/ccsdk/sli/plugins/yangserializers/pnserializer/SchemaPathHolder.java @@ -0,0 +1,77 @@ +/*- + * ============LICENSE_START======================================================= + * ONAP - CCSDK + * ================================================================================ + * Copyright (C) 2019 Huawei Technologies Co., Ltd. All rights reserved. + * ================================================================================ + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============LICENSE_END========================================================= + */ + +package org.onap.ccsdk.sli.plugins.yangserializers.pnserializer; + +import org.opendaylight.restconf.common.context.InstanceIdentifierContext; + +/** + * Representation of a holder for a proper path and its corresponding schema. + */ +public class SchemaPathHolder { + + /** + * Schema context for the path. + */ + private InstanceIdentifierContext insId; + + /** + * Formatted path. + */ + private String uri; + + /** + * Constructs schema path holder with path and its schema. + * + * @param insId instance identifier context + * @param uri path + */ + public SchemaPathHolder(InstanceIdentifierContext insId, String uri) { + this.insId = insId; + this.uri = uri; + } + + /** + * Returns the instance identifier context of the path. + * + * @return schema of the path + */ + public InstanceIdentifierContext getInsId() { + return insId; + } + + /** + * Returns the formatted path. + * + * @return formatted path + */ + public String getUri() { + return uri; + } + + /** + * Sets the formatted path. + * + * @param uri formatted path + */ + public void setUri(String uri) { + this.uri = uri; + } +} 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 08fa33ee7..45e8eb3f1 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 @@ -20,6 +20,9 @@ package org.onap.ccsdk.sli.plugins.yangserializers.dfserializer; +import java.util.HashMap; +import java.util.Map; + import org.junit.Before; import org.junit.Test; import org.mockito.invocation.InvocationOnMock; @@ -31,9 +34,6 @@ import org.onap.ccsdk.sli.plugins.restapicall.RestapiCallNode; import org.onap.ccsdk.sli.plugins.restconfapicall.RestconfApiCallNode; import org.opendaylight.restconf.common.context.InstanceIdentifierContext; -import java.util.HashMap; -import java.util.Map; - import static org.hamcrest.MatcherAssert.assertThat; import static org.hamcrest.core.Is.is; import static org.mockito.Matchers.any; @@ -136,7 +136,7 @@ public class DataFormatSerializerTest { */ @Test public void encodeToJsonId() throws SvcLogicException { - String pre = "identity-test:test."; + String pre = "identity-test_test."; SvcLogicContext ctx = createAttList(pre); ctx.setAttribute(pre + "l", "abc"); p.put("dirPath", "src/test/resources"); @@ -156,7 +156,7 @@ public class DataFormatSerializerTest { */ @Test public void encodeToJsonIdWithPut() throws SvcLogicException { - String pre = "identity-test:test."; + String pre = "identity-test_test."; SvcLogicContext ctx = createAttList(pre); ctx.setAttribute(pre + "l", "abc"); p.put("dirPath", "src/test/resources"); @@ -176,7 +176,7 @@ public class DataFormatSerializerTest { */ @Test public void encodeToJsonIdWithPatch() throws SvcLogicException { - String pre = "identity-test:test."; + String pre = "identity-test_test."; SvcLogicContext ctx = createAttList(pre); ctx.setAttribute(pre + "l", "abc"); p.put("dirPath", "src/test/resources"); @@ -196,7 +196,7 @@ public class DataFormatSerializerTest { */ @Test public void encodeToXmlId() throws SvcLogicException { - String pre = "identity-test:test."; + String pre = "identity-test_test."; SvcLogicContext ctx = createAttList(pre); p.put("dirPath", "src/test/resources"); p.put("format", "xml"); @@ -215,7 +215,7 @@ public class DataFormatSerializerTest { */ @Test public void encodeToXmlIdWithPut() throws SvcLogicException { - String pre = "identity-test:test."; + String pre = "identity-test_test."; SvcLogicContext ctx = createAttList(pre); p.put("dirPath", "src/test/resources"); p.put("format", "xml"); @@ -234,7 +234,7 @@ public class DataFormatSerializerTest { */ @Test public void encodeToXmlIdWithPatch() throws SvcLogicException { - String pre = "identity-test:test."; + String pre = "identity-test_test."; SvcLogicContext ctx = createAttList(pre); p.put("dirPath", "src/test/resources"); p.put("format", "xml"); @@ -255,7 +255,7 @@ public class DataFormatSerializerTest { public void decodeToJsonId() throws SvcLogicException { createMockForDecode(ENCODE_TO_JSON_ID); SvcLogicContext ctx = new SvcLogicContext(); - String pre = "identity-test:test."; + String pre = "identity-test_test."; p.put("dirPath", "src/test/resources"); p.put("format", "json"); p.put("httpMethod", "get"); @@ -276,7 +276,7 @@ public class DataFormatSerializerTest { public void decodeToXmlId() throws SvcLogicException { createMockForDecode(ENCODE_TO_XML_ID); SvcLogicContext ctx = new SvcLogicContext(); - String pre = "identity-test:test."; + String pre = "identity-test_test."; p.put("dirPath", "src/test/resources"); p.put("format", "xml"); p.put("httpMethod", "get"); @@ -294,7 +294,7 @@ public class DataFormatSerializerTest { */ @Test public void encodeToJsonYang() throws SvcLogicException { - String pre = "test-yang:cont1.cont2."; + String pre = "test-yang_cont1.cont2."; SvcLogicContext ctx = createAttListYang(pre); p.put("dirPath", "src/test/resources"); p.put("format", "json"); @@ -313,7 +313,7 @@ public class DataFormatSerializerTest { */ @Test public void encodeToJsonYangWithPut() throws SvcLogicException { - String pre = "test-yang:cont1.cont2."; + String pre = "test-yang_cont1.cont2."; SvcLogicContext ctx = createAttListYang(pre); p.put("dirPath", "src/test/resources"); p.put("format", "json"); @@ -332,7 +332,7 @@ public class DataFormatSerializerTest { */ @Test public void encodeToJsonYangWithPatch() throws SvcLogicException { - String pre = "test-yang:cont1.cont2."; + String pre = "test-yang_cont1.cont2."; SvcLogicContext ctx = createAttListYang(pre); p.put("dirPath", "src/test/resources"); p.put("format", "json"); @@ -351,7 +351,7 @@ public class DataFormatSerializerTest { */ @Test public void encodeToJsonWithAugAsRootChild() throws SvcLogicException { - String pre = "test-yang:cont1.cont2."; + String pre = "test-yang_cont1.cont2."; SvcLogicContext ctx = createAttListYang(pre); p.put("dirPath", "src/test/resources"); p.put("format", "json"); @@ -372,7 +372,7 @@ public class DataFormatSerializerTest { public void decodeToJsonYang() throws SvcLogicException { createMockForDecode(ENCODE_TO_JSON_YANG); SvcLogicContext ctx = new SvcLogicContext(); - String pre = "test-yang:cont1.cont2."; + String pre = "test-yang_cont1.cont2."; p.put("dirPath", "src/test/resources"); p.put("format", "json"); p.put("httpMethod", "get"); @@ -390,7 +390,7 @@ public class DataFormatSerializerTest { */ @Test public void encodeToXmlYang() throws SvcLogicException { - String pre = "test-yang:cont1.cont2."; + String pre = "test-yang_cont1.cont2."; SvcLogicContext ctx = createAttListYang(pre); p.put("dirPath", "src/test/resources"); p.put("format", "xml"); @@ -409,7 +409,7 @@ public class DataFormatSerializerTest { */ @Test public void encodeToXmlYangWithPut() throws SvcLogicException { - String pre = "test-yang:cont1.cont2."; + String pre = "test-yang_cont1.cont2."; SvcLogicContext ctx = createAttListYang(pre); p.put("dirPath", "src/test/resources"); p.put("format", "xml"); @@ -428,7 +428,7 @@ public class DataFormatSerializerTest { */ @Test public void encodeToXmlYangWithPatch() throws SvcLogicException { - String pre = "test-yang:cont1.cont2."; + String pre = "test-yang_cont1.cont2."; SvcLogicContext ctx = createAttListYang(pre); p.put("dirPath", "src/test/resources"); p.put("format", "xml"); @@ -447,7 +447,7 @@ public class DataFormatSerializerTest { */ @Test public void encodeToXmlWithAugAsRootChild() throws SvcLogicException { - String pre = "test-yang:cont1.cont2."; + String pre = "test-yang_cont1.cont2."; SvcLogicContext ctx = createAttListYang(pre); p.put("dirPath", "src/test/resources"); p.put("format", "xml"); @@ -468,7 +468,7 @@ public class DataFormatSerializerTest { public void decodeToXmlYang() throws SvcLogicException { createMockForDecode(ENCODE_TO_XML_YANG); SvcLogicContext ctx = new SvcLogicContext(); - String pre = "test-yang:cont1.cont2."; + String pre = "test-yang_cont1.cont2."; p.put("dirPath", "src/test/resources"); p.put("format", "xml"); p.put("httpMethod", "get"); @@ -487,8 +487,8 @@ public class DataFormatSerializerTest { @Test public void codecToJsonRpc() throws SvcLogicException { createMockForDecode(DECODE_FROM_JSON_RPC); - String inPre = "test-yang:create-sfc.input."; - String outPre = "test-yang:create-sfc.output."; + String inPre = "test-yang_create-sfc.input."; + String outPre = "test-yang_create-sfc.output."; SvcLogicContext ctx = createAttListRpc(inPre); p.put("dirPath", "src/test/resources"); p.put("format", "json"); @@ -509,8 +509,8 @@ public class DataFormatSerializerTest { @Test public void codecToXmlRpc() throws SvcLogicException { createMockForDecode(DECODE_FROM_XML_RPC); - String inPre = "test-yang:create-sfc.input."; - String outPre = "test-yang:create-sfc.output."; + String inPre = "test-yang_create-sfc.input."; + String outPre = "test-yang_create-sfc.output."; SvcLogicContext ctx = createAttListRpc(inPre); p.put("dirPath", "src/test/resources"); p.put("format", "xml"); @@ -650,21 +650,21 @@ public class DataFormatSerializerTest { ctx.setAttribute(pre + "leaf12", "abc"); ctx.setAttribute(pre + "ll5[0]", "abc"); ctx.setAttribute(pre + "ll5[1]", "abc"); - ctx.setAttribute(pre + "cont4.test-augment:cont5.leaf13", "true"); - ctx.setAttribute(pre + "cont4.test-augment:list7[0].leaf14", "test"); - ctx.setAttribute(pre + "cont4.test-augment:list7[1].leaf14", "create"); - ctx.setAttribute(pre + "cont4.test-augment:leaf15", "abc"); - ctx.setAttribute(pre + "cont4.test-augment:ll6[0]", "unbounded"); - ctx.setAttribute(pre + "cont4.test-augment:ll6[1]", "8"); - ctx.setAttribute(pre + "cont4.test-augment:cont13.cont12.leaf26", + ctx.setAttribute(pre + "cont4.test-augment_cont5.leaf13", "true"); + ctx.setAttribute(pre + "cont4.test-augment_list7[0].leaf14", "test"); + ctx.setAttribute(pre + "cont4.test-augment_list7[1].leaf14", "create"); + ctx.setAttribute(pre + "cont4.test-augment_leaf15", "abc"); + ctx.setAttribute(pre + "cont4.test-augment_ll6[0]", "unbounded"); + ctx.setAttribute(pre + "cont4.test-augment_ll6[1]", "8"); + ctx.setAttribute(pre + "cont4.test-augment_cont13.cont12.leaf26", "abc"); - ctx.setAttribute(pre + "cont4.test-augment:cont13.list9[0].leaf27", + ctx.setAttribute(pre + "cont4.test-augment_cont13.list9[0].leaf27", "abc"); - ctx.setAttribute(pre + "cont4.test-augment:cont13.list9[1].leaf27", + ctx.setAttribute(pre + "cont4.test-augment_cont13.list9[1].leaf27", "abc"); - ctx.setAttribute(pre + "cont4.test-augment:cont13.leaf28", "abc"); - ctx.setAttribute(pre + "cont4.test-augment:cont13.ll9[0]", "abc"); - ctx.setAttribute(pre + "cont4.test-augment:cont13.ll9[1]", "abc"); + ctx.setAttribute(pre + "cont4.test-augment_cont13.leaf28", "abc"); + ctx.setAttribute(pre + "cont4.test-augment_cont13.ll9[0]", "abc"); + ctx.setAttribute(pre + "cont4.test-augment_cont13.ll9[1]", "abc"); return ctx; } @@ -785,29 +785,29 @@ public class DataFormatSerializerTest { assertThat(ctx.getAttribute(pre + "leaf12"), is("abc")); assertThat(ctx.getAttribute(pre + "ll5[0]"), is("abc")); assertThat(ctx.getAttribute(pre + "ll5[1]"), is("abc")); - assertThat(ctx.getAttribute(pre + "cont4.test-augment:cont5.leaf13"), + assertThat(ctx.getAttribute(pre + "cont4.test-augment_cont5.leaf13"), is("true")); - assertThat(ctx.getAttribute(pre + "cont4.test-augment:list7[0].leaf14"), + assertThat(ctx.getAttribute(pre + "cont4.test-augment_list7[0].leaf14"), is("test")); - assertThat(ctx.getAttribute(pre + "cont4.test-augment:list7[1].leaf14"), + assertThat(ctx.getAttribute(pre + "cont4.test-augment_list7[1].leaf14"), is("create")); - assertThat(ctx.getAttribute(pre + "cont4.test-augment:leaf15"), + assertThat(ctx.getAttribute(pre + "cont4.test-augment_leaf15"), is("abc")); - assertThat(ctx.getAttribute(pre + "cont4.test-augment:ll6[0]"), + assertThat(ctx.getAttribute(pre + "cont4.test-augment_ll6[0]"), is("unbounded")); - assertThat(ctx.getAttribute(pre + "cont4.test-augment:ll6[1]"), + assertThat(ctx.getAttribute(pre + "cont4.test-augment_ll6[1]"), is("8")); - assertThat(ctx.getAttribute(pre + "cont4.test-augment:cont13" + + assertThat(ctx.getAttribute(pre + "cont4.test-augment_cont13" + ".cont12.leaf26"), is("abc")); - assertThat(ctx.getAttribute(pre + "cont4.test-augment:cont13.list9[0]" + + assertThat(ctx.getAttribute(pre + "cont4.test-augment_cont13.list9[0]" + ".leaf27"), is("abc")); - assertThat(ctx.getAttribute(pre + "cont4.test-augment:cont13.list9[1]" + + assertThat(ctx.getAttribute(pre + "cont4.test-augment_cont13.list9[1]" + ".leaf27"), is("abc")); - assertThat(ctx.getAttribute(pre + "cont4.test-augment:cont13.leaf28"), + assertThat(ctx.getAttribute(pre + "cont4.test-augment_cont13.leaf28"), is("abc")); - assertThat(ctx.getAttribute(pre + "cont4.test-augment:cont13.ll9[0]"), + assertThat(ctx.getAttribute(pre + "cont4.test-augment_cont13.ll9[0]"), is("abc")); - assertThat(ctx.getAttribute(pre + "cont4.test-augment:cont13.ll9[1]"), + assertThat(ctx.getAttribute(pre + "cont4.test-augment_cont13.ll9[1]"), is("abc")); } diff --git a/restconf-client/provider/src/test/java/org/onap/ccsdk/sli/plugins/yangserializers/dfserializer/DataFormatUtilsTest.java b/restconf-client/provider/src/test/java/org/onap/ccsdk/sli/plugins/yangserializers/dfserializer/DataFormatUtilsTest.java index 027604480..a7814e10e 100644 --- a/restconf-client/provider/src/test/java/org/onap/ccsdk/sli/plugins/yangserializers/dfserializer/DataFormatUtilsTest.java +++ b/restconf-client/provider/src/test/java/org/onap/ccsdk/sli/plugins/yangserializers/dfserializer/DataFormatUtilsTest.java @@ -121,7 +121,11 @@ public final class DataFormatUtilsTest { "\n"; static final String ENCODE_TO_JSON_YANG_COMMON = "\n " + - "\"test-augment:cont13\": {\n" + + "\"test-augment:ll6\": [\n" + + " \"unbounded\",\n" + + " \"8\"\n" + + " ],\n" + + " \"test-augment:cont13\": {\n" + " \"ll9\": [\n" + " \"abc\",\n" + " \"abc\"\n" + @@ -148,10 +152,6 @@ public final class DataFormatUtilsTest { " }\n" + " ],\n" + " \"test-augment:leaf15\": \"abc\",\n" + - " \"test-augment:ll6\": [\n" + - " \"unbounded\",\n" + - " \"8\"\n" + - " ],\n" + " \"test-augment:cont5\": {\n" + " \"leaf13\": \"true\"\n" + " }"; @@ -277,6 +277,10 @@ public final class DataFormatUtilsTest { "}"; static final String ENCODE_TO_XML_YANG_COMMON = "\n" + + "unbounded\n" + + "8\n" + "\n" + " abc\n" + @@ -302,10 +306,6 @@ public final class DataFormatUtilsTest { "\n" + "abc\n" + - "unbounded\n" + - "8\n" + "\n" + " true\n" + @@ -557,8 +557,8 @@ public final class DataFormatUtilsTest { * @param i number of space * @return space appended string */ - private static String addSpace(String req, int i) { - StringBuilder space = new StringBuilder(""); + public static String addSpace(String req, int i) { + StringBuilder space = new StringBuilder(); for (int sp = 0; sp < i; sp++) { space = space.append(" "); } diff --git a/restconf-client/provider/src/test/java/org/onap/ccsdk/sli/plugins/yangserializers/dfserializer/IdentifierValidationTest.java b/restconf-client/provider/src/test/java/org/onap/ccsdk/sli/plugins/yangserializers/dfserializer/IdentifierValidationTest.java new file mode 100644 index 000000000..1109d426c --- /dev/null +++ b/restconf-client/provider/src/test/java/org/onap/ccsdk/sli/plugins/yangserializers/dfserializer/IdentifierValidationTest.java @@ -0,0 +1,762 @@ +/*- + * ============LICENSE_START======================================================= + * ONAP - CCSDK + * ================================================================================ + * Copyright (C) 2019 Huawei Technologies Co., Ltd. All rights reserved. + * ================================================================================ + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============LICENSE_END========================================================= + */ + +package org.onap.ccsdk.sli.plugins.yangserializers.dfserializer; + +import java.util.HashMap; +import java.util.Map; + +import org.junit.Before; +import org.junit.Test; +import org.mockito.invocation.InvocationOnMock; +import org.mockito.stubbing.Answer; +import org.onap.ccsdk.sli.core.sli.SvcLogicContext; +import org.onap.ccsdk.sli.core.sli.SvcLogicException; +import org.onap.ccsdk.sli.plugins.restapicall.HttpResponse; +import org.onap.ccsdk.sli.plugins.restapicall.RestapiCallNode; +import org.onap.ccsdk.sli.plugins.restconfapicall.RestconfApiCallNode; +import org.opendaylight.restconf.common.context.InstanceIdentifierContext; + +import static org.hamcrest.MatcherAssert.assertThat; +import static org.hamcrest.core.Is.is; +import static org.mockito.Matchers.any; +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.yangserializers.dfserializer.IdentifierValidationUtilsTest.DECODE_FROM_JSON_RPC_ID; +import static org.onap.ccsdk.sli.plugins.yangserializers.dfserializer.IdentifierValidationUtilsTest.DECODE_FROM_XML_RPC_ID; +import static org.onap.ccsdk.sli.plugins.yangserializers.dfserializer.IdentifierValidationUtilsTest.ENCODE_TO_JSON_RPC_ID; +import static org.onap.ccsdk.sli.plugins.yangserializers.dfserializer.IdentifierValidationUtilsTest.ENCODE_TO_JSON_WITH_AUG_PATH; +import static org.onap.ccsdk.sli.plugins.yangserializers.dfserializer.IdentifierValidationUtilsTest.ENCODE_TO_JSON_YANG_AUG_POST_ID; +import static org.onap.ccsdk.sli.plugins.yangserializers.dfserializer.IdentifierValidationUtilsTest.ENCODE_TO_JSON_YANG_ID; +import static org.onap.ccsdk.sli.plugins.yangserializers.dfserializer.IdentifierValidationUtilsTest.ENCODE_TO_JSON_YANG_PUT_ID; +import static org.onap.ccsdk.sli.plugins.yangserializers.dfserializer.IdentifierValidationUtilsTest.ENCODE_TO_XML_RPC_ID; +import static org.onap.ccsdk.sli.plugins.yangserializers.dfserializer.IdentifierValidationUtilsTest.ENCODE_TO_XML_YANG_AUG_POST_ID; +import static org.onap.ccsdk.sli.plugins.yangserializers.dfserializer.IdentifierValidationUtilsTest.ENCODE_TO_XML_YANG_ID; +import static org.onap.ccsdk.sli.plugins.yangserializers.dfserializer.IdentifierValidationUtilsTest.ENCODE_TO_XML_YANG_PUT_ID; + +/** + * Unit test cases for identifier validation test. + */ +public class IdentifierValidationTest { + + private Map p; + + private RestconfApiCallNode restconf; + + private RestapiCallNode restApi; + + private DfCaptor dfCaptor; + + /** + * Sets up the pre-requisite for each test case. + * + * @throws SvcLogicException when test case fails + */ + @Before + public void setUp() throws SvcLogicException { + p = new HashMap<>(); + p.put("restapiUser", "user1"); + p.put("restapiPassword", "abc123"); + p.put("responsePrefix", "response"); + p.put("skipSending", "true"); + restApi = new RestapiCallNode(); + restconf = mock(RestconfApiCallNode.class); + dfCaptor = new DfCaptor(); + createMethodMocks(); + } + + /** + * Creates method mocks using mockito for RestconfApiCallNode class. + * + * @throws SvcLogicException when test case fails + */ + private void createMethodMocks() throws SvcLogicException { + doReturn(restApi).when(restconf).getRestapiCallNode(); + doCallRealMethod().when(restconf).sendRequest( + any(Map.class), any(SvcLogicContext.class)); + doCallRealMethod().when(restconf).sendRequest( + any(Map.class), any(SvcLogicContext.class), any(Integer.class)); + doAnswer(dfCaptor).when(restconf).serializeRequest( + any(Map.class), any(YangParameters.class), any(String.class), + any(InstanceIdentifierContext.class)); + doAnswer(dfCaptor).when(restconf).updateReq( + any(String.class), any(YangParameters.class), + any(InstanceIdentifierContext.class)); + } + + /** + * Creates mock using mockito with input data for decoding. + * + * @param decodeData input data + * @throws SvcLogicException when test case fails + */ + private void createMockForDecode(String decodeData) + throws SvcLogicException { + doReturn(decodeData).when(restconf).getResponse( + any(SvcLogicContext.class), any(YangParameters.class), + any(String.class), any(HttpResponse.class)); + doCallRealMethod().when(restconf).serializeResponse( + any(YangParameters.class), any(String.class), any(String.class), + any(InstanceIdentifierContext.class)); + } + + /** + * Verifies encoding of parameters to JSON data format with containers, + * grouping and augment. + * + * @throws SvcLogicException when test case fails + */ + @Test + public void encodeToJsonYang() throws SvcLogicException { + String pre = "test_name_of_the_module_name_of_the_cont1.name_" + + "of_the_cont2."; + SvcLogicContext ctx = createAttListYang(pre); + p.put("dirPath", "src/test/resources"); + p.put("format", "json"); + p.put("httpMethod", "post"); + p.put("restapiUrl", "http://echo.getpostman.com/restconf/operati" + + "ons/test_name_of_the_module:name_of_the_cont1"); + restconf.sendRequest(p, ctx); + assertThat(dfCaptor.getResult(), is(ENCODE_TO_JSON_YANG_ID)); + } + + /** + * Verifies encoding of parameters with augment in the URL. + * + * @throws SvcLogicException when test case fails + */ + @Test + public void encodeToJsonYangWithAugUrl() throws SvcLogicException { + String pre = "test_name_of_the_module_name_of_the_cont1.name_" + + "of_the_cont2."; + SvcLogicContext ctx = createAttListYang(pre); + p.put("dirPath", "src/test/resources"); + p.put("format", "json"); + p.put("httpMethod", "post"); + p.put("restapiUrl", "http://echo.getpostman.com/restconf/operati" + + "ons/test_name_of_the_module:name_of_the_cont1/name_of_t" + + "he_cont2/name_of_the_cont4/test_augment_1_for_module:na" + + "me_of_the_cont5"); + restconf.sendRequest(p, ctx); + assertThat(dfCaptor.getResult(), is(ENCODE_TO_JSON_WITH_AUG_PATH)); + } + + /** + * Verifies encoding of parameters to JSON data format with containers, + * grouping and augment for put operation-type. + * + * @throws SvcLogicException when test case fails + */ + @Test + public void encodeToJsonYangWithPut() throws SvcLogicException { + String pre = "test_name_of_the_module_name_of_the_cont1.name_of_the_cont2."; + SvcLogicContext ctx = createAttListYang(pre); + p.put("dirPath", "src/test/resources"); + p.put("format", "json"); + p.put("httpMethod", "put"); + p.put("restapiUrl", "http://echo.getpostman" + + ".com/restconf/operations/test_name_of_the_module:name_of" + + "_the_cont1/name_of_the_cont2/name_of_the_cont4"); + restconf.sendRequest(p, ctx); + assertThat(dfCaptor.getResult(), is(ENCODE_TO_JSON_YANG_PUT_ID)); + } + + /** + * Verifies encoding of parameters to JSON data format with containers, + * grouping and augment for patch operation-type. + * + * @throws SvcLogicException when test case fails + */ + @Test + public void encodeToJsonYangWithPatch() throws SvcLogicException { + String pre = "test_name_of_the_module_name_of_the_cont1.name_o" + + "f_the_cont2."; + SvcLogicContext ctx = createAttListYang(pre); + p.put("dirPath", "src/test/resources"); + p.put("format", "json"); + p.put("httpMethod", "patch"); + p.put("restapiUrl", "http://echo.getpostman" + + ".com/restconf/operations/test_name_of_the_module:name_of_" + + "the_cont1/name_of_the_cont2/name_of_the_cont4"); + restconf.sendRequest(p, ctx); + assertThat(dfCaptor.getResult(), is(ENCODE_TO_JSON_YANG_PUT_ID)); + } + + /** + * Verifies encoding of parameters to JSON data format with augment as + * root child. + * + * @throws SvcLogicException when test case fails + */ + @Test + public void encodeToJsonWithAugAsRootChild() throws SvcLogicException { + String pre = "test_name_of_the_module_name_of_the_cont1.name_of_" + + "the_cont2."; + SvcLogicContext ctx = createAttListYang(pre); + p.put("dirPath", "src/test/resources"); + p.put("format", "json"); + p.put("httpMethod", "post"); + p.put("restapiUrl", "http://echo.getpostman" + + ".com/restconf/operations/test_name_of_the_module:name_of_" + + "the_cont1/name_of_the_cont2/name_of_the_cont4"); + restconf.sendRequest(p, ctx); + assertThat(dfCaptor.getResult(), is(ENCODE_TO_JSON_YANG_AUG_POST_ID)); + } + + /** + * Verifies decoding of parameters from JSON data format with containers, + * grouping and augment. + * + * @throws SvcLogicException when test case fails + */ + @Test + public void decodeToJsonYang() throws SvcLogicException { + createMockForDecode(ENCODE_TO_JSON_YANG_ID); + SvcLogicContext ctx = new SvcLogicContext(); + String pre = "test_name_of_the_module_name_of_the_cont1.name_" + + "of_the_cont2."; + p.put("dirPath", "src/test/resources"); + p.put("format", "json"); + p.put("httpMethod", "get"); + p.put("restapiUrl", "http://echo.getpostman" + + ".com/restconf/operations/test_name_of_the_module:name" + + "_of_the_cont1"); + restconf.sendRequest(p, ctx); + verifyAttListYang(ctx, pre); + } + + /** + * Verifies encoding of parameters to XML data format with containers, + * grouping and augment. + * + * @throws SvcLogicException when test case fails + */ + @Test + public void encodeToXmlYang() throws SvcLogicException { + String pre = "test_name_of_the_module_name_of_the_cont1.name_of" + + "_the_cont2."; + SvcLogicContext ctx = createAttListYang(pre); + p.put("dirPath", "src/test/resources"); + p.put("format", "xml"); + p.put("httpMethod", "post"); + p.put("restapiUrl", "http://echo.getpostman.com/restconf/operations/" + + "test_name_of_the_module:name_of_the_cont1"); + restconf.sendRequest(p, ctx); + assertThat(dfCaptor.getResult(), is(ENCODE_TO_XML_YANG_ID)); + } + + /** + * Verifies encoding of parameters to XML data format with containers, + * grouping and augment for put operation-type + * + * @throws SvcLogicException when test case fails + */ + @Test + public void encodeToXmlYangWithPut() throws SvcLogicException { + String pre = "test_name_of_the_module_name_of_the_cont1.name_" + + "of_the_cont2."; + SvcLogicContext ctx = createAttListYang(pre); + p.put("dirPath", "src/test/resources"); + p.put("format", "xml"); + p.put("httpMethod", "put"); + p.put("restapiUrl", "http://echo.getpostman.com/restconf/operations/" + + "test_name_of_the_module:name_of_the_cont1/name_of_the_cont2" + + "/name_of_the_cont4"); + restconf.sendRequest(p, ctx); + assertThat(dfCaptor.getResult(), is(ENCODE_TO_XML_YANG_PUT_ID)); + } + + /** + * Verifies encoding of parameters to XML data format with containers, + * grouping and augment for patch operation-type + * + * @throws SvcLogicException when test case fails + */ + @Test + public void encodeToXmlYangWithPatch() throws SvcLogicException { + String pre = "test_name_of_the_module_name_of_the_cont1.name_of" + + "_the_cont2."; + SvcLogicContext ctx = createAttListYang(pre); + p.put("dirPath", "src/test/resources"); + p.put("format", "xml"); + p.put("httpMethod", "put"); + p.put("restapiUrl", "http://echo.getpostman.com/restconf/operation" + + "s/test_name_of_the_module:name_of_the_cont1/name_of_the_c" + + "ont2/name_of_the_cont4"); + restconf.sendRequest(p, ctx); + assertThat(dfCaptor.getResult(), is(ENCODE_TO_XML_YANG_PUT_ID)); + } + + /** + * Verifies encoding of parameters to XML data format with augment as + * root child. + * + * @throws SvcLogicException when test case fails + */ + @Test + public void encodeToXmlWithAugAsRootChild() throws SvcLogicException { + String pre = "test_name_of_the_module_name_of_the_cont1.name_of_the" + + "_cont2."; + SvcLogicContext ctx = createAttListYang(pre); + p.put("dirPath", "src/test/resources"); + p.put("format", "xml"); + p.put("httpMethod", "post"); + p.put("restapiUrl", "http://echo.getpostman.com/restconf/operations/" + + "test_name_of_the_module:name_of_the_cont1/name_of_the_cont2" + + "/name_of_the_cont4"); + restconf.sendRequest(p, ctx); + assertThat(dfCaptor.getResult(), is(ENCODE_TO_XML_YANG_AUG_POST_ID)); + } + + /** + * Verifies decoding of parameters from XML data format with containers, + * grouping and augment. + * + * @throws SvcLogicException when test case fails + */ + @Test + public void decodeToXmlYang() throws SvcLogicException { + createMockForDecode(ENCODE_TO_XML_YANG_ID); + SvcLogicContext ctx = new SvcLogicContext(); + String pre = "test_name_of_the_module_name_of_the_cont1.name_of_" + + "the_cont2."; + p.put("dirPath", "src/test/resources"); + p.put("format", "xml"); + p.put("httpMethod", "get"); + p.put("restapiUrl", "http://echo.getpostman.com/restconf/operation" + + "s/test_name_of_the_module:name_of_the_cont1"); + restconf.sendRequest(p, ctx); + verifyAttListYang(ctx, pre); + } + + /** + * Verifies encoding of and decoding from, JSON respectively for data + * format with containers, grouping and augment. + * + * @throws SvcLogicException when test case fails + */ + @Test + public void codecToJsonRpc() throws SvcLogicException { + createMockForDecode(DECODE_FROM_JSON_RPC_ID); + String inPre = "test_name_of_the_module_name_of_the_create-sfc.input."; + String outPre = "test_name_of_the_module_name_of_the_create-sfc" + + ".output."; + SvcLogicContext ctx = createAttListRpc(inPre); + p.put("dirPath", "src/test/resources"); + p.put("format", "json"); + p.put("httpMethod", "post"); + p.put("restapiUrl", "http://echo.getpostman.com/restconf/operations" + + "/test_name_of_the_module:name_of_the_create-sfc"); + restconf.sendRequest(p, ctx); + assertThat(dfCaptor.getResult(), is(ENCODE_TO_JSON_RPC_ID)); + verifyAttListRpc(ctx, outPre); + } + + /** + * Verifies encoding of and decoding from, XML respectively for data + * format with containers, grouping and augment. + * + * @throws SvcLogicException when test case fails + */ + @Test + public void codecToXmlRpc() throws SvcLogicException { + createMockForDecode(DECODE_FROM_XML_RPC_ID); + String inPre = "test_name_of_the_module_name_of_the_create-sfc.input."; + String outPre = "test_name_of_the_module_name_of_the_create-sfc.output."; + SvcLogicContext ctx = createAttListRpc(inPre); + p.put("dirPath", "src/test/resources"); + p.put("format", "xml"); + p.put("httpMethod", "post"); + p.put("restapiUrl", "http://echo.getpostman" + + ".com/restconf/operations/test_name_of_the_module" + + ":name_of_the_create-sfc"); + restconf.sendRequest(p, ctx); + assertThat(dfCaptor.getResult(), is(ENCODE_TO_XML_RPC_ID)); + verifyAttListRpc(ctx, outPre); + } + + /** + * Creates attribute list for encoding JSON or XML with container, + * grouping and augmented YANG file. + * + * @param pre prefix + * @return service logic context + */ + private SvcLogicContext createAttListYang(String pre) { + SvcLogicContext ctx = new SvcLogicContext(); + ctx.setAttribute(pre + "name_of_the_cont3.name_of_the_leaf" + + "10", "abc"); + ctx.setAttribute(pre + "name_of_the_list1[0].name_of_the_leaf1" + + "", "true"); + ctx.setAttribute(pre + "name_of_the_list1[0].name_of_the_leaf2" + + "", "abc"); + ctx.setAttribute(pre + "name_of_the_list1[0].name_of_the_leaf3" + + "", "abc"); + ctx.setAttribute(pre + "name_of_the_list1[0].name_of_the_" + + "ll1[0]", "abc"); + ctx.setAttribute(pre + "name_of_the_list1[0].name_of_the_" + + "ll1[1]", "abc"); + ctx.setAttribute(pre + "name_of_the_list1[0].name_of_the_" + + "ll2[0]", "abc"); + ctx.setAttribute(pre + "name_of_the_list1[0].name_of_the_" + + "ll2[1]", "abc"); + ctx.setAttribute(pre + "name_of_the_list1[0].name_of_the_" + + "cont4.name_of_the_leaf11", "abc"); + ctx.setAttribute(pre + "name_of_the_list1[0].name_of_the_" + + "list4[0].name_of_the_leaf8", "abc"); + ctx.setAttribute(pre + "name_of_the_list1[0].name_of_the_" + + "list4[1].name_of_the_leaf8", "abc"); + ctx.setAttribute(pre + "name_of_the_list1[0].name_of_the_" + + "list5[0].name_of_the_leaf9", "abc"); + ctx.setAttribute(pre + "name_of_the_list1[0].name_of_the_" + + "list5[1].name_of_the_leaf9", "abc"); + ctx.setAttribute(pre + "name_of_the_list1[1].name_of_the_" + + "leaf1", "true"); + ctx.setAttribute(pre + "name_of_the_list1[1].name_of_the_" + + "leaf2", "abc"); + ctx.setAttribute(pre + "name_of_the_list1[1].name_of_the_" + + "leaf3", "abc"); + ctx.setAttribute(pre + "name_of_the_list1[1].name_of_the_" + + "ll1[0]", "abc"); + ctx.setAttribute(pre + "name_of_the_list1[1].name_of_the_" + + "ll1[1]", "abc"); + ctx.setAttribute(pre + "name_of_the_list1[1].name_of_the_" + + "ll2[0]", "abc"); + ctx.setAttribute(pre + "name_of_the_list1[1].name_of_the_" + + "ll2[1]", "abc"); + ctx.setAttribute(pre + "name_of_the_list1[1].name_of_the_" + + "cont4.name_of_the_leaf11", "abc"); + ctx.setAttribute(pre + "name_of_the_list1[1].name_of_the_" + + "list4[0].name_of_the_leaf8", "abc"); + ctx.setAttribute(pre + "name_of_the_list1[1].name_of_the_" + + "list4[1].name_of_the_leaf8", "abc"); + ctx.setAttribute(pre + "name_of_the_list1[1].name_of_the_" + + "list5[0].name_of_the_leaf9", "abc"); + ctx.setAttribute(pre + "name_of_the_list1[1].name_of_the_" + + "list5[1].name_of_the_leaf9", "abc"); + ctx.setAttribute(pre + "name_of_the_list2[0].name_of_the_" + + "leaf4", "abc"); + ctx.setAttribute(pre + "name_of_the_list2[1].name_of_the_" + + "leaf4", "abc"); + ctx.setAttribute(pre + "name_of_the_leaf5", "abc"); + ctx.setAttribute(pre + "name_of_the_leaf6", "abc"); + ctx.setAttribute(pre + "name_of_the_ll3[0]", "abc"); + ctx.setAttribute(pre + "name_of_the_ll3[1]", "abc"); + ctx.setAttribute(pre + "name_of_the_ll4[0]", "abc"); + ctx.setAttribute(pre + "name_of_the_ll4[1]", "abc"); + ctx.setAttribute(pre + "name_of_the_cont4.name_of_the_leaf10", + "abc"); + ctx.setAttribute(pre + "name_of_the_list6[0].name_of_the_leaf11", + "abc"); + ctx.setAttribute(pre + "name_of_the_list6[1].name_of_the_leaf11", + "abc"); + ctx.setAttribute(pre + "name_of_the_leaf12", "abc"); + ctx.setAttribute(pre + "name_of_the_ll5[0]", "abc"); + ctx.setAttribute(pre + "name_of_the_ll5[1]", "abc"); + ctx.setAttribute(pre + "name_of_the_cont4.test_augment_1_for_" + + "module_name_of_the_cont5.name_of_the_leaf13", + "true"); + ctx.setAttribute(pre + "name_of_the_cont4.test_augment_1_for_" + + "module_name_of_the_list7[0].name_of_the" + + "_leaf14", "test"); + ctx.setAttribute(pre + "name_of_the_cont4.test_augment_1_for_" + + "module_name_of_the_list7[1].name_of_the" + + "_leaf14", "create"); + ctx.setAttribute(pre + "name_of_the_cont4.test_augment_1_for_" + + "module_name_of_the_leaf15", "abc"); + ctx.setAttribute(pre + "name_of_the_cont4.test_augment_1_for_" + + "module_name_of_the_ll6[0]", + "unbounded"); + ctx.setAttribute(pre + "name_of_the_cont4.test_augment_1_for" + + "_module_name_of_the_ll6[1]", "8"); + ctx.setAttribute(pre + "name_of_the_cont4.test_augment_1_for" + + "_module_name_of_the_cont13.name_of_the_" + + "cont12.name_of_the_leaf26", + "abc"); + ctx.setAttribute(pre + "name_of_the_cont4.test_augment_1_for_" + + "module_name_of_the_cont13.name_of_the_" + + "list9[0].name_of_the_leaf27", + "abc"); + ctx.setAttribute(pre + "name_of_the_cont4.test_augment_1_for" + + "_module_name_of_the_cont13.name_of_the_" + + "list9[1].name_of_the_leaf27", + "abc"); + ctx.setAttribute(pre + "name_of_the_cont4.test_augment_1_for" + + "_module_name_of_the_cont13.name_of_the_" + + "leaf28", "abc"); + ctx.setAttribute(pre + "name_of_the_cont4.test_augment_1_for" + + "_module_name_of_the_cont13.name_of_the_" + + "ll9[0]", "abc"); + ctx.setAttribute(pre + "name_of_the_cont4.test_augment_1_for" + + "_module_name_of_the_cont13.name_of_the_" + + "ll9[1]", "abc"); + return ctx; + } + + /** + * Creates attribute list for encoding JSON or XML with RPC YANG file. + * + * @param pre prefix + * @return service logic context + */ + private SvcLogicContext createAttListRpc(String pre) { + SvcLogicContext ctx = new SvcLogicContext(); + ctx.setAttribute(pre + "name_of_the_cont14.name_of_the_leaf28", + "abc"); + ctx.setAttribute(pre + "name_of_the_list10[0].name_of_the_leaf29", + "abc"); + ctx.setAttribute(pre + "name_of_the_list10[1].name_of_the_leaf29", + "abc"); + ctx.setAttribute(pre + "name_of_the_leaf30", "abc"); + ctx.setAttribute(pre + "name_of_the_ll10[0]", "abc"); + ctx.setAttribute(pre + "name_of_the_ll10[1]", "abc"); + ctx.setAttribute(pre + "name_of_the_cont15.name_of_the_leaf31", + "abc"); + ctx.setAttribute(pre + "name_of_the_cont13.name_of_the_list9[0]" + + ".name_of_the_leaf27", "abc"); + ctx.setAttribute(pre + "name_of_the_cont13.name_of_the_list9[1]" + + ".name_of_the_leaf27", "abc"); + ctx.setAttribute(pre + "name_of_the_cont13.name_of_the_leaf28", + "abc"); + ctx.setAttribute(pre + "name_of_the_cont13.name_of_the_ll9[0]", + "abc"); + ctx.setAttribute(pre + "name_of_the_cont13.name_of_the_ll9[1]", + "abc"); + return ctx; + } + + /** + * Verifies the attribute list for decoding from JSON or XML with + * container, grouping and augmented file. + * + * @param ctx service logic context + * @param pre prefix + */ + private void verifyAttListYang(SvcLogicContext ctx, String pre) { + assertThat(ctx.getAttribute(pre + "name_of_the_cont3.name_of" + + "_the_leaf10"), is("abc")); + assertThat(ctx.getAttribute(pre + "name_of_the_list1[0].name" + + "_of_the_leaf1"), is("true")); + assertThat(ctx.getAttribute(pre + "name_of_the_list1[0].name" + + "_of_the_leaf2"), is("abc")); + assertThat(ctx.getAttribute(pre + "name_of_the_list1[0].name" + + "_of_the_leaf3"), is("abc")); + assertThat(ctx.getAttribute(pre + "name_of_the_list1[0].name" + + "_of_the_ll1[0]"), is("abc")); + assertThat(ctx.getAttribute(pre + "name_of_the_list1[0].name" + + "_of_the_ll1[1]"), is("abc")); + assertThat(ctx.getAttribute(pre + "name_of_the_list1[0].name" + + "_of_the_ll2[0]"), is("abc")); + assertThat(ctx.getAttribute(pre + "name_of_the_list1[0].name" + + "_of_the_ll2[1]"), is("abc")); + assertThat(ctx.getAttribute(pre + "name_of_the_list1[0].name" + + "_of_the_cont4.name_of_the_leaf11"), + is("abc")); + assertThat(ctx.getAttribute(pre + "name_of_the_list1[0].name_of" + + "_the_list4[0].name_of_the_leaf8"), + is("abc")); + assertThat(ctx.getAttribute(pre + "name_of_the_list1[0].name_of" + + "_the_list4[1].name_of_the_leaf8"), + is("abc")); + assertThat(ctx.getAttribute(pre + "name_of_the_list1[0].name_of" + + "_the_list5[0].name_of_the_leaf9"), + is("abc")); + assertThat(ctx.getAttribute(pre + "name_of_the_list1[0].name_of" + + "_the_list5[1].name_of_the_leaf9"), + is("abc")); + assertThat(ctx.getAttribute(pre + "name_of_the_list1[1].name_of" + + "_the_leaf1"), is("true")); + assertThat(ctx.getAttribute(pre + "name_of_the_list1[1].name_of" + + "_the_leaf2"), is("abc")); + assertThat(ctx.getAttribute(pre + "name_of_the_list1[1].name_of" + + "_the_leaf3"), is("abc")); + assertThat(ctx.getAttribute(pre + "name_of_the_list1[1].name_of" + + "_the_ll1[0]"), is("abc")); + assertThat(ctx.getAttribute(pre + "name_of_the_list1[1].name_of" + + "_the_ll1[1]"), is("abc")); + assertThat(ctx.getAttribute(pre + "name_of_the_list1[1].name_of" + + "_the_ll2[0]"), is("abc")); + assertThat(ctx.getAttribute(pre + "name_of_the_list1[1].name_of" + + "_the_ll2[1]"), is("abc")); + assertThat(ctx.getAttribute(pre + "name_of_the_list1[1].name_of" + + "_the_cont4.name_of_the_leaf11"), + is("abc")); + assertThat(ctx.getAttribute(pre + "name_of_the_list1[1].name_of" + + "_the_list4[0].name_of_the_leaf8"), + is("abc")); + assertThat(ctx.getAttribute(pre + "name_of_the_list1[1].name_of" + + "_the_list4[1].name_of_the_leaf8"), + is("abc")); + assertThat(ctx.getAttribute(pre + "name_of_the_list1[1].name_of" + + "_the_list5[0].name_of_the_leaf9"), + is("abc")); + assertThat(ctx.getAttribute(pre + "name_of_the_list1[1].name_of" + + "_the_list5[1].name_of_the_leaf9"), + is("abc")); + assertThat(ctx.getAttribute(pre + "name_of_the_list2[0].name_of" + + "_the_leaf4"), is("abc")); + assertThat(ctx.getAttribute(pre + "name_of_the_list2[1].name_of" + + "_the_leaf4"), is("abc")); + assertThat(ctx.getAttribute(pre + "name_of_the_leaf5"), + is("abc")); + assertThat(ctx.getAttribute(pre + "name_of_the_leaf6"), + is("abc")); + assertThat(ctx.getAttribute(pre + "name_of_the_ll3[0]"), + is("abc")); + assertThat(ctx.getAttribute(pre + "name_of_the_ll3[1]"), + is("abc")); + assertThat(ctx.getAttribute(pre + "name_of_the_ll4[0]"), + is("abc")); + assertThat(ctx.getAttribute(pre + "name_of_the_ll4[1]"), + is("abc")); + assertThat(ctx.getAttribute(pre + "name_of_the_cont4.name_of" + + "_the_leaf10"), is( "abc")); + assertThat(ctx.getAttribute(pre + "name_of_the_list6[0].name_of" + + "_the_leaf11"), is("abc")); + assertThat(ctx.getAttribute(pre + "name_of_the_list6[1].name_of" + + "_the_leaf11"), is("abc")); + assertThat(ctx.getAttribute(pre + "name_of_the_leaf12"), + is("abc")); + assertThat(ctx.getAttribute(pre + "name_of_the_ll5[0]"), + is("abc")); + assertThat(ctx.getAttribute(pre + "name_of_the_ll5[1]"), + is("abc")); + assertThat(ctx.getAttribute(pre + "name_of_the_cont4.test_" + + "augment_1_for_module_name_of_" + + "the_cont5.name_of_the_leaf13"), + is("true")); + assertThat(ctx.getAttribute(pre + "name_of_the_cont4.test_" + + "augment_1_for_module_name_of_" + + "the_list7[0].name_of_the_leaf14"), + is("test")); + assertThat(ctx.getAttribute(pre + "name_of_the_cont4.test_" + + "augment_1_for_module_name_of_" + + "the_list7[1].name_of_the_leaf14"), + is("create")); + assertThat(ctx.getAttribute(pre + "name_of_the_cont4.test_" + + "augment_1_for_module_name_of_" + + "the_leaf15"), + is("abc")); + assertThat(ctx.getAttribute(pre + "name_of_the_cont4.test_" + + "augment_1_for_module_name_of_" + + "the_ll6[0]"), + is("unbounded")); + assertThat(ctx.getAttribute(pre + "name_of_the_cont4.test_" + + "augment_1_for_module_name_of_" + + "the_ll6[1]"), + is("8")); + assertThat(ctx.getAttribute(pre + "name_of_the_cont4.test_" + + "augment_1_for_module_name_of_" + + "the_cont13" + + ".name_of_the_cont12.name_of_" + + "the_leaf26"), is("abc")); + assertThat(ctx.getAttribute(pre + "name_of_the_cont4.test_" + + "augment_1_for_module_name_of_" + + "the_cont13.name_of_the_list9[0]" + + ".name_of_the_leaf27"), + is("abc")); + assertThat(ctx.getAttribute(pre + "name_of_the_cont4.test_" + + "augment_1_for_module_name_of_" + + "the_cont13.name_of_the_list9[1]" + + ".name_of_the_leaf27"), + is("abc")); + assertThat(ctx.getAttribute(pre + "name_of_the_cont4.test_" + + "augment_1_for_module_name_of_" + + "the_cont13.name_of_the_leaf28"), + is("abc")); + assertThat(ctx.getAttribute(pre + "name_of_the_cont4.test_" + + "augment_1_for_module_name_of_" + + "the_cont13.name_of_the_ll9[0]"), + is("abc")); + assertThat(ctx.getAttribute(pre + "name_of_the_cont4.test_" + + "augment_1_for_module_name_of_" + + "the_cont13.name_of_the_ll9[1]"), + is("abc")); + } + + /** + * Verifies the attribute list for decoding from JSON or XML with + * RPC YANG file. + * + * @param ctx service logic context + * @param pre prefix + */ + private void verifyAttListRpc(SvcLogicContext ctx, String pre) { + assertThat(ctx.getAttribute(pre + "name_of_the_cont16.name_of_" + + "the_leaf32"), is("abc")); + assertThat(ctx.getAttribute(pre + "name_of_the_list11[0].name" + + "_of_the_leaf33"), is("abc")); + assertThat(ctx.getAttribute(pre + "name_of_the_list11[1].name" + + "_of_the_leaf33"), is("abc")); + assertThat(ctx.getAttribute(pre + "name_of_the_leaf34"), + is("abc")); + assertThat(ctx.getAttribute(pre + "name_of_the_ll11[0]"), + is("abc")); + assertThat(ctx.getAttribute(pre + "name_of_the_ll11[1]"), + is("abc")); + assertThat(ctx.getAttribute(pre + "name_of_the_cont17.name_of_" + + "the_leaf35"), is("abc")); + assertThat(ctx.getAttribute(pre + "name_of_the_cont13.name_of_" + + "the_cont12.name_of_the_leaf26"), + is("abc")); + assertThat(ctx.getAttribute(pre + "name_of_the_cont13.name_of_" + + "the_list9[0].name_of_the_leaf27"), + is("abc")); + assertThat(ctx.getAttribute(pre + "name_of_the_cont13.name_of_" + + "the_list9[1].name_of_the_leaf27"), + is("abc")); + assertThat(ctx.getAttribute(pre + "name_of_the_cont13.name_of_" + + "the_ll9[0]"), is("abc")); + assertThat(ctx.getAttribute(pre + "name_of_the_cont13.name_of_" + + "the_ll9[1]"), is("abc")); + assertThat(ctx.getAttribute(pre + "name_of_the_cont13.name_of_" + + "the_leaf28"), is("abc")); + } + + /** + * Captures the data format messages by mocking it, which can be used in + * testing the value. + * + * @param capturing data format + */ + public class DfCaptor implements Answer { + + private String result; + + /** + * Returns the captured data format message. + * + * @return data format message. + */ + public String getResult() { + return result; + } + + @Override + public String answer(InvocationOnMock invocationOnMock) + throws Throwable { + result = (String) invocationOnMock.callRealMethod(); + return result; + } + } + +} diff --git a/restconf-client/provider/src/test/java/org/onap/ccsdk/sli/plugins/yangserializers/dfserializer/IdentifierValidationUtilsTest.java b/restconf-client/provider/src/test/java/org/onap/ccsdk/sli/plugins/yangserializers/dfserializer/IdentifierValidationUtilsTest.java new file mode 100644 index 000000000..a866f1c4a --- /dev/null +++ b/restconf-client/provider/src/test/java/org/onap/ccsdk/sli/plugins/yangserializers/dfserializer/IdentifierValidationUtilsTest.java @@ -0,0 +1,469 @@ +/*- + * ============LICENSE_START======================================================= + * ONAP - CCSDK + * ================================================================================ + * Copyright (C) 2019 Huawei Technologies Co., Ltd. All rights reserved. + * ================================================================================ + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============LICENSE_END========================================================= + */ + +package org.onap.ccsdk.sli.plugins.yangserializers.dfserializer; + +import static org.onap.ccsdk.sli.plugins.yangserializers.dfserializer.DataFormatUtilsTest.addSpace; + +/** + * Unit test case utilities for identifier validation and restconf api + * call node. + */ +public final class IdentifierValidationUtilsTest { + + static final String ENCODE_TO_JSON_YANG_COMMON_ID = "\n " + + "\"test_augment_1_for_module:name_of_the_ll6\": [\n" + + " \"unbounded\",\n" + + " \"8\"\n" + + " ],\n" + + " \"test_augment_1_for_module:name_of_the_cont13\": {\n" + + " \"name_of_the_cont12\": {\n" + + " \"name_of_the_leaf26\": \"abc\"\n" + + " },\n" + + " \"name_of_the_ll9\": [\n" + + " \"abc\",\n" + + " \"abc\"\n" + + " ],\n" + + " \"name_of_the_leaf28\": \"abc\",\n" + + " \"name_of_the_list9\": [\n" + + " {\n" + + " \"name_of_the_leaf27\": \"abc\"\n" + + " },\n" + + " {\n" + + " \"name_of_the_leaf27\": \"abc\"\n" + + " }\n" + + " ]\n" + + " },\n" + + " \"test_augment_1_for_module:name_of_the_list7\": [\n" + + " {\n" + + " \"name_of_the_leaf14\": \"test\"\n" + + " },\n" + + " {\n" + + " \"name_of_the_leaf14\": \"create\"\n" + + " }\n" + + " ],\n" + + " \"test_augment_1_for_module:name_of_the_leaf15\": \"abc\",\n" + + " \"test_augment_1_for_module:name_of_the_cont5\": {\n" + + " \"name_of_the_leaf13\": \"true\"\n" + + " }"; + + static final String ENCODE_TO_JSON_YANG_AUG_POST_ID = "{\n" + + " \"test_name_of_the_module:name_of_the_leaf10\": \"abc\"," + + ENCODE_TO_JSON_YANG_COMMON_ID + "\n}"; + + static final String ENCODE_TO_JSON_YANG_ID = "{\n" + + " \"test_name_of_the_module:name_of_the_cont2\": {\n" + + " \"name_of_the_ll4\": [\n" + + " \"abc\",\n" + + " \"abc\"\n" + + " ],\n" + + " \"name_of_the_leaf5\": \"abc\",\n" + + " \"name_of_the_list6\": [\n" + + " {\n" + + " \"name_of_the_leaf11\": \"abc\"\n" + + " },\n" + + " {\n" + + " \"name_of_the_leaf11\": \"abc\"\n" + + " }\n" + + " ],\n" + + " \"name_of_the_ll5\": [\n" + + " \"abc\",\n" + + " \"abc\"\n" + + " ],\n" + + " \"name_of_the_ll3\": [\n" + + " \"abc\",\n" + + " \"abc\"\n" + + " ],\n" + + " \"name_of_the_leaf6\": \"abc\",\n" + + " \"name_of_the_cont3\": {\n" + + " \"name_of_the_leaf10\": \"abc\"\n" + + " },\n" + + " \"name_of_the_list2\": [\n" + + " {\n" + + " \"name_of_the_leaf4\": \"abc\"\n" + + " },\n" + + " {\n" + + " \"name_of_the_leaf4\": \"abc\"\n" + + " }\n" + + " ],\n" + + " \"name_of_the_list1\": [\n" + + " {\n" + + " \"name_of_the_ll2\": [\n" + + " \"abc\",\n" + + " \"abc\"\n" + + " ],\n" + + " \"name_of_the_list5\": [\n" + + " {\n" + + " \"name_of_the_leaf9\": \"abc\"\n" + + " },\n" + + " {\n" + + " \"name_of_the_leaf9\": \"abc\"\n" + + " }\n" + + " ],\n" + + " \"name_of_the_list4\": [\n" + + " {\n" + + " \"name_of_the_leaf8\": \"abc\"\n" + + " },\n" + + " {\n" + + " \"name_of_the_leaf8\": \"abc\"\n" + + " }\n" + + " ],\n" + + " \"name_of_the_leaf1\": \"true\",\n" + + " \"name_of_the_leaf3\": \"abc\",\n" + + " \"name_of_the_leaf2\": \"abc\",\n" + + " \"name_of_the_cont4\": {\n" + + " \"name_of_the_leaf11\": \"abc\"\n" + + " },\n" + + " \"name_of_the_ll1\": [\n" + + " \"abc\",\n" + + " \"abc\"\n" + + " ]\n" + + " },\n" + + " {\n" + + " \"name_of_the_ll2\": [\n" + + " \"abc\",\n" + + " \"abc\"\n" + + " ],\n" + + " \"name_of_the_list5\": [\n" + + " {\n" + + " \"name_of_the_leaf9\": \"abc\"\n" + + " },\n" + + " {\n" + + " \"name_of_the_leaf9\": \"abc\"\n" + + " }\n" + + " ],\n" + + " \"name_of_the_list4\": [\n" + + " {\n" + + " \"name_of_the_leaf8\": \"abc\"\n" + + " },\n" + + " {\n" + + " \"name_of_the_leaf8\": \"abc\"\n" + + " }\n" + + " ],\n" + + " \"name_of_the_leaf1\": \"true\",\n" + + " \"name_of_the_leaf3\": \"abc\",\n" + + " \"name_of_the_leaf2\": \"abc\",\n" + + " \"name_of_the_cont4\": {\n" + + " \"name_of_the_leaf11\": \"abc\"\n" + + " },\n" + + " \"name_of_the_ll1\": [\n" + + " \"abc\",\n" + + " \"abc\"\n" + + " ]\n" + + " }\n" + + " ],\n" + + " \"name_of_the_cont4\": {\n" + + " \"name_of_the_leaf10\": \"abc\"," + + addSpace(ENCODE_TO_JSON_YANG_COMMON_ID,8) + "\n" + + " },\n" + + " \"name_of_the_leaf12\": \"abc\"\n" + + " }\n" + + "}"; + + static final String ENCODE_TO_JSON_WITH_AUG_PATH = "{\n" + + " \"test_augment_1_for_module:name_of_the_leaf13\": \"true\"\n" + + "}"; + + static final String ENCODE_TO_JSON_YANG_PUT_ID = "{\n" + + " \"test_name_of_the_module:name_of_the_cont4\": {" + addSpace( + ENCODE_TO_JSON_YANG_COMMON_ID, 4) + ",\n" + + " \"name_of_the_leaf10\": \"abc\"\n" + + " }\n" + + "}"; + + static final String ENCODE_TO_XML_YANG_COMMON_ID = "\n" + + "unbounded\n" + + "8\n" + + "\n" + + " \n" + + " abc\n" + + " \n" + + " abc\n" + + " abc\n" + + " abc\n" + + " \n" + + " abc\n" + + " \n" + + " \n" + + " abc\n" + + " \n" + + "\n" + + "\n" + + " test\n" + + "\n" + + "\n" + + " create\n" + + "\n" + + "abc\n" + + "\n" + + " true\n" + + ""; + + static final String ENCODE_TO_XML_YANG_AUG_POST_ID = "\n" + + "abc" + + ENCODE_TO_XML_YANG_COMMON_ID + "\n"; + + static final String ENCODE_TO_XML_YANG_PUT_ID = "\n" + + "\n" + + " abc" + + addSpace(ENCODE_TO_XML_YANG_COMMON_ID, 4) + "\n\n"; + + static final String ENCODE_TO_XML_YANG_ID= "\n" + + "\n" + + " abc\n" + + " abc\n" + + " abc\n" + + " \n" + + " abc\n" + + " \n" + + " \n" + + " abc\n" + + " \n" + + " abc\n" + + " abc\n" + + " abc\n" + + " abc\n" + + " abc\n" + + " \n" + + " abc\n" + + " \n" + + " \n" + + " abc\n" + + " \n" + + " \n" + + " abc\n" + + " \n" + + " \n" + + " abc\n" + + " abc\n" + + " \n" + + " abc\n" + + " \n" + + " \n" + + " abc\n" + + " \n" + + " \n" + + " abc\n" + + " \n" + + " \n" + + " abc\n" + + " \n" + + " true\n" + + " abc\n" + + " abc\n" + + " \n" + + " abc\n" + + " \n" + + " abc\n" + + " abc\n" + + " \n" + + " \n" + + " abc\n" + + " abc\n" + + " \n" + + " abc\n" + + " \n" + + " \n" + + " abc\n" + + " \n" + + " \n" + + " abc\n" + + " \n" + + " \n" + + " abc\n" + + " \n" + + " true\n" + + " abc\n" + + " abc\n" + + " \n" + + " abc\n" + + " \n" + + " abc\n" + + " abc\n" + + " \n" + + " \n" + + " abc" + + addSpace(ENCODE_TO_XML_YANG_COMMON_ID, 8) + "\n" + + " \n" + + " abc\n" + + "\n"; + + static final String ENCODE_TO_JSON_RPC_ID = "{\n" + + " \"test_name_of_the_module:input\": {\n" + + " \"name_of_the_cont14\": {\n" + + " \"name_of_the_leaf28\": \"abc\"\n" + + " },\n" + + " \"name_of_the_cont13\": {\n" + + " \"name_of_the_ll9\": [\n" + + " \"abc\",\n" + + " \"abc\"\n" + + " ],\n" + + " \"name_of_the_leaf28\": \"abc\",\n" + + " \"name_of_the_list9\": [\n" + + " {\n" + + " \"name_of_the_leaf27\": \"abc\"\n" + + " },\n" + + " {\n" + + " \"name_of_the_leaf27\": \"abc\"\n" + + " }\n" + + " ]\n" + + " },\n" + + " \"name_of_the_leaf30\": \"abc\",\n" + + " \"name_of_the_ll10\": [\n" + + " \"abc\",\n" + + " \"abc\"\n" + + " ],\n" + + " \"name_of_the_list10\": [\n" + + " {\n" + + " \"name_of_the_leaf29\": \"abc\"\n" + + " },\n" + + " {\n" + + " \"name_of_the_leaf29\": \"abc\"\n" + + " }\n" + + " ],\n" + + " \"name_of_the_cont15\": {\n" + + " \"name_of_the_leaf31\": \"abc\"\n" + + " }\n" + + " }\n" + + "}"; + + static final String DECODE_FROM_JSON_RPC_ID = "{\n" + + " \"test_name_of_the_module:output\": {\n" + + " \"name_of_the_cont16\": {\n" + + " \"name_of_the_leaf32\": \"abc\"\n" + + " },\n" + + " \"name_of_the_list11\": [\n" + + " {\n" + + " \"name_of_the_leaf33\": \"abc\"\n" + + " },\n" + + " {\n" + + " \"name_of_the_leaf33\": \"abc\"\n" + + " }\n" + + " ],\n" + + " \"name_of_the_leaf34\": \"abc\",\n" + + " \"name_of_the_ll11\": [\n" + + " \"abc\",\n" + + " \"abc\"\n" + + " ],\n" + + " \"name_of_the_cont17\": {\n" + + " \"name_of_the_leaf35\": \"abc\"\n" + + " },\n" + + " \"name_of_the_cont13\": {\n" + + " \"name_of_the_cont12\": {\n" + + " \"name_of_the_leaf26\": \"abc\"\n" + + " },\n" + + " \"name_of_the_list9\": [\n" + + " {\n" + + " \"name_of_the_leaf27\": \"abc\"\n" + + " },\n" + + " {\n" + + " \"name_of_the_leaf27\": \"abc\"\n" + + " }\n" + + " ],\n" + + " \"name_of_the_ll9\": [\n" + + " \"abc\",\n" + + " \"abc\"\n" + + " ],\n" + + " \"name_of_the_leaf28\": \"abc\"\n" + + " }\n" + + " }\n" + + "}"; + + static final String ENCODE_TO_XML_RPC_ID = "\n" + + "\n" + + " \n" + + " abc\n" + + " \n" + + " \n" + + " abc\n" + + " abc\n" + + " abc\n" + + " \n" + + " abc\n" + + " \n" + + " \n" + + " abc\n" + + " \n" + + " \n" + + " abc\n" + + " abc\n" + + " abc\n" + + " \n" + + " abc\n" + + " \n" + + " \n" + + " abc\n" + + " \n" + + " \n" + + " abc\n" + + " \n" + + "\n"; + + static final String DECODE_FROM_XML_RPC_ID = "\n" + + "\n" + + " \n" + + " abc\n" + + " \n" + + " \n" + + " abc\n" + + " \n" + + " \n" + + " abc\n" + + " \n" + + " abc\n" + + " abc\n" + + " abc\n" + + " \n" + + " abc\n" + + " \n" + + " \n" + + " \n" + + " abc\n" + + " \n" + + " \n" + + " abc\n" + + " \n" + + " \n" + + " abc\n" + + " \n" + + " abc\n" + + " abc\n" + + " abc\n" + + " \n" + + ""; +} diff --git a/restconf-client/provider/src/test/java/org/onap/ccsdk/sli/plugins/yangserializers/pnserializer/PropertiesSerializerTest.java b/restconf-client/provider/src/test/java/org/onap/ccsdk/sli/plugins/yangserializers/pnserializer/PropertiesSerializerTest.java index dc0da6f7c..c3a6b4ea8 100644 --- a/restconf-client/provider/src/test/java/org/onap/ccsdk/sli/plugins/yangserializers/pnserializer/PropertiesSerializerTest.java +++ b/restconf-client/provider/src/test/java/org/onap/ccsdk/sli/plugins/yangserializers/pnserializer/PropertiesSerializerTest.java @@ -19,15 +19,6 @@ */ package org.onap.ccsdk.sli.plugins.yangserializers.pnserializer; -import org.junit.Before; -import org.junit.Test; - -import org.onap.ccsdk.sli.core.sli.SvcLogicException; -import org.opendaylight.restconf.common.context.InstanceIdentifierContext; -import org.opendaylight.restconf.nb.rfc8040.utils.parser.ParserIdentifier; -import org.opendaylight.yangtools.yang.model.api.SchemaContext; -import org.opendaylight.yangtools.yang.test.util.YangParserTestUtils; - import java.io.File; import java.io.FileNotFoundException; import java.util.ArrayList; @@ -37,6 +28,14 @@ import java.util.LinkedList; import java.util.List; import java.util.Map; +import org.junit.Before; +import org.junit.Test; +import org.onap.ccsdk.sli.core.sli.SvcLogicException; +import org.opendaylight.restconf.common.context.InstanceIdentifierContext; +import org.opendaylight.restconf.nb.rfc8040.utils.parser.ParserIdentifier; +import org.opendaylight.yangtools.yang.model.api.SchemaContext; +import org.opendaylight.yangtools.yang.test.util.YangParserTestUtils; + import static org.hamcrest.MatcherAssert.assertThat; import static org.hamcrest.Matchers.is; import static org.junit.Assert.assertTrue; @@ -53,39 +52,39 @@ public final class PropertiesSerializerTest { public void testBasicConstructs() throws SvcLogicException { String uri = "test-yang:cont1/cont2"; Map params = new HashMap<>(); - params.put("test-yang:cont1.cont2.cont3.leaf10", "abc"); - params.put("test-yang:cont1.cont2.list1[0].leaf1", "abc"); - params.put("test-yang:cont1.cont2.list1[0].leaf2", "abc"); - params.put("test-yang:cont1.cont2.list1[0].leaf3", "abc"); - params.put("test-yang:cont1.cont2.list1[0].ll1[0]", "abc"); - params.put("test-yang:cont1.cont2.list1[0].ll1[1]", "abc"); - params.put("test-yang:cont1.cont2.list1[0].ll2[0]", "abc"); - params.put("test-yang:cont1.cont2.list1[0].ll2[1]", "abc"); - params.put("test-yang:cont1.cont2.list1[0].cont4.leaf11", "abc"); - params.put("test-yang:cont1.cont2.list1[0].list4[0].leaf8", "abc"); - params.put("test-yang:cont1.cont2.list1[0].list4[1].leaf8", "abc"); - params.put("test-yang:cont1.cont2.list1[0].list5[0].leaf9", "abc"); - params.put("test-yang:cont1.cont2.list1[0].list5[1].leaf9", "abc"); - params.put("test-yang:cont1.cont2.list1[1].leaf1", "abc"); - params.put("test-yang:cont1.cont2.list1[1].leaf2", "abc"); - params.put("test-yang:cont1.cont2.list1[1].leaf3", "abc"); - params.put("test-yang:cont1.cont2.list1[1].ll1[0]", "abc"); - params.put("test-yang:cont1.cont2.list1[1].ll1[1]", "abc"); - params.put("test-yang:cont1.cont2.list1[1].ll2[0]", "abc"); - params.put("test-yang:cont1.cont2.list1[1].ll2[1]", "abc"); - params.put("test-yang:cont1.cont2.list1[1].cont4.leaf11", "abc"); - params.put("test-yang:cont1.cont2.list1[1].list4[0].leaf8", "abc"); - params.put("test-yang:cont1.cont2.list1[1].list4[1].leaf8", "abc"); - params.put("test-yang:cont1.cont2.list1[1].list5[0].leaf9", "abc"); - params.put("test-yang:cont1.cont2.list1[1].list5[1].leaf9", "abc"); - params.put("test-yang:cont1.cont2.list2[0].leaf4", "abc"); - params.put("test-yang:cont1.cont2.list2[1].leaf4", "abc"); - params.put("test-yang:cont1.cont2.leaf5", "abc"); - params.put("test-yang:cont1.cont2.leaf6", "abc"); - params.put("test-yang:cont1.cont2.ll3[0]", "abc"); - params.put("test-yang:cont1.cont2.ll3[1]", "abc"); - params.put("test-yang:cont1.cont2.ll4[0]", "abc"); - params.put("test-yang:cont1.cont2.ll4[1]", "abc"); + params.put("test-yang_cont1.cont2.cont3.leaf10", "abc"); + params.put("test-yang_cont1.cont2.list1[0].leaf1", "abc"); + params.put("test-yang_cont1.cont2.list1[0].leaf2", "abc"); + params.put("test-yang_cont1.cont2.list1[0].leaf3", "abc"); + params.put("test-yang_cont1.cont2.list1[0].ll1[0]", "abc"); + params.put("test-yang_cont1.cont2.list1[0].ll1[1]", "abc"); + params.put("test-yang_cont1.cont2.list1[0].ll2[0]", "abc"); + params.put("test-yang_cont1.cont2.list1[0].ll2[1]", "abc"); + params.put("test-yang_cont1.cont2.list1[0].cont4.leaf11", "abc"); + params.put("test-yang_cont1.cont2.list1[0].list4[0].leaf8", "abc"); + params.put("test-yang_cont1.cont2.list1[0].list4[1].leaf8", "abc"); + params.put("test-yang_cont1.cont2.list1[0].list5[0].leaf9", "abc"); + params.put("test-yang_cont1.cont2.list1[0].list5[1].leaf9", "abc"); + params.put("test-yang_cont1.cont2.list1[1].leaf1", "abc"); + params.put("test-yang_cont1.cont2.list1[1].leaf2", "abc"); + params.put("test-yang_cont1.cont2.list1[1].leaf3", "abc"); + params.put("test-yang_cont1.cont2.list1[1].ll1[0]", "abc"); + params.put("test-yang_cont1.cont2.list1[1].ll1[1]", "abc"); + params.put("test-yang_cont1.cont2.list1[1].ll2[0]", "abc"); + params.put("test-yang_cont1.cont2.list1[1].ll2[1]", "abc"); + params.put("test-yang_cont1.cont2.list1[1].cont4.leaf11", "abc"); + params.put("test-yang_cont1.cont2.list1[1].list4[0].leaf8", "abc"); + params.put("test-yang_cont1.cont2.list1[1].list4[1].leaf8", "abc"); + params.put("test-yang_cont1.cont2.list1[1].list5[0].leaf9", "abc"); + params.put("test-yang_cont1.cont2.list1[1].list5[1].leaf9", "abc"); + params.put("test-yang_cont1.cont2.list2[0].leaf4", "abc"); + params.put("test-yang_cont1.cont2.list2[1].leaf4", "abc"); + params.put("test-yang_cont1.cont2.leaf5", "abc"); + params.put("test-yang_cont1.cont2.leaf6", "abc"); + params.put("test-yang_cont1.cont2.ll3[0]", "abc"); + params.put("test-yang_cont1.cont2.ll3[1]", "abc"); + params.put("test-yang_cont1.cont2.ll4[0]", "abc"); + params.put("test-yang_cont1.cont2.ll4[1]", "abc"); InstanceIdentifierContext iCtx = ParserIdentifier .toInstanceIdentifier(uri, context, null); @@ -283,18 +282,18 @@ public final class PropertiesSerializerTest { public void testAugment() throws SvcLogicException { String uri = "test-yang:cont1/cont2"; Map params = new HashMap<>(); - params.put("test-yang:cont1.cont2.cont4.leaf10", "abc"); - params.put("test-yang:cont1.cont2.cont4.test-augment:cont5.leaf13", "abc"); - params.put("test-yang:cont1.cont2.cont4.test-augment:list7[0].leaf14", "abc"); - params.put("test-yang:cont1.cont2.cont4.test-augment:list7[1].leaf14", "abc"); - params.put("test-yang:cont1.cont2.cont4.test-augment:leaf15", "abc"); - params.put("test-yang:cont1.cont2.cont4.test-augment:ll6[0]", "abc"); - params.put("test-yang:cont1.cont2.cont4.test-augment:ll6[1]", "abc"); - params.put("test-yang:cont1.cont2.list6[0].leaf11", "abc"); - params.put("test-yang:cont1.cont2.list6[1].leaf11", "abc"); - params.put("test-yang:cont1.cont2.leaf12", "abc"); - params.put("test-yang:cont1.cont2.ll5[0]", "abc"); - params.put("test-yang:cont1.cont2.ll5[1]", "abc"); + params.put("test-yang_cont1.cont2.cont4.leaf10", "abc"); + params.put("test-yang_cont1.cont2.cont4.test-augment_cont5.leaf13", "abc"); + params.put("test-yang_cont1.cont2.cont4.test-augment_list7[0].leaf14", "abc"); + params.put("test-yang_cont1.cont2.cont4.test-augment_list7[1].leaf14", "abc"); + params.put("test-yang_cont1.cont2.cont4.test-augment_leaf15", "abc"); + params.put("test-yang_cont1.cont2.cont4.test-augment_ll6[0]", "abc"); + params.put("test-yang_cont1.cont2.cont4.test-augment_ll6[1]", "abc"); + params.put("test-yang_cont1.cont2.list6[0].leaf11", "abc"); + params.put("test-yang_cont1.cont2.list6[1].leaf11", "abc"); + params.put("test-yang_cont1.cont2.leaf12", "abc"); + params.put("test-yang_cont1.cont2.ll5[0]", "abc"); + params.put("test-yang_cont1.cont2.ll5[1]", "abc"); InstanceIdentifierContext iCtx = ParserIdentifier .toInstanceIdentifier(uri, context, null); @@ -397,12 +396,12 @@ public final class PropertiesSerializerTest { public void testChoiceCase1() throws SvcLogicException { String uri = "test-yang:cont8"; Map params = new HashMap<>(); - params.put("test-yang:cont8.cont6.leaf16", "abc"); - params.put("test-yang:cont8.list8[0].leaf18", "abc"); - params.put("test-yang:cont8.list8[1].leaf18", "abc"); - params.put("test-yang:cont8.leaf19", "abc"); - params.put("test-yang:cont8.ll7[0]", "abc"); - params.put("test-yang:cont8.ll7[1]", "abc"); + params.put("test-yang_cont8.cont6.leaf16", "abc"); + params.put("test-yang_cont8.list8[0].leaf18", "abc"); + params.put("test-yang_cont8.list8[1].leaf18", "abc"); + params.put("test-yang_cont8.leaf19", "abc"); + params.put("test-yang_cont8.ll7[0]", "abc"); + params.put("test-yang_cont8.ll7[1]", "abc"); InstanceIdentifierContext iCtx = ParserIdentifier .toInstanceIdentifier(uri, context, null); @@ -459,9 +458,9 @@ public final class PropertiesSerializerTest { public void testChoiceCase2() throws SvcLogicException { String uri = "test-yang:cont9"; Map params = new HashMap<>(); - params.put("test-yang:cont9.leaf20", "abc"); - params.put("test-yang:cont9.ll8[0]", "abc"); - params.put("test-yang:cont9.cont11.leaf25", "abc"); + params.put("test-yang_cont9.leaf20", "abc"); + params.put("test-yang_cont9.ll8[0]", "abc"); + params.put("test-yang_cont9.cont11.leaf25", "abc"); InstanceIdentifierContext iCtx = ParserIdentifier .toInstanceIdentifier(uri, context, null); @@ -499,7 +498,7 @@ public final class PropertiesSerializerTest { public void testChoiceCase3() throws SvcLogicException { String uri = "test-yang:cont8/cont6"; Map params = new HashMap<>(); - params.put("test-yang:cont8.cont6.test-augment:leaf21", "abc"); + params.put("test-yang_cont8.cont6.test-augment_leaf21", "abc"); InstanceIdentifierContext iCtx = ParserIdentifier .toInstanceIdentifier(uri, context, null); @@ -538,10 +537,10 @@ public final class PropertiesSerializerTest { public void testGrouping() throws SvcLogicException { String uri = "test-yang:cont13"; Map params = new HashMap<>(); - params.put("test-yang:cont13.cont12.leaf26", "abc"); - params.put("test-yang:cont13.list9[0].leaf27", "abc"); - params.put("test-yang:cont13.leaf28", "abc"); - params.put("test-yang:cont13.ll9[0]", "abc"); + params.put("test-yang_cont13.cont12.leaf26", "abc"); + params.put("test-yang_cont13.list9[0].leaf27", "abc"); + params.put("test-yang_cont13.leaf28", "abc"); + params.put("test-yang_cont13.ll9[0]", "abc"); InstanceIdentifierContext iCtx = ParserIdentifier .toInstanceIdentifier(uri, context, null); @@ -587,11 +586,11 @@ public final class PropertiesSerializerTest { public void testGrouping2() throws SvcLogicException { String uri = "test-yang:cont9/cont11"; Map params = new HashMap<>(); - params.put("test-yang:cont9.cont11.leaf25", "abc"); - params.put("test-yang:cont9.cont11.cont13.cont12.leaf26", "abc"); - params.put("test-yang:cont9.cont11.cont13.list9[0].leaf27", "abc"); - params.put("test-yang:cont9.cont11.cont13.leaf28", "abc"); - params.put("test-yang:cont9.cont11.cont13.ll9[0]", "abc"); + params.put("test-yang_cont9.cont11.leaf25", "abc"); + params.put("test-yang_cont9.cont11.cont13.cont12.leaf26", "abc"); + params.put("test-yang_cont9.cont11.cont13.list9[0].leaf27", "abc"); + params.put("test-yang_cont9.cont11.cont13.leaf28", "abc"); + params.put("test-yang_cont9.cont11.cont13.ll9[0]", "abc"); InstanceIdentifierContext iCtx = ParserIdentifier .toInstanceIdentifier(uri, context, null); PropertiesNodeSerializer ser = new MdsalPropertiesNodeSerializer( @@ -642,10 +641,10 @@ public final class PropertiesSerializerTest { public void testGrouping3() throws SvcLogicException { String uri = "test-augment:cont13"; Map params = new HashMap<>(); - params.put("test-augment:cont13.cont12.leaf26", "abc"); - params.put("test-augment:cont13.list9[0].leaf27", "abc"); - params.put("test-augment:cont13.leaf28", "abc"); - params.put("test-augment:cont13.ll9[0]", "abc"); + params.put("test-augment_cont13.cont12.leaf26", "abc"); + params.put("test-augment_cont13.list9[0].leaf27", "abc"); + params.put("test-augment_cont13.leaf28", "abc"); + params.put("test-augment_cont13.ll9[0]", "abc"); InstanceIdentifierContext iCtx = ParserIdentifier .toInstanceIdentifier(uri, context, null); PropertiesNodeSerializer ser = new MdsalPropertiesNodeSerializer( @@ -693,10 +692,10 @@ public final class PropertiesSerializerTest { public void testGrouping4() throws SvcLogicException { String uri = "test-yang:cont1/cont2/cont4"; Map params = new HashMap<>(); - params.put("test-yang:cont1.cont2.cont4.test-augment:cont13.cont12.leaf26", "abc"); - params.put("test-yang:cont1.cont2.cont4.test-augment:cont13.list9[0].leaf27", "abc"); - params.put("test-yang:cont1.cont2.cont4.test-augment:cont13.leaf28", "abc"); - params.put("test-yang:cont1.cont2.cont4.test-augment:cont13.ll9[0]", "abc"); + params.put("test-yang_cont1.cont2.cont4.test-augment_cont13.cont12.leaf26", "abc"); + params.put("test-yang_cont1.cont2.cont4.test-augment_cont13.list9[0].leaf27", "abc"); + params.put("test-yang_cont1.cont2.cont4.test-augment_cont13.leaf28", "abc"); + params.put("test-yang_cont1.cont2.cont4.test-augment_cont13.ll9[0]", "abc"); InstanceIdentifierContext iCtx = ParserIdentifier .toInstanceIdentifier(uri, context, null); @@ -755,16 +754,16 @@ public final class PropertiesSerializerTest { public void testRpcInput() throws SvcLogicException { String uri = "test-yang:create-sfc"; Map params = new HashMap<>(); - params.put("test-yang:create-sfc.input.cont14.leaf28", "abc"); - params.put("test-yang:create-sfc.input.list10[0].leaf29", "abc"); - params.put("test-yang:create-sfc.input.leaf30", "abc"); - params.put("test-yang:create-sfc.input.ll10[0]", "abc"); - params.put("test-yang:create-sfc.input.cont15.leaf31", "abc"); - params.put("test-yang:create-sfc.input.cont13.cont12.leaf26", "abc"); - params.put("test-yang:create-sfc.input.cont13.list9[0].leaf27", "abc"); - params.put("test-yang:create-sfc.input.cont13.leaf28", "abc"); - params.put("test-yang:create-sfc.input.cont13.ll9[0]", "abc"); - params.put("test-yang:create-sfc.input.test-augment:leaf36", "abc"); + params.put("test-yang_create-sfc.input.cont14.leaf28", "abc"); + params.put("test-yang_create-sfc.input.list10[0].leaf29", "abc"); + params.put("test-yang_create-sfc.input.leaf30", "abc"); + params.put("test-yang_create-sfc.input.ll10[0]", "abc"); + params.put("test-yang_create-sfc.input.cont15.leaf31", "abc"); + params.put("test-yang_create-sfc.input.cont13.cont12.leaf26", "abc"); + params.put("test-yang_create-sfc.input.cont13.list9[0].leaf27", "abc"); + params.put("test-yang_create-sfc.input.cont13.leaf28", "abc"); + params.put("test-yang_create-sfc.input.cont13.ll9[0]", "abc"); + params.put("test-yang_create-sfc.input.test-augment_leaf36", "abc"); InstanceIdentifierContext iCtx = ParserIdentifier .toInstanceIdentifier(uri, context, null); @@ -869,16 +868,16 @@ public final class PropertiesSerializerTest { public void testRpcOutput() throws SvcLogicException { String uri = "test-yang:create-sfc"; Map params = new HashMap<>(); - params.put("test-yang:create-sfc.output.cont16.leaf32", "abc"); - params.put("test-yang:create-sfc.output.list11[0].leaf33", "abc"); - params.put("test-yang:create-sfc.output.leaf34", "abc"); - params.put("test-yang:create-sfc.output.ll11[0]", "abc"); - params.put("test-yang:create-sfc.output.cont17.leaf35", "abc"); - params.put("test-yang:create-sfc.output.cont13.cont12.leaf26", "abc"); - params.put("test-yang:create-sfc.output.cont13.list9[0].leaf27", "abc"); - params.put("test-yang:create-sfc.output.cont13.leaf28", "abc"); - params.put("test-yang:create-sfc.output.cont13.ll9[0]", "abc"); - params.put("test-yang:create-sfc.output.test-augment:leaf37", "abc"); + params.put("test-yang_create-sfc.output.cont16.leaf32", "abc"); + params.put("test-yang_create-sfc.output.list11[0].leaf33", "abc"); + params.put("test-yang_create-sfc.output.leaf34", "abc"); + params.put("test-yang_create-sfc.output.ll11[0]", "abc"); + params.put("test-yang_create-sfc.output.cont17.leaf35", "abc"); + params.put("test-yang_create-sfc.output.cont13.cont12.leaf26", "abc"); + params.put("test-yang_create-sfc.output.cont13.list9[0].leaf27", "abc"); + params.put("test-yang_create-sfc.output.cont13.leaf28", "abc"); + params.put("test-yang_create-sfc.output.cont13.ll9[0]", "abc"); + params.put("test-yang_create-sfc.output.test-augment_leaf37", "abc"); InstanceIdentifierContext iCtx = ParserIdentifier .toInstanceIdentifier(uri, context, null); @@ -983,10 +982,10 @@ public final class PropertiesSerializerTest { public void testContainerSameName() throws SvcLogicException { String uri = "test-yang:cont18"; Map params = new HashMap<>(); - params.put("test-yang:cont18.cont18.list12[0].list12[0].leaf36", "abc"); - params.put("test-yang:cont18.cont18.list12[0].leaf36", "hi"); - params.put("test-yang:cont18.cont18.list12[1].list12[0].leaf36", "xyz"); - params.put("test-yang:cont18.cont18.list12[1].list12[1].leaf36", "hey!"); + params.put("test-yang_cont18.cont18.list12[0].list12[0].leaf36", "abc"); + params.put("test-yang_cont18.cont18.list12[0].leaf36", "hi"); + params.put("test-yang_cont18.cont18.list12[1].list12[0].leaf36", "xyz"); + params.put("test-yang_cont18.cont18.list12[1].list12[1].leaf36", "hey!"); InstanceIdentifierContext iCtx = ParserIdentifier .toInstanceIdentifier(uri, context, null); @@ -1055,9 +1054,9 @@ public final class PropertiesSerializerTest { public void testPropertiesWithoutSchema() throws SvcLogicException { String uri = "test-yang:cont18"; Map params = new HashMap<>(); - params.put("test-yang:cont18.leaf40", "abc"); + params.put("test-yang_cont18.leaf40", "abc"); params.put("leaf41", "hi"); - params.put("test-yang:cont18.leaf41", "abc"); + params.put("test-yang_cont18.leaf41", "abc"); InstanceIdentifierContext iCtx = ParserIdentifier .toInstanceIdentifier(uri, context, null); @@ -1075,11 +1074,12 @@ public final class PropertiesSerializerTest { public void testIdentityRef() throws SvcLogicException { String uri = "identity-test:test"; Map params = new HashMap<>(); - params.put("identity-test:test.con1.interface", "identity-types:physical"); - params.put("identity-test:test.con1.interfaces.int-list[0].iden", "identity-test:Giga"); - params.put("identity-test:test.con1.interfaces.int-list[0].available.ll[0]", "identity-types:Loopback"); - params.put("identity-test:test.con1.interfaces.int-list[0].available.leaf1", "identity-types-second:Ethernet"); - params.put("identity-test:test.con1.interfaces.int-list[0].available.leaf2", "identity-types-second:iden2"); + params.put("identity-test_test.con1.interface", "identity-types" + + ":physical"); + params.put("identity-test_test.con1.interfaces.int-list[0].iden", "identity-test:Giga"); + params.put("identity-test_test.con1.interfaces.int-list[0].available.ll[0]", "identity-types:Loopback"); + params.put("identity-test_test.con1.interfaces.int-list[0].available.leaf1", "identity-types-second:Ethernet"); + params.put("identity-test_test.con1.interfaces.int-list[0].available.leaf2", "identity-types-second:iden2"); InstanceIdentifierContext iCtx = ParserIdentifier .toInstanceIdentifier(uri, context, null); diff --git a/restconf-client/provider/src/test/resources/yang/test_augment_1_for_module.yang b/restconf-client/provider/src/test/resources/yang/test_augment_1_for_module.yang new file mode 100644 index 000000000..d2eeea7d1 --- /dev/null +++ b/restconf-client/provider/src/test/resources/yang/test_augment_1_for_module.yang @@ -0,0 +1,108 @@ +module test_augment_1_for_module { + yang-version 1; + namespace "urn:opendaylight:params:xml:ns:yang:test:augment:name"; + prefix "augment-name"; + + import test_name_of_the_module { + prefix aug; + } + + revision "2015-01-05" { + description "Initial revision of hello model"; + } + + augment "/aug:name_of_the_cont1/aug:name_of_the_cont2/aug:name_of_the_cont4" { + container name_of_the_cont5 { + leaf name_of_the_leaf13 { + type empty; + } + } + list name_of_the_list7 { + leaf name_of_the_leaf14 { + type instance-identifier; + } + } + leaf name_of_the_leaf15 { + type string; + } + leaf-list name_of_the_ll6 { + type union { + type int32; + type enumeration { + enum "unbounded"; + } + } + } + uses "aug:name_of_the_g1"; + } + + uses "aug:name_of_the_g1"; + + augment "/aug:name_of_the_cont1/aug:name_of_the_cont2/aug:name_of_the_cont3" { + choice name_of_the_ch2 { + case name_of_the_c3 { + leaf name_of_the_leaf21 { + type string; + } + } + case name_of_the_c4 { + leaf name_of_the_leaf22 { + type enumeration { + enum zero; + enum one; + enum seven { + value 7; + } + } + } + } + } + } + + augment "/aug:name_of_the_ch1" { + case name_of_the_c5 { + container name_of_the_cont10 { + leaf name_of_the_leaf23 { + type string; + } + } + } + } + + augment "/aug:name_of_the_ch1/aug:name_of_the_c1" { + container name_of_the_cont7 { + leaf name_of_the_leaf24 { + type string; + } + } + } + + augment "/aug:name_of_the_cont13/aug:name_of_the_cont12" { + leaf name_of_the_leaf29 { + type string; + } + } + + augment "/aug:name_of_the_create-sfc/aug:input" { + leaf name_of_the_leaf36 { + type bits { + bit angle { + position 0; + } + bit degree { + position 1; + } + bit movement { + position 2; + } + } + } + } + + augment "/aug:name_of_the_create-sfc/aug:output" { + leaf leaf37 { + type boolean; + } + } + +} \ No newline at end of file diff --git a/restconf-client/provider/src/test/resources/yang/test_name_of_the_module.yang b/restconf-client/provider/src/test/resources/yang/test_name_of_the_module.yang new file mode 100644 index 000000000..973475ee7 --- /dev/null +++ b/restconf-client/provider/src/test/resources/yang/test_name_of_the_module.yang @@ -0,0 +1,231 @@ +module test_name_of_the_module { + yang-version 1; + namespace "urn:opendaylight:params:xml:ns:yang:test:name"; + prefix "name"; + + revision "2015-01-05" { + description "Initial revision of hello model"; + } + + container name_of_the_cont1 { + container name_of_the_cont2 { + container name_of_the_cont3 { + leaf name_of_the_leaf10 { + type string; + } + } + list name_of_the_list1 { + key "name_of_the_leaf1 name_of_the_leaf2"; + leaf name_of_the_leaf1 { + type empty; + } + leaf name_of_the_leaf2 { + type string; + } + leaf name_of_the_leaf3 { + type string; + } + leaf-list name_of_the_ll1 { + type string; + } + leaf-list name_of_the_ll2 { + type string; + } + container name_of_the_cont4 { + leaf name_of_the_leaf11 { + type string; + } + } + list name_of_the_list4 { + leaf name_of_the_leaf8 { + type string; + } + } + list name_of_the_list5 { + leaf name_of_the_leaf9 { + type string; + } + } + } + list name_of_the_list2 { + leaf name_of_the_leaf4 { + type string; + } + } + leaf name_of_the_leaf5 { + type string; + } + leaf name_of_the_leaf6 { + type string; + } + leaf-list name_of_the_ll3 { + type string; + } + leaf-list name_of_the_ll4 { + type string; + } + } + } + + augment "/name_of_the_cont1/name_of_the_cont2" { + container name_of_the_cont4 { + leaf name_of_the_leaf10 { + type string; + } + } + list name_of_the_list6 { + leaf name_of_the_leaf11 { + type string; + } + } + leaf name_of_the_leaf12 { + type string; + } + leaf-list name_of_the_ll5 { + type string; + } + } + + choice name_of_the_ch1 { + case name_of_the_c1 { + container name_of_the_cont8 { + container name_of_the_cont6 { + leaf name_of_the_leaf16 { + type string; + } + } + list name_of_the_list8 { + leaf name_of_the_leaf18 { + type string; + } + } + leaf name_of_the_leaf19 { + type string; + } + leaf-list name_of_the_ll7 { + type string; + } + } + } + case name_of_the_c2 { + container name_of_the_cont9 { + leaf name_of_the_leaf20 { + type string; + } + leaf-list name_of_the_ll8 { + type string; + } + container name_of_the_cont11 { + choice name_of_the_ch3 { + case name_of_the_c1 { + leaf name_of_the_leaf25 { + type string; + } + uses name_of_the_g1; + } + } + } + } + } + } + + grouping name_of_the_g1 { + container name_of_the_cont13 { + container name_of_the_cont12 { + leaf name_of_the_leaf26 { + type string; + } + } + list name_of_the_list9 { + leaf name_of_the_leaf27 { + type string; + } + } + leaf name_of_the_leaf28 { + type string; + } + leaf-list name_of_the_ll9 { + type string; + } + } + } + + uses name_of_the_g1; + + rpc name_of_the_create-sfc { + input { + container name_of_the_cont14 { + leaf name_of_the_leaf28 { + type string; + } + } + list name_of_the_list10 { + leaf name_of_the_leaf29 { + type string; + } + } + leaf name_of_the_leaf30 { + type string; + } + leaf-list name_of_the_ll10 { + type string; + } + choice name_of_the_ch3 { + case name_of_the_c1 { + container name_of_the_cont15 { + leaf name_of_the_leaf31 { + type string; + } + } + } + } + uses name_of_the_g1; + } + output { + container name_of_the_cont16 { + leaf name_of_the_leaf32 { + type string; + } + } + list name_of_the_list11 { + leaf name_of_the_leaf33 { + type string; + } + } + leaf name_of_the_leaf34 { + type string; + } + leaf-list name_of_the_ll11 { + type string; + } + choice name_of_the_ch4 { + case name_of_the_c1 { + container name_of_the_cont17 { + leaf name_of_the_leaf35 { + type string; + } + } + } + } + uses name_of_the_g1; + } + } + + container name_of_the_cont18 { + container name_of_the_cont18 { + list name_of_the_list12 { + list name_of_the_list12 { + leaf name_of_the_leaf36 { + type string; + } + } + leaf name_of_the_leaf36 { + type string; + } + } + } + leaf name_of_the_leaf40 { + type string; + } + } +} \ No newline at end of file -- cgit 1.2.3-korg From 0570deb66e8815ad78a486516ebe5273b3238e78 Mon Sep 17 00:00:00 2001 From: Vidyashree Rama Date: Wed, 17 Apr 2019 09:10:56 +0530 Subject: Code refactoring in restconf client yang serialisers. 1. logging the exception when handling underscore in yang serialisers 2. Refactor code to not nest more than 3 if/for statements 3. Throw SvcLogicException instead of generic 4. Reduce switch case number of lines from 8 to at most 5 Issue-ID: CCSDK-1236 Change-Id: Ic02ba424c2d1748d071e38d25ae159f5d8bd6451 Signed-off-by: Vidyashree Rama --- .../MdsalPropertiesNodeSerializer.java | 51 ++++++++++++++++------ .../pnserializer/MdsalPropertiesNodeUtils.java | 31 ++++++++----- 2 files changed, 58 insertions(+), 24 deletions(-) (limited to 'restconf-client/provider') diff --git a/restconf-client/provider/src/main/java/org/onap/ccsdk/sli/plugins/yangserializers/pnserializer/MdsalPropertiesNodeSerializer.java b/restconf-client/provider/src/main/java/org/onap/ccsdk/sli/plugins/yangserializers/pnserializer/MdsalPropertiesNodeSerializer.java index 759fe802e..0eca40d06 100644 --- a/restconf-client/provider/src/main/java/org/onap/ccsdk/sli/plugins/yangserializers/pnserializer/MdsalPropertiesNodeSerializer.java +++ b/restconf-client/provider/src/main/java/org/onap/ccsdk/sli/plugins/yangserializers/pnserializer/MdsalPropertiesNodeSerializer.java @@ -29,6 +29,8 @@ import org.opendaylight.yangtools.yang.model.api.Module; import org.opendaylight.yangtools.yang.model.api.SchemaContext; import org.opendaylight.yangtools.yang.model.api.SchemaNode; import org.opendaylight.yangtools.yang.model.util.SchemaContextUtil; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; import static org.onap.ccsdk.sli.plugins.yangserializers.pnserializer.MdsalPropertiesNodeUtils.DOT_REGEX; import static org.onap.ccsdk.sli.plugins.yangserializers.pnserializer.MdsalPropertiesNodeUtils.SLASH; @@ -52,6 +54,8 @@ import static org.onap.ccsdk.sli.plugins.yangserializers.pnserializer.NodeType.S */ public class MdsalPropertiesNodeSerializer extends PropertiesNodeSerializer { + private static final Logger log = LoggerFactory.getLogger( + MdsalPropertiesNodeSerializer.class); private SchemaNode curSchema; private PropertiesNode node; @@ -111,6 +115,8 @@ public class MdsalPropertiesNodeSerializer extends PropertiesNodeSerializer childsFromAugmentation = parent - .augmentations().get(augSchema); - if (!childsFromAugmentation.isEmpty()) { - for (PropertiesNode pNode : childsFromAugmentation) { - if (pNode.name().equals(name)) { - return pNode; - } + if (augSchema == null) { + return null; + } + + Collection childsFromAugmentation = parent + .augmentations().get(augSchema); + if (!childsFromAugmentation.isEmpty()) { + for (PropertiesNode pNode : childsFromAugmentation) { + if (pNode.name().equals(name)) { + return pNode; } } } + return null; } @@ -218,10 +221,12 @@ public final class MdsalPropertiesNodeUtils { * @param appInfo application info * @param type node type * @return new properties node + * @throws SvcLogicException exception while creating properties node */ public static PropertiesNode createNode(String name, Namespace namespace, String uri, PropertiesNode parent, - Object appInfo, NodeType type) { + Object appInfo, NodeType type) + throws SvcLogicException { switch (type) { case SINGLE_INSTANCE_NODE: return new SingleInstanceNode(name, namespace, uri, parent, appInfo, type); @@ -230,7 +235,7 @@ public final class MdsalPropertiesNodeUtils { case MULTI_INSTANCE_LEAF_HOLDER_NODE: return new LeafListHolderNode(name, namespace, uri, parent, appInfo, type); default: - throw new RuntimeException("Invalid node type"); + throw new SvcLogicException("Invalid node type " + type); } } @@ -265,6 +270,9 @@ public final class MdsalPropertiesNodeUtils { return new SchemaPathHolder(id, uri1); } catch (IllegalArgumentException | RestconfDocumentedException | NullPointerException e) { + log.info("Exception while converting uri to instance identifier" + + " context. Process each node in uri to get instance identifier" + + " context " + e); return processNodesAndAppendPath(uri, context); } } @@ -294,6 +302,7 @@ public final class MdsalPropertiesNodeUtils { try { id = processIdentifier(uriParts[i], context, actPath); } catch (IllegalArgumentException e) { + log.info(format(EXC_MSG, e)); id.setUri(actPath+ uriParts[i] + sec); return id; } @@ -340,7 +349,7 @@ public final class MdsalPropertiesNodeUtils { return new SchemaPathHolder(id, val); } catch (IllegalArgumentException | RestconfDocumentedException | NullPointerException e) { - log.info(format(INFO_MSG, val)); + log.info(format(INFO_MSG, val, e)); } firstHalf.append(values[i]).append(UNDERSCORE); secondHalf = secondHalf.replaceFirst( -- cgit 1.2.3-korg From 93c91c2fc80a31585c8f902c86bc4e1faf5b966d Mon Sep 17 00:00:00 2001 From: Vidyashree Rama Date: Tue, 23 Apr 2019 09:29:36 +0530 Subject: Test coverage imporvement and code refactoring of restconf discovery node. Test coverage imporvement and code refactoring of restconf discovery node. Issue-ID: CCSDK-1236 Change-Id: Ic44899d71b92be3d7b88be3abb0feb311e6ad8c0 Signed-off-by: Vidyashree Rama --- .../restconfdiscovery/RestconfDiscoveryNode.java | 48 +++++++++---------- .../TestRestconfDiscoveryNode.java | 56 ++++++++++++++++++---- 2 files changed, 72 insertions(+), 32 deletions(-) (limited to 'restconf-client/provider') diff --git a/restconf-client/provider/src/main/java/org/onap/ccsdk/sli/plugins/restconfdiscovery/RestconfDiscoveryNode.java b/restconf-client/provider/src/main/java/org/onap/ccsdk/sli/plugins/restconfdiscovery/RestconfDiscoveryNode.java index 5c7d695d9..cf69d7a3c 100644 --- a/restconf-client/provider/src/main/java/org/onap/ccsdk/sli/plugins/restconfdiscovery/RestconfDiscoveryNode.java +++ b/restconf-client/provider/src/main/java/org/onap/ccsdk/sli/plugins/restconfdiscovery/RestconfDiscoveryNode.java @@ -141,7 +141,7 @@ public class RestconfDiscoveryNode implements SvcLogicDiscoveryPlugin { WebTarget target = null; try { RestapiCallNode restapi = restconfApiCallNode.getRestapiCallNode(); - p = restapi.getParameters(paramMap, new Parameters()); + p = RestapiCallNode.getParameters(paramMap, new Parameters()); Client client = ignoreSslClient().register(SseFeature.class); target = restapi.addAuthType(client, p).target(url); } catch (SvcLogicException e) { @@ -166,37 +166,37 @@ public class RestconfDiscoveryNode implements SvcLogicDiscoveryPlugin { eventSource.close(); log.info("Closed connection to SSE source"); } - } - - private Client ignoreSslClient() { - SSLContext sslcontext = null; - try { - sslcontext = SSLContext.getInstance("TLS"); - sslcontext.init(null, new TrustManager[]{new X509TrustManager() { - @Override - public void checkClientTrusted(X509Certificate[] arg0, String arg1) throws CertificateException { - } + private Client ignoreSslClient() { + SSLContext sslcontext = null; - @Override - public void checkServerTrusted(X509Certificate[] arg0, String arg1) throws CertificateException { - } + try { + sslcontext = SSLContext.getInstance("TLS"); + sslcontext.init(null, new TrustManager[]{new X509TrustManager() { + @Override + public void checkClientTrusted(X509Certificate[] arg0, String arg1) throws CertificateException { + } + + @Override + public void checkServerTrusted(X509Certificate[] arg0, String arg1) throws CertificateException { + } + + @Override + public X509Certificate[] getAcceptedIssuers() { + return new X509Certificate[0]; + } + } }, new java.security.SecureRandom()); + } catch (NoSuchAlgorithmException | KeyManagementException e) { + throw new IllegalStateException(e); + } - @Override - public X509Certificate[] getAcceptedIssuers() { - return new X509Certificate[0]; - } - } }, new java.security.SecureRandom()); - } catch (NoSuchAlgorithmException | KeyManagementException e) { - throw new IllegalStateException(e); + return ClientBuilder.newBuilder().sslContext(sslcontext).hostnameVerifier((s1, s2) -> true).build(); } - - return ClientBuilder.newBuilder().sslContext(sslcontext).hostnameVerifier((s1, s2) -> true).build(); } protected String getTokenId(String customHttpHeaders) { if (customHttpHeaders.contains("=")) { - String s[] = customHttpHeaders.split("="); + String[] s = customHttpHeaders.split("="); return s[1]; } return customHttpHeaders; diff --git a/restconf-client/provider/src/test/java/org/onap/ccsdk/sli/plugins/restconfdiscovery/TestRestconfDiscoveryNode.java b/restconf-client/provider/src/test/java/org/onap/ccsdk/sli/plugins/restconfdiscovery/TestRestconfDiscoveryNode.java index af354e9bf..aa89d67d7 100644 --- a/restconf-client/provider/src/test/java/org/onap/ccsdk/sli/plugins/restconfdiscovery/TestRestconfDiscoveryNode.java +++ b/restconf-client/provider/src/test/java/org/onap/ccsdk/sli/plugins/restconfdiscovery/TestRestconfDiscoveryNode.java @@ -20,6 +20,7 @@ package org.onap.ccsdk.sli.plugins.restconfdiscovery; +import org.glassfish.grizzly.http.server.HttpServer; import org.glassfish.jersey.grizzly2.httpserver.GrizzlyHttpServerFactory; import org.glassfish.jersey.media.sse.SseFeature; import org.glassfish.jersey.server.ResourceConfig; @@ -29,29 +30,41 @@ import org.onap.ccsdk.sli.core.sli.SvcLogicException; import org.onap.ccsdk.sli.plugins.restapicall.RestapiCallNode; import org.onap.ccsdk.sli.plugins.restconfapicall.RestconfApiCallNode; +import java.io.IOException; import java.net.URI; import java.util.HashMap; import java.util.Map; import static org.hamcrest.MatcherAssert.assertThat; import static org.hamcrest.core.Is.is; +import static org.mockito.Matchers.any; +import static org.mockito.Mockito.doNothing; +import static org.mockito.Mockito.doReturn; +import static org.mockito.Mockito.mock; public class TestRestconfDiscoveryNode { private static final URI CONTEXT = URI.create("http://localhost:8080/"); @Test - public void testEstablishPersistentConnection() throws SvcLogicException, - InterruptedException { + public void sendRequest() throws SvcLogicException, InterruptedException, IOException { final ResourceConfig resourceConfig = new ResourceConfig( SseServerMock.class, SseFeature.class); - GrizzlyHttpServerFactory.createHttpServer(CONTEXT, resourceConfig); + HttpServer server = GrizzlyHttpServerFactory.createHttpServer(CONTEXT, + resourceConfig); + server.start(); + RestconfApiCallNode restconf = mock(RestconfApiCallNode.class); + doNothing().when(restconf) + .sendRequest(any(Map.class), any(SvcLogicContext.class)); + RestapiCallNode restApi = new RestapiCallNode(); + doReturn(restApi).when(restconf).getRestapiCallNode(); + SvcLogicContext ctx = new SvcLogicContext(); ctx.setAttribute("prop.encoding-json", "encoding-json"); ctx.setAttribute("restapi-result.response-code", "200"); ctx.setAttribute("restapi-result.ietf-subscribed-notifications" + ":establish-subscription.output.identifier", - "100"); + "89"); Map p = new HashMap<>(); p.put("sseConnectURL", "http://localhost:8080/events"); @@ -64,11 +77,15 @@ public class TestRestconfDiscoveryNode { "bv5itd6m1cftldpjarnyle3sdcqq9hftc4lebz464b5ffxmlbvg9"); p.put("restapiUrl", "https://localhost:8080/restconf/operations/" + "ietf-subscribed-notifications:establish-subscription"); - RestconfDiscoveryNode rdn = new RestconfDiscoveryNode( - new RestconfApiCallNode(new RestapiCallNode())); - rdn.establishPersistentConnection(p, ctx, "networkId"); - Thread.sleep(2000); + p.put("module", "testmodule"); + p.put("rpc", "testrpc"); + p.put("version", "1.0"); + p.put("mode", "sync"); + RestconfDiscoveryNode rdn = new RestconfDiscoveryNode(restconf); + rdn.establishSubscription(p, ctx); + Thread.sleep(1000); rdn.deleteSubscription(p, ctx); + server.shutdown(); } @Test(expected = SvcLogicException.class) @@ -132,4 +149,27 @@ public class TestRestconfDiscoveryNode { "emlqm4bbsmnar3vrtbyrzukbv5itd6m1cftldpjarnyle3sdcqq9h" + "ftc4lebz464b5ffxmlbvg9")); } + + @Test + public void testSubscriptionInfo() throws SvcLogicException { + SubscriptionInfo info = new SubscriptionInfo(); + info.subscriberId("network-id"); + info.subscriptionId("8"); + info.filterUrl("/ietf-interfaces:interfaces"); + info.yangFilePath("/opt/yang"); + SvcLogicGraphInfo svcLogicGraphInfo = new SvcLogicGraphInfo(); + svcLogicGraphInfo.mode("sync"); + svcLogicGraphInfo.module("testModule"); + svcLogicGraphInfo.rpc("testRpc"); + svcLogicGraphInfo.version("1.0"); + info.callBackDG(svcLogicGraphInfo); + assertThat(info.subscriberId(), is("network-id")); + assertThat(info.subscriptionId(), is("8")); + assertThat(info.filterUrl(), is("/ietf-interfaces:interfaces")); + assertThat(info.yangFilePath(), is("/opt/yang")); + assertThat(info.callBackDG().module(), is("testModule")); + assertThat(info.callBackDG().mode(), is("sync")); + assertThat(info.callBackDG().rpc(), is("testRpc")); + assertThat(info.callBackDG().version(), is("1.0")); + } } -- cgit 1.2.3-korg From 5ddde36ddd17ef3cbcae6df12cd4862998d7f2ad Mon Sep 17 00:00:00 2001 From: "Timoney, Dan (dt5972)" Date: Wed, 24 Apr 2019 13:55:43 -0400 Subject: Update to use released 1.2.2 parent Update to use released 1.2.2 version of parent poms. Change-Id: I303781ad2d8946a942212780884a96c1ac34d75c Issue-ID: CCSDK-1222 Signed-off-by: Timoney, Dan (dt5972) --- artifacts/pom.xml | 2 +- features/ccsdk-sli-plugins-all/pom.xml | 2 +- features/features-sli-plugins/pom.xml | 2 +- features/installer/pom.xml | 2 +- features/pom.xml | 2 +- grToolkit/features/ccsdk-gr-toolkit/pom.xml | 2 +- grToolkit/features/features-gr-toolkit/pom.xml | 2 +- grToolkit/features/pom.xml | 2 +- grToolkit/installer/pom.xml | 2 +- grToolkit/model/pom.xml | 2 +- grToolkit/pom.xml | 2 +- grToolkit/provider/pom.xml | 2 +- pom.xml | 2 +- properties-node/features/ccsdk-properties-node/pom.xml | 2 +- properties-node/features/features-properties-node/pom.xml | 2 +- properties-node/features/pom.xml | 2 +- properties-node/installer/pom.xml | 2 +- properties-node/pom.xml | 2 +- properties-node/provider/pom.xml | 2 +- restapi-call-node/features/ccsdk-restapi-call-node/pom.xml | 2 +- restapi-call-node/features/features-restapi-call-node/pom.xml | 2 +- restapi-call-node/features/pom.xml | 2 +- restapi-call-node/installer/pom.xml | 2 +- restapi-call-node/pom.xml | 2 +- restapi-call-node/provider/pom.xml | 2 +- restconf-client/features/ccsdk-restconf-client/pom.xml | 2 +- restconf-client/features/features-restconf-client/pom.xml | 2 +- restconf-client/features/pom.xml | 2 +- restconf-client/installer/pom.xml | 2 +- restconf-client/pom.xml | 2 +- restconf-client/provider/pom.xml | 2 +- sshapi-call-node/features/ccsdk-sshapi-call-node/pom.xml | 2 +- sshapi-call-node/features/features-sshapi-call-node/pom.xml | 2 +- sshapi-call-node/features/pom.xml | 2 +- sshapi-call-node/installer/pom.xml | 2 +- sshapi-call-node/pom.xml | 2 +- sshapi-call-node/provider/pom.xml | 2 +- template-node/features/ccsdk-template-node/pom.xml | 2 +- template-node/features/features-template-node/pom.xml | 2 +- template-node/features/pom.xml | 2 +- template-node/installer/pom.xml | 2 +- template-node/pom.xml | 2 +- template-node/provider/pom.xml | 2 +- 43 files changed, 43 insertions(+), 43 deletions(-) (limited to 'restconf-client/provider') diff --git a/artifacts/pom.xml b/artifacts/pom.xml index 911a1d6ab..2daa2c5b2 100755 --- a/artifacts/pom.xml +++ b/artifacts/pom.xml @@ -17,7 +17,7 @@ org.onap.ccsdk.parent parent - 1.2.2-SNAPSHOT + 1.2.2 diff --git a/features/ccsdk-sli-plugins-all/pom.xml b/features/ccsdk-sli-plugins-all/pom.xml index c589ba3f0..0ca186002 100644 --- a/features/ccsdk-sli-plugins-all/pom.xml +++ b/features/ccsdk-sli-plugins-all/pom.xml @@ -5,7 +5,7 @@ org.onap.ccsdk.parent single-feature-parent - 1.2.2-SNAPSHOT + 1.2.2 diff --git a/features/features-sli-plugins/pom.xml b/features/features-sli-plugins/pom.xml index aff865f0a..c30fb147a 100644 --- a/features/features-sli-plugins/pom.xml +++ b/features/features-sli-plugins/pom.xml @@ -5,7 +5,7 @@ org.onap.ccsdk.parent feature-repo-parent - 1.2.2-SNAPSHOT + 1.2.2 diff --git a/features/installer/pom.xml b/features/installer/pom.xml index ed909fc22..9f0276044 100755 --- a/features/installer/pom.xml +++ b/features/installer/pom.xml @@ -5,7 +5,7 @@ org.onap.ccsdk.parent odlparent-lite - 1.2.2-SNAPSHOT + 1.2.2 diff --git a/features/pom.xml b/features/pom.xml index efd6cbe68..2aa82953c 100755 --- a/features/pom.xml +++ b/features/pom.xml @@ -5,7 +5,7 @@ org.onap.ccsdk.parent odlparent-lite - 1.2.2-SNAPSHOT + 1.2.2 diff --git a/grToolkit/features/ccsdk-gr-toolkit/pom.xml b/grToolkit/features/ccsdk-gr-toolkit/pom.xml index 264ad7cf6..0ca01cd3f 100755 --- a/grToolkit/features/ccsdk-gr-toolkit/pom.xml +++ b/grToolkit/features/ccsdk-gr-toolkit/pom.xml @@ -5,7 +5,7 @@ org.onap.ccsdk.parent single-feature-parent - 1.2.2-SNAPSHOT + 1.2.2 diff --git a/grToolkit/features/features-gr-toolkit/pom.xml b/grToolkit/features/features-gr-toolkit/pom.xml index db2887436..2d9a6933a 100755 --- a/grToolkit/features/features-gr-toolkit/pom.xml +++ b/grToolkit/features/features-gr-toolkit/pom.xml @@ -5,7 +5,7 @@ org.onap.ccsdk.parent feature-repo-parent - 1.2.2-SNAPSHOT + 1.2.2 diff --git a/grToolkit/features/pom.xml b/grToolkit/features/pom.xml index c092a4b80..caadecac8 100755 --- a/grToolkit/features/pom.xml +++ b/grToolkit/features/pom.xml @@ -4,7 +4,7 @@ org.onap.ccsdk.parent odlparent-lite - 1.2.2-SNAPSHOT + 1.2.2 diff --git a/grToolkit/installer/pom.xml b/grToolkit/installer/pom.xml index 5d1743389..4f5780683 100755 --- a/grToolkit/installer/pom.xml +++ b/grToolkit/installer/pom.xml @@ -4,7 +4,7 @@ org.onap.ccsdk.parent odlparent-lite - 1.2.2-SNAPSHOT + 1.2.2 diff --git a/grToolkit/model/pom.xml b/grToolkit/model/pom.xml index c917c4567..67b94d1ce 100755 --- a/grToolkit/model/pom.xml +++ b/grToolkit/model/pom.xml @@ -4,7 +4,7 @@ org.onap.ccsdk.parent binding-parent - 1.2.2-SNAPSHOT + 1.2.2 ccsdk-sli-plugins :: gr-toolkit :: ${project.artifactId} diff --git a/grToolkit/pom.xml b/grToolkit/pom.xml index d2d79c706..c0be3d858 100755 --- a/grToolkit/pom.xml +++ b/grToolkit/pom.xml @@ -5,7 +5,7 @@ org.onap.ccsdk.parent odlparent-lite - 1.2.2-SNAPSHOT + 1.2.2 diff --git a/grToolkit/provider/pom.xml b/grToolkit/provider/pom.xml index 51a850b8d..f2dad8b86 100755 --- a/grToolkit/provider/pom.xml +++ b/grToolkit/provider/pom.xml @@ -4,7 +4,7 @@ org.onap.ccsdk.parent binding-parent - 1.2.2-SNAPSHOT + 1.2.2 ccsdk-sli-plugins :: gr-toolkit :: ${project.artifactId} diff --git a/pom.xml b/pom.xml index 9e564d5e8..af41ee390 100755 --- a/pom.xml +++ b/pom.xml @@ -5,7 +5,7 @@ org.onap.ccsdk.parent odlparent-lite - 1.2.2-SNAPSHOT + 1.2.2 org.onap.ccsdk.sli.plugins diff --git a/properties-node/features/ccsdk-properties-node/pom.xml b/properties-node/features/ccsdk-properties-node/pom.xml index 6412ca3ae..a8e642ea0 100644 --- a/properties-node/features/ccsdk-properties-node/pom.xml +++ b/properties-node/features/ccsdk-properties-node/pom.xml @@ -5,7 +5,7 @@ org.onap.ccsdk.parent single-feature-parent - 1.2.2-SNAPSHOT + 1.2.2 diff --git a/properties-node/features/features-properties-node/pom.xml b/properties-node/features/features-properties-node/pom.xml index 1f2da265c..56945da4b 100644 --- a/properties-node/features/features-properties-node/pom.xml +++ b/properties-node/features/features-properties-node/pom.xml @@ -5,7 +5,7 @@ org.onap.ccsdk.parent feature-repo-parent - 1.2.2-SNAPSHOT + 1.2.2 diff --git a/properties-node/features/pom.xml b/properties-node/features/pom.xml index 23bfd53e2..06d45f638 100755 --- a/properties-node/features/pom.xml +++ b/properties-node/features/pom.xml @@ -5,7 +5,7 @@ org.onap.ccsdk.parent odlparent-lite - 1.2.2-SNAPSHOT + 1.2.2 org.onap.ccsdk.sli.plugins diff --git a/properties-node/installer/pom.xml b/properties-node/installer/pom.xml index d37160912..c8354be31 100755 --- a/properties-node/installer/pom.xml +++ b/properties-node/installer/pom.xml @@ -5,7 +5,7 @@ org.onap.ccsdk.parent odlparent-lite - 1.2.2-SNAPSHOT + 1.2.2 org.onap.ccsdk.sli.plugins diff --git a/properties-node/pom.xml b/properties-node/pom.xml index 7ff022582..52a9539f8 100755 --- a/properties-node/pom.xml +++ b/properties-node/pom.xml @@ -5,7 +5,7 @@ org.onap.ccsdk.parent odlparent-lite - 1.2.2-SNAPSHOT + 1.2.2 org.onap.ccsdk.sli.plugins diff --git a/properties-node/provider/pom.xml b/properties-node/provider/pom.xml index 532d5f7b9..c819973c9 100755 --- a/properties-node/provider/pom.xml +++ b/properties-node/provider/pom.xml @@ -5,7 +5,7 @@ org.onap.ccsdk.parent binding-parent - 1.2.2-SNAPSHOT + 1.2.2 org.onap.ccsdk.sli.plugins 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 0bf2a023d..c0703ce16 100644 --- a/restapi-call-node/features/ccsdk-restapi-call-node/pom.xml +++ b/restapi-call-node/features/ccsdk-restapi-call-node/pom.xml @@ -5,7 +5,7 @@ org.onap.ccsdk.parent single-feature-parent - 1.2.2-SNAPSHOT + 1.2.2 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 23b8f84b5..943ebbcac 100644 --- a/restapi-call-node/features/features-restapi-call-node/pom.xml +++ b/restapi-call-node/features/features-restapi-call-node/pom.xml @@ -5,7 +5,7 @@ org.onap.ccsdk.parent feature-repo-parent - 1.2.2-SNAPSHOT + 1.2.2 diff --git a/restapi-call-node/features/pom.xml b/restapi-call-node/features/pom.xml index 8ca913bb8..ab665203f 100755 --- a/restapi-call-node/features/pom.xml +++ b/restapi-call-node/features/pom.xml @@ -5,7 +5,7 @@ org.onap.ccsdk.parent odlparent-lite - 1.2.2-SNAPSHOT + 1.2.2 org.onap.ccsdk.sli.plugins diff --git a/restapi-call-node/installer/pom.xml b/restapi-call-node/installer/pom.xml index cbc4a6ec1..c6c722765 100755 --- a/restapi-call-node/installer/pom.xml +++ b/restapi-call-node/installer/pom.xml @@ -5,7 +5,7 @@ org.onap.ccsdk.parent odlparent-lite - 1.2.2-SNAPSHOT + 1.2.2 org.onap.ccsdk.sli.plugins diff --git a/restapi-call-node/pom.xml b/restapi-call-node/pom.xml index 7cdee7c50..3498bdc4c 100755 --- a/restapi-call-node/pom.xml +++ b/restapi-call-node/pom.xml @@ -5,7 +5,7 @@ org.onap.ccsdk.parent odlparent-lite - 1.2.2-SNAPSHOT + 1.2.2 org.onap.ccsdk.sli.plugins diff --git a/restapi-call-node/provider/pom.xml b/restapi-call-node/provider/pom.xml index 32089455f..d22e3edcc 100755 --- a/restapi-call-node/provider/pom.xml +++ b/restapi-call-node/provider/pom.xml @@ -5,7 +5,7 @@ org.onap.ccsdk.parent binding-parent - 1.2.2-SNAPSHOT + 1.2.2 org.onap.ccsdk.sli.plugins diff --git a/restconf-client/features/ccsdk-restconf-client/pom.xml b/restconf-client/features/ccsdk-restconf-client/pom.xml index 56fa2ebaf..3a143282d 100644 --- a/restconf-client/features/ccsdk-restconf-client/pom.xml +++ b/restconf-client/features/ccsdk-restconf-client/pom.xml @@ -5,7 +5,7 @@ org.onap.ccsdk.parent single-feature-parent - 1.2.2-SNAPSHOT + 1.2.2 diff --git a/restconf-client/features/features-restconf-client/pom.xml b/restconf-client/features/features-restconf-client/pom.xml index 56846fb45..a99be46ba 100644 --- a/restconf-client/features/features-restconf-client/pom.xml +++ b/restconf-client/features/features-restconf-client/pom.xml @@ -5,7 +5,7 @@ org.onap.ccsdk.parent feature-repo-parent - 1.2.2-SNAPSHOT + 1.2.2 diff --git a/restconf-client/features/pom.xml b/restconf-client/features/pom.xml index 5a882ebcd..ee2f035c6 100755 --- a/restconf-client/features/pom.xml +++ b/restconf-client/features/pom.xml @@ -5,7 +5,7 @@ org.onap.ccsdk.parent odlparent-lite - 1.2.2-SNAPSHOT + 1.2.2 org.onap.ccsdk.sli.plugins diff --git a/restconf-client/installer/pom.xml b/restconf-client/installer/pom.xml index 4a454b14a..321b5b524 100755 --- a/restconf-client/installer/pom.xml +++ b/restconf-client/installer/pom.xml @@ -5,7 +5,7 @@ org.onap.ccsdk.parent odlparent-lite - 1.2.2-SNAPSHOT + 1.2.2 org.onap.ccsdk.sli.plugins diff --git a/restconf-client/pom.xml b/restconf-client/pom.xml index 7f2e9c825..067166f8b 100755 --- a/restconf-client/pom.xml +++ b/restconf-client/pom.xml @@ -5,7 +5,7 @@ org.onap.ccsdk.parent odlparent-lite - 1.2.2-SNAPSHOT + 1.2.2 org.onap.ccsdk.sli.plugins diff --git a/restconf-client/provider/pom.xml b/restconf-client/provider/pom.xml index e6da0cd13..24db30ad4 100755 --- a/restconf-client/provider/pom.xml +++ b/restconf-client/provider/pom.xml @@ -5,7 +5,7 @@ org.onap.ccsdk.parent binding-parent - 1.2.2-SNAPSHOT + 1.2.2 org.onap.ccsdk.sli.plugins 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 ee153ad4e..18cfe9abc 100644 --- a/sshapi-call-node/features/ccsdk-sshapi-call-node/pom.xml +++ b/sshapi-call-node/features/ccsdk-sshapi-call-node/pom.xml @@ -5,7 +5,7 @@ org.onap.ccsdk.parent single-feature-parent - 1.2.2-SNAPSHOT + 1.2.2 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 421cbbaa7..34cecd0e0 100644 --- a/sshapi-call-node/features/features-sshapi-call-node/pom.xml +++ b/sshapi-call-node/features/features-sshapi-call-node/pom.xml @@ -5,7 +5,7 @@ org.onap.ccsdk.parent feature-repo-parent - 1.2.2-SNAPSHOT + 1.2.2 diff --git a/sshapi-call-node/features/pom.xml b/sshapi-call-node/features/pom.xml index cd045fde3..ec1125d6b 100755 --- a/sshapi-call-node/features/pom.xml +++ b/sshapi-call-node/features/pom.xml @@ -5,7 +5,7 @@ org.onap.ccsdk.parent odlparent-lite - 1.2.2-SNAPSHOT + 1.2.2 org.onap.ccsdk.sli.plugins diff --git a/sshapi-call-node/installer/pom.xml b/sshapi-call-node/installer/pom.xml index 39c01db1b..844e52fe1 100755 --- a/sshapi-call-node/installer/pom.xml +++ b/sshapi-call-node/installer/pom.xml @@ -5,7 +5,7 @@ org.onap.ccsdk.parent odlparent-lite - 1.2.2-SNAPSHOT + 1.2.2 org.onap.ccsdk.sli.plugins diff --git a/sshapi-call-node/pom.xml b/sshapi-call-node/pom.xml index 6583e69bf..bd5dd54ba 100755 --- a/sshapi-call-node/pom.xml +++ b/sshapi-call-node/pom.xml @@ -5,7 +5,7 @@ org.onap.ccsdk.parent odlparent-lite - 1.2.2-SNAPSHOT + 1.2.2 org.onap.ccsdk.sli.plugins diff --git a/sshapi-call-node/provider/pom.xml b/sshapi-call-node/provider/pom.xml index bdf471b25..13d5b0aaa 100755 --- a/sshapi-call-node/provider/pom.xml +++ b/sshapi-call-node/provider/pom.xml @@ -5,7 +5,7 @@ org.onap.ccsdk.parent binding-parent - 1.2.2-SNAPSHOT + 1.2.2 org.onap.ccsdk.sli.plugins diff --git a/template-node/features/ccsdk-template-node/pom.xml b/template-node/features/ccsdk-template-node/pom.xml index c5152dbc4..9a876be5d 100644 --- a/template-node/features/ccsdk-template-node/pom.xml +++ b/template-node/features/ccsdk-template-node/pom.xml @@ -5,7 +5,7 @@ org.onap.ccsdk.parent single-feature-parent - 1.2.2-SNAPSHOT + 1.2.2 diff --git a/template-node/features/features-template-node/pom.xml b/template-node/features/features-template-node/pom.xml index dd9c8992f..a6d9681de 100644 --- a/template-node/features/features-template-node/pom.xml +++ b/template-node/features/features-template-node/pom.xml @@ -5,7 +5,7 @@ org.onap.ccsdk.parent feature-repo-parent - 1.2.2-SNAPSHOT + 1.2.2 diff --git a/template-node/features/pom.xml b/template-node/features/pom.xml index b498051f6..71ab77898 100644 --- a/template-node/features/pom.xml +++ b/template-node/features/pom.xml @@ -5,7 +5,7 @@ org.onap.ccsdk.parent odlparent-lite - 1.2.2-SNAPSHOT + 1.2.2 org.onap.ccsdk.sli.plugins diff --git a/template-node/installer/pom.xml b/template-node/installer/pom.xml index 44425d1e8..98ade668b 100644 --- a/template-node/installer/pom.xml +++ b/template-node/installer/pom.xml @@ -5,7 +5,7 @@ org.onap.ccsdk.parent odlparent-lite - 1.2.2-SNAPSHOT + 1.2.2 org.onap.ccsdk.sli.plugins diff --git a/template-node/pom.xml b/template-node/pom.xml index c0843b787..2fd3cfdef 100644 --- a/template-node/pom.xml +++ b/template-node/pom.xml @@ -5,7 +5,7 @@ org.onap.ccsdk.parent odlparent-lite - 1.2.2-SNAPSHOT + 1.2.2 org.onap.ccsdk.sli.plugins diff --git a/template-node/provider/pom.xml b/template-node/provider/pom.xml index d52587922..4a44b6d5a 100644 --- a/template-node/provider/pom.xml +++ b/template-node/provider/pom.xml @@ -5,7 +5,7 @@ org.onap.ccsdk.parent binding-parent - 1.2.2-SNAPSHOT + 1.2.2 org.onap.ccsdk.sli.plugins -- cgit 1.2.3-korg From d5f883f63b0faf2b0c8a7c9bc9e384c4f893d766 Mon Sep 17 00:00:00 2001 From: "Timoney, Dan (dt5972)" Date: Tue, 30 Apr 2019 11:54:52 -0400 Subject: Roll master to El Alto Roll master version to El Alto versions Change-Id: Ifec94aaab874709c18ffcb03c2b7aa82c23ba2f9 Issue-ID: CCSDK-1222 Signed-off-by: Timoney, Dan (dt5972) --- artifacts/pom.xml | 4 ++-- features/ccsdk-sli-plugins-all/pom.xml | 4 ++-- features/features-sli-plugins/pom.xml | 4 ++-- features/installer/pom.xml | 4 ++-- features/pom.xml | 4 ++-- grToolkit/features/ccsdk-gr-toolkit/pom.xml | 4 ++-- grToolkit/features/features-gr-toolkit/pom.xml | 4 ++-- grToolkit/features/pom.xml | 4 ++-- grToolkit/installer/pom.xml | 4 ++-- grToolkit/model/pom.xml | 4 ++-- grToolkit/pom.xml | 4 ++-- grToolkit/provider/pom.xml | 4 ++-- pom.xml | 4 ++-- properties-node/features/ccsdk-properties-node/pom.xml | 4 ++-- properties-node/features/features-properties-node/pom.xml | 4 ++-- properties-node/features/pom.xml | 4 ++-- properties-node/installer/pom.xml | 4 ++-- properties-node/pom.xml | 4 ++-- properties-node/provider/pom.xml | 4 ++-- restapi-call-node/features/ccsdk-restapi-call-node/pom.xml | 4 ++-- restapi-call-node/features/features-restapi-call-node/pom.xml | 4 ++-- restapi-call-node/features/pom.xml | 4 ++-- restapi-call-node/installer/pom.xml | 4 ++-- restapi-call-node/pom.xml | 4 ++-- restapi-call-node/provider/pom.xml | 4 ++-- restconf-client/features/ccsdk-restconf-client/pom.xml | 4 ++-- restconf-client/features/features-restconf-client/pom.xml | 4 ++-- restconf-client/features/pom.xml | 4 ++-- restconf-client/installer/pom.xml | 4 ++-- restconf-client/pom.xml | 4 ++-- restconf-client/provider/pom.xml | 8 ++++---- sshapi-call-node/features/ccsdk-sshapi-call-node/pom.xml | 4 ++-- sshapi-call-node/features/features-sshapi-call-node/pom.xml | 4 ++-- sshapi-call-node/features/pom.xml | 4 ++-- sshapi-call-node/installer/pom.xml | 4 ++-- sshapi-call-node/pom.xml | 4 ++-- sshapi-call-node/provider/pom.xml | 4 ++-- template-node/features/ccsdk-template-node/pom.xml | 4 ++-- template-node/features/features-template-node/pom.xml | 4 ++-- template-node/features/pom.xml | 4 ++-- template-node/installer/pom.xml | 4 ++-- template-node/pom.xml | 4 ++-- template-node/provider/pom.xml | 4 ++-- version.properties | 4 ++-- 44 files changed, 90 insertions(+), 90 deletions(-) (limited to 'restconf-client/provider') diff --git a/artifacts/pom.xml b/artifacts/pom.xml index 2daa2c5b2..261b955e4 100755 --- a/artifacts/pom.xml +++ b/artifacts/pom.xml @@ -4,7 +4,7 @@ org.onap.ccsdk.sli.plugins sli-plugins-artifacts - 0.4.2-SNAPSHOT + 0.5.0-SNAPSHOT pom ccsdk-sli-plugins :: sli-plugins-artifacts @@ -17,7 +17,7 @@ org.onap.ccsdk.parent parent - 1.2.2 + 1.3.0-SNAPSHOT diff --git a/features/ccsdk-sli-plugins-all/pom.xml b/features/ccsdk-sli-plugins-all/pom.xml index 0ca186002..f36956a9c 100644 --- a/features/ccsdk-sli-plugins-all/pom.xml +++ b/features/ccsdk-sli-plugins-all/pom.xml @@ -5,13 +5,13 @@ org.onap.ccsdk.parent single-feature-parent - 1.2.2 + 1.3.0-SNAPSHOT org.onap.ccsdk.sli.plugins ccsdk-sli-plugins-all - 0.4.2-SNAPSHOT + 0.5.0-SNAPSHOT feature ccsdk-sli-plugins :: features :: ${project.artifactId} diff --git a/features/features-sli-plugins/pom.xml b/features/features-sli-plugins/pom.xml index c30fb147a..931e46063 100644 --- a/features/features-sli-plugins/pom.xml +++ b/features/features-sli-plugins/pom.xml @@ -5,13 +5,13 @@ org.onap.ccsdk.parent feature-repo-parent - 1.2.2 + 1.3.0-SNAPSHOT org.onap.ccsdk.sli.plugins features-sli-plugins - 0.4.2-SNAPSHOT + 0.5.0-SNAPSHOT feature ccsdk-sli-plugins :: features :: ${project.artifactId} diff --git a/features/installer/pom.xml b/features/installer/pom.xml index 9f0276044..58143e79f 100755 --- a/features/installer/pom.xml +++ b/features/installer/pom.xml @@ -5,13 +5,13 @@ org.onap.ccsdk.parent odlparent-lite - 1.2.2 + 1.3.0-SNAPSHOT org.onap.ccsdk.sli.plugins sliplugins-features-installer - 0.4.2-SNAPSHOT + 0.5.0-SNAPSHOT pom ccsdk-sli-plugins :: features :: ${project.artifactId} diff --git a/features/pom.xml b/features/pom.xml index 2aa82953c..d8553b42f 100755 --- a/features/pom.xml +++ b/features/pom.xml @@ -5,13 +5,13 @@ org.onap.ccsdk.parent odlparent-lite - 1.2.2 + 1.3.0-SNAPSHOT org.onap.ccsdk.sli.plugins sliplugins-feature-aggregator - 0.4.2-SNAPSHOT + 0.5.0-SNAPSHOT pom ccsdk-sli-plugins :: features diff --git a/grToolkit/features/ccsdk-gr-toolkit/pom.xml b/grToolkit/features/ccsdk-gr-toolkit/pom.xml index 0ca01cd3f..37343c53c 100755 --- a/grToolkit/features/ccsdk-gr-toolkit/pom.xml +++ b/grToolkit/features/ccsdk-gr-toolkit/pom.xml @@ -5,13 +5,13 @@ org.onap.ccsdk.parent single-feature-parent - 1.2.2 + 1.3.0-SNAPSHOT org.onap.ccsdk.sli.plugins ccsdk-gr-toolkit - 0.4.2-SNAPSHOT + 0.5.0-SNAPSHOT feature ccsdk-sli-plugins :: gr-toolkit :: ${project.artifactId} diff --git a/grToolkit/features/features-gr-toolkit/pom.xml b/grToolkit/features/features-gr-toolkit/pom.xml index 2d9a6933a..441e2e855 100755 --- a/grToolkit/features/features-gr-toolkit/pom.xml +++ b/grToolkit/features/features-gr-toolkit/pom.xml @@ -5,13 +5,13 @@ org.onap.ccsdk.parent feature-repo-parent - 1.2.2 + 1.3.0-SNAPSHOT org.onap.ccsdk.sli.plugins features-gr-toolkit - 0.4.2-SNAPSHOT + 0.5.0-SNAPSHOT feature ccsdk-sli-plugins :: gr-toolkit :: ${project.artifactId} diff --git a/grToolkit/features/pom.xml b/grToolkit/features/pom.xml index caadecac8..a27e71853 100755 --- a/grToolkit/features/pom.xml +++ b/grToolkit/features/pom.xml @@ -4,14 +4,14 @@ org.onap.ccsdk.parent odlparent-lite - 1.2.2 + 1.3.0-SNAPSHOT ccsdk-sli-plugins :: gr-toolkit :: ${project.artifactId} gr-toolkit-features org.onap.ccsdk.sli.plugins - 0.4.2-SNAPSHOT + 0.5.0-SNAPSHOT pom diff --git a/grToolkit/installer/pom.xml b/grToolkit/installer/pom.xml index 4f5780683..831edf707 100755 --- a/grToolkit/installer/pom.xml +++ b/grToolkit/installer/pom.xml @@ -4,14 +4,14 @@ org.onap.ccsdk.parent odlparent-lite - 1.2.2 + 1.3.0-SNAPSHOT ccsdk-sli-plugins :: gr-toolkit :: ${project.artifactId} org.onap.ccsdk.sli.plugins gr-toolkit-installer - 0.4.2-SNAPSHOT + 0.5.0-SNAPSHOT pom ccsdk-gr-toolkit diff --git a/grToolkit/model/pom.xml b/grToolkit/model/pom.xml index 67b94d1ce..439b05f0c 100755 --- a/grToolkit/model/pom.xml +++ b/grToolkit/model/pom.xml @@ -4,13 +4,13 @@ org.onap.ccsdk.parent binding-parent - 1.2.2 + 1.3.0-SNAPSHOT ccsdk-sli-plugins :: gr-toolkit :: ${project.artifactId} org.onap.ccsdk.sli.plugins gr-toolkit-model - 0.4.2-SNAPSHOT + 0.5.0-SNAPSHOT bundle diff --git a/grToolkit/pom.xml b/grToolkit/pom.xml index c0be3d858..2cdc71d08 100755 --- a/grToolkit/pom.xml +++ b/grToolkit/pom.xml @@ -5,13 +5,13 @@ org.onap.ccsdk.parent odlparent-lite - 1.2.2 + 1.3.0-SNAPSHOT org.onap.ccsdk.sli.plugins gr-toolkit - 0.4.2-SNAPSHOT + 0.5.0-SNAPSHOT pom ccsdk-sli-plugins :: gr-toolkit diff --git a/grToolkit/provider/pom.xml b/grToolkit/provider/pom.xml index f2dad8b86..ee61d7d41 100755 --- a/grToolkit/provider/pom.xml +++ b/grToolkit/provider/pom.xml @@ -4,13 +4,13 @@ org.onap.ccsdk.parent binding-parent - 1.2.2 + 1.3.0-SNAPSHOT ccsdk-sli-plugins :: gr-toolkit :: ${project.artifactId} org.onap.ccsdk.sli.plugins gr-toolkit-provider - 0.4.2-SNAPSHOT + 0.5.0-SNAPSHOT bundle diff --git a/pom.xml b/pom.xml index af41ee390..e66a40794 100755 --- a/pom.xml +++ b/pom.xml @@ -5,12 +5,12 @@ org.onap.ccsdk.parent odlparent-lite - 1.2.2 + 1.3.0-SNAPSHOT org.onap.ccsdk.sli.plugins ccsdk-sli-plugins - 0.4.2-SNAPSHOT + 0.5.0-SNAPSHOT pom ccsdk-sli-plugins diff --git a/properties-node/features/ccsdk-properties-node/pom.xml b/properties-node/features/ccsdk-properties-node/pom.xml index a8e642ea0..ae007d6e4 100644 --- a/properties-node/features/ccsdk-properties-node/pom.xml +++ b/properties-node/features/ccsdk-properties-node/pom.xml @@ -5,13 +5,13 @@ org.onap.ccsdk.parent single-feature-parent - 1.2.2 + 1.3.0-SNAPSHOT org.onap.ccsdk.sli.plugins ccsdk-properties-node - 0.4.2-SNAPSHOT + 0.5.0-SNAPSHOT feature ccsdk-sli-plugins :: properties-node :: ${project.artifactId} diff --git a/properties-node/features/features-properties-node/pom.xml b/properties-node/features/features-properties-node/pom.xml index 56945da4b..0db5a9042 100644 --- a/properties-node/features/features-properties-node/pom.xml +++ b/properties-node/features/features-properties-node/pom.xml @@ -5,13 +5,13 @@ org.onap.ccsdk.parent feature-repo-parent - 1.2.2 + 1.3.0-SNAPSHOT org.onap.ccsdk.sli.plugins features-properties-node - 0.4.2-SNAPSHOT + 0.5.0-SNAPSHOT feature ccsdk-sli-plugins :: properties-node :: ${project.artifactId} diff --git a/properties-node/features/pom.xml b/properties-node/features/pom.xml index 06d45f638..79d56ff04 100755 --- a/properties-node/features/pom.xml +++ b/properties-node/features/pom.xml @@ -5,12 +5,12 @@ org.onap.ccsdk.parent odlparent-lite - 1.2.2 + 1.3.0-SNAPSHOT org.onap.ccsdk.sli.plugins properties-node-features - 0.4.2-SNAPSHOT + 0.5.0-SNAPSHOT pom ccsdk-sli-plugins :: properties-node :: ${project.artifactId} diff --git a/properties-node/installer/pom.xml b/properties-node/installer/pom.xml index c8354be31..42732871b 100755 --- a/properties-node/installer/pom.xml +++ b/properties-node/installer/pom.xml @@ -5,12 +5,12 @@ org.onap.ccsdk.parent odlparent-lite - 1.2.2 + 1.3.0-SNAPSHOT org.onap.ccsdk.sli.plugins properties-node-installer - 0.4.2-SNAPSHOT + 0.5.0-SNAPSHOT pom ccsdk-sli-plugins :: properties-node :: ${project.artifactId} diff --git a/properties-node/pom.xml b/properties-node/pom.xml index 52a9539f8..de936d9f2 100755 --- a/properties-node/pom.xml +++ b/properties-node/pom.xml @@ -5,12 +5,12 @@ org.onap.ccsdk.parent odlparent-lite - 1.2.2 + 1.3.0-SNAPSHOT org.onap.ccsdk.sli.plugins properties-node - 0.4.2-SNAPSHOT + 0.5.0-SNAPSHOT pom ccsdk-sli-plugins :: properties-node diff --git a/properties-node/provider/pom.xml b/properties-node/provider/pom.xml index c819973c9..2e3b5e76c 100755 --- a/properties-node/provider/pom.xml +++ b/properties-node/provider/pom.xml @@ -5,12 +5,12 @@ org.onap.ccsdk.parent binding-parent - 1.2.2 + 1.3.0-SNAPSHOT org.onap.ccsdk.sli.plugins properties-node-provider - 0.4.2-SNAPSHOT + 0.5.0-SNAPSHOT bundle ccsdk-sli-plugins :: properties-node :: ${project.artifactId} 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 c0703ce16..7062d6102 100644 --- a/restapi-call-node/features/ccsdk-restapi-call-node/pom.xml +++ b/restapi-call-node/features/ccsdk-restapi-call-node/pom.xml @@ -5,13 +5,13 @@ org.onap.ccsdk.parent single-feature-parent - 1.2.2 + 1.3.0-SNAPSHOT org.onap.ccsdk.sli.plugins ccsdk-restapi-call-node - 0.4.2-SNAPSHOT + 0.5.0-SNAPSHOT feature ccsdk-sli-plugins :: restapi-call-node :: ${project.artifactId} 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 943ebbcac..b5329ea8f 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 @@ org.onap.ccsdk.parent feature-repo-parent - 1.2.2 + 1.3.0-SNAPSHOT org.onap.ccsdk.sli.plugins features-restapi-call-node - 0.4.2-SNAPSHOT + 0.5.0-SNAPSHOT feature ccsdk-sli-plugins :: restapi-call-node :: ${project.artifactId} diff --git a/restapi-call-node/features/pom.xml b/restapi-call-node/features/pom.xml index ab665203f..4820b7dd5 100755 --- a/restapi-call-node/features/pom.xml +++ b/restapi-call-node/features/pom.xml @@ -5,12 +5,12 @@ org.onap.ccsdk.parent odlparent-lite - 1.2.2 + 1.3.0-SNAPSHOT org.onap.ccsdk.sli.plugins restapi-call-node-features - 0.4.2-SNAPSHOT + 0.5.0-SNAPSHOT pom ccsdk-sli-plugins :: restapi-call-node :: ${project.artifactId} diff --git a/restapi-call-node/installer/pom.xml b/restapi-call-node/installer/pom.xml index c6c722765..d51cc610e 100755 --- a/restapi-call-node/installer/pom.xml +++ b/restapi-call-node/installer/pom.xml @@ -5,12 +5,12 @@ org.onap.ccsdk.parent odlparent-lite - 1.2.2 + 1.3.0-SNAPSHOT org.onap.ccsdk.sli.plugins restapi-call-node-installer - 0.4.2-SNAPSHOT + 0.5.0-SNAPSHOT pom ccsdk-sli-plugins :: restapi-call-node :: ${project.artifactId} diff --git a/restapi-call-node/pom.xml b/restapi-call-node/pom.xml index 3498bdc4c..a84d3232d 100755 --- a/restapi-call-node/pom.xml +++ b/restapi-call-node/pom.xml @@ -5,12 +5,12 @@ org.onap.ccsdk.parent odlparent-lite - 1.2.2 + 1.3.0-SNAPSHOT org.onap.ccsdk.sli.plugins restapi-call-node - 0.4.2-SNAPSHOT + 0.5.0-SNAPSHOT pom ccsdk-sli-plugins :: restapi-call-node diff --git a/restapi-call-node/provider/pom.xml b/restapi-call-node/provider/pom.xml index d22e3edcc..a7a0842a4 100755 --- a/restapi-call-node/provider/pom.xml +++ b/restapi-call-node/provider/pom.xml @@ -5,12 +5,12 @@ org.onap.ccsdk.parent binding-parent - 1.2.2 + 1.3.0-SNAPSHOT org.onap.ccsdk.sli.plugins restapi-call-node-provider - 0.4.2-SNAPSHOT + 0.5.0-SNAPSHOT bundle ccsdk-sli-plugins :: restapi-call-node :: ${project.artifactId} diff --git a/restconf-client/features/ccsdk-restconf-client/pom.xml b/restconf-client/features/ccsdk-restconf-client/pom.xml index 3a143282d..677a24671 100644 --- a/restconf-client/features/ccsdk-restconf-client/pom.xml +++ b/restconf-client/features/ccsdk-restconf-client/pom.xml @@ -5,13 +5,13 @@ org.onap.ccsdk.parent single-feature-parent - 1.2.2 + 1.3.0-SNAPSHOT org.onap.ccsdk.sli.plugins ccsdk-restconf-client - 0.4.2-SNAPSHOT + 0.5.0-SNAPSHOT feature diff --git a/restconf-client/features/features-restconf-client/pom.xml b/restconf-client/features/features-restconf-client/pom.xml index a99be46ba..032a781e1 100644 --- a/restconf-client/features/features-restconf-client/pom.xml +++ b/restconf-client/features/features-restconf-client/pom.xml @@ -5,13 +5,13 @@ org.onap.ccsdk.parent feature-repo-parent - 1.2.2 + 1.3.0-SNAPSHOT org.onap.ccsdk.sli.plugins features-restconf-client - 0.4.2-SNAPSHOT + 0.5.0-SNAPSHOT feature ccsdk-sli-plugins :: restconf-client :: ${project.artifactId} diff --git a/restconf-client/features/pom.xml b/restconf-client/features/pom.xml index ee2f035c6..ae4000266 100755 --- a/restconf-client/features/pom.xml +++ b/restconf-client/features/pom.xml @@ -5,12 +5,12 @@ org.onap.ccsdk.parent odlparent-lite - 1.2.2 + 1.3.0-SNAPSHOT org.onap.ccsdk.sli.plugins restconf-client-features - 0.4.2-SNAPSHOT + 0.5.0-SNAPSHOT pom ccsdk-sli-plugins :: restconf-client :: ${project.artifactId} diff --git a/restconf-client/installer/pom.xml b/restconf-client/installer/pom.xml index 321b5b524..bcf9e998d 100755 --- a/restconf-client/installer/pom.xml +++ b/restconf-client/installer/pom.xml @@ -5,12 +5,12 @@ org.onap.ccsdk.parent odlparent-lite - 1.2.2 + 1.3.0-SNAPSHOT org.onap.ccsdk.sli.plugins restconf-client-installer - 0.4.2-SNAPSHOT + 0.5.0-SNAPSHOT pom ccsdk-sli-plugins :: restconf-client :: ${project.artifactId} diff --git a/restconf-client/pom.xml b/restconf-client/pom.xml index 067166f8b..b9cad2629 100755 --- a/restconf-client/pom.xml +++ b/restconf-client/pom.xml @@ -5,12 +5,12 @@ org.onap.ccsdk.parent odlparent-lite - 1.2.2 + 1.3.0-SNAPSHOT org.onap.ccsdk.sli.plugins restconf-client - 0.4.2-SNAPSHOT + 0.5.0-SNAPSHOT pom ccsdk-sli-plugins :: restconf-client diff --git a/restconf-client/provider/pom.xml b/restconf-client/provider/pom.xml index 24db30ad4..70f84e09d 100755 --- a/restconf-client/provider/pom.xml +++ b/restconf-client/provider/pom.xml @@ -5,12 +5,12 @@ org.onap.ccsdk.parent binding-parent - 1.2.2 + 1.3.0-SNAPSHOT org.onap.ccsdk.sli.plugins restconf-client-provider - 0.4.2-SNAPSHOT + 0.5.0-SNAPSHOT bundle ccsdk-sli-plugins :: restconf-client :: ${project.artifactId} @@ -49,7 +49,7 @@ org.onap.ccsdk.sli.plugins properties-node-provider - 0.4.2-SNAPSHOT + 0.5.0-SNAPSHOT org.opendaylight.yangtools @@ -73,7 +73,7 @@ org.onap.ccsdk.sli.plugins restapi-call-node-provider - 0.4.2-SNAPSHOT + 0.5.0-SNAPSHOT org.opendaylight.netconf 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 18cfe9abc..a34b4aeee 100644 --- a/sshapi-call-node/features/ccsdk-sshapi-call-node/pom.xml +++ b/sshapi-call-node/features/ccsdk-sshapi-call-node/pom.xml @@ -5,13 +5,13 @@ org.onap.ccsdk.parent single-feature-parent - 1.2.2 + 1.3.0-SNAPSHOT org.onap.ccsdk.sli.plugins ccsdk-sshapi-call-node - 0.4.2-SNAPSHOT + 0.5.0-SNAPSHOT feature ccsdk-sli-plugins :: sshapi-call-node :: ${project.artifactId} 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 34cecd0e0..04338facf 100644 --- a/sshapi-call-node/features/features-sshapi-call-node/pom.xml +++ b/sshapi-call-node/features/features-sshapi-call-node/pom.xml @@ -5,13 +5,13 @@ org.onap.ccsdk.parent feature-repo-parent - 1.2.2 + 1.3.0-SNAPSHOT org.onap.ccsdk.sli.plugins features-sshapi-call-node - 0.4.2-SNAPSHOT + 0.5.0-SNAPSHOT feature ccsdk-sli-plugins :: sshapi-call-node :: ${project.artifactId} diff --git a/sshapi-call-node/features/pom.xml b/sshapi-call-node/features/pom.xml index ec1125d6b..35be47a4e 100755 --- a/sshapi-call-node/features/pom.xml +++ b/sshapi-call-node/features/pom.xml @@ -5,12 +5,12 @@ org.onap.ccsdk.parent odlparent-lite - 1.2.2 + 1.3.0-SNAPSHOT org.onap.ccsdk.sli.plugins sshapi-call-node-features - 0.4.2-SNAPSHOT + 0.5.0-SNAPSHOT pom ccsdk-sli-plugins :: sshapi-call-node :: ${project.artifactId} diff --git a/sshapi-call-node/installer/pom.xml b/sshapi-call-node/installer/pom.xml index 844e52fe1..029b94dea 100755 --- a/sshapi-call-node/installer/pom.xml +++ b/sshapi-call-node/installer/pom.xml @@ -5,12 +5,12 @@ org.onap.ccsdk.parent odlparent-lite - 1.2.2 + 1.3.0-SNAPSHOT org.onap.ccsdk.sli.plugins sshapi-call-node-installer - 0.4.2-SNAPSHOT + 0.5.0-SNAPSHOT pom ccsdk-sli-plugins :: sshapi-call-node :: ${project.artifactId} diff --git a/sshapi-call-node/pom.xml b/sshapi-call-node/pom.xml index bd5dd54ba..99c6d9edd 100755 --- a/sshapi-call-node/pom.xml +++ b/sshapi-call-node/pom.xml @@ -5,12 +5,12 @@ org.onap.ccsdk.parent odlparent-lite - 1.2.2 + 1.3.0-SNAPSHOT org.onap.ccsdk.sli.plugins sshapi-call-node - 0.4.2-SNAPSHOT + 0.5.0-SNAPSHOT pom ccsdk-sli-plugins :: sshapi-call-node diff --git a/sshapi-call-node/provider/pom.xml b/sshapi-call-node/provider/pom.xml index 13d5b0aaa..81ab8811e 100755 --- a/sshapi-call-node/provider/pom.xml +++ b/sshapi-call-node/provider/pom.xml @@ -5,12 +5,12 @@ org.onap.ccsdk.parent binding-parent - 1.2.2 + 1.3.0-SNAPSHOT org.onap.ccsdk.sli.plugins sshapi-call-node-provider - 0.4.2-SNAPSHOT + 0.5.0-SNAPSHOT bundle ccsdk-sli-plugins :: sshapi-call-node :: ${project.artifactId} diff --git a/template-node/features/ccsdk-template-node/pom.xml b/template-node/features/ccsdk-template-node/pom.xml index 9a876be5d..f7a708729 100644 --- a/template-node/features/ccsdk-template-node/pom.xml +++ b/template-node/features/ccsdk-template-node/pom.xml @@ -5,13 +5,13 @@ org.onap.ccsdk.parent single-feature-parent - 1.2.2 + 1.3.0-SNAPSHOT org.onap.ccsdk.sli.plugins ccsdk-template-node - 0.4.2-SNAPSHOT + 0.5.0-SNAPSHOT feature ccsdk-sli-plugins :: template-node :: ${project.artifactId} diff --git a/template-node/features/features-template-node/pom.xml b/template-node/features/features-template-node/pom.xml index a6d9681de..3c6f6d853 100644 --- a/template-node/features/features-template-node/pom.xml +++ b/template-node/features/features-template-node/pom.xml @@ -5,13 +5,13 @@ org.onap.ccsdk.parent feature-repo-parent - 1.2.2 + 1.3.0-SNAPSHOT org.onap.ccsdk.sli.plugins features-template-node - 0.4.2-SNAPSHOT + 0.5.0-SNAPSHOT feature diff --git a/template-node/features/pom.xml b/template-node/features/pom.xml index 71ab77898..f919d1c09 100644 --- a/template-node/features/pom.xml +++ b/template-node/features/pom.xml @@ -5,12 +5,12 @@ org.onap.ccsdk.parent odlparent-lite - 1.2.2 + 1.3.0-SNAPSHOT org.onap.ccsdk.sli.plugins template-node-features - 0.4.2-SNAPSHOT + 0.5.0-SNAPSHOT pom diff --git a/template-node/installer/pom.xml b/template-node/installer/pom.xml index 98ade668b..35161b8e5 100644 --- a/template-node/installer/pom.xml +++ b/template-node/installer/pom.xml @@ -5,12 +5,12 @@ org.onap.ccsdk.parent odlparent-lite - 1.2.2 + 1.3.0-SNAPSHOT org.onap.ccsdk.sli.plugins template-node-installer - 0.4.2-SNAPSHOT + 0.5.0-SNAPSHOT pom ccsdk-sli-plugins :: template-node :: ${project.artifactId} diff --git a/template-node/pom.xml b/template-node/pom.xml index 2fd3cfdef..b65c40e24 100644 --- a/template-node/pom.xml +++ b/template-node/pom.xml @@ -5,12 +5,12 @@ org.onap.ccsdk.parent odlparent-lite - 1.2.2 + 1.3.0-SNAPSHOT org.onap.ccsdk.sli.plugins template-node - 0.4.2-SNAPSHOT + 0.5.0-SNAPSHOT pom diff --git a/template-node/provider/pom.xml b/template-node/provider/pom.xml index 4a44b6d5a..b47c60409 100644 --- a/template-node/provider/pom.xml +++ b/template-node/provider/pom.xml @@ -5,12 +5,12 @@ org.onap.ccsdk.parent binding-parent - 1.2.2 + 1.3.0-SNAPSHOT org.onap.ccsdk.sli.plugins template-node-provider - 0.4.2-SNAPSHOT + 0.5.0-SNAPSHOT bundle ccsdk-sli-plugins :: template-node :: ${project.artifactId} diff --git a/version.properties b/version.properties index 80a47aef7..c8bc76801 100644 --- a/version.properties +++ b/version.properties @@ -6,8 +6,8 @@ # Comment release_name=0 -sprint_number=4 -feature_revision=2 +sprint_number=5 +feature_revision=0 base_version=${release_name}.${sprint_number}.${feature_revision} -- cgit 1.2.3-korg From bea0f101d0a4c7d1fbe8cb9d4a27491ba7d66dbf Mon Sep 17 00:00:00 2001 From: janani Date: Thu, 23 May 2019 15:45:14 +0530 Subject: Bug fix to add anyxml node. Anyxml node fix Change-Id: Ice40fde63ac8f589fa9358ebaf12c32247b0ae96 Issue-ID: CCSDK-1344 Signed-off-by: janani --- .../restconfapicall/RestconfApiCallNode.java | 35 +++++- .../plugins/restconfapicall/RestconfApiUtils.java | 12 ++ .../dfserializer/JsonSerializer.java | 12 +- .../dfserializer/PropertiesNodeJsonListener.java | 28 +++-- .../pnserializer/DefaultPropertiesNodeWalker.java | 5 +- .../yangserializers/pnserializer/InnerNode.java | 21 ++-- .../MdsalPropertiesNodeSerializer.java | 21 +++- .../pnserializer/MdsalPropertiesNodeUtils.java | 7 +- .../yangserializers/pnserializer/NodeType.java | 3 +- .../pnserializer/PropertiesNode.java | 20 ++++ .../dfserializer/DataFormatSerializerTest.java | 132 +++++++++++++++++++++ .../dfserializer/DataFormatUtilsTest.java | 64 ++++++++++ .../src/test/resources/yang/execution-service.yang | 43 +++++++ 13 files changed, 373 insertions(+), 30 deletions(-) create mode 100644 restconf-client/provider/src/test/resources/yang/execution-service.yang (limited to 'restconf-client/provider') 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 3007b5a1b..ac0897e8f 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 @@ -43,10 +43,12 @@ import org.dom4j.DocumentHelper; import org.onap.ccsdk.sli.core.sli.SvcLogicContext; import org.onap.ccsdk.sli.core.sli.SvcLogicException; import org.onap.ccsdk.sli.core.sli.SvcLogicJavaPlugin; +import org.onap.ccsdk.sli.plugins.restapicall.Format; import org.onap.ccsdk.sli.plugins.restapicall.HttpResponse; import org.onap.ccsdk.sli.plugins.restapicall.RestapiCallNode; import org.onap.ccsdk.sli.plugins.restapicall.RetryException; import org.onap.ccsdk.sli.plugins.restapicall.RetryPolicy; +import org.onap.ccsdk.sli.plugins.restapicall.XmlParser; import org.onap.ccsdk.sli.plugins.yangserializers.dfserializer.DataFormatSerializer; import org.onap.ccsdk.sli.plugins.yangserializers.dfserializer.DataFormatSerializerContext; import org.onap.ccsdk.sli.plugins.yangserializers.dfserializer.DfSerializerFactory; @@ -195,10 +197,14 @@ public class RestconfApiCallNode implements SvcLogicJavaPlugin { String response = getResponse(ctx, p, pp, r); if (response != null) { - Map resProp = serializeResponse( - p, uri, response, insIdCtx); - for (Map.Entry pro : resProp.entrySet()) { - ctx.setAttribute(pro.getKey(), pro.getValue()); + try { + Map resProp = serializeResponse( + p, uri, response, insIdCtx); + for (Map.Entry pro : resProp.entrySet()) { + ctx.setAttribute(pro.getKey(), pro.getValue()); + } + } catch (SvcLogicException e) { + convertToNormalRes(ctx, p, pp, response); } } } catch (SvcLogicException e) { @@ -241,6 +247,27 @@ public class RestconfApiCallNode implements SvcLogicJavaPlugin { } } + private void convertToNormalRes(SvcLogicContext ctx , + YangParameters p, String pp, String body) + throws SvcLogicException { + if (p.convertResponse) { + Map mm = null; + if (p.format == Format.XML) { + mm = XmlParser.convertToProperties(body, p.listNameList); + } else if (p.format == Format.JSON) { + mm = org.onap.ccsdk.sli.plugins.restapicall.JsonParser + .convertToProperties(body); + } + + if (mm != null) { + for (Map.Entry entry : mm.entrySet()) { + ctx.setAttribute(pp + entry.getKey(), + entry.getValue()); + } + } + } + } + /** * Serializes the request message to JSON or XML from the properties. * 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 505089c44..1309102b3 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 @@ -167,6 +167,18 @@ public final class RestconfApiUtils { } secondHalf = path.substring(p[0].length() + 1); return firstHalf + COLON + secondHalf; + } else if (path.contains(SLASH)) { + String[] p = path.split(SLASH); + if (p.length > 4) { + String actual = p[3] + COLON + p[4]; + if (p.length > 5) { + secondHalf = path.substring( + p[1].length() + p[2].length() + actual.length() + 3); + path = actual + secondHalf; + } else { + path = actual; + } + } } return path; } diff --git a/restconf-client/provider/src/main/java/org/onap/ccsdk/sli/plugins/yangserializers/dfserializer/JsonSerializer.java b/restconf-client/provider/src/main/java/org/onap/ccsdk/sli/plugins/yangserializers/dfserializer/JsonSerializer.java index 1be1309bb..91adb8126 100644 --- a/restconf-client/provider/src/main/java/org/onap/ccsdk/sli/plugins/yangserializers/dfserializer/JsonSerializer.java +++ b/restconf-client/provider/src/main/java/org/onap/ccsdk/sli/plugins/yangserializers/dfserializer/JsonSerializer.java @@ -22,18 +22,20 @@ package org.onap.ccsdk.sli.plugins.yangserializers.dfserializer; import com.fasterxml.jackson.databind.JsonNode; import com.fasterxml.jackson.databind.ObjectMapper; -import org.onap.ccsdk.sli.core.sli.SvcLogicException; -import org.onap.ccsdk.sli.plugins.yangserializers.pnserializer.DefaultPropertiesNodeWalker; -import org.onap.ccsdk.sli.plugins.yangserializers.pnserializer.PropertiesNode; -import org.onap.ccsdk.sli.plugins.yangserializers.pnserializer.PropertiesNodeWalker; import java.io.IOException; import java.io.Writer; import java.util.List; import java.util.Map; +import org.onap.ccsdk.sli.core.sli.SvcLogicException; +import org.onap.ccsdk.sli.plugins.yangserializers.pnserializer.DefaultPropertiesNodeWalker; +import org.onap.ccsdk.sli.plugins.yangserializers.pnserializer.PropertiesNode; +import org.onap.ccsdk.sli.plugins.yangserializers.pnserializer.PropertiesNodeWalker; + import static org.onap.ccsdk.sli.plugins.yangserializers.dfserializer.DataFormat.JSON; -import static org.onap.ccsdk.sli.plugins.yangserializers.dfserializer.DfSerializerUtil.*; +import static org.onap.ccsdk.sli.plugins.yangserializers.dfserializer.DfSerializerUtil.JSON_LIS_ERR; +import static org.onap.ccsdk.sli.plugins.yangserializers.dfserializer.DfSerializerUtil.JSON_TREE_ERR; /** * Representation of JSON serializer which encodes properties to JSON and diff --git a/restconf-client/provider/src/main/java/org/onap/ccsdk/sli/plugins/yangserializers/dfserializer/PropertiesNodeJsonListener.java b/restconf-client/provider/src/main/java/org/onap/ccsdk/sli/plugins/yangserializers/dfserializer/PropertiesNodeJsonListener.java index e51ccf7a6..0f03039e5 100644 --- a/restconf-client/provider/src/main/java/org/onap/ccsdk/sli/plugins/yangserializers/dfserializer/PropertiesNodeJsonListener.java +++ b/restconf-client/provider/src/main/java/org/onap/ccsdk/sli/plugins/yangserializers/dfserializer/PropertiesNodeJsonListener.java @@ -21,6 +21,13 @@ package org.onap.ccsdk.sli.plugins.yangserializers.dfserializer; import com.google.gson.stream.JsonWriter; + +import java.io.IOException; +import java.io.StringWriter; +import java.io.Writer; +import java.util.Collection; +import java.util.Map; + import org.onap.ccsdk.sli.core.sli.SvcLogicException; import org.onap.ccsdk.sli.plugins.yangserializers.pnserializer.DefaultPropertiesNodeWalker; import org.onap.ccsdk.sli.plugins.yangserializers.pnserializer.LeafNode; @@ -29,12 +36,6 @@ import org.onap.ccsdk.sli.plugins.yangserializers.pnserializer.PropertiesNode; import org.onap.ccsdk.sli.plugins.yangserializers.pnserializer.PropertiesNodeListener; import org.onap.ccsdk.sli.plugins.yangserializers.pnserializer.RootNode; -import java.io.IOException; -import java.io.StringWriter; -import java.io.Writer; -import java.util.Collection; -import java.util.Map; - import static com.google.common.base.Strings.repeat; import static java.lang.String.format; import static org.onap.ccsdk.sli.plugins.yangserializers.dfserializer.DfSerializerUtil.JSON_WRITE_ERR; @@ -116,6 +117,16 @@ public class PropertiesNodeJsonListener implements PropertiesNodeListener{ jsonWriter.value(val); break; + case ANY_XML_NODE: + jsonWriter.name(nodeName); + val = ((LeafNode) node).value(); + try { + jsonWriter.jsonValue(val); + } catch (IOException e) { + throw new SvcLogicException(JSON_WRITE_ERR, e); + } + break; + default: throw new SvcLogicException(format( NODE_TYPE_ERR, node.nodeType().toString())); @@ -143,6 +154,7 @@ public class PropertiesNodeJsonListener implements PropertiesNodeListener{ case SINGLE_INSTANCE_LEAF_NODE: case MULTI_INSTANCE_LEAF_NODE: + case ANY_XML_NODE: break; default: @@ -174,7 +186,9 @@ public class PropertiesNodeJsonListener implements PropertiesNodeListener{ PropertiesNode parent = node.parent(); if (parent instanceof RootNode || !parent.namespace().moduleName() .equals(node.namespace().moduleName())) { - return node.namespace().moduleName() + ":" + node.name(); + if (!parent.nonAppend()) { + return node.namespace().moduleName() + ":" + node.name(); + } } return node.name(); } diff --git a/restconf-client/provider/src/main/java/org/onap/ccsdk/sli/plugins/yangserializers/pnserializer/DefaultPropertiesNodeWalker.java b/restconf-client/provider/src/main/java/org/onap/ccsdk/sli/plugins/yangserializers/pnserializer/DefaultPropertiesNodeWalker.java index f23452653..5034530d5 100644 --- a/restconf-client/provider/src/main/java/org/onap/ccsdk/sli/plugins/yangserializers/pnserializer/DefaultPropertiesNodeWalker.java +++ b/restconf-client/provider/src/main/java/org/onap/ccsdk/sli/plugins/yangserializers/pnserializer/DefaultPropertiesNodeWalker.java @@ -20,11 +20,11 @@ package org.onap.ccsdk.sli.plugins.yangserializers.pnserializer; -import org.onap.ccsdk.sli.core.sli.SvcLogicException; - import java.util.Collection; import java.util.Map; +import org.onap.ccsdk.sli.core.sli.SvcLogicException; + /** * Implementation of properties node walker which helps in forming a new tree from properties node. * @@ -110,6 +110,7 @@ public class DefaultPropertiesNodeWalker implements Propert .children()); case SINGLE_INSTANCE_LEAF_NODE: case MULTI_INSTANCE_LEAF_NODE: + case ANY_XML_NODE: return null; default: throw new IllegalArgumentException("No more types allowed"); diff --git a/restconf-client/provider/src/main/java/org/onap/ccsdk/sli/plugins/yangserializers/pnserializer/InnerNode.java b/restconf-client/provider/src/main/java/org/onap/ccsdk/sli/plugins/yangserializers/pnserializer/InnerNode.java index 0711a7cff..1cf99b2d4 100644 --- a/restconf-client/provider/src/main/java/org/onap/ccsdk/sli/plugins/yangserializers/pnserializer/InnerNode.java +++ b/restconf-client/provider/src/main/java/org/onap/ccsdk/sli/plugins/yangserializers/pnserializer/InnerNode.java @@ -20,13 +20,13 @@ package org.onap.ccsdk.sli.plugins.yangserializers.pnserializer; +import java.util.HashMap; +import java.util.Map; + import org.onap.ccsdk.sli.core.sli.SvcLogicException; import org.opendaylight.yangtools.yang.model.api.AugmentationSchemaNode; import org.opendaylight.yangtools.yang.model.api.DataSchemaNode; -import java.util.HashMap; -import java.util.Map; - import static org.onap.ccsdk.sli.plugins.yangserializers.pnserializer.MdsalPropertiesNodeUtils.addToAugmentations; import static org.onap.ccsdk.sli.plugins.yangserializers.pnserializer.MdsalPropertiesNodeUtils.createNode; import static org.onap.ccsdk.sli.plugins.yangserializers.pnserializer.MdsalPropertiesNodeUtils.getAugmentationNode; @@ -112,15 +112,18 @@ public abstract class InnerNode extends PropertiesNode { } AugmentationSchemaNode augSchema = null; - if (((DataSchemaNode) appInfo).isAugmenting()) { - augSchema = findCorrespondingAugment(((DataSchemaNode) this.appInfo()), - ((DataSchemaNode) appInfo)); - } - String uri = getUri(this, name, namespace); node = new LeafNode(name, namespace, uri, this, appInfo, type, value); - node.valueNs(valueNs); + + if (type != NodeType.ANY_XML_NODE) { + if (((DataSchemaNode) appInfo).isAugmenting()) { + augSchema = findCorrespondingAugment( + ((DataSchemaNode) this.appInfo()), + ((DataSchemaNode) appInfo)); + } + node.valueNs(valueNs); + } if (augSchema != null && !isNamespaceAsParent(this, node)) { addToAugmentations(augSchema, this, node); diff --git a/restconf-client/provider/src/main/java/org/onap/ccsdk/sli/plugins/yangserializers/pnserializer/MdsalPropertiesNodeSerializer.java b/restconf-client/provider/src/main/java/org/onap/ccsdk/sli/plugins/yangserializers/pnserializer/MdsalPropertiesNodeSerializer.java index 0eca40d06..8a6e75668 100644 --- a/restconf-client/provider/src/main/java/org/onap/ccsdk/sli/plugins/yangserializers/pnserializer/MdsalPropertiesNodeSerializer.java +++ b/restconf-client/provider/src/main/java/org/onap/ccsdk/sli/plugins/yangserializers/pnserializer/MdsalPropertiesNodeSerializer.java @@ -44,6 +44,7 @@ import static org.onap.ccsdk.sli.plugins.yangserializers.pnserializer.MdsalPrope import static org.onap.ccsdk.sli.plugins.yangserializers.pnserializer.MdsalPropertiesNodeUtils.getRevision; import static org.onap.ccsdk.sli.plugins.yangserializers.pnserializer.MdsalPropertiesNodeUtils.getValueNamespace; import static org.onap.ccsdk.sli.plugins.yangserializers.pnserializer.MdsalPropertiesNodeUtils.resolveName; +import static org.onap.ccsdk.sli.plugins.yangserializers.pnserializer.NodeType.ANY_XML_NODE; import static org.onap.ccsdk.sli.plugins.yangserializers.pnserializer.NodeType.MULTI_INSTANCE_LEAF_NODE; import static org.onap.ccsdk.sli.plugins.yangserializers.pnserializer.NodeType.MULTI_INSTANCE_NODE; import static org.onap.ccsdk.sli.plugins.yangserializers.pnserializer.NodeType.SINGLE_INSTANCE_LEAF_NODE; @@ -81,6 +82,8 @@ public class MdsalPropertiesNodeSerializer extends PropertiesNodeSerializer entry : paramMap.entrySet()) { String[] names = entry.getKey().split("\\."); for (int i = 0; i < names.length; i++) { @@ -97,6 +100,15 @@ public class MdsalPropertiesNodeSerializer extends PropertiesNodeSerializer paramMap, + String rootUri) { + String isReqStr = rootUri + "." + "isNonAppend"; + String val = paramMap.get(isReqStr); + if (val != null && val.equals("true")) { + node.nonAppend(true); + } + } + /** * Converts all the params in the svc logic context into a valid param by * replacing the underscore in module name to colon at necessary places. @@ -150,7 +162,7 @@ public class MdsalPropertiesNodeSerializer extends PropertiesNodeSerializer augmentations = ArrayListMultimap.create(); /** @@ -106,6 +107,16 @@ public abstract class PropertiesNode { this.appInfo = appInfo; } + /** + * Sets to true if module name is required in forming a request; false + * otherwise. + * + * @param isNotReq true if required; false otherwise + */ + public void nonAppend(boolean isNotReq) { + this.nonAppend = isNotReq; + } + /** * Returns parent. * @@ -160,6 +171,15 @@ public abstract class PropertiesNode { return nodeType; } + /** + * Returns if module name is required. + * + * @return status of module name if required + */ + public boolean nonAppend() { + return nonAppend; + } + /** * Returns augmentations. * 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 45e8eb3f1..aa1e50d6a 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 @@ -46,8 +46,10 @@ 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.restconfapicall.RestconfApiUtils.parseUrl; +import static org.onap.ccsdk.sli.plugins.yangserializers.dfserializer.DataFormatUtilsTest.DECODE_ANYXML_RESPONSE; 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_ANYXML; import static org.onap.ccsdk.sli.plugins.yangserializers.dfserializer.DataFormatUtilsTest.ENCODE_TO_JSON_ID; import static org.onap.ccsdk.sli.plugins.yangserializers.dfserializer.DataFormatUtilsTest.ENCODE_TO_JSON_ID_PUT; import static org.onap.ccsdk.sli.plugins.yangserializers.dfserializer.DataFormatUtilsTest.ENCODE_TO_JSON_RPC; @@ -148,6 +150,24 @@ public class DataFormatSerializerTest { assertThat(dfCaptor.getResult(), is(ENCODE_TO_JSON_ID)); } + /** + * Verifies encoding of parameters to JSON data format any xml in it. + * + * @throws SvcLogicException when test case fails + */ + @Test + public void encodeForAnyXml() throws SvcLogicException { + String pre = "execution-service_process."; + SvcLogicContext ctx = createAnyXmlAttList(pre); + p.put("dirPath", "src/test/resources"); + p.put("format", "json"); + p.put("httpMethod", "post"); + p.put("restapiUrl", "http://echo.getpostman" + + ".com/api/v1/execution-service/process"); + restconf.sendRequest(p, ctx); + assertThat(dfCaptor.getResult(), is(ENCODE_TO_ANYXML)); + } + /** * Verifies encoding of parameters to JSON data format with identity-ref * and inter-file linking for put operation-type. @@ -500,6 +520,27 @@ public class DataFormatSerializerTest { verifyAttListRpc(ctx, outPre); } + /** + * Verifies encoding of and decoding from, JSON for ANYXML. + * + * @throws SvcLogicException when test case fails + */ + @Test + public void codecForNormalAnyXml() throws SvcLogicException { + createMockForDecode(DECODE_ANYXML_RESPONSE); + String inPre = "execution-service_process."; + SvcLogicContext ctx = createAnyXmlAttList(inPre); + p.put("dirPath", "src/test/resources"); + p.put("format", "json"); + p.put("httpMethod", "post"); + p.put("responsePrefix", "pp"); + p.put("restapiUrl", "http://echo.getpostman" + + ".com/api/v1/execution-service/process"); + restconf.sendRequest(p, ctx); + assertThat(dfCaptor.getResult(), is(ENCODE_TO_ANYXML)); + verifyOutputOfAnyXml(ctx); + } + /** * Verifies encoding of and decoding from, XML respectively for data * format with containers, grouping and augment. @@ -546,6 +587,12 @@ public class DataFormatSerializerTest { 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 url11 = "https://182.2.61.24:2250/api/v1/execution-service" + + "/process"; + String url12 = "https://182.2.61.24:2250/api/v1/execution-service" + + "/process/payload"; + String url13 = "https://182.2.61.24:2250/api/v1/execution-service" + + "/process/payload/"; String val1 = parseUrl(url1, POST); String val2 = parseUrl(url2, GET); String val3 = parseUrl(url3, PATCH); @@ -556,6 +603,9 @@ public class DataFormatSerializerTest { String val8 = parseUrl(url8, POST); String val9 = parseUrl(url9, GET); String val10 = parseUrl(url10, POST); + String val11 = parseUrl(url11, POST); + String val12 = parseUrl(url12, POST); + String val13 = parseUrl(url13, POST); assertThat(val1, is(actVal)); assertThat(val2, is(actVal)); assertThat(val3, is(actVal)); @@ -566,6 +616,43 @@ public class DataFormatSerializerTest { assertThat(val8, is(actVal)); assertThat(val9, is(actVal)); assertThat(val10, is(actVal)); + assertThat(val11, is("execution-service:process")); + assertThat(val12, is("execution-service:process/payload")); + assertThat(val13, is("execution-service:process/payload/")); + } + + /** + * Creates attribute list for encoding JSON or XML with ANYXML YANG + * file. + * + * @param pre prefix + * @return service logic context + */ + private SvcLogicContext createAnyXmlAttList(String pre) { + SvcLogicContext ctx = new SvcLogicContext(); + String pre1 = pre + "commonHeader."; + String pre2 = pre + "actionIdentifiers."; + ctx.setAttribute(pre + "isNonAppend", "true"); + ctx.setAttribute(pre1 + "originatorId", "SDNC_DG"); + ctx.setAttribute(pre1 + "requestId", "123456-1000"); + ctx.setAttribute(pre1 + "subRequestId", "sub-123456-1000"); + ctx.setAttribute(pre2 + "blueprintName", + "baseconfiguration"); + ctx.setAttribute(pre2 + "blueprintVersion", "1.0.0"); + ctx.setAttribute(pre2 + "actionName", "assign-activate"); + ctx.setAttribute(pre2 + "mode", "sync"); + ctx.setAttribute(pre + "payload." + + "template-prefix", "vDNS-test"); + ctx.setAttribute(pre + "payload.resource-assignment-request" + + ".resource-assignment-properties", + "{\n" + + " \"service-instance-id\": " + + "\"1234\",\n" + + " \"vnf-id\": \"3526\",\n" + + " \"customer-name\": \"htipl\",\n" + + " \"subscriber-name\": \"huawei\"\n" + + " }"); + return ctx; } /** @@ -834,6 +921,51 @@ public class DataFormatSerializerTest { assertThat(ctx.getAttribute(pre + "cont13.leaf28"), is("abc")); } + /** + * Verifies the attribute list for decoding from JSON or XML with + * ANYXML YANG file. + * + * @param ctx service logic context + */ + private void verifyOutputOfAnyXml(SvcLogicContext ctx) { + System.out.println(ctx.getAttribute("pp.status.eventType")); + assertThat(ctx.getAttribute("pp.status.eventType"), is( + "EVENT_COMPONENT_EXECUTED")); + assertThat(ctx.getAttribute("pp.actionIdentifiers.blueprintName"), + is("golden")); + assertThat(ctx.getAttribute("pp.actionIdentifiers.mode"), + is("sync")); + assertThat(ctx.getAttribute("pp.stepData.name"), + is("resource-assignment")); + assertThat(ctx.getAttribute("pp.status.message"), + is("success")); + assertThat(ctx.getAttribute("pp.commonHeader.originatorId"), + is("System")); + assertThat(ctx.getAttribute("pp.status.code"), + is("200")); + assertThat(ctx.getAttribute("pp.commonHeader.requestId"), + is("1234")); + assertThat(ctx.getAttribute("pp.commonHeader.subRequestId"), + is("1234-12234")); + assertThat(ctx.getAttribute("pp.commonHeader.timestamp"), + is("2019-05-18T23:42:41.658Z")); + assertThat(ctx.getAttribute("pp.status.timestamp"), + is("2019-05-18T23:42:41.950Z")); + assertThat(ctx.getAttribute("pp.actionIdentifiers.blueprintV" + + "ersion"), is("1.0.0")); + assertThat(ctx.getAttribute("pp.actionIdentifiers.actionName"), + is("resource-assignment")); + assertThat(ctx.getAttribute("pp.payload.resource-assignment-resp" + + "onse.meshed-template.vf-module-1"), + is("\n This i" + + "s the Virtual Firewall entity\n" + + " 10.0.101.20/24\n" + + "")); + assertThat(ctx.getAttribute("pp.actionIdentifiers.actionName"), + is("resource-assignment")); + } + + /** * Captures the data format messages by mocking it, which can be used in * testing the value. diff --git a/restconf-client/provider/src/test/java/org/onap/ccsdk/sli/plugins/yangserializers/dfserializer/DataFormatUtilsTest.java b/restconf-client/provider/src/test/java/org/onap/ccsdk/sli/plugins/yangserializers/dfserializer/DataFormatUtilsTest.java index a7814e10e..c1bb71985 100644 --- a/restconf-client/provider/src/test/java/org/onap/ccsdk/sli/plugins/yangserializers/dfserializer/DataFormatUtilsTest.java +++ b/restconf-client/provider/src/test/java/org/onap/ccsdk/sli/plugins/yangserializers/dfserializer/DataFormatUtilsTest.java @@ -69,6 +69,31 @@ public final class DataFormatUtilsTest { " \"identity-test:l\": \"abc\"\n" + "}"; + static final String ENCODE_TO_ANYXML = "{\n" + + " \"actionIdentifiers\": {\n" + + " \"mode\": \"sync\",\n" + + " \"blueprintName\": \"baseconfiguration\",\n" + + " \"blueprintVersion\": \"1.0.0\",\n" + + " \"actionName\": \"assign-activate\"\n" + + " },\n" + + " \"payload\": {\n" + + " \"template-prefix\": \"vDNS-test\",\n" + + " \"resource-assignment-request\": {\n" + + " \"resource-assignment-properties\": {\n" + + " \"service-instance-id\": \"1234\",\n" + + " \"vnf-id\": \"3526\",\n" + + " \"customer-name\": \"htipl\",\n" + + " \"subscriber-name\": \"huawei\"\n" + + " }\n" + + " }\n" + + " },\n" + + " \"commonHeader\": {\n" + + " \"subRequestId\": \"sub-123456-1000\",\n" + + " \"requestId\": \"123456-1000\",\n" + + " \"originatorId\": \"SDNC_DG\"\n" + + " }\n" + + "}"; + static final String ENCODE_TO_JSON_ID_PUT = "{\n" + " \"identity-test:test\": {\n" + " \"con1\": {" + addSpace(ENCODE_TO_JSON_ID_COMMON, 4) + @@ -485,6 +510,45 @@ public final class DataFormatUtilsTest { " }\n" + "}"; + static final String DECODE_ANYXML_RESPONSE = "{\n" + + " \"commonHeader\": {\n" + + " \"timestamp\": \"2019-05-18T23:42:41.658Z\",\n" + + " \"originatorId\": \"System\",\n" + + " \"requestId\": \"1234\",\n" + + " \"subRequestId\": \"1234-12234\",\n" + + " \"flags\": null\n" + + " },\n" + + " \"actionIdentifiers\": {\n" + + " \"blueprintName\": \"golden\",\n" + + " \"blueprintVersion\": \"1.0.0\",\n" + + " \"actionName\": \"resource-assignment\",\n" + + " \"mode\": \"sync\"\n" + + " },\n" + + " \"status\": {\n" + + " \"code\": 200,\n" + + " \"eventType\": \"EVENT_COMPONENT_EXECUTED\",\n" + + " \"timestamp\": \"2019-05-18T23:42:41.950Z\",\n" + + " \"errorMessage\": null,\n" + + " \"message\": \"success\"\n" + + " },\n" + + " \"payload\": {\n" + + " \"resource-assignment-response\": {\n" + + " \"meshed-template\": {\n" + + " \"vf-module-1\": \"\\n " + + " This is the Virtual Firewall entity\\n 10.0.101.20/24\\n\"\n" + + " }\n" + + " }\n" + + " },\n" + + " \"stepData\": {\n" + + " \"name\": \"resource-assignment\",\n" + + " \"properties\": {\n" + + " \"resource-assignment-params\": null,\n" + + " \"status\": null\n" + + " }\n" + + " }\n" + + "}"; + static final String ENCODE_TO_XML_RPC = "\n" + "\n" + diff --git a/restconf-client/provider/src/test/resources/yang/execution-service.yang b/restconf-client/provider/src/test/resources/yang/execution-service.yang new file mode 100644 index 000000000..d7cf68f12 --- /dev/null +++ b/restconf-client/provider/src/test/resources/yang/execution-service.yang @@ -0,0 +1,43 @@ +module execution-service { + yang-version 1.1; + namespace "cds:workflow:rest"; + prefix "cds"; + + revision "2019-05-21"; + + container process { + container commonHeader { + leaf originatorId { + type string; + } + leaf requestId { + type string; + } + leaf subRequestId { + type string; + } + } + container actionIdentifiers { + leaf blueprintName { + type string; + } + leaf blueprintVersion { + type string; + } + leaf actionName { + type string; + } + leaf mode { + type string; + } + } + container payload { + leaf-list template-prefix { + type string; + } + container resource-assignment-request { + anyxml resource-assignment-properties; + } + } + } +} -- cgit 1.2.3-korg From a7430938d2b83b6fe9b03360ff54206fd1259885 Mon Sep 17 00:00:00 2001 From: "Smokowski, Kevin (ks6305)" Date: Fri, 17 May 2019 21:09:28 +0000 Subject: implement generic retry and partners in restapicallnode implement generic retry and partners in restapicallnode Change-Id: I436622dda5a5a83b029c935b929f43e05d37a2a0 Issue-ID: CCSDK-1343 Signed-off-by: Smokowski, Kevin (ks6305) --- .../ccsdk/sli/plugins/restapicall/Parameters.java | 1 + .../sli/plugins/restapicall/PartnerDetails.java | 14 + .../sli/plugins/restapicall/RestapiCallNode.java | 169 ++++--- .../ccsdk/sli/plugins/restapicall/RetryPolicy.java | 59 +-- .../sli/plugins/restapicall/RetryPolicyStore.java | 50 -- .../plugins/restapicall/TestRestapiCallNode.java | 348 +++----------- .../plugins/restapicall/TestRestapiCallNode.java | 511 +++++++++++++++++++++ .../provider/src/test/resources/partners.json | 16 + .../restconfapicall/RestconfApiCallNode.java | 57 +-- 9 files changed, 747 insertions(+), 478 deletions(-) mode change 100644 => 100755 restapi-call-node/provider/src/main/java/org/onap/ccsdk/sli/plugins/restapicall/Parameters.java create mode 100755 restapi-call-node/provider/src/main/java/org/onap/ccsdk/sli/plugins/restapicall/PartnerDetails.java mode change 100644 => 100755 restapi-call-node/provider/src/main/java/org/onap/ccsdk/sli/plugins/restapicall/RestapiCallNode.java delete mode 100644 restapi-call-node/provider/src/main/java/org/onap/ccsdk/sli/plugins/restapicall/RetryPolicyStore.java mode change 100644 => 100755 restapi-call-node/provider/src/test/java/org/onap/ccsdk/sli/plugins/restapicall/TestRestapiCallNode.java create mode 100755 restapi-call-node/provider/src/test/org/onap/ccsdk/sli/plugins/restapicall/TestRestapiCallNode.java create mode 100755 restapi-call-node/provider/src/test/resources/partners.json (limited to 'restconf-client/provider') diff --git a/restapi-call-node/provider/src/main/java/org/onap/ccsdk/sli/plugins/restapicall/Parameters.java b/restapi-call-node/provider/src/main/java/org/onap/ccsdk/sli/plugins/restapicall/Parameters.java old mode 100644 new mode 100755 index aeb07c4d6..8b9cdc39c --- a/restapi-call-node/provider/src/main/java/org/onap/ccsdk/sli/plugins/restapicall/Parameters.java +++ b/restapi-call-node/provider/src/main/java/org/onap/ccsdk/sli/plugins/restapicall/Parameters.java @@ -26,6 +26,7 @@ import java.util.Set; public class Parameters { public String templateFileName; public String restapiUrl; + public String restapiUrlSuffix; public String restapiUser; public String restapiPassword; public Format format; diff --git a/restapi-call-node/provider/src/main/java/org/onap/ccsdk/sli/plugins/restapicall/PartnerDetails.java b/restapi-call-node/provider/src/main/java/org/onap/ccsdk/sli/plugins/restapicall/PartnerDetails.java new file mode 100755 index 000000000..1cd4b99bb --- /dev/null +++ b/restapi-call-node/provider/src/main/java/org/onap/ccsdk/sli/plugins/restapicall/PartnerDetails.java @@ -0,0 +1,14 @@ +package org.onap.ccsdk.sli.plugins.restapicall; + +public class PartnerDetails { + protected String username; + protected String password; + protected String url; + + public PartnerDetails(String username, String password, String url) { + this.username = username; + this.password = password; + this.url = url; + } + +} diff --git a/restapi-call-node/provider/src/main/java/org/onap/ccsdk/sli/plugins/restapicall/RestapiCallNode.java b/restapi-call-node/provider/src/main/java/org/onap/ccsdk/sli/plugins/restapicall/RestapiCallNode.java old mode 100644 new mode 100755 index 9b50eaa44..34e5dec21 --- a/restapi-call-node/provider/src/main/java/org/onap/ccsdk/sli/plugins/restapicall/RestapiCallNode.java +++ b/restapi-call-node/provider/src/main/java/org/onap/ccsdk/sli/plugins/restapicall/RestapiCallNode.java @@ -37,6 +37,7 @@ import java.util.ArrayList; import java.util.Collections; import java.util.HashMap; import java.util.HashSet; +import java.util.Iterator; import java.util.List; import java.util.Map; import java.util.Map.Entry; @@ -57,7 +58,10 @@ import javax.ws.rs.core.MediaType; import javax.ws.rs.core.MultivaluedMap; import javax.ws.rs.core.Response; import javax.ws.rs.core.UriBuilder; +import javax.ws.rs.core.Response; import org.apache.commons.lang3.StringUtils; +import org.codehaus.jettison.json.JSONException; +import org.codehaus.jettison.json.JSONObject; import org.glassfish.jersey.client.ClientProperties; import org.glassfish.jersey.client.HttpUrlConnectorProvider; import org.glassfish.jersey.client.authentication.HttpAuthenticationFeature; @@ -66,6 +70,8 @@ import org.glassfish.jersey.client.oauth1.OAuth1ClientSupport; import org.glassfish.jersey.media.multipart.MultiPart; import org.glassfish.jersey.media.multipart.MultiPartFeature; import org.glassfish.jersey.media.multipart.file.FileDataBodyPart; +import org.glassfish.jersey.client.oauth1.ConsumerCredentials; +import org.glassfish.jersey.client.oauth1.OAuth1ClientSupport; import org.onap.ccsdk.sli.core.sli.SvcLogicContext; import org.onap.ccsdk.sli.core.sli.SvcLogicException; import org.onap.ccsdk.sli.core.sli.SvcLogicJavaPlugin; @@ -74,34 +80,36 @@ import org.slf4j.LoggerFactory; public class RestapiCallNode implements SvcLogicJavaPlugin { - protected static final String DME2_PROPERTIES_FILE_NAME = "dme2.properties"; + protected static final String PARTNERS_FILE_NAME = "partners.json"; protected static final String UEB_PROPERTIES_FILE_NAME = "ueb.properties"; protected static final String DEFAULT_PROPERTIES_DIR = "/opt/onap/ccsdk/data/properties"; protected static final String PROPERTIES_DIR_KEY = "SDNC_CONFIG_DIR"; private static final Logger log = LoggerFactory.getLogger(RestapiCallNode.class); - protected RetryPolicyStore retryPolicyStore; private String uebServers; private String defaultUebTemplateFileName = "/opt/bvc/restapi/templates/default-ueb-message.json"; private String responseReceivedMessage = "Response received. Time: {}"; private String responseHttpCodeMessage = "HTTP response code: {}"; private String requestPostingException = "Exception while posting http request to client "; - private static String skipSendingMessage = "skipSending"; - private static String responsePrefix = "responsePrefix"; - private static String restapiUrlString = "restapiUrl"; + protected static final String skipSendingMessage = "skipSending"; + protected static final String responsePrefix = "responsePrefix"; + protected static final String restapiUrlString = "restapiUrl"; + protected static final String restapiUserKey = "restapiUser"; + protected static final String restapiPasswordKey = "restapiPassword"; - public RestapiCallNode() { - String configDir = System.getProperty(PROPERTIES_DIR_KEY, DEFAULT_PROPERTIES_DIR); + protected HashMap partnerStore; - try (FileInputStream in = new FileInputStream(configDir + "/" + DME2_PROPERTIES_FILE_NAME)) { - Properties props = new Properties(); - props.load(in); - retryPolicyStore = new RetryPolicyStore(); - retryPolicyStore.setProxyServers(props.getProperty("proxyUrl")); - log.info("DME2 support enabled"); + public RestapiCallNode() { + String configDir = System.getProperty(PROPERTIES_DIR_KEY, DEFAULT_PROPERTIES_DIR); + try { + String jsonString = readFile(configDir + "/" + PARTNERS_FILE_NAME); + JSONObject partners = new JSONObject(jsonString); + partnerStore = new HashMap(); + loadPartners(partners); + log.info("Partners support enabled"); } catch (Exception e) { - log.warn("DME2 properties could not be read, DME2 support will not be enabled.", e); + log.warn("Partners file could not be read, Partner support will not be enabled.", e); } try (FileInputStream in = new FileInputStream(configDir + "/" + UEB_PROPERTIES_FILE_NAME)) { @@ -114,6 +122,35 @@ public class RestapiCallNode implements SvcLogicJavaPlugin { } } + protected void loadPartners(JSONObject partners) { + Iterator keys = partners.keys(); + String partnerUserKey = "user"; + String partnerPasswordKey = "password"; + String partnerUrlKey = "url"; + + while (keys.hasNext()) { + String partnerKey = keys.next(); + try { + JSONObject partnerObject = (JSONObject) partners.get(partnerKey); + if (partnerObject.has(partnerUserKey) && partnerObject.has(partnerPasswordKey)) { + String url = null; + if (partnerObject.has(partnerUrlKey)) { + url = partnerObject.getString(partnerUrlKey); + } + String userName = partnerObject.getString(partnerUserKey); + String password = partnerObject.getString(partnerPasswordKey); + PartnerDetails details = new PartnerDetails(userName, password, url); + partnerStore.put(partnerKey, details); + log.info("mapped partner using partner key " + partnerKey); + } else { + log.info("Partner " + partnerKey + " is missing required keys, it won't be mapped"); + } + } catch (JSONException e) { + log.info("Couldn't map the partner using partner key " + partnerKey, e); + } + } + } + /** * Returns parameters from the parameter map. * @@ -125,14 +162,21 @@ public class RestapiCallNode implements SvcLogicJavaPlugin { public static Parameters getParameters(Map paramMap, Parameters p) throws SvcLogicException { - p.templateFileName = parseParam(paramMap, "templateFileName", + + p.templateFileName = parseParam(paramMap, "templateFileName", false, null); p.requestBody = parseParam(paramMap, "requestBody", false, null); p.restapiUrl = parseParam(paramMap, restapiUrlString, true, null); validateUrl(p.restapiUrl); - p.restapiUser = parseParam(paramMap, "restapiUser", false, null); - p.restapiPassword = parseParam(paramMap, "restapiPassword", false, + p.restapiUrlSuffix = parseParam(paramMap, "restapiUrlSuffix", + false, null); + p.restapiUser = parseParam(paramMap, restapiUserKey, false, null); + p.restapiPassword = parseParam(paramMap, restapiPasswordKey, false, null); + if(p.restapiUrlSuffix != null) { + p.restapiUrl = p.restapiUrl + p.restapiUrlSuffix; + validateUrl(p.restapiUrl); + } p.oAuthConsumerKey = parseParam(paramMap, "oAuthConsumerKey", false, null); p.oAuthConsumerSecret = parseParam(paramMap, "oAuthConsumerSecret", @@ -185,14 +229,19 @@ public class RestapiCallNode implements SvcLogicJavaPlugin { * @param restapiUrl rest api URL * @throws SvcLogicException when URL validation fails */ - private static void validateUrl(String restapiUrl) - throws SvcLogicException { - try { - URI.create(restapiUrl); - } catch (IllegalArgumentException e) { - throw new SvcLogicException("Invalid input of url " - + e.getLocalizedMessage(), e); - } + private static void validateUrl(String restapiUrl) throws SvcLogicException { + if (restapiUrl.contains(",")) { + String[] urls = restapiUrl.split(","); + for(String url : urls) { + validateUrl(url); + } + } else { + try { + URI.create(restapiUrl); + } catch (IllegalArgumentException e) { + throw new SvcLogicException("Invalid input of url " + e.getLocalizedMessage(), e); + } + } } /** @@ -262,14 +311,6 @@ public class RestapiCallNode implements SvcLogicJavaPlugin { return value.toString(); } - public RetryPolicyStore getRetryPolicyStore() { - return retryPolicyStore; - } - - public void setRetryPolicyStore(RetryPolicyStore retryPolicyStore) { - this.retryPolicyStore = retryPolicyStore; - } - /** * Allows Directed Graphs the ability to interact with REST APIs. * @param paramMap HashMap of parameters passed by the DG to this function @@ -293,7 +334,7 @@ public class RestapiCallNode implements SvcLogicJavaPlugin { * convertResponse Optionalwhether the response should be convertedtrue or false * customHttpHeadersOptionala list additional http headers to be passed in, follow the format in the exampleX-CSI-MessageId=messageId,headerFieldName=headerFieldValue * dumpHeadersOptionalwhen true writes http header content to context memorytrue or false - * partnerOptionalneeded for DME2 callsdme2proxy + * partnerOptionalused to retrieve username, password and url if partner store existsaaf * returnRequestPayloadOptionalused to return payload built in the requesttrue or false * * @@ -306,15 +347,17 @@ public class RestapiCallNode implements SvcLogicJavaPlugin { sendRequest(paramMap, ctx, null); } - public void sendRequest(Map paramMap, SvcLogicContext ctx, Integer retryCount) + protected void sendRequest(Map paramMap, SvcLogicContext ctx, RetryPolicy retryPolicy) throws SvcLogicException { - RetryPolicy retryPolicy = null; HttpResponse r = new HttpResponse(); try { + handlePartner(paramMap); Parameters p = getParameters(paramMap, new Parameters()); - if (p.partner != null) { - retryPolicy = retryPolicyStore.getRetryPolicy(p.partner); + if(p.restapiUrl.contains(",") && retryPolicy == null) { + String[] urls = p.restapiUrl.split(","); + retryPolicy = new RetryPolicy(urls,urls.length * 2); + p.restapiUrl = urls[0]; } String pp = p.responsePrefix != null ? p.responsePrefix + '.' : ""; @@ -367,36 +410,20 @@ public class RestapiCallNode implements SvcLogicJavaPlugin { if (retryPolicy == null || !shouldRetry) { setFailureResponseStatus(ctx, prefix, e.getMessage(), r); } else { - if (retryCount == null) { - retryCount = 0; - } - String retryMessage = retryCount + " attempts were made out of " + retryPolicy.getMaximumRetries() + - " maximum retries."; - log.debug(retryMessage); + log.debug(retryPolicy.getRetryMessage()); try { - retryCount = retryCount + 1; - if (retryCount < retryPolicy.getMaximumRetries() + 1) { - URI uri = new URI(paramMap.get(restapiUrlString)); - String hostname = uri.getHost(); - String retryString = retryPolicy.getNextHostName(uri.toString()); - URI uriTwo = new URI(retryString); - URI retryUri = UriBuilder.fromUri(uri).host(uriTwo.getHost()).port(uriTwo.getPort()).scheme( - uriTwo.getScheme()).build(); - paramMap.put(restapiUrlString, retryUri.toString()); - log.debug("URL was set to {}", retryUri.toString()); - log.debug("Failed to communicate with host {}. Request will be re-attempted using the host {}.", - hostname, retryString); - log.debug("This is retry attempt {} out of {}", retryCount, retryPolicy.getMaximumRetries()); - sendRequest(paramMap, ctx, retryCount); + //calling getNextHostName increments the retry count so it should be called before shouldRetry + String retryString = retryPolicy.getNextHostName(); + if (retryPolicy.shouldRetry()) { + paramMap.put(restapiUrlString, retryString); + log.debug("retry attempt {} will use the retry url {}", retryPolicy.getRetryCount(), retryString); + sendRequest(paramMap, ctx, retryPolicy); } else { - log.debug("Maximum retries reached, calling setFailureResponseStatus."); + log.debug("Maximum retries reached, won't attempt to retry. Calling setFailureResponseStatus."); setFailureResponseStatus(ctx, prefix, e.getMessage(), r); } } catch (Exception ex) { - log.error("Could not attempt retry.", ex); - String retryErrorMessage = - "Retry attempt has failed. No further retry shall be attempted, calling " + - "setFailureResponseStatus."; + String retryErrorMessage = "Retry attempt " + retryPolicy.getRetryCount() + "has failed with error message " + ex.getMessage(); setFailureResponseStatus(ctx, prefix, retryErrorMessage, r); } } @@ -407,6 +434,18 @@ public class RestapiCallNode implements SvcLogicJavaPlugin { } } + protected void handlePartner(Map paramMap) { + String partner = paramMap.get("partner"); + if (partner != null && partner.length() > 0) { + PartnerDetails details = partnerStore.get(partner); + paramMap.put(restapiUserKey, details.username); + paramMap.put(restapiPasswordKey, details.password); + if(paramMap.get(restapiUrlString) == null) { + paramMap.put(restapiUrlString, details.url); + } + } + } + protected String buildXmlJsonRequest(SvcLogicContext ctx, String template, Format format) throws SvcLogicException { log.info("Building {} started", format); @@ -571,6 +610,7 @@ public class RestapiCallNode implements SvcLogicJavaPlugin { .builder(new ConsumerCredentials(p.oAuthConsumerKey, p.oAuthConsumerSecret)) .version(p.oAuthVersion).signatureMethod(p.oAuthSignatureMethod).feature().build(); client.register(oAuth1Feature); + } } else { if (p.authtype == AuthType.DIGEST) { @@ -636,13 +676,12 @@ public class RestapiCallNode implements SvcLogicJavaPlugin { WebTarget webTarget = addAuthType(client, p).target(p.restapiUrl); - log.info("Sending request:"); + log.info("Sending request below to url " + p.restapiUrl); log.info(request); long t1 = System.currentTimeMillis(); HttpResponse r = new HttpResponse(); r.code = 200; - String accept = p.accept; if(accept == null) { accept = p.format == Format.XML ? "application/xml" : "application/json"; diff --git a/restapi-call-node/provider/src/main/java/org/onap/ccsdk/sli/plugins/restapicall/RetryPolicy.java b/restapi-call-node/provider/src/main/java/org/onap/ccsdk/sli/plugins/restapicall/RetryPolicy.java index 54c86fefc..65684d937 100644 --- a/restapi-call-node/provider/src/main/java/org/onap/ccsdk/sli/plugins/restapicall/RetryPolicy.java +++ b/restapi-call-node/provider/src/main/java/org/onap/ccsdk/sli/plugins/restapicall/RetryPolicy.java @@ -21,40 +21,41 @@ */ package org.onap.ccsdk.sli.plugins.restapicall; - public class RetryPolicy { private String[] hostnames; private Integer maximumRetries; - - public RetryPolicy(String[] hostnames, Integer maximumRetries){ - this.hostnames = hostnames; - this.maximumRetries = maximumRetries; + + private int position; + + private int retryCount; + public RetryPolicy(String[] hostnames, Integer maximumRetries) { + this.hostnames = hostnames; + this.maximumRetries = maximumRetries; + + this.position = 0; + + this.retryCount = 0; } - public Integer getMaximumRetries() { - return maximumRetries; + return maximumRetries; + } + public int getRetryCount() { + return retryCount; + } + public Boolean shouldRetry() { + return retryCount < maximumRetries + 1; + } + public String getRetryMessage() { + return retryCount + " retry attempts were made out of " + maximumRetries + " maximum retry attempts."; } - public String getNextHostName(String uri) throws RetryException { - Integer position = null; - - for (int i = 0; i < hostnames.length; i++) { - if (uri.contains(hostnames[i])) { - position = i; - break; - } - } - - if(position == null){ - throw new RetryException("No match found for the provided uri[" + uri + "] " + - "so the next host name could not be retreived"); - } - position++; - - if (position > hostnames.length - 1) { - position = 0; - } - return hostnames[position]; + public String getNextHostName() throws RetryException { + retryCount++; + position++; + + if (position > hostnames.length - 1) { + position = 0; + } + return hostnames[position]; } - -} +} \ No newline at end of file diff --git a/restapi-call-node/provider/src/main/java/org/onap/ccsdk/sli/plugins/restapicall/RetryPolicyStore.java b/restapi-call-node/provider/src/main/java/org/onap/ccsdk/sli/plugins/restapicall/RetryPolicyStore.java deleted file mode 100644 index f68b851d3..000000000 --- a/restapi-call-node/provider/src/main/java/org/onap/ccsdk/sli/plugins/restapicall/RetryPolicyStore.java +++ /dev/null @@ -1,50 +0,0 @@ -/*- - * ============LICENSE_START======================================================= - * openECOMP : SDN-C - * ================================================================================ - * Copyright (C) 2017 AT&T Intellectual Property. All rights - * reserved. - * Modifications Copyright © 2018 IBM. - * ================================================================================ - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * ============LICENSE_END========================================================= - */ - -package org.onap.ccsdk.sli.plugins.restapicall; - -import java.util.HashMap; - -public class RetryPolicyStore { - HashMap retryPolicies; - public String proxyServers; - - public RetryPolicyStore() { - retryPolicies = new HashMap<>(); - } - - public String getProxyServers() { - return proxyServers; - } - - public void setProxyServers(String admServers) { - this.proxyServers = admServers; - String[] adminServersArray = admServers.split(","); - RetryPolicy adminPortalRetry = new RetryPolicy(adminServersArray, adminServersArray.length); - retryPolicies.put("dme2proxy", adminPortalRetry); - } - - public RetryPolicy getRetryPolicy(String policyName) { - return (this.retryPolicies.get(policyName)); - } - -} diff --git a/restapi-call-node/provider/src/test/java/org/onap/ccsdk/sli/plugins/restapicall/TestRestapiCallNode.java b/restapi-call-node/provider/src/test/java/org/onap/ccsdk/sli/plugins/restapicall/TestRestapiCallNode.java old mode 100644 new mode 100755 index bdf67dc45..0704d297a --- a/restapi-call-node/provider/src/test/java/org/onap/ccsdk/sli/plugins/restapicall/TestRestapiCallNode.java +++ b/restapi-call-node/provider/src/test/java/org/onap/ccsdk/sli/plugins/restapicall/TestRestapiCallNode.java @@ -21,16 +21,19 @@ package org.onap.ccsdk.sli.plugins.restapicall; -import static org.hamcrest.MatcherAssert.assertThat; -import static org.hamcrest.core.Is.is; -import java.net.URI; +import static org.junit.Assert.assertEquals; +import static org.junit.Assert.assertNotNull; +import static org.junit.Assert.assertNull; + import java.util.HashMap; import java.util.Map; + import org.codehaus.jettison.json.JSONObject; import org.glassfish.grizzly.http.server.HttpServer; import org.glassfish.jersey.grizzly2.httpserver.GrizzlyHttpServerFactory; import org.glassfish.jersey.media.multipart.MultiPartFeature; import org.glassfish.jersey.server.ResourceConfig; + import org.junit.Test; import org.onap.ccsdk.sli.core.sli.SvcLogicContext; import org.onap.ccsdk.sli.core.sli.SvcLogicException; @@ -40,9 +43,9 @@ import org.slf4j.LoggerFactory; public class TestRestapiCallNode { + @SuppressWarnings("unused") private static final Logger log = LoggerFactory.getLogger(TestRestapiCallNode.class); - @Test public void testDelete() throws SvcLogicException { SvcLogicContext ctx = new SvcLogicContext(); @@ -64,7 +67,6 @@ public class TestRestapiCallNode { ctx.setAttribute("prop.name", "site1"); - Map p = new HashMap<>(); p.put("templateFileName", "src/test/resources/sdwan-site.json"); p.put("restapiUrl", "https://echo.getpostman.com/delete"); @@ -77,61 +79,6 @@ public class TestRestapiCallNode { rcn.sendRequest(p, ctx); } - @Test - public void testJsonSdwanVpnTopologyTemplate() throws SvcLogicException { - SvcLogicContext ctx = new SvcLogicContext(); - - ctx.setAttribute("prop.topology", "topoType"); - - ctx.setAttribute("prop.roles_length", "1"); - ctx.setAttribute("prop.roles[0]", "role1"); - - ctx.setAttribute("prop.siteAttachement_length", "2"); - - ctx.setAttribute("prop.siteAttachement[0].siteId", "site1"); - ctx.setAttribute("prop.siteAttachement[0].roles_length", "0"); - ctx.setAttribute("prop.siteAttachement[0].roles[0]", "role1"); - ctx.setAttribute("prop.siteAttachement[0].roles[1]", "role3"); - - ctx.setAttribute("prop.siteAttachement[1].siteId", "site2"); - ctx.setAttribute("prop.siteAttachement[1].roles_length", "1"); - ctx.setAttribute("prop.siteAttachement[1].roles[0]", "role2"); - - Map p = new HashMap<>(); - p.put("templateFileName", "src/test/resources/sdwan-vpn-topology.json"); - p.put("restapiUrl", "http://echo.getpostman.com"); - p.put("restapiUser", "user1"); - p.put("restapiPassword", "abc123"); - p.put("format", "json"); - p.put("httpMethod", "post"); - p.put("responsePrefix", "response"); - p.put("skipSending", "true"); - - RestapiCallNode rcn = new RestapiCallNode(); - rcn.sendRequest(p, ctx); - } - - @Test - public void testJsonSdwanSiteTemplate() throws SvcLogicException { - SvcLogicContext ctx = new SvcLogicContext(); - - ctx.setAttribute("prop.name", "site1"); - - - Map p = new HashMap<>(); - p.put("templateFileName", "src/test/resources/sdwan-site.json"); - p.put("restapiUrl", "http://echo.getpostman.com"); - p.put("restapiUser", "user1"); - p.put("restapiPassword", "abc123"); - p.put("format", "json"); - p.put("httpMethod", "post"); - p.put("responsePrefix", "response"); - p.put("skipSending", "true"); - - RestapiCallNode rcn = new RestapiCallNode(); - rcn.sendRequest(p, ctx); - } - @Test public void testJsonTemplate() throws SvcLogicException { SvcLogicContext ctx = new SvcLogicContext(); @@ -250,33 +197,6 @@ public class TestRestapiCallNode { rcn.sendRequest(p, ctx); } - @Test(expected = SvcLogicException.class) - public void testFormData() throws SvcLogicException { - SvcLogicContext ctx = new SvcLogicContext(); - ctx.setAttribute("tmp.sdn-circuit-req-row_length", "1"); - ctx.setAttribute("tmp.sdn-circuit-req-row[0].source-uid", "APIDOC-123"); - ctx.setAttribute("tmp.sdn-circuit-req-row[0].action", "delete"); - ctx.setAttribute("tmp.sdn-circuit-req-row[0].request-timestamp", "2016-09-09 16:30:35.0"); - ctx.setAttribute("tmp.sdn-circuit-req-row[0].request-status", "New"); - ctx.setAttribute("tmp.sdn-circuit-req-row[0].processing-status", "New"); - ctx.setAttribute("tmp.sdn-circuit-req-row[0].service-clfi", "testClfi1"); - ctx.setAttribute("tmp.sdn-circuit-req-row[0].clci", "clci"); - - Map p = new HashMap<>(); - p.put("templateFileName", "src/test/resources/test-template.json"); - p.put("restapiUrl", "http://echo.getpostman.com"); - p.put("restapiUser", "user1"); - p.put("restapiPassword", "abc123"); - p.put("format", "json"); - p.put("httpMethod", "post"); - p.put("responsePrefix", "response"); - p.put("skipSending", "false"); - p.put("multipartFormData", "true"); - p.put("multipartFile", "src/test/resources/test-template.json"); - - RestapiCallNode rcn = new RestapiCallNode(); - rcn.sendRequest(p, ctx); - } @Test(expected = SvcLogicException.class) public void testWithInvalidURI() throws SvcLogicException { @@ -525,202 +445,74 @@ public class TestRestapiCallNode { RestapiCallNode rcn = new RestapiCallNode(); rcn.sendRequest(p, ctx); } - - @Test - public void testDeleteOAuthType() throws SvcLogicException { - SvcLogicContext ctx = new SvcLogicContext(); - - Map p = new HashMap<>(); - p.put("restapiUrl", "https://echo.getpostman.com/delete"); - p.put("oAuthConsumerKey", "f2a1ed52710d4533bde25be6da03b6e3"); - p.put("oAuthConsumerSecret", "secret"); - p.put("oAuthSignatureMethod", "plainTEXT"); - p.put("oAuthVersion", "1.0"); - p.put("httpMethod", "delete"); - p.put("format", "none"); - p.put("skipSending", "true"); - - RestapiCallNode rcn = new RestapiCallNode(); - rcn.sendRequest(p, ctx); - } - - @Test - public void testDeleteAuthTypeBasic() throws SvcLogicException { - SvcLogicContext ctx = new SvcLogicContext(); - - Map p = new HashMap<>(); - p.put("restapiUrl", "https://echo.getpostman.com/delete"); - p.put("authType", "basic"); - p.put("restapiUser", "admin"); - p.put("restapiPassword", "admin123"); - p.put("httpMethod", "delete"); - p.put("format", "none"); - p.put("skipSending", "true"); - - RestapiCallNode rcn = new RestapiCallNode(); - rcn.sendRequest(p, ctx); - } - - @Test - public void testDeleteAuthTypeDigest() throws SvcLogicException { - SvcLogicContext ctx = new SvcLogicContext(); - - Map p = new HashMap<>(); - p.put("restapiUrl", "https://echo.getpostman.com/delete"); - p.put("authType", "digest"); - p.put("restapiUser", "admin"); - p.put("restapiPassword", "admin123"); - p.put("httpMethod", "delete"); - p.put("format", "none"); - p.put("skipSending", "true"); - - RestapiCallNode rcn = new RestapiCallNode(); - rcn.sendRequest(p, ctx); - } - - @Test - public void testDeleteAuthTypeOAuth() throws SvcLogicException { - SvcLogicContext ctx = new SvcLogicContext(); - - Map p = new HashMap<>(); - p.put("restapiUrl", "https://echo.getpostman.com/delete"); - p.put("authType", "oauth"); - p.put("oAuthConsumerKey", "f2a1ed52710d4533bde25be6da03b6e3"); - p.put("oAuthConsumerSecret", "secret"); - p.put("oAuthSignatureMethod", "plainTEXT"); - p.put("oAuthVersion", "1.0"); - p.put("httpMethod", "delete"); - p.put("format", "none"); - p.put("skipSending", "true"); - - RestapiCallNode rcn = new RestapiCallNode(); - rcn.sendRequest(p, ctx); - } - - @Test - public void testDeleteAuthTypeNoneOAuth() throws SvcLogicException { - SvcLogicContext ctx = new SvcLogicContext(); - - Map p = new HashMap<>(); - p.put("restapiUrl", "https://echo.getpostman.com/delete"); - p.put("oAuthConsumerKey", "f2a1ed52710d4533bde25be6da03b6e3"); - p.put("oAuthConsumerSecret", "secret"); - p.put("oAuthSignatureMethod", "plainTEXT"); - p.put("oAuthVersion", "1.0"); - p.put("httpMethod", "delete"); - p.put("format", "none"); - p.put("skipSending", "true"); - - RestapiCallNode rcn = new RestapiCallNode(); - rcn.sendRequest(p, ctx); - } - @Test - public void testDeleteAuthTypeNoneBasic() throws SvcLogicException { - SvcLogicContext ctx = new SvcLogicContext(); - - Map p = new HashMap<>(); - p.put("restapiUrl", "https://echo.getpostman.com/delete"); - p.put("restapiUser", "admin"); - p.put("restapiPassword", "admin123"); - p.put("httpMethod", "delete"); - p.put("format", "none"); - p.put("skipSending", "true"); - - RestapiCallNode rcn = new RestapiCallNode(); - rcn.sendRequest(p, ctx); - } - - @Test(expected = SvcLogicException.class) - public void testInvalidDeleteAuthTypeOAuth() throws SvcLogicException { - SvcLogicContext ctx = new SvcLogicContext(); - - Map p = new HashMap<>(); - p.put("restapiUrl", "https://echo.getpostman.com/delete"); - p.put("authType", "oauth"); - p.put("oAuthConsumerKey", "f2a1ed52710d4533bde25be6da03b6e3"); - p.put("oAuthConsumerSecret", "secret"); - p.put("httpMethod", "delete"); - p.put("format", "none"); - p.put("skipSending", "true"); - - RestapiCallNode rcn = new RestapiCallNode(); - rcn.sendRequest(p, ctx); - } - - @Test(expected = SvcLogicException.class) - public void testInvalidDeleteAuthTypeBasic() throws SvcLogicException { - SvcLogicContext ctx = new SvcLogicContext(); - - Map p = new HashMap<>(); - p.put("restapiUrl", "https://echo.getpostman.com/delete"); - p.put("authType", "basic"); - p.put("oAuthConsumerKey", "f2a1ed52710d4533bde25be6da03b6e3"); - p.put("oAuthConsumerSecret", "secret"); - p.put("httpMethod", "delete"); - p.put("format", "none"); - p.put("skipSending", "true"); - - RestapiCallNode rcn = new RestapiCallNode(); - rcn.sendRequest(p, ctx); - } - - @Test(expected = SvcLogicException.class) - public void testInvalidDeleteAuthTypeDigest() throws SvcLogicException { - SvcLogicContext ctx = new SvcLogicContext(); - - Map p = new HashMap<>(); - p.put("restapiUrl", "https://echo.getpostman.com/delete"); - p.put("authType", "digest"); - p.put("oAuthConsumerKey", "f2a1ed52710d4533bde25be6da03b6e3"); - p.put("oAuthConsumerSecret", "secret"); - p.put("httpMethod", "delete"); - p.put("format", "none"); - p.put("skipSending", "true"); - - RestapiCallNode rcn = new RestapiCallNode(); - rcn.sendRequest(p, ctx); - } - + /* + * { + "partnerOne": { + "url": "http://localhost:7001" 4 http://uebsb93kcdc.it.att.com:3904", + "test": "/metrics" + }, + "partnerTwo": { + "url": "http://localhost:7002", + "user": "controller_user", + "password": "P@ssword", + "test": "/metrics" + }, + "partnerThree": { + "url": "http://localhost:7003", + "user": "controller_admin" + } +} + */ @Test - public void testMultipartFormData() throws SvcLogicException { - final ResourceConfig resourceConfig = new ResourceConfig( - MultipartServerMock.class, MultiPartFeature.class); - HttpServer server = GrizzlyHttpServerFactory.createHttpServer( - URI.create("http://localhost:8080/"),resourceConfig); + public void testPartners() throws Exception{ + String partnerTwoKey = "partnerTwo"; + String partnerTwoUsername = "controller_user"; + String partnerTwoPassword = "P@ssword"; - Map p = new HashMap<>(); - p.put("multipartFormData", "true"); - p.put("format", "none"); - p.put("multipartFile", "src/test/resources/test-template.json"); - p.put("restapiUrl", "http://localhost:8080/file-upload/upload"); - - SvcLogicContext ctx = new SvcLogicContext(); + System.setProperty("SDNC_CONFIG_DIR", "src/test/resources"); RestapiCallNode rcn = new RestapiCallNode(); - rcn.sendRequest(p, ctx); - assertThat(ctx.getAttribute("response-code"), is("200")); - assertThat(ctx.getAttribute("httpResponse"), is( "test-template.json")); - server.shutdownNow(); + assertNull(rcn.partnerStore.get("partnerOne")); + PartnerDetails details = rcn.partnerStore.get(partnerTwoKey); + assertEquals(partnerTwoUsername,details.username); + assertEquals(partnerTwoPassword,details.password); + assertNull(rcn.partnerStore.get("partnerThree")); + + //In this scenario the caller expects username, password and url to be picked up from the partners json + Map paramMap = new HashMap(); + paramMap.put("partner", partnerTwoKey); + rcn.handlePartner(paramMap ); + assertEquals(partnerTwoUsername,paramMap.get(rcn.restapiUserKey)); + assertEquals(partnerTwoPassword,paramMap.get(rcn.restapiPasswordKey)); + assertEquals("http://localhost:7002",paramMap.get(rcn.restapiUrlString)); + + //In this scenario the caller expects username, password and url to be picked up from the partners json + //the provided suffix will be appended to the default url from the partners json + paramMap = new HashMap(); + paramMap.put("partner", partnerTwoKey); + paramMap.put("restapiUrlSuffix", "/networking/v1/instance/3"); + rcn.handlePartner(paramMap); + Parameters p = new Parameters(); + RestapiCallNode.getParameters(paramMap, p); + assertEquals(partnerTwoUsername,p.restapiUser); + assertEquals(partnerTwoPassword,p.restapiPassword); + assertEquals("http://localhost:7002/networking/v1/instance/3",p.restapiUrl); } - + @Test - public void testCookieResponse() throws SvcLogicException { - final ResourceConfig resourceConfig = new ResourceConfig( - MockCookieAuthServer.class); - HttpServer server = GrizzlyHttpServerFactory.createHttpServer( - URI.create("http://localhost:8080/"),resourceConfig); - - Map p = new HashMap<>(); - p.put("format", "none"); - p.put("httpMethod", "get"); - p.put("restapiUrl", "http://localhost:8080/get-cookie/cookie"); - p.put("dumpHeaders", "true"); - - SvcLogicContext ctx = new SvcLogicContext(); - RestapiCallNode rcn = new RestapiCallNode(); - rcn.sendRequest(p, ctx); - assertThat(ctx.getAttribute("response-code"), is("200")); - assertThat(ctx.getAttribute("header.Set-Cookie"), is("cookieResponse=cookieValueInReturn;Version=1")); - server.shutdownNow(); + public void retryPolicyBean() throws Exception { + Integer retries = 3; + String first = "http://localhost:7001"; + String second = "http://localhost:7001"; + + RetryPolicy p = new RetryPolicy(new String[] {first,second}, retries); + assertEquals(retries,p.getMaximumRetries()); + assertNotNull(p.getRetryMessage()); + String next = p.getNextHostName(); + assertEquals(second,next); + assertEquals(1,p.getRetryCount()); + next = p.getNextHostName(); + assertEquals(first,next); + assertEquals(2,p.getRetryCount()); } @Test diff --git a/restapi-call-node/provider/src/test/org/onap/ccsdk/sli/plugins/restapicall/TestRestapiCallNode.java b/restapi-call-node/provider/src/test/org/onap/ccsdk/sli/plugins/restapicall/TestRestapiCallNode.java new file mode 100755 index 000000000..50371278a --- /dev/null +++ b/restapi-call-node/provider/src/test/org/onap/ccsdk/sli/plugins/restapicall/TestRestapiCallNode.java @@ -0,0 +1,511 @@ +/*- + * ============LICENSE_START======================================================= + * openECOMP : SDN-C + * ================================================================================ + * Copyright (C) 2017 AT&T Intellectual Property. All rights + * reserved. + * ================================================================================ + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============LICENSE_END========================================================= + */ + +package org.onap.ccsdk.sli.plugins.restapicall; + +import static org.junit.Assert.assertEquals; +import static org.junit.Assert.assertNotNull; +import static org.junit.Assert.assertNull; + +import java.util.HashMap; +import java.util.Map; +import org.junit.Test; +import org.onap.ccsdk.sli.core.sli.SvcLogicContext; +import org.onap.ccsdk.sli.core.sli.SvcLogicException; +import org.onap.ccsdk.sli.plugins.restapicall.RestapiCallNode; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +public class TestRestapiCallNode { + + @SuppressWarnings("unused") + private static final Logger log = LoggerFactory.getLogger(TestRestapiCallNode.class); + + + @Test + public void testDelete() throws SvcLogicException { + SvcLogicContext ctx = new SvcLogicContext(); + + Map p = new HashMap<>(); + p.put("restapiUrl", "https://echo.getpostman.com/delete"); + p.put("restapiUser", "user1"); + p.put("restapiPassword", "pwd1"); + p.put("httpMethod", "delete"); + p.put("skipSending", "true"); + + RestapiCallNode rcn = new RestapiCallNode(); + rcn.sendRequest(p, ctx); + } + + @Test + public void testDeleteWithPayload() throws SvcLogicException { + SvcLogicContext ctx = new SvcLogicContext(); + + ctx.setAttribute("prop.name", "site1"); + + Map p = new HashMap<>(); + p.put("templateFileName", "src/test/resources/sdwan-site.json"); + p.put("restapiUrl", "https://echo.getpostman.com/delete"); + p.put("restapiUser", "user1"); + p.put("restapiPassword", "pwd1"); + p.put("httpMethod", "delete"); + p.put("skipSending", "true"); + + RestapiCallNode rcn = new RestapiCallNode(); + rcn.sendRequest(p, ctx); + } + + @Test + public void testJsonTemplate() throws SvcLogicException { + SvcLogicContext ctx = new SvcLogicContext(); + ctx.setAttribute("tmp.sdn-circuit-req-row_length", "3"); + ctx.setAttribute("tmp.sdn-circuit-req-row[0].source-uid", "APIDOC-123"); + ctx.setAttribute("tmp.sdn-circuit-req-row[0].action", "delete"); + ctx.setAttribute("tmp.sdn-circuit-req-row[0].request-timestamp", "2016-09-09 16:30:35.0"); + ctx.setAttribute("tmp.sdn-circuit-req-row[0].request-status", "New"); + ctx.setAttribute("tmp.sdn-circuit-req-row[0].processing-status", "New"); + ctx.setAttribute("tmp.sdn-circuit-req-row[0].service-clfi", "testClfi1"); + ctx.setAttribute("tmp.sdn-circuit-req-row[0].clci", "clci"); + ctx.setAttribute("tmp.sdn-circuit-req-row[1].source-uid", "APIDOC-123"); + ctx.setAttribute("tmp.sdn-circuit-req-row[1].action", "delete"); + ctx.setAttribute("tmp.sdn-circuit-req-row[1].request-timestamp", "2016-09-09 16:30:35.0"); + ctx.setAttribute("tmp.sdn-circuit-req-row[1].request-status", "New"); + ctx.setAttribute("tmp.sdn-circuit-req-row[1].processing-status", "New"); + ctx.setAttribute("tmp.sdn-circuit-req-row[1].service-clfi", "testClfi1"); + ctx.setAttribute("tmp.sdn-circuit-req-row[1].clci", "clci"); + ctx.setAttribute("tmp.sdn-circuit-req-row[2].source-uid", "APIDOC-123"); + ctx.setAttribute("tmp.sdn-circuit-req-row[2].action", "delete"); + ctx.setAttribute("tmp.sdn-circuit-req-row[2].request-timestamp", "2016-09-09 16:30:35.0"); + ctx.setAttribute("tmp.sdn-circuit-req-row[2].request-status", "New"); + ctx.setAttribute("tmp.sdn-circuit-req-row[2].processing-status", "New"); + ctx.setAttribute("tmp.sdn-circuit-req-row[2].service-clfi", "testClfi1"); + ctx.setAttribute("tmp.sdn-circuit-req-row[2].clci", "clci"); + + Map p = new HashMap<>(); + p.put("templateFileName", "src/test/resources/test-template.json"); + p.put("restapiUrl", "http://echo.getpostman.com"); + p.put("restapiUser", "user1"); + p.put("restapiPassword", "abc123"); + p.put("format", "json"); + p.put("httpMethod", "post"); + p.put("responsePrefix", "response"); + p.put("skipSending", "true"); + + RestapiCallNode rcn = new RestapiCallNode(); + rcn.sendRequest(p, ctx); + } + + @Test + public void testInvalidRepeatTimes() throws SvcLogicException { + SvcLogicContext ctx = new SvcLogicContext(); + ctx.setAttribute("tmp.sdn-circuit-req-row_length", "a"); + ctx.setAttribute("tmp.sdn-circuit-req-row[0].source-uid", "APIDOC-123"); + ctx.setAttribute("tmp.sdn-circuit-req-row[0].action", "delete"); + ctx.setAttribute("tmp.sdn-circuit-req-row[0].request-timestamp", "2016-09-09 16:30:35.0"); + ctx.setAttribute("tmp.sdn-circuit-req-row[0].request-status", "New"); + ctx.setAttribute("tmp.sdn-circuit-req-row[0].processing-status", "New"); + ctx.setAttribute("tmp.sdn-circuit-req-row[0].service-clfi", "testClfi1"); + ctx.setAttribute("tmp.sdn-circuit-req-row[0].clci", "clci"); + + Map p = new HashMap<>(); + p.put("templateFileName", "src/test/resources/test-template.json"); + p.put("restapiUrl", "http://echo.getpostman.com"); + p.put("restapiUser", "user1"); + p.put("restapiPassword", "abc123"); + p.put("format", "json"); + p.put("httpMethod", "post"); + p.put("responsePrefix", "response"); + p.put("skipSending", "true"); + + RestapiCallNode rcn = new RestapiCallNode(); + rcn.sendRequest(p, ctx); + } + + @Test(expected = SvcLogicException.class) + public void testInvalidTemplatePath() throws SvcLogicException { + SvcLogicContext ctx = new SvcLogicContext(); + ctx.setAttribute("tmp.sdn-circuit-req-row_length", "1"); + ctx.setAttribute("tmp.sdn-circuit-req-row[0].source-uid", "APIDOC-123"); + ctx.setAttribute("tmp.sdn-circuit-req-row[0].action", "delete"); + ctx.setAttribute("tmp.sdn-circuit-req-row[0].request-timestamp", "2016-09-09 16:30:35.0"); + ctx.setAttribute("tmp.sdn-circuit-req-row[0].request-status", "New"); + ctx.setAttribute("tmp.sdn-circuit-req-row[0].processing-status", "New"); + ctx.setAttribute("tmp.sdn-circuit-req-row[0].service-clfi", "testClfi1"); + ctx.setAttribute("tmp.sdn-circuit-req-row[0].clci", "clci"); + + Map p = new HashMap<>(); + p.put("templateFileName", "src/test/resourcess/test-template.json"); + p.put("restapiUrl", "http://echo.getpostman.com"); + p.put("restapiUser", "user1"); + p.put("restapiPassword", "abc123"); + p.put("format", "json"); + p.put("httpMethod", "post"); + p.put("responsePrefix", "response"); + p.put("skipSending", "true"); + + RestapiCallNode rcn = new RestapiCallNode(); + rcn.sendRequest(p, ctx); + } + + @Test(expected = SvcLogicException.class) + public void testWithoutSkipSending() throws SvcLogicException { + SvcLogicContext ctx = new SvcLogicContext(); + ctx.setAttribute("tmp.sdn-circuit-req-row_length", "1"); + ctx.setAttribute("tmp.sdn-circuit-req-row[0].source-uid", "APIDOC-123"); + ctx.setAttribute("tmp.sdn-circuit-req-row[0].action", "delete"); + ctx.setAttribute("tmp.sdn-circuit-req-row[0].request-timestamp", "2016-09-09 16:30:35.0"); + ctx.setAttribute("tmp.sdn-circuit-req-row[0].request-status", "New"); + ctx.setAttribute("tmp.sdn-circuit-req-row[0].processing-status", "New"); + ctx.setAttribute("tmp.sdn-circuit-req-row[0].service-clfi", "testClfi1"); + ctx.setAttribute("tmp.sdn-circuit-req-row[0].clci", "clci"); + + Map p = new HashMap<>(); + p.put("templateFileName", "src/test/resources/test-template.json"); + p.put("restapiUrl", "http://echo.getpostman.com"); + p.put("restapiUser", "user1"); + p.put("restapiPassword", "abc123"); + p.put("format", "json"); + p.put("httpMethod", "post"); + p.put("responsePrefix", "response"); + p.put("skipSending", "false"); + + RestapiCallNode rcn = new RestapiCallNode(); + rcn.sendRequest(p, ctx); + } + + + @Test(expected = SvcLogicException.class) + public void testWithInvalidURI() throws SvcLogicException { + SvcLogicContext ctx = new SvcLogicContext(); + ctx.setAttribute("tmp.sdn-circuit-req-row_length", "1"); + ctx.setAttribute("tmp.sdn-circuit-req-row[0].source-uid", "APIDOC-123"); + ctx.setAttribute("tmp.sdn-circuit-req-row[0].action", "delete"); + ctx.setAttribute("tmp.sdn-circuit-req-row[0].request-timestamp", "2016-09-09 16:30:35.0"); + ctx.setAttribute("tmp.sdn-circuit-req-row[0].request-status", "New"); + ctx.setAttribute("tmp.sdn-circuit-req-row[0].processing-status", "New"); + ctx.setAttribute("tmp.sdn-circuit-req-row[0].service-clfi", "testClfi1"); + ctx.setAttribute("tmp.sdn-circuit-req-row[0].clci", "clci"); + + Map p = new HashMap<>(); + p.put("templateFileName", "src/test/resources/test-template.json"); + p.put("restapiUrl", "http://echo. getpostman.com"); + p.put("restapiUser", "user1"); + p.put("restapiPassword", "abc123"); + p.put("format", "json"); + p.put("httpMethod", "post"); + p.put("responsePrefix", "response"); + p.put("skipSending", "false"); + + RestapiCallNode rcn = new RestapiCallNode(); + rcn.sendRequest(p, ctx); + } + + @Test + public void testVpnJsonTemplate() throws SvcLogicException { + SvcLogicContext ctx = new SvcLogicContext(); + ctx.setAttribute("prop.l3vpn.name", "10000000-0000-0000-0000-000000000001"); + ctx.setAttribute("prop.l3vpn.topology", "point_to_point"); + + Map p = new HashMap<>(); + p.put("templateFileName", "src/test/resources/l3smvpntemplate.json"); + p.put("restapiUrl", "http://ipwan:18002/restconf/data/huawei-ac-net-l3vpn-svc:l3vpn-svc-cfg/vpn-services"); + p.put("restapiUser", "admin"); + p.put("restapiPassword", "admin123"); + p.put("format", "json"); + p.put("httpMethod", "post"); + p.put("responsePrefix", "restapi-result"); + p.put("skipSending", "true"); + + RestapiCallNode rcn = new RestapiCallNode(); + rcn.sendRequest(p, ctx); + } + + @Test + public void testSiteJsonTemplate() throws SvcLogicException { + SvcLogicContext ctx = new SvcLogicContext(); + ctx.setAttribute("prop.l3vpn.name", "10000000-0000-0000-0000-000000000001"); + ctx.setAttribute("prop.l3vpn.topology", "point_to_point"); + + ctx.setAttribute("prop.l3vpn.site1_name", "10000000-0000-0000-0000-000000000002"); + ctx.setAttribute("prop.l3vpn.vpn-policy1-id", "10000000-0000-0000-0000-000000000003"); + ctx.setAttribute("prop.l3vpn.entry1-id", "1"); + ctx.setAttribute("prop.l3vpn.sna1_name", "10000000-0000-0000-0000-000000000004"); + ctx.setAttribute("prop.l3vpn.pe1_id", "a8098c1a-f86e-11da-bd1a-00112444be1e"); + ctx.setAttribute("prop.l3vpn.ac1_id", "a8098c1a-f86e-11da-bd1a-00112444be1b"); + ctx.setAttribute("prop.l3vpn.ac1-peer-ip", "192.168.1.1"); + ctx.setAttribute("prop.l3vpn.ac1-ip", "192.168.1.2"); + ctx.setAttribute("prop.l3vpn.sna1_svlan", "100"); + ctx.setAttribute("prop.l3vpn.ac1_protocol", "static"); + ctx.setAttribute("prop.l3vpn.sna1-route.ip-prefix", "192.168.1.1/24"); + ctx.setAttribute("prop.l3vpn.sna1-route.next-hop", "192.168.1.4"); + + ctx.setAttribute("prop.l3vpn.site2_name", "10000000-0000-0000-0000-000000000005"); + ctx.setAttribute("prop.l3vpn.vpn-policy2-id", "10000000-0000-0000-0000-000000000006"); + ctx.setAttribute("prop.l3vpn.entry2-id", "1"); + ctx.setAttribute("prop.l3vpn.sna2_name", "10000000-0000-0000-0000-000000000007"); + ctx.setAttribute("prop.l3vpn.pe2_id", "a8098c1a-f86e-11da-bd1a-00112444be1a"); + ctx.setAttribute("prop.l3vpn.ac2_id", "a8098c1a-f86e-11da-bd1a-00112444be1c"); + ctx.setAttribute("prop.l3vpn.ac2-peer-ip", "192.168.1.6"); + ctx.setAttribute("prop.l3vpn.ac2-ip", "192.168.1.5"); + ctx.setAttribute("prop.l3vpn.sna2_svlan", "200"); + ctx.setAttribute("prop.l3vpn.ac2_protocol", "bgp"); + ctx.setAttribute("prop.l3vpn.peer2-ip", "192.168.1.7"); + ctx.setAttribute("prop.l3vpn.ac2_protocol_bgp_as", "200"); + + Map p = new HashMap<>(); + p.put("templateFileName", "src/test/resources/l3smsitetemplate.json"); + p.put("restapiUrl", "http://ipwan:18002/restconf/data/huawei-ac-net-l3vpn-svc:l3vpn-svc-cfg/sites"); + p.put("restapiUser", "admin"); + p.put("restapiPassword", "admin123"); + p.put("format", "json"); + p.put("httpMethod", "post"); + p.put("responsePrefix", "restapi-result"); + p.put("skipSending", "true"); + + RestapiCallNode rcn = new RestapiCallNode(); + rcn.sendRequest(p, ctx); + } + + @Test + public void testVrfJsonTemplate() throws SvcLogicException { + SvcLogicContext ctx = new SvcLogicContext(); + ctx.setAttribute("prop.l3vpn.vrf1-id", "10000000-0000-0000-0000-000000000007"); + ctx.setAttribute("prop.l3vpn.vpn-policy1-id", "10000000-0000-0000-0000-000000000003"); + ctx.setAttribute("prop.l3vpn.pe1_id", "a8098c1a-f86e-11da-bd1a-00112444be1e"); + ctx.setAttribute("prop.l3vpn.vrf2-id", "10000000-0000-0000-0000-000000000009"); + ctx.setAttribute("prop.l3vpn.vpn-policy2-id", "10000000-0000-0000-0000-000000000006"); + ctx.setAttribute("prop.l3vpn.pe2_id", "a8098c1a-f86e-11da-bd1a-00112444be1a"); + + Map p = new HashMap<>(); + p.put("templateFileName", "src/test/resources/l3smvrftemplate.json"); + p.put("restapiUrl", "http://ipwan:18002/restconf/data/huawei-ac-net-l3vpn-svc:l3vpn-svc-cfg/vrf-attributes"); + p.put("restapiUser", "admin"); + p.put("restapiPassword", "admin123"); + p.put("format", "json"); + p.put("httpMethod", "post"); + p.put("responsePrefix", "restapi-result"); + p.put("skipSending", "true"); + + RestapiCallNode rcn = new RestapiCallNode(); + rcn.sendRequest(p, ctx); + } + + @Test + public void testDeleteVpnJsonTemplate() throws SvcLogicException { + SvcLogicContext ctx = new SvcLogicContext(); + ctx.setAttribute("prop.l3vpn.name", "10000000-0000-0000-0000-000000000001"); + ctx.setAttribute("prop.l3vpn.topology", "point_to_point"); + + Map p = new HashMap<>(); + //p.put("templateFileName", "src/test/resources/l3smvpntemplate.json"); + p.put("restapiUrl", "http://ipwan:18002/restconf/data/huawei-ac-net-l3vpn-svc:l3vpn-svc-cfg/vpn-services" + + "/vpnservice=10000000-0000-0000-0000-000000000001"); + p.put("restapiUser", "admin"); + p.put("restapiPassword", "admin123"); + p.put("format", "json"); + p.put("httpMethod", "delete"); + p.put("responsePrefix", "restapi-result"); + p.put("skipSending", "true"); + + RestapiCallNode rcn = new RestapiCallNode(); + rcn.sendRequest(p, ctx); + } + + @Test + public void testL2DciTemplate() throws SvcLogicException { + SvcLogicContext ctx = new SvcLogicContext(); + ctx.setAttribute("prop.dci-connects.id", "Id1"); + ctx.setAttribute("prop.dci-connects.name", "Name1"); + ctx.setAttribute("prop.dci-connects.local_networks[0]", "NetId1"); + ctx.setAttribute("prop.dci-connects.local_networks[1]", "NetId2"); + ctx.setAttribute("prop.dci-connects.evpn_irts[0]", "100:1"); + ctx.setAttribute("prop.dci-connects.evpn_erts[0]", "100:2"); + ctx.setAttribute("prop.dci-connects.evpn_irts[1]", "200:1"); + ctx.setAttribute("prop.dci-connects.evpn_erts[1]", "200:2"); + ctx.setAttribute("prop.dci-connects.vni", "1"); + + Map p = new HashMap<>(); + p.put("templateFileName", "src/test/resources/l2-dci-connects-template.json"); + p.put("restapiUrl", "http://echo.getpostman.com"); + p.put("restapiUser", "user1"); + p.put("restapiPassword", "abc123"); + p.put("format", "json"); + p.put("httpMethod", "post"); + p.put("responsePrefix", "response"); + p.put("skipSending", "true"); + + RestapiCallNode rcn = new RestapiCallNode(); + rcn.sendRequest(p, ctx); + } + + @Test + public void testL3DciTemplate() throws SvcLogicException { + SvcLogicContext ctx = new SvcLogicContext(); + ctx.setAttribute("prop.dci-connects.id", "Id1"); + ctx.setAttribute("prop.dci-connects.name", "Name1"); + ctx.setAttribute("prop.dci-connects.local_networks_length", "2"); + ctx.setAttribute("prop.dci-connects.local_networks[0]", "NetId1"); + ctx.setAttribute("prop.dci-connects.local_networks[1]", "NetId2"); + ctx.setAttribute("prop.dci-connects.evpn_irts[0]", "100:1"); + ctx.setAttribute("prop.dci-connects.evpn_erts[0]", "100:2"); + ctx.setAttribute("prop.dci-connects.evpn_irts[1]", "200:1"); + ctx.setAttribute("prop.dci-connects.evpn_erts[1]", "200:2"); + ctx.setAttribute("prop.dci-connects.vni", "1"); + + Map p = new HashMap<>(); + p.put("templateFileName", "src/test/resources/l3-dci-connects-template.json"); + p.put("restapiUrl", "http://echo.getpostman.com"); + p.put("restapiUser", "user1"); + p.put("restapiPassword", "abc123"); + p.put("format", "json"); + p.put("httpMethod", "post"); + p.put("responsePrefix", "response"); + p.put("skipSending", "true"); + + RestapiCallNode rcn = new RestapiCallNode(); + rcn.sendRequest(p, ctx); + + } + + @Test + public void testControllerTokenTemplate() throws SvcLogicException { + SvcLogicContext ctx = new SvcLogicContext(); + ctx.setAttribute("prop.sdncRestApi.thirdpartySdnc.user", "admin"); + ctx.setAttribute("prop.sdncRestApi.thirdpartySdnc.password", "admin123"); + + Map p = new HashMap<>(); + p.put("templateFileName", "src/test/resources/actokentemplate.json"); + p.put("restapiUrl", "https://ipwan:18002/controller/v2/tokens"); + p.put("format", "json"); + p.put("httpMethod", "post"); + p.put("responsePrefix", "restapi-result"); + p.put("skipSending", "true"); + + RestapiCallNode rcn = new RestapiCallNode(); + rcn.sendRequest(p, ctx); + } + + + @Test + public void testDeleteNoneAsContentType() throws SvcLogicException { + SvcLogicContext ctx = new SvcLogicContext(); + + Map p = new HashMap<>(); + p.put("restapiUrl", "https://echo.getpostman.com/delete"); + p.put("restapiUser", "user1"); + p.put("restapiPassword", "pwd1"); + p.put("httpMethod", "delete"); + p.put("format", "none"); + p.put("skipSending", "true"); + + RestapiCallNode rcn = new RestapiCallNode(); + rcn.sendRequest(p, ctx); + } + + @Test + public void testPostNoneAsContentType() throws SvcLogicException { + SvcLogicContext ctx = new SvcLogicContext(); + ctx.setAttribute("prop.l3vpn.name", "10000000-0000-0000-0000-000000000001"); + ctx.setAttribute("prop.l3vpn.topology", "point_to_point"); + + Map p = new HashMap<>(); + p.put("templateFileName", "src/test/resources/l3smvpntemplate.json"); + p.put("restapiUrl", "http://ipwan:18002/restconf/data/huawei-ac-net-l3vpn-svc:l3vpn-svc-cfg/vpn-services"); + p.put("restapiUser", "admin"); + p.put("restapiPassword", "admin123"); + p.put("format", "none"); + p.put("httpMethod", "post"); + p.put("responsePrefix", "restapi-result"); + p.put("skipSending", "true"); + + RestapiCallNode rcn = new RestapiCallNode(); + rcn.sendRequest(p, ctx); + } + /* + * { + "partnerOne": { + "url": "http://localhost:7001" 4 http://uebsb93kcdc.it.att.com:3904", + "test": "/metrics" + }, + "partnerTwo": { + "url": "http://localhost:7002", + "user": "controller_user", + "password": "P@ssword", + "test": "/metrics" + }, + "partnerThree": { + "url": "http://localhost:7003", + "user": "controller_admin" + } +} + */ + @Test + public void testPartners() throws Exception{ + String partnerTwoKey = "partnerTwo"; + String partnerTwoUsername = "controller_user"; + String partnerTwoPassword = "P@ssword"; + + System.setProperty("SDNC_CONFIG_DIR", "src/test/resources"); + RestapiCallNode rcn = new RestapiCallNode(); + assertNull(rcn.partnerStore.get("partnerOne")); + PartnerDetails details = rcn.partnerStore.get(partnerTwoKey); + assertEquals(partnerTwoUsername,details.username); + assertEquals(partnerTwoPassword,details.password); + assertNull(rcn.partnerStore.get("partnerThree")); + + //In this scenario the caller expects username, password and url to be picked up from the partners json + Map paramMap = new HashMap(); + paramMap.put("partner", partnerTwoKey); + rcn.handlePartner(paramMap ); + assertEquals(partnerTwoUsername,paramMap.get(rcn.restapiUserKey)); + assertEquals(partnerTwoPassword,paramMap.get(rcn.restapiPasswordKey)); + assertEquals("http://localhost:7002",paramMap.get(rcn.restapiUrlString)); + + //In this scenario the caller expects username, password and url to be picked up from the partners json + //the provided suffix will be appended to the default url from the partners json + paramMap = new HashMap(); + paramMap.put("partner", partnerTwoKey); + paramMap.put("restapiUrlSuffix", "/networking/v1/instance/3"); + rcn.handlePartner(paramMap); + Parameters p = new Parameters(); + RestapiCallNode.getParameters(paramMap, p); + assertEquals(partnerTwoUsername,p.restapiUser); + assertEquals(partnerTwoPassword,p.restapiPassword); + assertEquals("http://localhost:7002/networking/v1/instance/3",p.restapiUrl); + } + + @Test + public void retryPolicyBean() throws Exception { + Integer retries = 3; + String first = "http://localhost:7001"; + String second = "http://localhost:7001"; + + RetryPolicy p = new RetryPolicy(new String[] {first,second}, retries); + assertEquals(retries,p.getMaximumRetries()); + assertNotNull(p.getRetryMessage()); + String next = p.getNextHostName(); + assertEquals(second,next); + assertEquals(1,p.getRetryCount()); + next = p.getNextHostName(); + assertEquals(first,next); + assertEquals(2,p.getRetryCount()); + } +} diff --git a/restapi-call-node/provider/src/test/resources/partners.json b/restapi-call-node/provider/src/test/resources/partners.json new file mode 100755 index 000000000..9a17a1acf --- /dev/null +++ b/restapi-call-node/provider/src/test/resources/partners.json @@ -0,0 +1,16 @@ +{ + "partnerOne": { + "url": "http://localhost:7001", + "test": "/metrics" + }, + "partnerTwo": { + "url": "http://localhost:7002", + "user": "controller_user", + "password": "P@ssword", + "test": "/metrics" + }, + "partnerThree": { + "url": "http://localhost:7003", + "user": "controller_admin" + } +} 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 ac0897e8f..620df282f 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 @@ -46,8 +46,6 @@ import org.onap.ccsdk.sli.core.sli.SvcLogicJavaPlugin; import org.onap.ccsdk.sli.plugins.restapicall.Format; import org.onap.ccsdk.sli.plugins.restapicall.HttpResponse; import org.onap.ccsdk.sli.plugins.restapicall.RestapiCallNode; -import org.onap.ccsdk.sli.plugins.restapicall.RetryException; -import org.onap.ccsdk.sli.plugins.restapicall.RetryPolicy; import org.onap.ccsdk.sli.plugins.restapicall.XmlParser; import org.onap.ccsdk.sli.plugins.yangserializers.dfserializer.DataFormatSerializer; import org.onap.ccsdk.sli.plugins.yangserializers.dfserializer.DataFormatSerializerContext; @@ -165,14 +163,9 @@ public class RestconfApiCallNode implements SvcLogicJavaPlugin { public void sendRequest(Map paramMap, SvcLogicContext ctx, Integer retryCount) throws SvcLogicException { RestapiCallNode rest = getRestapiCallNode(); - RetryPolicy retryPolicy = null; HttpResponse r = new HttpResponse(); try { YangParameters p = getYangParameters(paramMap); - if (p.partner != null) { - retryPolicy = rest.getRetryPolicyStore() - .getRetryPolicy(p.partner); - } String pp = p.responsePrefix != null ? p.responsePrefix + '.' : ""; Map props = new HashMap<>((Map)ctx.toProperties()); @@ -215,30 +208,7 @@ public class RestconfApiCallNode implements SvcLogicJavaPlugin { log.error(REQ_ERR + e.getMessage(), e); String prefix = parseParam(paramMap, RES_PRE, false, null); - if (retryPolicy == null || !shouldRetry) { - setFailureResponseStatus(ctx, prefix, e.getMessage()); - } else { - if (retryCount == null) { - retryCount = 0; - } - log.debug(format(ATTEMPTS_MSG, retryCount, - retryPolicy.getMaximumRetries())); - try { - retryCount = retryCount + 1; - if (retryCount < retryPolicy.getMaximumRetries() + 1) { - setRetryUri(paramMap, retryPolicy); - log.debug(format(RETRY_COUNT, retryCount, retryPolicy - .getMaximumRetries())); - sendRequest(paramMap, ctx, retryCount); - } else { - log.debug(MAX_RETRY_ERR); - setFailureResponseStatus(ctx, prefix, e.getMessage()); - } - } catch (Exception ex) { - log.error(NO_MORE_RETRY, ex); - setFailureResponseStatus(ctx, prefix, RETRY_FAIL); - } - } + setFailureResponseStatus(ctx, prefix, e.getMessage()); } if (r != null && r.code >= 300) { @@ -402,31 +372,6 @@ public class RestconfApiCallNode implements SvcLogicJavaPlugin { ctx.setAttribute(prefix + RES_MSG, res.message); } - /** - * Sets the retry URI to the param map from the retry policies different - * host. - * - * @param paramMap parameter map - * @param retryPolicy retry policy - * @throws URISyntaxException when new URI creation fails - * @throws RetryException when retry policy cannot give another host - */ - private void setRetryUri(Map paramMap, - RetryPolicy retryPolicy) - throws URISyntaxException, RetryException { - URI uri = new URI(paramMap.get(REST_API_URL)); - String hostName = uri.getHost(); - String retryString = retryPolicy.getNextHostName(uri.toString()); - - URI uriTwo = new URI(retryString); - URI retryUri = UriBuilder.fromUri(uri).host(uriTwo.getHost()).port( - uriTwo.getPort()).scheme(uriTwo.getScheme()).build(); - - paramMap.put(REST_API_URL, retryUri.toString()); - log.debug(UPDATED_URL + retryUri.toString()); - log.debug(format(COMM_FAIL, hostName, retryString)); - } - /** * Updates request message for JSON and XML data format, when the HTTP * method points it as PUT or PATCH. -- cgit 1.2.3-korg From bd8a4d04337eed46be669f70272e6583f48ba249 Mon Sep 17 00:00:00 2001 From: "Timoney, Dan (dt5972)" Date: Fri, 21 Jun 2019 17:22:27 -0400 Subject: Remove versions from project poms Remove versions from project poms and instead drive version from dependencyManagement to ensure consistency. Change-Id: I2a3238163e49878c4c7528db1271c83b488263c3 Issue-ID: CCSDK-1416 Signed-off-by: Timoney, Dan (dt5972) --- grToolkit/provider/pom.xml | 4 ---- restapi-call-node/provider/pom.xml | 7 ------- restconf-client/provider/pom.xml | 19 ++++++------------- sshapi-call-node/provider/pom.xml | 1 + template-node/provider/pom.xml | 1 - 5 files changed, 7 insertions(+), 25 deletions(-) (limited to 'restconf-client/provider') diff --git a/grToolkit/provider/pom.xml b/grToolkit/provider/pom.xml index ee61d7d41..b624e069e 100755 --- a/grToolkit/provider/pom.xml +++ b/grToolkit/provider/pom.xml @@ -74,13 +74,11 @@ junit junit - 4.11 test org.mockito mockito-core - 1.10.19 test @@ -95,13 +93,11 @@ com.typesafe.akka akka-cluster_2.12 - ${akka.version} provided com.github.stefanbirkner system-rules - 1.19.0 test diff --git a/restapi-call-node/provider/pom.xml b/restapi-call-node/provider/pom.xml index a7a0842a4..0d23912fd 100755 --- a/restapi-call-node/provider/pom.xml +++ b/restapi-call-node/provider/pom.xml @@ -47,17 +47,14 @@ org.glassfish.jersey.bundles.repackaged jersey-guava - 2.22.2 org.glassfish.jersey.security oauth1-signature - ${jersey.version} org.glassfish.jersey.security oauth1-client - ${jersey.version} org.codehaus.jettison @@ -66,12 +63,10 @@ org.glassfish.jersey.core jersey-client - ${jersey.version} org.glassfish.jersey.media jersey-media-multipart - ${jersey.version} @@ -83,13 +78,11 @@ org.glassfish.jersey.containers jersey-container-servlet - ${jersey.version} test org.glassfish.jersey.containers jersey-container-grizzly2-http - ${jersey.version} test diff --git a/restconf-client/provider/pom.xml b/restconf-client/provider/pom.xml index 70f84e09d..9fa247557 100755 --- a/restconf-client/provider/pom.xml +++ b/restconf-client/provider/pom.xml @@ -36,7 +36,6 @@ org.glassfish.jersey.media jersey-media-sse - ${jersey.version} javax.ws.rs @@ -46,15 +45,18 @@ org.onap.ccsdk.sli.core sli-common + + org.onap.ccsdk.sli.core + sli-provider + org.onap.ccsdk.sli.plugins properties-node-provider - 0.5.0-SNAPSHOT + ${project.version} org.opendaylight.yangtools yang-data-impl - 2.0.6.1 com.fasterxml.jackson.core @@ -63,17 +65,15 @@ dom4j dom4j - 1.6.1 com.google.code.gson gson - ${gson.version} org.onap.ccsdk.sli.plugins restapi-call-node-provider - 0.5.0-SNAPSHOT + ${project.version} org.opendaylight.netconf @@ -82,7 +82,6 @@ org.opendaylight.yangtools yang-parser-impl - 2.0.6.1 org.osgi @@ -99,37 +98,31 @@ org.mockito mockito-core - ${mockito.version} test org.glassfish.jersey.containers jersey-container-servlet - ${jersey.version} test org.glassfish.jersey.containers jersey-container-grizzly2-http - ${jersey.version} test org.hamcrest hamcrest-library - 1.3 test org.opendaylight.yangtools yang-test-util - 2.0.6.1 test org.glassfish.jersey.core jersey-client - ${jersey.version} test diff --git a/sshapi-call-node/provider/pom.xml b/sshapi-call-node/provider/pom.xml index 81ab8811e..39f99d4bc 100755 --- a/sshapi-call-node/provider/pom.xml +++ b/sshapi-call-node/provider/pom.xml @@ -46,6 +46,7 @@ org.onap.ccsdk.sli.core sli-provider + org.onap.appc appc-ssh-adapter-api diff --git a/template-node/provider/pom.xml b/template-node/provider/pom.xml index b47c60409..08ff17caf 100644 --- a/template-node/provider/pom.xml +++ b/template-node/provider/pom.xml @@ -44,7 +44,6 @@ org.apache.velocity velocity - 1.7 -- cgit 1.2.3-korg From bc136f3650f150b96e8940c5d6cf321376338510 Mon Sep 17 00:00:00 2001 From: "Smokowski, Kevin (ks6305)" Date: Wed, 29 May 2019 21:25:31 +0000 Subject: feature file cleanup instead of each feature file starting ccsdk-sli let it be handled by bootfeatures Change-Id: Ie7f20c8861bf329471c6317ede8128a9c420a9f8 Issue-ID: CCSDK-1370 Signed-off-by: Smokowski, Kevin (ks6305) --- grToolkit/features/ccsdk-gr-toolkit/pom.xml | 7 ---- .../ccsdk-gr-toolkit/src/main/feature/feature.xml | 7 ---- grToolkit/provider/pom.xml | 2 + .../features/ccsdk-properties-node/pom.xml | 8 +--- properties-node/provider/pom.xml | 10 +---- .../features/ccsdk-restapi-call-node/pom.xml | 8 +--- .../features/src/main/resources/features.xml | 42 -------------------- restapi-call-node/provider/pom.xml | 5 +-- .../features/ccsdk-restconf-client/pom.xml | 8 +--- restconf-client/provider/pom.xml | 13 ++++--- .../features/src/main/resources/features.xml | 45 ---------------------- sshapi-call-node/provider/pom.xml | 10 +---- template-node/features/ccsdk-template-node/pom.xml | 8 +--- template-node/provider/pom.xml | 1 + 14 files changed, 17 insertions(+), 157 deletions(-) mode change 100755 => 100644 grToolkit/features/ccsdk-gr-toolkit/pom.xml delete mode 100755 grToolkit/features/ccsdk-gr-toolkit/src/main/feature/feature.xml delete mode 100644 restapi-call-node/features/src/main/resources/features.xml delete mode 100644 sshapi-call-node/features/src/main/resources/features.xml (limited to 'restconf-client/provider') diff --git a/grToolkit/features/ccsdk-gr-toolkit/pom.xml b/grToolkit/features/ccsdk-gr-toolkit/pom.xml old mode 100755 new mode 100644 index 37343c53c..fdbc61b78 --- a/grToolkit/features/ccsdk-gr-toolkit/pom.xml +++ b/grToolkit/features/ccsdk-gr-toolkit/pom.xml @@ -23,13 +23,6 @@ xml features - - org.onap.ccsdk.sli.core - ccsdk-sli - ${ccsdk.sli.core.version} - xml - features - ${project.groupId} gr-toolkit-model diff --git a/grToolkit/features/ccsdk-gr-toolkit/src/main/feature/feature.xml b/grToolkit/features/ccsdk-gr-toolkit/src/main/feature/feature.xml deleted file mode 100755 index 4a21ca550..000000000 --- a/grToolkit/features/ccsdk-gr-toolkit/src/main/feature/feature.xml +++ /dev/null @@ -1,7 +0,0 @@ - - - mvn:org.onap.ccsdk.sli.core/ccsdk-sli/LATEST/xml/features - - ccsdk-sli - - diff --git a/grToolkit/provider/pom.xml b/grToolkit/provider/pom.xml index b624e069e..67c711775 100755 --- a/grToolkit/provider/pom.xml +++ b/grToolkit/provider/pom.xml @@ -48,11 +48,13 @@ org.onap.ccsdk.sli.core sli-common ${ccsdk.sli.core.version} + provided org.onap.ccsdk.sli.core sli-provider ${ccsdk.sli.core.version} + provided sal-test-model diff --git a/properties-node/features/ccsdk-properties-node/pom.xml b/properties-node/features/ccsdk-properties-node/pom.xml index ae007d6e4..c919c8434 100644 --- a/properties-node/features/ccsdk-properties-node/pom.xml +++ b/properties-node/features/ccsdk-properties-node/pom.xml @@ -19,13 +19,7 @@ - - org.onap.ccsdk.sli.core - ccsdk-sli - ${ccsdk.sli.core.version} - xml - features - + ${project.groupId} properties-node-provider diff --git a/properties-node/provider/pom.xml b/properties-node/provider/pom.xml index 2e3b5e76c..3ecd80d59 100755 --- a/properties-node/provider/pom.xml +++ b/properties-node/provider/pom.xml @@ -14,12 +14,7 @@ bundle ccsdk-sli-plugins :: properties-node :: ${project.artifactId} - http://maven.apache.org - - UTF-8 - - @@ -46,10 +41,7 @@ org.onap.ccsdk.sli.core sli-common - - - org.onap.ccsdk.sli.core - sli-provider + provided org.slf4j 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 7062d6102..09657337c 100644 --- a/restapi-call-node/features/ccsdk-restapi-call-node/pom.xml +++ b/restapi-call-node/features/ccsdk-restapi-call-node/pom.xml @@ -22,13 +22,7 @@ javax.ws.rs javax.ws.rs-api - - org.onap.ccsdk.sli.core - ccsdk-sli - ${ccsdk.sli.core.version} - xml - features - + ${project.groupId} restapi-call-node-provider diff --git a/restapi-call-node/features/src/main/resources/features.xml b/restapi-call-node/features/src/main/resources/features.xml deleted file mode 100644 index 3734a951a..000000000 --- a/restapi-call-node/features/src/main/resources/features.xml +++ /dev/null @@ -1,42 +0,0 @@ - - - - - - - mvn:org.opendaylight.mdsal/features-mdsal/${odl.mdsal.features.version}/xml/features - - - sdnc-sli - spring - spring-dm - mvn:com.sun.jersey/jersey-client/${jersey.version} - mvn:com.sun.jersey.contribs.jersey-oauth/oauth-signature/${jersey.version} - mvn:com.sun.jersey.contribs.jersey-oauth/oauth-client/${jersey.version} - mvn:org.codehaus.jettison/jettison/${jettison.version} - mvn:org.onap.ccsdk.sli.plugins/restapi-call-node-provider/${project.version} - - - diff --git a/restapi-call-node/provider/pom.xml b/restapi-call-node/provider/pom.xml index 0d23912fd..57af60727 100755 --- a/restapi-call-node/provider/pom.xml +++ b/restapi-call-node/provider/pom.xml @@ -15,10 +15,6 @@ ccsdk-sli-plugins :: restapi-call-node :: ${project.artifactId} - - UTF-8 - - @@ -39,6 +35,7 @@ org.onap.ccsdk.sli.core sli-common + provided org.slf4j diff --git a/restconf-client/features/ccsdk-restconf-client/pom.xml b/restconf-client/features/ccsdk-restconf-client/pom.xml index 677a24671..985cc8daf 100644 --- a/restconf-client/features/ccsdk-restconf-client/pom.xml +++ b/restconf-client/features/ccsdk-restconf-client/pom.xml @@ -25,13 +25,7 @@ - - org.onap.ccsdk.sli.core - ccsdk-sli - ${ccsdk.sli.core.version} - xml - features - + ${project.groupId} restconf-client-provider diff --git a/restconf-client/provider/pom.xml b/restconf-client/provider/pom.xml index 9fa247557..2c4b8c3ea 100755 --- a/restconf-client/provider/pom.xml +++ b/restconf-client/provider/pom.xml @@ -14,11 +14,6 @@ bundle ccsdk-sli-plugins :: restconf-client :: ${project.artifactId} - http://maven.apache.org - - - UTF-8 - @@ -44,7 +39,13 @@ org.onap.ccsdk.sli.core sli-common - + provided + + + org.onap.ccsdk.sli.core + sli-provider + provided + org.onap.ccsdk.sli.core sli-provider diff --git a/sshapi-call-node/features/src/main/resources/features.xml b/sshapi-call-node/features/src/main/resources/features.xml deleted file mode 100644 index fd7caf535..000000000 --- a/sshapi-call-node/features/src/main/resources/features.xml +++ /dev/null @@ -1,45 +0,0 @@ - - - - - - - - mvn:org.opendaylight.mdsal/features-mdsal/${odl.mdsal.features.version}/xml/features - - - - sdnc-sli - spring - spring-dm - mvn:org.codehaus.jettison/jettison/${jettison.version} - mvn:org.onap.ccsdk.sli.core/sli-common/${project.version} - mvn:org.onap.ccsdk.sli.core/sli-provider/${project.version} - mvn:org.onap.appc/appc-ssh-adapter-api/1.3.0 - mvn:org.onap.ccsdk.sli.plugins/sshapi-call-node-provider/${project.version} - - - diff --git a/sshapi-call-node/provider/pom.xml b/sshapi-call-node/provider/pom.xml index 39f99d4bc..b71e15765 100755 --- a/sshapi-call-node/provider/pom.xml +++ b/sshapi-call-node/provider/pom.xml @@ -14,11 +14,6 @@ bundle ccsdk-sli-plugins :: sshapi-call-node :: ${project.artifactId} - http://maven.apache.org - - - UTF-8 - @@ -41,10 +36,7 @@ org.onap.ccsdk.sli.core sli-common - - - org.onap.ccsdk.sli.core - sli-provider + provided diff --git a/template-node/features/ccsdk-template-node/pom.xml b/template-node/features/ccsdk-template-node/pom.xml index f7a708729..115329bf5 100644 --- a/template-node/features/ccsdk-template-node/pom.xml +++ b/template-node/features/ccsdk-template-node/pom.xml @@ -17,13 +17,7 @@ ccsdk-sli-plugins :: template-node :: ${project.artifactId} - - org.onap.ccsdk.sli.core - ccsdk-sli - ${ccsdk.sli.core.version} - xml - features - + ${project.groupId} template-node-provider diff --git a/template-node/provider/pom.xml b/template-node/provider/pom.xml index 08ff17caf..543a40d5e 100644 --- a/template-node/provider/pom.xml +++ b/template-node/provider/pom.xml @@ -36,6 +36,7 @@ org.onap.ccsdk.sli.core sli-common + provided org.slf4j -- cgit 1.2.3-korg From 1201ff98e4c7856b03b268302e4aed2cdc6e1dbb Mon Sep 17 00:00:00 2001 From: "Timoney, Dan (dt5972)" Date: Wed, 17 Jul 2019 11:01:32 -0400 Subject: Update parent version to 1.3.1 Update parent poms to version 1.3.1-SNAPSHOT Change-Id: Ie3039a7d625a78b4ef1bf5170dcfe0553f9e9594 Issue-ID: CCSDK-1496 Signed-off-by: Timoney, Dan (dt5972) --- artifacts/pom.xml | 2 +- features/ccsdk-sli-plugins-all/pom.xml | 2 +- features/features-sli-plugins/pom.xml | 2 +- features/installer/pom.xml | 2 +- features/pom.xml | 2 +- grToolkit/features/ccsdk-gr-toolkit/pom.xml | 2 +- grToolkit/features/features-gr-toolkit/pom.xml | 2 +- grToolkit/features/pom.xml | 2 +- grToolkit/installer/pom.xml | 2 +- grToolkit/model/pom.xml | 2 +- grToolkit/pom.xml | 2 +- grToolkit/provider/pom.xml | 2 +- pom.xml | 2 +- properties-node/features/ccsdk-properties-node/pom.xml | 2 +- properties-node/features/features-properties-node/pom.xml | 2 +- properties-node/features/pom.xml | 2 +- properties-node/installer/pom.xml | 2 +- properties-node/pom.xml | 2 +- properties-node/provider/pom.xml | 2 +- restapi-call-node/features/ccsdk-restapi-call-node/pom.xml | 2 +- restapi-call-node/features/features-restapi-call-node/pom.xml | 2 +- restapi-call-node/features/pom.xml | 2 +- restapi-call-node/installer/pom.xml | 2 +- restapi-call-node/pom.xml | 2 +- restapi-call-node/provider/pom.xml | 2 +- restconf-client/features/ccsdk-restconf-client/pom.xml | 2 +- restconf-client/features/features-restconf-client/pom.xml | 2 +- restconf-client/features/pom.xml | 2 +- restconf-client/installer/pom.xml | 2 +- restconf-client/pom.xml | 2 +- restconf-client/provider/pom.xml | 2 +- sshapi-call-node/features/ccsdk-sshapi-call-node/pom.xml | 2 +- sshapi-call-node/features/features-sshapi-call-node/pom.xml | 2 +- sshapi-call-node/features/pom.xml | 2 +- sshapi-call-node/installer/pom.xml | 2 +- sshapi-call-node/pom.xml | 2 +- sshapi-call-node/provider/pom.xml | 2 +- template-node/features/ccsdk-template-node/pom.xml | 2 +- template-node/features/features-template-node/pom.xml | 2 +- template-node/features/pom.xml | 2 +- template-node/installer/pom.xml | 2 +- template-node/pom.xml | 2 +- template-node/provider/pom.xml | 2 +- 43 files changed, 43 insertions(+), 43 deletions(-) (limited to 'restconf-client/provider') diff --git a/artifacts/pom.xml b/artifacts/pom.xml index 261b955e4..3ffab5542 100755 --- a/artifacts/pom.xml +++ b/artifacts/pom.xml @@ -17,7 +17,7 @@ org.onap.ccsdk.parent parent - 1.3.0-SNAPSHOT + 1.3.1-SNAPSHOT diff --git a/features/ccsdk-sli-plugins-all/pom.xml b/features/ccsdk-sli-plugins-all/pom.xml index f36956a9c..b34bb0e9a 100644 --- a/features/ccsdk-sli-plugins-all/pom.xml +++ b/features/ccsdk-sli-plugins-all/pom.xml @@ -5,7 +5,7 @@ org.onap.ccsdk.parent single-feature-parent - 1.3.0-SNAPSHOT + 1.3.1-SNAPSHOT diff --git a/features/features-sli-plugins/pom.xml b/features/features-sli-plugins/pom.xml index 931e46063..75038f559 100644 --- a/features/features-sli-plugins/pom.xml +++ b/features/features-sli-plugins/pom.xml @@ -5,7 +5,7 @@ org.onap.ccsdk.parent feature-repo-parent - 1.3.0-SNAPSHOT + 1.3.1-SNAPSHOT diff --git a/features/installer/pom.xml b/features/installer/pom.xml index 58143e79f..ac3f7f9ab 100755 --- a/features/installer/pom.xml +++ b/features/installer/pom.xml @@ -5,7 +5,7 @@ org.onap.ccsdk.parent odlparent-lite - 1.3.0-SNAPSHOT + 1.3.1-SNAPSHOT diff --git a/features/pom.xml b/features/pom.xml index d8553b42f..20653b8c4 100755 --- a/features/pom.xml +++ b/features/pom.xml @@ -5,7 +5,7 @@ org.onap.ccsdk.parent odlparent-lite - 1.3.0-SNAPSHOT + 1.3.1-SNAPSHOT diff --git a/grToolkit/features/ccsdk-gr-toolkit/pom.xml b/grToolkit/features/ccsdk-gr-toolkit/pom.xml index fdbc61b78..3e6c0934f 100644 --- a/grToolkit/features/ccsdk-gr-toolkit/pom.xml +++ b/grToolkit/features/ccsdk-gr-toolkit/pom.xml @@ -5,7 +5,7 @@ org.onap.ccsdk.parent single-feature-parent - 1.3.0-SNAPSHOT + 1.3.1-SNAPSHOT diff --git a/grToolkit/features/features-gr-toolkit/pom.xml b/grToolkit/features/features-gr-toolkit/pom.xml index 441e2e855..b40c67403 100755 --- a/grToolkit/features/features-gr-toolkit/pom.xml +++ b/grToolkit/features/features-gr-toolkit/pom.xml @@ -5,7 +5,7 @@ org.onap.ccsdk.parent feature-repo-parent - 1.3.0-SNAPSHOT + 1.3.1-SNAPSHOT diff --git a/grToolkit/features/pom.xml b/grToolkit/features/pom.xml index a27e71853..ea5d00d54 100755 --- a/grToolkit/features/pom.xml +++ b/grToolkit/features/pom.xml @@ -4,7 +4,7 @@ org.onap.ccsdk.parent odlparent-lite - 1.3.0-SNAPSHOT + 1.3.1-SNAPSHOT diff --git a/grToolkit/installer/pom.xml b/grToolkit/installer/pom.xml index 831edf707..13949b096 100755 --- a/grToolkit/installer/pom.xml +++ b/grToolkit/installer/pom.xml @@ -4,7 +4,7 @@ org.onap.ccsdk.parent odlparent-lite - 1.3.0-SNAPSHOT + 1.3.1-SNAPSHOT diff --git a/grToolkit/model/pom.xml b/grToolkit/model/pom.xml index 439b05f0c..ab85fccfd 100755 --- a/grToolkit/model/pom.xml +++ b/grToolkit/model/pom.xml @@ -4,7 +4,7 @@ org.onap.ccsdk.parent binding-parent - 1.3.0-SNAPSHOT + 1.3.1-SNAPSHOT ccsdk-sli-plugins :: gr-toolkit :: ${project.artifactId} diff --git a/grToolkit/pom.xml b/grToolkit/pom.xml index 2cdc71d08..2b47ba604 100755 --- a/grToolkit/pom.xml +++ b/grToolkit/pom.xml @@ -5,7 +5,7 @@ org.onap.ccsdk.parent odlparent-lite - 1.3.0-SNAPSHOT + 1.3.1-SNAPSHOT diff --git a/grToolkit/provider/pom.xml b/grToolkit/provider/pom.xml index 67c711775..9e30d1e35 100755 --- a/grToolkit/provider/pom.xml +++ b/grToolkit/provider/pom.xml @@ -4,7 +4,7 @@ org.onap.ccsdk.parent binding-parent - 1.3.0-SNAPSHOT + 1.3.1-SNAPSHOT ccsdk-sli-plugins :: gr-toolkit :: ${project.artifactId} diff --git a/pom.xml b/pom.xml index e66a40794..7c9feb460 100755 --- a/pom.xml +++ b/pom.xml @@ -5,7 +5,7 @@ org.onap.ccsdk.parent odlparent-lite - 1.3.0-SNAPSHOT + 1.3.1-SNAPSHOT org.onap.ccsdk.sli.plugins diff --git a/properties-node/features/ccsdk-properties-node/pom.xml b/properties-node/features/ccsdk-properties-node/pom.xml index c919c8434..69bdaddaa 100644 --- a/properties-node/features/ccsdk-properties-node/pom.xml +++ b/properties-node/features/ccsdk-properties-node/pom.xml @@ -5,7 +5,7 @@ org.onap.ccsdk.parent single-feature-parent - 1.3.0-SNAPSHOT + 1.3.1-SNAPSHOT diff --git a/properties-node/features/features-properties-node/pom.xml b/properties-node/features/features-properties-node/pom.xml index 0db5a9042..a4479ad33 100644 --- a/properties-node/features/features-properties-node/pom.xml +++ b/properties-node/features/features-properties-node/pom.xml @@ -5,7 +5,7 @@ org.onap.ccsdk.parent feature-repo-parent - 1.3.0-SNAPSHOT + 1.3.1-SNAPSHOT diff --git a/properties-node/features/pom.xml b/properties-node/features/pom.xml index 79d56ff04..ac155ad59 100755 --- a/properties-node/features/pom.xml +++ b/properties-node/features/pom.xml @@ -5,7 +5,7 @@ org.onap.ccsdk.parent odlparent-lite - 1.3.0-SNAPSHOT + 1.3.1-SNAPSHOT org.onap.ccsdk.sli.plugins diff --git a/properties-node/installer/pom.xml b/properties-node/installer/pom.xml index 42732871b..1f5806477 100755 --- a/properties-node/installer/pom.xml +++ b/properties-node/installer/pom.xml @@ -5,7 +5,7 @@ org.onap.ccsdk.parent odlparent-lite - 1.3.0-SNAPSHOT + 1.3.1-SNAPSHOT org.onap.ccsdk.sli.plugins diff --git a/properties-node/pom.xml b/properties-node/pom.xml index de936d9f2..4e66bc700 100755 --- a/properties-node/pom.xml +++ b/properties-node/pom.xml @@ -5,7 +5,7 @@ org.onap.ccsdk.parent odlparent-lite - 1.3.0-SNAPSHOT + 1.3.1-SNAPSHOT org.onap.ccsdk.sli.plugins diff --git a/properties-node/provider/pom.xml b/properties-node/provider/pom.xml index 3ecd80d59..da88c07f0 100755 --- a/properties-node/provider/pom.xml +++ b/properties-node/provider/pom.xml @@ -5,7 +5,7 @@ org.onap.ccsdk.parent binding-parent - 1.3.0-SNAPSHOT + 1.3.1-SNAPSHOT org.onap.ccsdk.sli.plugins 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 09657337c..ab2f8b659 100644 --- a/restapi-call-node/features/ccsdk-restapi-call-node/pom.xml +++ b/restapi-call-node/features/ccsdk-restapi-call-node/pom.xml @@ -5,7 +5,7 @@ org.onap.ccsdk.parent single-feature-parent - 1.3.0-SNAPSHOT + 1.3.1-SNAPSHOT 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 b5329ea8f..f230f0a1c 100644 --- a/restapi-call-node/features/features-restapi-call-node/pom.xml +++ b/restapi-call-node/features/features-restapi-call-node/pom.xml @@ -5,7 +5,7 @@ org.onap.ccsdk.parent feature-repo-parent - 1.3.0-SNAPSHOT + 1.3.1-SNAPSHOT diff --git a/restapi-call-node/features/pom.xml b/restapi-call-node/features/pom.xml index 4820b7dd5..b9afd7ff4 100755 --- a/restapi-call-node/features/pom.xml +++ b/restapi-call-node/features/pom.xml @@ -5,7 +5,7 @@ org.onap.ccsdk.parent odlparent-lite - 1.3.0-SNAPSHOT + 1.3.1-SNAPSHOT org.onap.ccsdk.sli.plugins diff --git a/restapi-call-node/installer/pom.xml b/restapi-call-node/installer/pom.xml index d51cc610e..647e3a437 100755 --- a/restapi-call-node/installer/pom.xml +++ b/restapi-call-node/installer/pom.xml @@ -5,7 +5,7 @@ org.onap.ccsdk.parent odlparent-lite - 1.3.0-SNAPSHOT + 1.3.1-SNAPSHOT org.onap.ccsdk.sli.plugins diff --git a/restapi-call-node/pom.xml b/restapi-call-node/pom.xml index a84d3232d..37d53f563 100755 --- a/restapi-call-node/pom.xml +++ b/restapi-call-node/pom.xml @@ -5,7 +5,7 @@ org.onap.ccsdk.parent odlparent-lite - 1.3.0-SNAPSHOT + 1.3.1-SNAPSHOT org.onap.ccsdk.sli.plugins diff --git a/restapi-call-node/provider/pom.xml b/restapi-call-node/provider/pom.xml index 57af60727..8c51f9974 100755 --- a/restapi-call-node/provider/pom.xml +++ b/restapi-call-node/provider/pom.xml @@ -5,7 +5,7 @@ org.onap.ccsdk.parent binding-parent - 1.3.0-SNAPSHOT + 1.3.1-SNAPSHOT org.onap.ccsdk.sli.plugins diff --git a/restconf-client/features/ccsdk-restconf-client/pom.xml b/restconf-client/features/ccsdk-restconf-client/pom.xml index 985cc8daf..cde001de7 100644 --- a/restconf-client/features/ccsdk-restconf-client/pom.xml +++ b/restconf-client/features/ccsdk-restconf-client/pom.xml @@ -5,7 +5,7 @@ org.onap.ccsdk.parent single-feature-parent - 1.3.0-SNAPSHOT + 1.3.1-SNAPSHOT diff --git a/restconf-client/features/features-restconf-client/pom.xml b/restconf-client/features/features-restconf-client/pom.xml index 032a781e1..a902f9d72 100644 --- a/restconf-client/features/features-restconf-client/pom.xml +++ b/restconf-client/features/features-restconf-client/pom.xml @@ -5,7 +5,7 @@ org.onap.ccsdk.parent feature-repo-parent - 1.3.0-SNAPSHOT + 1.3.1-SNAPSHOT diff --git a/restconf-client/features/pom.xml b/restconf-client/features/pom.xml index ae4000266..bc658c9d9 100755 --- a/restconf-client/features/pom.xml +++ b/restconf-client/features/pom.xml @@ -5,7 +5,7 @@ org.onap.ccsdk.parent odlparent-lite - 1.3.0-SNAPSHOT + 1.3.1-SNAPSHOT org.onap.ccsdk.sli.plugins diff --git a/restconf-client/installer/pom.xml b/restconf-client/installer/pom.xml index bcf9e998d..47c5a4059 100755 --- a/restconf-client/installer/pom.xml +++ b/restconf-client/installer/pom.xml @@ -5,7 +5,7 @@ org.onap.ccsdk.parent odlparent-lite - 1.3.0-SNAPSHOT + 1.3.1-SNAPSHOT org.onap.ccsdk.sli.plugins diff --git a/restconf-client/pom.xml b/restconf-client/pom.xml index b9cad2629..2b1643062 100755 --- a/restconf-client/pom.xml +++ b/restconf-client/pom.xml @@ -5,7 +5,7 @@ org.onap.ccsdk.parent odlparent-lite - 1.3.0-SNAPSHOT + 1.3.1-SNAPSHOT org.onap.ccsdk.sli.plugins diff --git a/restconf-client/provider/pom.xml b/restconf-client/provider/pom.xml index 2c4b8c3ea..c064394d1 100755 --- a/restconf-client/provider/pom.xml +++ b/restconf-client/provider/pom.xml @@ -5,7 +5,7 @@ org.onap.ccsdk.parent binding-parent - 1.3.0-SNAPSHOT + 1.3.1-SNAPSHOT org.onap.ccsdk.sli.plugins 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 a34b4aeee..a50f17893 100644 --- a/sshapi-call-node/features/ccsdk-sshapi-call-node/pom.xml +++ b/sshapi-call-node/features/ccsdk-sshapi-call-node/pom.xml @@ -5,7 +5,7 @@ org.onap.ccsdk.parent single-feature-parent - 1.3.0-SNAPSHOT + 1.3.1-SNAPSHOT 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 04338facf..cf12bca82 100644 --- a/sshapi-call-node/features/features-sshapi-call-node/pom.xml +++ b/sshapi-call-node/features/features-sshapi-call-node/pom.xml @@ -5,7 +5,7 @@ org.onap.ccsdk.parent feature-repo-parent - 1.3.0-SNAPSHOT + 1.3.1-SNAPSHOT diff --git a/sshapi-call-node/features/pom.xml b/sshapi-call-node/features/pom.xml index 35be47a4e..6c77b070a 100755 --- a/sshapi-call-node/features/pom.xml +++ b/sshapi-call-node/features/pom.xml @@ -5,7 +5,7 @@ org.onap.ccsdk.parent odlparent-lite - 1.3.0-SNAPSHOT + 1.3.1-SNAPSHOT org.onap.ccsdk.sli.plugins diff --git a/sshapi-call-node/installer/pom.xml b/sshapi-call-node/installer/pom.xml index 029b94dea..64c352796 100755 --- a/sshapi-call-node/installer/pom.xml +++ b/sshapi-call-node/installer/pom.xml @@ -5,7 +5,7 @@ org.onap.ccsdk.parent odlparent-lite - 1.3.0-SNAPSHOT + 1.3.1-SNAPSHOT org.onap.ccsdk.sli.plugins diff --git a/sshapi-call-node/pom.xml b/sshapi-call-node/pom.xml index 99c6d9edd..d820e871d 100755 --- a/sshapi-call-node/pom.xml +++ b/sshapi-call-node/pom.xml @@ -5,7 +5,7 @@ org.onap.ccsdk.parent odlparent-lite - 1.3.0-SNAPSHOT + 1.3.1-SNAPSHOT org.onap.ccsdk.sli.plugins diff --git a/sshapi-call-node/provider/pom.xml b/sshapi-call-node/provider/pom.xml index b71e15765..60abe7560 100755 --- a/sshapi-call-node/provider/pom.xml +++ b/sshapi-call-node/provider/pom.xml @@ -5,7 +5,7 @@ org.onap.ccsdk.parent binding-parent - 1.3.0-SNAPSHOT + 1.3.1-SNAPSHOT org.onap.ccsdk.sli.plugins diff --git a/template-node/features/ccsdk-template-node/pom.xml b/template-node/features/ccsdk-template-node/pom.xml index 115329bf5..c72f76951 100644 --- a/template-node/features/ccsdk-template-node/pom.xml +++ b/template-node/features/ccsdk-template-node/pom.xml @@ -5,7 +5,7 @@ org.onap.ccsdk.parent single-feature-parent - 1.3.0-SNAPSHOT + 1.3.1-SNAPSHOT diff --git a/template-node/features/features-template-node/pom.xml b/template-node/features/features-template-node/pom.xml index 3c6f6d853..837b1c138 100644 --- a/template-node/features/features-template-node/pom.xml +++ b/template-node/features/features-template-node/pom.xml @@ -5,7 +5,7 @@ org.onap.ccsdk.parent feature-repo-parent - 1.3.0-SNAPSHOT + 1.3.1-SNAPSHOT diff --git a/template-node/features/pom.xml b/template-node/features/pom.xml index f919d1c09..10c74b8d3 100644 --- a/template-node/features/pom.xml +++ b/template-node/features/pom.xml @@ -5,7 +5,7 @@ org.onap.ccsdk.parent odlparent-lite - 1.3.0-SNAPSHOT + 1.3.1-SNAPSHOT org.onap.ccsdk.sli.plugins diff --git a/template-node/installer/pom.xml b/template-node/installer/pom.xml index 35161b8e5..93d56bb05 100644 --- a/template-node/installer/pom.xml +++ b/template-node/installer/pom.xml @@ -5,7 +5,7 @@ org.onap.ccsdk.parent odlparent-lite - 1.3.0-SNAPSHOT + 1.3.1-SNAPSHOT org.onap.ccsdk.sli.plugins diff --git a/template-node/pom.xml b/template-node/pom.xml index b65c40e24..6244c8d10 100644 --- a/template-node/pom.xml +++ b/template-node/pom.xml @@ -5,7 +5,7 @@ org.onap.ccsdk.parent odlparent-lite - 1.3.0-SNAPSHOT + 1.3.1-SNAPSHOT org.onap.ccsdk.sli.plugins diff --git a/template-node/provider/pom.xml b/template-node/provider/pom.xml index 543a40d5e..2a99c1029 100644 --- a/template-node/provider/pom.xml +++ b/template-node/provider/pom.xml @@ -5,7 +5,7 @@ org.onap.ccsdk.parent binding-parent - 1.3.0-SNAPSHOT + 1.3.1-SNAPSHOT org.onap.ccsdk.sli.plugins -- cgit 1.2.3-korg From ca4d38ae43092c4daab3eb172decc71c9ce1339a Mon Sep 17 00:00:00 2001 From: "Timoney, Dan (dt5972)" Date: Tue, 6 Aug 2019 11:40:00 -0400 Subject: Roll version to recreate artifacts Roll version to 0.5.1 to recreate El Alto early drop artifacts Change-Id: Iccd4d14f5e0f55ab994a72cbf5b661c5790e2ae8 Issue-ID: CCSDK-1563 Signed-off-by: Timoney, Dan (dt5972) --- artifacts/pom.xml | 4 ++-- features/ccsdk-sli-plugins-all/pom.xml | 4 ++-- features/features-sli-plugins/pom.xml | 4 ++-- features/installer/pom.xml | 4 ++-- features/pom.xml | 4 ++-- grToolkit/features/ccsdk-gr-toolkit/pom.xml | 4 ++-- grToolkit/features/features-gr-toolkit/pom.xml | 4 ++-- grToolkit/features/pom.xml | 4 ++-- grToolkit/installer/pom.xml | 4 ++-- grToolkit/model/pom.xml | 4 ++-- grToolkit/pom.xml | 4 ++-- grToolkit/provider/pom.xml | 4 ++-- pom.xml | 4 ++-- properties-node/features/ccsdk-properties-node/pom.xml | 4 ++-- properties-node/features/features-properties-node/pom.xml | 4 ++-- properties-node/features/pom.xml | 4 ++-- properties-node/installer/pom.xml | 4 ++-- properties-node/pom.xml | 4 ++-- properties-node/provider/pom.xml | 4 ++-- restapi-call-node/features/ccsdk-restapi-call-node/pom.xml | 4 ++-- restapi-call-node/features/features-restapi-call-node/pom.xml | 4 ++-- restapi-call-node/features/pom.xml | 4 ++-- restapi-call-node/installer/pom.xml | 4 ++-- restapi-call-node/pom.xml | 4 ++-- restapi-call-node/provider/pom.xml | 4 ++-- restconf-client/features/ccsdk-restconf-client/pom.xml | 4 ++-- restconf-client/features/features-restconf-client/pom.xml | 4 ++-- restconf-client/features/pom.xml | 4 ++-- restconf-client/installer/pom.xml | 4 ++-- restconf-client/pom.xml | 4 ++-- restconf-client/provider/pom.xml | 4 ++-- sshapi-call-node/features/ccsdk-sshapi-call-node/pom.xml | 4 ++-- sshapi-call-node/features/features-sshapi-call-node/pom.xml | 4 ++-- sshapi-call-node/features/pom.xml | 4 ++-- sshapi-call-node/installer/pom.xml | 4 ++-- sshapi-call-node/pom.xml | 4 ++-- sshapi-call-node/provider/pom.xml | 4 ++-- template-node/features/ccsdk-template-node/pom.xml | 4 ++-- template-node/features/features-template-node/pom.xml | 4 ++-- template-node/features/pom.xml | 4 ++-- template-node/installer/pom.xml | 4 ++-- template-node/pom.xml | 4 ++-- template-node/provider/pom.xml | 4 ++-- version.properties | 2 +- 44 files changed, 87 insertions(+), 87 deletions(-) (limited to 'restconf-client/provider') diff --git a/artifacts/pom.xml b/artifacts/pom.xml index 3ffab5542..71e315341 100755 --- a/artifacts/pom.xml +++ b/artifacts/pom.xml @@ -4,7 +4,7 @@ org.onap.ccsdk.sli.plugins sli-plugins-artifacts - 0.5.0-SNAPSHOT + 0.5.1-SNAPSHOT pom ccsdk-sli-plugins :: sli-plugins-artifacts @@ -17,7 +17,7 @@ org.onap.ccsdk.parent parent - 1.3.1-SNAPSHOT + 1.3.2 diff --git a/features/ccsdk-sli-plugins-all/pom.xml b/features/ccsdk-sli-plugins-all/pom.xml index b34bb0e9a..2522ce584 100644 --- a/features/ccsdk-sli-plugins-all/pom.xml +++ b/features/ccsdk-sli-plugins-all/pom.xml @@ -5,13 +5,13 @@ org.onap.ccsdk.parent single-feature-parent - 1.3.1-SNAPSHOT + 1.3.2 org.onap.ccsdk.sli.plugins ccsdk-sli-plugins-all - 0.5.0-SNAPSHOT + 0.5.1-SNAPSHOT feature ccsdk-sli-plugins :: features :: ${project.artifactId} diff --git a/features/features-sli-plugins/pom.xml b/features/features-sli-plugins/pom.xml index 75038f559..da9a571b0 100644 --- a/features/features-sli-plugins/pom.xml +++ b/features/features-sli-plugins/pom.xml @@ -5,13 +5,13 @@ org.onap.ccsdk.parent feature-repo-parent - 1.3.1-SNAPSHOT + 1.3.2 org.onap.ccsdk.sli.plugins features-sli-plugins - 0.5.0-SNAPSHOT + 0.5.1-SNAPSHOT feature ccsdk-sli-plugins :: features :: ${project.artifactId} diff --git a/features/installer/pom.xml b/features/installer/pom.xml index ac3f7f9ab..baa4fc381 100755 --- a/features/installer/pom.xml +++ b/features/installer/pom.xml @@ -5,13 +5,13 @@ org.onap.ccsdk.parent odlparent-lite - 1.3.1-SNAPSHOT + 1.3.2 org.onap.ccsdk.sli.plugins sliplugins-features-installer - 0.5.0-SNAPSHOT + 0.5.1-SNAPSHOT pom ccsdk-sli-plugins :: features :: ${project.artifactId} diff --git a/features/pom.xml b/features/pom.xml index 20653b8c4..77bc51efe 100755 --- a/features/pom.xml +++ b/features/pom.xml @@ -5,13 +5,13 @@ org.onap.ccsdk.parent odlparent-lite - 1.3.1-SNAPSHOT + 1.3.2 org.onap.ccsdk.sli.plugins sliplugins-feature-aggregator - 0.5.0-SNAPSHOT + 0.5.1-SNAPSHOT pom ccsdk-sli-plugins :: features diff --git a/grToolkit/features/ccsdk-gr-toolkit/pom.xml b/grToolkit/features/ccsdk-gr-toolkit/pom.xml index 3e6c0934f..a25d95c67 100644 --- a/grToolkit/features/ccsdk-gr-toolkit/pom.xml +++ b/grToolkit/features/ccsdk-gr-toolkit/pom.xml @@ -5,13 +5,13 @@ org.onap.ccsdk.parent single-feature-parent - 1.3.1-SNAPSHOT + 1.3.2 org.onap.ccsdk.sli.plugins ccsdk-gr-toolkit - 0.5.0-SNAPSHOT + 0.5.1-SNAPSHOT feature ccsdk-sli-plugins :: gr-toolkit :: ${project.artifactId} diff --git a/grToolkit/features/features-gr-toolkit/pom.xml b/grToolkit/features/features-gr-toolkit/pom.xml index b40c67403..33a713524 100755 --- a/grToolkit/features/features-gr-toolkit/pom.xml +++ b/grToolkit/features/features-gr-toolkit/pom.xml @@ -5,13 +5,13 @@ org.onap.ccsdk.parent feature-repo-parent - 1.3.1-SNAPSHOT + 1.3.2 org.onap.ccsdk.sli.plugins features-gr-toolkit - 0.5.0-SNAPSHOT + 0.5.1-SNAPSHOT feature ccsdk-sli-plugins :: gr-toolkit :: ${project.artifactId} diff --git a/grToolkit/features/pom.xml b/grToolkit/features/pom.xml index ea5d00d54..a91fdeef7 100755 --- a/grToolkit/features/pom.xml +++ b/grToolkit/features/pom.xml @@ -4,14 +4,14 @@ org.onap.ccsdk.parent odlparent-lite - 1.3.1-SNAPSHOT + 1.3.2 ccsdk-sli-plugins :: gr-toolkit :: ${project.artifactId} gr-toolkit-features org.onap.ccsdk.sli.plugins - 0.5.0-SNAPSHOT + 0.5.1-SNAPSHOT pom diff --git a/grToolkit/installer/pom.xml b/grToolkit/installer/pom.xml index 13949b096..59b5d4e91 100755 --- a/grToolkit/installer/pom.xml +++ b/grToolkit/installer/pom.xml @@ -4,14 +4,14 @@ org.onap.ccsdk.parent odlparent-lite - 1.3.1-SNAPSHOT + 1.3.2 ccsdk-sli-plugins :: gr-toolkit :: ${project.artifactId} org.onap.ccsdk.sli.plugins gr-toolkit-installer - 0.5.0-SNAPSHOT + 0.5.1-SNAPSHOT pom ccsdk-gr-toolkit diff --git a/grToolkit/model/pom.xml b/grToolkit/model/pom.xml index ab85fccfd..a1d5ac47f 100755 --- a/grToolkit/model/pom.xml +++ b/grToolkit/model/pom.xml @@ -4,13 +4,13 @@ org.onap.ccsdk.parent binding-parent - 1.3.1-SNAPSHOT + 1.3.2 ccsdk-sli-plugins :: gr-toolkit :: ${project.artifactId} org.onap.ccsdk.sli.plugins gr-toolkit-model - 0.5.0-SNAPSHOT + 0.5.1-SNAPSHOT bundle diff --git a/grToolkit/pom.xml b/grToolkit/pom.xml index 2b47ba604..e2b77ca33 100755 --- a/grToolkit/pom.xml +++ b/grToolkit/pom.xml @@ -5,13 +5,13 @@ org.onap.ccsdk.parent odlparent-lite - 1.3.1-SNAPSHOT + 1.3.2 org.onap.ccsdk.sli.plugins gr-toolkit - 0.5.0-SNAPSHOT + 0.5.1-SNAPSHOT pom ccsdk-sli-plugins :: gr-toolkit diff --git a/grToolkit/provider/pom.xml b/grToolkit/provider/pom.xml index 9e30d1e35..6d6164354 100755 --- a/grToolkit/provider/pom.xml +++ b/grToolkit/provider/pom.xml @@ -4,13 +4,13 @@ org.onap.ccsdk.parent binding-parent - 1.3.1-SNAPSHOT + 1.3.2 ccsdk-sli-plugins :: gr-toolkit :: ${project.artifactId} org.onap.ccsdk.sli.plugins gr-toolkit-provider - 0.5.0-SNAPSHOT + 0.5.1-SNAPSHOT bundle diff --git a/pom.xml b/pom.xml index 7c9feb460..d695012d2 100755 --- a/pom.xml +++ b/pom.xml @@ -5,12 +5,12 @@ org.onap.ccsdk.parent odlparent-lite - 1.3.1-SNAPSHOT + 1.3.2 org.onap.ccsdk.sli.plugins ccsdk-sli-plugins - 0.5.0-SNAPSHOT + 0.5.1-SNAPSHOT pom ccsdk-sli-plugins diff --git a/properties-node/features/ccsdk-properties-node/pom.xml b/properties-node/features/ccsdk-properties-node/pom.xml index 69bdaddaa..11ed8b4d7 100644 --- a/properties-node/features/ccsdk-properties-node/pom.xml +++ b/properties-node/features/ccsdk-properties-node/pom.xml @@ -5,13 +5,13 @@ org.onap.ccsdk.parent single-feature-parent - 1.3.1-SNAPSHOT + 1.3.2 org.onap.ccsdk.sli.plugins ccsdk-properties-node - 0.5.0-SNAPSHOT + 0.5.1-SNAPSHOT feature ccsdk-sli-plugins :: properties-node :: ${project.artifactId} diff --git a/properties-node/features/features-properties-node/pom.xml b/properties-node/features/features-properties-node/pom.xml index a4479ad33..118a272ed 100644 --- a/properties-node/features/features-properties-node/pom.xml +++ b/properties-node/features/features-properties-node/pom.xml @@ -5,13 +5,13 @@ org.onap.ccsdk.parent feature-repo-parent - 1.3.1-SNAPSHOT + 1.3.2 org.onap.ccsdk.sli.plugins features-properties-node - 0.5.0-SNAPSHOT + 0.5.1-SNAPSHOT feature ccsdk-sli-plugins :: properties-node :: ${project.artifactId} diff --git a/properties-node/features/pom.xml b/properties-node/features/pom.xml index ac155ad59..adeb6fed3 100755 --- a/properties-node/features/pom.xml +++ b/properties-node/features/pom.xml @@ -5,12 +5,12 @@ org.onap.ccsdk.parent odlparent-lite - 1.3.1-SNAPSHOT + 1.3.2 org.onap.ccsdk.sli.plugins properties-node-features - 0.5.0-SNAPSHOT + 0.5.1-SNAPSHOT pom ccsdk-sli-plugins :: properties-node :: ${project.artifactId} diff --git a/properties-node/installer/pom.xml b/properties-node/installer/pom.xml index 1f5806477..d0403454a 100755 --- a/properties-node/installer/pom.xml +++ b/properties-node/installer/pom.xml @@ -5,12 +5,12 @@ org.onap.ccsdk.parent odlparent-lite - 1.3.1-SNAPSHOT + 1.3.2 org.onap.ccsdk.sli.plugins properties-node-installer - 0.5.0-SNAPSHOT + 0.5.1-SNAPSHOT pom ccsdk-sli-plugins :: properties-node :: ${project.artifactId} diff --git a/properties-node/pom.xml b/properties-node/pom.xml index 4e66bc700..576bb5b69 100755 --- a/properties-node/pom.xml +++ b/properties-node/pom.xml @@ -5,12 +5,12 @@ org.onap.ccsdk.parent odlparent-lite - 1.3.1-SNAPSHOT + 1.3.2 org.onap.ccsdk.sli.plugins properties-node - 0.5.0-SNAPSHOT + 0.5.1-SNAPSHOT pom ccsdk-sli-plugins :: properties-node diff --git a/properties-node/provider/pom.xml b/properties-node/provider/pom.xml index 46c0dbac4..812f7cb70 100755 --- a/properties-node/provider/pom.xml +++ b/properties-node/provider/pom.xml @@ -5,12 +5,12 @@ org.onap.ccsdk.parent binding-parent - 1.3.1-SNAPSHOT + 1.3.2 org.onap.ccsdk.sli.plugins properties-node-provider - 0.5.0-SNAPSHOT + 0.5.1-SNAPSHOT bundle ccsdk-sli-plugins :: properties-node :: ${project.artifactId} 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 ab2f8b659..31140f805 100644 --- a/restapi-call-node/features/ccsdk-restapi-call-node/pom.xml +++ b/restapi-call-node/features/ccsdk-restapi-call-node/pom.xml @@ -5,13 +5,13 @@ org.onap.ccsdk.parent single-feature-parent - 1.3.1-SNAPSHOT + 1.3.2 org.onap.ccsdk.sli.plugins ccsdk-restapi-call-node - 0.5.0-SNAPSHOT + 0.5.1-SNAPSHOT feature ccsdk-sli-plugins :: restapi-call-node :: ${project.artifactId} 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 f230f0a1c..e14e04be0 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 @@ org.onap.ccsdk.parent feature-repo-parent - 1.3.1-SNAPSHOT + 1.3.2 org.onap.ccsdk.sli.plugins features-restapi-call-node - 0.5.0-SNAPSHOT + 0.5.1-SNAPSHOT feature ccsdk-sli-plugins :: restapi-call-node :: ${project.artifactId} diff --git a/restapi-call-node/features/pom.xml b/restapi-call-node/features/pom.xml index b9afd7ff4..5a80ef1ab 100755 --- a/restapi-call-node/features/pom.xml +++ b/restapi-call-node/features/pom.xml @@ -5,12 +5,12 @@ org.onap.ccsdk.parent odlparent-lite - 1.3.1-SNAPSHOT + 1.3.2 org.onap.ccsdk.sli.plugins restapi-call-node-features - 0.5.0-SNAPSHOT + 0.5.1-SNAPSHOT pom ccsdk-sli-plugins :: restapi-call-node :: ${project.artifactId} diff --git a/restapi-call-node/installer/pom.xml b/restapi-call-node/installer/pom.xml index 647e3a437..6824f5024 100755 --- a/restapi-call-node/installer/pom.xml +++ b/restapi-call-node/installer/pom.xml @@ -5,12 +5,12 @@ org.onap.ccsdk.parent odlparent-lite - 1.3.1-SNAPSHOT + 1.3.2 org.onap.ccsdk.sli.plugins restapi-call-node-installer - 0.5.0-SNAPSHOT + 0.5.1-SNAPSHOT pom ccsdk-sli-plugins :: restapi-call-node :: ${project.artifactId} diff --git a/restapi-call-node/pom.xml b/restapi-call-node/pom.xml index 37d53f563..530a449f6 100755 --- a/restapi-call-node/pom.xml +++ b/restapi-call-node/pom.xml @@ -5,12 +5,12 @@ org.onap.ccsdk.parent odlparent-lite - 1.3.1-SNAPSHOT + 1.3.2 org.onap.ccsdk.sli.plugins restapi-call-node - 0.5.0-SNAPSHOT + 0.5.1-SNAPSHOT pom ccsdk-sli-plugins :: restapi-call-node diff --git a/restapi-call-node/provider/pom.xml b/restapi-call-node/provider/pom.xml index 0373d1784..c4a83539e 100755 --- a/restapi-call-node/provider/pom.xml +++ b/restapi-call-node/provider/pom.xml @@ -5,12 +5,12 @@ org.onap.ccsdk.parent binding-parent - 1.3.1-SNAPSHOT + 1.3.2 org.onap.ccsdk.sli.plugins restapi-call-node-provider - 0.5.0-SNAPSHOT + 0.5.1-SNAPSHOT bundle ccsdk-sli-plugins :: restapi-call-node :: ${project.artifactId} diff --git a/restconf-client/features/ccsdk-restconf-client/pom.xml b/restconf-client/features/ccsdk-restconf-client/pom.xml index cde001de7..f9cc2e5f7 100644 --- a/restconf-client/features/ccsdk-restconf-client/pom.xml +++ b/restconf-client/features/ccsdk-restconf-client/pom.xml @@ -5,13 +5,13 @@ org.onap.ccsdk.parent single-feature-parent - 1.3.1-SNAPSHOT + 1.3.2 org.onap.ccsdk.sli.plugins ccsdk-restconf-client - 0.5.0-SNAPSHOT + 0.5.1-SNAPSHOT feature diff --git a/restconf-client/features/features-restconf-client/pom.xml b/restconf-client/features/features-restconf-client/pom.xml index a902f9d72..64501ff40 100644 --- a/restconf-client/features/features-restconf-client/pom.xml +++ b/restconf-client/features/features-restconf-client/pom.xml @@ -5,13 +5,13 @@ org.onap.ccsdk.parent feature-repo-parent - 1.3.1-SNAPSHOT + 1.3.2 org.onap.ccsdk.sli.plugins features-restconf-client - 0.5.0-SNAPSHOT + 0.5.1-SNAPSHOT feature ccsdk-sli-plugins :: restconf-client :: ${project.artifactId} diff --git a/restconf-client/features/pom.xml b/restconf-client/features/pom.xml index bc658c9d9..713b42f2c 100755 --- a/restconf-client/features/pom.xml +++ b/restconf-client/features/pom.xml @@ -5,12 +5,12 @@ org.onap.ccsdk.parent odlparent-lite - 1.3.1-SNAPSHOT + 1.3.2 org.onap.ccsdk.sli.plugins restconf-client-features - 0.5.0-SNAPSHOT + 0.5.1-SNAPSHOT pom ccsdk-sli-plugins :: restconf-client :: ${project.artifactId} diff --git a/restconf-client/installer/pom.xml b/restconf-client/installer/pom.xml index 47c5a4059..33e874171 100755 --- a/restconf-client/installer/pom.xml +++ b/restconf-client/installer/pom.xml @@ -5,12 +5,12 @@ org.onap.ccsdk.parent odlparent-lite - 1.3.1-SNAPSHOT + 1.3.2 org.onap.ccsdk.sli.plugins restconf-client-installer - 0.5.0-SNAPSHOT + 0.5.1-SNAPSHOT pom ccsdk-sli-plugins :: restconf-client :: ${project.artifactId} diff --git a/restconf-client/pom.xml b/restconf-client/pom.xml index 2b1643062..069494eab 100755 --- a/restconf-client/pom.xml +++ b/restconf-client/pom.xml @@ -5,12 +5,12 @@ org.onap.ccsdk.parent odlparent-lite - 1.3.1-SNAPSHOT + 1.3.2 org.onap.ccsdk.sli.plugins restconf-client - 0.5.0-SNAPSHOT + 0.5.1-SNAPSHOT pom ccsdk-sli-plugins :: restconf-client diff --git a/restconf-client/provider/pom.xml b/restconf-client/provider/pom.xml index c064394d1..7b1f2cbfe 100755 --- a/restconf-client/provider/pom.xml +++ b/restconf-client/provider/pom.xml @@ -5,12 +5,12 @@ org.onap.ccsdk.parent binding-parent - 1.3.1-SNAPSHOT + 1.3.2 org.onap.ccsdk.sli.plugins restconf-client-provider - 0.5.0-SNAPSHOT + 0.5.1-SNAPSHOT bundle ccsdk-sli-plugins :: restconf-client :: ${project.artifactId} 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 a50f17893..e34271786 100644 --- a/sshapi-call-node/features/ccsdk-sshapi-call-node/pom.xml +++ b/sshapi-call-node/features/ccsdk-sshapi-call-node/pom.xml @@ -5,13 +5,13 @@ org.onap.ccsdk.parent single-feature-parent - 1.3.1-SNAPSHOT + 1.3.2 org.onap.ccsdk.sli.plugins ccsdk-sshapi-call-node - 0.5.0-SNAPSHOT + 0.5.1-SNAPSHOT feature ccsdk-sli-plugins :: sshapi-call-node :: ${project.artifactId} 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 cf12bca82..9f43dbf42 100644 --- a/sshapi-call-node/features/features-sshapi-call-node/pom.xml +++ b/sshapi-call-node/features/features-sshapi-call-node/pom.xml @@ -5,13 +5,13 @@ org.onap.ccsdk.parent feature-repo-parent - 1.3.1-SNAPSHOT + 1.3.2 org.onap.ccsdk.sli.plugins features-sshapi-call-node - 0.5.0-SNAPSHOT + 0.5.1-SNAPSHOT feature ccsdk-sli-plugins :: sshapi-call-node :: ${project.artifactId} diff --git a/sshapi-call-node/features/pom.xml b/sshapi-call-node/features/pom.xml index 6c77b070a..b91af1fa2 100755 --- a/sshapi-call-node/features/pom.xml +++ b/sshapi-call-node/features/pom.xml @@ -5,12 +5,12 @@ org.onap.ccsdk.parent odlparent-lite - 1.3.1-SNAPSHOT + 1.3.2 org.onap.ccsdk.sli.plugins sshapi-call-node-features - 0.5.0-SNAPSHOT + 0.5.1-SNAPSHOT pom ccsdk-sli-plugins :: sshapi-call-node :: ${project.artifactId} diff --git a/sshapi-call-node/installer/pom.xml b/sshapi-call-node/installer/pom.xml index 64c352796..12a744e29 100755 --- a/sshapi-call-node/installer/pom.xml +++ b/sshapi-call-node/installer/pom.xml @@ -5,12 +5,12 @@ org.onap.ccsdk.parent odlparent-lite - 1.3.1-SNAPSHOT + 1.3.2 org.onap.ccsdk.sli.plugins sshapi-call-node-installer - 0.5.0-SNAPSHOT + 0.5.1-SNAPSHOT pom ccsdk-sli-plugins :: sshapi-call-node :: ${project.artifactId} diff --git a/sshapi-call-node/pom.xml b/sshapi-call-node/pom.xml index d820e871d..bb1a0dfc4 100755 --- a/sshapi-call-node/pom.xml +++ b/sshapi-call-node/pom.xml @@ -5,12 +5,12 @@ org.onap.ccsdk.parent odlparent-lite - 1.3.1-SNAPSHOT + 1.3.2 org.onap.ccsdk.sli.plugins sshapi-call-node - 0.5.0-SNAPSHOT + 0.5.1-SNAPSHOT pom ccsdk-sli-plugins :: sshapi-call-node diff --git a/sshapi-call-node/provider/pom.xml b/sshapi-call-node/provider/pom.xml index 60abe7560..45e3bb5ce 100755 --- a/sshapi-call-node/provider/pom.xml +++ b/sshapi-call-node/provider/pom.xml @@ -5,12 +5,12 @@ org.onap.ccsdk.parent binding-parent - 1.3.1-SNAPSHOT + 1.3.2 org.onap.ccsdk.sli.plugins sshapi-call-node-provider - 0.5.0-SNAPSHOT + 0.5.1-SNAPSHOT bundle ccsdk-sli-plugins :: sshapi-call-node :: ${project.artifactId} diff --git a/template-node/features/ccsdk-template-node/pom.xml b/template-node/features/ccsdk-template-node/pom.xml index c72f76951..5ee4d0fe1 100644 --- a/template-node/features/ccsdk-template-node/pom.xml +++ b/template-node/features/ccsdk-template-node/pom.xml @@ -5,13 +5,13 @@ org.onap.ccsdk.parent single-feature-parent - 1.3.1-SNAPSHOT + 1.3.2 org.onap.ccsdk.sli.plugins ccsdk-template-node - 0.5.0-SNAPSHOT + 0.5.1-SNAPSHOT feature ccsdk-sli-plugins :: template-node :: ${project.artifactId} diff --git a/template-node/features/features-template-node/pom.xml b/template-node/features/features-template-node/pom.xml index 837b1c138..0641a5a32 100644 --- a/template-node/features/features-template-node/pom.xml +++ b/template-node/features/features-template-node/pom.xml @@ -5,13 +5,13 @@ org.onap.ccsdk.parent feature-repo-parent - 1.3.1-SNAPSHOT + 1.3.2 org.onap.ccsdk.sli.plugins features-template-node - 0.5.0-SNAPSHOT + 0.5.1-SNAPSHOT feature diff --git a/template-node/features/pom.xml b/template-node/features/pom.xml index 10c74b8d3..9fa5fc199 100644 --- a/template-node/features/pom.xml +++ b/template-node/features/pom.xml @@ -5,12 +5,12 @@ org.onap.ccsdk.parent odlparent-lite - 1.3.1-SNAPSHOT + 1.3.2 org.onap.ccsdk.sli.plugins template-node-features - 0.5.0-SNAPSHOT + 0.5.1-SNAPSHOT pom diff --git a/template-node/installer/pom.xml b/template-node/installer/pom.xml index 93d56bb05..d522ba52a 100644 --- a/template-node/installer/pom.xml +++ b/template-node/installer/pom.xml @@ -5,12 +5,12 @@ org.onap.ccsdk.parent odlparent-lite - 1.3.1-SNAPSHOT + 1.3.2 org.onap.ccsdk.sli.plugins template-node-installer - 0.5.0-SNAPSHOT + 0.5.1-SNAPSHOT pom ccsdk-sli-plugins :: template-node :: ${project.artifactId} diff --git a/template-node/pom.xml b/template-node/pom.xml index 6244c8d10..b75227f6a 100644 --- a/template-node/pom.xml +++ b/template-node/pom.xml @@ -5,12 +5,12 @@ org.onap.ccsdk.parent odlparent-lite - 1.3.1-SNAPSHOT + 1.3.2 org.onap.ccsdk.sli.plugins template-node - 0.5.0-SNAPSHOT + 0.5.1-SNAPSHOT pom diff --git a/template-node/provider/pom.xml b/template-node/provider/pom.xml index 2a99c1029..21ef16e99 100644 --- a/template-node/provider/pom.xml +++ b/template-node/provider/pom.xml @@ -5,12 +5,12 @@ org.onap.ccsdk.parent binding-parent - 1.3.1-SNAPSHOT + 1.3.2 org.onap.ccsdk.sli.plugins template-node-provider - 0.5.0-SNAPSHOT + 0.5.1-SNAPSHOT bundle ccsdk-sli-plugins :: template-node :: ${project.artifactId} diff --git a/version.properties b/version.properties index c8bc76801..2cb9acc8c 100644 --- a/version.properties +++ b/version.properties @@ -7,7 +7,7 @@ release_name=0 sprint_number=5 -feature_revision=0 +feature_revision=1 base_version=${release_name}.${sprint_number}.${feature_revision} -- cgit 1.2.3-korg From 7ebd5f81dbe0f852c1383712270dae1bbd96527e Mon Sep 17 00:00:00 2001 From: "Timoney, Dan (dt5972)" Date: Fri, 9 Aug 2019 13:55:10 -0400 Subject: Roll to next snapshot Roll to next snapshot version Change-Id: Ic49a7e77c9234ade7cf0e0c36cb830de2ef870ca Issue-ID: CCSDK-1563 Signed-off-by: Timoney, Dan (dt5972) --- artifacts/pom.xml | 4 ++-- features/ccsdk-sli-plugins-all/pom.xml | 4 ++-- features/features-sli-plugins/pom.xml | 4 ++-- features/installer/pom.xml | 4 ++-- features/pom.xml | 4 ++-- grToolkit/features/ccsdk-gr-toolkit/pom.xml | 4 ++-- grToolkit/features/features-gr-toolkit/pom.xml | 4 ++-- grToolkit/features/pom.xml | 4 ++-- grToolkit/installer/pom.xml | 4 ++-- grToolkit/model/pom.xml | 4 ++-- grToolkit/pom.xml | 4 ++-- grToolkit/provider/pom.xml | 4 ++-- pom.xml | 4 ++-- properties-node/features/ccsdk-properties-node/pom.xml | 4 ++-- properties-node/features/features-properties-node/pom.xml | 4 ++-- properties-node/features/pom.xml | 4 ++-- properties-node/installer/pom.xml | 4 ++-- properties-node/pom.xml | 4 ++-- properties-node/provider/pom.xml | 4 ++-- restapi-call-node/features/ccsdk-restapi-call-node/pom.xml | 4 ++-- restapi-call-node/features/features-restapi-call-node/pom.xml | 4 ++-- restapi-call-node/features/pom.xml | 4 ++-- restapi-call-node/installer/pom.xml | 4 ++-- restapi-call-node/pom.xml | 4 ++-- restapi-call-node/provider/pom.xml | 4 ++-- restconf-client/features/ccsdk-restconf-client/pom.xml | 4 ++-- restconf-client/features/features-restconf-client/pom.xml | 4 ++-- restconf-client/features/pom.xml | 4 ++-- restconf-client/installer/pom.xml | 4 ++-- restconf-client/pom.xml | 4 ++-- restconf-client/provider/pom.xml | 4 ++-- sshapi-call-node/features/ccsdk-sshapi-call-node/pom.xml | 4 ++-- sshapi-call-node/features/features-sshapi-call-node/pom.xml | 4 ++-- sshapi-call-node/features/pom.xml | 4 ++-- sshapi-call-node/installer/pom.xml | 4 ++-- sshapi-call-node/pom.xml | 4 ++-- sshapi-call-node/provider/pom.xml | 4 ++-- template-node/features/ccsdk-template-node/pom.xml | 4 ++-- template-node/features/features-template-node/pom.xml | 4 ++-- template-node/features/pom.xml | 4 ++-- template-node/installer/pom.xml | 4 ++-- template-node/pom.xml | 4 ++-- template-node/provider/pom.xml | 4 ++-- version.properties | 2 +- 44 files changed, 87 insertions(+), 87 deletions(-) (limited to 'restconf-client/provider') diff --git a/artifacts/pom.xml b/artifacts/pom.xml index 71e315341..9bc3a9c9b 100755 --- a/artifacts/pom.xml +++ b/artifacts/pom.xml @@ -4,7 +4,7 @@ org.onap.ccsdk.sli.plugins sli-plugins-artifacts - 0.5.1-SNAPSHOT + 0.5.2-SNAPSHOT pom ccsdk-sli-plugins :: sli-plugins-artifacts @@ -17,7 +17,7 @@ org.onap.ccsdk.parent parent - 1.3.2 + 1.3.3-SNAPSHOT diff --git a/features/ccsdk-sli-plugins-all/pom.xml b/features/ccsdk-sli-plugins-all/pom.xml index 2522ce584..6b7bf94d6 100644 --- a/features/ccsdk-sli-plugins-all/pom.xml +++ b/features/ccsdk-sli-plugins-all/pom.xml @@ -5,13 +5,13 @@ org.onap.ccsdk.parent single-feature-parent - 1.3.2 + 1.3.3-SNAPSHOT org.onap.ccsdk.sli.plugins ccsdk-sli-plugins-all - 0.5.1-SNAPSHOT + 0.5.2-SNAPSHOT feature ccsdk-sli-plugins :: features :: ${project.artifactId} diff --git a/features/features-sli-plugins/pom.xml b/features/features-sli-plugins/pom.xml index da9a571b0..436306765 100644 --- a/features/features-sli-plugins/pom.xml +++ b/features/features-sli-plugins/pom.xml @@ -5,13 +5,13 @@ org.onap.ccsdk.parent feature-repo-parent - 1.3.2 + 1.3.3-SNAPSHOT org.onap.ccsdk.sli.plugins features-sli-plugins - 0.5.1-SNAPSHOT + 0.5.2-SNAPSHOT feature ccsdk-sli-plugins :: features :: ${project.artifactId} diff --git a/features/installer/pom.xml b/features/installer/pom.xml index baa4fc381..3d662e444 100755 --- a/features/installer/pom.xml +++ b/features/installer/pom.xml @@ -5,13 +5,13 @@ org.onap.ccsdk.parent odlparent-lite - 1.3.2 + 1.3.3-SNAPSHOT org.onap.ccsdk.sli.plugins sliplugins-features-installer - 0.5.1-SNAPSHOT + 0.5.2-SNAPSHOT pom ccsdk-sli-plugins :: features :: ${project.artifactId} diff --git a/features/pom.xml b/features/pom.xml index 77bc51efe..29a67a820 100755 --- a/features/pom.xml +++ b/features/pom.xml @@ -5,13 +5,13 @@ org.onap.ccsdk.parent odlparent-lite - 1.3.2 + 1.3.3-SNAPSHOT org.onap.ccsdk.sli.plugins sliplugins-feature-aggregator - 0.5.1-SNAPSHOT + 0.5.2-SNAPSHOT pom ccsdk-sli-plugins :: features diff --git a/grToolkit/features/ccsdk-gr-toolkit/pom.xml b/grToolkit/features/ccsdk-gr-toolkit/pom.xml index a25d95c67..1f4aec3f8 100644 --- a/grToolkit/features/ccsdk-gr-toolkit/pom.xml +++ b/grToolkit/features/ccsdk-gr-toolkit/pom.xml @@ -5,13 +5,13 @@ org.onap.ccsdk.parent single-feature-parent - 1.3.2 + 1.3.3-SNAPSHOT org.onap.ccsdk.sli.plugins ccsdk-gr-toolkit - 0.5.1-SNAPSHOT + 0.5.2-SNAPSHOT feature ccsdk-sli-plugins :: gr-toolkit :: ${project.artifactId} diff --git a/grToolkit/features/features-gr-toolkit/pom.xml b/grToolkit/features/features-gr-toolkit/pom.xml index 33a713524..65b1a5d57 100755 --- a/grToolkit/features/features-gr-toolkit/pom.xml +++ b/grToolkit/features/features-gr-toolkit/pom.xml @@ -5,13 +5,13 @@ org.onap.ccsdk.parent feature-repo-parent - 1.3.2 + 1.3.3-SNAPSHOT org.onap.ccsdk.sli.plugins features-gr-toolkit - 0.5.1-SNAPSHOT + 0.5.2-SNAPSHOT feature ccsdk-sli-plugins :: gr-toolkit :: ${project.artifactId} diff --git a/grToolkit/features/pom.xml b/grToolkit/features/pom.xml index a91fdeef7..c7f8ffea7 100755 --- a/grToolkit/features/pom.xml +++ b/grToolkit/features/pom.xml @@ -4,14 +4,14 @@ org.onap.ccsdk.parent odlparent-lite - 1.3.2 + 1.3.3-SNAPSHOT ccsdk-sli-plugins :: gr-toolkit :: ${project.artifactId} gr-toolkit-features org.onap.ccsdk.sli.plugins - 0.5.1-SNAPSHOT + 0.5.2-SNAPSHOT pom diff --git a/grToolkit/installer/pom.xml b/grToolkit/installer/pom.xml index 59b5d4e91..64e172cc2 100755 --- a/grToolkit/installer/pom.xml +++ b/grToolkit/installer/pom.xml @@ -4,14 +4,14 @@ org.onap.ccsdk.parent odlparent-lite - 1.3.2 + 1.3.3-SNAPSHOT ccsdk-sli-plugins :: gr-toolkit :: ${project.artifactId} org.onap.ccsdk.sli.plugins gr-toolkit-installer - 0.5.1-SNAPSHOT + 0.5.2-SNAPSHOT pom ccsdk-gr-toolkit diff --git a/grToolkit/model/pom.xml b/grToolkit/model/pom.xml index a1d5ac47f..f400a04cc 100755 --- a/grToolkit/model/pom.xml +++ b/grToolkit/model/pom.xml @@ -4,13 +4,13 @@ org.onap.ccsdk.parent binding-parent - 1.3.2 + 1.3.3-SNAPSHOT ccsdk-sli-plugins :: gr-toolkit :: ${project.artifactId} org.onap.ccsdk.sli.plugins gr-toolkit-model - 0.5.1-SNAPSHOT + 0.5.2-SNAPSHOT bundle diff --git a/grToolkit/pom.xml b/grToolkit/pom.xml index e2b77ca33..c36c1a08d 100755 --- a/grToolkit/pom.xml +++ b/grToolkit/pom.xml @@ -5,13 +5,13 @@ org.onap.ccsdk.parent odlparent-lite - 1.3.2 + 1.3.3-SNAPSHOT org.onap.ccsdk.sli.plugins gr-toolkit - 0.5.1-SNAPSHOT + 0.5.2-SNAPSHOT pom ccsdk-sli-plugins :: gr-toolkit diff --git a/grToolkit/provider/pom.xml b/grToolkit/provider/pom.xml index 6d6164354..1d8149592 100755 --- a/grToolkit/provider/pom.xml +++ b/grToolkit/provider/pom.xml @@ -4,13 +4,13 @@ org.onap.ccsdk.parent binding-parent - 1.3.2 + 1.3.3-SNAPSHOT ccsdk-sli-plugins :: gr-toolkit :: ${project.artifactId} org.onap.ccsdk.sli.plugins gr-toolkit-provider - 0.5.1-SNAPSHOT + 0.5.2-SNAPSHOT bundle diff --git a/pom.xml b/pom.xml index d695012d2..32ce564cd 100755 --- a/pom.xml +++ b/pom.xml @@ -5,12 +5,12 @@ org.onap.ccsdk.parent odlparent-lite - 1.3.2 + 1.3.3-SNAPSHOT org.onap.ccsdk.sli.plugins ccsdk-sli-plugins - 0.5.1-SNAPSHOT + 0.5.2-SNAPSHOT pom ccsdk-sli-plugins diff --git a/properties-node/features/ccsdk-properties-node/pom.xml b/properties-node/features/ccsdk-properties-node/pom.xml index 11ed8b4d7..45adc9364 100644 --- a/properties-node/features/ccsdk-properties-node/pom.xml +++ b/properties-node/features/ccsdk-properties-node/pom.xml @@ -5,13 +5,13 @@ org.onap.ccsdk.parent single-feature-parent - 1.3.2 + 1.3.3-SNAPSHOT org.onap.ccsdk.sli.plugins ccsdk-properties-node - 0.5.1-SNAPSHOT + 0.5.2-SNAPSHOT feature ccsdk-sli-plugins :: properties-node :: ${project.artifactId} diff --git a/properties-node/features/features-properties-node/pom.xml b/properties-node/features/features-properties-node/pom.xml index 118a272ed..16588adbd 100644 --- a/properties-node/features/features-properties-node/pom.xml +++ b/properties-node/features/features-properties-node/pom.xml @@ -5,13 +5,13 @@ org.onap.ccsdk.parent feature-repo-parent - 1.3.2 + 1.3.3-SNAPSHOT org.onap.ccsdk.sli.plugins features-properties-node - 0.5.1-SNAPSHOT + 0.5.2-SNAPSHOT feature ccsdk-sli-plugins :: properties-node :: ${project.artifactId} diff --git a/properties-node/features/pom.xml b/properties-node/features/pom.xml index adeb6fed3..96121c6bc 100755 --- a/properties-node/features/pom.xml +++ b/properties-node/features/pom.xml @@ -5,12 +5,12 @@ org.onap.ccsdk.parent odlparent-lite - 1.3.2 + 1.3.3-SNAPSHOT org.onap.ccsdk.sli.plugins properties-node-features - 0.5.1-SNAPSHOT + 0.5.2-SNAPSHOT pom ccsdk-sli-plugins :: properties-node :: ${project.artifactId} diff --git a/properties-node/installer/pom.xml b/properties-node/installer/pom.xml index d0403454a..cfc02dd3d 100755 --- a/properties-node/installer/pom.xml +++ b/properties-node/installer/pom.xml @@ -5,12 +5,12 @@ org.onap.ccsdk.parent odlparent-lite - 1.3.2 + 1.3.3-SNAPSHOT org.onap.ccsdk.sli.plugins properties-node-installer - 0.5.1-SNAPSHOT + 0.5.2-SNAPSHOT pom ccsdk-sli-plugins :: properties-node :: ${project.artifactId} diff --git a/properties-node/pom.xml b/properties-node/pom.xml index 576bb5b69..aa5e75a52 100755 --- a/properties-node/pom.xml +++ b/properties-node/pom.xml @@ -5,12 +5,12 @@ org.onap.ccsdk.parent odlparent-lite - 1.3.2 + 1.3.3-SNAPSHOT org.onap.ccsdk.sli.plugins properties-node - 0.5.1-SNAPSHOT + 0.5.2-SNAPSHOT pom ccsdk-sli-plugins :: properties-node diff --git a/properties-node/provider/pom.xml b/properties-node/provider/pom.xml index 812f7cb70..1f9fd46e2 100755 --- a/properties-node/provider/pom.xml +++ b/properties-node/provider/pom.xml @@ -5,12 +5,12 @@ org.onap.ccsdk.parent binding-parent - 1.3.2 + 1.3.3-SNAPSHOT org.onap.ccsdk.sli.plugins properties-node-provider - 0.5.1-SNAPSHOT + 0.5.2-SNAPSHOT bundle ccsdk-sli-plugins :: properties-node :: ${project.artifactId} 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 31140f805..6578de4e9 100644 --- a/restapi-call-node/features/ccsdk-restapi-call-node/pom.xml +++ b/restapi-call-node/features/ccsdk-restapi-call-node/pom.xml @@ -5,13 +5,13 @@ org.onap.ccsdk.parent single-feature-parent - 1.3.2 + 1.3.3-SNAPSHOT org.onap.ccsdk.sli.plugins ccsdk-restapi-call-node - 0.5.1-SNAPSHOT + 0.5.2-SNAPSHOT feature ccsdk-sli-plugins :: restapi-call-node :: ${project.artifactId} 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 e14e04be0..dd3af78a3 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 @@ org.onap.ccsdk.parent feature-repo-parent - 1.3.2 + 1.3.3-SNAPSHOT org.onap.ccsdk.sli.plugins features-restapi-call-node - 0.5.1-SNAPSHOT + 0.5.2-SNAPSHOT feature ccsdk-sli-plugins :: restapi-call-node :: ${project.artifactId} diff --git a/restapi-call-node/features/pom.xml b/restapi-call-node/features/pom.xml index 5a80ef1ab..48b91821e 100755 --- a/restapi-call-node/features/pom.xml +++ b/restapi-call-node/features/pom.xml @@ -5,12 +5,12 @@ org.onap.ccsdk.parent odlparent-lite - 1.3.2 + 1.3.3-SNAPSHOT org.onap.ccsdk.sli.plugins restapi-call-node-features - 0.5.1-SNAPSHOT + 0.5.2-SNAPSHOT pom ccsdk-sli-plugins :: restapi-call-node :: ${project.artifactId} diff --git a/restapi-call-node/installer/pom.xml b/restapi-call-node/installer/pom.xml index 6824f5024..f63597c57 100755 --- a/restapi-call-node/installer/pom.xml +++ b/restapi-call-node/installer/pom.xml @@ -5,12 +5,12 @@ org.onap.ccsdk.parent odlparent-lite - 1.3.2 + 1.3.3-SNAPSHOT org.onap.ccsdk.sli.plugins restapi-call-node-installer - 0.5.1-SNAPSHOT + 0.5.2-SNAPSHOT pom ccsdk-sli-plugins :: restapi-call-node :: ${project.artifactId} diff --git a/restapi-call-node/pom.xml b/restapi-call-node/pom.xml index 530a449f6..10497fd36 100755 --- a/restapi-call-node/pom.xml +++ b/restapi-call-node/pom.xml @@ -5,12 +5,12 @@ org.onap.ccsdk.parent odlparent-lite - 1.3.2 + 1.3.3-SNAPSHOT org.onap.ccsdk.sli.plugins restapi-call-node - 0.5.1-SNAPSHOT + 0.5.2-SNAPSHOT pom ccsdk-sli-plugins :: restapi-call-node diff --git a/restapi-call-node/provider/pom.xml b/restapi-call-node/provider/pom.xml index c4a83539e..74f0a98be 100755 --- a/restapi-call-node/provider/pom.xml +++ b/restapi-call-node/provider/pom.xml @@ -5,12 +5,12 @@ org.onap.ccsdk.parent binding-parent - 1.3.2 + 1.3.3-SNAPSHOT org.onap.ccsdk.sli.plugins restapi-call-node-provider - 0.5.1-SNAPSHOT + 0.5.2-SNAPSHOT bundle ccsdk-sli-plugins :: restapi-call-node :: ${project.artifactId} diff --git a/restconf-client/features/ccsdk-restconf-client/pom.xml b/restconf-client/features/ccsdk-restconf-client/pom.xml index f9cc2e5f7..af235f856 100644 --- a/restconf-client/features/ccsdk-restconf-client/pom.xml +++ b/restconf-client/features/ccsdk-restconf-client/pom.xml @@ -5,13 +5,13 @@ org.onap.ccsdk.parent single-feature-parent - 1.3.2 + 1.3.3-SNAPSHOT org.onap.ccsdk.sli.plugins ccsdk-restconf-client - 0.5.1-SNAPSHOT + 0.5.2-SNAPSHOT feature diff --git a/restconf-client/features/features-restconf-client/pom.xml b/restconf-client/features/features-restconf-client/pom.xml index 64501ff40..17065acbe 100644 --- a/restconf-client/features/features-restconf-client/pom.xml +++ b/restconf-client/features/features-restconf-client/pom.xml @@ -5,13 +5,13 @@ org.onap.ccsdk.parent feature-repo-parent - 1.3.2 + 1.3.3-SNAPSHOT org.onap.ccsdk.sli.plugins features-restconf-client - 0.5.1-SNAPSHOT + 0.5.2-SNAPSHOT feature ccsdk-sli-plugins :: restconf-client :: ${project.artifactId} diff --git a/restconf-client/features/pom.xml b/restconf-client/features/pom.xml index 713b42f2c..455987fcb 100755 --- a/restconf-client/features/pom.xml +++ b/restconf-client/features/pom.xml @@ -5,12 +5,12 @@ org.onap.ccsdk.parent odlparent-lite - 1.3.2 + 1.3.3-SNAPSHOT org.onap.ccsdk.sli.plugins restconf-client-features - 0.5.1-SNAPSHOT + 0.5.2-SNAPSHOT pom ccsdk-sli-plugins :: restconf-client :: ${project.artifactId} diff --git a/restconf-client/installer/pom.xml b/restconf-client/installer/pom.xml index 33e874171..e7d8b4af4 100755 --- a/restconf-client/installer/pom.xml +++ b/restconf-client/installer/pom.xml @@ -5,12 +5,12 @@ org.onap.ccsdk.parent odlparent-lite - 1.3.2 + 1.3.3-SNAPSHOT org.onap.ccsdk.sli.plugins restconf-client-installer - 0.5.1-SNAPSHOT + 0.5.2-SNAPSHOT pom ccsdk-sli-plugins :: restconf-client :: ${project.artifactId} diff --git a/restconf-client/pom.xml b/restconf-client/pom.xml index 069494eab..296282a56 100755 --- a/restconf-client/pom.xml +++ b/restconf-client/pom.xml @@ -5,12 +5,12 @@ org.onap.ccsdk.parent odlparent-lite - 1.3.2 + 1.3.3-SNAPSHOT org.onap.ccsdk.sli.plugins restconf-client - 0.5.1-SNAPSHOT + 0.5.2-SNAPSHOT pom ccsdk-sli-plugins :: restconf-client diff --git a/restconf-client/provider/pom.xml b/restconf-client/provider/pom.xml index 7b1f2cbfe..1a734cdd2 100755 --- a/restconf-client/provider/pom.xml +++ b/restconf-client/provider/pom.xml @@ -5,12 +5,12 @@ org.onap.ccsdk.parent binding-parent - 1.3.2 + 1.3.3-SNAPSHOT org.onap.ccsdk.sli.plugins restconf-client-provider - 0.5.1-SNAPSHOT + 0.5.2-SNAPSHOT bundle ccsdk-sli-plugins :: restconf-client :: ${project.artifactId} 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 e34271786..3f6c97c1d 100644 --- a/sshapi-call-node/features/ccsdk-sshapi-call-node/pom.xml +++ b/sshapi-call-node/features/ccsdk-sshapi-call-node/pom.xml @@ -5,13 +5,13 @@ org.onap.ccsdk.parent single-feature-parent - 1.3.2 + 1.3.3-SNAPSHOT org.onap.ccsdk.sli.plugins ccsdk-sshapi-call-node - 0.5.1-SNAPSHOT + 0.5.2-SNAPSHOT feature ccsdk-sli-plugins :: sshapi-call-node :: ${project.artifactId} 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 9f43dbf42..8a496684f 100644 --- a/sshapi-call-node/features/features-sshapi-call-node/pom.xml +++ b/sshapi-call-node/features/features-sshapi-call-node/pom.xml @@ -5,13 +5,13 @@ org.onap.ccsdk.parent feature-repo-parent - 1.3.2 + 1.3.3-SNAPSHOT org.onap.ccsdk.sli.plugins features-sshapi-call-node - 0.5.1-SNAPSHOT + 0.5.2-SNAPSHOT feature ccsdk-sli-plugins :: sshapi-call-node :: ${project.artifactId} diff --git a/sshapi-call-node/features/pom.xml b/sshapi-call-node/features/pom.xml index b91af1fa2..4db5892e3 100755 --- a/sshapi-call-node/features/pom.xml +++ b/sshapi-call-node/features/pom.xml @@ -5,12 +5,12 @@ org.onap.ccsdk.parent odlparent-lite - 1.3.2 + 1.3.3-SNAPSHOT org.onap.ccsdk.sli.plugins sshapi-call-node-features - 0.5.1-SNAPSHOT + 0.5.2-SNAPSHOT pom ccsdk-sli-plugins :: sshapi-call-node :: ${project.artifactId} diff --git a/sshapi-call-node/installer/pom.xml b/sshapi-call-node/installer/pom.xml index 12a744e29..5d4ef718d 100755 --- a/sshapi-call-node/installer/pom.xml +++ b/sshapi-call-node/installer/pom.xml @@ -5,12 +5,12 @@ org.onap.ccsdk.parent odlparent-lite - 1.3.2 + 1.3.3-SNAPSHOT org.onap.ccsdk.sli.plugins sshapi-call-node-installer - 0.5.1-SNAPSHOT + 0.5.2-SNAPSHOT pom ccsdk-sli-plugins :: sshapi-call-node :: ${project.artifactId} diff --git a/sshapi-call-node/pom.xml b/sshapi-call-node/pom.xml index bb1a0dfc4..90bb6d511 100755 --- a/sshapi-call-node/pom.xml +++ b/sshapi-call-node/pom.xml @@ -5,12 +5,12 @@ org.onap.ccsdk.parent odlparent-lite - 1.3.2 + 1.3.3-SNAPSHOT org.onap.ccsdk.sli.plugins sshapi-call-node - 0.5.1-SNAPSHOT + 0.5.2-SNAPSHOT pom ccsdk-sli-plugins :: sshapi-call-node diff --git a/sshapi-call-node/provider/pom.xml b/sshapi-call-node/provider/pom.xml index 45e3bb5ce..8af4faac5 100755 --- a/sshapi-call-node/provider/pom.xml +++ b/sshapi-call-node/provider/pom.xml @@ -5,12 +5,12 @@ org.onap.ccsdk.parent binding-parent - 1.3.2 + 1.3.3-SNAPSHOT org.onap.ccsdk.sli.plugins sshapi-call-node-provider - 0.5.1-SNAPSHOT + 0.5.2-SNAPSHOT bundle ccsdk-sli-plugins :: sshapi-call-node :: ${project.artifactId} diff --git a/template-node/features/ccsdk-template-node/pom.xml b/template-node/features/ccsdk-template-node/pom.xml index 5ee4d0fe1..a1b16a5ff 100644 --- a/template-node/features/ccsdk-template-node/pom.xml +++ b/template-node/features/ccsdk-template-node/pom.xml @@ -5,13 +5,13 @@ org.onap.ccsdk.parent single-feature-parent - 1.3.2 + 1.3.3-SNAPSHOT org.onap.ccsdk.sli.plugins ccsdk-template-node - 0.5.1-SNAPSHOT + 0.5.2-SNAPSHOT feature ccsdk-sli-plugins :: template-node :: ${project.artifactId} diff --git a/template-node/features/features-template-node/pom.xml b/template-node/features/features-template-node/pom.xml index 0641a5a32..c220d4fb8 100644 --- a/template-node/features/features-template-node/pom.xml +++ b/template-node/features/features-template-node/pom.xml @@ -5,13 +5,13 @@ org.onap.ccsdk.parent feature-repo-parent - 1.3.2 + 1.3.3-SNAPSHOT org.onap.ccsdk.sli.plugins features-template-node - 0.5.1-SNAPSHOT + 0.5.2-SNAPSHOT feature diff --git a/template-node/features/pom.xml b/template-node/features/pom.xml index 9fa5fc199..143d9742f 100644 --- a/template-node/features/pom.xml +++ b/template-node/features/pom.xml @@ -5,12 +5,12 @@ org.onap.ccsdk.parent odlparent-lite - 1.3.2 + 1.3.3-SNAPSHOT org.onap.ccsdk.sli.plugins template-node-features - 0.5.1-SNAPSHOT + 0.5.2-SNAPSHOT pom diff --git a/template-node/installer/pom.xml b/template-node/installer/pom.xml index d522ba52a..5de128457 100644 --- a/template-node/installer/pom.xml +++ b/template-node/installer/pom.xml @@ -5,12 +5,12 @@ org.onap.ccsdk.parent odlparent-lite - 1.3.2 + 1.3.3-SNAPSHOT org.onap.ccsdk.sli.plugins template-node-installer - 0.5.1-SNAPSHOT + 0.5.2-SNAPSHOT pom ccsdk-sli-plugins :: template-node :: ${project.artifactId} diff --git a/template-node/pom.xml b/template-node/pom.xml index b75227f6a..519388292 100644 --- a/template-node/pom.xml +++ b/template-node/pom.xml @@ -5,12 +5,12 @@ org.onap.ccsdk.parent odlparent-lite - 1.3.2 + 1.3.3-SNAPSHOT org.onap.ccsdk.sli.plugins template-node - 0.5.1-SNAPSHOT + 0.5.2-SNAPSHOT pom diff --git a/template-node/provider/pom.xml b/template-node/provider/pom.xml index 21ef16e99..d3dd79412 100644 --- a/template-node/provider/pom.xml +++ b/template-node/provider/pom.xml @@ -5,12 +5,12 @@ org.onap.ccsdk.parent binding-parent - 1.3.2 + 1.3.3-SNAPSHOT org.onap.ccsdk.sli.plugins template-node-provider - 0.5.1-SNAPSHOT + 0.5.2-SNAPSHOT bundle ccsdk-sli-plugins :: template-node :: ${project.artifactId} diff --git a/version.properties b/version.properties index 2cb9acc8c..dc2c5ad2a 100644 --- a/version.properties +++ b/version.properties @@ -7,7 +7,7 @@ release_name=0 sprint_number=5 -feature_revision=1 +feature_revision=2 base_version=${release_name}.${sprint_number}.${feature_revision} -- cgit 1.2.3-korg From 9e7f1417df26d634482f053be2cf39b920a22106 Mon Sep 17 00:00:00 2001 From: "Timoney, Dan (dt5972)" Date: Tue, 9 Jul 2019 13:41:32 -0400 Subject: Code changes for Neon Updated code via ccsdk/parent/tools/fluorine2neon.sh script. Change-Id: Ice154214e118ca6ad5043eb0fe337095fd2246d9 Issue-ID: CCSDK-1389 Signed-off-by: Timoney, Dan (dt5972) --- artifacts/pom.xml | 4 +- features/ccsdk-sli-plugins-all/pom.xml | 4 +- features/features-sli-plugins/pom.xml | 4 +- features/installer/pom.xml | 4 +- features/pom.xml | 4 +- grToolkit/features/ccsdk-gr-toolkit/pom.xml | 4 +- grToolkit/features/features-gr-toolkit/pom.xml | 4 +- grToolkit/features/pom.xml | 4 +- grToolkit/installer/pom.xml | 4 +- grToolkit/model/pom.xml | 14 +++--- grToolkit/pom.xml | 4 +- grToolkit/provider/pom.xml | 4 +- .../resources/OSGI-INF/blueprint/GrToolkit.xml | 33 ++++++++++++++ pom.xml | 4 +- .../features/ccsdk-properties-node/pom.xml | 4 +- .../features/features-properties-node/pom.xml | 4 +- properties-node/features/pom.xml | 4 +- properties-node/installer/pom.xml | 4 +- properties-node/pom.xml | 4 +- properties-node/provider/pom.xml | 4 +- .../blueprint/properties-node-blueprint.xml | 16 +++++++ .../features/ccsdk-restapi-call-node/pom.xml | 4 +- .../features/features-restapi-call-node/pom.xml | 4 +- restapi-call-node/features/pom.xml | 4 +- restapi-call-node/installer/pom.xml | 4 +- restapi-call-node/pom.xml | 4 +- restapi-call-node/provider/pom.xml | 4 +- .../blueprint/restapi-call-node-blueprint.xml | 16 +++++++ .../features/ccsdk-restconf-client/pom.xml | 4 +- .../features/features-restconf-client/pom.xml | 4 +- restconf-client/features/pom.xml | 4 +- restconf-client/installer/pom.xml | 4 +- restconf-client/pom.xml | 4 +- restconf-client/provider/pom.xml | 4 +- .../blueprint/restconf-client-blueprint.xml | 51 ++++++++++++++++++++++ .../features/ccsdk-sshapi-call-node/pom.xml | 4 +- .../features/features-sshapi-call-node/pom.xml | 4 +- sshapi-call-node/features/pom.xml | 4 +- sshapi-call-node/installer/pom.xml | 4 +- sshapi-call-node/pom.xml | 4 +- sshapi-call-node/provider/pom.xml | 4 +- .../blueprint/sshapi-call-node-blueprint.xml | 16 +++++++ template-node/features/ccsdk-template-node/pom.xml | 4 +- .../features/features-template-node/pom.xml | 4 +- template-node/features/pom.xml | 4 +- template-node/installer/pom.xml | 4 +- template-node/pom.xml | 4 +- template-node/provider/pom.xml | 4 +- version.properties | 4 +- 49 files changed, 224 insertions(+), 94 deletions(-) create mode 100755 grToolkit/provider/src/main/resources/OSGI-INF/blueprint/GrToolkit.xml create mode 100755 properties-node/provider/src/main/resources/OSGI-INF/blueprint/properties-node-blueprint.xml create mode 100755 restapi-call-node/provider/src/main/resources/OSGI-INF/blueprint/restapi-call-node-blueprint.xml create mode 100755 restconf-client/provider/src/main/resources/OSGI-INF/blueprint/restconf-client-blueprint.xml create mode 100755 sshapi-call-node/provider/src/main/resources/OSGI-INF/blueprint/sshapi-call-node-blueprint.xml (limited to 'restconf-client/provider') diff --git a/artifacts/pom.xml b/artifacts/pom.xml index 9bc3a9c9b..7e395c9f9 100755 --- a/artifacts/pom.xml +++ b/artifacts/pom.xml @@ -4,7 +4,7 @@ org.onap.ccsdk.sli.plugins sli-plugins-artifacts - 0.5.2-SNAPSHOT + 0.6.0-SNAPSHOT pom ccsdk-sli-plugins :: sli-plugins-artifacts @@ -17,7 +17,7 @@ org.onap.ccsdk.parent parent - 1.3.3-SNAPSHOT + 1.4.0-SNAPSHOT diff --git a/features/ccsdk-sli-plugins-all/pom.xml b/features/ccsdk-sli-plugins-all/pom.xml index 6b7bf94d6..bbcfb7570 100644 --- a/features/ccsdk-sli-plugins-all/pom.xml +++ b/features/ccsdk-sli-plugins-all/pom.xml @@ -5,13 +5,13 @@ org.onap.ccsdk.parent single-feature-parent - 1.3.3-SNAPSHOT + 1.4.0-SNAPSHOT org.onap.ccsdk.sli.plugins ccsdk-sli-plugins-all - 0.5.2-SNAPSHOT + 0.6.0-SNAPSHOT feature ccsdk-sli-plugins :: features :: ${project.artifactId} diff --git a/features/features-sli-plugins/pom.xml b/features/features-sli-plugins/pom.xml index 436306765..1ace61b96 100644 --- a/features/features-sli-plugins/pom.xml +++ b/features/features-sli-plugins/pom.xml @@ -5,13 +5,13 @@ org.onap.ccsdk.parent feature-repo-parent - 1.3.3-SNAPSHOT + 1.4.0-SNAPSHOT org.onap.ccsdk.sli.plugins features-sli-plugins - 0.5.2-SNAPSHOT + 0.6.0-SNAPSHOT feature ccsdk-sli-plugins :: features :: ${project.artifactId} diff --git a/features/installer/pom.xml b/features/installer/pom.xml index 3d662e444..334748748 100755 --- a/features/installer/pom.xml +++ b/features/installer/pom.xml @@ -5,13 +5,13 @@ org.onap.ccsdk.parent odlparent-lite - 1.3.3-SNAPSHOT + 1.4.0-SNAPSHOT org.onap.ccsdk.sli.plugins sliplugins-features-installer - 0.5.2-SNAPSHOT + 0.6.0-SNAPSHOT pom ccsdk-sli-plugins :: features :: ${project.artifactId} diff --git a/features/pom.xml b/features/pom.xml index 29a67a820..6e349ca4a 100755 --- a/features/pom.xml +++ b/features/pom.xml @@ -5,13 +5,13 @@ org.onap.ccsdk.parent odlparent-lite - 1.3.3-SNAPSHOT + 1.4.0-SNAPSHOT org.onap.ccsdk.sli.plugins sliplugins-feature-aggregator - 0.5.2-SNAPSHOT + 0.6.0-SNAPSHOT pom ccsdk-sli-plugins :: features diff --git a/grToolkit/features/ccsdk-gr-toolkit/pom.xml b/grToolkit/features/ccsdk-gr-toolkit/pom.xml index 1f4aec3f8..3266f6604 100644 --- a/grToolkit/features/ccsdk-gr-toolkit/pom.xml +++ b/grToolkit/features/ccsdk-gr-toolkit/pom.xml @@ -5,13 +5,13 @@ org.onap.ccsdk.parent single-feature-parent - 1.3.3-SNAPSHOT + 1.4.0-SNAPSHOT org.onap.ccsdk.sli.plugins ccsdk-gr-toolkit - 0.5.2-SNAPSHOT + 0.6.0-SNAPSHOT feature ccsdk-sli-plugins :: gr-toolkit :: ${project.artifactId} diff --git a/grToolkit/features/features-gr-toolkit/pom.xml b/grToolkit/features/features-gr-toolkit/pom.xml index 65b1a5d57..511ba38a0 100755 --- a/grToolkit/features/features-gr-toolkit/pom.xml +++ b/grToolkit/features/features-gr-toolkit/pom.xml @@ -5,13 +5,13 @@ org.onap.ccsdk.parent feature-repo-parent - 1.3.3-SNAPSHOT + 1.4.0-SNAPSHOT org.onap.ccsdk.sli.plugins features-gr-toolkit - 0.5.2-SNAPSHOT + 0.6.0-SNAPSHOT feature ccsdk-sli-plugins :: gr-toolkit :: ${project.artifactId} diff --git a/grToolkit/features/pom.xml b/grToolkit/features/pom.xml index c7f8ffea7..34f706c8f 100755 --- a/grToolkit/features/pom.xml +++ b/grToolkit/features/pom.xml @@ -4,14 +4,14 @@ org.onap.ccsdk.parent odlparent-lite - 1.3.3-SNAPSHOT + 1.4.0-SNAPSHOT ccsdk-sli-plugins :: gr-toolkit :: ${project.artifactId} gr-toolkit-features org.onap.ccsdk.sli.plugins - 0.5.2-SNAPSHOT + 0.6.0-SNAPSHOT pom diff --git a/grToolkit/installer/pom.xml b/grToolkit/installer/pom.xml index 64e172cc2..8c7ec32b2 100755 --- a/grToolkit/installer/pom.xml +++ b/grToolkit/installer/pom.xml @@ -4,14 +4,14 @@ org.onap.ccsdk.parent odlparent-lite - 1.3.3-SNAPSHOT + 1.4.0-SNAPSHOT ccsdk-sli-plugins :: gr-toolkit :: ${project.artifactId} org.onap.ccsdk.sli.plugins gr-toolkit-installer - 0.5.2-SNAPSHOT + 0.6.0-SNAPSHOT pom ccsdk-gr-toolkit diff --git a/grToolkit/model/pom.xml b/grToolkit/model/pom.xml index f400a04cc..8abf89a08 100755 --- a/grToolkit/model/pom.xml +++ b/grToolkit/model/pom.xml @@ -4,23 +4,21 @@ org.onap.ccsdk.parent binding-parent - 1.3.3-SNAPSHOT + 1.4.0-SNAPSHOT ccsdk-sli-plugins :: gr-toolkit :: ${project.artifactId} org.onap.ccsdk.sli.plugins gr-toolkit-model - 0.5.2-SNAPSHOT + 0.6.0-SNAPSHOT bundle - org.opendaylight.mdsal.model - ietf-inet-types-2013-07-15 - - - org.opendaylight.mdsal.model - ietf-yang-types-20130715 + org.opendaylight.mdsal.binding.model.ietf + rfc6991 + + diff --git a/grToolkit/pom.xml b/grToolkit/pom.xml index c36c1a08d..916df4427 100755 --- a/grToolkit/pom.xml +++ b/grToolkit/pom.xml @@ -5,13 +5,13 @@ org.onap.ccsdk.parent odlparent-lite - 1.3.3-SNAPSHOT + 1.4.0-SNAPSHOT org.onap.ccsdk.sli.plugins gr-toolkit - 0.5.2-SNAPSHOT + 0.6.0-SNAPSHOT pom ccsdk-sli-plugins :: gr-toolkit diff --git a/grToolkit/provider/pom.xml b/grToolkit/provider/pom.xml index 1d8149592..0267f2488 100755 --- a/grToolkit/provider/pom.xml +++ b/grToolkit/provider/pom.xml @@ -4,13 +4,13 @@ org.onap.ccsdk.parent binding-parent - 1.3.3-SNAPSHOT + 1.4.0-SNAPSHOT ccsdk-sli-plugins :: gr-toolkit :: ${project.artifactId} org.onap.ccsdk.sli.plugins gr-toolkit-provider - 0.5.2-SNAPSHOT + 0.6.0-SNAPSHOT bundle diff --git a/grToolkit/provider/src/main/resources/OSGI-INF/blueprint/GrToolkit.xml b/grToolkit/provider/src/main/resources/OSGI-INF/blueprint/GrToolkit.xml new file mode 100755 index 000000000..5a4492c56 --- /dev/null +++ b/grToolkit/provider/src/main/resources/OSGI-INF/blueprint/GrToolkit.xml @@ -0,0 +1,33 @@ + + + + + + + + + + + + + + + + + + + + + + + diff --git a/pom.xml b/pom.xml index 32ce564cd..6ee7dea9d 100755 --- a/pom.xml +++ b/pom.xml @@ -5,12 +5,12 @@ org.onap.ccsdk.parent odlparent-lite - 1.3.3-SNAPSHOT + 1.4.0-SNAPSHOT org.onap.ccsdk.sli.plugins ccsdk-sli-plugins - 0.5.2-SNAPSHOT + 0.6.0-SNAPSHOT pom ccsdk-sli-plugins diff --git a/properties-node/features/ccsdk-properties-node/pom.xml b/properties-node/features/ccsdk-properties-node/pom.xml index 45adc9364..4781ac382 100644 --- a/properties-node/features/ccsdk-properties-node/pom.xml +++ b/properties-node/features/ccsdk-properties-node/pom.xml @@ -5,13 +5,13 @@ org.onap.ccsdk.parent single-feature-parent - 1.3.3-SNAPSHOT + 1.4.0-SNAPSHOT org.onap.ccsdk.sli.plugins ccsdk-properties-node - 0.5.2-SNAPSHOT + 0.6.0-SNAPSHOT feature ccsdk-sli-plugins :: properties-node :: ${project.artifactId} diff --git a/properties-node/features/features-properties-node/pom.xml b/properties-node/features/features-properties-node/pom.xml index 16588adbd..58944cceb 100644 --- a/properties-node/features/features-properties-node/pom.xml +++ b/properties-node/features/features-properties-node/pom.xml @@ -5,13 +5,13 @@ org.onap.ccsdk.parent feature-repo-parent - 1.3.3-SNAPSHOT + 1.4.0-SNAPSHOT org.onap.ccsdk.sli.plugins features-properties-node - 0.5.2-SNAPSHOT + 0.6.0-SNAPSHOT feature ccsdk-sli-plugins :: properties-node :: ${project.artifactId} diff --git a/properties-node/features/pom.xml b/properties-node/features/pom.xml index 96121c6bc..bd93644d7 100755 --- a/properties-node/features/pom.xml +++ b/properties-node/features/pom.xml @@ -5,12 +5,12 @@ org.onap.ccsdk.parent odlparent-lite - 1.3.3-SNAPSHOT + 1.4.0-SNAPSHOT org.onap.ccsdk.sli.plugins properties-node-features - 0.5.2-SNAPSHOT + 0.6.0-SNAPSHOT pom ccsdk-sli-plugins :: properties-node :: ${project.artifactId} diff --git a/properties-node/installer/pom.xml b/properties-node/installer/pom.xml index cfc02dd3d..536e20478 100755 --- a/properties-node/installer/pom.xml +++ b/properties-node/installer/pom.xml @@ -5,12 +5,12 @@ org.onap.ccsdk.parent odlparent-lite - 1.3.3-SNAPSHOT + 1.4.0-SNAPSHOT org.onap.ccsdk.sli.plugins properties-node-installer - 0.5.2-SNAPSHOT + 0.6.0-SNAPSHOT pom ccsdk-sli-plugins :: properties-node :: ${project.artifactId} diff --git a/properties-node/pom.xml b/properties-node/pom.xml index aa5e75a52..09991f46f 100755 --- a/properties-node/pom.xml +++ b/properties-node/pom.xml @@ -5,12 +5,12 @@ org.onap.ccsdk.parent odlparent-lite - 1.3.3-SNAPSHOT + 1.4.0-SNAPSHOT org.onap.ccsdk.sli.plugins properties-node - 0.5.2-SNAPSHOT + 0.6.0-SNAPSHOT pom ccsdk-sli-plugins :: properties-node diff --git a/properties-node/provider/pom.xml b/properties-node/provider/pom.xml index 1f9fd46e2..8ca58c45c 100755 --- a/properties-node/provider/pom.xml +++ b/properties-node/provider/pom.xml @@ -5,12 +5,12 @@ org.onap.ccsdk.parent binding-parent - 1.3.3-SNAPSHOT + 1.4.0-SNAPSHOT org.onap.ccsdk.sli.plugins properties-node-provider - 0.5.2-SNAPSHOT + 0.6.0-SNAPSHOT bundle ccsdk-sli-plugins :: properties-node :: ${project.artifactId} diff --git a/properties-node/provider/src/main/resources/OSGI-INF/blueprint/properties-node-blueprint.xml b/properties-node/provider/src/main/resources/OSGI-INF/blueprint/properties-node-blueprint.xml new file mode 100755 index 000000000..6e1d48efd --- /dev/null +++ b/properties-node/provider/src/main/resources/OSGI-INF/blueprint/properties-node-blueprint.xml @@ -0,0 +1,16 @@ + + + + + + + + + + org.onap.ccsdk.sli.plugins.prop.PropertiesNode + + + + \ No newline at end of file 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 6578de4e9..2697c4ea7 100644 --- a/restapi-call-node/features/ccsdk-restapi-call-node/pom.xml +++ b/restapi-call-node/features/ccsdk-restapi-call-node/pom.xml @@ -5,13 +5,13 @@ org.onap.ccsdk.parent single-feature-parent - 1.3.3-SNAPSHOT + 1.4.0-SNAPSHOT org.onap.ccsdk.sli.plugins ccsdk-restapi-call-node - 0.5.2-SNAPSHOT + 0.6.0-SNAPSHOT feature ccsdk-sli-plugins :: restapi-call-node :: ${project.artifactId} 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 dd3af78a3..41a5d8a4b 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 @@ org.onap.ccsdk.parent feature-repo-parent - 1.3.3-SNAPSHOT + 1.4.0-SNAPSHOT org.onap.ccsdk.sli.plugins features-restapi-call-node - 0.5.2-SNAPSHOT + 0.6.0-SNAPSHOT feature ccsdk-sli-plugins :: restapi-call-node :: ${project.artifactId} diff --git a/restapi-call-node/features/pom.xml b/restapi-call-node/features/pom.xml index 48b91821e..981db516a 100755 --- a/restapi-call-node/features/pom.xml +++ b/restapi-call-node/features/pom.xml @@ -5,12 +5,12 @@ org.onap.ccsdk.parent odlparent-lite - 1.3.3-SNAPSHOT + 1.4.0-SNAPSHOT org.onap.ccsdk.sli.plugins restapi-call-node-features - 0.5.2-SNAPSHOT + 0.6.0-SNAPSHOT pom ccsdk-sli-plugins :: restapi-call-node :: ${project.artifactId} diff --git a/restapi-call-node/installer/pom.xml b/restapi-call-node/installer/pom.xml index f63597c57..8b2d60ba6 100755 --- a/restapi-call-node/installer/pom.xml +++ b/restapi-call-node/installer/pom.xml @@ -5,12 +5,12 @@ org.onap.ccsdk.parent odlparent-lite - 1.3.3-SNAPSHOT + 1.4.0-SNAPSHOT org.onap.ccsdk.sli.plugins restapi-call-node-installer - 0.5.2-SNAPSHOT + 0.6.0-SNAPSHOT pom ccsdk-sli-plugins :: restapi-call-node :: ${project.artifactId} diff --git a/restapi-call-node/pom.xml b/restapi-call-node/pom.xml index 10497fd36..d6fb0b49c 100755 --- a/restapi-call-node/pom.xml +++ b/restapi-call-node/pom.xml @@ -5,12 +5,12 @@ org.onap.ccsdk.parent odlparent-lite - 1.3.3-SNAPSHOT + 1.4.0-SNAPSHOT org.onap.ccsdk.sli.plugins restapi-call-node - 0.5.2-SNAPSHOT + 0.6.0-SNAPSHOT pom ccsdk-sli-plugins :: restapi-call-node diff --git a/restapi-call-node/provider/pom.xml b/restapi-call-node/provider/pom.xml index 74f0a98be..7a03a38c3 100755 --- a/restapi-call-node/provider/pom.xml +++ b/restapi-call-node/provider/pom.xml @@ -5,12 +5,12 @@ org.onap.ccsdk.parent binding-parent - 1.3.3-SNAPSHOT + 1.4.0-SNAPSHOT org.onap.ccsdk.sli.plugins restapi-call-node-provider - 0.5.2-SNAPSHOT + 0.6.0-SNAPSHOT bundle ccsdk-sli-plugins :: restapi-call-node :: ${project.artifactId} diff --git a/restapi-call-node/provider/src/main/resources/OSGI-INF/blueprint/restapi-call-node-blueprint.xml b/restapi-call-node/provider/src/main/resources/OSGI-INF/blueprint/restapi-call-node-blueprint.xml new file mode 100755 index 000000000..390bb0a35 --- /dev/null +++ b/restapi-call-node/provider/src/main/resources/OSGI-INF/blueprint/restapi-call-node-blueprint.xml @@ -0,0 +1,16 @@ + + + + + + + + + + org.onap.ccsdk.sli.plugins.restapicall.RestapiCallNode + + + + \ No newline at end of file diff --git a/restconf-client/features/ccsdk-restconf-client/pom.xml b/restconf-client/features/ccsdk-restconf-client/pom.xml index af235f856..8faa16a00 100644 --- a/restconf-client/features/ccsdk-restconf-client/pom.xml +++ b/restconf-client/features/ccsdk-restconf-client/pom.xml @@ -5,13 +5,13 @@ org.onap.ccsdk.parent single-feature-parent - 1.3.3-SNAPSHOT + 1.4.0-SNAPSHOT org.onap.ccsdk.sli.plugins ccsdk-restconf-client - 0.5.2-SNAPSHOT + 0.6.0-SNAPSHOT feature diff --git a/restconf-client/features/features-restconf-client/pom.xml b/restconf-client/features/features-restconf-client/pom.xml index 17065acbe..790e5b128 100644 --- a/restconf-client/features/features-restconf-client/pom.xml +++ b/restconf-client/features/features-restconf-client/pom.xml @@ -5,13 +5,13 @@ org.onap.ccsdk.parent feature-repo-parent - 1.3.3-SNAPSHOT + 1.4.0-SNAPSHOT org.onap.ccsdk.sli.plugins features-restconf-client - 0.5.2-SNAPSHOT + 0.6.0-SNAPSHOT feature ccsdk-sli-plugins :: restconf-client :: ${project.artifactId} diff --git a/restconf-client/features/pom.xml b/restconf-client/features/pom.xml index 455987fcb..4537098fb 100755 --- a/restconf-client/features/pom.xml +++ b/restconf-client/features/pom.xml @@ -5,12 +5,12 @@ org.onap.ccsdk.parent odlparent-lite - 1.3.3-SNAPSHOT + 1.4.0-SNAPSHOT org.onap.ccsdk.sli.plugins restconf-client-features - 0.5.2-SNAPSHOT + 0.6.0-SNAPSHOT pom ccsdk-sli-plugins :: restconf-client :: ${project.artifactId} diff --git a/restconf-client/installer/pom.xml b/restconf-client/installer/pom.xml index e7d8b4af4..09d290044 100755 --- a/restconf-client/installer/pom.xml +++ b/restconf-client/installer/pom.xml @@ -5,12 +5,12 @@ org.onap.ccsdk.parent odlparent-lite - 1.3.3-SNAPSHOT + 1.4.0-SNAPSHOT org.onap.ccsdk.sli.plugins restconf-client-installer - 0.5.2-SNAPSHOT + 0.6.0-SNAPSHOT pom ccsdk-sli-plugins :: restconf-client :: ${project.artifactId} diff --git a/restconf-client/pom.xml b/restconf-client/pom.xml index 296282a56..e8b0123c3 100755 --- a/restconf-client/pom.xml +++ b/restconf-client/pom.xml @@ -5,12 +5,12 @@ org.onap.ccsdk.parent odlparent-lite - 1.3.3-SNAPSHOT + 1.4.0-SNAPSHOT org.onap.ccsdk.sli.plugins restconf-client - 0.5.2-SNAPSHOT + 0.6.0-SNAPSHOT pom ccsdk-sli-plugins :: restconf-client diff --git a/restconf-client/provider/pom.xml b/restconf-client/provider/pom.xml index 1a734cdd2..ab685bb8b 100755 --- a/restconf-client/provider/pom.xml +++ b/restconf-client/provider/pom.xml @@ -5,12 +5,12 @@ org.onap.ccsdk.parent binding-parent - 1.3.3-SNAPSHOT + 1.4.0-SNAPSHOT org.onap.ccsdk.sli.plugins restconf-client-provider - 0.5.2-SNAPSHOT + 0.6.0-SNAPSHOT bundle ccsdk-sli-plugins :: restconf-client :: ${project.artifactId} diff --git a/restconf-client/provider/src/main/resources/OSGI-INF/blueprint/restconf-client-blueprint.xml b/restconf-client/provider/src/main/resources/OSGI-INF/blueprint/restconf-client-blueprint.xml new file mode 100755 index 000000000..45c335b13 --- /dev/null +++ b/restconf-client/provider/src/main/resources/OSGI-INF/blueprint/restconf-client-blueprint.xml @@ -0,0 +1,51 @@ + + + + + + + + + + + + + + + + + + org.onap.ccsdk.sli.plugins.restconfapicall.RestconfApiCallNode + + + + + + org.onap.ccsdk.sli.plugins.restconfdiscovery.RestconfDiscoveryNode + + + + \ No newline at end of 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 3f6c97c1d..44c5540f3 100644 --- a/sshapi-call-node/features/ccsdk-sshapi-call-node/pom.xml +++ b/sshapi-call-node/features/ccsdk-sshapi-call-node/pom.xml @@ -5,13 +5,13 @@ org.onap.ccsdk.parent single-feature-parent - 1.3.3-SNAPSHOT + 1.4.0-SNAPSHOT org.onap.ccsdk.sli.plugins ccsdk-sshapi-call-node - 0.5.2-SNAPSHOT + 0.6.0-SNAPSHOT feature ccsdk-sli-plugins :: sshapi-call-node :: ${project.artifactId} 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 8a496684f..893b68a76 100644 --- a/sshapi-call-node/features/features-sshapi-call-node/pom.xml +++ b/sshapi-call-node/features/features-sshapi-call-node/pom.xml @@ -5,13 +5,13 @@ org.onap.ccsdk.parent feature-repo-parent - 1.3.3-SNAPSHOT + 1.4.0-SNAPSHOT org.onap.ccsdk.sli.plugins features-sshapi-call-node - 0.5.2-SNAPSHOT + 0.6.0-SNAPSHOT feature ccsdk-sli-plugins :: sshapi-call-node :: ${project.artifactId} diff --git a/sshapi-call-node/features/pom.xml b/sshapi-call-node/features/pom.xml index 4db5892e3..6e31170a7 100755 --- a/sshapi-call-node/features/pom.xml +++ b/sshapi-call-node/features/pom.xml @@ -5,12 +5,12 @@ org.onap.ccsdk.parent odlparent-lite - 1.3.3-SNAPSHOT + 1.4.0-SNAPSHOT org.onap.ccsdk.sli.plugins sshapi-call-node-features - 0.5.2-SNAPSHOT + 0.6.0-SNAPSHOT pom ccsdk-sli-plugins :: sshapi-call-node :: ${project.artifactId} diff --git a/sshapi-call-node/installer/pom.xml b/sshapi-call-node/installer/pom.xml index 5d4ef718d..1b248a3d6 100755 --- a/sshapi-call-node/installer/pom.xml +++ b/sshapi-call-node/installer/pom.xml @@ -5,12 +5,12 @@ org.onap.ccsdk.parent odlparent-lite - 1.3.3-SNAPSHOT + 1.4.0-SNAPSHOT org.onap.ccsdk.sli.plugins sshapi-call-node-installer - 0.5.2-SNAPSHOT + 0.6.0-SNAPSHOT pom ccsdk-sli-plugins :: sshapi-call-node :: ${project.artifactId} diff --git a/sshapi-call-node/pom.xml b/sshapi-call-node/pom.xml index 90bb6d511..66e2af306 100755 --- a/sshapi-call-node/pom.xml +++ b/sshapi-call-node/pom.xml @@ -5,12 +5,12 @@ org.onap.ccsdk.parent odlparent-lite - 1.3.3-SNAPSHOT + 1.4.0-SNAPSHOT org.onap.ccsdk.sli.plugins sshapi-call-node - 0.5.2-SNAPSHOT + 0.6.0-SNAPSHOT pom ccsdk-sli-plugins :: sshapi-call-node diff --git a/sshapi-call-node/provider/pom.xml b/sshapi-call-node/provider/pom.xml index 8af4faac5..cd920a875 100755 --- a/sshapi-call-node/provider/pom.xml +++ b/sshapi-call-node/provider/pom.xml @@ -5,12 +5,12 @@ org.onap.ccsdk.parent binding-parent - 1.3.3-SNAPSHOT + 1.4.0-SNAPSHOT org.onap.ccsdk.sli.plugins sshapi-call-node-provider - 0.5.2-SNAPSHOT + 0.6.0-SNAPSHOT bundle ccsdk-sli-plugins :: sshapi-call-node :: ${project.artifactId} diff --git a/sshapi-call-node/provider/src/main/resources/OSGI-INF/blueprint/sshapi-call-node-blueprint.xml b/sshapi-call-node/provider/src/main/resources/OSGI-INF/blueprint/sshapi-call-node-blueprint.xml new file mode 100755 index 000000000..7a5424329 --- /dev/null +++ b/sshapi-call-node/provider/src/main/resources/OSGI-INF/blueprint/sshapi-call-node-blueprint.xml @@ -0,0 +1,16 @@ + + + + + + + + + + org.onap.ccsdk.sli.plugins.sshapicall.SshApiCallNode + + + + \ No newline at end of file diff --git a/template-node/features/ccsdk-template-node/pom.xml b/template-node/features/ccsdk-template-node/pom.xml index a1b16a5ff..91658ae62 100644 --- a/template-node/features/ccsdk-template-node/pom.xml +++ b/template-node/features/ccsdk-template-node/pom.xml @@ -5,13 +5,13 @@ org.onap.ccsdk.parent single-feature-parent - 1.3.3-SNAPSHOT + 1.4.0-SNAPSHOT org.onap.ccsdk.sli.plugins ccsdk-template-node - 0.5.2-SNAPSHOT + 0.6.0-SNAPSHOT feature ccsdk-sli-plugins :: template-node :: ${project.artifactId} diff --git a/template-node/features/features-template-node/pom.xml b/template-node/features/features-template-node/pom.xml index c220d4fb8..105a03245 100644 --- a/template-node/features/features-template-node/pom.xml +++ b/template-node/features/features-template-node/pom.xml @@ -5,13 +5,13 @@ org.onap.ccsdk.parent feature-repo-parent - 1.3.3-SNAPSHOT + 1.4.0-SNAPSHOT org.onap.ccsdk.sli.plugins features-template-node - 0.5.2-SNAPSHOT + 0.6.0-SNAPSHOT feature diff --git a/template-node/features/pom.xml b/template-node/features/pom.xml index 143d9742f..391a6ce14 100644 --- a/template-node/features/pom.xml +++ b/template-node/features/pom.xml @@ -5,12 +5,12 @@ org.onap.ccsdk.parent odlparent-lite - 1.3.3-SNAPSHOT + 1.4.0-SNAPSHOT org.onap.ccsdk.sli.plugins template-node-features - 0.5.2-SNAPSHOT + 0.6.0-SNAPSHOT pom diff --git a/template-node/installer/pom.xml b/template-node/installer/pom.xml index 5de128457..2a5891dd4 100644 --- a/template-node/installer/pom.xml +++ b/template-node/installer/pom.xml @@ -5,12 +5,12 @@ org.onap.ccsdk.parent odlparent-lite - 1.3.3-SNAPSHOT + 1.4.0-SNAPSHOT org.onap.ccsdk.sli.plugins template-node-installer - 0.5.2-SNAPSHOT + 0.6.0-SNAPSHOT pom ccsdk-sli-plugins :: template-node :: ${project.artifactId} diff --git a/template-node/pom.xml b/template-node/pom.xml index 519388292..0c811f714 100644 --- a/template-node/pom.xml +++ b/template-node/pom.xml @@ -5,12 +5,12 @@ org.onap.ccsdk.parent odlparent-lite - 1.3.3-SNAPSHOT + 1.4.0-SNAPSHOT org.onap.ccsdk.sli.plugins template-node - 0.5.2-SNAPSHOT + 0.6.0-SNAPSHOT pom diff --git a/template-node/provider/pom.xml b/template-node/provider/pom.xml index d3dd79412..f9cd3ef2d 100644 --- a/template-node/provider/pom.xml +++ b/template-node/provider/pom.xml @@ -5,12 +5,12 @@ org.onap.ccsdk.parent binding-parent - 1.3.3-SNAPSHOT + 1.4.0-SNAPSHOT org.onap.ccsdk.sli.plugins template-node-provider - 0.5.2-SNAPSHOT + 0.6.0-SNAPSHOT bundle ccsdk-sli-plugins :: template-node :: ${project.artifactId} diff --git a/version.properties b/version.properties index dc2c5ad2a..3fc281cbc 100644 --- a/version.properties +++ b/version.properties @@ -6,8 +6,8 @@ # Comment release_name=0 -sprint_number=5 -feature_revision=2 +sprint_number=6 +feature_revision=0 base_version=${release_name}.${sprint_number}.${feature_revision} -- cgit 1.2.3-korg From b6455c548b7003019c8f8b6e1ecc3966f3aca278 Mon Sep 17 00:00:00 2001 From: "Timoney, Dan (dt5972)" Date: Wed, 28 Aug 2019 13:16:09 -0400 Subject: Roll versions Roll versions in master branch Change-Id: I38f82f09f8cdf7324145895a053f5513117502ea Signed-off-by: Timoney, Dan (dt5972) --- artifacts/pom.xml | 4 ++-- ccsdk-plugins-lighty/pom.xml | 4 ++-- features/ccsdk-sli-plugins-all/pom.xml | 4 ++-- features/features-sli-plugins/pom.xml | 4 ++-- features/installer/pom.xml | 4 ++-- features/pom.xml | 4 ++-- grToolkit/features/ccsdk-gr-toolkit/pom.xml | 4 ++-- grToolkit/features/features-gr-toolkit/pom.xml | 4 ++-- grToolkit/features/pom.xml | 4 ++-- grToolkit/installer/pom.xml | 4 ++-- grToolkit/model/pom.xml | 4 ++-- grToolkit/pom.xml | 4 ++-- grToolkit/provider/pom.xml | 4 ++-- pom.xml | 4 ++-- properties-node/features/ccsdk-properties-node/pom.xml | 4 ++-- properties-node/features/features-properties-node/pom.xml | 4 ++-- properties-node/features/pom.xml | 4 ++-- properties-node/installer/pom.xml | 4 ++-- properties-node/lighty/pom.xml | 4 ++-- properties-node/pom.xml | 4 ++-- properties-node/provider/pom.xml | 4 ++-- restapi-call-node/features/ccsdk-restapi-call-node/pom.xml | 4 ++-- restapi-call-node/features/features-restapi-call-node/pom.xml | 4 ++-- restapi-call-node/features/pom.xml | 4 ++-- restapi-call-node/installer/pom.xml | 4 ++-- restapi-call-node/lighty/pom.xml | 4 ++-- restapi-call-node/pom.xml | 4 ++-- restapi-call-node/provider/pom.xml | 4 ++-- restconf-client/features/ccsdk-restconf-client/pom.xml | 4 ++-- restconf-client/features/features-restconf-client/pom.xml | 4 ++-- restconf-client/features/pom.xml | 4 ++-- restconf-client/installer/pom.xml | 4 ++-- restconf-client/lighty/pom.xml | 4 ++-- restconf-client/pom.xml | 4 ++-- restconf-client/provider/pom.xml | 4 ++-- sshapi-call-node/features/ccsdk-sshapi-call-node/pom.xml | 4 ++-- sshapi-call-node/features/features-sshapi-call-node/pom.xml | 4 ++-- sshapi-call-node/features/pom.xml | 4 ++-- sshapi-call-node/installer/pom.xml | 4 ++-- sshapi-call-node/lighty/pom.xml | 4 ++-- sshapi-call-node/pom.xml | 4 ++-- sshapi-call-node/provider/pom.xml | 4 ++-- template-node/features/ccsdk-template-node/pom.xml | 4 ++-- template-node/features/features-template-node/pom.xml | 4 ++-- template-node/features/pom.xml | 4 ++-- template-node/installer/pom.xml | 4 ++-- template-node/lighty/pom.xml | 4 ++-- template-node/pom.xml | 4 ++-- template-node/provider/pom.xml | 4 ++-- version.properties | 2 +- 50 files changed, 99 insertions(+), 99 deletions(-) (limited to 'restconf-client/provider') diff --git a/artifacts/pom.xml b/artifacts/pom.xml index 7e395c9f9..59e334acf 100755 --- a/artifacts/pom.xml +++ b/artifacts/pom.xml @@ -4,7 +4,7 @@ org.onap.ccsdk.sli.plugins sli-plugins-artifacts - 0.6.0-SNAPSHOT + 0.6.1-SNAPSHOT pom ccsdk-sli-plugins :: sli-plugins-artifacts @@ -17,7 +17,7 @@ org.onap.ccsdk.parent parent - 1.4.0-SNAPSHOT + 1.4.1-SNAPSHOT diff --git a/ccsdk-plugins-lighty/pom.xml b/ccsdk-plugins-lighty/pom.xml index 5630f3bc0..8ac8ffcc1 100755 --- a/ccsdk-plugins-lighty/pom.xml +++ b/ccsdk-plugins-lighty/pom.xml @@ -5,13 +5,13 @@ org.onap.ccsdk.parent odlparent-lite - 1.4.0-SNAPSHOT + 1.4.1-SNAPSHOT org.onap.ccsdk.sli.plugins ccsdk-plugins-lighty - 0.6.0-SNAPSHOT + 0.6.1-SNAPSHOT jar diff --git a/features/ccsdk-sli-plugins-all/pom.xml b/features/ccsdk-sli-plugins-all/pom.xml index bbcfb7570..1054f1903 100644 --- a/features/ccsdk-sli-plugins-all/pom.xml +++ b/features/ccsdk-sli-plugins-all/pom.xml @@ -5,13 +5,13 @@ org.onap.ccsdk.parent single-feature-parent - 1.4.0-SNAPSHOT + 1.4.1-SNAPSHOT org.onap.ccsdk.sli.plugins ccsdk-sli-plugins-all - 0.6.0-SNAPSHOT + 0.6.1-SNAPSHOT feature ccsdk-sli-plugins :: features :: ${project.artifactId} diff --git a/features/features-sli-plugins/pom.xml b/features/features-sli-plugins/pom.xml index 1ace61b96..dff558c6a 100644 --- a/features/features-sli-plugins/pom.xml +++ b/features/features-sli-plugins/pom.xml @@ -5,13 +5,13 @@ org.onap.ccsdk.parent feature-repo-parent - 1.4.0-SNAPSHOT + 1.4.1-SNAPSHOT org.onap.ccsdk.sli.plugins features-sli-plugins - 0.6.0-SNAPSHOT + 0.6.1-SNAPSHOT feature ccsdk-sli-plugins :: features :: ${project.artifactId} diff --git a/features/installer/pom.xml b/features/installer/pom.xml index 334748748..529588c58 100755 --- a/features/installer/pom.xml +++ b/features/installer/pom.xml @@ -5,13 +5,13 @@ org.onap.ccsdk.parent odlparent-lite - 1.4.0-SNAPSHOT + 1.4.1-SNAPSHOT org.onap.ccsdk.sli.plugins sliplugins-features-installer - 0.6.0-SNAPSHOT + 0.6.1-SNAPSHOT pom ccsdk-sli-plugins :: features :: ${project.artifactId} diff --git a/features/pom.xml b/features/pom.xml index 6e349ca4a..3780233ec 100755 --- a/features/pom.xml +++ b/features/pom.xml @@ -5,13 +5,13 @@ org.onap.ccsdk.parent odlparent-lite - 1.4.0-SNAPSHOT + 1.4.1-SNAPSHOT org.onap.ccsdk.sli.plugins sliplugins-feature-aggregator - 0.6.0-SNAPSHOT + 0.6.1-SNAPSHOT pom ccsdk-sli-plugins :: features diff --git a/grToolkit/features/ccsdk-gr-toolkit/pom.xml b/grToolkit/features/ccsdk-gr-toolkit/pom.xml index 3266f6604..88d931d33 100644 --- a/grToolkit/features/ccsdk-gr-toolkit/pom.xml +++ b/grToolkit/features/ccsdk-gr-toolkit/pom.xml @@ -5,13 +5,13 @@ org.onap.ccsdk.parent single-feature-parent - 1.4.0-SNAPSHOT + 1.4.1-SNAPSHOT org.onap.ccsdk.sli.plugins ccsdk-gr-toolkit - 0.6.0-SNAPSHOT + 0.6.1-SNAPSHOT feature ccsdk-sli-plugins :: gr-toolkit :: ${project.artifactId} diff --git a/grToolkit/features/features-gr-toolkit/pom.xml b/grToolkit/features/features-gr-toolkit/pom.xml index 511ba38a0..f22ed5d29 100755 --- a/grToolkit/features/features-gr-toolkit/pom.xml +++ b/grToolkit/features/features-gr-toolkit/pom.xml @@ -5,13 +5,13 @@ org.onap.ccsdk.parent feature-repo-parent - 1.4.0-SNAPSHOT + 1.4.1-SNAPSHOT org.onap.ccsdk.sli.plugins features-gr-toolkit - 0.6.0-SNAPSHOT + 0.6.1-SNAPSHOT feature ccsdk-sli-plugins :: gr-toolkit :: ${project.artifactId} diff --git a/grToolkit/features/pom.xml b/grToolkit/features/pom.xml index 34f706c8f..37179a551 100755 --- a/grToolkit/features/pom.xml +++ b/grToolkit/features/pom.xml @@ -4,14 +4,14 @@ org.onap.ccsdk.parent odlparent-lite - 1.4.0-SNAPSHOT + 1.4.1-SNAPSHOT ccsdk-sli-plugins :: gr-toolkit :: ${project.artifactId} gr-toolkit-features org.onap.ccsdk.sli.plugins - 0.6.0-SNAPSHOT + 0.6.1-SNAPSHOT pom diff --git a/grToolkit/installer/pom.xml b/grToolkit/installer/pom.xml index 8c7ec32b2..4d097054f 100755 --- a/grToolkit/installer/pom.xml +++ b/grToolkit/installer/pom.xml @@ -4,14 +4,14 @@ org.onap.ccsdk.parent odlparent-lite - 1.4.0-SNAPSHOT + 1.4.1-SNAPSHOT ccsdk-sli-plugins :: gr-toolkit :: ${project.artifactId} org.onap.ccsdk.sli.plugins gr-toolkit-installer - 0.6.0-SNAPSHOT + 0.6.1-SNAPSHOT pom ccsdk-gr-toolkit diff --git a/grToolkit/model/pom.xml b/grToolkit/model/pom.xml index 8abf89a08..646564a90 100755 --- a/grToolkit/model/pom.xml +++ b/grToolkit/model/pom.xml @@ -4,13 +4,13 @@ org.onap.ccsdk.parent binding-parent - 1.4.0-SNAPSHOT + 1.4.1-SNAPSHOT ccsdk-sli-plugins :: gr-toolkit :: ${project.artifactId} org.onap.ccsdk.sli.plugins gr-toolkit-model - 0.6.0-SNAPSHOT + 0.6.1-SNAPSHOT bundle diff --git a/grToolkit/pom.xml b/grToolkit/pom.xml index 916df4427..b55df5cd7 100755 --- a/grToolkit/pom.xml +++ b/grToolkit/pom.xml @@ -5,13 +5,13 @@ org.onap.ccsdk.parent odlparent-lite - 1.4.0-SNAPSHOT + 1.4.1-SNAPSHOT org.onap.ccsdk.sli.plugins gr-toolkit - 0.6.0-SNAPSHOT + 0.6.1-SNAPSHOT pom ccsdk-sli-plugins :: gr-toolkit diff --git a/grToolkit/provider/pom.xml b/grToolkit/provider/pom.xml index 0267f2488..f8228c2b5 100755 --- a/grToolkit/provider/pom.xml +++ b/grToolkit/provider/pom.xml @@ -4,13 +4,13 @@ org.onap.ccsdk.parent binding-parent - 1.4.0-SNAPSHOT + 1.4.1-SNAPSHOT ccsdk-sli-plugins :: gr-toolkit :: ${project.artifactId} org.onap.ccsdk.sli.plugins gr-toolkit-provider - 0.6.0-SNAPSHOT + 0.6.1-SNAPSHOT bundle diff --git a/pom.xml b/pom.xml index 9fa01554d..a8f8584f3 100755 --- a/pom.xml +++ b/pom.xml @@ -5,12 +5,12 @@ org.onap.ccsdk.parent odlparent-lite - 1.4.0-SNAPSHOT + 1.4.1-SNAPSHOT org.onap.ccsdk.sli.plugins ccsdk-sli-plugins - 0.6.0-SNAPSHOT + 0.6.1-SNAPSHOT pom ccsdk-sli-plugins diff --git a/properties-node/features/ccsdk-properties-node/pom.xml b/properties-node/features/ccsdk-properties-node/pom.xml index 4781ac382..b80d8f429 100644 --- a/properties-node/features/ccsdk-properties-node/pom.xml +++ b/properties-node/features/ccsdk-properties-node/pom.xml @@ -5,13 +5,13 @@ org.onap.ccsdk.parent single-feature-parent - 1.4.0-SNAPSHOT + 1.4.1-SNAPSHOT org.onap.ccsdk.sli.plugins ccsdk-properties-node - 0.6.0-SNAPSHOT + 0.6.1-SNAPSHOT feature ccsdk-sli-plugins :: properties-node :: ${project.artifactId} diff --git a/properties-node/features/features-properties-node/pom.xml b/properties-node/features/features-properties-node/pom.xml index 58944cceb..485d29534 100644 --- a/properties-node/features/features-properties-node/pom.xml +++ b/properties-node/features/features-properties-node/pom.xml @@ -5,13 +5,13 @@ org.onap.ccsdk.parent feature-repo-parent - 1.4.0-SNAPSHOT + 1.4.1-SNAPSHOT org.onap.ccsdk.sli.plugins features-properties-node - 0.6.0-SNAPSHOT + 0.6.1-SNAPSHOT feature ccsdk-sli-plugins :: properties-node :: ${project.artifactId} diff --git a/properties-node/features/pom.xml b/properties-node/features/pom.xml index bd93644d7..83bc1da13 100755 --- a/properties-node/features/pom.xml +++ b/properties-node/features/pom.xml @@ -5,12 +5,12 @@ org.onap.ccsdk.parent odlparent-lite - 1.4.0-SNAPSHOT + 1.4.1-SNAPSHOT org.onap.ccsdk.sli.plugins properties-node-features - 0.6.0-SNAPSHOT + 0.6.1-SNAPSHOT pom ccsdk-sli-plugins :: properties-node :: ${project.artifactId} diff --git a/properties-node/installer/pom.xml b/properties-node/installer/pom.xml index 536e20478..3af5efc7a 100755 --- a/properties-node/installer/pom.xml +++ b/properties-node/installer/pom.xml @@ -5,12 +5,12 @@ org.onap.ccsdk.parent odlparent-lite - 1.4.0-SNAPSHOT + 1.4.1-SNAPSHOT org.onap.ccsdk.sli.plugins properties-node-installer - 0.6.0-SNAPSHOT + 0.6.1-SNAPSHOT pom ccsdk-sli-plugins :: properties-node :: ${project.artifactId} diff --git a/properties-node/lighty/pom.xml b/properties-node/lighty/pom.xml index 4e0fdb303..6a5023d51 100755 --- a/properties-node/lighty/pom.xml +++ b/properties-node/lighty/pom.xml @@ -5,13 +5,13 @@ org.onap.ccsdk.parent binding-parent - 1.4.0-SNAPSHOT + 1.4.1-SNAPSHOT org.onap.ccsdk.sli.plugins properties-node-lighty - 0.6.0-SNAPSHOT + 0.6.1-SNAPSHOT jar ccsdk-sli-plugins :: properties-node :: ${project.artifactId} diff --git a/properties-node/pom.xml b/properties-node/pom.xml index 64036f7b1..53fa2b2d9 100755 --- a/properties-node/pom.xml +++ b/properties-node/pom.xml @@ -5,12 +5,12 @@ org.onap.ccsdk.parent odlparent-lite - 1.4.0-SNAPSHOT + 1.4.1-SNAPSHOT org.onap.ccsdk.sli.plugins properties-node - 0.6.0-SNAPSHOT + 0.6.1-SNAPSHOT pom ccsdk-sli-plugins :: properties-node diff --git a/properties-node/provider/pom.xml b/properties-node/provider/pom.xml index 8ca58c45c..262c4968d 100755 --- a/properties-node/provider/pom.xml +++ b/properties-node/provider/pom.xml @@ -5,12 +5,12 @@ org.onap.ccsdk.parent binding-parent - 1.4.0-SNAPSHOT + 1.4.1-SNAPSHOT org.onap.ccsdk.sli.plugins properties-node-provider - 0.6.0-SNAPSHOT + 0.6.1-SNAPSHOT bundle ccsdk-sli-plugins :: properties-node :: ${project.artifactId} 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 2697c4ea7..6f3109e4d 100644 --- a/restapi-call-node/features/ccsdk-restapi-call-node/pom.xml +++ b/restapi-call-node/features/ccsdk-restapi-call-node/pom.xml @@ -5,13 +5,13 @@ org.onap.ccsdk.parent single-feature-parent - 1.4.0-SNAPSHOT + 1.4.1-SNAPSHOT org.onap.ccsdk.sli.plugins ccsdk-restapi-call-node - 0.6.0-SNAPSHOT + 0.6.1-SNAPSHOT feature ccsdk-sli-plugins :: restapi-call-node :: ${project.artifactId} 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 41a5d8a4b..4350f75b4 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 @@ org.onap.ccsdk.parent feature-repo-parent - 1.4.0-SNAPSHOT + 1.4.1-SNAPSHOT org.onap.ccsdk.sli.plugins features-restapi-call-node - 0.6.0-SNAPSHOT + 0.6.1-SNAPSHOT feature ccsdk-sli-plugins :: restapi-call-node :: ${project.artifactId} diff --git a/restapi-call-node/features/pom.xml b/restapi-call-node/features/pom.xml index 981db516a..a49633d5a 100755 --- a/restapi-call-node/features/pom.xml +++ b/restapi-call-node/features/pom.xml @@ -5,12 +5,12 @@ org.onap.ccsdk.parent odlparent-lite - 1.4.0-SNAPSHOT + 1.4.1-SNAPSHOT org.onap.ccsdk.sli.plugins restapi-call-node-features - 0.6.0-SNAPSHOT + 0.6.1-SNAPSHOT pom ccsdk-sli-plugins :: restapi-call-node :: ${project.artifactId} diff --git a/restapi-call-node/installer/pom.xml b/restapi-call-node/installer/pom.xml index 8b2d60ba6..697cfdcc8 100755 --- a/restapi-call-node/installer/pom.xml +++ b/restapi-call-node/installer/pom.xml @@ -5,12 +5,12 @@ org.onap.ccsdk.parent odlparent-lite - 1.4.0-SNAPSHOT + 1.4.1-SNAPSHOT org.onap.ccsdk.sli.plugins restapi-call-node-installer - 0.6.0-SNAPSHOT + 0.6.1-SNAPSHOT pom ccsdk-sli-plugins :: restapi-call-node :: ${project.artifactId} diff --git a/restapi-call-node/lighty/pom.xml b/restapi-call-node/lighty/pom.xml index 5faa654b1..f6af499cb 100755 --- a/restapi-call-node/lighty/pom.xml +++ b/restapi-call-node/lighty/pom.xml @@ -5,13 +5,13 @@ org.onap.ccsdk.parent binding-parent - 1.4.0-SNAPSHOT + 1.4.1-SNAPSHOT org.onap.ccsdk.sli.plugins restapi-call-node-lighty - 0.6.0-SNAPSHOT + 0.6.1-SNAPSHOT jar ccsdk-sli-plugins :: restapi-call-node :: ${project.artifactId} diff --git a/restapi-call-node/pom.xml b/restapi-call-node/pom.xml index 7fbce0243..ece6a5695 100755 --- a/restapi-call-node/pom.xml +++ b/restapi-call-node/pom.xml @@ -5,12 +5,12 @@ org.onap.ccsdk.parent odlparent-lite - 1.4.0-SNAPSHOT + 1.4.1-SNAPSHOT org.onap.ccsdk.sli.plugins restapi-call-node - 0.6.0-SNAPSHOT + 0.6.1-SNAPSHOT pom ccsdk-sli-plugins :: restapi-call-node diff --git a/restapi-call-node/provider/pom.xml b/restapi-call-node/provider/pom.xml index 7a03a38c3..a8d3cd886 100755 --- a/restapi-call-node/provider/pom.xml +++ b/restapi-call-node/provider/pom.xml @@ -5,12 +5,12 @@ org.onap.ccsdk.parent binding-parent - 1.4.0-SNAPSHOT + 1.4.1-SNAPSHOT org.onap.ccsdk.sli.plugins restapi-call-node-provider - 0.6.0-SNAPSHOT + 0.6.1-SNAPSHOT bundle ccsdk-sli-plugins :: restapi-call-node :: ${project.artifactId} diff --git a/restconf-client/features/ccsdk-restconf-client/pom.xml b/restconf-client/features/ccsdk-restconf-client/pom.xml index 8faa16a00..28f3fc509 100644 --- a/restconf-client/features/ccsdk-restconf-client/pom.xml +++ b/restconf-client/features/ccsdk-restconf-client/pom.xml @@ -5,13 +5,13 @@ org.onap.ccsdk.parent single-feature-parent - 1.4.0-SNAPSHOT + 1.4.1-SNAPSHOT org.onap.ccsdk.sli.plugins ccsdk-restconf-client - 0.6.0-SNAPSHOT + 0.6.1-SNAPSHOT feature diff --git a/restconf-client/features/features-restconf-client/pom.xml b/restconf-client/features/features-restconf-client/pom.xml index 790e5b128..49360057e 100644 --- a/restconf-client/features/features-restconf-client/pom.xml +++ b/restconf-client/features/features-restconf-client/pom.xml @@ -5,13 +5,13 @@ org.onap.ccsdk.parent feature-repo-parent - 1.4.0-SNAPSHOT + 1.4.1-SNAPSHOT org.onap.ccsdk.sli.plugins features-restconf-client - 0.6.0-SNAPSHOT + 0.6.1-SNAPSHOT feature ccsdk-sli-plugins :: restconf-client :: ${project.artifactId} diff --git a/restconf-client/features/pom.xml b/restconf-client/features/pom.xml index 4537098fb..d3123f7ec 100755 --- a/restconf-client/features/pom.xml +++ b/restconf-client/features/pom.xml @@ -5,12 +5,12 @@ org.onap.ccsdk.parent odlparent-lite - 1.4.0-SNAPSHOT + 1.4.1-SNAPSHOT org.onap.ccsdk.sli.plugins restconf-client-features - 0.6.0-SNAPSHOT + 0.6.1-SNAPSHOT pom ccsdk-sli-plugins :: restconf-client :: ${project.artifactId} diff --git a/restconf-client/installer/pom.xml b/restconf-client/installer/pom.xml index 09d290044..7f80aa951 100755 --- a/restconf-client/installer/pom.xml +++ b/restconf-client/installer/pom.xml @@ -5,12 +5,12 @@ org.onap.ccsdk.parent odlparent-lite - 1.4.0-SNAPSHOT + 1.4.1-SNAPSHOT org.onap.ccsdk.sli.plugins restconf-client-installer - 0.6.0-SNAPSHOT + 0.6.1-SNAPSHOT pom ccsdk-sli-plugins :: restconf-client :: ${project.artifactId} diff --git a/restconf-client/lighty/pom.xml b/restconf-client/lighty/pom.xml index 7fdf6b8fc..84e940bb5 100755 --- a/restconf-client/lighty/pom.xml +++ b/restconf-client/lighty/pom.xml @@ -5,13 +5,13 @@ org.onap.ccsdk.parent binding-parent - 1.4.0-SNAPSHOT + 1.4.1-SNAPSHOT org.onap.ccsdk.sli.plugins restconf-client-lighty - 0.6.0-SNAPSHOT + 0.6.1-SNAPSHOT jar ccsdk-sli-plugins :: restconf-client :: ${project.artifactId} diff --git a/restconf-client/pom.xml b/restconf-client/pom.xml index 221987d8c..1da628e8e 100755 --- a/restconf-client/pom.xml +++ b/restconf-client/pom.xml @@ -5,12 +5,12 @@ org.onap.ccsdk.parent odlparent-lite - 1.4.0-SNAPSHOT + 1.4.1-SNAPSHOT org.onap.ccsdk.sli.plugins restconf-client - 0.6.0-SNAPSHOT + 0.6.1-SNAPSHOT pom ccsdk-sli-plugins :: restconf-client diff --git a/restconf-client/provider/pom.xml b/restconf-client/provider/pom.xml index ab685bb8b..953db6933 100755 --- a/restconf-client/provider/pom.xml +++ b/restconf-client/provider/pom.xml @@ -5,12 +5,12 @@ org.onap.ccsdk.parent binding-parent - 1.4.0-SNAPSHOT + 1.4.1-SNAPSHOT org.onap.ccsdk.sli.plugins restconf-client-provider - 0.6.0-SNAPSHOT + 0.6.1-SNAPSHOT bundle ccsdk-sli-plugins :: restconf-client :: ${project.artifactId} 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 44c5540f3..c0539c4d2 100644 --- a/sshapi-call-node/features/ccsdk-sshapi-call-node/pom.xml +++ b/sshapi-call-node/features/ccsdk-sshapi-call-node/pom.xml @@ -5,13 +5,13 @@ org.onap.ccsdk.parent single-feature-parent - 1.4.0-SNAPSHOT + 1.4.1-SNAPSHOT org.onap.ccsdk.sli.plugins ccsdk-sshapi-call-node - 0.6.0-SNAPSHOT + 0.6.1-SNAPSHOT feature ccsdk-sli-plugins :: sshapi-call-node :: ${project.artifactId} 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 893b68a76..6b9827c5c 100644 --- a/sshapi-call-node/features/features-sshapi-call-node/pom.xml +++ b/sshapi-call-node/features/features-sshapi-call-node/pom.xml @@ -5,13 +5,13 @@ org.onap.ccsdk.parent feature-repo-parent - 1.4.0-SNAPSHOT + 1.4.1-SNAPSHOT org.onap.ccsdk.sli.plugins features-sshapi-call-node - 0.6.0-SNAPSHOT + 0.6.1-SNAPSHOT feature ccsdk-sli-plugins :: sshapi-call-node :: ${project.artifactId} diff --git a/sshapi-call-node/features/pom.xml b/sshapi-call-node/features/pom.xml index 6e31170a7..7e367cea1 100755 --- a/sshapi-call-node/features/pom.xml +++ b/sshapi-call-node/features/pom.xml @@ -5,12 +5,12 @@ org.onap.ccsdk.parent odlparent-lite - 1.4.0-SNAPSHOT + 1.4.1-SNAPSHOT org.onap.ccsdk.sli.plugins sshapi-call-node-features - 0.6.0-SNAPSHOT + 0.6.1-SNAPSHOT pom ccsdk-sli-plugins :: sshapi-call-node :: ${project.artifactId} diff --git a/sshapi-call-node/installer/pom.xml b/sshapi-call-node/installer/pom.xml index 1b248a3d6..475da0c7d 100755 --- a/sshapi-call-node/installer/pom.xml +++ b/sshapi-call-node/installer/pom.xml @@ -5,12 +5,12 @@ org.onap.ccsdk.parent odlparent-lite - 1.4.0-SNAPSHOT + 1.4.1-SNAPSHOT org.onap.ccsdk.sli.plugins sshapi-call-node-installer - 0.6.0-SNAPSHOT + 0.6.1-SNAPSHOT pom ccsdk-sli-plugins :: sshapi-call-node :: ${project.artifactId} diff --git a/sshapi-call-node/lighty/pom.xml b/sshapi-call-node/lighty/pom.xml index ecc411424..13c11cd10 100755 --- a/sshapi-call-node/lighty/pom.xml +++ b/sshapi-call-node/lighty/pom.xml @@ -5,13 +5,13 @@ org.onap.ccsdk.parent binding-parent - 1.4.0-SNAPSHOT + 1.4.1-SNAPSHOT org.onap.ccsdk.sli.plugins sshapi-call-node-lighty - 0.6.0-SNAPSHOT + 0.6.1-SNAPSHOT jar ccsdk-sli-plugins :: sshapi-call-node :: ${project.artifactId} diff --git a/sshapi-call-node/pom.xml b/sshapi-call-node/pom.xml index 4238e7737..1494def32 100755 --- a/sshapi-call-node/pom.xml +++ b/sshapi-call-node/pom.xml @@ -5,12 +5,12 @@ org.onap.ccsdk.parent odlparent-lite - 1.4.0-SNAPSHOT + 1.4.1-SNAPSHOT org.onap.ccsdk.sli.plugins sshapi-call-node - 0.6.0-SNAPSHOT + 0.6.1-SNAPSHOT pom ccsdk-sli-plugins :: sshapi-call-node diff --git a/sshapi-call-node/provider/pom.xml b/sshapi-call-node/provider/pom.xml index cd920a875..0ad9e2a7b 100755 --- a/sshapi-call-node/provider/pom.xml +++ b/sshapi-call-node/provider/pom.xml @@ -5,12 +5,12 @@ org.onap.ccsdk.parent binding-parent - 1.4.0-SNAPSHOT + 1.4.1-SNAPSHOT org.onap.ccsdk.sli.plugins sshapi-call-node-provider - 0.6.0-SNAPSHOT + 0.6.1-SNAPSHOT bundle ccsdk-sli-plugins :: sshapi-call-node :: ${project.artifactId} diff --git a/template-node/features/ccsdk-template-node/pom.xml b/template-node/features/ccsdk-template-node/pom.xml index 91658ae62..e34106988 100644 --- a/template-node/features/ccsdk-template-node/pom.xml +++ b/template-node/features/ccsdk-template-node/pom.xml @@ -5,13 +5,13 @@ org.onap.ccsdk.parent single-feature-parent - 1.4.0-SNAPSHOT + 1.4.1-SNAPSHOT org.onap.ccsdk.sli.plugins ccsdk-template-node - 0.6.0-SNAPSHOT + 0.6.1-SNAPSHOT feature ccsdk-sli-plugins :: template-node :: ${project.artifactId} diff --git a/template-node/features/features-template-node/pom.xml b/template-node/features/features-template-node/pom.xml index 105a03245..11e459d0a 100644 --- a/template-node/features/features-template-node/pom.xml +++ b/template-node/features/features-template-node/pom.xml @@ -5,13 +5,13 @@ org.onap.ccsdk.parent feature-repo-parent - 1.4.0-SNAPSHOT + 1.4.1-SNAPSHOT org.onap.ccsdk.sli.plugins features-template-node - 0.6.0-SNAPSHOT + 0.6.1-SNAPSHOT feature diff --git a/template-node/features/pom.xml b/template-node/features/pom.xml index 391a6ce14..40574a1f9 100644 --- a/template-node/features/pom.xml +++ b/template-node/features/pom.xml @@ -5,12 +5,12 @@ org.onap.ccsdk.parent odlparent-lite - 1.4.0-SNAPSHOT + 1.4.1-SNAPSHOT org.onap.ccsdk.sli.plugins template-node-features - 0.6.0-SNAPSHOT + 0.6.1-SNAPSHOT pom diff --git a/template-node/installer/pom.xml b/template-node/installer/pom.xml index 2a5891dd4..7fbbeec74 100644 --- a/template-node/installer/pom.xml +++ b/template-node/installer/pom.xml @@ -5,12 +5,12 @@ org.onap.ccsdk.parent odlparent-lite - 1.4.0-SNAPSHOT + 1.4.1-SNAPSHOT org.onap.ccsdk.sli.plugins template-node-installer - 0.6.0-SNAPSHOT + 0.6.1-SNAPSHOT pom ccsdk-sli-plugins :: template-node :: ${project.artifactId} diff --git a/template-node/lighty/pom.xml b/template-node/lighty/pom.xml index f9bc94d81..8759f0273 100755 --- a/template-node/lighty/pom.xml +++ b/template-node/lighty/pom.xml @@ -5,13 +5,13 @@ org.onap.ccsdk.parent binding-parent - 1.4.0-SNAPSHOT + 1.4.1-SNAPSHOT org.onap.ccsdk.sli.plugins template-node-lighty - 0.6.0-SNAPSHOT + 0.6.1-SNAPSHOT jar ccsdk-sli-plugins :: template-node :: ${project.artifactId} diff --git a/template-node/pom.xml b/template-node/pom.xml index 4149f8746..959d119c4 100644 --- a/template-node/pom.xml +++ b/template-node/pom.xml @@ -5,12 +5,12 @@ org.onap.ccsdk.parent odlparent-lite - 1.4.0-SNAPSHOT + 1.4.1-SNAPSHOT org.onap.ccsdk.sli.plugins template-node - 0.6.0-SNAPSHOT + 0.6.1-SNAPSHOT pom diff --git a/template-node/provider/pom.xml b/template-node/provider/pom.xml index f9cd3ef2d..477a539f2 100644 --- a/template-node/provider/pom.xml +++ b/template-node/provider/pom.xml @@ -5,12 +5,12 @@ org.onap.ccsdk.parent binding-parent - 1.4.0-SNAPSHOT + 1.4.1-SNAPSHOT org.onap.ccsdk.sli.plugins template-node-provider - 0.6.0-SNAPSHOT + 0.6.1-SNAPSHOT bundle ccsdk-sli-plugins :: template-node :: ${project.artifactId} diff --git a/version.properties b/version.properties index 3fc281cbc..24c154ada 100644 --- a/version.properties +++ b/version.properties @@ -7,7 +7,7 @@ release_name=0 sprint_number=6 -feature_revision=0 +feature_revision=1 base_version=${release_name}.${sprint_number}.${feature_revision} -- cgit 1.2.3-korg From cd53f2f4488e8521cd2461526a66fa7021ef6ced Mon Sep 17 00:00:00 2001 From: "Timoney, Dan (dt5972)" Date: Wed, 11 Sep 2019 10:41:38 -0400 Subject: Roll versions for Frankfurt development Roll master version for Frankfurt development Change-Id: Ibdc691d8ff93b74ac9bc4baae95c5988dd7e34d4 Issue-ID: CCSDK-1701 Signed-off-by: Timoney, Dan (dt5972) --- artifacts/pom.xml | 4 ++-- features/ccsdk-sli-plugins-all/pom.xml | 4 ++-- features/features-sli-plugins/pom.xml | 4 ++-- features/installer/pom.xml | 4 ++-- features/pom.xml | 4 ++-- grToolkit/features/ccsdk-gr-toolkit/pom.xml | 4 ++-- grToolkit/features/features-gr-toolkit/pom.xml | 4 ++-- grToolkit/features/pom.xml | 4 ++-- grToolkit/installer/pom.xml | 4 ++-- grToolkit/model/pom.xml | 4 ++-- grToolkit/pom.xml | 4 ++-- grToolkit/provider/pom.xml | 4 ++-- pom.xml | 4 ++-- properties-node/features/ccsdk-properties-node/pom.xml | 4 ++-- properties-node/features/features-properties-node/pom.xml | 4 ++-- properties-node/features/pom.xml | 4 ++-- properties-node/installer/pom.xml | 4 ++-- properties-node/pom.xml | 4 ++-- properties-node/provider/pom.xml | 4 ++-- restapi-call-node/features/ccsdk-restapi-call-node/pom.xml | 4 ++-- restapi-call-node/features/features-restapi-call-node/pom.xml | 4 ++-- restapi-call-node/features/pom.xml | 4 ++-- restapi-call-node/installer/pom.xml | 4 ++-- restapi-call-node/pom.xml | 4 ++-- restapi-call-node/provider/pom.xml | 4 ++-- restconf-client/features/ccsdk-restconf-client/pom.xml | 4 ++-- restconf-client/features/features-restconf-client/pom.xml | 4 ++-- restconf-client/features/pom.xml | 4 ++-- restconf-client/installer/pom.xml | 4 ++-- restconf-client/pom.xml | 4 ++-- restconf-client/provider/pom.xml | 4 ++-- sshapi-call-node/features/ccsdk-sshapi-call-node/pom.xml | 4 ++-- sshapi-call-node/features/features-sshapi-call-node/pom.xml | 4 ++-- sshapi-call-node/features/pom.xml | 4 ++-- sshapi-call-node/installer/pom.xml | 4 ++-- sshapi-call-node/pom.xml | 4 ++-- sshapi-call-node/provider/pom.xml | 4 ++-- template-node/features/ccsdk-template-node/pom.xml | 4 ++-- template-node/features/features-template-node/pom.xml | 4 ++-- template-node/features/pom.xml | 4 ++-- template-node/installer/pom.xml | 4 ++-- template-node/pom.xml | 4 ++-- template-node/provider/pom.xml | 4 ++-- version.properties | 4 ++-- 44 files changed, 88 insertions(+), 88 deletions(-) (limited to 'restconf-client/provider') diff --git a/artifacts/pom.xml b/artifacts/pom.xml index 59e334acf..ef2d3541a 100755 --- a/artifacts/pom.xml +++ b/artifacts/pom.xml @@ -4,7 +4,7 @@ org.onap.ccsdk.sli.plugins sli-plugins-artifacts - 0.6.1-SNAPSHOT + 0.7.0-SNAPSHOT pom ccsdk-sli-plugins :: sli-plugins-artifacts @@ -17,7 +17,7 @@ org.onap.ccsdk.parent parent - 1.4.1-SNAPSHOT + 1.5.0-SNAPSHOT diff --git a/features/ccsdk-sli-plugins-all/pom.xml b/features/ccsdk-sli-plugins-all/pom.xml index 1054f1903..fe21e42fe 100644 --- a/features/ccsdk-sli-plugins-all/pom.xml +++ b/features/ccsdk-sli-plugins-all/pom.xml @@ -5,13 +5,13 @@ org.onap.ccsdk.parent single-feature-parent - 1.4.1-SNAPSHOT + 1.5.0-SNAPSHOT org.onap.ccsdk.sli.plugins ccsdk-sli-plugins-all - 0.6.1-SNAPSHOT + 0.7.0-SNAPSHOT feature ccsdk-sli-plugins :: features :: ${project.artifactId} diff --git a/features/features-sli-plugins/pom.xml b/features/features-sli-plugins/pom.xml index dff558c6a..070979220 100644 --- a/features/features-sli-plugins/pom.xml +++ b/features/features-sli-plugins/pom.xml @@ -5,13 +5,13 @@ org.onap.ccsdk.parent feature-repo-parent - 1.4.1-SNAPSHOT + 1.5.0-SNAPSHOT org.onap.ccsdk.sli.plugins features-sli-plugins - 0.6.1-SNAPSHOT + 0.7.0-SNAPSHOT feature ccsdk-sli-plugins :: features :: ${project.artifactId} diff --git a/features/installer/pom.xml b/features/installer/pom.xml index 529588c58..5f6d1b442 100755 --- a/features/installer/pom.xml +++ b/features/installer/pom.xml @@ -5,13 +5,13 @@ org.onap.ccsdk.parent odlparent-lite - 1.4.1-SNAPSHOT + 1.5.0-SNAPSHOT org.onap.ccsdk.sli.plugins sliplugins-features-installer - 0.6.1-SNAPSHOT + 0.7.0-SNAPSHOT pom ccsdk-sli-plugins :: features :: ${project.artifactId} diff --git a/features/pom.xml b/features/pom.xml index 3780233ec..d551c350a 100755 --- a/features/pom.xml +++ b/features/pom.xml @@ -5,13 +5,13 @@ org.onap.ccsdk.parent odlparent-lite - 1.4.1-SNAPSHOT + 1.5.0-SNAPSHOT org.onap.ccsdk.sli.plugins sliplugins-feature-aggregator - 0.6.1-SNAPSHOT + 0.7.0-SNAPSHOT pom ccsdk-sli-plugins :: features diff --git a/grToolkit/features/ccsdk-gr-toolkit/pom.xml b/grToolkit/features/ccsdk-gr-toolkit/pom.xml index 88d931d33..fb5523902 100644 --- a/grToolkit/features/ccsdk-gr-toolkit/pom.xml +++ b/grToolkit/features/ccsdk-gr-toolkit/pom.xml @@ -5,13 +5,13 @@ org.onap.ccsdk.parent single-feature-parent - 1.4.1-SNAPSHOT + 1.5.0-SNAPSHOT org.onap.ccsdk.sli.plugins ccsdk-gr-toolkit - 0.6.1-SNAPSHOT + 0.7.0-SNAPSHOT feature ccsdk-sli-plugins :: gr-toolkit :: ${project.artifactId} diff --git a/grToolkit/features/features-gr-toolkit/pom.xml b/grToolkit/features/features-gr-toolkit/pom.xml index f22ed5d29..3e6c967ad 100755 --- a/grToolkit/features/features-gr-toolkit/pom.xml +++ b/grToolkit/features/features-gr-toolkit/pom.xml @@ -5,13 +5,13 @@ org.onap.ccsdk.parent feature-repo-parent - 1.4.1-SNAPSHOT + 1.5.0-SNAPSHOT org.onap.ccsdk.sli.plugins features-gr-toolkit - 0.6.1-SNAPSHOT + 0.7.0-SNAPSHOT feature ccsdk-sli-plugins :: gr-toolkit :: ${project.artifactId} diff --git a/grToolkit/features/pom.xml b/grToolkit/features/pom.xml index 37179a551..aebb98e9f 100755 --- a/grToolkit/features/pom.xml +++ b/grToolkit/features/pom.xml @@ -4,14 +4,14 @@ org.onap.ccsdk.parent odlparent-lite - 1.4.1-SNAPSHOT + 1.5.0-SNAPSHOT ccsdk-sli-plugins :: gr-toolkit :: ${project.artifactId} gr-toolkit-features org.onap.ccsdk.sli.plugins - 0.6.1-SNAPSHOT + 0.7.0-SNAPSHOT pom diff --git a/grToolkit/installer/pom.xml b/grToolkit/installer/pom.xml index 4d097054f..0fd397232 100755 --- a/grToolkit/installer/pom.xml +++ b/grToolkit/installer/pom.xml @@ -4,14 +4,14 @@ org.onap.ccsdk.parent odlparent-lite - 1.4.1-SNAPSHOT + 1.5.0-SNAPSHOT ccsdk-sli-plugins :: gr-toolkit :: ${project.artifactId} org.onap.ccsdk.sli.plugins gr-toolkit-installer - 0.6.1-SNAPSHOT + 0.7.0-SNAPSHOT pom ccsdk-gr-toolkit diff --git a/grToolkit/model/pom.xml b/grToolkit/model/pom.xml index 646564a90..39239a08c 100755 --- a/grToolkit/model/pom.xml +++ b/grToolkit/model/pom.xml @@ -4,13 +4,13 @@ org.onap.ccsdk.parent binding-parent - 1.4.1-SNAPSHOT + 1.5.0-SNAPSHOT ccsdk-sli-plugins :: gr-toolkit :: ${project.artifactId} org.onap.ccsdk.sli.plugins gr-toolkit-model - 0.6.1-SNAPSHOT + 0.7.0-SNAPSHOT bundle diff --git a/grToolkit/pom.xml b/grToolkit/pom.xml index b55df5cd7..9de96ec8c 100755 --- a/grToolkit/pom.xml +++ b/grToolkit/pom.xml @@ -5,13 +5,13 @@ org.onap.ccsdk.parent odlparent-lite - 1.4.1-SNAPSHOT + 1.5.0-SNAPSHOT org.onap.ccsdk.sli.plugins gr-toolkit - 0.6.1-SNAPSHOT + 0.7.0-SNAPSHOT pom ccsdk-sli-plugins :: gr-toolkit diff --git a/grToolkit/provider/pom.xml b/grToolkit/provider/pom.xml index f8228c2b5..d36643a77 100755 --- a/grToolkit/provider/pom.xml +++ b/grToolkit/provider/pom.xml @@ -4,13 +4,13 @@ org.onap.ccsdk.parent binding-parent - 1.4.1-SNAPSHOT + 1.5.0-SNAPSHOT ccsdk-sli-plugins :: gr-toolkit :: ${project.artifactId} org.onap.ccsdk.sli.plugins gr-toolkit-provider - 0.6.1-SNAPSHOT + 0.7.0-SNAPSHOT bundle diff --git a/pom.xml b/pom.xml index 8e9cc52d2..c0be21440 100755 --- a/pom.xml +++ b/pom.xml @@ -5,12 +5,12 @@ org.onap.ccsdk.parent odlparent-lite - 1.4.1-SNAPSHOT + 1.5.0-SNAPSHOT org.onap.ccsdk.sli.plugins ccsdk-sli-plugins - 0.6.1-SNAPSHOT + 0.7.0-SNAPSHOT pom ccsdk-sli-plugins diff --git a/properties-node/features/ccsdk-properties-node/pom.xml b/properties-node/features/ccsdk-properties-node/pom.xml index b80d8f429..c496d20d8 100644 --- a/properties-node/features/ccsdk-properties-node/pom.xml +++ b/properties-node/features/ccsdk-properties-node/pom.xml @@ -5,13 +5,13 @@ org.onap.ccsdk.parent single-feature-parent - 1.4.1-SNAPSHOT + 1.5.0-SNAPSHOT org.onap.ccsdk.sli.plugins ccsdk-properties-node - 0.6.1-SNAPSHOT + 0.7.0-SNAPSHOT feature ccsdk-sli-plugins :: properties-node :: ${project.artifactId} diff --git a/properties-node/features/features-properties-node/pom.xml b/properties-node/features/features-properties-node/pom.xml index 485d29534..e25ba5808 100644 --- a/properties-node/features/features-properties-node/pom.xml +++ b/properties-node/features/features-properties-node/pom.xml @@ -5,13 +5,13 @@ org.onap.ccsdk.parent feature-repo-parent - 1.4.1-SNAPSHOT + 1.5.0-SNAPSHOT org.onap.ccsdk.sli.plugins features-properties-node - 0.6.1-SNAPSHOT + 0.7.0-SNAPSHOT feature ccsdk-sli-plugins :: properties-node :: ${project.artifactId} diff --git a/properties-node/features/pom.xml b/properties-node/features/pom.xml index 83bc1da13..97f12cf24 100755 --- a/properties-node/features/pom.xml +++ b/properties-node/features/pom.xml @@ -5,12 +5,12 @@ org.onap.ccsdk.parent odlparent-lite - 1.4.1-SNAPSHOT + 1.5.0-SNAPSHOT org.onap.ccsdk.sli.plugins properties-node-features - 0.6.1-SNAPSHOT + 0.7.0-SNAPSHOT pom ccsdk-sli-plugins :: properties-node :: ${project.artifactId} diff --git a/properties-node/installer/pom.xml b/properties-node/installer/pom.xml index 3af5efc7a..9ba85b91c 100755 --- a/properties-node/installer/pom.xml +++ b/properties-node/installer/pom.xml @@ -5,12 +5,12 @@ org.onap.ccsdk.parent odlparent-lite - 1.4.1-SNAPSHOT + 1.5.0-SNAPSHOT org.onap.ccsdk.sli.plugins properties-node-installer - 0.6.1-SNAPSHOT + 0.7.0-SNAPSHOT pom ccsdk-sli-plugins :: properties-node :: ${project.artifactId} diff --git a/properties-node/pom.xml b/properties-node/pom.xml index 0e5d576d3..0c9c28464 100755 --- a/properties-node/pom.xml +++ b/properties-node/pom.xml @@ -5,12 +5,12 @@ org.onap.ccsdk.parent odlparent-lite - 1.4.1-SNAPSHOT + 1.5.0-SNAPSHOT org.onap.ccsdk.sli.plugins properties-node - 0.6.1-SNAPSHOT + 0.7.0-SNAPSHOT pom ccsdk-sli-plugins :: properties-node diff --git a/properties-node/provider/pom.xml b/properties-node/provider/pom.xml index 262c4968d..059870974 100755 --- a/properties-node/provider/pom.xml +++ b/properties-node/provider/pom.xml @@ -5,12 +5,12 @@ org.onap.ccsdk.parent binding-parent - 1.4.1-SNAPSHOT + 1.5.0-SNAPSHOT org.onap.ccsdk.sli.plugins properties-node-provider - 0.6.1-SNAPSHOT + 0.7.0-SNAPSHOT bundle ccsdk-sli-plugins :: properties-node :: ${project.artifactId} 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 6f3109e4d..1100f223b 100644 --- a/restapi-call-node/features/ccsdk-restapi-call-node/pom.xml +++ b/restapi-call-node/features/ccsdk-restapi-call-node/pom.xml @@ -5,13 +5,13 @@ org.onap.ccsdk.parent single-feature-parent - 1.4.1-SNAPSHOT + 1.5.0-SNAPSHOT org.onap.ccsdk.sli.plugins ccsdk-restapi-call-node - 0.6.1-SNAPSHOT + 0.7.0-SNAPSHOT feature ccsdk-sli-plugins :: restapi-call-node :: ${project.artifactId} 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 4350f75b4..26c986a3b 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 @@ org.onap.ccsdk.parent feature-repo-parent - 1.4.1-SNAPSHOT + 1.5.0-SNAPSHOT org.onap.ccsdk.sli.plugins features-restapi-call-node - 0.6.1-SNAPSHOT + 0.7.0-SNAPSHOT feature ccsdk-sli-plugins :: restapi-call-node :: ${project.artifactId} diff --git a/restapi-call-node/features/pom.xml b/restapi-call-node/features/pom.xml index a49633d5a..6736bd1d2 100755 --- a/restapi-call-node/features/pom.xml +++ b/restapi-call-node/features/pom.xml @@ -5,12 +5,12 @@ org.onap.ccsdk.parent odlparent-lite - 1.4.1-SNAPSHOT + 1.5.0-SNAPSHOT org.onap.ccsdk.sli.plugins restapi-call-node-features - 0.6.1-SNAPSHOT + 0.7.0-SNAPSHOT pom ccsdk-sli-plugins :: restapi-call-node :: ${project.artifactId} diff --git a/restapi-call-node/installer/pom.xml b/restapi-call-node/installer/pom.xml index 697cfdcc8..06e77b411 100755 --- a/restapi-call-node/installer/pom.xml +++ b/restapi-call-node/installer/pom.xml @@ -5,12 +5,12 @@ org.onap.ccsdk.parent odlparent-lite - 1.4.1-SNAPSHOT + 1.5.0-SNAPSHOT org.onap.ccsdk.sli.plugins restapi-call-node-installer - 0.6.1-SNAPSHOT + 0.7.0-SNAPSHOT pom ccsdk-sli-plugins :: restapi-call-node :: ${project.artifactId} diff --git a/restapi-call-node/pom.xml b/restapi-call-node/pom.xml index 5bbd4d7b4..26a237f7b 100755 --- a/restapi-call-node/pom.xml +++ b/restapi-call-node/pom.xml @@ -5,12 +5,12 @@ org.onap.ccsdk.parent odlparent-lite - 1.4.1-SNAPSHOT + 1.5.0-SNAPSHOT org.onap.ccsdk.sli.plugins restapi-call-node - 0.6.1-SNAPSHOT + 0.7.0-SNAPSHOT pom ccsdk-sli-plugins :: restapi-call-node diff --git a/restapi-call-node/provider/pom.xml b/restapi-call-node/provider/pom.xml index a8d3cd886..0e6babb39 100755 --- a/restapi-call-node/provider/pom.xml +++ b/restapi-call-node/provider/pom.xml @@ -5,12 +5,12 @@ org.onap.ccsdk.parent binding-parent - 1.4.1-SNAPSHOT + 1.5.0-SNAPSHOT org.onap.ccsdk.sli.plugins restapi-call-node-provider - 0.6.1-SNAPSHOT + 0.7.0-SNAPSHOT bundle ccsdk-sli-plugins :: restapi-call-node :: ${project.artifactId} diff --git a/restconf-client/features/ccsdk-restconf-client/pom.xml b/restconf-client/features/ccsdk-restconf-client/pom.xml index 28f3fc509..276d6e8fb 100644 --- a/restconf-client/features/ccsdk-restconf-client/pom.xml +++ b/restconf-client/features/ccsdk-restconf-client/pom.xml @@ -5,13 +5,13 @@ org.onap.ccsdk.parent single-feature-parent - 1.4.1-SNAPSHOT + 1.5.0-SNAPSHOT org.onap.ccsdk.sli.plugins ccsdk-restconf-client - 0.6.1-SNAPSHOT + 0.7.0-SNAPSHOT feature diff --git a/restconf-client/features/features-restconf-client/pom.xml b/restconf-client/features/features-restconf-client/pom.xml index 49360057e..d4c78ca35 100644 --- a/restconf-client/features/features-restconf-client/pom.xml +++ b/restconf-client/features/features-restconf-client/pom.xml @@ -5,13 +5,13 @@ org.onap.ccsdk.parent feature-repo-parent - 1.4.1-SNAPSHOT + 1.5.0-SNAPSHOT org.onap.ccsdk.sli.plugins features-restconf-client - 0.6.1-SNAPSHOT + 0.7.0-SNAPSHOT feature ccsdk-sli-plugins :: restconf-client :: ${project.artifactId} diff --git a/restconf-client/features/pom.xml b/restconf-client/features/pom.xml index d3123f7ec..a5d75807e 100755 --- a/restconf-client/features/pom.xml +++ b/restconf-client/features/pom.xml @@ -5,12 +5,12 @@ org.onap.ccsdk.parent odlparent-lite - 1.4.1-SNAPSHOT + 1.5.0-SNAPSHOT org.onap.ccsdk.sli.plugins restconf-client-features - 0.6.1-SNAPSHOT + 0.7.0-SNAPSHOT pom ccsdk-sli-plugins :: restconf-client :: ${project.artifactId} diff --git a/restconf-client/installer/pom.xml b/restconf-client/installer/pom.xml index 7f80aa951..6fb08e311 100755 --- a/restconf-client/installer/pom.xml +++ b/restconf-client/installer/pom.xml @@ -5,12 +5,12 @@ org.onap.ccsdk.parent odlparent-lite - 1.4.1-SNAPSHOT + 1.5.0-SNAPSHOT org.onap.ccsdk.sli.plugins restconf-client-installer - 0.6.1-SNAPSHOT + 0.7.0-SNAPSHOT pom ccsdk-sli-plugins :: restconf-client :: ${project.artifactId} diff --git a/restconf-client/pom.xml b/restconf-client/pom.xml index 2d1893f6d..9492f9eaf 100755 --- a/restconf-client/pom.xml +++ b/restconf-client/pom.xml @@ -5,12 +5,12 @@ org.onap.ccsdk.parent odlparent-lite - 1.4.1-SNAPSHOT + 1.5.0-SNAPSHOT org.onap.ccsdk.sli.plugins restconf-client - 0.6.1-SNAPSHOT + 0.7.0-SNAPSHOT pom ccsdk-sli-plugins :: restconf-client diff --git a/restconf-client/provider/pom.xml b/restconf-client/provider/pom.xml index 953db6933..d6f996ae6 100755 --- a/restconf-client/provider/pom.xml +++ b/restconf-client/provider/pom.xml @@ -5,12 +5,12 @@ org.onap.ccsdk.parent binding-parent - 1.4.1-SNAPSHOT + 1.5.0-SNAPSHOT org.onap.ccsdk.sli.plugins restconf-client-provider - 0.6.1-SNAPSHOT + 0.7.0-SNAPSHOT bundle ccsdk-sli-plugins :: restconf-client :: ${project.artifactId} 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 c0539c4d2..604c4c83d 100644 --- a/sshapi-call-node/features/ccsdk-sshapi-call-node/pom.xml +++ b/sshapi-call-node/features/ccsdk-sshapi-call-node/pom.xml @@ -5,13 +5,13 @@ org.onap.ccsdk.parent single-feature-parent - 1.4.1-SNAPSHOT + 1.5.0-SNAPSHOT org.onap.ccsdk.sli.plugins ccsdk-sshapi-call-node - 0.6.1-SNAPSHOT + 0.7.0-SNAPSHOT feature ccsdk-sli-plugins :: sshapi-call-node :: ${project.artifactId} 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 6b9827c5c..32d50d7e1 100644 --- a/sshapi-call-node/features/features-sshapi-call-node/pom.xml +++ b/sshapi-call-node/features/features-sshapi-call-node/pom.xml @@ -5,13 +5,13 @@ org.onap.ccsdk.parent feature-repo-parent - 1.4.1-SNAPSHOT + 1.5.0-SNAPSHOT org.onap.ccsdk.sli.plugins features-sshapi-call-node - 0.6.1-SNAPSHOT + 0.7.0-SNAPSHOT feature ccsdk-sli-plugins :: sshapi-call-node :: ${project.artifactId} diff --git a/sshapi-call-node/features/pom.xml b/sshapi-call-node/features/pom.xml index 7e367cea1..08c53e084 100755 --- a/sshapi-call-node/features/pom.xml +++ b/sshapi-call-node/features/pom.xml @@ -5,12 +5,12 @@ org.onap.ccsdk.parent odlparent-lite - 1.4.1-SNAPSHOT + 1.5.0-SNAPSHOT org.onap.ccsdk.sli.plugins sshapi-call-node-features - 0.6.1-SNAPSHOT + 0.7.0-SNAPSHOT pom ccsdk-sli-plugins :: sshapi-call-node :: ${project.artifactId} diff --git a/sshapi-call-node/installer/pom.xml b/sshapi-call-node/installer/pom.xml index 475da0c7d..94b28f215 100755 --- a/sshapi-call-node/installer/pom.xml +++ b/sshapi-call-node/installer/pom.xml @@ -5,12 +5,12 @@ org.onap.ccsdk.parent odlparent-lite - 1.4.1-SNAPSHOT + 1.5.0-SNAPSHOT org.onap.ccsdk.sli.plugins sshapi-call-node-installer - 0.6.1-SNAPSHOT + 0.7.0-SNAPSHOT pom ccsdk-sli-plugins :: sshapi-call-node :: ${project.artifactId} diff --git a/sshapi-call-node/pom.xml b/sshapi-call-node/pom.xml index d46da1973..91fe43507 100755 --- a/sshapi-call-node/pom.xml +++ b/sshapi-call-node/pom.xml @@ -5,12 +5,12 @@ org.onap.ccsdk.parent odlparent-lite - 1.4.1-SNAPSHOT + 1.5.0-SNAPSHOT org.onap.ccsdk.sli.plugins sshapi-call-node - 0.6.1-SNAPSHOT + 0.7.0-SNAPSHOT pom ccsdk-sli-plugins :: sshapi-call-node diff --git a/sshapi-call-node/provider/pom.xml b/sshapi-call-node/provider/pom.xml index 0ad9e2a7b..d616db767 100755 --- a/sshapi-call-node/provider/pom.xml +++ b/sshapi-call-node/provider/pom.xml @@ -5,12 +5,12 @@ org.onap.ccsdk.parent binding-parent - 1.4.1-SNAPSHOT + 1.5.0-SNAPSHOT org.onap.ccsdk.sli.plugins sshapi-call-node-provider - 0.6.1-SNAPSHOT + 0.7.0-SNAPSHOT bundle ccsdk-sli-plugins :: sshapi-call-node :: ${project.artifactId} diff --git a/template-node/features/ccsdk-template-node/pom.xml b/template-node/features/ccsdk-template-node/pom.xml index e34106988..8bf76afa9 100644 --- a/template-node/features/ccsdk-template-node/pom.xml +++ b/template-node/features/ccsdk-template-node/pom.xml @@ -5,13 +5,13 @@ org.onap.ccsdk.parent single-feature-parent - 1.4.1-SNAPSHOT + 1.5.0-SNAPSHOT org.onap.ccsdk.sli.plugins ccsdk-template-node - 0.6.1-SNAPSHOT + 0.7.0-SNAPSHOT feature ccsdk-sli-plugins :: template-node :: ${project.artifactId} diff --git a/template-node/features/features-template-node/pom.xml b/template-node/features/features-template-node/pom.xml index 11e459d0a..6934d2f0b 100644 --- a/template-node/features/features-template-node/pom.xml +++ b/template-node/features/features-template-node/pom.xml @@ -5,13 +5,13 @@ org.onap.ccsdk.parent feature-repo-parent - 1.4.1-SNAPSHOT + 1.5.0-SNAPSHOT org.onap.ccsdk.sli.plugins features-template-node - 0.6.1-SNAPSHOT + 0.7.0-SNAPSHOT feature diff --git a/template-node/features/pom.xml b/template-node/features/pom.xml index 40574a1f9..9dfebb7e6 100644 --- a/template-node/features/pom.xml +++ b/template-node/features/pom.xml @@ -5,12 +5,12 @@ org.onap.ccsdk.parent odlparent-lite - 1.4.1-SNAPSHOT + 1.5.0-SNAPSHOT org.onap.ccsdk.sli.plugins template-node-features - 0.6.1-SNAPSHOT + 0.7.0-SNAPSHOT pom diff --git a/template-node/installer/pom.xml b/template-node/installer/pom.xml index 7fbbeec74..92f3bdeaf 100644 --- a/template-node/installer/pom.xml +++ b/template-node/installer/pom.xml @@ -5,12 +5,12 @@ org.onap.ccsdk.parent odlparent-lite - 1.4.1-SNAPSHOT + 1.5.0-SNAPSHOT org.onap.ccsdk.sli.plugins template-node-installer - 0.6.1-SNAPSHOT + 0.7.0-SNAPSHOT pom ccsdk-sli-plugins :: template-node :: ${project.artifactId} diff --git a/template-node/pom.xml b/template-node/pom.xml index 58a83c841..efcb5efd0 100644 --- a/template-node/pom.xml +++ b/template-node/pom.xml @@ -5,12 +5,12 @@ org.onap.ccsdk.parent odlparent-lite - 1.4.1-SNAPSHOT + 1.5.0-SNAPSHOT org.onap.ccsdk.sli.plugins template-node - 0.6.1-SNAPSHOT + 0.7.0-SNAPSHOT pom diff --git a/template-node/provider/pom.xml b/template-node/provider/pom.xml index 477a539f2..65df5c6dc 100644 --- a/template-node/provider/pom.xml +++ b/template-node/provider/pom.xml @@ -5,12 +5,12 @@ org.onap.ccsdk.parent binding-parent - 1.4.1-SNAPSHOT + 1.5.0-SNAPSHOT org.onap.ccsdk.sli.plugins template-node-provider - 0.6.1-SNAPSHOT + 0.7.0-SNAPSHOT bundle ccsdk-sli-plugins :: template-node :: ${project.artifactId} diff --git a/version.properties b/version.properties index 24c154ada..f23ce8f9e 100644 --- a/version.properties +++ b/version.properties @@ -6,8 +6,8 @@ # Comment release_name=0 -sprint_number=6 -feature_revision=1 +sprint_number=7 +feature_revision=0 base_version=${release_name}.${sprint_number}.${feature_revision} -- cgit 1.2.3-korg From 300ec08d358c3b23bd65e96a0f642b9a8e86106e Mon Sep 17 00:00:00 2001 From: "Timoney, Dan (dt5972)" Date: Wed, 11 Sep 2019 15:32:30 -0400 Subject: Specify sli scope as provided Specify scope of sli dependency as provided to avoid issue in generated feature.xml Change-Id: I16caad2df85b1a8c103d942815c08e9ea037372a Issue-ID: CCSDK-1445 Signed-off-by: Timoney, Dan (dt5972) --- restconf-client/provider/pom.xml | 43 +++++++++++++++++++--------------------- 1 file changed, 20 insertions(+), 23 deletions(-) (limited to 'restconf-client/provider') diff --git a/restconf-client/provider/pom.xml b/restconf-client/provider/pom.xml index d6f996ae6..ec9e151e8 100755 --- a/restconf-client/provider/pom.xml +++ b/restconf-client/provider/pom.xml @@ -1,5 +1,6 @@ - + 4.0.0 @@ -14,17 +15,17 @@ bundle ccsdk-sli-plugins :: restconf-client :: ${project.artifactId} - + - - - org.onap.ccsdk.sli.core - sli-core-artifacts - ${ccsdk.sli.core.version} - pom - import - - + + + org.onap.ccsdk.sli.core + sli-core-artifacts + ${ccsdk.sli.core.version} + pom + import + + @@ -39,16 +40,12 @@ org.onap.ccsdk.sli.core sli-common - provided - - - org.onap.ccsdk.sli.core - sli-provider - provided - + provided + org.onap.ccsdk.sli.core sli-provider + provided org.onap.ccsdk.sli.plugins @@ -84,11 +81,11 @@ org.opendaylight.yangtools yang-parser-impl - - org.osgi - org.osgi.core - provided - + + org.osgi + org.osgi.core + provided + -- cgit 1.2.3-korg From 54e11e9ee8bc35cc5e4b9f9b2a72b534e3217f2b Mon Sep 17 00:00:00 2001 From: "Timoney, Dan (dt5972)" Date: Wed, 13 Nov 2019 10:30:06 -0500 Subject: Use 1.5.0 parent pom Use released 1.5.0 version of parent pom Change-Id: I16d9e82401447829e6b853790553623cc2a03117 Issue-ID: CCSDK-1920 Signed-off-by: Timoney, Dan (dt5972) --- artifacts/pom.xml | 2 +- features/ccsdk-sli-plugins-all/pom.xml | 2 +- features/features-sli-plugins/pom.xml | 2 +- features/installer/pom.xml | 2 +- features/pom.xml | 2 +- grToolkit/features/ccsdk-gr-toolkit/pom.xml | 2 +- grToolkit/features/features-gr-toolkit/pom.xml | 2 +- grToolkit/features/pom.xml | 2 +- grToolkit/installer/pom.xml | 2 +- grToolkit/model/pom.xml | 2 +- grToolkit/pom.xml | 2 +- grToolkit/provider/pom.xml | 2 +- pom.xml | 2 +- properties-node/features/ccsdk-properties-node/pom.xml | 2 +- properties-node/features/features-properties-node/pom.xml | 2 +- properties-node/features/pom.xml | 2 +- properties-node/installer/pom.xml | 2 +- properties-node/pom.xml | 2 +- properties-node/provider/pom.xml | 3 ++- restapi-call-node/features/ccsdk-restapi-call-node/pom.xml | 2 +- restapi-call-node/features/features-restapi-call-node/pom.xml | 2 +- restapi-call-node/features/pom.xml | 2 +- restapi-call-node/installer/pom.xml | 2 +- restapi-call-node/pom.xml | 2 +- restapi-call-node/provider/pom.xml | 2 +- restconf-client/features/ccsdk-restconf-client/pom.xml | 2 +- restconf-client/features/features-restconf-client/pom.xml | 2 +- restconf-client/features/pom.xml | 2 +- restconf-client/installer/pom.xml | 2 +- restconf-client/pom.xml | 2 +- restconf-client/provider/pom.xml | 5 ++--- sshapi-call-node/features/ccsdk-sshapi-call-node/pom.xml | 2 +- sshapi-call-node/features/features-sshapi-call-node/pom.xml | 2 +- sshapi-call-node/features/pom.xml | 2 +- sshapi-call-node/installer/pom.xml | 2 +- sshapi-call-node/pom.xml | 2 +- sshapi-call-node/provider/pom.xml | 5 +++-- template-node/features/ccsdk-template-node/pom.xml | 2 +- template-node/features/features-template-node/pom.xml | 2 +- template-node/features/pom.xml | 2 +- template-node/installer/pom.xml | 2 +- template-node/pom.xml | 2 +- template-node/provider/pom.xml | 2 +- 43 files changed, 47 insertions(+), 46 deletions(-) (limited to 'restconf-client/provider') diff --git a/artifacts/pom.xml b/artifacts/pom.xml index ef2d3541a..f52c67ffd 100755 --- a/artifacts/pom.xml +++ b/artifacts/pom.xml @@ -17,7 +17,7 @@ org.onap.ccsdk.parent parent - 1.5.0-SNAPSHOT + 1.5.0 diff --git a/features/ccsdk-sli-plugins-all/pom.xml b/features/ccsdk-sli-plugins-all/pom.xml index fe21e42fe..17fa454d5 100644 --- a/features/ccsdk-sli-plugins-all/pom.xml +++ b/features/ccsdk-sli-plugins-all/pom.xml @@ -5,7 +5,7 @@ org.onap.ccsdk.parent single-feature-parent - 1.5.0-SNAPSHOT + 1.5.0 diff --git a/features/features-sli-plugins/pom.xml b/features/features-sli-plugins/pom.xml index 070979220..0a42c4f92 100644 --- a/features/features-sli-plugins/pom.xml +++ b/features/features-sli-plugins/pom.xml @@ -5,7 +5,7 @@ org.onap.ccsdk.parent feature-repo-parent - 1.5.0-SNAPSHOT + 1.5.0 diff --git a/features/installer/pom.xml b/features/installer/pom.xml index 5f6d1b442..b5d3d5f20 100755 --- a/features/installer/pom.xml +++ b/features/installer/pom.xml @@ -5,7 +5,7 @@ org.onap.ccsdk.parent odlparent-lite - 1.5.0-SNAPSHOT + 1.5.0 diff --git a/features/pom.xml b/features/pom.xml index d551c350a..b7267c060 100755 --- a/features/pom.xml +++ b/features/pom.xml @@ -5,7 +5,7 @@ org.onap.ccsdk.parent odlparent-lite - 1.5.0-SNAPSHOT + 1.5.0 diff --git a/grToolkit/features/ccsdk-gr-toolkit/pom.xml b/grToolkit/features/ccsdk-gr-toolkit/pom.xml index fb5523902..26a3ae37d 100644 --- a/grToolkit/features/ccsdk-gr-toolkit/pom.xml +++ b/grToolkit/features/ccsdk-gr-toolkit/pom.xml @@ -5,7 +5,7 @@ org.onap.ccsdk.parent single-feature-parent - 1.5.0-SNAPSHOT + 1.5.0 diff --git a/grToolkit/features/features-gr-toolkit/pom.xml b/grToolkit/features/features-gr-toolkit/pom.xml index 3e6c967ad..fa044f74c 100755 --- a/grToolkit/features/features-gr-toolkit/pom.xml +++ b/grToolkit/features/features-gr-toolkit/pom.xml @@ -5,7 +5,7 @@ org.onap.ccsdk.parent feature-repo-parent - 1.5.0-SNAPSHOT + 1.5.0 diff --git a/grToolkit/features/pom.xml b/grToolkit/features/pom.xml index aebb98e9f..8a1945bf3 100755 --- a/grToolkit/features/pom.xml +++ b/grToolkit/features/pom.xml @@ -4,7 +4,7 @@ org.onap.ccsdk.parent odlparent-lite - 1.5.0-SNAPSHOT + 1.5.0 diff --git a/grToolkit/installer/pom.xml b/grToolkit/installer/pom.xml index 0fd397232..2b3147426 100755 --- a/grToolkit/installer/pom.xml +++ b/grToolkit/installer/pom.xml @@ -4,7 +4,7 @@ org.onap.ccsdk.parent odlparent-lite - 1.5.0-SNAPSHOT + 1.5.0 diff --git a/grToolkit/model/pom.xml b/grToolkit/model/pom.xml index 39239a08c..56a136b5b 100755 --- a/grToolkit/model/pom.xml +++ b/grToolkit/model/pom.xml @@ -4,7 +4,7 @@ org.onap.ccsdk.parent binding-parent - 1.5.0-SNAPSHOT + 1.5.0 ccsdk-sli-plugins :: gr-toolkit :: ${project.artifactId} diff --git a/grToolkit/pom.xml b/grToolkit/pom.xml index 9de96ec8c..7f21b85fb 100755 --- a/grToolkit/pom.xml +++ b/grToolkit/pom.xml @@ -5,7 +5,7 @@ org.onap.ccsdk.parent odlparent-lite - 1.5.0-SNAPSHOT + 1.5.0 diff --git a/grToolkit/provider/pom.xml b/grToolkit/provider/pom.xml index d36643a77..a18054be8 100755 --- a/grToolkit/provider/pom.xml +++ b/grToolkit/provider/pom.xml @@ -4,7 +4,7 @@ org.onap.ccsdk.parent binding-parent - 1.5.0-SNAPSHOT + 1.5.0 ccsdk-sli-plugins :: gr-toolkit :: ${project.artifactId} diff --git a/pom.xml b/pom.xml index c0be21440..919cbe164 100755 --- a/pom.xml +++ b/pom.xml @@ -5,7 +5,7 @@ org.onap.ccsdk.parent odlparent-lite - 1.5.0-SNAPSHOT + 1.5.0 org.onap.ccsdk.sli.plugins diff --git a/properties-node/features/ccsdk-properties-node/pom.xml b/properties-node/features/ccsdk-properties-node/pom.xml index c496d20d8..a4f0ce2b8 100644 --- a/properties-node/features/ccsdk-properties-node/pom.xml +++ b/properties-node/features/ccsdk-properties-node/pom.xml @@ -5,7 +5,7 @@ org.onap.ccsdk.parent single-feature-parent - 1.5.0-SNAPSHOT + 1.5.0 diff --git a/properties-node/features/features-properties-node/pom.xml b/properties-node/features/features-properties-node/pom.xml index e25ba5808..7f25ff685 100644 --- a/properties-node/features/features-properties-node/pom.xml +++ b/properties-node/features/features-properties-node/pom.xml @@ -5,7 +5,7 @@ org.onap.ccsdk.parent feature-repo-parent - 1.5.0-SNAPSHOT + 1.5.0 diff --git a/properties-node/features/pom.xml b/properties-node/features/pom.xml index 97f12cf24..f7834e1b2 100755 --- a/properties-node/features/pom.xml +++ b/properties-node/features/pom.xml @@ -5,7 +5,7 @@ org.onap.ccsdk.parent odlparent-lite - 1.5.0-SNAPSHOT + 1.5.0 org.onap.ccsdk.sli.plugins diff --git a/properties-node/installer/pom.xml b/properties-node/installer/pom.xml index 9ba85b91c..7d501f7d4 100755 --- a/properties-node/installer/pom.xml +++ b/properties-node/installer/pom.xml @@ -5,7 +5,7 @@ org.onap.ccsdk.parent odlparent-lite - 1.5.0-SNAPSHOT + 1.5.0 org.onap.ccsdk.sli.plugins diff --git a/properties-node/pom.xml b/properties-node/pom.xml index 0c9c28464..03fbaebea 100755 --- a/properties-node/pom.xml +++ b/properties-node/pom.xml @@ -5,7 +5,7 @@ org.onap.ccsdk.parent odlparent-lite - 1.5.0-SNAPSHOT + 1.5.0 org.onap.ccsdk.sli.plugins diff --git a/properties-node/provider/pom.xml b/properties-node/provider/pom.xml index 059870974..a2a27eb5b 100755 --- a/properties-node/provider/pom.xml +++ b/properties-node/provider/pom.xml @@ -5,7 +5,7 @@ org.onap.ccsdk.parent binding-parent - 1.5.0-SNAPSHOT + 1.5.0 org.onap.ccsdk.sli.plugins @@ -15,6 +15,7 @@ ccsdk-sli-plugins :: properties-node :: ${project.artifactId} + 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 cd7f0351c..bba917c94 100644 --- a/restapi-call-node/features/ccsdk-restapi-call-node/pom.xml +++ b/restapi-call-node/features/ccsdk-restapi-call-node/pom.xml @@ -5,7 +5,7 @@ org.onap.ccsdk.parent single-feature-parent - 1.5.0-SNAPSHOT + 1.5.0 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 26c986a3b..a98d96737 100644 --- a/restapi-call-node/features/features-restapi-call-node/pom.xml +++ b/restapi-call-node/features/features-restapi-call-node/pom.xml @@ -5,7 +5,7 @@ org.onap.ccsdk.parent feature-repo-parent - 1.5.0-SNAPSHOT + 1.5.0 diff --git a/restapi-call-node/features/pom.xml b/restapi-call-node/features/pom.xml index 6736bd1d2..9df843837 100755 --- a/restapi-call-node/features/pom.xml +++ b/restapi-call-node/features/pom.xml @@ -5,7 +5,7 @@ org.onap.ccsdk.parent odlparent-lite - 1.5.0-SNAPSHOT + 1.5.0 org.onap.ccsdk.sli.plugins diff --git a/restapi-call-node/installer/pom.xml b/restapi-call-node/installer/pom.xml index 06e77b411..1d9594ffb 100755 --- a/restapi-call-node/installer/pom.xml +++ b/restapi-call-node/installer/pom.xml @@ -5,7 +5,7 @@ org.onap.ccsdk.parent odlparent-lite - 1.5.0-SNAPSHOT + 1.5.0 org.onap.ccsdk.sli.plugins diff --git a/restapi-call-node/pom.xml b/restapi-call-node/pom.xml index 26a237f7b..5997af7a2 100755 --- a/restapi-call-node/pom.xml +++ b/restapi-call-node/pom.xml @@ -5,7 +5,7 @@ org.onap.ccsdk.parent odlparent-lite - 1.5.0-SNAPSHOT + 1.5.0 org.onap.ccsdk.sli.plugins diff --git a/restapi-call-node/provider/pom.xml b/restapi-call-node/provider/pom.xml index 76e7bd238..bda6b00e9 100755 --- a/restapi-call-node/provider/pom.xml +++ b/restapi-call-node/provider/pom.xml @@ -5,7 +5,7 @@ org.onap.ccsdk.parent binding-parent - 1.5.0-SNAPSHOT + 1.5.0 org.onap.ccsdk.sli.plugins diff --git a/restconf-client/features/ccsdk-restconf-client/pom.xml b/restconf-client/features/ccsdk-restconf-client/pom.xml index 276d6e8fb..831b59760 100644 --- a/restconf-client/features/ccsdk-restconf-client/pom.xml +++ b/restconf-client/features/ccsdk-restconf-client/pom.xml @@ -5,7 +5,7 @@ org.onap.ccsdk.parent single-feature-parent - 1.5.0-SNAPSHOT + 1.5.0 diff --git a/restconf-client/features/features-restconf-client/pom.xml b/restconf-client/features/features-restconf-client/pom.xml index d4c78ca35..6f241b633 100644 --- a/restconf-client/features/features-restconf-client/pom.xml +++ b/restconf-client/features/features-restconf-client/pom.xml @@ -5,7 +5,7 @@ org.onap.ccsdk.parent feature-repo-parent - 1.5.0-SNAPSHOT + 1.5.0 diff --git a/restconf-client/features/pom.xml b/restconf-client/features/pom.xml index a5d75807e..1888dd77c 100755 --- a/restconf-client/features/pom.xml +++ b/restconf-client/features/pom.xml @@ -5,7 +5,7 @@ org.onap.ccsdk.parent odlparent-lite - 1.5.0-SNAPSHOT + 1.5.0 org.onap.ccsdk.sli.plugins diff --git a/restconf-client/installer/pom.xml b/restconf-client/installer/pom.xml index 6fb08e311..26775a835 100755 --- a/restconf-client/installer/pom.xml +++ b/restconf-client/installer/pom.xml @@ -5,7 +5,7 @@ org.onap.ccsdk.parent odlparent-lite - 1.5.0-SNAPSHOT + 1.5.0 org.onap.ccsdk.sli.plugins diff --git a/restconf-client/pom.xml b/restconf-client/pom.xml index 9492f9eaf..e84258746 100755 --- a/restconf-client/pom.xml +++ b/restconf-client/pom.xml @@ -5,7 +5,7 @@ org.onap.ccsdk.parent odlparent-lite - 1.5.0-SNAPSHOT + 1.5.0 org.onap.ccsdk.sli.plugins diff --git a/restconf-client/provider/pom.xml b/restconf-client/provider/pom.xml index ec9e151e8..487bdf9b5 100755 --- a/restconf-client/provider/pom.xml +++ b/restconf-client/provider/pom.xml @@ -1,12 +1,11 @@ - + 4.0.0 org.onap.ccsdk.parent binding-parent - 1.5.0-SNAPSHOT + 1.5.0 org.onap.ccsdk.sli.plugins 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 604c4c83d..d16c6ff32 100644 --- a/sshapi-call-node/features/ccsdk-sshapi-call-node/pom.xml +++ b/sshapi-call-node/features/ccsdk-sshapi-call-node/pom.xml @@ -5,7 +5,7 @@ org.onap.ccsdk.parent single-feature-parent - 1.5.0-SNAPSHOT + 1.5.0 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 32d50d7e1..54bc88dc4 100644 --- a/sshapi-call-node/features/features-sshapi-call-node/pom.xml +++ b/sshapi-call-node/features/features-sshapi-call-node/pom.xml @@ -5,7 +5,7 @@ org.onap.ccsdk.parent feature-repo-parent - 1.5.0-SNAPSHOT + 1.5.0 diff --git a/sshapi-call-node/features/pom.xml b/sshapi-call-node/features/pom.xml index 08c53e084..af7901236 100755 --- a/sshapi-call-node/features/pom.xml +++ b/sshapi-call-node/features/pom.xml @@ -5,7 +5,7 @@ org.onap.ccsdk.parent odlparent-lite - 1.5.0-SNAPSHOT + 1.5.0 org.onap.ccsdk.sli.plugins diff --git a/sshapi-call-node/installer/pom.xml b/sshapi-call-node/installer/pom.xml index 94b28f215..613886aee 100755 --- a/sshapi-call-node/installer/pom.xml +++ b/sshapi-call-node/installer/pom.xml @@ -5,7 +5,7 @@ org.onap.ccsdk.parent odlparent-lite - 1.5.0-SNAPSHOT + 1.5.0 org.onap.ccsdk.sli.plugins diff --git a/sshapi-call-node/pom.xml b/sshapi-call-node/pom.xml index 91fe43507..14d374a0c 100755 --- a/sshapi-call-node/pom.xml +++ b/sshapi-call-node/pom.xml @@ -5,7 +5,7 @@ org.onap.ccsdk.parent odlparent-lite - 1.5.0-SNAPSHOT + 1.5.0 org.onap.ccsdk.sli.plugins diff --git a/sshapi-call-node/provider/pom.xml b/sshapi-call-node/provider/pom.xml index d616db767..641e9af1e 100755 --- a/sshapi-call-node/provider/pom.xml +++ b/sshapi-call-node/provider/pom.xml @@ -5,7 +5,7 @@ org.onap.ccsdk.parent binding-parent - 1.5.0-SNAPSHOT + 1.5.0 org.onap.ccsdk.sli.plugins @@ -14,7 +14,8 @@ bundle ccsdk-sli-plugins :: sshapi-call-node :: ${project.artifactId} - + + diff --git a/template-node/features/ccsdk-template-node/pom.xml b/template-node/features/ccsdk-template-node/pom.xml index 8bf76afa9..a8cb85aaf 100644 --- a/template-node/features/ccsdk-template-node/pom.xml +++ b/template-node/features/ccsdk-template-node/pom.xml @@ -5,7 +5,7 @@ org.onap.ccsdk.parent single-feature-parent - 1.5.0-SNAPSHOT + 1.5.0 diff --git a/template-node/features/features-template-node/pom.xml b/template-node/features/features-template-node/pom.xml index 6934d2f0b..65837d5e1 100644 --- a/template-node/features/features-template-node/pom.xml +++ b/template-node/features/features-template-node/pom.xml @@ -5,7 +5,7 @@ org.onap.ccsdk.parent feature-repo-parent - 1.5.0-SNAPSHOT + 1.5.0 diff --git a/template-node/features/pom.xml b/template-node/features/pom.xml index 9dfebb7e6..77409f694 100644 --- a/template-node/features/pom.xml +++ b/template-node/features/pom.xml @@ -5,7 +5,7 @@ org.onap.ccsdk.parent odlparent-lite - 1.5.0-SNAPSHOT + 1.5.0 org.onap.ccsdk.sli.plugins diff --git a/template-node/installer/pom.xml b/template-node/installer/pom.xml index 92f3bdeaf..53a1ff55d 100644 --- a/template-node/installer/pom.xml +++ b/template-node/installer/pom.xml @@ -5,7 +5,7 @@ org.onap.ccsdk.parent odlparent-lite - 1.5.0-SNAPSHOT + 1.5.0 org.onap.ccsdk.sli.plugins diff --git a/template-node/pom.xml b/template-node/pom.xml index efcb5efd0..c007e3ce7 100644 --- a/template-node/pom.xml +++ b/template-node/pom.xml @@ -5,7 +5,7 @@ org.onap.ccsdk.parent odlparent-lite - 1.5.0-SNAPSHOT + 1.5.0 org.onap.ccsdk.sli.plugins diff --git a/template-node/provider/pom.xml b/template-node/provider/pom.xml index 65df5c6dc..3d470c0af 100644 --- a/template-node/provider/pom.xml +++ b/template-node/provider/pom.xml @@ -5,7 +5,7 @@ org.onap.ccsdk.parent binding-parent - 1.5.0-SNAPSHOT + 1.5.0 org.onap.ccsdk.sli.plugins -- cgit 1.2.3-korg From bf59c3a6e1ae0ce2dd1703688f9f4e712d75e193 Mon Sep 17 00:00:00 2001 From: "Timoney, Dan (dt5972)" Date: Tue, 19 Nov 2019 13:23:49 -0500 Subject: Fix versions of sli core dependencies Fix to override ccsdk sli core version from parent pom with current version Change-Id: I0d4dfad609fb7c838d3750ef36b8656ad102dda6 Issue-ID: CCSDK-1944 Signed-off-by: Timoney, Dan (dt5972) --- grToolkit/provider/pom.xml | 4 ++++ properties-node/provider/pom.xml | 3 +++ restapi-call-node/provider/pom.xml | 4 ++++ restconf-client/provider/pom.xml | 4 ++++ sshapi-call-node/features/ccsdk-sshapi-call-node/pom.xml | 4 ++++ sshapi-call-node/provider/pom.xml | 3 +++ template-node/provider/pom.xml | 4 ++++ 7 files changed, 26 insertions(+) (limited to 'restconf-client/provider') diff --git a/grToolkit/provider/pom.xml b/grToolkit/provider/pom.xml index a18054be8..8f5f17da0 100755 --- a/grToolkit/provider/pom.xml +++ b/grToolkit/provider/pom.xml @@ -13,6 +13,10 @@ 0.7.0-SNAPSHOT bundle + + ${project.version} + + diff --git a/properties-node/provider/pom.xml b/properties-node/provider/pom.xml index a2a27eb5b..1a2afbcb3 100755 --- a/properties-node/provider/pom.xml +++ b/properties-node/provider/pom.xml @@ -15,6 +15,9 @@ ccsdk-sli-plugins :: properties-node :: ${project.artifactId} + + ${project.version} + diff --git a/restapi-call-node/provider/pom.xml b/restapi-call-node/provider/pom.xml index bda6b00e9..6c956c6a1 100755 --- a/restapi-call-node/provider/pom.xml +++ b/restapi-call-node/provider/pom.xml @@ -15,6 +15,10 @@ ccsdk-sli-plugins :: restapi-call-node :: ${project.artifactId} + + ${project.version} + + diff --git a/restconf-client/provider/pom.xml b/restconf-client/provider/pom.xml index 487bdf9b5..0321f07b0 100755 --- a/restconf-client/provider/pom.xml +++ b/restconf-client/provider/pom.xml @@ -15,6 +15,10 @@ ccsdk-sli-plugins :: restconf-client :: ${project.artifactId} + + ${project.version} + + 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 d16c6ff32..6dfe13997 100644 --- a/sshapi-call-node/features/ccsdk-sshapi-call-node/pom.xml +++ b/sshapi-call-node/features/ccsdk-sshapi-call-node/pom.xml @@ -19,6 +19,10 @@