Merge "Rework the backend to support PDP updates"
diff --git a/docs/architecture.rst b/docs/architecture.rst
index 79c8e06..b65eb1c 100644
--- a/docs/architecture.rst
+++ b/docs/architecture.rst
@@ -1,39 +1,41 @@
 .. This work is licensed under a Creative Commons Attribution 4.0 International License.
 .. http://creativecommons.org/licenses/by/4.0
-.. Copyright (c) 2017-2018 AT&T Intellectual Property.  All rights reserved.
+.. Copyright (c) 2017-2021 AT&T Intellectual Property.  All rights reserved.
 .. _architecture:
 
-Clamp in ONAP Architecture
---------------------------
+Policy/Clamp in ONAP Architecture
+---------------------------------
 
-CLAMP is a platform for designing and managing control loops. It is used to visualize
-a control loop, configure it with specific parameters for a particular network
+CLAMP platform has been integrated into the Policy framework project, starting as a POC during
+Honolulu release and as a official feature with Istanbul release. So CLAMP must be seen now
+as a function provided by the Policy Framework project.
+
+CLAMP is a function for designing and managing control loops and a UI to manage Policies.
+ It is used to visualize a control loop, configure it with specific parameters for a particular network
 service, then deploying and undeploying it.  Once deployed, the user can also
 update the loop with new parameters during runtime, as well as suspending and
 restarting it.
 
-It interacts with other systems to deploy and execute the control loop. For
-example, it extracts the control loop blueprint and Policy Model(Model Driven Control Loop) 
-from CSAR distributed by SDC/DCAE-DS.
-It requests from DCAE the instantiation of microservices
-to manage the control loop flow.  Furthermore, it creates and updates multiple
-policies (for DCAE mS configuration and actual Control Operations) in the Policy Engine 
+Starting with Istanbul release, CLAMP GUI can also be used to create/read/update/delete/list policies
+outside of a control loop, and therefore CLAMP is also the front-end for Policies management in ONAP.
+
+CLAMP interacts with other systems to deploy and execute the control loop. For
+example, it extracts the control loop blueprint from CSAR distributed by SDC.
+CLAMP also calls the internal Policy framework API to get the Policy Models(Model Driven Control Loop)
+It requests from DCAE the instantiation of microservices.
+to manage the control loop flow. Furthermore, it creates and updates multiple
+policies (for DCAE mS configuration and actual Control Operations) in the Policy Engine
 that define the closed loop flow.
 
 |clamp-flow|
 
-The ONAP CLAMP platform abstracts the details of these systems under the concept
+The ONAP CLAMP function abstracts the details of these systems under the concept
 of a control loop model.  The design of a control loop and its management is
 represented by a workflow in which all relevant system interactions take
 place.  This is essential for a self-service model of creating and managing
 control loops, where no low-level user interaction with other components is
 required.
 
-CLAMP also allows to visualize control loop metrics through a dashboard, in order
-to help operations understand how and when a control loop is triggered and takes action.
-
-|dashboard-flow|
-
 At a higher level, CLAMP is about supporting and managing the broad operational
 life cycle of VNFs/VMs and ultimately ONAP components itself. It will offer the
 ability to design, test, deploy and update control loop automation - both closed
@@ -43,5 +45,4 @@
 |closed-loop|
 
 .. |clamp-flow| image:: images/architecture/distdepl.png
-.. |dashboard-flow| image:: images/architecture/monitoring.png
 .. |closed-loop| image:: images/architecture/ONAP-closedloop.png
diff --git a/docs/images/architecture/monitoring.png b/docs/images/architecture/monitoring.png
deleted file mode 100644
index 6dbf75e..0000000
--- a/docs/images/architecture/monitoring.png
+++ /dev/null
Binary files differ
diff --git a/docs/images/clamp-policy_archi.png b/docs/images/clamp-policy_archi.png
new file mode 100644
index 0000000..f384ddd
--- /dev/null
+++ b/docs/images/clamp-policy_archi.png
Binary files differ
diff --git a/docs/index.rst b/docs/index.rst
index c8aafc2..d1aedae 100644
--- a/docs/index.rst
+++ b/docs/index.rst
@@ -1,10 +1,10 @@
 .. This work is licensed under a Creative Commons Attribution 4.0 International License.
 .. http://creativecommons.org/licenses/by/4.0
-.. Copyright (c) 2017-2019 AT&T Intellectual Property. All rights reserved.
+.. Copyright (c) 2017-2021 AT&T Intellectual Property. All rights reserved.
 .. _master_index:
 
-CLAMP - Control Loop Automation Management Platform
-===================================================
+Policy/CLAMP - Control Loop Automation Management Platform
+==========================================================
 .. High level architecture, design, and packaging information for release planning and delivery.
 
 .. include:: architecture.rst
