Merge "Make sure configure-vm mac doesn't start negative"

This commit is contained in:
Jenkins 2015-07-14 22:39:46 +00:00 committed by Gerrit Code Review
commit 6e1cf20af5

View File

@ -43,7 +43,7 @@ def generate_baremetal_macs(count=1):
start = random.randint(0x00, 0xff)
if (start + (count * 2)) > 0xff:
# leave room to generate macs in sequence
start -= (count * 2)
start = 0xff - count * 2
for num in range(0, count*2, 2):
mac = start + num
macs.append(base_mac + ":" + ("%02x" % mac))