Merge lp:~allenap/maas/notifications-warn-info into lp:~maas-committers/maas/trunk

Proposed by Gavin Panella
Status: Merged
Approved by: Gavin Panella
Approved revision: no longer in the source branch.
Merged at revision: 5689
Proposed branch: lp:~allenap/maas/notifications-warn-info
Merge into: lp:~maas-committers/maas/trunk
Diff against target: 0 lines
To merge this branch: bzr merge lp:~allenap/maas/notifications-warn-info
Reviewer Review Type Date Requested Status
Gavin Panella (community) Approve
Review via email: mp+316205@code.launchpad.net

Commit message

Support notification categories, server-side.

Previously notifications had no concept of categories, level or severity. Now notifications can be informational, successes, warnings, or errors, which aligns with the work that the Design team has done.

To post a comment you must log in.
Revision history for this message
Lee Trager (ltrager) wrote :

Looks good. Won't we need to specify the field when creating notifications? If so I would consider creating an enum for it in maasserver/enum.py.

Revision history for this message
Gavin Panella (allenap) wrote :

> Looks good. Won't we need to specify the field when creating
> notifications? If so I would consider creating an enum for
> it in maasserver/enum.py.

Mmm, it's kind of internal right now; there are the create_*_for_* methods which mean that call-sites don't need to care. But I suspect I'll have to do it at some point. I've been putting it off as long as possible because enums in MAAS are... a bit crap. Essentially because they have to work with Django's model and form machinery which is... a bit crap. There are 3rd party Django extensions which improve the situation, but they're not packaged, so we can't use them. Anyway, I hope you don't mind, but I'll skip the enum work for now. I imagine it'll only be days before I have to do it, or something like it anyway.

Thanks for the review!

Revision history for this message
Gavin Panella (allenap) wrote :

Lee, I'm going to assume you forgot to vote, and do so myself so I can land this now. If there's anything else that needs fixing I'll make those changes in a follow-up branch.

review: Approve
Revision history for this message
Gavin Panella (allenap) wrote :

Now Launchpad is wedged, scanning the branch. So much for that land-it-now plan.

Preview Diff

Empty