browbeat/lib
Sai Sindhur Malleni 2c1980e023 Refactor Shaker
Refactoring lib/Shaker to improve compatibility with a wide range of
shaker scenarios.  set_scenario() method has been fixed to remove hard
coded expectations on the order of accommodation list. send_to_elastic()
method has also been fixed accordingly for imporved compatibility when
indexing a large number of shaker scenarios.

Why?  The current model of overwriting the shaker scenario file with
values supplied from the browbeat-config works well for a major set of
shaker scenario files. However, the problem comes with  how we
overwrite/work with "accomodation" key in the shaker scenario. Since the
value for the accomodation is a list, we need to access the list items
to modify them[2]. Most scenario files sudh as [1] have 4 values in the
list but some such as [3] have only 3 items, so we cannot be sure the
list item we are accessing is the one we want to if we are going by list
item number.

How?  Added two methods accommodation_to_dict() and
accommodation_to_list().

accommodation_to_dict() grabs the accommodation data from shaker
scenario file[1] and converts the list to a dictionary. Since it is now
a dictionary we overwrite shaker scenario values for key "accommodation"
by checking what keys exist in the dictionary.

accommodation_to_list() converts the dictionary we created by
overwrirting arguments in shaker scenario with those in browbeat
scenario to a list again, so that it can be written back the shaker
scenario file. Shaker eventually consumes this file which has been
overwritten by the options in browbeat config.

+ Adding external_host parameter
+ Adding validation
+ Adding usage docs
+ RST Formatting

[1] - https://github.com/openstack/shaker/blob/master/shaker/scenarios/openstack/dense_l3_north_south.yaml#L11
[2] - https://github.com/openstack/browbeat/blob/master/lib/Shaker.py#L201
[3] - https://github.com/openstack/shaker/blob/master/shaker/scenarios/openstack/external/dense_l3_north_south_with_fip.yaml#L11

Change-Id: Icf7208f230cbe727d525b6cb090e82c4f19d6985
2017-01-17 12:29:54 -05:00
..
Connmon.py lib: Use new style Python classes. 2016-09-21 14:06:42 -04:00
Elastic.py ES INFO output 2016-12-07 13:51:07 -05:00
Grafana.py lib: Use new style Python classes. 2016-09-21 14:06:42 -04:00
Metadata.py Add Processor information to hardware metadata 2016-10-12 13:58:46 -04:00
PerfKit.py Add PerfKit Elastic Resilience 2016-10-17 12:09:56 -04:00
Rally.py Enhancing Elastic resilience 2016-10-07 15:53:31 -04:00
Shaker.py Refactor Shaker 2017-01-17 12:29:54 -05:00
Tools.py Index Perfkit Result Data into ES 2016-10-10 12:43:14 -04:00
WorkloadBase.py Enhancing Elastic resilience 2016-10-07 15:53:31 -04:00
__init__.py Fix Master 2016-06-14 10:20:04 -04:00
validate.yaml Refactor Shaker 2017-01-17 12:29:54 -05:00