Tech-debt: don't use dicts (and random strings) all over the place
Bug #1586475 reported by
Joshua Harlow
This bug affects 1 person
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
kolla |
Fix Released
|
Wishlist
|
Joshua Harlow |
Bug Description
Currently in the kolla build command dicts (and strings for status constants) are used for all the things. This is not really a good practice as it makes documenting/knowing what the API is very hard to figure out (anything in a dict could be part of that API) and it makes documenting that API that much harder (since dicts can have any set of keys/strings and values); it also makes understanding, reading and figuring out the kolla code that much harder (since dicts/strings could contain any and all the things); so ya don't do that.
Changed in kolla: | |
assignee: | nobody → Joshua Harlow (harlowja) |
summary: |
- Tech-debt: don't use dicts all over the place + Tech-debt: don't use dicts (and random strings) all over the place |
description: | updated |
Changed in kolla: | |
status: | New → In Progress |
Changed in kolla: | |
importance: | Undecided → Wishlist |
milestone: | none → newton-1 |
To post a comment you must log in.
Reviewed: https:/ /review. openstack. org/321844 /git.openstack. org/cgit/ openstack/ kolla/commit/ ?id=7c6990ccec1 6e55334376f696e b591891fc1fd7e
Committed: https:/
Submitter: Jenkins
Branch: master
commit 7c6990ccec16e55 334376f696eb591 891fc1fd7e
Author: Joshua Harlow <email address hidden>
Date: Thu May 26 13:38:21 2016 -0700
Use an image object, recorder object and status constants
Instead of using raw dicts and passing data around via
dictionaries (which makes it really hard to figure out
what is in those dictionaries at any point) prefer to
use objects. That way people can actually understand what
the object is supposed to be, vs guessing and/or having to
decipher its usage.
The same goes for raw string constants, prefer using
named constants instead.
Closes-Bug: #1586475
Change-Id: Ide179dc6593c50 696d47a2d3d4cd0 00f343855d4