gmap_report subcommand
[sliver-openvswitch.git] / planetlab / exp-tool / Makefile
index 606d54d..ba4f69a 100644 (file)
@@ -65,12 +65,12 @@ ALL_LINK_IDS=$(addsuffix @1,$(LINKS)) $(addsuffix @2,$(LINKS))
 CONF_NODE_IDS=$(subst HOST_,,$(filter HOST_%,$(.VARIABLES)))
 
 ####################
-init+all: init all
+init_all: init all
 init:
        @[ -d L ] || ( echo Creating tmp dir L; mkdir L)
        @[ -d log ] || (echo Creating tmp dir log; mkdir log)
        @[ -d cache ] || ( echo Creating tmp dir cache; mkdir cache)
-.PHONY: init+all init
+.PHONY: init_all init
 
 FORCE:
 
@@ -124,6 +124,9 @@ CONTROLLERS=$(foreach id,$(ALL_NODE_IDS),cache/controller.$(id))
 controllers: $(CONTROLLERS)
 .PHONY: controllers
 
+del-controllers: $(foreach id,$(ALL_NODE_IDS),del-controller-$(id))
+.PHONY: del-controllers
+
 ### node-oriented targets
 # check ssh connectivity
 sshcheck-%: FORCE
@@ -136,7 +139,7 @@ ovsversion-%: FORCE
 # should probably replace sshcheck
 cache/status.%: FORCE
        @echo "=== DB and SWITCH processes on $(call display,$*)"
-       @$(SSH) $(HOST_$*) $(SUDO) sliver-ovs status
+       @$(SSH) $(HOST_$*) $(SUDO) sliver-ovs status ||:
 
 cache/host.%:
        @echo "IP lookup for $(call display,$*)"
@@ -192,6 +195,11 @@ del-db.%:
        @$(SSH) $(HOST_$*) $(SUDO) sliver-ovs stop-db
        @rm -f cache/db.$*
 
+del-controller.%:
+       @echo "Removing controller for $(call display,$*)"
+       @$(SSH) $(HOST_$*) $(SUDO) sliver-ovs del-controller $(BRIDGE)
+       @rm -f cache/controller.$*
+
 del-links: $(addprefix U/,$(notdir $(filter-out %.log,$(wildcard L/*))))
 
 del-switchs: $(addprefix del-,$(notdir $(filter-out %.log,$(wildcard cache/switch.*))))
@@ -272,7 +280,7 @@ cache/link.%: cache/host.$$(call rget,%) cache/iface.% cache/iface.$$(call opp,%
 CLEANTARGETS=$(addprefix del-,$(notdir $(filter-out %.log,$(wildcard cache/bridge.*))))
 clean: $(CLEANTARGETS)
 distclean:
-       rm -rf L U cache
+       rm -rf L log cache
 .PHONY: clean distclean
 
 ####################