Fix the config synchronization issue
1. Fix the config synchronization issue; 2. UI website path rename; Change-Id: I795813d958d06b714713f9ae453b6b3af4fbd12f
@ -56,7 +56,7 @@ is up running::
|
||||
|
||||
Open your browser, and type the below address to start using it::
|
||||
|
||||
http://127.0.0.1:8080/public/ui
|
||||
http://127.0.0.1:8080/ui/index.html
|
||||
|
||||
|
||||
Running KloudBuster with CLI
|
||||
|
@ -52,7 +52,7 @@ class ConfigController(object):
|
||||
|
||||
return wrapper
|
||||
|
||||
def update_config(self, kb_config, user_config):
|
||||
def fix_config(self, kb_config, user_config):
|
||||
# Parsing server and client configs from application input
|
||||
# Save the public key into a temporary file
|
||||
if 'public_key' in user_config['kb_cfg']:
|
||||
@ -161,7 +161,7 @@ class ConfigController(object):
|
||||
logging.setup("kloudbuster", logfile="/tmp/kb_log_%s" % session_id)
|
||||
kb_config.init_with_rest_api(cred_tested=cred_tested,
|
||||
cred_testing=cred_testing)
|
||||
self.update_config(kb_config, user_config)
|
||||
self.fix_config(kb_config, user_config)
|
||||
|
||||
kb_session = KBSession()
|
||||
kb_session.kb_config = kb_config
|
||||
@ -198,7 +198,7 @@ class ConfigController(object):
|
||||
# }
|
||||
try:
|
||||
kb_config = KBSessionManager.get(session_id).kb_config
|
||||
self.update_config(kb_config, user_config)
|
||||
self.fix_config(kb_config, user_config)
|
||||
except Exception:
|
||||
response.status = 400
|
||||
response.text = u"Error while parsing configurations: \n%s" %\
|
||||
|
@ -63,6 +63,7 @@ class KBController(object):
|
||||
kb_config.server_cfg, kb_config.client_cfg,
|
||||
kb_config.topo_cfg, kb_config.tenants_list)
|
||||
if kb_session.kloudbuster.check_and_upload_images():
|
||||
kb_session.sync_cfg(["server_cfg", "client_cfg", "topo_cfg", "tenants_list"])
|
||||
kb_session.kloudbuster.stage()
|
||||
kb_session.kb_status = 'STAGED'
|
||||
except Exception:
|
||||
@ -74,9 +75,8 @@ class KBController(object):
|
||||
kb_session.kb_status = 'RUNNING'
|
||||
kloudbuster = kb_session.kloudbuster
|
||||
try:
|
||||
kloudbuster.run_test(
|
||||
config=kb_session.kb_config.client_cfg,
|
||||
http_test_only=not kb_session.first_run)
|
||||
kb_session.sync_cfg(["client_cfg"])
|
||||
kloudbuster.run_test(http_test_only=not kb_session.first_run)
|
||||
kb_session.first_run = False
|
||||
kb_session.kb_status = 'STAGED'
|
||||
except Exception:
|
||||
|
@ -52,3 +52,13 @@ class KBSession(object):
|
||||
self.first_run = True
|
||||
self.kb_config = None
|
||||
self.kloudbuster = None
|
||||
|
||||
def sync_cfg(self, par_list):
|
||||
if 'server_cfg' in par_list:
|
||||
self.kloudbuster.server_cfg = self.kb_config.server_cfg
|
||||
if 'client_cfg' in par_list:
|
||||
self.kloudbuster.client_cfg = self.kb_config.client_cfg
|
||||
if 'topo_cfg' in par_list and self.kb_config.topo_cfg:
|
||||
self.kloudbuster.topology = self.kb_config.topo_cfg
|
||||
if 'tenants_list' in par_list and self.kb_config.tenants_list:
|
||||
self.kloudbuster.tenants_list = self.kb_config.tenants_list
|
||||
|
Before Width: | Height: | Size: 4.2 KiB After Width: | Height: | Size: 4.2 KiB |
Before Width: | Height: | Size: 106 KiB After Width: | Height: | Size: 106 KiB |
Before Width: | Height: | Size: 1.2 MiB After Width: | Height: | Size: 1.2 MiB |
Before Width: | Height: | Size: 22 KiB After Width: | Height: | Size: 22 KiB |
@ -1,9 +0,0 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<title>Test</title>
|
||||
</head>
|
||||
<body>
|
||||
<p>Test</p>
|
||||
</body>
|
||||
</html>
|
@ -447,10 +447,9 @@ class KloudBuster(object):
|
||||
# Function that print all the provisioning info
|
||||
self.print_provision_info()
|
||||
|
||||
def run_test(self, config=None, http_test_only=False):
|
||||
def run_test(self, http_test_only=False):
|
||||
self.final_result = []
|
||||
if config:
|
||||
self.kb_runner.config = config
|
||||
self.kb_runner.config = self.client_cfg
|
||||
# Run the runner to perform benchmarkings
|
||||
for run_result in self.kb_runner.run(http_test_only):
|
||||
self.final_result.append(self.kb_runner.tool_result)
|
||||
|