@@ -12,7 +12,7 @@
 
 Offered APIs
 ------------
-The list of APIs that CLAMP has offered could be find in the following table:
+The list of APIs that Policy/CLAMP has offered could be find in the following table:
 
 .. |pdf-icon| image:: images/pdf.png
               :width: 40px
@@ -33,54 +33,21 @@
 
 Consumed APIs
 -------------
-CLAMP uses the API's exposed by the following ONAP components:
+Policy/CLAMP uses the API's exposed by the following ONAP components:
 
 - SDC : REST based interface exposed by the SDC, Distribution of service to DCAE
 - DCAE: REST based interface exposed by DCAE, Common Controller Framework, DCAE microservices onboarded (TCA, Stringmatch, Holmes (optional))
-- Policy: REST based interface, Policy engine target both XACML and Drools PDP, Policy Engine trigger operations to App-C/VF-C/SDN-C
+- Policy Core: REST based interface, Policy Core engine target both XACML and Drools PDP, Policy Engine trigger operations to App-C/VF-C/SDN-C
 - CDS: REST based interface, to retrieve list of operations/actions with their corresponding payload at runtime for Operational Policies where the field 'actor' is 'CDS'.
 
 Delivery
 --------
-CLAMP component is composed of a UI layer and a backend layer and packaged into a single container (single jar).
-CLAMP also requires a database instance with 1 DB, it uses MariaDB.
-CLAMP also uses an ELK stack (Elastic Search, Logstash and Kibana) for the Dashboard.
+Policy/CLAMP component is composed of a UI layer and a backend layer, each layer having its own container.
+Policy/CLAMP also requires a database instance with 1 DB, it uses MariaDB, which is the same DB as for the core Policy.
 
-.. blockdiag::
+.. |clamp-policy-archi| image:: images/clamp-policy_archi.png
 
-
-   blockdiag layers {
-       orientation = portrait
-       CLAMP_UI -> CLAMP_BACKEND;
-       CLAMP_BACKEND -> CLDSDB;
-       CLAMP_KIBANA -> CLAMP_ELASTICSEARCH;
-       CLAMP_LOGSTASH -> CLAMP_ELASTICSEARCH;
-       group l1 {
-       color = blue;
-       label = "CLAMP container";
-       CLAMP_UI; CLAMP_BACKEND;
-       }
-       group l3 {
-       color = orange;
-       label = "MariaDB container";
-       CLDSDB;
-       }
-       group l4 {
-       color = green;
-       label = "E_Search container";
-       CLAMP_ELASTICSEARCH;
-       }
-       group l5 {
-          color = green;
-          label = "Kibana container";
-          CLAMP_KIBANA;
-       }
-       group l6 {
-          color = green;
-          label = "LogStash container";
-          CLAMP_LOGSTASH;
-       }
-   }
+|clamp-policy-archi|
 
 Logging & Diagnostic Information
 --------------------------------
@@ -103,7 +70,7 @@
 .. What are parameters and values?
 
 
-Currently, the CLAMP docker image can be deployed with small configuration needs. Though, you might need to make small adjustments to the configuration. As CLAMP is spring based, you can use the SPRING_APPLICATION_JSON environment variable to update its parameters.
+Currently, the CLAMP docker images can be deployed with small configuration needs. Though, you might need to make small adjustments to the configuration. As CLAMP is spring based, you can use the SPRING_APPLICATION_JSON environment variable to update its parameters.
 
 .. TODO detail config parameters and the usage
 
@@ -178,8 +145,8 @@
 Administration
 --------------
 
-A user can access CLAMP UI at the following URL : https://localhost:3000.
-(in this URL 'localhost' must be replaced by the actual host where CLAMP has been installed if it is not your current localhost)
+A user can access Policy/CLAMP UI at the following URL : https://localhost:3000.
+(in this URL 'localhost' must be replaced by the actual host where Policy/CLAMP has been installed if it is not your current localhost)
 For OOM, the URL is https://<host-ip>:30258
 
 .. code-block:: html
@@ -192,19 +159,13 @@
      ca path: src/main/resources/clds/aaf/org.onap.clamp.p12, password "China in the Spring"
      Or get it from this page : https://wiki.onap.org/display/DW/Control+Loop+Flows+and+Models+for+Casablanca
 
-A user can access the Control-Loop DashBoard (ELK stack based) at the following URL : https://localhost:5601 .
-(in this URL 'localhost' must be replaced by the actual host where CLAMP has been installed if it is not your current localhost)
-For OOM, the URL is https://<host-ip>:30290. Since El Alto release, User access is protected using the Search Guard plugin, community Edition!,
-for Kibana and ElasticSearch. The initial users and credentials provided by the Search Guard plugins are used by default.
-(take a look at the files in the ElasticSearch docker image located in the folder: /usr/share/elasticsearch/config/sg/, 
-especially the file "sg_internal_users.yml").
-
 Human Interfaces
 ----------------
 .. Basic info on the interface type, ports/protocols provided over, etc.
 
