diff options
author | 2018-10-29 21:32:44 +0200 | |
---|---|---|
committer | 2018-10-30 21:31:11 +0200 | |
commit | 012e2db39f103293e140a11fbb6ac417538a3f78 (patch) | |
tree | 8858874b91fefa63c5f143d67bb3171483d76484 /yardstick/tests/unit/benchmark/contexts | |
parent | fdd8206d8f3d456fa3e3b56630e7449d55a71258 (diff) |
Update: assign static IP to VM for standalone
Updated cloud-init network file to be used on Ubuntu 16.04 and
Ubuntu 18.04. Fields 'macaddress' and 'prefix' modified in
network-config file.
JIRA: YARDSTICK-1402
Change-Id: Ibe7fb9dbf23326a0a6106f98d3b2b9fedf81f79a
Signed-off-by: Stepan Andrushko <stepanx.andrushko@intel.com>
Diffstat (limited to 'yardstick/tests/unit/benchmark/contexts')
-rw-r--r-- | yardstick/tests/unit/benchmark/contexts/standalone/test_model.py | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/yardstick/tests/unit/benchmark/contexts/standalone/test_model.py b/yardstick/tests/unit/benchmark/contexts/standalone/test_model.py index 98d2b1836..10e1e3ba0 100644 --- a/yardstick/tests/unit/benchmark/contexts/standalone/test_model.py +++ b/yardstick/tests/unit/benchmark/contexts/standalone/test_model.py @@ -17,6 +17,7 @@ import os import uuid import mock +import netaddr import unittest from xml.etree import ElementTree @@ -292,6 +293,7 @@ class ModelLibvirtTestCase(unittest.TestCase): hostname = root.find('name').text mac = "00:11:22:33:44:55" ip = "{0}/{1}".format(node.get('ip'), node.get('netmask')) + ip = "{0}/{1}".format(node.get('ip'), netaddr.IPNetwork(ip).prefixlen) model.StandaloneContextHelper.check_update_key(self.mock_ssh, node, hostname, id_name, cdrom_img, mac) mock_gen_cdrom_image.assert_called_once_with(self.mock_ssh, cdrom_img, hostname, |