git://git.onelab.eu
/
sliver-openvswitch.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
export OpenFlow port numbers
[sliver-openvswitch.git]
/
planetlab
/
exp-tool
/
Makefile
diff --git
a/planetlab/exp-tool/Makefile
b/planetlab/exp-tool/Makefile
index
7919aa5
..
dc54466
100644
(file)
--- a/
planetlab/exp-tool/Makefile
+++ b/
planetlab/exp-tool/Makefile
@@
-104,6
+104,9
@@
sshs: $(foreach id,$(ALL_NODE_IDS),ssh-$(id))
showdpids: $(foreach id,$(ALL_NODE_IDS),showdpid-$(id))
.PHONY: showdpids
showdpids: $(foreach id,$(ALL_NODE_IDS),showdpid-$(id))
.PHONY: showdpids
+showports: $(foreach id,$(ALL_NODE_IDS),showports-$(id))
+.PHONY: showports
+
DBS=$(foreach id,$(ALL_NODE_IDS),cache/db.$(id))
dbs: $(DBS)
.PHONY: dbs
DBS=$(foreach id,$(ALL_NODE_IDS),cache/db.$(id))
dbs: $(DBS)
.PHONY: dbs
@@
-147,6
+150,11
@@
ssh-%: FORCE
showdpid-%: FORCE
@echo $*_DPID=0x$$( $(SSH) $(HOST_$*) $(SUDO) ovs-vsctl get bridge $(BRIDGE) datapath_id | sed -e 's,",,g')
showdpid-%: FORCE
@echo $*_DPID=0x$$( $(SSH) $(HOST_$*) $(SUDO) ovs-vsctl get bridge $(BRIDGE) datapath_id | sed -e 's,",,g')
+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,$*)"
# should probably replace sshcheck
cache/status.%: FORCE
@echo "=== DB and SWITCH processes on $(call display,$*)"