summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorLorenzo Bianconi <lorenzo.bianconi@redhat.com>2018-12-28 18:38:47 +0100
committerBen Pfaff <blp@ovn.org>2018-12-28 10:03:38 -0800
commite46b70205e25412d31edec28742210d77a8543a8 (patch)
treef937ab082de3917c7f4bfe123d7891c1be6d2be9 /tests
parent10b9890f33bf9dd483ccfc612e0e5b677268a5ca (diff)
downloadopenvswitch-e46b70205e25412d31edec28742210d77a8543a8.tar.gz
OVN: add static IP support to IPAM
Add the capability to IPAM/MACAM framework to specify a static ip address and get the L2 one allocated dynamically using the following syntax: $ovn-nbctl lsp-set-addresses <port> "dynamic <IP>" The static ip address needs to belong to the subnet configured for the logical switch Signed-off-by: Lorenzo Bianconi <lorenzo.bianconi@redhat.com> Signed-off-by: Ben Pfaff <blp@ovn.org>
Diffstat (limited to 'tests')
-rw-r--r--tests/ovn.at12
1 files changed, 12 insertions, 0 deletions
diff --git a/tests/ovn.at b/tests/ovn.at
index 5490fcd9c..8bada3241 100644
--- a/tests/ovn.at
+++ b/tests/ovn.at
@@ -5724,6 +5724,18 @@ AT_CHECK([ovn-nbctl get Logical-Switch-Port p41 dynamic_addresses], [0],
["f0:00:00:00:10:2b 192.168.1.3"
])
+# Add static ip address
+ovn-nbctl --wait=sb lsp-set-addresses p41 "dynamic 192.168.1.100"
+ovn-nbctl list Logical-Switch-Port p41
+ovn-nbctl --wait=sb lsp-add sw5 p42 -- lsp-set-addresses p42 \
+"dynamic 192.168.1.101"
+AT_CHECK([ovn-nbctl get Logical-Switch-Port p41 dynamic_addresses], [0],
+ ["0a:00:00:a8:01:65 192.168.1.100"
+])
+AT_CHECK([ovn-nbctl get Logical-Switch-Port p42 dynamic_addresses], [0],
+ ["0a:00:00:a8:01:66 192.168.1.101"
+])
+
# define a mac address prefix
ovn-nbctl ls-add sw6
ovn-nbctl --wait=hv set NB_Global . options:mac_prefix="00:11:22:33:44:55"