Create get Pdp Groups flow

Create a camel flow to get the list of Pdp Groups info from Policy.
Create a scheduler to trigger the camel flow regularly and store
the Pdp Groups info into DB.

Issue-ID: CLAMP-644, CLAMP-649
Change-Id: I6427202cc0186cd85428d5d25b28a8622e4d7ca4
Signed-off-by: xuegao <xg353y@intl.att.com>
diff --git a/docs/swagger/swagger.json b/docs/swagger/swagger.json
index 5307c15..a52fe8c 100644
--- a/docs/swagger/swagger.json
+++ b/docs/swagger/swagger.json
@@ -4,13 +4,13 @@
     "version" : "5.0.0-SNAPSHOT",
     "title" : "Clamp Rest API"
   },
-  "host" : "localhost:32977",
+  "host" : "localhost:33631",
   "basePath" : "/restservices/clds/",
   "schemes" : [ "http" ],
   "paths" : {
     "/v2/dictionary" : {
       "get" : {
-        "operationId" : "route111",
+        "operationId" : "route80",
         "produces" : [ "application/json" ],
         "responses" : {
           "200" : {
@@ -20,11 +20,11 @@
             }
           }
         },
-        "x-camelContextId" : "camel-4",
-        "x-routeId" : "route111"
+        "x-camelContextId" : "camel-3",
+        "x-routeId" : "route80"
       },
       "put" : {
-        "operationId" : "route113",
+        "operationId" : "route82",
         "consumes" : [ "application/json" ],
         "produces" : [ "application/json" ],
         "parameters" : [ {
@@ -43,8 +43,8 @@
             }
           }
         },
-        "x-camelContextId" : "camel-4",
-        "x-routeId" : "route113"
+        "x-camelContextId" : "camel-3",
+        "x-routeId" : "route82"
       }
     },
     "/v2/dictionary/{dictionaryName}" : {
@@ -64,7 +64,7 @@
             }
           }
         },
-        "x-camelContextId" : "camel-4",
+        "x-camelContextId" : "camel-3",
         "x-routeId" : null
       }
     },
@@ -93,11 +93,11 @@
             }
           }
         },
-        "x-camelContextId" : "camel-4",
+        "x-camelContextId" : "camel-3",
         "x-routeId" : null
       },
       "delete" : {
-        "operationId" : "route115",
+        "operationId" : "route84",
         "produces" : [ "application/json" ],
         "parameters" : [ {
           "name" : "name",
@@ -108,8 +108,8 @@
         "responses" : {
           "200" : { }
         },
-        "x-camelContextId" : "camel-4",
-        "x-routeId" : "route115"
+        "x-camelContextId" : "camel-3",
+        "x-routeId" : "route84"
       }
     },
     "/v2/dictionary/{name}/elements/{shortName}" : {
@@ -129,7 +129,7 @@
         "responses" : {
           "200" : { }
         },
-        "x-camelContextId" : "camel-4",
+        "x-camelContextId" : "camel-3",
         "x-routeId" : null
       }
     },
@@ -147,13 +147,13 @@
             }
           }
         },
-        "x-camelContextId" : "camel-4",
+        "x-camelContextId" : "camel-3",
         "x-routeId" : null
       }
     },
     "/v2/loop/{loopName}" : {
       "get" : {
-        "operationId" : "route96",
+        "operationId" : "route65",
         "produces" : [ "application/json" ],
         "parameters" : [ {
           "name" : "loopName",
@@ -169,13 +169,13 @@
             }
           }
         },
-        "x-camelContextId" : "camel-4",
-        "x-routeId" : "route96"
+        "x-camelContextId" : "camel-3",
+        "x-routeId" : "route65"
       }
     },
     "/v2/loop/delete/{loopName}" : {
       "put" : {
-        "operationId" : "route107",
+        "operationId" : "route76",
         "parameters" : [ {
           "name" : "loopName",
           "in" : "path",
@@ -185,13 +185,13 @@
         "responses" : {
           "200" : { }
         },
-        "x-camelContextId" : "camel-4",
-        "x-routeId" : "route107"
+        "x-camelContextId" : "camel-3",
+        "x-routeId" : "route76"
       }
     },
     "/v2/loop/deploy/{loopName}" : {
       "put" : {
-        "operationId" : "route101",
+        "operationId" : "route70",
         "produces" : [ "application/json" ],
         "parameters" : [ {
           "name" : "loopName",
@@ -207,13 +207,13 @@
             }
           }
         },
-        "x-camelContextId" : "camel-4",
-        "x-routeId" : "route101"
+        "x-camelContextId" : "camel-3",
+        "x-routeId" : "route70"
       }
     },
     "/v2/loop/getAllNames" : {
       "get" : {
-        "operationId" : "route95",
+        "operationId" : "route64",
         "produces" : [ "application/json" ],
         "responses" : {
           "200" : {
@@ -226,13 +226,13 @@
             }
           }
         },
-        "x-camelContextId" : "camel-4",
-        "x-routeId" : "route95"
+        "x-camelContextId" : "camel-3",
+        "x-routeId" : "route64"
       }
     },
     "/v2/loop/getstatus/{loopName}" : {
       "get" : {
-        "operationId" : "route108",
+        "operationId" : "route77",
         "produces" : [ "application/json" ],
         "parameters" : [ {
           "name" : "loopName",
@@ -248,13 +248,13 @@
             }
           }
         },
-        "x-camelContextId" : "camel-4",
-        "x-routeId" : "route108"
+        "x-camelContextId" : "camel-3",
+        "x-routeId" : "route77"
       }
     },
     "/v2/loop/refreshOpPolicyJsonSchema/{loopName}" : {
       "put" : {
-        "operationId" : "route102",
+        "operationId" : "route71",
         "produces" : [ "application/json" ],
         "parameters" : [ {
           "name" : "loopName",
@@ -270,13 +270,13 @@
             }
           }
         },
-        "x-camelContextId" : "camel-4",
-        "x-routeId" : "route102"
+        "x-camelContextId" : "camel-3",
+        "x-routeId" : "route71"
       }
     },
     "/v2/loop/restart/{loopName}" : {
       "put" : {
-        "operationId" : "route105",
+        "operationId" : "route74",
         "produces" : [ "application/json" ],
         "parameters" : [ {
           "name" : "loopName",
@@ -292,13 +292,13 @@
             }
           }
         },
-        "x-camelContextId" : "camel-4",
-        "x-routeId" : "route105"
+        "x-camelContextId" : "camel-3",
+        "x-routeId" : "route74"
       }
     },
     "/v2/loop/stop/{loopName}" : {
       "put" : {
-        "operationId" : "route104",
+        "operationId" : "route73",
         "produces" : [ "application/json" ],
         "parameters" : [ {
           "name" : "loopName",
@@ -314,13 +314,13 @@
             }
           }
         },
-        "x-camelContextId" : "camel-4",
-        "x-routeId" : "route104"
+        "x-camelContextId" : "camel-3",
+        "x-routeId" : "route73"
       }
     },
     "/v2/loop/submit/{loopName}" : {
       "put" : {
-        "operationId" : "route106",
+        "operationId" : "route75",
         "produces" : [ "application/json" ],
         "parameters" : [ {
           "name" : "loopName",
@@ -336,13 +336,13 @@
             }
           }
         },
-        "x-camelContextId" : "camel-4",
-        "x-routeId" : "route106"
+        "x-camelContextId" : "camel-3",
+        "x-routeId" : "route75"
       }
     },
     "/v2/loop/svgRepresentation/{loopName}" : {
       "get" : {
-        "operationId" : "route97",
+        "operationId" : "route66",
         "produces" : [ "application/xml" ],
         "parameters" : [ {
           "name" : "loopName",
@@ -358,13 +358,13 @@
             }
           }
         },
-        "x-camelContextId" : "camel-4",
-        "x-routeId" : "route97"
+        "x-camelContextId" : "camel-3",
+        "x-routeId" : "route66"
       }
     },
     "/v2/loop/undeploy/{loopName}" : {
       "put" : {
-        "operationId" : "route103",
+        "operationId" : "route72",
         "produces" : [ "application/json" ],
         "parameters" : [ {
           "name" : "loopName",
@@ -380,13 +380,13 @@
             }
           }
         },
-        "x-camelContextId" : "camel-4",
-        "x-routeId" : "route103"
+        "x-camelContextId" : "camel-3",
+        "x-routeId" : "route72"
       }
     },
     "/v2/loop/updateGlobalProperties/{loopName}" : {
       "post" : {
-        "operationId" : "route98",
+        "operationId" : "route67",
         "consumes" : [ "application/json" ],
         "produces" : [ "application/json" ],
         "parameters" : [ {
@@ -410,13 +410,13 @@
             }
           }
         },
-        "x-camelContextId" : "camel-4",
-        "x-routeId" : "route98"
+        "x-camelContextId" : "camel-3",
+        "x-routeId" : "route67"
       }
     },
     "/v2/loop/updateMicroservicePolicy/{loopName}" : {
       "post" : {
-        "operationId" : "route100",
+        "operationId" : "route69",
         "consumes" : [ "application/json" ],
         "produces" : [ "application/json" ],
         "parameters" : [ {
@@ -440,13 +440,13 @@
             }
           }
         },
-        "x-camelContextId" : "camel-4",
-        "x-routeId" : "route100"
+        "x-camelContextId" : "camel-3",
+        "x-routeId" : "route69"
       }
     },
     "/v2/loop/updateOperationalPolicies/{loopName}" : {
       "post" : {
-        "operationId" : "route99",
+        "operationId" : "route68",
         "consumes" : [ "application/json" ],
         "produces" : [ "application/json" ],
         "parameters" : [ {
@@ -470,13 +470,13 @@
             }
           }
         },
-        "x-camelContextId" : "camel-4",
-        "x-routeId" : "route99"
+        "x-camelContextId" : "camel-3",
+        "x-routeId" : "route68"
       }
     },
     "/v2/policyToscaModels" : {
       "get" : {
-        "operationId" : "route118",
+        "operationId" : "route87",
         "produces" : [ "application/json" ],
         "responses" : {
           "200" : {
@@ -486,8 +486,8 @@
             }
           }
         },
-        "x-camelContextId" : "camel-4",
-        "x-routeId" : "route118"
+        "x-camelContextId" : "camel-3",
+        "x-routeId" : "route87"
       }
     },
     "/v2/policyToscaModels/{policyModelType}" : {
@@ -507,11 +507,11 @@
             }
           }
         },
-        "x-camelContextId" : "camel-4",
+        "x-camelContextId" : "camel-3",
         "x-routeId" : null
       },
       "put" : {
-        "operationId" : "route119",
+        "operationId" : "route88",
         "consumes" : [ "plain/text" ],
         "produces" : [ "application/json" ],
         "parameters" : [ {
@@ -535,8 +535,8 @@
             }
           }
         },
-        "x-camelContextId" : "camel-4",
-        "x-routeId" : "route119"
+        "x-camelContextId" : "camel-3",
+        "x-routeId" : "route88"
       }
     },
     "/v2/policyToscaModels/yaml/{policyModelType}" : {
@@ -556,13 +556,13 @@
             }
           }
         },
-        "x-camelContextId" : "camel-4",
+        "x-camelContextId" : "camel-3",
         "x-routeId" : null
       }
     },
     "/v2/templates" : {
       "get" : {
-        "operationId" : "route122",
+        "operationId" : "route91",
         "produces" : [ "application/json" ],
         "responses" : {
           "200" : {
@@ -572,8 +572,8 @@
             }
           }
         },
-        "x-camelContextId" : "camel-4",
-        "x-routeId" : "route122"
+        "x-camelContextId" : "camel-3",
+        "x-routeId" : "route91"
       }
     },
     "/v2/templates/{templateName}" : {
@@ -593,7 +593,7 @@
             }
           }
         },
-        "x-camelContextId" : "camel-4",
+        "x-camelContextId" : "camel-3",
         "x-routeId" : null
       }
     },
@@ -611,13 +611,13 @@
             }
           }
         },
-        "x-camelContextId" : "camel-4",
+        "x-camelContextId" : "camel-3",
         "x-routeId" : null
       }
     },
     "/v1/healthcheck" : {
       "get" : {
-        "operationId" : "route123",
+        "operationId" : "route92",
         "produces" : [ "application/json" ],
         "responses" : {
           "200" : {
@@ -627,19 +627,19 @@
             }
           }
         },
-        "x-camelContextId" : "camel-4",
-        "x-routeId" : "route123"
+        "x-camelContextId" : "camel-3",
+        "x-routeId" : "route92"
       }
     },
     "/v1/user/getUser" : {
       "get" : {
-        "operationId" : "route124",
+        "operationId" : "route93",
         "produces" : [ "text/plain" ],
         "responses" : {
           "200" : { }
         },
-        "x-camelContextId" : "camel-4",
-        "x-routeId" : "route124"
+        "x-camelContextId" : "camel-3",
+        "x-routeId" : "route93"
       }
     }
   },
@@ -809,20 +809,19 @@
         "number" : {
           "type" : "boolean"
         },
+        "string" : {
+          "type" : "boolean"
+        },
+        "boolean" : {
+          "type" : "boolean"
+        },
         "asString" : {
           "type" : "string"
         },
-        "asNumber" : {
-          "$ref" : "#/definitions/Number"
-        },
         "asDouble" : {
           "type" : "number",
           "format" : "double"
         },
-        "asFloat" : {
-          "type" : "number",
-          "format" : "float"
-        },
         "asLong" : {
           "type" : "integer",
           "format" : "int64"
@@ -831,6 +830,13 @@
           "type" : "integer",
           "format" : "int32"
         },
+        "asNumber" : {
+          "$ref" : "#/definitions/Number"
+        },
+        "asFloat" : {
+          "type" : "number",
+          "format" : "float"
+        },
         "asByte" : {
           "type" : "string",
           "format" : "byte"
@@ -848,21 +854,9 @@
           "type" : "integer",
           "format" : "int32"
         },
-        "boolean" : {
-          "type" : "boolean"
-        },
-        "string" : {
-          "type" : "boolean"
-        },
-        "asJsonPrimitive" : {
-          "$ref" : "#/definitions/JsonPrimitive"
-        },
         "asJsonObject" : {
           "$ref" : "#/definitions/JsonObject"
         },
-        "asJsonArray" : {
-          "$ref" : "#/definitions/JsonArray"
-        },
         "jsonArray" : {
           "type" : "boolean"
         },
@@ -875,6 +869,12 @@
         "jsonNull" : {
           "type" : "boolean"
         },
+        "asJsonArray" : {
+          "$ref" : "#/definitions/JsonArray"
+        },
+        "asJsonPrimitive" : {
+          "$ref" : "#/definitions/JsonPrimitive"
+        },
         "asJsonNull" : {
           "$ref" : "#/definitions/JsonNull"
         }
@@ -952,17 +952,23 @@
         "asBoolean" : {
           "type" : "boolean"
         },
