Replace hardcoded strings with consts in fuelmenu

Bug #1514382 reported by Matthew Mosesohn
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Fuel for OpenStack
Fix Committed
Low
Matthew Mosesohn

Bug Description

We use hardcoded strings in fuelmenu for things like "pre" and "post" deployment modes. This should be located in a consts class and referenced symbolically.

tags: added: tech-debt
Revision history for this message
Matthew Mosesohn (raytrac3r) wrote :

From Andrey Tykhonov in https://review.openstack.org/#/c/242109: Could you please get rid of these magic (and surplus) constants? Could you please create two methods instead, something like `is_pre_deployment`, `is_post_deployment` (and add doc-strings for them)?

Dmitry Pyzhov (dpyzhov)
tags: added: area-python
Artem Roma (aroma-x)
Changed in fuel:
status: New → Confirmed
Revision history for this message
Matthew Mosesohn (raytrac3r) wrote :

TODO in this bug: move versionfile and astute_yaml paths to constant strings as well

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to fuel-menu (master)

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

Changed in fuel:
status: Confirmed → In Progress
Dmitry Pyzhov (dpyzhov)
Changed in fuel:
milestone: 8.0 → 9.0
tags: added: team-bugfix
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to fuel-menu (master)

Reviewed: https://review.openstack.org/259983
Committed: https://git.openstack.org/cgit/openstack/fuel-menu/commit/?id=98f108c2c7eeaff5181e0b39b356b4b99bf86f86
Submitter: Jenkins
Branch: master

commit 98f108c2c7eeaff5181e0b39b356b4b99bf86f86
Author: Matthew Mosesohn <email address hidden>
Date: Mon Dec 21 15:45:26 2015 +0300

    Add consts to fuelmenu

    logfiles, config files, version files, and deployment
    modes are now stored as constant values.

    Added is_(pre|post)_deployment methods to simplify
    logic when looking up deployment mode.

    Change-Id: I114e0a82fa07ff3bdcf0d0c4fb37d94d05acd923
    Closes-Bug: #1514382

Changed in fuel:
status: In Progress → Fix Committed
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.