Code review comment for lp:~corey.bryant/charm-helpers/swift-2.12.0

Revision history for this message
Corey Bryant (corey.bryant) wrote :

I took a closer look at this and I think we need to leave the major.minor.point versioning. While much of the code that uses SWIFT_CODENAMES could get away with using just the major.minor versions, get_swift_codename() still needs to use major.minor.patch whenever possible. This is because from one openstack release to the next, the major.minor may be the same (see dict below). For example if we were to use just major.minor to get the openstack release codename, then get_swift_codename('2.2.1') has no way to differentiate between juno and kilo, so could end up using the wrong version of config templates. The fallback checks for major.minor were added to get_swift_codename() are just fallback in case someone is using an old version of the charm and a new package point release is released.

SWIFT_CODENAMES = OrderedDict([
    ('diablo',
        ['1.4.3']),
    ('essex',
        ['1.4.8']),
    ('folsom',
        ['1.7.4']),
    ('grizzly',
        ['1.7.6', '1.7.7', '1.8.0']),
    ('havana',
        ['1.9.0', '1.9.1', '1.10.0']),
    ('icehouse',
        ['1.11.0', '1.12.0', '1.13.0', '1.13.1']),
    ('juno',
        ['2.0.0', '2.1.0', '2.2.0']),
    ('kilo',
        ['2.2.1', '2.2.2']),
    ('liberty',
        ['2.3.0', '2.4.0', '2.5.0']),
    ('mitaka',
        ['2.5.0', '2.6.0', '2.7.0']),
    ('newton',
        ['2.8.0', '2.9.0', '2.10.0']),
    ('ocata',
        ['2.11.0', '2.12.0']),
])

« Back to merge proposal