make input_parameters part of the Loadable interface

Bug #1659259 reported by Pradeep Kumar Singh on 2017-01-25
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
watcher
Wishlist
Pradeep Kumar Singh

Bug Description

From irc chat

 <vincentfrancoise> pksingh: take a look at https://review.openstack.org/#/c/425110/
 <vincentfrancoise> pksingh: if you have a look at https://review.openstack.org/#/c/425110/1/watcher/tests/decision_engine/strategy/strategies/test_actuator.py@33
 <pksingh> vincentfrancoise: yes
 <vincentfrancoise> pksingh: you see that input_parameters (which are additional options that you specify to the audit and are passed down to the strategy)
 <pksingh> vincentfrancoise: ok
 * vmahe_ (uid116507@gateway/web/irccloud.com/x-yvosbjtdximtxugh) has joined #openstack-watcher
 <vincentfrancoise> pksingh: and these input_parameters are not injected at the construction of the Strategy objects
 <vincentfrancoise> pksingh: instead they are set after instantiation
 <pksingh> vincentfrancoise: correct
 <vincentfrancoise> pksingh: that forces us to do https://review.openstack.org/#/c/425110/1/watcher/decision_engine/strategy/strategies/actuation.py@88
 <vincentfrancoise> pksingh: to do some lazyloading
 <pksingh> vincentfrancoise: ok
 <vincentfrancoise> pksingh: and we actually "hope" it's going to be there when we get to it
 <pksingh> vincentfrancoise: through the getter?
 <vincentfrancoise> pksingh: so the idea would be to make it part of the Loadable interface
 <vincentfrancoise> pksingh: https://github.com/openstack/watcher/blob/master/watcher/common/loader/loadable.py#L32
 <pksingh> vincentfrancoise: ok
 <vincentfrancoise> pksingh: all plugins in Watcher inherit from this class that acts like an interface
 <pksingh> vincentfrancoise: k
 <vincentfrancoise> pksingh: this is a simple problem but it requires a lot of refactoring
 * vmahe_
 <pksingh> vincentfrancoise: agree
 <vincentfrancoise> pksingh: but you don't really add a new feature so that should make things easier

Changed in watcher:
importance: Undecided → Wishlist
Changed in watcher:
assignee: nobody → Pradeep Kumar Singh (pradeep-singh-u)
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers