Merge "Fixes for CM-handle de-registration test script"
authorToine Siebelink <toine.siebelink@est.tech>
Mon, 27 Mar 2023 08:17:34 +0000 (08:17 +0000)
committerGerrit Code Review <gerrit@onap.org>
Mon, 27 Mar 2023 08:17:34 +0000 (08:17 +0000)
26 files changed:
checkstyle/pom.xml
cps-application/pom.xml
cps-bom/pom.xml
cps-dependencies/pom.xml
cps-events/pom.xml
cps-ncmp-events/pom.xml
cps-ncmp-rest-stub/pom.xml
cps-ncmp-rest/pom.xml
cps-ncmp-service/pom.xml
cps-ncmp-service/src/main/java/org/onap/cps/ncmp/api/NetworkCmProxyCmHandleQueryService.java
cps-parent/pom.xml
cps-path-parser/pom.xml
cps-rest/pom.xml
cps-ri/pom.xml
cps-service/pom.xml
docs/design.rst
docs/modeling.rst
docs/ncmp-inventory-querying.rst [new file with mode: 0644]
docs/release-notes.rst
integration-test/pom.xml
jacoco-report/pom.xml
pom.xml
releases/3.2.6-container.yaml [new file with mode: 0644]
releases/3.2.6.yaml [new file with mode: 0644]
spotbugs/pom.xml
version.properties

index 25097d6..71ff88c 100644 (file)
@@ -26,7 +26,7 @@
     <modelVersion>4.0.0</modelVersion>
     <groupId>org.onap.cps</groupId>
     <artifactId>checkstyle</artifactId>
-    <version>3.2.6-SNAPSHOT</version>
+    <version>3.2.7-SNAPSHOT</version>
 
     <profiles>
         <profile>
index a17e6bd..cf5de3c 100755 (executable)
@@ -28,7 +28,7 @@
     <parent>
         <groupId>org.onap.cps</groupId>
         <artifactId>cps-parent</artifactId>
-        <version>3.2.6-SNAPSHOT</version>
+        <version>3.2.7-SNAPSHOT</version>
         <relativePath>../cps-parent/pom.xml</relativePath>
     </parent>
 
index fe2106f..88c78fa 100644 (file)
@@ -25,7 +25,7 @@
     <modelVersion>4.0.0</modelVersion>
     <groupId>org.onap.cps</groupId>
     <artifactId>cps-bom</artifactId>
-    <version>3.2.6-SNAPSHOT</version>
+    <version>3.2.7-SNAPSHOT</version>
     <packaging>pom</packaging>
 
     <description>This artifact contains dependencyManagement declarations of all published CPS components.</description>
index 9b88672..506ed9f 100755 (executable)
@@ -27,7 +27,7 @@
     <modelVersion>4.0.0</modelVersion>
     <groupId>org.onap.cps</groupId>
     <artifactId>cps-dependencies</artifactId>
-    <version>3.2.6-SNAPSHOT</version>
+    <version>3.2.7-SNAPSHOT</version>
     <packaging>pom</packaging>
 
     <name>${project.groupId}:${project.artifactId}</name>
index 545dc14..8fa2380 100644 (file)
@@ -24,7 +24,7 @@
     <parent>
         <groupId>org.onap.cps</groupId>
         <artifactId>cps-parent</artifactId>
-        <version>3.2.6-SNAPSHOT</version>
+        <version>3.2.7-SNAPSHOT</version>
         <relativePath>../cps-parent/pom.xml</relativePath>
     </parent>
 
index d5ba122..890fa0e 100644 (file)
@@ -23,7 +23,7 @@
     <parent>
         <groupId>org.onap.cps</groupId>
         <artifactId>cps-parent</artifactId>
-        <version>3.2.6-SNAPSHOT</version>
+        <version>3.2.7-SNAPSHOT</version>
         <relativePath>../cps-parent/pom.xml</relativePath>
     </parent>
 
index 6a26816..c6eb0d7 100644 (file)
@@ -26,7 +26,7 @@
     <parent>
         <groupId>org.onap.cps</groupId>
         <artifactId>cps-parent</artifactId>
-        <version>3.2.6-SNAPSHOT</version>
+        <version>3.2.7-SNAPSHOT</version>
         <relativePath>../cps-parent/pom.xml</relativePath>
     </parent>
 
index 3d104a3..bbf6b96 100644 (file)
@@ -27,7 +27,7 @@
     <parent>
         <groupId>org.onap.cps</groupId>
         <artifactId>cps-parent</artifactId>
-        <version>3.2.6-SNAPSHOT</version>
+        <version>3.2.7-SNAPSHOT</version>
         <relativePath>../cps-parent/pom.xml</relativePath>
     </parent>
 
index 57cd1c6..1d7ca38 100644 (file)
@@ -27,7 +27,7 @@
     <parent>
         <groupId>org.onap.cps</groupId>
         <artifactId>cps-parent</artifactId>
-        <version>3.2.6-SNAPSHOT</version>
+        <version>3.2.7-SNAPSHOT</version>
         <relativePath>../cps-parent/pom.xml</relativePath>
     </parent>
 
index 91e98e8..f29fd68 100644 (file)
@@ -26,26 +26,39 @@ import org.onap.cps.ncmp.api.models.NcmpServiceCmHandle;
 
 public interface NetworkCmProxyCmHandleQueryService {
     /**
-     * Query and return cm handles that match the given query parameters.
+     * Query and return cm handle ids that match the given query parameters.
+     * Supported query types:
+     *      public properties
+     *      modules
+     *      cps-path
      *
      * @param cmHandleQueryServiceParameters the cm handle query parameters
-     * @return collection of cm handles
+     * @return collection of cm handle ids
      */
-    Collection<NcmpServiceCmHandle> queryCmHandles(CmHandleQueryServiceParameters cmHandleQueryServiceParameters);
+    Collection<String> queryCmHandleIds(CmHandleQueryServiceParameters cmHandleQueryServiceParameters);
 
     /**
-     * Query and return cm handles that match the given query parameters.
+     * Query and return cm handle ids that match the given query parameters.
+     * Supported query types:
+     *      public properties
+     *      private (additional) properties
+     *      dmi-names
+     * The inventory interface also allows conditions on private (additional) properties and dmi names
      *
      * @param cmHandleQueryServiceParameters the cm handle query parameters
      * @return collection of cm handle ids
      */
-    Collection<String> queryCmHandleIds(CmHandleQueryServiceParameters cmHandleQueryServiceParameters);
+    Collection<String> queryCmHandleIdsForInventory(CmHandleQueryServiceParameters cmHandleQueryServiceParameters);
 
     /**
-     * Query and return cm handles that match the given query parameters.
+     * Query and return cm handle objects that match the given query parameters.
+     * Supported query types:
+     *      public properties
+     *      modules
+     *      cps-path
      *
      * @param cmHandleQueryServiceParameters the cm handle query parameters
-     * @return collection of cm handle ids
+     * @return collection of cm handles
      */
-    Collection<String> queryCmHandleIdsForInventory(CmHandleQueryServiceParameters cmHandleQueryServiceParameters);
+    Collection<NcmpServiceCmHandle> queryCmHandles(CmHandleQueryServiceParameters cmHandleQueryServiceParameters);
 }
index e333b26..193a04e 100755 (executable)
@@ -32,7 +32,7 @@
 
     <groupId>org.onap.cps</groupId>
     <artifactId>cps-parent</artifactId>
-    <version>3.2.6-SNAPSHOT</version>
+    <version>3.2.7-SNAPSHOT</version>
     <packaging>pom</packaging>
 
     <properties>
index 29a6066..0784ccb 100644 (file)
@@ -23,7 +23,7 @@
     <parent>
         <groupId>org.onap.cps</groupId>
         <artifactId>cps-parent</artifactId>
-        <version>3.2.6-SNAPSHOT</version>
+        <version>3.2.7-SNAPSHOT</version>
         <relativePath>../cps-parent/pom.xml</relativePath>
     </parent>
 
index fd55d6d..c27e515 100755 (executable)
@@ -28,7 +28,7 @@
     <parent>
         <groupId>org.onap.cps</groupId>
         <artifactId>cps-parent</artifactId>
-        <version>3.2.6-SNAPSHOT</version>
+        <version>3.2.7-SNAPSHOT</version>
         <relativePath>../cps-parent/pom.xml</relativePath>
     </parent>
 
index f17bf18..ba743f2 100644 (file)
@@ -26,7 +26,7 @@
     <parent>\r
         <groupId>org.onap.cps</groupId>\r
         <artifactId>cps-parent</artifactId>\r
-        <version>3.2.6-SNAPSHOT</version>\r
+        <version>3.2.7-SNAPSHOT</version>\r
         <relativePath>../cps-parent/pom.xml</relativePath>\r
     </parent>\r
 \r
index a4f6830..86fef36 100644 (file)
@@ -29,7 +29,7 @@
   <parent>
     <groupId>org.onap.cps</groupId>
     <artifactId>cps-parent</artifactId>
-    <version>3.2.6-SNAPSHOT</version>
+    <version>3.2.7-SNAPSHOT</version>
     <relativePath>../cps-parent/pom.xml</relativePath>
   </parent>
 
index 7381759..c6413c2 100755 (executable)
@@ -77,3 +77,9 @@ NCMP CM Handle Querying
 
 The CM Handle searches endpoints can be used to query for CM Handles or CM Handle IDs.
 This endpoint is described in detail in :doc:`ncmp-cmhandle-querying`.
+
+NCMP Inventory CM Handle Querying
+=================================
+
+The CM Handle searches ncmp inventory endpoints can be used to query for CM Handles or CM Handle IDs.
+This endpoint is described in detail in :doc:`ncmp-inventory-querying`.
index aa5bbc9..95fa9dd 100644 (file)
@@ -128,4 +128,5 @@ Querying CM Handles
    :maxdepth: 1
 
    ncmp-cmhandle-querying.rst
+   ncmp-inventory-querying.rst
    cps-scheduled-processes.rst
