[CORD-2560]
Let the R-CORD `pod-test` run on preppedpod

Change-Id: If9d1d32470384d1a7d3edc4b4e05a4dbd61de38c
diff --git a/Makefile b/Makefile
index cbf4eef..2af3a2c 100644
--- a/Makefile
+++ b/Makefile
@@ -144,9 +144,16 @@
 	rm -f $(KS_MS)
 	rm -rf $(KUBESPRAY)
 
+# prereqs append the milestones dir to the front, but diag targets can be run multiple times
+$(M)/collect-diag: | collect-diag
+$(M)/collect-diag-maas: | collect-diag-maas
+
 collect-diag:
 	$(ANSIBLE_PB) $(PI)/collect-diag-playbook.yml $(LOGCMD)
 
+collect-diag-maas:
+	$(SSH_HEAD) "cd /opt/cord/build; $(ANSIBLE_PB_MAAS) --private-key ~/.ssh/cord_rsa $(PI)/collect-diag-playbook.yml" $(LOGCMD)
+
 compute-node-refresh:
 	$(SSH_HEAD) "cd /opt/cord/build; $(ANSIBLE_PB_MAAS) --private-key ~/.ssh/cord_rsa $(PI)/compute-node-refresh-playbook.yml" $(LOGCMD)
 
@@ -182,21 +189,22 @@
 	cd docs; make
 
 # == PREREQS == #
-VAGRANT_UP_PREREQS       ?=
-COPY_CORD_PREREQS        ?=
-CORD_CONFIG_PREREQS      ?=
-CONFIG_SSH_KEY_PREREQS   ?=
-PREP_BUILDNODE_PREREQS   ?=
-PREP_HEADNODE_PREREQS    ?=
-PREP_KUBESPRAY_PREREQS   ?=
-DOCKER_IMAGES_PREREQS    ?=
-START_XOS_PREREQS        ?=
-BUILD_ONOS_APPS_PREREQS  ?=
-DEPLOY_ONOS_PREREQS      ?=
-DEPLOY_MAVENREPO_PREREQS ?=
-DEPLOY_OPENSTACK_PREREQS ?=
-SETUP_AUTOMATION_PREREQS ?=
-
+VAGRANT_UP_PREREQS        ?=
+COPY_CORD_PREREQS         ?=
+CORD_CONFIG_PREREQS       ?=
+CONFIG_SSH_KEY_PREREQS    ?=
+PREP_BUILDNODE_PREREQS    ?=
+PREP_HEADNODE_PREREQS     ?=
+PREP_KUBESPRAY_PREREQS    ?=
+DOCKER_IMAGES_PREREQS     ?=
+START_XOS_PREREQS         ?=
+BUILD_ONOS_APPS_PREREQS   ?=
+DEPLOY_ONOS_PREREQS       ?=
+DEPLOY_MAVENREPO_PREREQS  ?=
+DEPLOY_OPENSTACK_PREREQS  ?=
+ONBOARD_OPENSTACK_PREREQS ?=
+SETUP_AUTOMATION_PREREQS  ?=
+TESTING_PREREQS           ?=
 
 # == MILESTONES == #
 # empty target files are touched in the milestones dir to indicate completion
@@ -329,15 +337,15 @@
 	$(ANSIBLE_PB) $(PI)/glance-images-playbook.yml $(LOGCMD)
 	touch $@
 
-$(M)/deploy-openstack: | $(M)/prep-headnode $(M)/prep-computenode $(DEPLOY_OPENSTACK_PREREQS)
+$(M)/deploy-openstack: | $(M)/prep-headnode $(DEPLOY_OPENSTACK_PREREQS)
 	$(ANSIBLE_PB) $(PI)/deploy-openstack-playbook.yml $(LOGCMD)
 	touch $@
 
-$(M)/deploy-computenode: | $(M)/deploy-openstack
+$(M)/deploy-computenode: | $(M)/prep-computenode $(M)/deploy-openstack
 	$(ANSIBLE_PB) $(PI)/deploy-computenode-playbook.yml $(LOGCMD)
 	touch $@
 
-$(M)/onboard-openstack: | $(M)/deploy-computenode $(M)/glance-images $(M)/deploy-onos $(M)/onboard-profile
+$(M)/onboard-openstack: | $(M)/deploy-computenode $(M)/glance-images $(M)/deploy-onos $(M)/onboard-profile $(ONBOARD_OPENSTACK_PREREQS)
 	$(SSH_HEAD) "cd /opt/cord/build; $(ANSIBLE_PB_LOCAL) $(PI)/onboard-openstack-playbook.yml" $(LOGCMD)
 	touch $@
 
@@ -364,13 +372,13 @@
 
 
 # Testing targets
-pod-test: $(M)/setup-automation collect-diag
+pod-test: | $(TESTING_PREREQS)
 	$(SSH_HEAD) "cd /opt/cord/build; $(ANSIBLE_PB_LOCAL) $(PI)/pod-test-playbook.yml" $(LOGCMD)
 
-mcord-ng40-test: $(M)/setup-automation
+mcord-ng40-test: | $(TESTING_PREREQS)
 	$(SSH_HEAD) "cd /opt/cord/build; $(ANSIBLE_PB_LOCAL) $(PI)/mcord-ng40-test-playbook.yml" $(LOGCMD)
 
-mcord-cavium-test: $(M)/setup-automation
+mcord-cavium-test: | $(TESTING_PREREQS)
 	$(SSH_HEAD) "cd /opt/cord/build; $(ANSIBLE_PB_LOCAL) $(PI)/mcord-cavium-test-playbook.yml" $(LOGCMD)
 
 fabric-pingtest: $(M)/refresh-fabric