launchpad-reviewers team mailing list archive
-
launchpad-reviewers team
-
Mailing list archive
-
Message #12149
[Merge] lp:~rvb/maas/cleanup-signals into lp:maas
Raphaël Badin has proposed merging lp:~rvb/maas/cleanup-signals into lp:maas.
Requested reviews:
MAAS Maintainers (maas-maintainers)
For more details, see:
https://code.launchpad.net/~rvb/maas/cleanup-signals/+merge/124980
This branch cleans up all the global config options for managing DNS and DHCP. That is now done at the nodegroup level.
= Pre-imp =
This was discussed with Gavin.
= Notes =
This is a follow-up on lp:~rvb/maas/nodegroup-api-methods-2 and lp:~rvb/maas/nodegroup-api-methods.
Only code deletion and small test modification.
--
https://code.launchpad.net/~rvb/maas/cleanup-signals/+merge/124980
Your team MAAS Maintainers is requested to review the proposed merge of lp:~rvb/maas/cleanup-signals into lp:maas.
=== removed file 'src/maasserver/dhcp.py'
--- src/maasserver/dhcp.py 2012-09-05 13:30:21 +0000
+++ src/maasserver/dhcp.py 1970-01-01 00:00:00 +0000
@@ -1,27 +0,0 @@
-# Copyright 2012 Canonical Ltd. This software is licensed under the
-# GNU Affero General Public License version 3 (see the file LICENSE).
-
-"""DHCP management module."""
-
-from __future__ import (
- absolute_import,
- print_function,
- unicode_literals,
- )
-
-__metaclass__ = type
-__all__ = [
- 'is_dhcp_management_enabled',
- ]
-
-from maasserver.enum import DNS_DHCP_MANAGEMENT
-from maasserver.models import Config
-
-
-def is_dhcp_management_enabled():
- """Is MAAS configured to manage DHCP?
-
- This status is controlled by the `dns_dhcp_management` configuration item.
- """
- dns_dhcp_management = Config.objects.get_config('dns_dhcp_management')
- return dns_dhcp_management != DNS_DHCP_MANAGEMENT.NONE
=== modified file 'src/maasserver/dns.py'
--- src/maasserver/dns.py 2012-09-12 17:37:51 +0000
+++ src/maasserver/dns.py 2012-09-18 16:39:18 +0000
@@ -24,10 +24,8 @@
import socket
from django.conf import settings
-from maasserver.enum import DNS_DHCP_MANAGEMENT
from maasserver.exceptions import MAASException
from maasserver.models import (
- Config,
DHCPLease,
NodeGroup,
)
@@ -55,15 +53,8 @@
def is_dns_enabled():
- """Is MAAS configured to manage DNS?
-
- This status is controlled by the `dns_dhcp_management` configuration item.
- """
- dns_dhcp_config = Config.objects.get_config('dns_dhcp_management')
- return (
- settings.DNS_CONNECT and
- dns_dhcp_config == DNS_DHCP_MANAGEMENT.DNS_AND_DHCP
- )
+ """Is MAAS configured to manage DNS?"""
+ return settings.DNS_CONNECT
class DNSException(MAASException):
@@ -112,9 +103,6 @@
This method also accepts a serial to reuse the same serial when
we are creating DNSZoneConfig objects in bulk.
"""
- if not nodegroup.is_dhcp_enabled():
- return None
-
interface = nodegroup.get_managed_interface()
if interface is None:
return None
=== modified file 'src/maasserver/dns_connect.py'
--- src/maasserver/dns_connect.py 2012-09-12 17:37:51 +0000
+++ src/maasserver/dns_connect.py 2012-09-18 16:39:18 +0000
@@ -19,9 +19,7 @@
post_save,
)
from django.dispatch import receiver
-from maasserver.enum import DNS_DHCP_MANAGEMENT
from maasserver.models import (
- Config,
Node,
NodeGroup,
NodeGroupInterface,
@@ -29,17 +27,6 @@
from maasserver.signals import connect_to_field_change
-def dns_config_changed(sender, config, created, **kwargs):
- """Signal callback called when the DNS config has changed."""
- from maasserver.dns import write_full_dns_config
- dns_enabled = (config.value == DNS_DHCP_MANAGEMENT.DNS_AND_DHCP)
- write_full_dns_config(active=dns_enabled)
-
-
-Config.objects.config_changed_connect(
- 'dns_dhcp_management', dns_config_changed)
-
-
@receiver(post_save, sender=NodeGroup)
def dns_post_save_NodeGroup(sender, instance, created, **kwargs):
"""Create or update DNS zones related to the saved nodegroup."""
=== modified file 'src/maasserver/enum.py'
--- src/maasserver/enum.py 2012-09-18 16:00:45 +0000
+++ src/maasserver/enum.py 2012-09-18 16:39:18 +0000
@@ -13,8 +13,6 @@
__all__ = [
'ARCHITECTURE',
'ARCHITECTURE_CHOICES',
- 'DNS_DHCP_MANAGEMENT',
- 'DNS_DHCP_MANAGEMENT_CHOICES',
'NODEGROUP_STATUS',
'NODEGROUP_STATUS_CHOICES',
'NODEGROUPINTERFACE_MANAGEMENT',
@@ -134,19 +132,6 @@
ENLIST_USERDATA = 'enlist_userdata'
-class DNS_DHCP_MANAGEMENT:
- NONE = 'none'
- DHCP_ONLY = 'dhcp_only'
- DNS_AND_DHCP = 'dns_and_dhcp'
-
-
-DNS_DHCP_MANAGEMENT_CHOICES = (
- (DNS_DHCP_MANAGEMENT.NONE, "Don't manage either"),
- (DNS_DHCP_MANAGEMENT.DHCP_ONLY, "Manage DHCP"),
- (DNS_DHCP_MANAGEMENT.DNS_AND_DHCP, "Manage DNS and DHCP"),
-)
-
-
class NODEGROUP_STATUS:
"""The vocabulary of a `NodeGroup`'s possible statuses."""
# A nodegroup starts out as PENDING.
=== modified file 'src/maasserver/forms.py'
--- src/maasserver/forms.py 2012-09-18 15:33:55 +0000
+++ src/maasserver/forms.py 2012-09-18 16:39:18 +0000
@@ -50,12 +50,10 @@
Form,
ModelForm,
)
-from django.utils.safestring import mark_safe
from maasserver.config_forms import SKIP_CHECK_NAME
from maasserver.enum import (
ARCHITECTURE,
ARCHITECTURE_CHOICES,
- DNS_DHCP_MANAGEMENT_CHOICES,
NODE_AFTER_COMMISSIONING_ACTION,
NODE_AFTER_COMMISSIONING_ACTION_CHOICES,
NODEGROUP_STATUS,
@@ -529,19 +527,6 @@
label="Default domain for new nodes", required=False, help_text=(
"If 'local' is chosen, nodes must be using mDNS. Leave empty to "
"use hostnames without a domain for newly enlisted nodes."))
- dns_dhcp_management = forms.ChoiceField(
- label="DNS and DHCP servers management",
- choices=DNS_DHCP_MANAGEMENT_CHOICES,
- help_text=mark_safe(
- "If MAAS manages the DHCP server, MAAS workers will work with ISC "
- "DHCP servers, if suitably configured, to give each DHCP client "
- "its own host map. Unlike normal leases, these host maps never "
- "expire. Thus enabling DHCP management ensures that a node will "
- "never change its IP address. <br />"
- "If MAAS manages the DNS server, it will use the machine's BIND "
- "server to publish its DNS zones. Note that this can be enabled "
- "only if MAAS also manages the DHCP server as MAAS needs the "
- "lease information in order to populate the DNS zones."))
class CommissioningForm(ConfigForm):
=== modified file 'src/maasserver/management/commands/config_master_dhcp.py'
--- src/maasserver/management/commands/config_master_dhcp.py 2012-09-14 11:13:17 +0000
+++ src/maasserver/management/commands/config_master_dhcp.py 2012-09-18 16:39:18 +0000
@@ -25,12 +25,8 @@
)
from django.core.management.base import BaseCommand
-from maasserver.enum import (
- DNS_DHCP_MANAGEMENT,
- NODEGROUPINTERFACE_MANAGEMENT,
- )
+from maasserver.enum import NODEGROUPINTERFACE_MANAGEMENT
from maasserver.models import (
- Config,
NodeGroup,
NodeGroupInterface,
)
@@ -110,11 +106,5 @@
setattr(interface, item, value)
interface.save()
- # Enable DHCP management if it was previously disabled.
- dns_dhcp_management = Config.objects.get_config(
- 'dns_dhcp_management')
- if dns_dhcp_management == DNS_DHCP_MANAGEMENT.NONE:
- Config.objects.set_config(
- 'dns_dhcp_management', DNS_DHCP_MANAGEMENT.DHCP_ONLY)
# Create a Task that will write the config out.
master_nodegroup.set_up_dhcp()
=== modified file 'src/maasserver/models/config.py'
--- src/maasserver/models/config.py 2012-09-05 13:30:21 +0000
+++ src/maasserver/models/config.py 2012-09-18 16:39:18 +0000
@@ -26,10 +26,7 @@
)
from django.db.models.signals import post_save
from maasserver import DefaultMeta
-from maasserver.enum import (
- DNS_DHCP_MANAGEMENT,
- NODE_AFTER_COMMISSIONING_ACTION,
- )
+from maasserver.enum import NODE_AFTER_COMMISSIONING_ACTION
from maasserver.fields import JSONObjectField
from provisioningserver.enum import POWER_TYPE
@@ -51,7 +48,6 @@
# Network section configuration.
'maas_name': gethostname(),
'enlistment_domain': b'local',
- 'dns_dhcp_management': DNS_DHCP_MANAGEMENT.NONE,
## /settings
}
=== modified file 'src/maasserver/models/nodegroup.py'
--- src/maasserver/models/nodegroup.py 2012-09-18 07:51:29 +0000
+++ src/maasserver/models/nodegroup.py 2012-09-18 16:39:18 +0000
@@ -22,7 +22,6 @@
Manager,
)
from maasserver import DefaultMeta
-from maasserver.dhcp import is_dhcp_management_enabled
from maasserver.enum import (
NODEGROUP_STATUS,
NODEGROUP_STATUS_CHOICES,
@@ -199,22 +198,9 @@
ip_range_high=interface.ip_range_high)
def add_dhcp_host_maps(self, new_leases):
- if self.is_dhcp_enabled() and len(new_leases) > 0:
+ if self.get_managed_interface() is not None and len(new_leases) > 0:
# XXX JeroenVermeulen 2012-08-21, bug=1039362: the DHCP
# server is currently always local to the worker system, so
# use 127.0.0.1 as the DHCP server address.
add_new_dhcp_host_map.delay(
new_leases, '127.0.0.1', self.dhcp_key)
-
- def is_dhcp_enabled(self):
- """Is the DHCP for this nodegroup enabled?"""
- # Once we have support for multiple managed interfaces, this
- # method will have to be improved to cope with that.
- if not is_dhcp_management_enabled():
- return False
-
- interface = self.get_managed_interface()
- if interface is not None:
- return True
- else:
- return False
=== modified file 'src/maasserver/testing/__init__.py'
--- src/maasserver/testing/__init__.py 2012-09-05 13:30:21 +0000
+++ src/maasserver/testing/__init__.py 2012-09-18 16:39:18 +0000
@@ -11,10 +11,6 @@
__metaclass__ = type
__all__ = [
- "disable_dhcp_management",
- "disable_dns_management",
- "enable_dhcp_management",
- "enable_dns_management",
"extract_redirect",
"get_content_links",
"get_data",
@@ -28,8 +24,6 @@
from urlparse import urlparse
from lxml.html import fromstring
-from maasserver.enum import DNS_DHCP_MANAGEMENT
-from maasserver.models import Config
from maasserver.utils.orm import get_one
@@ -127,32 +121,3 @@
doc = fromstring(response.content)
[content_node] = doc.cssselect(element)
return [elem.get('href') for elem in content_node.cssselect('a')]
-
-
-def enable_dhcp_management():
- """Turn MAAS DHCP management on."""
- # Circular import.
- from maasserver.testing.factory import factory
- config = factory.getRandomEnum(
- DNS_DHCP_MANAGEMENT, but_not=(DNS_DHCP_MANAGEMENT.NONE,))
- Config.objects.set_config('dns_dhcp_management', config)
-
-
-def enable_dns_management():
- """Turn MAAS DNS management on."""
- Config.objects.set_config(
- 'dns_dhcp_management', DNS_DHCP_MANAGEMENT.DNS_AND_DHCP)
-
-
-def disable_dhcp_management():
- """Turn MAAS DHCP management off."""
- Config.objects.set_config('dns_dhcp_management', DNS_DHCP_MANAGEMENT.NONE)
-
-
-def disable_dns_management():
- """Turn MAAS DNS management off."""
- # Circular import.
- from maasserver.testing.factory import factory
- config = factory.getRandomEnum(
- DNS_DHCP_MANAGEMENT, but_not=(DNS_DHCP_MANAGEMENT.DNS_AND_DHCP,))
- Config.objects.set_config('dns_dhcp_management', config)
=== modified file 'src/maasserver/tests/test_api.py'
--- src/maasserver/tests/test_api.py 2012-09-18 16:00:45 +0000
+++ src/maasserver/tests/test_api.py 2012-09-18 16:39:18 +0000
@@ -23,6 +23,7 @@
timedelta,
)
import httplib
+from itertools import izip
import json
import os
import random
@@ -36,7 +37,6 @@
from django.http import QueryDict
from fixtures import Fixture
from maasserver import api
-from itertools import izip
from maasserver.api import (
DISPLAYED_NODEGROUP_FIELDS,
extract_constraints,
@@ -76,8 +76,6 @@
)
from maasserver.refresh_worker import refresh_worker
from maasserver.testing import (
- disable_dhcp_management,
- enable_dhcp_management,
reload_object,
reload_objects,
)
@@ -2699,7 +2697,6 @@
self.assertEqual(httplib.NOT_FOUND, response.status_code)
def test_update_leases_processes_empty_leases_dict(self):
- enable_dhcp_management()
nodegroup = factory.make_node_group()
factory.make_dhcp_lease(nodegroup=nodegroup)
client = make_worker_client(nodegroup)
@@ -2716,6 +2713,7 @@
[], DHCPLease.objects.filter(nodegroup=nodegroup))
def test_update_leases_stores_leases(self):
+ self.patch(Omshell, 'create')
nodegroup = factory.make_node_group()
lease = factory.make_random_leases()
client = make_worker_client(nodegroup)
@@ -2733,26 +2731,7 @@
lease.ip
for lease in DHCPLease.objects.filter(nodegroup=nodegroup)])
- def test_update_leases_stores_leases_even_if_not_managing_dhcp(self):
- disable_dhcp_management()
- nodegroup = factory.make_node_group()
- lease = factory.make_random_leases()
- client = make_worker_client(nodegroup)
- response = client.post(
- reverse('nodegroup_handler', args=[nodegroup.uuid]),
- {
- 'op': 'update_leases',
- 'leases': json.dumps(lease),
- })
- self.assertEqual(
- (httplib.OK, "Leases updated."),
- (response.status_code, response.content))
- self.assertItemsEqual(lease.keys(), [
- lease.ip
- for lease in DHCPLease.objects.filter(nodegroup=nodegroup)])
-
def test_update_leases_adds_new_leases_on_worker(self):
- enable_dhcp_management()
nodegroup = factory.make_node_group()
client = make_worker_client(nodegroup)
self.patch(Omshell, 'create', FakeMethod())
@@ -2772,7 +2751,6 @@
def test_update_leases_does_not_add_old_leases(self):
self.patch(Omshell, 'create')
- enable_dhcp_management()
nodegroup = factory.make_node_group()
client = make_worker_client(nodegroup)
self.patch(tasks, 'add_new_dhcp_host_map', FakeMethod())
=== modified file 'src/maasserver/tests/test_commands_config_master_dhcp.py'
--- src/maasserver/tests/test_commands_config_master_dhcp.py 2012-09-14 11:24:20 +0000
+++ src/maasserver/tests/test_commands_config_master_dhcp.py 2012-09-18 16:39:18 +0000
@@ -15,16 +15,9 @@
from optparse import OptionValueError
from django.core.management import call_command
-from maasserver.enum import (
- DNS_DHCP_MANAGEMENT,
- NODEGROUPINTERFACE_MANAGEMENT,
- )
+from maasserver.enum import NODEGROUPINTERFACE_MANAGEMENT
from maasserver.management.commands.config_master_dhcp import name_option
-from maasserver.models import (
- Config,
- NodeGroup,
- )
-from maasserver.testing import disable_dhcp_management
+from maasserver.models import NodeGroup
from maasserver.testing.factory import factory
from maasserver.testing.testcase import TestCase
from testtools.matchers import MatchesStructure
@@ -141,23 +134,8 @@
def test_name_option_turns_dhcp_setting_name_into_option(self):
self.assertEqual('--subnet-mask', name_option('subnet_mask'))
- def test_sets_up_dhcp_and_enables_it(self):
- master = NodeGroup.objects.ensure_master()
- settings = make_dhcp_settings()
- disable_dhcp_management()
- call_command('config_master_dhcp', **settings)
- self.assertEqual(1, master.set_up_dhcp.call_count)
- self.assertEqual(
- Config.objects.get_config('dns_dhcp_management'),
- DNS_DHCP_MANAGEMENT.DHCP_ONLY)
-
- def test_sets_up_dhcp_preserves_dns_dhcp_setting_if_dhcp_enabled(self):
- master = NodeGroup.objects.ensure_master()
- settings = make_dhcp_settings()
- dns_dhcp_config = DNS_DHCP_MANAGEMENT.DNS_AND_DHCP
- Config.objects.set_config('dns_dhcp_management', dns_dhcp_config)
- call_command('config_master_dhcp', **settings)
- self.assertEqual(1, master.set_up_dhcp.call_count)
- self.assertEqual(
- Config.objects.get_config('dns_dhcp_management'),
- dns_dhcp_config)
+ def test_sets_up_dhcp(self):
+ master = NodeGroup.objects.ensure_master()
+ settings = make_dhcp_settings()
+ call_command('config_master_dhcp', **settings)
+ self.assertEqual(1, master.set_up_dhcp.call_count)
=== removed file 'src/maasserver/tests/test_dhcp.py'
--- src/maasserver/tests/test_dhcp.py 2012-09-05 13:30:21 +0000
+++ src/maasserver/tests/test_dhcp.py 1970-01-01 00:00:00 +0000
@@ -1,34 +0,0 @@
-# Copyright 2012 Canonical Ltd. This software is licensed under the
-# GNU Affero General Public License version 3 (see the file LICENSE).
-
-"""Tests for DHCP management."""
-
-from __future__ import (
- absolute_import,
- print_function,
- unicode_literals,
- )
-
-__metaclass__ = type
-__all__ = []
-
-from maasserver.dhcp import is_dhcp_management_enabled
-from maasserver.testing import (
- disable_dhcp_management,
- enable_dhcp_management,
- )
-from maasserver.testing.testcase import TestCase
-
-
-class TestDHCPManagement(TestCase):
-
- def test_is_dhcp_management_enabled_defaults_to_False(self):
- self.assertFalse(is_dhcp_management_enabled())
-
- def test_is_dhcp_management_enabled_dns_dhcp_management_True(self):
- enable_dhcp_management()
- self.assertTrue(is_dhcp_management_enabled())
-
- def test_is_dhcp_management_enabled_dns_dhcp_management_False(self):
- disable_dhcp_management()
- self.assertFalse(is_dhcp_management_enabled())
=== modified file 'src/maasserver/tests/test_dns.py'
--- src/maasserver/tests/test_dns.py 2012-09-12 17:37:51 +0000
+++ src/maasserver/tests/test_dns.py 2012-09-18 16:39:18 +0000
@@ -25,10 +25,6 @@
server_address,
)
from maasserver.models.dhcplease import DHCPLease
-from maasserver.testing import (
- disable_dns_management,
- enable_dns_management,
- )
from maasserver.testing.factory import factory
from maasserver.testing.testcase import TestCase
from maastesting.bindfixture import BINDServer
@@ -93,7 +89,6 @@
self.assertRaises(dns.DNSException, dns.get_dns_server_address)
def test_get_zone_creates_DNSZoneConfig(self):
- enable_dns_management()
nodegroup = factory.make_node_group()
interface = nodegroup.get_managed_interface()
serial = random.randint(1, 100)
@@ -119,7 +114,6 @@
def setUp(self):
super(TestDNSConfigModifications, self).setUp()
- enable_dns_management()
self.bind = self.useFixture(BINDServer())
self.patch(conf, 'DNS_CONFIG_DIR', self.bind.config.homedir)
@@ -211,13 +205,8 @@
self.patch(settings, 'DNS_CONNECT', False)
self.assertFalse(dns.is_dns_enabled())
- def test_is_dns_enabled_return_false_if_confif_enable_dns_False(self):
- disable_dns_management()
- self.assertFalse(dns.is_dns_enabled())
-
def test_is_dns_enabled_return_True(self):
self.patch(settings, 'DNS_CONNECT', True)
- enable_dns_management()
self.assertTrue(dns.is_dns_enabled())
def test_write_full_dns_loads_full_dns_config(self):
@@ -326,16 +315,3 @@
node.error = factory.getRandomString()
node.save()
self.assertEqual(0, recorder.call_count)
-
- def test_change_config_enable_dns_enables_dns(self):
- self.patch(settings, "DNS_CONNECT", False)
- nodegroup, node, lease = self.create_nodegroup_with_lease()
- settings.DNS_CONNECT = True
- enable_dns_management()
- self.assertDNSMatches(node.hostname, nodegroup.name, lease.ip)
-
- def test_change_config_enable_dns_disables_dns(self):
- self.patch(settings, "DNS_CONNECT", True)
- nodegroup, node, lease = self.create_nodegroup_with_lease()
- disable_dns_management()
- self.assertEqual([''], self.dig_resolve(generated_hostname(lease.ip)))
=== modified file 'src/maasserver/tests/test_nodegroup.py'
--- src/maasserver/tests/test_nodegroup.py 2012-09-16 17:11:00 +0000
+++ src/maasserver/tests/test_nodegroup.py 2012-09-18 16:39:18 +0000
@@ -176,13 +176,6 @@
('celery', FixtureResource(CeleryFixture())),
)
- def test_is_dhcp_enabled_returns_False_if_interface_not_managed(self):
- nodegroup = factory.make_node_group()
- interface = nodegroup.get_managed_interface()
- interface.management = NODEGROUPINTERFACE_MANAGEMENT.UNMANAGED
- interface.save()
- self.assertFalse(nodegroup.is_dhcp_enabled())
-
def test_set_up_dhcp_writes_dhcp_config(self):
mocked_task = self.patch(
maasserver.models.nodegroup, 'write_dhcp_config')
@@ -216,7 +209,6 @@
def test_add_dhcp_host_maps_adds_maps_if_managing_dhcp(self):
self.patch(Omshell, 'create', FakeMethod())
nodegroup = factory.make_node_group()
- self.patch(nodegroup, 'is_dhcp_enabled', FakeMethod(result=True))
leases = factory.make_random_leases()
nodegroup.add_dhcp_host_maps(leases)
self.assertEqual(
@@ -225,8 +217,8 @@
def test_add_dhcp_host_maps_does_nothing_if_not_managing_dhcp(self):
self.patch(Omshell, 'create', FakeMethod())
- nodegroup = factory.make_node_group()
- self.patch(nodegroup, 'is_dhcp_enabled', FakeMethod(result=False))
+ nodegroup = factory.make_node_group(
+ management=NODEGROUPINTERFACE_MANAGEMENT.UNMANAGED)
leases = factory.make_random_leases()
nodegroup.add_dhcp_host_maps(leases)
self.assertEqual([], Omshell.create.extract_args())
=== modified file 'src/maasserver/tests/test_views_settings.py'
--- src/maasserver/tests/test_views_settings.py 2012-09-05 13:30:21 +0000
+++ src/maasserver/tests/test_views_settings.py 2012-09-18 16:39:18 +0000
@@ -18,10 +18,7 @@
from django.contrib.auth.models import User
from django.core.urlresolvers import reverse
from lxml.html import fromstring
-from maasserver.enum import (
- DNS_DHCP_MANAGEMENT,
- NODE_AFTER_COMMISSIONING_ACTION,
- )
+from maasserver.enum import NODE_AFTER_COMMISSIONING_ACTION
from maasserver.models import (
Config,
UserProfile,
@@ -81,7 +78,6 @@
self.patch(settings, "DNS_CONNECT", False)
new_name = factory.getRandomString()
new_domain = factory.getRandomString()
- new_dns_dhcp_management = factory.getRandomEnum(DNS_DHCP_MANAGEMENT)
response = self.client.post(
reverse('settings'),
get_prefixed_form_data(
@@ -89,16 +85,12 @@
data={
'maas_name': new_name,
'enlistment_domain': new_domain,
- 'dns_dhcp_management': new_dns_dhcp_management,
}))
self.assertEqual(httplib.FOUND, response.status_code)
self.assertEqual(new_name, Config.objects.get_config('maas_name'))
self.assertEqual(
new_domain, Config.objects.get_config('enlistment_domain'))
- self.assertEqual(
- new_dns_dhcp_management,
- Config.objects.get_config('dns_dhcp_management'))
def test_settings_commissioning_POST(self):
new_after_commissioning = factory.getRandomEnum(