Add support for Neutron Metadata Service
This adds logic to the set_scenario() and send_to_elastic() methods to be generic enough to support miscalleneous shaker scenarios like metadata agent performance testing. + Few minor changes Change-Id: Ib9499d23b44160fc0796827f53e9926fca5e7e88
This commit is contained in:
parent
a8ef2462d7
commit
f79e8293b6
@ -167,7 +167,8 @@ class Shaker(WorkloadBase.WorkloadBase):
|
|||||||
'scenarios'][scenario]['deployment']['template']
|
'scenarios'][scenario]['deployment']['template']
|
||||||
# Iterating through each record to get result values
|
# Iterating through each record to get result values
|
||||||
for record in data['records'].iterkeys():
|
for record in data['records'].iterkeys():
|
||||||
if data['records'][record]['status'] == "ok":
|
if data['records'][record]['status'] == "ok" and data[
|
||||||
|
'records'][record]['executor'] != "shell":
|
||||||
if 'stdout' in data['records'][record]:
|
if 'stdout' in data['records'][record]:
|
||||||
del data['records'][record]['stdout']
|
del data['records'][record]['stdout']
|
||||||
metadata = data['records'][record].pop('meta')
|
metadata = data['records'][record].pop('meta')
|
||||||
@ -216,7 +217,8 @@ class Shaker(WorkloadBase.WorkloadBase):
|
|||||||
if index_status is False:
|
if index_status is False:
|
||||||
failure = True
|
failure = True
|
||||||
else:
|
else:
|
||||||
# If the status of the record is not ok, ship minimal
|
# If the status of the record is not OK or if the type of
|
||||||
|
# executor is shell, ship minimal
|
||||||
# shaker_stats dictionary to ES
|
# shaker_stats dictionary to ES
|
||||||
shaker_stats = {
|
shaker_stats = {
|
||||||
'record': data['records'][record],
|
'record': data['records'][record],
|
||||||
@ -269,14 +271,14 @@ class Shaker(WorkloadBase.WorkloadBase):
|
|||||||
accommodation = self.accommodation_to_list(accommodation)
|
accommodation = self.accommodation_to_list(accommodation)
|
||||||
self.logger.debug("Using accommodation {}".format(accommodation))
|
self.logger.debug("Using accommodation {}".format(accommodation))
|
||||||
data['deployment']['accommodation'] = accommodation
|
data['deployment']['accommodation'] = accommodation
|
||||||
if "progression" in scenario:
|
if 'progression' in scenario and 'progression' in data['execution']:
|
||||||
if scenario['progression'] is None:
|
if scenario['progression'] is None:
|
||||||
data['execution'].pop('progression', None)
|
data['execution'].pop('progression', None)
|
||||||
else:
|
else:
|
||||||
data['execution']['progression'] = scenario['progression']
|
data['execution']['progression'] = scenario['progression']
|
||||||
else:
|
elif 'progression' in data['execution']:
|
||||||
data['execution']['progression'] = default_progression
|
data['execution']['progression'] = default_progression
|
||||||
if "time" in scenario:
|
if 'time' in scenario:
|
||||||
for test in data['execution']['tests']:
|
for test in data['execution']['tests']:
|
||||||
test['time'] = scenario['time']
|
test['time'] = scenario['time']
|
||||||
else:
|
else:
|
||||||
|
Loading…
Reference in New Issue
Block a user