-        "asJsonPrimitive" : {
-          "$ref" : "#/definitions/JsonPrimitive"
+        "asJsonObject" : {
+          "$ref" : "#/definitions/JsonObject"
         },
         "asString" : {
           "type" : "string"
         },
-        "asJsonObject" : {
-          "$ref" : "#/definitions/JsonObject"
+        "asDouble" : {
+          "type" : "number",
+          "format" : "double"
         },
-        "asJsonArray" : {
-          "$ref" : "#/definitions/JsonArray"
+        "asLong" : {
+          "type" : "integer",
+          "format" : "int64"
+        },
+        "asInt" : {
+          "type" : "integer",
+          "format" : "int32"
         },
         "jsonArray" : {
           "type" : "boolean"
@@ -976,28 +982,22 @@
         "jsonNull" : {
           "type" : "boolean"
         },
+        "asJsonArray" : {
+          "$ref" : "#/definitions/JsonArray"
+        },
+        "asJsonPrimitive" : {
+          "$ref" : "#/definitions/JsonPrimitive"
+        },
         "asJsonNull" : {
           "$ref" : "#/definitions/JsonNull"
         },
         "asNumber" : {
           "$ref" : "#/definitions/Number"
         },
-        "asDouble" : {
-          "type" : "number",
-          "format" : "double"
-        },
         "asFloat" : {
           "type" : "number",
           "format" : "float"
         },
-        "asLong" : {
-          "type" : "integer",
-          "format" : "int64"
-        },
-        "asInt" : {
-          "type" : "integer",
-          "format" : "int32"
-        },
         "asByte" : {
           "type" : "string",
           "format" : "byte"
@@ -1144,17 +1144,23 @@
         "asBoolean" : {
           "type" : "boolean"
         },
-        "asJsonPrimitive" : {
-          "$ref" : "#/definitions/JsonPrimitive"
+        "asJsonObject" : {
+          "$ref" : "#/definitions/JsonObject"
         },
         "asString" : {
           "type" : "string"
         },
-        "asJsonObject" : {
-          "$ref" : "#/definitions/JsonObject"
+        "asDouble" : {
+          "type" : "number",
+          "format" : "double"
         },
-        "asJsonArray" : {
-          "$ref" : "#/definitions/JsonArray"
+        "asLong" : {
+          "type" : "integer",
+          "format" : "int64"
+        },
+        "asInt" : {
+          "type" : "integer",
+          "format" : "int32"
         },
         "jsonArray" : {
           "type" : "boolean"
@@ -1168,28 +1174,22 @@
         "jsonNull" : {
           "type" : "boolean"
         },
+        "asJsonArray" : {
+          "$ref" : "#/definitions/JsonArray"
+        },
+        "asJsonPrimitive" : {
+          "$ref" : "#/definitions/JsonPrimitive"
+        },
         "asJsonNull" : {
           "$ref" : "#/definitions/JsonNull"
         },
         "asNumber" : {
           "$ref" : "#/definitions/Number"
         },
-        "asDouble" : {
-          "type" : "number",
-          "format" : "double"
-        },
         "asFloat" : {
           "type" : "number",
           "format" : "float"
         },
-        "asLong" : {
-          "type" : "integer",
-          "format" : "int64"
-        },
-        "asInt" : {
-          "type" : "integer",
-          "format" : "int32"
-        },
         "asByte" : {
           "type" : "string",
           "format" : "byte"
@@ -1218,17 +1218,10 @@
         "asString" : {
           "type" : "string"
         },
-        "asNumber" : {
-          "$ref" : "#/definitions/Number"
-        },
         "asDouble" : {
           "type" : "number",
           "format" : "double"
         },
-        "asFloat" : {
-          "type" : "number",
-          "format" : "float"
-        },
         "asLong" : {
           "type" : "integer",
           "format" : "int64"
@@ -1237,6 +1230,13 @@
           "type" : "integer",
           "format" : "int32"
         },
+        "asNumber" : {
+          "$ref" : "#/definitions/Number"
+        },
+        "asFloat" : {
+          "type" : "number",
+          "format" : "float"
+        },
         "asByte" : {
           "type" : "string",
           "format" : "byte"
@@ -1254,15 +1254,9 @@
           "type" : "integer",
           "format" : "int32"
         },
-        "asJsonPrimitive" : {
-          "$ref" : "#/definitions/JsonPrimitive"
-        },
         "asJsonObject" : {
           "$ref" : "#/definitions/JsonObject"
         },
-        "asJsonArray" : {
-          "$ref" : "#/definitions/JsonArray"
-        },
         "jsonArray" : {
           "type" : "boolean"
         },
@@ -1275,6 +1269,12 @@
         "jsonNull" : {
           "type" : "boolean"
         },
+        "asJsonArray" : {
+          "$ref" : "#/definitions/JsonArray"
+        },
+        "asJsonPrimitive" : {
+          "$ref" : "#/definitions/JsonPrimitive"
+        },
         "asJsonNull" : {
           "$ref" : "#/definitions/JsonNull"
         }
diff --git a/docs/swagger/swagger.pdf b/docs/swagger/swagger.pdf
index 692034c..d9acf9d 100644
--- a/docs/swagger/swagger.pdf
+++ b/docs/swagger/swagger.pdf
Binary files differ
diff --git a/extra/sql/bulkload/create-tables.sql b/extra/sql/bulkload/create-tables.sql
index 522086c..2a7f4c1 100644
--- a/extra/sql/bulkload/create-tables.sql
+++ b/extra/sql/bulkload/create-tables.sql
@@ -119,6 +119,7 @@
         configurations_json json,
         json_representation json not null,
         pdp_group varchar(255),
+        pdp_sub_group varchar(255),
         context varchar(255),
         dcae_blueprint_id varchar(255),
         dcae_deployment_id varchar(255),
@@ -140,6 +141,7 @@
         configurations_json json,
         json_representation json not null,
         pdp_group varchar(255),
+        pdp_sub_group varchar(255),
         loop_element_model_id varchar(255),
         loop_id varchar(255) not null,
         policy_model_type varchar(255),
@@ -156,6 +158,7 @@
         updated_timestamp datetime(6) not null,
         policy_acronym varchar(255),
         policy_tosca MEDIUMTEXT,
+        policy_pdp_group json,
         primary key (policy_model_type, version)
     ) engine=InnoDB;
 
diff --git a/src/main/java/org/onap/clamp/clds/client/PolicyEngineServices.java b/src/main/java/org/onap/clamp/clds/client/PolicyEngineServices.java
index 02e2dd0..b3fcb6f 100644
--- a/src/main/java/org/onap/clamp/clds/client/PolicyEngineServices.java
+++ b/src/main/java/org/onap/clamp/clds/client/PolicyEngineServices.java
@@ -25,17 +25,28 @@
 
 import com.att.eelf.configuration.EELFLogger;
 import com.att.eelf.configuration.EELFManager;
+
+import com.google.gson.JsonArray;
+import com.google.gson.JsonObject;
+
 import java.util.ArrayList;
+import java.util.Iterator;
 import java.util.LinkedHashMap;
+import java.util.LinkedList;
 import java.util.List;
 import java.util.Map;
 import org.apache.camel.CamelContext;
 import org.apache.camel.Exchange;
 import org.apache.camel.builder.ExchangeBuilder;
+import org.json.simple.parser.ParseException;
 import org.onap.clamp.clds.config.ClampProperties;
 import org.onap.clamp.clds.sdc.controller.installer.BlueprintMicroService;
+import org.onap.clamp.clds.util.JsonUtils;
 import org.onap.clamp.loop.template.PolicyModel;
+import org.onap.clamp.loop.template.PolicyModelId;
 import org.onap.clamp.loop.template.PolicyModelsService;
+import org.onap.clamp.policy.pdpgroup.PdpGroup;
+
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Component;
 import org.yaml.snakeyaml.Yaml;
@@ -53,11 +64,9 @@
 public class PolicyEngineServices {
     private final CamelContext camelContext;
 
-    private final PolicyModelsService policyModelsSService;
+    private final PolicyModelsService policyModelsService;
 
     private static final EELFLogger logger = EELFManager.getInstance().getLogger(PolicyEngineServices.class);
-    private static final EELFLogger auditLogger = EELFManager.getInstance().getAuditLogger();
-    private static final EELFLogger metricsLogger = EELFManager.getInstance().getMetricsLogger();
     private static int retryInterval = 0;
     private static int retryLimit = 1;
 
@@ -70,12 +79,13 @@
      * @param camelContext Camel context bean
      * @param clampProperties ClampProperties bean
      * @param policyModelsSService policyModel repository bean
+     * @param policyModelsService policyModel service
      */
     @Autowired
     public PolicyEngineServices(CamelContext camelContext, ClampProperties clampProperties,
                                 PolicyModelsService policyModelsSService) {
         this.camelContext = camelContext;
-        this.policyModelsSService = policyModelsSService;
+        this.policyModelsService = policyModelsSService;
         if (clampProperties.getStringValue(POLICY_RETRY_LIMIT) != null) {
             retryLimit = Integer.parseInt(clampProperties.getStringValue(POLICY_RETRY_LIMIT));
         }
@@ -122,7 +132,7 @@
         policyTypesList.parallelStream().forEach(policyType -> {
             Map.Entry<String, Object> policyTypeEntry = (Map.Entry<String, Object>) new ArrayList(policyType.entrySet()).get(0);
 
-            policyModelsSService.createPolicyInDbIfNeeded(
+            policyModelsService.createPolicyInDbIfNeeded(
                     createPolicyModelFromPolicyEngine(policyTypeEntry.getKey(),
                             ((String) ((LinkedHashMap<String, Object>) policyTypeEntry.getValue()).get("version"))));
         });
@@ -135,7 +145,7 @@
      * @return A yaml containing all policy Types and all data types
      */
     public String downloadAllPolicies() {
-        return callCamelRoute(ExchangeBuilder.anExchange(camelContext).build(), "direct:get-all-policy-models");
+        return callCamelRoute(ExchangeBuilder.anExchange(camelContext).build(), "direct:get-all-policy-models", "Get all policies");
     }
 
     /**
@@ -147,16 +157,43 @@
      */
     public String downloadOnePolicy(String policyType, String policyVersion) {
         return callCamelRoute(ExchangeBuilder.anExchange(camelContext).withProperty("policyModelName", policyType)
-                .withProperty("policyModelVersion", policyVersion).build(), "direct:get-policy-model");
+                .withProperty("policyModelVersion", policyVersion).build(), "direct:get-policy-model", "Get one policy");
     }
 
-    private String callCamelRoute(Exchange exchange, String camelFlow) {
+    /**
+     * This method can be used to download all Pdp Groups data from policy engine.
+     * 
+     */
+    public void downloadPdpGroups() {
+        String responseBody = callCamelRoute(ExchangeBuilder.anExchange(camelContext).build(), "direct:get-all-pdp-groups", "Get Pdp Groups");
+
+        if (responseBody == null || responseBody.isEmpty()) {
+            logger.warn("getPdpGroups returned by policy engine could not be decoded, as it's null or empty");
+            return;
+        }
+
+        JsonObject jsonObj = JsonUtils.GSON.fromJson(responseBody, JsonObject.class);
+
+        List<PdpGroup> pdpGroupList = new LinkedList<>();
+        JsonArray itemsArray = (JsonArray) jsonObj.get("groups");
+
+        Iterator it = itemsArray.iterator();
+        while (it.hasNext()) {
+            JsonObject item = (JsonObject) it.next();
+            PdpGroup pdpGroup = JsonUtils.GSON.fromJson(item.toString(), PdpGroup.class);
+            pdpGroupList.add(pdpGroup);
+        }
+
+        policyModelsService.updatePdpGroupInfo(pdpGroupList);
+    }
+
+    private String callCamelRoute(Exchange exchange, String camelFlow, String logMsg) {
         for (int i = 0; i < retryLimit; i++) {
             Exchange exchangeResponse = camelContext.createProducerTemplate().send(camelFlow, exchange);
             if (Integer.valueOf(200).equals(exchangeResponse.getIn().getHeader("CamelHttpResponseCode"))) {
                 return (String) exchangeResponse.getIn().getBody();
             } else {
-                logger.info("Policy query " + retryInterval + "ms before retrying ...");
+                logger.info(logMsg + " query " + retryInterval + "ms before retrying ...");
                 // wait for a while and try to connect to DCAE again
                 try {
                     Thread.sleep(retryInterval);
diff --git a/src/main/java/org/onap/clamp/loop/template/PolicyModel.java b/src/main/java/org/onap/clamp/loop/template/PolicyModel.java
index fd0110c..7334ece 100644
--- a/src/main/java/org/onap/clamp/loop/template/PolicyModel.java
+++ b/src/main/java/org/onap/clamp/loop/template/PolicyModel.java
@@ -23,6 +23,7 @@
 
 package org.onap.clamp.loop.template;
 
+import com.google.gson.JsonObject;
 import com.google.gson.annotations.Expose;
 import java.io.Serializable;
 import java.util.HashSet;
@@ -34,6 +35,11 @@
 import javax.persistence.IdClass;
 import javax.persistence.ManyToMany;
 import javax.persistence.Table;
+
+import org.hibernate.annotations.Type;
+import org.hibernate.annotations.TypeDef;
+import org.hibernate.annotations.TypeDefs;
+import org.onap.clamp.dao.model.jsontype.StringJsonUserType;
 import org.onap.clamp.loop.common.AuditEntity;
 import org.onap.clamp.util.SemanticVersioning;
 
@@ -44,6 +50,7 @@
 @Entity
 @Table(name = "policy_models")
 @IdClass(PolicyModelId.class)
+@TypeDefs({@TypeDef(name = "json", typeClass = StringJsonUserType.class)})
 public class PolicyModel extends AuditEntity implements Serializable, Comparable<PolicyModel> {
 
     /**
@@ -78,6 +85,10 @@
     @ManyToMany(mappedBy = "policyModels", fetch = FetchType.EAGER)
     private Set<LoopElementModel> usedByElementModels = new HashSet<>();
 
+    @Type(type = "json")
+    @Column(columnDefinition = "json", name = "policy_pdp_group")
+    private JsonObject policyPdpGroup;
+
     /**
      * usedByElementModels getter.
      *
@@ -88,6 +99,24 @@
     }
 
     /**
+     * policyPdpGroup getter.
+     *
+     * @return the policyPdpGroup
+     */
+    public JsonObject getPolicyPdpGroup() {
+        return policyPdpGroup;
+    }
+
+    /**
+     * policyPdpGroup setter.
+     *
+     * @param policyPdpGroup the policyPdpGroup to set
+     */
+    public void setPolicyPdpGroup(JsonObject policyPdpGroup) {
+        this.policyPdpGroup = policyPdpGroup;
+    }
+
+    /**
      * policyModelTosca getter.
      *
      * @return the policyModelTosca
diff --git a/src/main/java/org/onap/clamp/loop/template/PolicyModelsService.java b/src/main/java/org/onap/clamp/loop/template/PolicyModelsService.java
index eb83c66..b38be94 100644
--- a/src/main/java/org/onap/clamp/loop/template/PolicyModelsService.java
+++ b/src/main/java/org/onap/clamp/loop/template/PolicyModelsService.java
@@ -23,12 +23,14 @@
 
 package org.onap.clamp.loop.template;
 
+import com.google.gson.JsonArray;
 import com.google.gson.JsonObject;
 import java.util.ArrayList;
 import java.util.Collections;
 import java.util.List;
 import org.onap.clamp.clds.tosca.ToscaSchemaConstants;
 import org.onap.clamp.clds.tosca.ToscaYamlToJsonConvertor;
+import org.onap.clamp.policy.pdpgroup.PdpGroup;
 import org.onap.clamp.util.SemanticVersioning;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
@@ -47,13 +49,30 @@
         toscaYamlToJsonConvertor = convertor;
     }
 
+    /**
+     * Save or Update Policy Model.
+     *
+     * @param policyModel
+     *        The policyModel
+     * @return The Policy Model
+     */
     public PolicyModel saveOrUpdatePolicyModel(PolicyModel policyModel) {
         return policyModelsRepository.save(policyModel);
     }
 
     /**
-     * Creates the Tosca Policy Model from a policy tosca file,
-     * if the same type already exists in database, it increases the version automatically.
+     * Verify whether Policy Model exist by ID.
+     *
+     * @param policyModelId
+     *        The policyModel Id
+     * @return The flag indicates whether Policy Model exist
+     */
+    public boolean existsById(PolicyModelId policyModelId) {
+        return policyModelsRepository.existsById(policyModelId);
+    }
+
+    /**
+     * Creates or updates the Tosca Policy Model.
      *
      * @param policyModelType  The policyModeltype in Tosca yaml
      * @param policyModelTosca The Policymodel object
@@ -137,4 +156,30 @@
             policyModelsRepository.save(policyModel);
         }
     }
+
+     /**
+     * Update the Pdp Group info in Policy Model DB.
+     *
+     * @param pdpGroupList The list of Pdp Group info received from Policy Engine
+     */
+    public void updatePdpGroupInfo(List<PdpGroup> pdpGroupList) {
+        List<PolicyModel> policyModelList = policyModelsRepository.findAll();
+        for (PolicyModel policyModel :  policyModelList) {
+            JsonArray supportedPdpGroups = new JsonArray();
+            for (PdpGroup pdpGroup : pdpGroupList) {
+                JsonObject supportedPdpGroup = pdpGroup.getSupportedSubgroups(policyModel.getPolicyModelType(),
+                        policyModel.getVersion());
+                if (supportedPdpGroup != null) {
+                    supportedPdpGroups.add(supportedPdpGroup);
+                }
+            }
+
+            if (supportedPdpGroups.size() > 0) {
+                JsonObject supportedPdpJson = new JsonObject ();
+                supportedPdpJson.add("supportedPdpGroups", supportedPdpGroups);
+                policyModel.setPolicyPdpGroup(supportedPdpJson);
+                policyModelsRepository.save(policyModel);
+            }
+        }
+    }
 }
diff --git a/src/main/java/org/onap/clamp/policy/Policy.java b/src/main/java/org/onap/clamp/policy/Policy.java
index e1c08ee..cce9e56 100644
--- a/src/main/java/org/onap/clamp/policy/Policy.java
+++ b/src/main/java/org/onap/clamp/policy/Policy.java
@@ -68,6 +68,10 @@
     @Column(name = "pdp_group")
     private String pdpGroup;
 
+    @Expose
+    @Column(name = "pdp_sub_group")
+    private String pdpSubGroup;
+
     public abstract String createPolicyPayload() throws UnsupportedEncodingException;
 
     /**
@@ -155,6 +159,24 @@
     }
 
     /**
+     * pdpSubGroup getter.
+     * 
+     * @return the pdpSubGroup
+     */
+    public String getPdpSubGroup() {
+        return pdpSubGroup;
+    }
+
+    /**
+     * pdpSubGroup setter.
+     * 
+     * @param pdpSubGroup the pdpSubGroup to set
+     */
+    public void setPdpSubGroup(String pdpSubGroup) {
+        this.pdpSubGroup = pdpSubGroup;
+    }
+
+    /**
      * Generate the policy name.
      *
      * @param policyType        The policy type
diff --git a/src/main/java/org/onap/clamp/policy/downloader/PolicyEngineController.java b/src/main/java/org/onap/clamp/policy/downloader/PolicyEngineController.java
index bd20ecc..ac054d8 100644
--- a/src/main/java/org/onap/clamp/policy/downloader/PolicyEngineController.java
+++ b/src/main/java/org/onap/clamp/policy/downloader/PolicyEngineController.java
@@ -28,6 +28,7 @@
 
 import java.time.Instant;
 
+import org.json.simple.parser.ParseException;
 import org.onap.clamp.clds.client.PolicyEngineServices;
 import org.onap.clamp.loop.template.PolicyModelsRepository;
 import org.springframework.beans.factory.annotation.Autowired;
@@ -70,5 +71,8 @@
         return lastInstantExecuted;
     }
 
-
+    @Scheduled(fixedRate = 300000)
+    public synchronized void downloadPdpGroups() throws ParseException {
+        policyEngineServices.downloadPdpGroups();
+    }
 }
diff --git a/src/main/java/org/onap/clamp/policy/pdpgroup/PdpGroup.java b/src/main/java/org/onap/clamp/policy/pdpgroup/PdpGroup.java
new file mode 100644
index 0000000..a3cf4e0
--- /dev/null
+++ b/src/main/java/org/onap/clamp/policy/pdpgroup/PdpGroup.java
@@ -0,0 +1,93 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * ONAP CLAMP
+ * ================================================================================
+ * Copyright (C) 2020 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.clamp.policy.pdpgroup;
+
+import com.google.gson.JsonArray;
+import com.google.gson.JsonObject;
+import com.google.gson.annotations.Expose;
+
+import java.util.List;
+
+/**
+ * This class maps the get Pdp Group response to a nice pojo.
+ */
+public class PdpGroup {
+
+    @Expose
+    private String name;
+
+    @Expose
+    private String pdpGroupState;
+
+    @Expose
+    private List<PdpSubgroup> pdpSubgroups;
+
+    public String getName() {
+        return name;
+    }
+
+    public void setName(String name) {
+        this.name = name;
+    }
+
+    public String getPdpGroupState() {
+        return pdpGroupState;
+    }
+
+    public void setPdpGroupState(String pdpGroupState) {
+        this.pdpGroupState = pdpGroupState;
+    }
+
+    public List<PdpSubgroup> getPdpSubgroups() {
+        return pdpSubgroups;
+    }
+
+    public void setPdpSubgroups(List<PdpSubgroup> pdpSubgroups) {
+        this.pdpSubgroups = pdpSubgroups;
+    }
+
+    /**
+     * Get supported subGroups based on the defined policy type and version.
+     * @param policyType The policy type
+     * @param version The version
+     * @return The supported subGroup list in Json format
+     */
+    public JsonObject getSupportedSubgroups(String policyType, String version) {
+        if (!pdpGroupState.equalsIgnoreCase("ACTIVE")) {
+            return null;
+        }
+        JsonArray supportedSubgroups =  new JsonArray();
+        for (PdpSubgroup subGroup : pdpSubgroups) {
+            if (subGroup.getSupportedPolicyTypes().contains(new PolicyModelKey(policyType, version))) {
+                supportedSubgroups.add(subGroup.getPdpType());
+            }
+        }
+        if (supportedSubgroups.size() > 0) {
+            JsonObject supportedPdpGroup = new JsonObject();
+            supportedPdpGroup.add(this.name, supportedSubgroups);
+            return supportedPdpGroup;
+        }
+        return null;
+    }
+}
diff --git a/src/main/java/org/onap/clamp/policy/pdpgroup/PdpSubgroup.java b/src/main/java/org/onap/clamp/policy/pdpgroup/PdpSubgroup.java
new file mode 100644
index 0000000..28de79a
--- /dev/null
+++ b/src/main/java/org/onap/clamp/policy/pdpgroup/PdpSubgroup.java
@@ -0,0 +1,56 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * ONAP CLAMP
+ * ================================================================================
+ * Copyright (C) 2020 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.clamp.policy.pdpgroup;
+
+import com.google.gson.annotations.Expose;
+import java.util.List;
+
+/**
+ * This class maps the Policy get PDP Group response to a nice pojo.
+ */
+public class PdpSubgroup {
+
+    @Expose
+    private String pdpType;
+
+    @Expose
+    private List<PolicyModelKey> supportedPolicyTypes;
+
+    public String getPdpType() {
+        return pdpType;
+    }
+
+    public void setPdpType(String pdpType) {
+        this.pdpType = pdpType;
+    }
+
+    public List<PolicyModelKey> getSupportedPolicyTypes() {
+        return supportedPolicyTypes;
+    }
+
+    public void setSupportedPolicyTypes(List<PolicyModelKey> supportedPolicyTypes) {
+        this.supportedPolicyTypes = supportedPolicyTypes;
+    }
+
+}
diff --git a/src/main/java/org/onap/clamp/policy/pdpgroup/PolicyModelKey.java b/src/main/java/org/onap/clamp/policy/pdpgroup/PolicyModelKey.java
new file mode 100644
index 0000000..707b3bd
--- /dev/null
+++ b/src/main/java/org/onap/clamp/policy/pdpgroup/PolicyModelKey.java
@@ -0,0 +1,126 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * ONAP CLAMP
+ * ================================================================================
+ * Copyright (C) 2020 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.clamp.policy.pdpgroup;
+
+import com.google.gson.annotations.Expose;
+
+import java.io.Serializable;
+
+public class PolicyModelKey implements Serializable {
+
+    /**
+     * The serial version ID.
+     */
+    private static final long serialVersionUID = 3307410842013230886L;
+
+    @Expose
+    private String name;
+
+    @Expose
+    private String version;
+
+    /**
+     * Constructor.
+     */
+    public PolicyModelKey(String name, String version) {
+        this.name = name;
+        this.version = version;
+    }
+
+    /**
+     * name getter.
+     * 
+     * @return the name
+     */
+    public String getName() {
+        return name;
+    }
+
+    /**
+     * name setter.
+     * 
+     * @param name the name to set
+     */
+    public void setName(String name) {
+        this.name = name;
+    }
+
+    /**
+     * version getter.
+     * 
+     * @return the version
+     */
+    public String getVersion() {
+        return version;
+    }
+
+    /**
+     * version setter.
+     * 
+     * @param version the version to set
+     */
+    public void setVersion(String version) {
+        this.version = version;
+    }
+
+    @Override
+    public int hashCode() {
+        final int prime = 31;
+        int result = 1;
+        result = prime * result + ((name == null) ? 0 : name.hashCode());
+        result = prime * result + ((version == null) ? 0 : version.hashCode());
+        return result;
+    }
+
+    @Override
+    public boolean equals(Object obj) {
+        if (this == obj) {
+            return true;
+        }
+        if (obj == null) {
+            return false;
+        }
+        if (getClass() != obj.getClass()) {
+            return false;
+        }
+        PolicyModelKey other = (PolicyModelKey) obj;
+        if (name == null) {
+            if (other.name != null) {
+                return false;
+            }
+        } else if (!name.equals(other.name)) {
+            if (!name.matches(other.name)) {
+                return false;
+            }
+        }
+        if (version == null) {
+            if (other.version != null) {
+                return false;
+            }
+        } else if (!version.equals(other.version)) {
+            return false;
+        }
+        return true;
+    }
+}
diff --git a/src/main/resources/META-INF/resources/swagger.html b/src/main/resources/META-INF/resources/swagger.html
index 1693852..0138d9a 100644
--- a/src/main/resources/META-INF/resources/swagger.html
+++ b/src/main/resources/META-INF/resources/swagger.html
@@ -444,25 +444,25 @@
 </li>
 <li><a href="#_paths">2. Paths</a>
 <ul class="sectlevel2">
-<li><a href="#_route123">2.1. GET /v1/healthcheck</a>
+<li><a href="#_route92">2.1. GET /v1/healthcheck</a>
 <ul class="sectlevel3">
 <li><a href="#_responses">2.1.1. Responses</a></li>
 <li><a href="#_produces">2.1.2. Produces</a></li>
 </ul>
 </li>
-<li><a href="#_route124">2.2. GET /v1/user/getUser</a>
+<li><a href="#_route93">2.2. GET /v1/user/getUser</a>
 <ul class="sectlevel3">
 <li><a href="#_responses_2">2.2.1. Responses</a></li>
 <li><a href="#_produces_2">2.2.2. Produces</a></li>
 </ul>
 </li>
-<li><a href="#_route111">2.3. GET /v2/dictionary</a>
+<li><a href="#_route80">2.3. GET /v2/dictionary</a>
 <ul class="sectlevel3">
 <li><a href="#_responses_3">2.3.1. Responses</a></li>
 <li><a href="#_produces_3">2.3.2. Produces</a></li>
 </ul>
 </li>
-<li><a href="#_route113">2.4. PUT /v2/dictionary</a>
+<li><a href="#_route82">2.4. PUT /v2/dictionary</a>
 <ul class="sectlevel3">
 <li><a href="#_parameters">2.4.1. Parameters</a></li>
 <li><a href="#_responses_4">2.4.2. Responses</a></li>
@@ -491,7 +491,7 @@
 <li><a href="#_produces_7">2.7.4. Produces</a></li>
 </ul>
 </li>
-<li><a href="#_route115">2.8. DELETE /v2/dictionary/{name}</a>
+<li><a href="#_route84">2.8. DELETE /v2/dictionary/{name}</a>
 <ul class="sectlevel3">
 <li><a href="#_parameters_4">2.8.1. Parameters</a></li>
 <li><a href="#_responses_8">2.8.2. Responses</a></li>
@@ -505,75 +505,75 @@
 <li><a href="#_produces_9">2.9.3. Produces</a></li>
 </ul>
 </li>
-<li><a href="#_route107">2.10. PUT /v2/loop/delete/{loopName}</a>
+<li><a href="#_route76">2.10. PUT /v2/loop/delete/{loopName}</a>
 <ul class="sectlevel3">
 <li><a href="#_parameters_6">2.10.1. Parameters</a></li>
 <li><a href="#_responses_10">2.10.2. Responses</a></li>
 </ul>
 </li>
-<li><a href="#_route101">2.11. PUT /v2/loop/deploy/{loopName}</a>
+<li><a href="#_route70">2.11. PUT /v2/loop/deploy/{loopName}</a>
 <ul class="sectlevel3">
 <li><a href="#_parameters_7">2.11.1. Parameters</a></li>
 <li><a href="#_responses_11">2.11.2. Responses</a></li>
 <li><a href="#_produces_10">2.11.3. Produces</a></li>
 </ul>
 </li>
-<li><a href="#_route95">2.12. GET /v2/loop/getAllNames</a>
+<li><a href="#_route64">2.12. GET /v2/loop/getAllNames</a>
 <ul class="sectlevel3">
 <li><a href="#_responses_12">2.12.1. Responses</a></li>
 <li><a href="#_produces_11">2.12.2. Produces</a></li>
 </ul>
 </li>
-<li><a href="#_route108">2.13. GET /v2/loop/getstatus/{loopName}</a>
+<li><a href="#_route77">2.13. GET /v2/loop/getstatus/{loopName}</a>
 <ul class="sectlevel3">
 <li><a href="#_parameters_8">2.13.1. Parameters</a></li>
 <li><a href="#_responses_13">2.13.2. Responses</a></li>
 <li><a href="#_produces_12">2.13.3. Produces</a></li>
 </ul>
 </li>
-<li><a href="#_route102">2.14. PUT /v2/loop/refreshOpPolicyJsonSchema/{loopName}</a>
+<li><a href="#_route71">2.14. PUT /v2/loop/refreshOpPolicyJsonSchema/{loopName}</a>
 <ul class="sectlevel3">
 <li><a href="#_parameters_9">2.14.1. Parameters</a></li>
 <li><a href="#_responses_14">2.14.2. Responses</a></li>
 <li><a href="#_produces_13">2.14.3. Produces</a></li>
 </ul>
 </li>
-<li><a href="#_route105">2.15. PUT /v2/loop/restart/{loopName}</a>
+<li><a href="#_route74">2.15. PUT /v2/loop/restart/{loopName}</a>
 <ul class="sectlevel3">
 <li><a href="#_parameters_10">2.15.1. Parameters</a></li>
 <li><a href="#_responses_15">2.15.2. Responses</a></li>
 <li><a href="#_produces_14">2.15.3. Produces</a></li>
 </ul>
 </li>
-<li><a href="#_route104">2.16. PUT /v2/loop/stop/{loopName}</a>
+<li><a href="#_route73">2.16. PUT /v2/loop/stop/{loopName}</a>
 <ul class="sectlevel3">
 <li><a href="#_parameters_11">2.16.1. Parameters</a></li>
 <li><a href="#_responses_16">2.16.2. Responses</a></li>
 <li><a href="#_produces_15">2.16.3. Produces</a></li>
 </ul>
 </li>
-<li><a href="#_route106">2.17. PUT /v2/loop/submit/{loopName}</a>
+<li><a href="#_route75">2.17. PUT /v2/loop/submit/{loopName}</a>
 <ul class="sectlevel3">
 <li><a href="#_parameters_12">2.17.1. Parameters</a></li>
 <li><a href="#_responses_17">2.17.2. Responses</a></li>
 <li><a href="#_produces_16">2.17.3. Produces</a></li>
 </ul>
 </li>
-<li><a href="#_route97">2.18. GET /v2/loop/svgRepresentation/{loopName}</a>
+<li><a href="#_route66">2.18. GET /v2/loop/svgRepresentation/{loopName}</a>
 <ul class="sectlevel3">
 <li><a href="#_parameters_13">2.18.1. Parameters</a></li>
 <li><a href="#_responses_18">2.18.2. Responses</a></li>
 <li><a href="#_produces_17">2.18.3. Produces</a></li>
 </ul>
 </li>
-<li><a href="#_route103">2.19. PUT /v2/loop/undeploy/{loopName}</a>
+<li><a href="#_route72">2.19. PUT /v2/loop/undeploy/{loopName}</a>
 <ul class="sectlevel3">
 <li><a href="#_parameters_14">2.19.1. Parameters</a></li>
 <li><a href="#_responses_19">2.19.2. Responses</a></li>
 <li><a href="#_produces_18">2.19.3. Produces</a></li>
 </ul>
 </li>
-<li><a href="#_route98">2.20. POST /v2/loop/updateGlobalProperties/{loopName}</a>
+<li><a href="#_route67">2.20. POST /v2/loop/updateGlobalProperties/{loopName}</a>
 <ul class="sectlevel3">
 <li><a href="#_parameters_15">2.20.1. Parameters</a></li>
 <li><a href="#_responses_20">2.20.2. Responses</a></li>
@@ -581,7 +581,7 @@
 <li><a href="#_produces_19">2.20.4. Produces</a></li>
 </ul>
 </li>
-<li><a href="#_route100">2.21. POST /v2/loop/updateMicroservicePolicy/{loopName}</a>
+<li><a href="#_route69">2.21. POST /v2/loop/updateMicroservicePolicy/{loopName}</a>
 <ul class="sectlevel3">
 <li><a href="#_parameters_16">2.21.1. Parameters</a></li>
 <li><a href="#_responses_21">2.21.2. Responses</a></li>
@@ -589,7 +589,7 @@
 <li><a href="#_produces_20">2.21.4. Produces</a></li>
 </ul>
 </li>
-<li><a href="#_route99">2.22. POST /v2/loop/updateOperationalPolicies/{loopName}</a>
+<li><a href="#_route68">2.22. POST /v2/loop/updateOperationalPolicies/{loopName}</a>
 <ul class="sectlevel3">
 <li><a href="#_parameters_17">2.22.1. Parameters</a></li>
 <li><a href="#_responses_22">2.22.2. Responses</a></li>
@@ -597,14 +597,14 @@
 <li><a href="#_produces_21">2.22.4. Produces</a></li>
 </ul>
 </li>
-<li><a href="#_route96">2.23. GET /v2/loop/{loopName}</a>
+<li><a href="#_route65">2.23. GET /v2/loop/{loopName}</a>
 <ul class="sectlevel3">
 <li><a href="#_parameters_18">2.23.1. Parameters</a></li>
 <li><a href="#_responses_23">2.23.2. Responses</a></li>
 <li><a href="#_produces_22">2.23.3. Produces</a></li>
 </ul>
 </li>
-<li><a href="#_route118">2.24. GET /v2/policyToscaModels</a>
+<li><a href="#_route87">2.24. GET /v2/policyToscaModels</a>
 <ul class="sectlevel3">
 <li><a href="#_responses_24">2.24.1. Responses</a></li>
 <li><a href="#_produces_23">2.24.2. Produces</a></li>
@@ -624,7 +624,7 @@
 <li><a href="#_produces_25">2.26.3. Produces</a></li>
 </ul>
 </li>
-<li><a href="#_route119">2.27. PUT /v2/policyToscaModels/{policyModelType}</a>
+<li><a href="#_route88">2.27. PUT /v2/policyToscaModels/{policyModelType}</a>
 <ul class="sectlevel3">
 <li><a href="#_parameters_21">2.27.1. Parameters</a></li>
 <li><a href="#_responses_27">2.27.2. Responses</a></li>
@@ -632,7 +632,7 @@
 <li><a href="#_produces_26">2.27.4. Produces</a></li>
 </ul>
 </li>
-<li><a href="#_route122">2.28. GET /v2/templates</a>
+<li><a href="#_route91">2.28. GET /v2/templates</a>
 <ul class="sectlevel3">
 <li><a href="#_responses_28">2.28.1. Responses</a></li>
 <li><a href="#_produces_27">2.28.2. Produces</a></li>
@@ -692,7 +692,7 @@
 <div class="sect2">
 <h3 id="_uri_scheme"><a class="anchor" href="#_uri_scheme"></a><a class="link" href="#_uri_scheme">1.2. URI scheme</a></h3>
 <div class="paragraph">
-<p><em>Host</em> : localhost:32977<br>
+<p><em>Host</em> : localhost:33631<br>
 <em>BasePath</em> : /restservices/clds/<br>
 <em>Schemes</em> : HTTP</p>
 </div>
@@ -703,7 +703,7 @@
 <h2 id="_paths"><a class="anchor" href="#_paths"></a><a class="link" href="#_paths">2. Paths</a></h2>
 <div class="sectionbody">
 <div class="sect2">
-<h3 id="_route123"><a class="anchor" href="#_route123"></a><a class="link" href="#_route123">2.1. GET /v1/healthcheck</a></h3>
+<h3 id="_route92"><a class="anchor" href="#_route92"></a><a class="link" href="#_route92">2.1. GET /v1/healthcheck</a></h3>
 <div class="sect3">
 <h4 id="_responses"><a class="anchor" href="#_responses"></a><a class="link" href="#_responses">2.1.1. Responses</a></h4>
 <table class="tableblock frame-all grid-all stretch">
@@ -740,7 +740,7 @@
 </div>
 </div>
 <div class="sect2">
-<h3 id="_route124"><a class="anchor" href="#_route124"></a><a class="link" href="#_route124">2.2. GET /v1/user/getUser</a></h3>
+<h3 id="_route93"><a class="anchor" href="#_route93"></a><a class="link" href="#_route93">2.2. GET /v1/user/getUser</a></h3>
 <div class="sect3">
 <h4 id="_responses_2"><a class="anchor" href="#_responses_2"></a><a class="link" href="#_responses_2">2.2.1. Responses</a></h4>
 <table class="tableblock frame-all grid-all stretch">
@@ -774,7 +774,7 @@
 </div>
 </div>
 <div class="sect2">
-<h3 id="_route111"><a class="anchor" href="#_route111"></a><a class="link" href="#_route111">2.3. GET /v2/dictionary</a></h3>
+<h3 id="_route80"><a class="anchor" href="#_route80"></a><a class="link" href="#_route80">2.3. GET /v2/dictionary</a></h3>
 <div class="sect3">
 <h4 id="_responses_3"><a class="anchor" href="#_responses_3"></a><a class="link" href="#_responses_3">2.3.1. Responses</a></h4>
 <table class="tableblock frame-all grid-all stretch">
@@ -811,7 +811,7 @@
 </div>
 </div>
 <div class="sect2">
-<h3 id="_route113"><a class="anchor" href="#_route113"></a><a class="link" href="#_route113">2.4. PUT /v2/dictionary</a></h3>
+<h3 id="_route82"><a class="anchor" href="#_route82"></a><a class="link" href="#_route82">2.4. PUT /v2/dictionary</a></h3>
 <div class="sect3">
 <h4 id="_parameters"><a class="anchor" href="#_parameters"></a><a class="link" href="#_parameters">2.4.1. Parameters</a></h4>
 <table class="tableblock frame-all grid-all stretch">
@@ -1060,7 +1060,7 @@
 </div>
 </div>
 <div class="sect2">
-<h3 id="_route115"><a class="anchor" href="#_route115"></a><a class="link" href="#_route115">2.8. DELETE /v2/dictionary/{name}</a></h3>
+<h3 id="_route84"><a class="anchor" href="#_route84"></a><a class="link" href="#_route84">2.8. DELETE /v2/dictionary/{name}</a></h3>
 <div class="sect3">
 <h4 id="_parameters_4"><a class="anchor" href="#_parameters_4"></a><a class="link" href="#_parameters_4">2.8.1. Parameters</a></h4>
 <table class="tableblock frame-all grid-all stretch">
@@ -1184,7 +1184,7 @@
 </div>
 </div>
 <div class="sect2">
-<h3 id="_route107"><a class="anchor" href="#_route107"></a><a class="link" href="#_route107">2.10. PUT /v2/loop/delete/{loopName}</a></h3>
+<h3 id="_route76"><a class="anchor" href="#_route76"></a><a class="link" href="#_route76">2.10. PUT /v2/loop/delete/{loopName}</a></h3>
 <div class="sect3">
 <h4 id="_parameters_6"><a class="anchor" href="#_parameters_6"></a><a class="link" href="#_parameters_6">2.10.1. Parameters</a></h4>
 <table class="tableblock frame-all grid-all stretch">
@@ -1233,7 +1233,7 @@
 </div>
 </div>
 <div class="sect2">
-<h3 id="_route101"><a class="anchor" href="#_route101"></a><a class="link" href="#_route101">2.11. PUT /v2/loop/deploy/{loopName}</a></h3>
+<h3 id="_route70"><a class="anchor" href="#_route70"></a><a class="link" href="#_route70">2.11. PUT /v2/loop/deploy/{loopName}</a></h3>
 <div class="sect3">
 <h4 id="_parameters_7"><a class="anchor" href="#_parameters_7"></a><a class="link" href="#_parameters_7">2.11.1. Parameters</a></h4>
 <table class="tableblock frame-all grid-all stretch">
@@ -1295,7 +1295,7 @@
 </div>
 </div>
 <div class="sect2">
-<h3 id="_route95"><a class="anchor" href="#_route95"></a><a class="link" href="#_route95">2.12. GET /v2/loop/getAllNames</a></h3>
+<h3 id="_route64"><a class="anchor" href="#_route64"></a><a class="link" href="#_route64">2.12. GET /v2/loop/getAllNames</a></h3>
 <div class="sect3">
 <h4 id="_responses_12"><a class="anchor" href="#_responses_12"></a><a class="link" href="#_responses_12">2.12.1. Responses</a></h4>
 <table class="tableblock frame-all grid-all stretch">
@@ -1332,7 +1332,7 @@
 </div>
 </div>
 <div class="sect2">
-<h3 id="_route108"><a class="anchor" href="#_route108"></a><a class="link" href="#_route108">2.13. GET /v2/loop/getstatus/{loopName}</a></h3>
+<h3 id="_route77"><a class="anchor" href="#_route77"></a><a class="link" href="#_route77">2.13. GET /v2/loop/getstatus/{loopName}</a></h3>
 <div class="sect3">
 <h4 id="_parameters_8"><a class="anchor" href="#_parameters_8"></a><a class="link" href="#_parameters_8">2.13.1. Parameters</a></h4>
 <table class="tableblock frame-all grid-all stretch">
@@ -1394,7 +1394,7 @@
 </div>
 </div>
 <div class="sect2">
-<h3 id="_route102"><a class="anchor" href="#_route102"></a><a class="link" href="#_route102">2.14. PUT /v2/loop/refreshOpPolicyJsonSchema/{loopName}</a></h3>
+<h3 id="_route71"><a class="anchor" href="#_route71"></a><a class="link" href="#_route71">2.14. PUT /v2/loop/refreshOpPolicyJsonSchema/{loopName}</a></h3>
 <div class="sect3">
 <h4 id="_parameters_9"><a class="anchor" href="#_parameters_9"></a><a class="link" href="#_parameters_9">2.14.1. Parameters</a></h4>
 <table class="tableblock frame-all grid-all stretch">
@@ -1456,7 +1456,7 @@
 </div>
 </div>
 <div class="sect2">
-<h3 id="_route105"><a class="anchor" href="#_route105"></a><a class="link" href="#_route105">2.15. PUT /v2/loop/restart/{loopName}</a></h3>
+<h3 id="_route74"><a class="anchor" href="#_route74"></a><a class="link" href="#_route74">2.15. PUT /v2/loop/restart/{loopName}</a></h3>
 <div class="sect3">
 <h4 id="_parameters_10"><a class="anchor" href="#_parameters_10"></a><a class="link" href="#_parameters_10">2.15.1. Parameters</a></h4>
 <table class="tableblock frame-all grid-all stretch">
@@ -1518,7 +1518,7 @@
 </div>
 </div>
 <div class="sect2">
-<h3 id="_route104"><a class="anchor" href="#_route104"></a><a class="link" href="#_route104">2.16. PUT /v2/loop/stop/{loopName}</a></h3>
+<h3 id="_route73"><a class="anchor" href="#_route73"></a><a class="link" href="#_route73">2.16. PUT /v2/loop/stop/{loopName}</a></h3>
 <div class="sect3">
 <h4 id="_parameters_11"><a class="anchor" href="#_parameters_11"></a><a class="link" href="#_parameters_11">2.16.1. Parameters</a></h4>
 <table class="tableblock frame-all grid-all stretch">
@@ -1580,7 +1580,7 @@
 </div>
 </div>
 <div class="sect2">
-<h3 id="_route106"><a class="anchor" href="#_route106"></a><a class="link" href="#_route106">2.17. PUT /v2/loop/submit/{loopName}</a></h3>
+<h3 id="_route75"><a class="anchor" href="#_route75"></a><a class="link" href="#_route75">2.17. PUT /v2/loop/submit/{loopName}</a></h3>
 <div class="sect3">
 <h4 id="_parameters_12"><a class="anchor" href="#_parameters_12"></a><a class="link" href="#_parameters_12">2.17.1. Parameters</a></h4>
 <table class="tableblock frame-all grid-all stretch">
@@ -1642,7 +1642,7 @@
 </div>
 </div>
 <div class="sect2">
-<h3 id="_route97"><a class="anchor" href="#_route97"></a><a class="link" href="#_route97">2.18. GET /v2/loop/svgRepresentation/{loopName}</a></h3>
+<h3 id="_route66"><a class="anchor" href="#_route66"></a><a class="link" href="#_route66">2.18. GET /v2/loop/svgRepresentation/{loopName}</a></h3>
 <div class="sect3">
 <h4 id="_parameters_13"><a class="anchor" href="#_parameters_13"></a><a class="link" href="#_parameters_13">2.18.1. Parameters</a></h4>
 <table class="tableblock frame-all grid-all stretch">
@@ -1704,7 +1704,7 @@
 </div>
 </div>
 <div class="sect2">
-<h3 id="_route103"><a class="anchor" href="#_route103"></a><a class="link" href="#_route103">2.19. PUT /v2/loop/undeploy/{loopName}</a></h3>
+<h3 id="_route72"><a class="anchor" href="#_route72"></a><a class="link" href="#_route72">2.19. PUT /v2/loop/undeploy/{loopName}</a></h3>
 <div class="sect3">
 <h4 id="_parameters_14"><a class="anchor" href="#_parameters_14"></a><a class="link" href="#_parameters_14">2.19.1. Parameters</a></h4>
 <table class="tableblock frame-all grid-all stretch">
@@ -1766,7 +1766,7 @@
 </div>
 </div>
 <div class="sect2">
-<h3 id="_route98"><a class="anchor" href="#_route98"></a><a class="link" href="#_route98">2.20. POST /v2/loop/updateGlobalProperties/{loopName}</a></h3>
+<h3 id="_route67"><a class="anchor" href="#_route67"></a><a class="link" href="#_route67">2.20. POST /v2/loop/updateGlobalProperties/{loopName}</a></h3>
 <div class="sect3">
 <h4 id="_parameters_15"><a class="anchor" href="#_parameters_15"></a><a class="link" href="#_parameters_15">2.20.1. Parameters</a></h4>
 <table class="tableblock frame-all grid-all stretch">
@@ -1844,7 +1844,7 @@
 </div>
 </div>
 <div class="sect2">
-<h3 id="_route100"><a class="anchor" href="#_route100"></a><a class="link" href="#_route100">2.21. POST /v2/loop/updateMicroservicePolicy/{loopName}</a></h3>
+<h3 id="_route69"><a class="anchor" href="#_route69"></a><a class="link" href="#_route69">2.21. POST /v2/loop/updateMicroservicePolicy/{loopName}</a></h3>
 <div class="sect3">
 <h4 id="_parameters_16"><a class="anchor" href="#_parameters_16"></a><a class="link" href="#_parameters_16">2.21.1. Parameters</a></h4>
 <table class="tableblock frame-all grid-all stretch">
@@ -1922,7 +1922,7 @@
 </div>
 </div>
 <div class="sect2">
-<h3 id="_route99"><a class="anchor" href="#_route99"></a><a class="link" href="#_route99">2.22. POST /v2/loop/updateOperationalPolicies/{loopName}</a></h3>
+<h3 id="_route68"><a class="anchor" href="#_route68"></a><a class="link" href="#_route68">2.22. POST /v2/loop/updateOperationalPolicies/{loopName}</a></h3>
 <div class="sect3">
 <h4 id="_parameters_17"><a class="anchor" href="#_parameters_17"></a><a class="link" href="#_parameters_17">2.22.1. Parameters</a></h4>
 <table class="tableblock frame-all grid-all stretch">
@@ -2000,7 +2000,7 @@
 </div>
 </div>
 <div class="sect2">
-<h3 id="_route96"><a class="anchor" href="#_route96"></a><a class="link" href="#_route96">2.23. GET /v2/loop/{loopName}</a></h3>
+<h3 id="_route65"><a class="anchor" href="#_route65"></a><a class="link" href="#_route65">2.23. GET /v2/loop/{loopName}</a></h3>
 <div class="sect3">
 <h4 id="_parameters_18"><a class="anchor" href="#_parameters_18"></a><a class="link" href="#_parameters_18">2.23.1. Parameters</a></h4>
 <table class="tableblock frame-all grid-all stretch">
@@ -2062,7 +2062,7 @@
 </div>
 </div>
 <div class="sect2">
-<h3 id="_route118"><a class="anchor" href="#_route118"></a><a class="link" href="#_route118">2.24. GET /v2/policyToscaModels</a></h3>
+<h3 id="_route87"><a class="anchor" href="#_route87"></a><a class="link" href="#_route87">2.24. GET /v2/policyToscaModels</a></h3>
 <div class="sect3">
 <h4 id="_responses_24"><a class="anchor" href="#_responses_24"></a><a class="link" href="#_responses_24">2.24.1. Responses</a></h4>
 <table class="tableblock frame-all grid-all stretch">
@@ -2223,7 +2223,7 @@
 </div>
 </div>
 <div class="sect2">
-<h3 id="_route119"><a class="anchor" href="#_route119"></a><a class="link" href="#_route119">2.27. PUT /v2/policyToscaModels/{policyModelType}</a></h3>
+<h3 id="_route88"><a class="anchor" href="#_route88"></a><a class="link" href="#_route88">2.27. PUT /v2/policyToscaModels/{policyModelType}</a></h3>
 <div class="sect3">
 <h4 id="_parameters_21"><a class="anchor" href="#_parameters_21"></a><a class="link" href="#_parameters_21">2.27.1. Parameters</a></h4>
 <table class="tableblock frame-all grid-all stretch">
@@ -2301,7 +2301,7 @@
 </div>
 </div>
 <div class="sect2">
-<h3 id="_route122"><a class="anchor" href="#_route122"></a><a class="link" href="#_route122">2.28. GET /v2/templates</a></h3>
+<h3 id="_route91"><a class="anchor" href="#_route91"></a><a class="link" href="#_route91">2.28. GET /v2/templates</a></h3>
 <div class="sect3">
 <h4 id="_responses_28"><a class="anchor" href="#_responses_28"></a><a class="link" href="#_responses_28">2.28.1. Responses</a></h4>
 <table class="tableblock frame-all grid-all stretch">
@@ -3758,7 +3758,7 @@
 </div>
 <div id="footer">
 <div id="footer-text">
-Last updated 2020-02-12 02:20:53 PST
+Last updated 2019-05-27 14:30:20 CEST
 </div>
 </div>
 </body>
diff --git a/src/main/resources/clds/camel/routes/policy-flows.xml b/src/main/resources/clds/camel/routes/policy-flows.xml
index c28e454..ce37fe1 100644
--- a/src/main/resources/clds/camel/routes/policy-flows.xml
+++ b/src/main/resources/clds/camel/routes/policy-flows.xml
@@ -175,7 +175,7 @@
 								message="Endpoint to get policy model: {{clamp.config.policy.pap.url}}/policy/api/v1/policytypes/${exchangeProperty[policyModelName]}/versions/${exchangeProperty[policyModelVersion]}"></log>
 						<toD
 								uri="{{clamp.config.policy.api.url}}/policy/api/v1/policytypes/${exchangeProperty[policyModelName]}/versions/${exchangeProperty[policyModelVersion]}?bridgeEndpoint=true&amp;useSystemProperties=true&amp;throwExceptionOnFailure=${exchangeProperty[raiseHttpExceptionFlag]}&amp;authMethod=Basic&amp;authUsername={{clamp.config.policy.api.userName}}&amp;authPassword={{clamp.config.policy.api.password}}&amp;connectionTimeToLive=5000&amp;httpClient.connectTimeout=10000&amp;httpClient.socketTimeout=20000&amp;authenticationPreemptive=true&amp;connectionClose=true"/>
-					    <convertBodyTo type="java.lang.String"/>
+						<convertBodyTo type="java.lang.String"/>
 						<doFinally>
 								<to uri="direct:reset-raise-http-exception-flag"/>
 								<to
@@ -584,4 +584,38 @@
 						</doFinally>
 				</doTry>
 		</route>
+		<route id="get-all-pdp-groups">
+				<from uri="direct:get-all-pdp-groups"/>
+				<doTry>
+						<log loggingLevel="INFO"
+								message="Getting the list of PDP Groups"/>
+						<to
+								uri="bean:org.onap.clamp.flow.log.FlowLogOperation?method=invokeLog('Policy', 'Getting the PDP Group list')"/>
+						<setHeader headerName="CamelHttpMethod">
+								<constant>GET</constant>
+						</setHeader>
+						<setHeader headerName="X-ONAP-RequestID">
+								<simple>${exchangeProperty[X-ONAP-RequestID]}
+								</simple>
+						</setHeader>
+						<setHeader headerName="X-ONAP-InvocationID">
+								<simple>${exchangeProperty[X-ONAP-InvocationID]}
+								</simple>
+						</setHeader>
+						<setHeader headerName="X-ONAP-PartnerName">
+								<simple>${exchangeProperty[X-ONAP-PartnerName]}
+								</simple>
+						</setHeader>
+						<log loggingLevel="INFO"
+								message="Endpoint to get policy model: {{clamp.config.policy.pap.url}}/policy/pap/v1/pdps"></log>
+						<toD
+								uri="{{clamp.config.policy.api.url}}/policy/pap/v1/pdps?bridgeEndpoint=true&amp;useSystemProperties=true&amp;throwExceptionOnFailure=${exchangeProperty[raiseHttpExceptionFlag]}&amp;authMethod=Basic&amp;authUsername={{clamp.config.policy.api.userName}}&amp;authPassword={{clamp.config.policy.api.password}}&amp;connectionTimeToLive=5000&amp;httpClient.connectTimeout=10000&amp;httpClient.socketTimeout=20000&amp;authenticationPreemptive=true&amp;connectionClose=true"/>
+						<convertBodyTo type="java.lang.String" />
+						<doFinally>
+								<to uri="direct:reset-raise-http-exception-flag"/>
+								<to
+										uri="bean:org.onap.clamp.flow.log.FlowLogOperation?method=invokeReturnLog()"/>
+						</doFinally>
+				</doTry>
+		</route>
 </routes>
\ No newline at end of file
diff --git a/src/test/java/org/onap/clamp/loop/LoopServiceTestItCase.java b/src/test/java/org/onap/clamp/loop/LoopServiceTestItCase.java
index 1526487..5eca90c 100644
--- a/src/test/java/org/onap/clamp/loop/LoopServiceTestItCase.java
+++ b/src/test/java/org/onap/clamp/loop/LoopServiceTestItCase.java
@@ -46,6 +46,7 @@
 import org.onap.clamp.policy.operational.OperationalPolicyService;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.boot.test.context.SpringBootTest;
+import org.springframework.test.annotation.Commit;
 import org.springframework.test.context.junit4.SpringRunner;
 
 @RunWith(SpringRunner.class)
@@ -148,6 +149,7 @@
 
     @Test
     @Transactional
+    //@Commit
     public void shouldCreateNewMicroservicePolicyAndUpdateJsonRepresentationOfOldOne() {
         // given
         saveTestLoopToDb();
diff --git a/src/test/java/org/onap/clamp/loop/PolicyModelServiceItCase.java b/src/test/java/org/onap/clamp/loop/PolicyModelServiceItCase.java
index abeecd1..f8aadba 100644
--- a/src/test/java/org/onap/clamp/loop/PolicyModelServiceItCase.java
+++ b/src/test/java/org/onap/clamp/loop/PolicyModelServiceItCase.java
@@ -25,6 +25,7 @@
 
 import static org.assertj.core.api.Assertions.assertThat;
 
+import java.util.LinkedList;
 import java.util.List;
 import java.util.SortedSet;
 import java.util.TreeSet;
@@ -33,14 +34,20 @@
 import org.junit.Test;
 import org.junit.runner.RunWith;
 import org.onap.clamp.clds.Application;
+import org.onap.clamp.clds.util.JsonUtils;
 import org.onap.clamp.loop.template.PolicyModel;
 import org.onap.clamp.loop.template.PolicyModelId;
 import org.onap.clamp.loop.template.PolicyModelsRepository;
 import org.onap.clamp.loop.template.PolicyModelsService;
+import org.onap.clamp.policy.pdpgroup.PdpGroup;
+import org.onap.clamp.policy.pdpgroup.PdpSubgroup;
+import org.onap.clamp.policy.pdpgroup.PolicyModelKey;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.boot.test.context.SpringBootTest;
 import org.springframework.test.context.junit4.SpringRunner;
 
+import com.google.gson.JsonObject;
+
 @RunWith(SpringRunner.class)
 @SpringBootTest(classes = Application.class)
 public class PolicyModelServiceItCase {
@@ -167,4 +174,71 @@
         assertThat(listToCheck.get(1)).isEqualByComparingTo(policyModel1);
         assertThat(listToCheck.get(2)).isEqualByComparingTo(policyModel3);
     }
+
+    @Test
+    @Transactional
+    public void shouldAddPdpGroupInfo() {
+        PolicyModel policyModel1 = getPolicyModel(POLICY_MODEL_TYPE_1, "yaml", POLICY_MODEL_TYPE_1_VERSION_1, "TEST",
+                "VARIANT", "user");
+        policyModelsService.saveOrUpdatePolicyModel(policyModel1);
+        PolicyModel policyModel2 = getPolicyModel(POLICY_MODEL_TYPE_2, "yaml", POLICY_MODEL_TYPE_2_VERSION_2, "TEST",
+                "VARIANT", "user");
+        policyModelsService.saveOrUpdatePolicyModel(policyModel2);
+        PolicyModel policyModel3 = getPolicyModel(POLICY_MODEL_TYPE_3, "yaml", POLICY_MODEL_TYPE_3_VERSION_1, "TEST",
+                "VARIANT", "user");
+        policyModelsService.saveOrUpdatePolicyModel(policyModel3);
+
+
+        PolicyModelKey type1 = new PolicyModelKey("org.onap.testos", "1.0.0");
+        PolicyModelKey type2 = new PolicyModelKey("org.onap.testos2", "2.0.0");
+
+        PdpSubgroup pdpSubgroup1 = new PdpSubgroup();
+        pdpSubgroup1.setPdpType("subGroup1");
+        List<PolicyModelKey> pdpTypeList = new LinkedList<PolicyModelKey>();
+        pdpTypeList.add(type1);
+        pdpTypeList.add(type2);
+        pdpSubgroup1.setSupportedPolicyTypes(pdpTypeList);
+
+        PolicyModelKey type3 = new PolicyModelKey("org.onap.testos3", "2.0.0");
+        PdpSubgroup pdpSubgroup2 = new PdpSubgroup();
+        pdpSubgroup2.setPdpType("subGroup2");
+        List<PolicyModelKey> pdpTypeList2 = new LinkedList<PolicyModelKey>();
+        pdpTypeList2.add(type2);
+        pdpTypeList2.add(type3);
+        pdpSubgroup2.setSupportedPolicyTypes(pdpTypeList2);
+
+        List<PdpSubgroup> pdpSubgroupList = new LinkedList<PdpSubgroup>();
+        pdpSubgroupList.add(pdpSubgroup1);
+
+        PdpGroup pdpGroup1 = new PdpGroup();
+        pdpGroup1.setName("pdpGroup1");
+        pdpGroup1.setPdpGroupState("ACTIVE");
+        pdpGroup1.setPdpSubgroups(pdpSubgroupList);
+
+        List<PdpSubgroup> pdpSubgroupList2 = new LinkedList<PdpSubgroup>();
+        pdpSubgroupList2.add(pdpSubgroup1);
+        pdpSubgroupList2.add(pdpSubgroup2);
+        PdpGroup pdpGroup2 = new PdpGroup();
+        pdpGroup2.setName("pdpGroup2");
+        pdpGroup2.setPdpGroupState("ACTIVE");
+        pdpGroup2.setPdpSubgroups(pdpSubgroupList2);
+
+        List<PdpGroup> pdpGroupList = new LinkedList<PdpGroup>();
+        pdpGroupList.add(pdpGroup1);
+        pdpGroupList.add(pdpGroup2);
+        policyModelsService.updatePdpGroupInfo(pdpGroupList);
+
+        JsonObject res1 = policyModelsService.getPolicyModel("org.onap.testos", "1.0.0").getPolicyPdpGroup();
+        String expectedRes1 = "{\"supportedPdpGroups\":[{\"pdpGroup1\":[\"subGroup1\"]},{\"pdpGroup2\":[\"subGroup1\"]}]}";
+        JsonObject expectedJson1 = JsonUtils.GSON.fromJson(expectedRes1, JsonObject.class);
+        assertThat(res1).isEqualTo(expectedJson1);
+
+        JsonObject res2 = policyModelsService.getPolicyModel("org.onap.testos2", "2.0.0").getPolicyPdpGroup();
+        String expectedRes2 = "{\"supportedPdpGroups\":[{\"pdpGroup1\":[\"subGroup1\"]},{\"pdpGroup2\":[\"subGroup1\",\"subGroup2\"]}]}";
+        JsonObject expectedJson2 = JsonUtils.GSON.fromJson(expectedRes2, JsonObject.class);
+        assertThat(res2).isEqualTo(expectedJson2);
+
+        JsonObject res3 = policyModelsService.getPolicyModel("org.onap.testos3", "1.0.0").getPolicyPdpGroup();
+        assertThat(res3).isNull();
+    }
 }
diff --git a/src/test/java/org/onap/clamp/policy/downloader/PolicyEngineControllerTestItCase.java b/src/test/java/org/onap/clamp/policy/downloader/PolicyEngineControllerTestItCase.java
index b42e153..3f502ff 100644
--- a/src/test/java/org/onap/clamp/policy/downloader/PolicyEngineControllerTestItCase.java
+++ b/src/test/java/org/onap/clamp/policy/downloader/PolicyEngineControllerTestItCase.java
@@ -24,15 +24,19 @@
 
 import static org.assertj.core.api.Assertions.assertThat;
 
+import com.google.gson.JsonObject;
 import com.google.gson.JsonSyntaxException;
 import java.io.IOException;
 import java.time.Instant;
 import java.util.List;
 import javax.transaction.Transactional;
+import org.json.simple.parser.ParseException;
 import org.junit.Test;
 import org.junit.runner.RunWith;
 import org.onap.clamp.clds.Application;
+import org.onap.clamp.clds.util.JsonUtils;
 import org.onap.clamp.loop.template.PolicyModel;
+import org.onap.clamp.loop.template.PolicyModelId;
 import org.onap.clamp.loop.template.PolicyModelsRepository;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.boot.test.context.SpringBootTest;
@@ -76,4 +80,30 @@
         assertThat(firstExecution).isBefore(secondExecution);
     }
 
+    @Test
+    @Transactional
+    public void downloadPdpGroupsTest() throws JsonSyntaxException, IOException, InterruptedException, ParseException {
+        PolicyModel policyModel1 = new PolicyModel("onap.policies.monitoring.test", null, "1.0.0");
+        policyModelsRepository.saveAndFlush(policyModel1);
+        PolicyModel policyModel2 = new PolicyModel("onap.policies.controlloop.Operational", null, "1.0.0");
+        policyModelsRepository.saveAndFlush(policyModel2);
+
+        policyController.downloadPdpGroups();
+
+        List<PolicyModel> policyModelsList = policyModelsRepository.findAll();
+        assertThat(policyModelsList.size()).isGreaterThanOrEqualTo(2);
+
+        PolicyModel policy1 = policyModelsRepository
+                .getOne(new PolicyModelId("onap.policies.monitoring.test", "1.0.0"));
+        PolicyModel policy2 = policyModelsRepository
+                .getOne(new PolicyModelId("onap.policies.controlloop.Operational", "1.0.0"));
+
+        String expectedRes1 = "{\"supportedPdpGroups\":[{\"monitoring\":[\"xacml\"]}]}";
+        JsonObject expectedJson1 = JsonUtils.GSON.fromJson(expectedRes1, JsonObject.class);
+        assertThat(policy1.getPolicyPdpGroup()).isEqualTo(expectedJson1);
+        String expectedRes2 = "{\"supportedPdpGroups\":[{\"controlloop\":[\"apex\",\"drools\"]}]}";
+        JsonObject expectedJson2 = JsonUtils.GSON.fromJson(expectedRes2, JsonObject.class);
+        assertThat(policy2.getPolicyPdpGroup()).isEqualTo(expectedJson2);
+
+    }
 }
diff --git a/src/test/java/org/onap/clamp/policy/pdpgroup/PdpGroupTest.java b/src/test/java/org/onap/clamp/policy/pdpgroup/PdpGroupTest.java
new file mode 100644
index 0000000..b6f7c54
--- /dev/null
+++ b/src/test/java/org/onap/clamp/policy/pdpgroup/PdpGroupTest.java
@@ -0,0 +1,88 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * ONAP CLAMP
+ * ================================================================================
+ * Copyright (C) 2020 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.clamp.policy.pdpgroup;
+
+import static org.assertj.core.api.Assertions.assertThat;
+
+import com.google.gson.JsonArray;
+import com.google.gson.JsonObject;
+
+import java.io.IOException;
+import java.util.LinkedList;
+import java.util.List;
+
+import org.junit.Test;
+
+public class PdpGroupTest {
+
+
+    @Test
+    public void testGetSupportedSubgroups() throws IOException {
+        PdpGroup pdpGroup1 = new PdpGroup();
+        pdpGroup1.setName("pdpGroup1");
+        pdpGroup1.setPdpGroupState("INACTIVE");
+        assertThat(pdpGroup1.getSupportedSubgroups("test", "1.0.0")).isNull();
+
+        PdpGroup pdpGroup2 = new PdpGroup();
+        pdpGroup2.setName("pdpGroup2");
+        pdpGroup2.setPdpGroupState("ACTIVE");
+
+        PolicyModelKey type1 = new PolicyModelKey("type1", "1.0.0");
+        PolicyModelKey type2 = new PolicyModelKey("type2", "2.0.0");
+
+        PdpSubgroup pdpSubgroup1 = new PdpSubgroup();
+        pdpSubgroup1.setPdpType("subGroup1");
+        List<PolicyModelKey> pdpTypeList = new LinkedList<PolicyModelKey>();
+        pdpTypeList.add(type1);
+        pdpTypeList.add(type2);
+        pdpSubgroup1.setSupportedPolicyTypes(pdpTypeList);
+
+        PolicyModelKey type3 = new PolicyModelKey("type3", "1.0.0");
+        PdpSubgroup pdpSubgroup2 = new PdpSubgroup();
+        pdpSubgroup2.setPdpType("subGroup2");
+        List<PolicyModelKey> pdpTypeList2 = new LinkedList<PolicyModelKey>();
+        pdpTypeList2.add(type2);
+        pdpTypeList2.add(type3);
+        pdpSubgroup2.setSupportedPolicyTypes(pdpTypeList2);
+
+        List<PdpSubgroup> pdpSubgroupList = new LinkedList<PdpSubgroup>();
+        pdpSubgroupList.add(pdpSubgroup1);
+        pdpSubgroupList.add(pdpSubgroup2);
+        pdpGroup2.setPdpSubgroups(pdpSubgroupList);
+
+        JsonObject res1 = pdpGroup2.getSupportedSubgroups("type2", "2.0.0");
+        assertThat(res1.get("pdpGroup2")).isNotNull();
+        JsonArray resSubList = res1.getAsJsonArray("pdpGroup2");
+        assertThat(resSubList.size()).isEqualTo(2);
+        assertThat(resSubList.toString().contains("subGroup1")).isTrue();
+        assertThat(resSubList.toString().contains("subGroup2")).isTrue();
+
+        JsonObject res2 = pdpGroup2.getSupportedSubgroups("type1", "1.0.0");
+        assertThat(res2.get("pdpGroup2")).isNotNull();
+        JsonArray resSubList2 = res2.getAsJsonArray("pdpGroup2");
+        assertThat(resSubList2.size()).isEqualTo(1);
+
+        assertThat(pdpGroup2.getSupportedSubgroups("type3", "1.0.1")).isNull();
+    }
+}
diff --git "a/src/test/resources/http-cache/example/policy/pap/v1/pdps&\04363;connectionTimeToLive=5000/.file" "b/src/test/resources/http-cache/example/policy/pap/v1/pdps&\04363;connectionTimeToLive=5000/.file"
new file mode 100644
index 0000000..6b6b372
--- /dev/null
+++ "b/src/test/resources/http-cache/example/policy/pap/v1/pdps&\04363;connectionTimeToLive=5000/.file"
@@ -0,0 +1,76 @@
+{
+    "groups": [
+        {
+            "description": "This group should be used for managing all control loop related policies and pdps",
+            "name": "controlloop",
+            "pdpGroupState": "ACTIVE",
+            "pdpSubgroups": [
+                {
+                    "currentInstanceCount": 0,
+                    "desiredInstanceCount": 1,
+                    "pdpInstances": [],
+                    "pdpType": "apex",
+                    "policies": [],
+                    "properties": {},
+                    "supportedPolicyTypes": [
+                        {
+                            "name": "onap.policies.controlloop.Operational",
+                            "version": "1.0.0"
+                        }
+                    ]
+                },
+                {
+                    "currentInstanceCount": 0,
+                    "desiredInstanceCount": 1,
+                    "pdpInstances": [],
+                    "pdpType": "drools",
+                    "policies": [],
+                    "properties": {},
+                    "supportedPolicyTypes": [
+                        {
+                            "name": "onap.policies.controlloop.Operational",
+                            "version": "1.0.0"
+                        }
+                    ]
+                },
+                {
+                    "currentInstanceCount": 0,
+                    "desiredInstanceCount": 1,
+                    "pdpInstances": [],
+                    "pdpType": "xacml",
+                    "policies": [],
+                    "properties": {},
+                    "supportedPolicyTypes": [
+                        {
+                            "name": "onap.policies.controlloop.Guard",
+                            "version": "1.0.0"
+                        }
+                    ]
+                }
+            ],
+            "properties": {}
+        },
+        {
+            "description": "This group should be used for managing all monitoring related policies and pdps",
+            "name": "monitoring",
+            "pdpGroupState": "ACTIVE",
+            "pdpSubgroups": [
+                {
+                    "currentInstanceCount": 0,
+                    "desiredInstanceCount": 1,
+                    "pdpInstances": [],
+                    "pdpType": "xacml",
+                    "policies": [],
+                    "properties": {},
+                    "supportedPolicyTypes": [
+                        {
+                            "name": "onap.policies.monitoring.*",
+                            "version": "1.0.0"
+                        }
+                    ]
+                }
+            ],
+            "properties": {}
+        }
+    ]
+}
diff --git "a/src/test/resources/http-cache/example/policy/pap/v1/pdps&\04363;connectionTimeToLive=5000/.header" "b/src/test/resources/http-cache/example/policy/pap/v1/pdps&\04363;connectionTimeToLive=5000/.header"
new file mode 100644
index 0000000..6a280d9
--- /dev/null
+++ "b/src/test/resources/http-cache/example/policy/pap/v1/pdps&\04363;connectionTimeToLive=5000/.header"
@@ -0,0 +1 @@
+{"Transfer-Encoding": "chunked", "Set-Cookie": "JSESSIONID=158qxkdtdobkd1umr3ikkgrmlx;Path=/", "Expires": "Thu, 01 Jan 1970 00:00:00 GMT", "Server": "Jetty(9.3.21.v20170918)", "Content-Type": "application/json", "X-ECOMP-RequestID": "e2ddb3c8-994f-47df-b4dc-097d4fb55c08"}
\ No newline at end of file
diff --git a/src/test/resources/http-cache/third_party_proxy.py b/src/test/resources/http-cache/third_party_proxy.py
index 32f7faf..79e152e 100755
--- a/src/test/resources/http-cache/third_party_proxy.py
+++ b/src/test/resources/http-cache/third_party_proxy.py
@@ -297,6 +297,7 @@
                 self.send_response(404)
                 self.end_headers()
                 self.wfile.write('404 Not found, no remote HOST specified on the emulator !!!')
+                print("HOST value is: %s " % (options.proxy))
                 return "404 Not found, no remote HOST specified on the emulator !!!"
 
             url = '%s%s' % (HOST, self.path)
@@ -315,6 +316,7 @@
                 return response.content
         else:
             print("Request for data currently present in cache: %s" % (cached_file_folder,))
+            print("HOST value is: %s " % (HOST))
 
         self._send_content(cached_file_header, cached_file_content)