X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=planetlab%2Fexp-tool%2FMakefile;h=ec8787115470f3920c98357d600df3c2418196f7;hb=96d1d73fc5c58359c761e95a267bd478c4227db1;hp=7919aa5d48c13195e65bf62c277c91054aa87b73;hpb=09324e370e2852708d9b82a7949e9f98cb38108d;p=sliver-openvswitch.git diff --git a/planetlab/exp-tool/Makefile b/planetlab/exp-tool/Makefile index 7919aa5d4..ec8787115 100644 --- a/planetlab/exp-tool/Makefile +++ b/planetlab/exp-tool/Makefile @@ -86,6 +86,9 @@ showslice: ++SLICE FORCE shownodes: @$(foreach id,$(ALL_NODE_IDS),echo $(id)=$(call display,$(id));) showhostnames: ++ALL_NODE_HOSTS +# xxx missing: something that outputs raw python stuff like +# SEND_IP="10.0.16.1" +# that would belong in the export to OF showips: @$(foreach id,$(ALL_NODE_IDS),echo $(id)=$(call display,$(id)) has ip/network set to $(IP_$(id));) showlinks: @@ -103,6 +106,10 @@ sshs: $(foreach id,$(ALL_NODE_IDS),ssh-$(id)) .PHONY: sshs showdpids: $(foreach id,$(ALL_NODE_IDS),showdpid-$(id)) .PHONY: showdpids +showmacs: $(foreach id,$(ALL_NODE_IDS),showmac-$(id)) +.PHONY: showmacs +showports: $(foreach id,$(ALL_NODE_IDS),showports-$(id)) +.PHONY: showports DBS=$(foreach id,$(ALL_NODE_IDS),cache/db.$(id)) dbs: $(DBS) @@ -147,6 +154,13 @@ ssh-%: FORCE showdpid-%: FORCE @echo $*_DPID=0x$$( $(SSH) $(HOST_$*) $(SUDO) ovs-vsctl get bridge $(BRIDGE) datapath_id | sed -e 's,",,g') +showmac-%: FORCE + @echo $*_MAC=\"$$( $(SSH) $(HOST_$*) $(SUDO) sliver-ovs show-mac)\" + +showports-%: FORCE + @$(SSH) $(HOST_$*) $(SUDO) ovs-ofctl show $(BRIDGE) \ + | perl -nle '/(\d+)\(L(.*?)\Q$(SEP)\E(.*?)\):/ && \ + print "PORT_".("$$2" eq "$*" ? "$$2_$$3" : "$$3_$$2")."=$$1"' # should probably replace sshcheck cache/status.%: FORCE @echo "=== DB and SWITCH processes on $(call display,$*)" @@ -301,7 +315,7 @@ update-%: FORCE @[ -n "$(SLIVER_OVS)" ] || { echo "SLIVER_OVS not set" >&2; exit 1; } @[ -f "$(SLIVER_OVS)" ] || { echo "$(SLIVER_OVS) not found" >&2; exit 1; } @echo "Sending $(SLIVER_OVS) to $(call display,$*)" - @scp -q $(SLIVER_OVS) $(SLICE)@$(call solve,$*): + @scp $(SSH_KEY_OPTION) -q $(SLIVER_OVS) $(SLICE)@$(call solve,$*): @$(SSH) $(call solve,$*) $(SUDO) mv $(notdir $(SLIVER_OVS)) /usr/sbin/sliver-ovs .SECONDEXPANSION: