aboutsummaryrefslogtreecommitdiffstats
path: root/yardstick/benchmark/contexts/standalone
diff options
context:
space:
mode:
authorAbhijit Sinha <abhijit.sinha@intel.com>2018-11-07 11:22:32 +0000
committerGerrit Code Review <gerrit@opnfv.org>2018-11-07 11:22:32 +0000
commit9756d02c8d72a178e7136b9fc8031f671d2b8d5e (patch)
treec7acdd7e6ead52a2ac513e0e91bfad50e49e041d /yardstick/benchmark/contexts/standalone
parent7fed2461421682268a5bf173e133c4b96b3d90d9 (diff)
parent012e2db39f103293e140a11fbb6ac417538a3f78 (diff)
Merge "Update: assign static IP to VM for standalone"
Diffstat (limited to 'yardstick/benchmark/contexts/standalone')
-rw-r--r--yardstick/benchmark/contexts/standalone/model.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/yardstick/benchmark/contexts/standalone/model.py b/yardstick/benchmark/contexts/standalone/model.py
index 1004c62d1..ab5fec012 100644
--- a/yardstick/benchmark/contexts/standalone/model.py
+++ b/yardstick/benchmark/contexts/standalone/model.py
@@ -107,7 +107,7 @@ version: 2
ethernets:
ens3:
match:
- mac_address: {mac_address}
+ macaddress: {mac_address}
addresses:
- {ip_address}
EOF
@@ -570,6 +570,8 @@ class StandaloneContextHelper(object):
# Update image with public key
key_filename = node.get('key_filename')
ip_netmask = "{0}/{1}".format(node.get('ip'), node.get('netmask'))
+ ip_netmask = "{0}/{1}".format(node.get('ip'),
+ IPNetwork(ip_netmask).prefixlen)
Libvirt.gen_cdrom_image(connection, cdrom_img, vm_name, user_name, key_filename, mac,
ip_netmask)
return node