[HEAT] Weird class structure in heat engine

Bug #1459788 reported by Andrew Lazarev
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Sahara
Fix Released
Medium
Vitalii Gridnev

Bug Description

In Sahara heat engine we have:

HeatEngine - entry point with all required interfaces
_CreateLauncher - class to create cluster. Somehow it is descendant from HeatEngine, but instantiated inside main HeatEngine object (!very weird!)
_ScaleLauncher, _RollbackLauncher - descendants of _CreateLauncher, but with some overwritten instance vars. No code overriding.
ClusterTemplate - class that creates Heat template for cluster and calls Heat API. Actually used as a usual method call.
ClusterStack - wrapper that contains ClusterTemplate and created Heat stack. Doesn't add any new functionality.

As I see class structure need to be revised.

Changed in sahara:
milestone: none → liberty-1
assignee: nobody → Andrew Lazarev (alazarev)
importance: Undecided → Medium
status: New → Confirmed
Changed in sahara:
milestone: liberty-1 → liberty-2
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to sahara (master)

Fix proposed to branch: master
Review: https://review.openstack.org/203248

Changed in sahara:
status: Confirmed → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote :

Fix proposed to branch: master
Review: https://review.openstack.org/203266

Revision history for this message
OpenStack Infra (hudson-openstack) wrote :

Fix proposed to branch: master
Review: https://review.openstack.org/203271

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to sahara (master)

Reviewed: https://review.openstack.org/203248
Committed: https://git.openstack.org/cgit/openstack/sahara/commit/?id=f4cec454efc41f3ab112fb8e6c36ed000840aeb4
Submitter: Jenkins
Branch: master

commit f4cec454efc41f3ab112fb8e6c36ed000840aeb4
Author: Andrew Lazarev <email address hidden>
Date: Fri Jul 17 14:18:59 2015 -0700

    Removed useless 'Launcher' class from heat engine

    There is no sense in separate Launcher class that inherited from
    Engine to have access to protected methods. This is just method
    call. So, moved all class vars to arguments. Code became much
    more clear.

    Change-Id: I436f38cd8424158b10783c70f9ad43d49c8c2f28
    Partial-Bug: #1459788

Revision history for this message
OpenStack Infra (hudson-openstack) wrote :

Reviewed: https://review.openstack.org/203266
Committed: https://git.openstack.org/cgit/openstack/sahara/commit/?id=3ea2e295fb82404de31ec5939e28a61cf90c337e
Submitter: Jenkins
Branch: master

commit 3ea2e295fb82404de31ec5939e28a61cf90c337e
Author: Andrew Lazarev <email address hidden>
Date: Fri Jul 17 15:27:24 2015 -0700

    Removed useless ClusterStack class from heat engine

    There is no sense in having separate class to hold heat stack.

    Change-Id: Idc906626743eb6686a42e87e419b96f3f5d83818
    Partial-Bug: #1459788

Thierry Carrez (ttx)
Changed in sahara:
milestone: liberty-2 → liberty-3
Revision history for this message
OpenStack Infra (hudson-openstack) wrote :

Reviewed: https://review.openstack.org/203271
Committed: https://git.openstack.org/cgit/openstack/sahara/commit/?id=4928fd9c7491575d8ce11fa55aaff18c08553a06
Submitter: Jenkins
Branch: master

commit 4928fd9c7491575d8ce11fa55aaff18c08553a06
Author: Andrew Lazarev <email address hidden>
Date: Fri Jul 17 15:57:37 2015 -0700

    Made 'files' dict as member field of ClusterStack

    Having files as member field reduces number of arguments across all
    functions.

    Change-Id: I7e2652796ac0f4a5abc9c74b36cb4ec55a82c55f
    Partial-Bug: #1459788

Changed in sahara:
assignee: Andrew Lazarev (alazarev) → Vitaly Gridnev (vgridnev)
Changed in sahara:
milestone: liberty-3 → next
Changed in sahara:
status: In Progress → Fix Released
milestone: next → mitaka-3
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.