Code review comment for ~ltrager/maas:lp1787621

Revision history for this message
Andres Rodriguez (andreserl) wrote :

uhmmm I don't like hardocing this... Why is it only for Ubuntu Core in the
first place? Why not for other OS?

On Tue, Sep 11, 2018 at 11:54 AM, Lee Trager <email address hidden>
wrote:

> Thanks for the review, answered your question inline.
>
> Diff comments:
>
> > diff --git a/src/maasserver/websockets/handlers/bootresource.py
> b/src/maasserver/websockets/handlers/bootresource.py
> > index 4183f22..78315b2 100644
> > --- a/src/maasserver/websockets/handlers/bootresource.py
> > +++ b/src/maasserver/websockets/handlers/bootresource.py
> > @@ -286,7 +286,8 @@ class BootResourceHandler(Handler):
> > if 'title' in image.extra and image.extra != '':
> > title = image.extra['title']
> > else:
> > - title = get_os_release_title(image.os, image.release)
> > + osystem = OperatingSystemRegistry['ubuntu-core']
>
> This is a method only for Ubuntu Core(format_ubuntu_core-images) It
> iterates over BootSourceCache.objects.filter(os='ubuntu-core') so we know
> it will always be ubuntu-core.
>
> > + title = osystem.get_release_title(image.release)
> > if title is None:
> > title = '%s/%s' % (image.os, image.release)
> > images.append({
>
>
> --
> https://code.launchpad.net/~ltrager/maas/+git/maas/+merge/354673
> You are reviewing the proposed merge of ~ltrager/maas:lp1787621 into
> maas:master.
>

--
Andres Rodriguez
Engineering Manager, MAAS
Canonical USA, Inc.

« Back to merge proposal