[lxc-devel] [lxc-ci/master] bin/test-lxd-ovn: Adds tests for DHCP disabling

tomponline on Github lxc-bot at linuxcontainers.org
Wed Dec 9 15:21:35 UTC 2020


A non-text attachment was scrubbed...
Name: not available
Type: text/x-mailbox
Size: 414 bytes
Desc: not available
URL: <http://lists.linuxcontainers.org/pipermail/lxc-devel/attachments/20201209/e3c6ccb2/attachment.bin>
-------------- next part --------------
From b31002fe874776978df7c7cd6b51860216311506 Mon Sep 17 00:00:00 2001
From: Thomas Parrott <thomas.parrott at canonical.com>
Date: Wed, 9 Dec 2020 15:18:49 +0000
Subject: [PATCH] bin/test-lxd-ovn: Adds tests for DHCP disabling

Signed-off-by: Thomas Parrott <thomas.parrott at canonical.com>
---
 bin/test-lxd-ovn | 13 +++++++++++++
 1 file changed, 13 insertions(+)

diff --git a/bin/test-lxd-ovn b/bin/test-lxd-ovn
index f5cbc92..b01a3a9 100755
--- a/bin/test-lxd-ovn
+++ b/bin/test-lxd-ovn
@@ -240,6 +240,19 @@ if [ "$natRulesBefore" -ne "$natRulesAfter" ]; then
 fi
 
 lxc delete -f u1 --project testovn
+lxc network unset dummy ovn.ingress_mode
+
+# Set custom domain to allow identification of DHCP options.
+lxc network set ovn-virtual-network dns.domain=testdhcp --project testovn
+
+# Look for DHCP options mentioning our testdhcp domain name, there should be two.
+sudo ovn-nbctl --format=csv --no-headings --data=bare --colum=_uuid,options find dhcp_options | grep testdhcp | wc -l | grep 2
+
+# Check DHCP can be disabled.
+lxc network set ovn-virtual-network ipv4.dhcp=false ipv6.dhcp=false --project testovn
+
+# Look for DHCP options mentioning our testdhcp domain name, there shouldn't be any.
+sudo ovn-nbctl --format=csv --no-headings --data=bare --colum=_uuid,options find dhcp_options | grep testdhcp | wc -l | grep 0
 
 lxc network delete ovn-virtual-network --project testovn
 lxc image delete "${FINGERPRINT}" --project testovn


More information about the lxc-devel mailing list