Merge "Add Support for Activation and Deactivation"
diff --git a/components/pm-subscription-handler/dpo/blueprints/k8s-pmsh.yaml b/components/pm-subscription-handler/dpo/blueprints/k8s-pmsh.yaml
index 13116c1..e3f7987 100755
--- a/components/pm-subscription-handler/dpo/blueprints/k8s-pmsh.yaml
+++ b/components/pm-subscription-handler/dpo/blueprints/k8s-pmsh.yaml
@@ -47,15 +47,15 @@
     default: 'pmsh-operational-policy'
   control_loop_name:
     type: string
-  pm_publish_topic_name:
+  pmsh_publish_topic_name:
     type: string
-    default: 'DCAE_CL_OUTPUT'
-  pm_subscribe_topic_name:
+    default: 'unauthenticated.DCAE_CL_OUTPUT'
+  policy_feedback_topic_name:
     type: string
     default: 'PMSH_CL_INPUT'
-  aai_subscribe_topic_name:
+  aai_notification_topic_name:
     type: string
-    default: 'AAI_EVENT'
+    default: 'AAI-EVENT'
   publisher_client_role:
     type: string
     description: Client role to request secure access to topic
@@ -75,22 +75,6 @@
     type: string
     description: DCAE location for the subscriber, used to set up routing
     default: 'san-francisco'
-  pmsh_service_port:
-    type: string
-    description: PMSH host port
-    default: '8443'
-  dmaap_mr_service_protocol:
-    type: string
-    description: DMAAP Message Router protocol
-    default: 'https'
-  dmaap_mr_service_host:
-    type: string
-    description: DMAAP Message Router host address
-    default: 'message-router'
-  dmaap_mr_service_port:
-    type: string
-    description: DMAAP Message Router host port
-    default: '3905'
   cpu_limit:
     type: string
     default: '1000m'
@@ -112,18 +96,10 @@
     properties:
       writerfqdn: { get_input: pgaas_cluster_name }
       name: 'pmsh'
-  pm_publish_topic:
-    type: ccsdk.nodes.Topic
-    properties:
-      topic_name: { get_input: pm_publish_topic_name }
   pm_subscribe_topic:
     type: ccsdk.nodes.Topic
     properties:
-      topic_name: { get_input: pm_subscribe_topic_name }
-  aai_subscribe_topic:
-    type: ccsdk.nodes.Topic
-    properties:
-      topic_name: { get_input: aai_subscribe_topic_name }
+      topic_name: { get_input: policy_feedback_topic_name }
   pmsh:
     type: dcae.nodes.ContainerizedServiceComponentUsingDmaap
     interfaces:
@@ -143,12 +119,8 @@
                   { get_attribute: [ pgaasvm, admin, database ] }
 
     relationships:
-      - type: ccsdk.relationships.publish_events
-        target: pm_publish_topic
       - type: ccsdk.relationships.subscribe_to_events
         target: pm_subscribe_topic
-      - type: ccsdk.relationships.subscribe_to_events
-        target: aai_subscribe_topic
       - type: cloudify.relationships.depends_on
         target: pgaasvm
       - type: cloudify.relationships.depends_on
@@ -168,14 +140,16 @@
         streams_publishes:
           policy_pm_publisher:
             type: message_router
-            dmaap_info: <<pm_publish_topic>>
+            dmaap_info:
+              topic_url: {concat: ["https://message-router:3905/events/", { get_input: pmsh_publish_topic_name }]}
         streams_subscribes:
           policy_pm_subscriber:
             type: message_router
             dmaap_info: <<pm_subscribe_topic>>
           aai_subscriber:
             type: message_router
-            dmaap_info: <<aai_subscribe_topic>>
+            dmaap_info:
+              topic_url: {concat: ["https://message-router:3905/events/", { get_input: aai_notification_topic_name }]}
       resource_config:
         limits:
           cpu: { get_input: cpu_limit }
@@ -183,20 +157,17 @@
         requests:
           cpu: { get_input: cpu_request }
           memory: { get_input: memory_request }
-      streams_publishes:
-        - name: pm_publish_topic
-          location: { get_input: dcae_location }
-          client_role: { get_input: publisher_client_role }
-          type: message-router
+      docker_config:
+        healthcheck:
+          endpoint: /healthcheck
+          interval: 15s
+          timeout: 1s
+          type: https
       streams_subscribes:
         - name: pm_subscribe_topic
           location: { get_input: dcae_location }
           client_role: { get_input: subscriber_client_role }
           type: message-router
-        - name: aai_subscribe_topic
-          location: { get_input: dcae_location }
-          client_role: { get_input: subscriber_client_role }
-          type: message-router
       image: { get_input: tag_version }
       replicas: { get_input: replicas }
       log_info:
diff --git a/components/pm-subscription-handler/dpo/spec/pmsh-component-spec.json b/components/pm-subscription-handler/dpo/spec/pmsh-component-spec.json
index 64eae4f..4302885 100755
--- a/components/pm-subscription-handler/dpo/spec/pmsh-component-spec.json
+++ b/components/pm-subscription-handler/dpo/spec/pmsh-component-spec.json
@@ -46,7 +46,7 @@
   ],
   "parameters": [
     {
-      "name": "pm_publish_topic_name",
+      "name": "pmsh_publish_topic_name",
       "value": "DCAE_CL_OUTPUT",
       "description": "Name of the topic PMSH publishes to for policy consumption",
       "designer_editable": true,
@@ -56,7 +56,7 @@
       "required": true
     },
     {
-      "name": "pm_subscribe_topic_name",
+      "name": "policy_feedback_topic_name",
       "value": "PMSH_CL_INPUT",
       "description": "Name of the topic PMSH subscribes to for policy outputs",
       "designer_editable": true,
@@ -66,8 +66,8 @@
       "required": true
     },
     {
-      "name": "aai_subscribe_topic_name",
-      "value": "AAI_EVENT",
+      "name": "aai_notification_topic_name",
+      "value": "AAI-EVENT",
       "description": "Name of the topic PMSH subscribes to for AAI Events",
       "designer_editable": true,
       "sourced_at_deployment": false,