-User Interface (CLAMP Designer) - serve to configure control loop
-CLAMP UI is used to configure the Control Loop designed and distributed by SDC. From that UI it's possible to distribute the configuration policies and control the life-cycle of the DCAE Micro Services.
+User Interface - serve to configure control loop
+Policy/CLAMP UI is used to configure the Control Loop designed and distributed by SDC. From that UI it's possible to distribute the configuration policies and control the life-cycle of the DCAE Micro Services.
+Policy/CLAMP UI is also used to manage Policies outside of a Control Loop.
 
 The following actions are done using the UI:
 
diff --git a/docs/user-guide.rst b/docs/user-guide.rst
index b3c1535..5cfcf1a 100644
--- a/docs/user-guide.rst
+++ b/docs/user-guide.rst
@@ -1,10 +1,10 @@
 .. This work is licensed under a Creative Commons Attribution 4.0 International License.
 .. http://creativecommons.org/licenses/by/4.0
-.. Copyright (c) 2017-2018 AT&T Intellectual Property.  All rights reserved.
+.. Copyright (c) 2017-2021 AT&T Intellectual Property.  All rights reserved.
 
-Control loop in CLAMP
----------------------
-There are 2 control loop levels in CLAMP:
+Control loop in Policy/CLAMP
+----------------------------
+There are 2 control loop levels in Policy/CLAMP:
 
 - Control loop template: This is created from the DCAE blueprint (designed in the DCAE designer), and distributed by SDC to CLAMP.
 - Control loop instance: Based on the template, it represents a physical control loop in the platform related to a service and a VNF.
@@ -116,8 +116,8 @@
 |clamp-loop-operation-menu|
 
 
-Submitting the Control loop to policy
--------------------------------------
+Submitting the Control loop to core policy
+------------------------------------------
 The SUBMIT operation can be used to send the configuration to policy engine.
 If everything is successful, the status to the policy will become *SENT*. Clamp should also show proper logs in logs view.
 
diff --git a/pom.xml b/pom.xml
index 3f38b44..0ac401d 100644
--- a/pom.xml
+++ b/pom.xml
@@ -26,7 +26,7 @@
     <modelVersion>4.0.0</modelVersion>
     <groupId>org.onap.policy</groupId>
     <artifactId>clamp</artifactId>
-    <version>6.0.2-SNAPSHOT</version>
+    <version>6.1.0-SNAPSHOT</version>
     <name>policy-clamp</name>
 
 
diff --git a/src/main/docker/backend/Dockerfile b/src/main/docker/backend/Dockerfile
index 63268d8..70eb193 100644
--- a/src/main/docker/backend/Dockerfile
+++ b/src/main/docker/backend/Dockerfile
@@ -2,7 +2,7 @@
 # ============LICENSE_START=======================================================

 # ONAP CLAMP

 # ================================================================================

-# Copyright (C) 2018 AT&T Intellectual Property. All rights

+# Copyright (C) 2018, 2021 AT&T Intellectual Property. All rights

 #                             reserved.

 # ================================================================================

 # Licensed under the Apache License, Version 2.0 (the "License");

@@ -21,7 +21,7 @@
 #

 ###

 

-FROM onap/integration-java11:7.1.0

+FROM onap/integration-java11:8.0.0

 

 MAINTAINER "The Onap Team"

 LABEL Description="This image contains alpine, openjdk 11 and policy clamp"

@@ -44,4 +44,4 @@
 

 USER onap

 WORKDIR /opt/policy/clamp/

-ENTRYPOINT ["java","-Djava.security.egd=file:/dev/./urandom","-XX:MinRAMPercentage=50.0", "-XX:MaxRAMPercentage=75.0","-jar" ,"./policy-clamp-backend.jar"]
\ No newline at end of file
+ENTRYPOINT ["java","-Djava.security.egd=file:/dev/./urandom","-XX:MinRAMPercentage=50.0", "-XX:MaxRAMPercentage=75.0","-jar" ,"./policy-clamp-backend.jar"]

diff --git a/version.properties b/version.properties
index 61e195c..70aaea8 100644
--- a/version.properties
+++ b/version.properties
@@ -26,8 +26,8 @@
 # because they are used in Jenkins, whose plug-in doesn't support
 
 major=6
-minor=0
-patch=2
+minor=1
+patch=0
 
 base_version=${major}.${minor}.${patch}