~smoser/ubuntu/trusty/maas/lp-1172566

« back to all changes in this revision

Viewing changes to src/maasserver/models/nodegroup.py

  • Committer: Package Import Robot
  • Author(s): Andres Rodriguez
  • Date: 2014-04-03 13:45:02 UTC
  • mto: This revision was merged to the branch mainline in revision 58.
  • Revision ID: package-import@ubuntu.com-20140403134502-8a6wvuqwyuekufh0
Tags: upstream-1.5+bzr2227
ImportĀ upstreamĀ versionĀ 1.5+bzr2227

Show diffs side-by-side

added added

removed removed

Lines of Context:
68
68
        dhcp_values = [
69
69
            interface,
70
70
            subnet_mask,
71
 
            broadcast_ip,
72
71
            router_ip,
73
72
            ip_range_low,
74
73
            ip_range_high,
75
74
            ]
76
75
        assert all(dhcp_values) or not any(dhcp_values), (
77
 
            "Provide all DHCP settings, or none at all.")
 
76
            "Provide all DHCP settings, or none at all. "
 
77
            "Only the broadcast address is optional.")
78
78
 
79
79
        if cluster_name is None:
80
80
            cluster_name = NODEGROUP_CLUSTER_NAME_TEMPLATE % {'uuid': uuid}
264
264
        """
265
265
        # Avoid circular imports.
266
266
        from maasserver.models import Config
267
 
        config_parameters = {
268
 
            'http_proxy',
269
 
            'main_archive',
270
 
            'ports_archive',
271
 
            'cloud_images_archive',
272
 
        }
273
267
        task_kwargs = {
274
 
            name: Config.objects.get_config(name)
275
 
            for name in config_parameters
276
 
            if Config.objects.get_config(name) is not None
277
 
        }
278
 
        task_kwargs['callback'] = report_boot_images.subtask(
279
 
            options={'queue': self.uuid})
 
268
            'callback': report_boot_images.subtask(
 
269
                options={'queue': self.uuid}),
 
270
            }
 
271
        http_proxy = Config.objects.get_config('http_proxy')
 
272
        if http_proxy is not None:
 
273
            task_kwargs['http_proxy'] = http_proxy
280
274
        import_boot_images.apply_async(queue=self.uuid, kwargs=task_kwargs)
281
275
 
282
276
    def add_seamicro15k(self, mac, username, password, power_control=None):