Merge ~cjwatson/launchpad:distroseries-export-not-automatic into launchpad:master

Proposed by Colin Watson
Status: Merged
Approved by: Colin Watson
Approved revision: c5b68397bb5408fcf80311f777f0f0a9f1a0f4d6
Merge reported by: Otto Co-Pilot
Merged at revision: not available
Proposed branch: ~cjwatson/launchpad:distroseries-export-not-automatic
Merge into: launchpad:master
Diff against target: 51 lines (+6/-4)
2 files modified
lib/lp/registry/interfaces/distroseries.py (+4/-4)
lib/lp/registry/stories/webservice/xx-distroseries.txt (+2/-0)
Reviewer Review Type Date Requested Status
Guruprasad Approve
Review via email: mp+412714@code.launchpad.net

Commit message

Export DistroSeries.{backports,proposed}_not_automatic

Description of the change

It's otherwise rather difficult to change these settings, requiring SQL.

To post a comment you must log in.
Revision history for this message
Guruprasad (lgp171188) wrote :

LGTM 👍

I tested and verified that the 2 fields exported in this MP are listed in the web service API documentation as writeable fields and also verified that the there is a security adapter, `EditDistroSeriesByReleaseManagerOrDistroOwnersOrAdmins', that allows the edit/write permission only for the authorized users.

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1diff --git a/lib/lp/registry/interfaces/distroseries.py b/lib/lp/registry/interfaces/distroseries.py
2index da0e19e..548d598 100644
3--- a/lib/lp/registry/interfaces/distroseries.py
4+++ b/lib/lp/registry/interfaces/distroseries.py
5@@ -365,22 +365,22 @@ class IDistroSeriesPublic(
6 language_packs = Attribute(
7 "All language packs associated with this distribution series.")
8
9- backports_not_automatic = Bool(
10+ backports_not_automatic = exported(Bool(
11 title=_("Don't upgrade to backports automatically"), required=True,
12 description=_("""
13 Set NotAutomatic: yes and ButAutomaticUpgrades: yes in Release
14 files generated for the backports pocket. This tells apt to
15 automatically upgrade within backports, but not into it.
16- """))
17+ """)))
18
19- proposed_not_automatic = Bool(
20+ proposed_not_automatic = exported(Bool(
21 title=_("Don't upgrade to proposed updates automatically"),
22 required=True,
23 description=_("""
24 Set NotAutomatic: yes and ButAutomaticUpgrades: yes in Release
25 files generated for the proposed pocket. This tells apt to
26 automatically upgrade within proposed, but not into it.
27- """))
28+ """)))
29
30 include_long_descriptions = exported(
31 Bool(
32diff --git a/lib/lp/registry/stories/webservice/xx-distroseries.txt b/lib/lp/registry/stories/webservice/xx-distroseries.txt
33index 520e3bb..236b664 100644
34--- a/lib/lp/registry/stories/webservice/xx-distroseries.txt
35+++ b/lib/lp/registry/stories/webservice/xx-distroseries.txt
36@@ -63,6 +63,7 @@ For distroseries we publish a subset of its attributes.
37 advertise_by_hash: False
38 all_milestones_collection_link: 'http://.../ubuntu/hoary/all_milestones'
39 architectures_collection_link: 'http://.../ubuntu/hoary/architectures'
40+ backports_not_automatic: False
41 bug_reported_acknowledgement: None
42 bug_reporting_guidelines: None
43 changeslist: 'hoary-changes@ubuntu.com'
44@@ -84,6 +85,7 @@ For distroseries we publish a subset of its attributes.
45 official_bug_tags: []
46 owner_link: 'http://.../~ubuntu-team'
47 parent_series_link: 'http://.../ubuntu/warty'
48+ proposed_not_automatic: False
49 publish_by_hash: False
50 registrant_link: 'http://.../~mark'
51 resource_type_link: ...

Subscribers

People subscribed via source and target branches

to status/vote changes: