Fix the flavor pick-up bug

Change-Id: I3f93c33053325965aabc2987d734d426d08c0b1e
This commit is contained in:
Yichen Wang 2015-08-03 17:35:19 -07:00
parent 90fbf3012b
commit f11f8d3a6c
2 changed files with 9 additions and 13 deletions

View File

@ -20,6 +20,7 @@ import sys
import threading
import traceback
from __init__ import __version__
import base_compute
import base_network
import glanceclient.exc as glance_exception
@ -35,8 +36,8 @@ from tabulate import tabulate
import tenant
CONF = cfg.CONF
CONF.version = __version__
LOG = logging.getLogger(__name__)
KB_IMAGE_MAJOR_VERSION = 1
class KBVMCreationException(Exception):
@ -292,8 +293,8 @@ class KloudBuster(object):
self.kloud.placement_az, "Round-robin")
for ins in svr_list:
ins.user_data['role'] = 'Server'
ins.boot_info['flavor_type'] =\
self.kloud.flavor_to_use if self.tenants_list else 'kb.server'
ins.boot_info['flavor_type'] = 'kb.server' if \
not self.tenants_list['server'] else self.kloud.flavor_to_use
ins.boot_info['user_data'] = str(ins.user_data)
elif role == "Client":
client_list = self.testing_kloud.get_all_instances()
@ -310,8 +311,8 @@ class KloudBuster(object):
ins.user_data['target_shared_interface_ip'] = svr_list[idx].shared_interface_ip
ins.user_data['http_tool'] = ins.config['http_tool']
ins.user_data['http_tool_configs'] = ins.config['http_tool_configs']
ins.boot_info['flavor_type'] =\
self.testing_kloud.flavor_to_use if self.tenants_list else 'kb.client'
ins.boot_info['flavor_type'] = 'kb.client' if \
not self.tenants_list['client'] else self.testing_kloud.flavor_to_use
ins.boot_info['user_data'] = str(ins.user_data)
def run(self):
@ -337,8 +338,8 @@ class KloudBuster(object):
self.kb_proxy.vm_name = 'KB-PROXY'
self.kb_proxy.user_data['role'] = 'KB-PROXY'
self.kb_proxy.boot_info['flavor_type'] =\
self.testing_kloud.flavor_to_use if self.tenants_list else 'kb.proxy'
self.kb_proxy.boot_info['flavor_type'] = 'kb.proxy' if \
not self.tenants_list['client'] else self.testing_kloud.flavor_to_use
if self.testing_kloud.placement_az:
self.kb_proxy.boot_info['avail_zone'] = "%s:%s" %\
(self.testing_kloud.placement_az, self.topology.clients_rack.split()[0])

View File

@ -8,12 +8,7 @@ Babel>=1.3
configure>=0.5
hdrhistogram>=0.0.4
oslo.log>=1.0.0
paramiko>=1.14.0
pecan>=0.9.0
python-glanceclient>=0.15.0
python-neutronclient<3,>=2.3.6
python-novaclient>=2.18.1
python-openstackclient>=0.4.1
python-keystoneclient>=1.0.0
python-openstackclient>=1.5.0
redis>=2.10.3
tabulate>=0.7.3