]> git.ipfire.org Git - people/jschlag/network.git/commitdiff
Add recipe for port vars
authorJonatan Schlag <jonatan.schlag@ipfire.org>
Sat, 15 Sep 2018 11:59:24 +0000 (13:59 +0200)
committerJonatan Schlag <jonatan.schlag@ipfire.org>
Sat, 15 Sep 2018 11:59:24 +0000 (13:59 +0200)
These vars contain the port name which is plugged into the virtual
network.

As this relation changes every reboot these vars make it possible to
write recipes which depends on correct links between two ports.

Signed-off-by: Jonatan Schlag <jonatan.schlag@ipfire.org>
test/nitsi/include/alice-port-vars [new file with mode: 0644]
test/nitsi/include/bob-port-vars [new file with mode: 0644]

diff --git a/test/nitsi/include/alice-port-vars b/test/nitsi/include/alice-port-vars
new file mode 100644 (file)
index 0000000..9f9c9a6
--- /dev/null
@@ -0,0 +1,6 @@
+# These command store the name of each port in a variable
+#which is named like the virtual network
+alice: p_net1="$(network raw device-get-by-mac-address "52:54:00:8a:b8:b5")"
+alice: p_net2="$(network raw device-get-by-mac-address "52:54:00:ea:62:65")"
+alice: p_net3="$(network raw device-get-by-mac-address "52:54:00:49:0f:04")"
+alice: p_net4="$(network raw device-get-by-mac-address "52:54:00:33:67:4a")"
\ No newline at end of file
diff --git a/test/nitsi/include/bob-port-vars b/test/nitsi/include/bob-port-vars
new file mode 100644 (file)
index 0000000..6bc6d1b
--- /dev/null
@@ -0,0 +1,6 @@
+# These command store the name of each port in a variable
+#which is named like the virtual network
+bob: p_net1="$(network raw device-get-by-mac-address "52:54:00:36:ba:7d")"
+bob: p_net2="$(network raw device-get-by-mac-address "52:54:00:e3:cb:28")"
+bob: p_net3="$(network raw device-get-by-mac-address "52:54:00:b6:95:a5")"
+bob: p_net4="$(network raw device-get-by-mac-address "52:54:00:f8:ce:4b")"
\ No newline at end of file