diff --git a/docs/ncmp-inventory-querying.rst b/docs/ncmp-inventory-querying.rst
new file mode 100644 (file)
index 0000000..349b984
--- /dev/null
@@ -0,0 +1,158 @@
+.. This work is licensed under a Creative Commons Attribution 4.0 International License.
+.. http://creativecommons.org/licenses/by/4.0
+.. Copyright (C) 2023 Nordix Foundation
+
+.. DO NOT CHANGE THIS LABEL FOR RELEASE NOTES - EVEN THOUGH IT GIVES A WARNING
+.. _inventoryquerying:
+
+
+Inventory Query Endpoints
+#########################
+
+.. toctree::
+   :maxdepth: 1
+
+Introduction
+============
+
+For querying the NCMP Inventory we have one Post endpoint:
+
+- ncmpInventory/v1/ch/searches Returns all CM Handles which match the query properties provided. Gives a JSON payload of the **details** of all matching CM Handles.
+
+If no matching CM Handles are found an empty array is returned.
+
+Request Body
+============
+
+Currently this endpoint allows three criteria to be query on:
+
+- *hasAllProperties* returns CM Handles which have the public properties provided.
+
+- *hasAllAdditionalProperties* returns CM Handles which have the private or additional properties (key and value) provided.
+
+- *cmHandleWithDmiPlugin* returns CM Handles which match the CPS Dmi Plugin provided.
+
+Not all request body combinations have been validated and as such request bodies which do not conform to the structure as documented here can produce results in which all CM Handles are returned.
+
+Casing conventions: 'camelCasing' and 'kebab-casing'
+----------------------------------------------------
+
+.. note::
+    By convention REST JSON return bodies use 'camelCasing'. By convention field names in yang modelled data use 'kebab-casing'. Therefore some inconsistencies can be seen in the JSON use in CPS REST interfaces. For CM Handle related endpoints we return data in 'camelCasing'. But for *cmHandleWithCpsPath*, the query is accessing yang modelled field names and as such needs to use 'kebab-casing'. Therefore the dmi-registry field names should be referenced when using the *cmHandleWithCpsPath* condition: :doc:`modeling`
+
+Request Body example using all available query criteria. This query would return all CM Handles which have the specified public properties of Color yellow, Shape circle, Size small, have the specified private/additional properties of Price 5, Year 2022 and Quantity 12 and have related to DMI plugin dmiPlugin1:
+
+.. code-block:: json
+
+    {
+      "cmHandleQueryParameters": [
+        {
+          "conditionName": "hasAllProperties",
+          "conditionParameters": [
+            {
+              "Color": "yellow"
+            },
+            {
+              "Shape": "circle"
+            },
+            {
+              "Size": "small"
+            }
+          ]
+        },
+        {
+          "conditionName": "hasAllAdditionalProperties",
+          "conditionParameters": [
+            {
+              "Price": "5"
+            },
+            {
+              "Year": "2022"
+            },
+            {
+              "Quantity": "12"
+            }
+          ]
+        },
+        {
+          "conditionName": "cmHandleWithDmiPlugin",
+          "conditionParameters": [
+            {
+              "dmiPluginName": "dmiPlugin1"
+            }
+          ]
+        }
+      ]
+    }
+
+Has all Properties
+------------------
+
+With the *hasAllProperties* condition, we can provide a list of property keys and values. The CM Handles returned will have these public properties. The parameter names must be as below with key and value for each property. The returned CM Handle must have all supplied properties. For the example request, a CM Handle will be returned if it has properties where there is a key of "Color" with value "yellow", a key of "Shape" with value "circle" and a key of "Size" with value "small".
+
+.. code-block:: json
+
+    {
+      "cmHandleQueryParameters": [
+        {
+          "conditionName": "hasAllProperties",
+          "conditionParameters": [
+            {
+              "Color": "yellow"
+            },
+            {
+              "Shape": "circle"
+            },
+            {
+              "Size": "small"
+            }
+          ]
+        }
+      ]
+    }
+
+Has all additional Properties
+-----------------------------
+
+With the *hasAllAdditionalProperties* condition, we can provide a list of property keys and values. The CM Handles returned will have these additional properties. The parameter names must be as below with key and value for each property. The returned CM Handle must have all supplied properties. For the example request, a CM Handle will be returned if it has properties where there is a key of "Price" with value "5", a key of "Year" with value "2022" and a key of "Quantity" with value "12".
+
+.. code-block:: json
+
+    {
+      "cmHandleQueryParameters": [
+        {
+          "conditionName": "hasAllAdditionalProperties",
+          "conditionParameters": [
+            {
+              "Price": "5"
+            },
+            {
+              "Year": "2022"
+            },
+            {
+              "Quantity": "12"
+            }
+          ]
+        }
+      ]
+    }
+
+Has all DMI Plugins
+-------------------
+
+With the *cmHandleWithDmiPlugin* condition, we can provide a dmiPluginName. The CM Handles returned will have this DMI Plugin Name value in at least one of the following related leaves: dmi-service-name, dmi-data-service-name and dmi-model-service-name. For the example request a CM Handle will be returned if it has my-dmi-plugin as a value in at least one of the aforementioned leaves.
+
+.. code-block:: json
+
+    {
+      "cmHandleQueryParameters": [
+        {
+          "conditionName": "cmHandleWithDmiPlugin",
+          "conditionParameters": [
+            {
+              "dmi-service-name": "my-dmi-plugin"
+            }
+          ]
+        }
+      ]
+    }
index 571300e..7158860 100755 (executable)
@@ -16,6 +16,35 @@ CPS Release Notes
 ..      * * *   LONDON   * * *
 ..      ======================
 
+Version: 3.2.7
+==============
+
+Release Data
+------------
+
++--------------------------------------+--------------------------------------------------------+
+| **CPS Project**                      |                                                        |
+|                                      |                                                        |
++--------------------------------------+--------------------------------------------------------+
+| **Docker images**                    | onap/cps-and-ncmp:3.2.7                                |
+|                                      |                                                        |
++--------------------------------------+--------------------------------------------------------+
+| **Release designation**              | 3.2.7 London                                           |
+|                                      |                                                        |
++--------------------------------------+--------------------------------------------------------+
+| **Release date**                     | Not been released yet                                  |
+|                                      |                                                        |
++--------------------------------------+--------------------------------------------------------+
+
+Bug Fixes
+---------
+3.2.7
+    - None
+
+Features
+--------
+    - None
+
 Version: 3.2.6
 ==============
 
