Remove hard coded names

Bug #1208679 reported by Joshua Harlow
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
anvil
Fix Released
Medium
Joshua Harlow
Havana
Fix Released
Medium
Joshua Harlow

Bug Description

It would be great to not have the following hard coded (but come from configuration instead).

From base.py

OPENSTACK_PACKAGES = set([
    "cinder",
    "glance",
    "horizon",
    "keystone",
    "nova",
    "oslo.config",
    "quantum",
    "swift",
    "python-cinderclient",
    "python-glanceclient",
    "python-keystoneclient",
    "python-novaclient",
    "python-neutronclient",
    "python-swiftclient",
])

From yum.py

API_NAMES = {
        "nova": "Compute",
        "glance": "Image",
        "keystone": "Identity",
        "cinder": "Volume",
        "quantum": "Networking",
    }
    SERVER_NAMES = ["nova", "glance", "keystone", "quantum", "cinder"]
    TRANSLATION_NAMES = {
        'horizon': "python-django-horizon",
    }

Revision history for this message
Susan Tan (susan-tan-fleckerl) wrote :

Hi,

I'm a new beginner (volunteer) contributor to Open Stack looking at easy-picking tickets; this one is an interesting ticket. I've just clone the anvil repo in my Vagrant VM running devstack.

I have a beginner question: what configuration file are you referring to? Is it located in avil repo?

Revision history for this message
Susan Tan (susan-tan-fleckerl) wrote :

Are you referring to docs/source/conf.py, the file where I should place the hard-coded names? And then I can import the hard-coded variables in conf.py from the base.py and yum.py files?

Revision history for this message
Joshua Harlow (harlowja) wrote :

Hi there,

Thanks for jumping on and looking at the bug. The first thing I would make sure u do is run anvil and make sure u are comfortable with how it works, this should be easily doable by getting a vm and running the steps at http://anvil.readthedocs.org/en/latest/topics/gettingstarted.html, after this then I think you can if u want start looking at how to remove some of these problematic constants.

https://github.com/stackforge/anvil/blob/master/anvil/packaging/base.py#L36

I was thinking that we can take those constants from configuration instead of having them be hard-coded.

Joshua Harlow (harlowja)
Changed in anvil:
status: In Progress → Fix Released
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.