Set "source" name in PAP PdpMessages
[policy/pap.git] / main / src / main / java / org / onap / policy / pap / main / rest / ProviderBase.java
index 6aefce0..4cc5a44 100644 (file)
@@ -23,7 +23,6 @@
 package org.onap.policy.pap.main.rest;
 
 import java.util.Collection;
-import java.util.stream.Collectors;
 import javax.ws.rs.core.Response.Status;
 import org.onap.policy.common.utils.services.Registry;
 import org.onap.policy.models.base.PfModelException;
@@ -229,12 +228,11 @@ public abstract class ProviderBase {
 
         var update = new PdpUpdate();
 
+        update.setSource(PapConstants.PAP_NAME);
         update.setName(pdp.getInstanceId());
         update.setDescription(group.getDescription());
         update.setPdpGroup(group.getName());
         update.setPdpSubgroup(subgroup.getPdpType());
-        update.setPolicies(subgroup.getPolicies().stream().map(ToscaConceptIdentifierOptVersion::new)
-                        .map(ident -> getPolicy(data, ident)).collect(Collectors.toList()));
         update.setPoliciesToBeDeployed(data.getPoliciesToBeDeployed());
         update.setPoliciesToBeUndeployed(data.getPoliciesToBeUndeployed());