Added validation of monitoring service after instantiation process

Change-Id: I3984e14f127d00b5b4d0e9ae4451227587b71d88
diff --git a/cord-pod/Makefile b/cord-pod/Makefile
index 3b1e8ae..832f135 100644
--- a/cord-pod/Makefile
+++ b/cord-pod/Makefile
@@ -112,6 +112,8 @@
 	bash $(COMMON_DIR)/wait_for_xos_port.sh $(XOS_UI_PORT)
 	$(RUN_TOSCA) monitoringservice.yaml
 	$(RUN_TOSCA) monitoringtenant.yaml
+	@echo "waiting for monitoring service to be fully ready...."
+	ansible-playbook -i local $(SERVICE_DIR)/monitoring/xos/test/monitoring_test_initial.yaml
 
 rebuild-monitoringservice:
 	bash $(COMMON_DIR)/rebuild.sh $(XOS_BOOTSTRAP_PORT) monitoring
@@ -122,9 +124,13 @@
 
 enable-inframonitoring: inframonitoring_yaml
 	$(RUN_TOSCA) inframonitoring.yaml
+	@echo "Validate if infra metrics are available...."
+	ansible-playbook -i local $(SERVICE_DIR)/monitoring/xos/test/monitoring_test_inframetrics.yaml
 
 enable-vsgmonitoring:
 	$(RUN_TOSCA) vsgmonitoring.yaml
+	@echo "Validate if vSG metrics are available...."
+	ansible-playbook -i local $(SERVICE_DIR)/monitoring/xos/test/monitoring_test_vsgmetrics.yaml
 
 enable-exampleservicemonitoring:
 	$(RUN_TOSCA) exampleservicemonitoring.yaml
diff --git a/cord-pod/make-inframonitoring-yaml.sh b/cord-pod/make-inframonitoring-yaml.sh
index 2140931..00fc529 100644
--- a/cord-pod/make-inframonitoring-yaml.sh
+++ b/cord-pod/make-inframonitoring-yaml.sh
@@ -30,17 +30,6 @@
       artifacts:
           onos_monitoring_service_endpoints: /root/setup/onos_monitoring_service_endpoints.json
 
-    onos_monitoring_publisher_tenant:
-      description: ONOS Monitoring Publisher Tenant
-      type: tosca.nodes.ONOSMonitoringPublisher
-      requirements:
-          - provider_service:
-              node: service_ceilometer
-              relationship: tosca.relationships.TenantOfService
-          - monitoring_agent_1:
-              node: onos_monitoring_agent_head_node
-              relationship: tosca.relationships.ProvidesInfraMonitoringAgentInfo
-
     os_monitoring_agent_head_node:
       description: Openstack Monitoring agent info
       type: tosca.nodes.InfraMonitoringAgentInfo
@@ -87,11 +76,14 @@
           - monitoring_agent_1:
               node: os_monitoring_agent_head_node
               relationship: tosca.relationships.ProvidesInfraMonitoringAgentInfo
+          - monitoring_agent_2:
+              node: onos_monitoring_agent_head_node
+              relationship: tosca.relationships.ProvidesInfraMonitoringAgentInfo
 EOF
 I=0
 for NODE in $NODES; do
           I=$(( I+1 ))
-          J=$(( I+1 ))
+          J=$(( I+2 ))
           cat >> $FN <<EOF
           - monitoring_agent_${J}:
               node: os_monitoring_agent_cp_${I}
diff --git a/cord-pod/onos_monitoring_service_endpoints.json b/cord-pod/onos_monitoring_service_endpoints.json
index 59cf783..af9ad84 100644
--- a/cord-pod/onos_monitoring_service_endpoints.json
+++ b/cord-pod/onos_monitoring_service_endpoints.json
@@ -1,6 +1,6 @@
 {
     "resources" : [
-        "onos://onos-cord.cord.lab:8181?auth=basic&user=onos&password=rocks&scheme=http",
+        "onos://onos-cord.cord.lab:8182?auth=basic&user=onos&password=rocks&scheme=http",
         "onos://onos-fabric.cord.lab:8181?auth=basic&user=onos&password=rocks&scheme=http"
      ]
 }