[lxc-devel] [pylxd/master] test_networks: Make hwaddr conditional on extension
stgraber on Github
lxc-bot at linuxcontainers.org
Mon Jul 27 00:31:05 UTC 2020
A non-text attachment was scrubbed...
Name: not available
Type: text/x-mailbox
Size: 355 bytes
Desc: not available
URL: <http://lists.linuxcontainers.org/pipermail/lxc-devel/attachments/20200726/1125c517/attachment.bin>
-------------- next part --------------
From 458ba41f7d9634f673f87db80321821f2c8b724e Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?St=C3=A9phane=20Graber?= <stgraber at ubuntu.com>
Date: Sun, 26 Jul 2020 20:30:05 -0400
Subject: [PATCH] test_networks: Make hwaddr conditional on extension
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Signed-off-by: Stéphane Graber <stgraber at ubuntu.com>
---
integration/test_networks.py | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/integration/test_networks.py b/integration/test_networks.py
index 1b6838ca..1db1d30e 100644
--- a/integration/test_networks.py
+++ b/integration/test_networks.py
@@ -63,7 +63,6 @@ def test_create_with_parameters(self):
kwargs = {
'name': 'eth10',
'config': {
- 'bridge.hwaddr': '00:16:3e:12:34:56',
'ipv4.address': '10.10.10.1/24',
'ipv4.nat': 'true',
'ipv6.address': 'none',
@@ -73,6 +72,9 @@ def test_create_with_parameters(self):
'description': 'network description',
}
+ if self.client.has_api_extension('network_hwaddr'):
+ kwargs['config']['bridge.hwaddr'] = '00:16:3e:12:34:56'
+
network = self.client.networks.create(**kwargs)
self.addCleanup(self.delete_network, kwargs['name'])
More information about the lxc-devel
mailing list