← Back to team overview

launchpad-reviewers team mailing list archive

[Merge] lp:~rvb/maas/mirror-settings-re into lp:maas

 

Raphaël Badin has proposed merging lp:~rvb/maas/mirror-settings-re into lp:maas.

Commit message:
Remove unused settings (fallback_master_archive, keep_mirror_list_uptodate and fetch_new_releases).

Requested reviews:
  Launchpad code reviewers (launchpad-reviewers)

For more details, see:
https://code.launchpad.net/~rvb/maas/mirror-settings-re/+merge/133460
-- 
https://code.launchpad.net/~rvb/maas/mirror-settings-re/+merge/133460
Your team Launchpad code reviewers is requested to review the proposed merge of lp:~rvb/maas/mirror-settings-re into lp:maas.
=== modified file 'src/maasserver/forms.py'
--- src/maasserver/forms.py	2012-11-08 10:11:03 +0000
+++ src/maasserver/forms.py	2012-11-08 11:57:21 +0000
@@ -630,19 +630,10 @@
 
 class UbuntuForm(ConfigForm):
     """Settings page, Ubuntu section."""
-    fallback_master_archive = forms.BooleanField(
-        label="Fallback to Ubuntu master archive",
-        required=False)
     default_distro_series = forms.ChoiceField(
         choices=DISTRO_SERIES_CHOICES, required=False,
         label="Default distro series used for deployment",
         error_messages={'invalid_choice': INVALID_DISTRO_SERIES_MESSAGE})
-    keep_mirror_list_uptodate = forms.BooleanField(
-        label="Keep mirror list up to date",
-        required=False)
-    fetch_new_releases = forms.BooleanField(
-        label="Fetch new releases automatically",
-        required=False)
 
     def __init__(self, *args, **kwargs):
         super(UbuntuForm, self).__init__(*args, **kwargs)

=== modified file 'src/maasserver/templates/maasserver/settings.html'
--- src/maasserver/templates/maasserver/settings.html	2012-11-06 16:47:23 +0000
+++ src/maasserver/templates/maasserver/settings.html	2012-11-08 11:57:21 +0000
@@ -109,15 +109,6 @@
             Add archive for newly provisioned machines
           </a>
         </li>
-        {% with field=ubuntu_form.fallback_master_archive %}
-          {% include "maasserver/form_field.html" %}
-        {% endwith %}
-        {% with field=ubuntu_form.keep_mirror_list_uptodate %}
-          {% include "maasserver/form_field.html" %}
-        {% endwith %}
-        {% with field=ubuntu_form.fetch_new_releases %}
-          {% include "maasserver/form_field.html" %}
-        {% endwith %}
         </ul>
         <input type="hidden" name="ubuntu_submit" value="1" />
         <input type="submit" class="button right" value="Save" />

=== modified file 'src/maasserver/tests/test_views_settings.py'
--- src/maasserver/tests/test_views_settings.py	2012-11-08 06:34:48 +0000
+++ src/maasserver/tests/test_views_settings.py	2012-11-08 11:57:21 +0000
@@ -137,9 +137,6 @@
             ))
 
     def test_settings_ubuntu_POST(self):
-        new_fallback_master_archive = factory.getRandomBoolean()
-        new_keep_mirror_list_uptodate = factory.getRandomBoolean()
-        new_fetch_new_releases = factory.getRandomBoolean()
         choices = Config.objects.get_config('update_from_choice')
         new_update_from = factory.getRandomChoice(choices)
         new_default_distro_series = factory.getRandomEnum(DISTRO_SERIES)
@@ -148,9 +145,6 @@
             get_prefixed_form_data(
                 prefix='ubuntu',
                 data={
-                    'fallback_master_archive': new_fallback_master_archive,
-                    'keep_mirror_list_uptodate': new_keep_mirror_list_uptodate,
-                    'fetch_new_releases': new_fetch_new_releases,
                     'update_from': new_update_from,
                     'default_distro_series': new_default_distro_series,
                 }))
@@ -158,16 +152,10 @@
         self.assertEqual(httplib.FOUND, response.status_code)
         self.assertEqual(
             (
-                new_fallback_master_archive,
-                new_keep_mirror_list_uptodate,
-                new_fetch_new_releases,
                 new_update_from,
                 new_default_distro_series,
             ),
             (
-                Config.objects.get_config('fallback_master_archive'),
-                Config.objects.get_config('keep_mirror_list_uptodate'),
-                Config.objects.get_config('fetch_new_releases'),
                 Config.objects.get_config('update_from'),
                 Config.objects.get_config('default_distro_series'),
             ))