Re: Multi-series charm authors: new functionality for comparing ubuntu versions

2017-04-14 Thread Alex Kavanagh
On Thu, Apr 13, 2017 at 10:13 PM, Colin Watson wrote: > On Thu, Apr 13, 2017 at 09:15:08PM +0100, Alex Kavanagh wrote: > > So instead of: > > > > if ubuntu_version > 'trusty': > > > > We do: > > > > cmp_version = CompareHostReleases(ubuntu_version) > > if cmp_version > 'trusty': > > >

Re: Multi-series charm authors: new functionality for comparing ubuntu versions

2017-04-13 Thread Colin Watson
On Thu, Apr 13, 2017 at 09:15:08PM +0100, Alex Kavanagh wrote: > So instead of: > > if ubuntu_version > 'trusty': > > We do: > > cmp_version = CompareHostReleases(ubuntu_version) > if cmp_version > 'trusty': > > This version of the code checks that ubuntu_version and 'trusty' string

Multi-series charm authors: new functionality for comparing ubuntu versions

2017-04-13 Thread Alex Kavanagh
Hi I just wanted to highlight some new functionality that has been added to charm-helpers [1] to make comparing Ubuntu versions more robust. In the OpenStack team, all of our charms are 'multi-series' in that a single charm support multiple versions of Ubuntu and multiple versions of OpenStack (o