Merge lp:~mpontillo/maas/remove-check-compatibility-option-bug-1461977 into lp:~maas-committers/maas/trunk

Proposed by Mike Pontillo
Status: Merged
Approved by: Mike Pontillo
Approved revision: no longer in the source branch.
Merged at revision: 3988
Proposed branch: lp:~mpontillo/maas/remove-check-compatibility-option-bug-1461977
Merge into: lp:~maas-committers/maas/trunk
Diff against target: 78 lines (+3/-16)
4 files modified
src/maasserver/forms.py (+0/-1)
src/maasserver/forms_settings.py (+0/-8)
src/maasserver/models/config.py (+3/-3)
src/maasserver/views/tests/test_settings.py (+0/-4)
To merge this branch: bzr merge lp:~mpontillo/maas/remove-check-compatibility-option-bug-1461977
Reviewer Review Type Date Requested Status
Andres Rodriguez (community) Approve
Gavin Panella (community) Approve
Review via email: mp+261090@code.launchpad.net

Commit message

Remove obsolete 'Check component compatibility and certification' option.

To post a comment you must log in.
Revision history for this message
Gavin Panella (allenap) wrote :

For users with a non-default value for "check_compatibility", is there anything that will puke on it? If so, a data migration to remove the config setting is probably in order.

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

lgtm!

review: Approve
Revision history for this message
Mike Pontillo (mpontillo) wrote :

I did a sanity check in the dev env to make sure nothing puked, so I think we're okay.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'src/maasserver/forms.py'
2--- src/maasserver/forms.py 2015-05-20 12:41:00 +0000
3+++ src/maasserver/forms.py 2015-06-04 14:32:29 +0000
4@@ -1351,7 +1351,6 @@
5
6 class CommissioningForm(ConfigForm):
7 """Settings page, Commissioning section."""
8- check_compatibility = get_config_field('check_compatibility')
9
10 def __init__(self, *args, **kwargs):
11 # Skip ConfigForm.__init__ because we need the form intialized but
12
13=== modified file 'src/maasserver/forms_settings.py'
14--- src/maasserver/forms_settings.py 2015-05-13 19:20:54 +0000
15+++ src/maasserver/forms_settings.py 2015-06-04 14:32:29 +0000
16@@ -123,14 +123,6 @@
17
18
19 CONFIG_ITEMS = {
20- 'check_compatibility': {
21- 'default': False,
22- 'form': forms.BooleanField,
23- 'form_kwargs': {
24- 'required': False,
25- 'label': "Check component compatibility and certification"
26- }
27- },
28 'main_archive': {
29 'default': 'http://archive.ubuntu.com/ubuntu',
30 'form': forms.URLField,
31
32=== modified file 'src/maasserver/models/config.py'
33--- src/maasserver/models/config.py 2015-05-13 19:20:54 +0000
34+++ src/maasserver/models/config.py 2015-06-04 14:32:29 +0000
35@@ -41,10 +41,10 @@
36
37
38 def get_default_config():
39+ """
40+ :return: A dictionary mapping default settings keys to default values.
41+ """
42 return {
43- # # settings default values.
44- # Commissioning section configuration.
45- 'check_compatibility': False,
46 # Ubuntu section configuration.
47 'main_archive': 'http://archive.ubuntu.com/ubuntu',
48 'ports_archive': 'http://ports.ubuntu.com/ubuntu-ports',
49
50=== modified file 'src/maasserver/views/tests/test_settings.py'
51--- src/maasserver/views/tests/test_settings.py 2015-05-13 19:20:54 +0000
52+++ src/maasserver/views/tests/test_settings.py 2015-06-04 14:32:29 +0000
53@@ -117,14 +117,12 @@
54 osystem = make_rpc_osystem('ubuntu', releases=[release])
55 patch_usable_osystems(self, [osystem])
56
57- new_check_compatibility = factory.pick_bool()
58 new_commissioning = release['name']
59 response = self.client.post(
60 reverse('settings'),
61 get_prefixed_form_data(
62 prefix='commissioning',
63 data={
64- 'check_compatibility': new_check_compatibility,
65 'commissioning_distro_series': (
66 new_commissioning),
67 }))
68@@ -132,11 +130,9 @@
69 self.assertEqual(httplib.FOUND, response.status_code)
70 self.assertEqual(
71 (
72- new_check_compatibility,
73 new_commissioning,
74 ),
75 (
76- Config.objects.get_config('check_compatibility'),
77 Config.objects.get_config('commissioning_distro_series'),
78 ))
79