Fix compile issue after facade introduction
[cps.git] / docs / admin-guide.rst
index 135040f..1c4d745 100644 (file)
@@ -1,6 +1,6 @@
 .. This work is licensed under a Creative Commons Attribution 4.0 International License.
 .. http://creativecommons.org/licenses/by/4.0
 .. This work is licensed under a Creative Commons Attribution 4.0 International License.
 .. http://creativecommons.org/licenses/by/4.0
-.. Copyright (C) 2021 Nordix Foundation
+.. Copyright (C) 2021-2022 Nordix Foundation
 
 .. DO NOT CHANGE THIS LABEL FOR RELEASE NOTES - EVEN THOUGH IT GIVES A WARNING
 .. _adminGuide:
 
 .. DO NOT CHANGE THIS LABEL FOR RELEASE NOTES - EVEN THOUGH IT GIVES A WARNING
 .. _adminGuide:
@@ -30,20 +30,19 @@ Logging Configuration
 CPS Log pattern
 ---------------
 
 CPS Log pattern
 ---------------
 
-.. code-block:: java
+.. code-block::
 
    <pattern>
 
    <pattern>
-          {
-            "timestamp" : "%timestamp", // 2022-01-28 18:39:17.768
-            "severity": "%level",   // DEBUG
-            "service": "${springAppName}",  // cps-application
-            "trace": "${TraceId}", // e17da1571e518c59
-            "span": "${SpanId}", // e17da1571e518c59
-            "pid": "${PID}", //11128
-            "thread": "%thread", //tp1901272535-29
-            "class": "%logger{40}", .// o.onap.cps.aop.CpsLoggingAspectService
-            "rest": "%message" // Execution time ...
-          }
+       {
+         "logTimeStamp" : "%timestamp", // 2022-01-28 18:39:17.768
+         "logLevel": "%level",   // DEBUG
+         "principalId": "%userId",    // cpsuser
+         "serviceName": "${springAppName}",  // cps-application
+         "message":"%message",  // Execution time ...
+         "processId": "${PID}", //11128
+         "threadName": "%thread", //tp1901272535-29
+         "class": "%logger{40}", .// o.onap.cps.aop.CpsLoggingAspectService
+       }
    </pattern>
 
 Change logging level
    </pattern>
 
 Change logging level
@@ -51,9 +50,9 @@ Change logging level
 
 - Curl command 1. Check current log level of "logging.level.org.onap.cps" if it is set to it's default value (INFO)
 
 
 - Curl command 1. Check current log level of "logging.level.org.onap.cps" if it is set to it's default value (INFO)
 
-.. code-block:: java
+.. code-block:: bash
 
 
-    curl --location --request GET 'http://{cps-service-name:cps-management-port}/manage/loggers/org.onap.cps' \
+    curl --location --request GET 'http://{cps-service-name:cps-port}/actuator/loggers/org.onap.cps' \
     --header 'Content-Type: application/json; charset=utf-8'
 
     Response body : HTTP Status 200
     --header 'Content-Type: application/json; charset=utf-8'
 
     Response body : HTTP Status 200
@@ -63,14 +62,15 @@ Change logging level
         "effectiveLevel": "INFO"
     }
 
         "effectiveLevel": "INFO"
     }
 
+
 - Curl command 2. Change logging level of "logging.level.org.onap.cps" to "DEBUG"
 
 .. note::
    Below-mentioned endpoint  will change the log level at runtime. After executing the curl command "effectiveLevel" will set and applied immediately without restarting CPS service.
 
 - Curl command 2. Change logging level of "logging.level.org.onap.cps" to "DEBUG"
 
 .. note::
    Below-mentioned endpoint  will change the log level at runtime. After executing the curl command "effectiveLevel" will set and applied immediately without restarting CPS service.
 
-.. code-block:: java
+.. code-block:: bash
 
 
-    curl --location --request POST 'http://{cps-service-name:cps-management-port}/manage/loggers/org.onap.cps' \
+    curl --location --request POST 'http://{cps-service-name:cps-port}/actuator/loggers/org.onap.cps' \
     --header 'Content-Type: application/json; charset=utf-8' \
     --data-raw '{
                     "configuredLevel": "DEBUG"
     --header 'Content-Type: application/json; charset=utf-8' \
     --data-raw '{
                     "configuredLevel": "DEBUG"
@@ -80,9 +80,9 @@ Change logging level
 
 - Curl command 3. Verify if log level of "logging.level.org.onap.cps" is changed from 'INFO' to 'DEBUG'
 
 
 - Curl command 3. Verify if log level of "logging.level.org.onap.cps" is changed from 'INFO' to 'DEBUG'
 
-.. code-block:: java
+.. code-block:: bash
 
 
-    curl --location --request GET 'http://{cps-service-name:cps-management-port}/manage/loggers/org.onap.cps' \
+    curl --location --request GET 'http://{cps-service-name:cps-port}/actuator/loggers/org.onap.cps' \
     --header 'Content-Type: application/json; charset=utf-8'
 
     Response body : HTTP Status 200
     --header 'Content-Type: application/json; charset=utf-8'
 
     Response body : HTTP Status 200
@@ -92,11 +92,12 @@ Change logging level
     "effectiveLevel": "DEBUG"
     }
 
     "effectiveLevel": "DEBUG"
     }
 
+
 Location of log files
 ---------------------
 By default, Spring Boot will only log to the console and will not write log files.
 
 Location of log files
 ---------------------
 By default, Spring Boot will only log to the console and will not write log files.
 
-.. image:: images/cps-service-console.JPG
+.. image:: _static/cps-service-console.JPG
   :width: 700
   :alt: CPS service console
 
   :width: 700
   :alt: CPS service console
 
@@ -108,7 +109,7 @@ Measure Execution Time of CPS Service
 
 Execute CPS service that you want to calculate total elapsed time and log as shown below
 
 
 Execute CPS service that you want to calculate total elapsed time and log as shown below
 
-.. code-block:: xml
+.. code-block::
 
    2022-01-28 18:39:17.679 DEBUG [cps-application,e17da1571e518c59,e17da1571e518c59] 11128 --- [tp1901272535-29] o.onap.cps.aop.CpsLoggingAspectService   : Execution time of : DataspaceRepository.getByName() with argument[s] = [test42] having result = org.onap.cps.spi.entities.DataspaceEntity@68ded236 :: 205 ms
 
 
    2022-01-28 18:39:17.679 DEBUG [cps-application,e17da1571e518c59,e17da1571e518c59] 11128 --- [tp1901272535-29] o.onap.cps.aop.CpsLoggingAspectService   : Execution time of : DataspaceRepository.getByName() with argument[s] = [test42] having result = org.onap.cps.spi.entities.DataspaceEntity@68ded236 :: 205 ms
 
@@ -135,6 +136,7 @@ Logging & Diagnostics
 
 General Guidelines
 ------------------
 
 General Guidelines
 ------------------
+
 CPS-Core logs are sent to `STDOUT` in order to leverage the Kubernetes logging architecture.
 
 These logs are available using the following command:
 CPS-Core logs are sent to `STDOUT` in order to leverage the Kubernetes logging architecture.
 
 These logs are available using the following command:
@@ -152,15 +154,13 @@ loggers log level
 
 Logger configuration is provided as a chart resource :
 
 
 Logger configuration is provided as a chart resource :
 
-    +--------------------------------+---------------------------------------------------------------------------------------------------------------------------------+
-    | cps-component-service-name     | logback.xml location                                                                                                            |
-    +================================+=================================================================================================================================+
-    | cps-core                       | `logback.xml <https://github.com/onap/oom/blob/master/kubernetes/cps/components/cps-core/resources/config/logback.xml>`_        |
-    +--------------------------------+---------------------------------------------------------------------------------------------------------------------------------+
-    | cps-temporal                   | `logback.xml <https://github.com/onap/oom/blob/master/kubernetes/cps/components/cps-temporal/resources/config/logback.xml>`_    |
-    +--------------------------------+---------------------------------------------------------------------------------------------------------------------------------+
-    | ncmp-dmi-plugin                | Not yet applicable to DMI-Plugin                                                                                                |
-    +--------------------------------+---------------------------------------------------------------------------------------------------------------------------------+
+    +--------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------+
+    | cps-component-service-name     | logback.xml location                                                                                                                          |
+    +================================+===============================================================================================================================================+
+    | cps-core                       | `logback-spring.xml <https://github.com/onap/oom/blob/master/kubernetes/cps/components/cps-core/resources/config/logback-spring.xml>`__       |
+    +--------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------+
+    | ncmp-dmi-plugin                | Not yet applicable to DMI-Plugin                                                                                                              |
+    +--------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------+
 
 .. Below Label is used by documentation for other CPS components to link here, do not remove even if it gives a warning
 .. _cps_common_monitoring:
 
 .. Below Label is used by documentation for other CPS components to link here, do not remove even if it gives a warning
 .. _cps_common_monitoring:
@@ -171,7 +171,7 @@ Once CPS-Core is deployed, information related to the running instance of the ap
 
 .. code::
 
 
 .. code::
 
-    http://<cps-component-service-name>:8081/manage/info/
+    http://<cps-component-service-name>:8080/actuator/info/
 
 Health
 ------
 
 Health
 ------
@@ -181,7 +181,7 @@ This also includes both the liveliness state and readiness state.
 
 .. code::
 
 
 .. code::
 
-    http://<cps-component-service-name>:8081/manage/health/
+    http://<cps-component-service-name>:8080/actuator/health/
 
 Metrics
 -------
 
 Metrics
 -------
@@ -190,4 +190,32 @@ Prometheus Metrics can be checked at the following endpoint
 
 .. code::
 
 
 .. code::
 
-    http://<cps-component-service-name>:8081/manage/prometheus
+    http://<cps-component-service-name>:8080/actuator/prometheus
+
+Hazelcast
+---------
+
+Hazelcast cluster state and health check can be seen using the below endpoints
+
+.. code::
+
+    http://<cps-component-service-name>:<member-port>/hazelcast/health
+    http://<cps-component-service-name>:<member-port>/hazelcast/rest/management/cluster/state
+
+See also : :ref:`cps_common_distributed_datastructures`
+
+Naming Validation
+-----------------
+
+As part of the Kohn 3.1.0 release, CPS has added validation to the names of the following components:
+
+    - Dataspace names
+    - Schema Set names
+    - Anchor names
+    - Cm-Handle identifiers
+
+The following characters along with spaces are no longer valid for naming of these components.
+
+.. code::
+
+    !"#$%&'()*+,./\:;<=>?@[]^`{|}~