@@ -32,19 +61,19 @@ Release Data
 | **Release designation**              | 3.2.6 London                                           |
 |                                      |                                                        |
 +--------------------------------------+--------------------------------------------------------+
-| **Release date**                     | 2023 March 10                                          |
+| **Release date**                     | 2023 March 22                                          |
 |                                      |                                                        |
 +--------------------------------------+--------------------------------------------------------+
 
 Bug Fixes
 ---------
 3.2.6
-    - `CPS-1396 <https://jira.onap.org/browse/CPS-1396>`_ Query data nodes across all anchors under one dataspace
     - `CPS-1526 <https://jira.onap.org/browse/CPS-1526>`_ Fix response message for PATCH operation
+    - `CPS-1563 <https://jira.onap.org/browse/CPS-1563>`_ Fix 500 response error on id-searches with empty parameters
 
 Features
 --------
-    - None
+    - `CPS-1396 <https://jira.onap.org/browse/CPS-1396>`_ Query data nodes across all anchors under one dataspace
 
 Version: 3.2.5
 ==============
index 42946da..1d37fc1 100644 (file)
@@ -23,7 +23,7 @@
     <parent>
         <groupId>org.onap.cps</groupId>
         <artifactId>cps-parent</artifactId>
-        <version>3.2.6-SNAPSHOT</version>
+        <version>3.2.7-SNAPSHOT</version>
         <relativePath>../cps-parent/pom.xml</relativePath>
     </parent>
 
index d2851b5..ddaf14b 100644 (file)
@@ -5,7 +5,7 @@
     <parent>
         <groupId>org.onap.cps</groupId>
         <artifactId>cps-parent</artifactId>
-        <version>3.2.6-SNAPSHOT</version>
+        <version>3.2.7-SNAPSHOT</version>
         <relativePath>../cps-parent/pom.xml</relativePath>
     </parent>
     <modelVersion>4.0.0</modelVersion>
diff --git a/pom.xml b/pom.xml
index 81c70d6..0997698 100644 (file)
--- a/pom.xml
+++ b/pom.xml
@@ -32,7 +32,7 @@
 \r
     <groupId>org.onap.cps</groupId>\r
     <artifactId>cps-aggregator</artifactId>\r
-    <version>3.2.6-SNAPSHOT</version>\r
+    <version>3.2.7-SNAPSHOT</version>\r
     <packaging>pom</packaging>\r
 \r
     <name>cps</name>\r
diff --git a/releases/3.2.6-container.yaml b/releases/3.2.6-container.yaml
new file mode 100644 (file)
index 0000000..e980ad0
--- /dev/null
@@ -0,0 +1,8 @@
+distribution_type: container
+container_release_tag: 3.2.6
+project: cps
+log_dir: cps-maven-docker-stage-master/893/
+ref: f5a3a2177ee328ac842883a89c75169c9a651f53
+containers:
+  - name: 'cps-and-ncmp'
+    version: '3.2.6-20230323T104142Z'
diff --git a/releases/3.2.6.yaml b/releases/3.2.6.yaml
new file mode 100644 (file)
index 0000000..c9f2120
--- /dev/null
@@ -0,0 +1,4 @@
+distribution_type: maven
+log_dir: cps-maven-stage-master/899/
+project: cps
+version: 3.2.6
\ No newline at end of file
index 4e3dee3..e2d5774 100644 (file)
@@ -25,7 +25,7 @@
     <modelVersion>4.0.0</modelVersion>
     <groupId>org.onap.cps</groupId>
     <artifactId>spotbugs</artifactId>
-    <version>3.2.6-SNAPSHOT</version>
+    <version>3.2.7-SNAPSHOT</version>
 
     <properties>
         <nexusproxy>https://nexus.onap.org</nexusproxy>
index 0dccb1c..169b253 100755 (executable)
@@ -22,7 +22,7 @@
 
 major=3
 minor=2
-patch=6
+patch=7
 
 base_version=${major}.${minor}.${patch}