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

« back to all changes in this revision

Viewing changes to src/maasserver/models/tests/test_nodegroup.py

  • Committer: Package Import Robot
  • Author(s): Andres Rodriguez, Andres Rodriguez, Jason Hobbs, Jeroen Vermeulen
  • Date: 2014-04-03 13:45:02 UTC
  • mfrom: (1.2.27)
  • Revision ID: package-import@ubuntu.com-20140403134502-k8ocidn51k203zzw
Tags: 1.5+bzr2227-0ubuntu1
* New upstream bugfix release:
  - Fix catching exceptions raised by
    twisted.conch.ssh.keys.Key.fromString (LP: #1298788)
  - Fix validationg in default NodeGroupInterface.broadcast_ip making it
    optional. (LP: #1299374)
  - Drop install-pxe-bootloader as it conflicts with newer import script.
  - Remove references to old import script.
  - Fix changes that cause overwriting of existing entries.
  - Fix inappropriate ValidationError when defining networks with nested
    (but non-identical) address ranges. (LP: #1299114)
  - Fix issue where if a node does not provide an architecture type on dhcp
    request, or no other boot method is available for that architecture,
    the node still uses pxelinux.0 to boot. (LP: #1300285)
  - Take an advisory lock to prevent concurrent creation of the
    eventloops table. (LP: #1300363)
  - Remove the cloud_images_archive setting, as it conflicts with new
    import script. (LP: #1300587)
  - Add a 'logout confirmation' page. Using this, the logout action is
    protected against CSRF attacks because it uses a POST request, in
    conjunction with Django's CSRF protection feature. (LP: #1298790)
  - Fix cluster listings when dealing with large number of clusters by
    paginating it. (LP: #1301242)
  - Change list_boot_images() so that it can cope with a missing boot
    images directory: this happens if the reporting task runs before the
    images have been imported. (LP: #213984)
  - Fix internal server error on fast path installer. (LP: #1293676)
  - Fix uploading files using maas-cli. (LP: #1187826)
  - Fix SM15k Invalid Power Control and Fix enlisting machines with
    2.0 api. (LP: #1302818, LP: #1302819)

[ Andres Rodriguez ]
* debian/maas-cluster-controller.install: Install UEFI templates
* debian/maas-cluster-controller.dirs: Create 'boot-resources' dir.

[ Jason Hobbs ]
* debian/extras/99-maas: Allow access to keyserver.ubuntu.com via
  squid-deb-proxy.
 
[Jeroen Vermeulen]
* debian/maas-cluster-controller.postinst:
  - Make the tgt config link point to the new boot-resources dir.
* debian/maas-region-controller-min.dirs:
  - Don't create /var/lib/maas/tftp.

Show diffs side-by-side

added added

removed removed

Lines of Context:
252
252
            for args, kwargs in recorder.apply_async.call_args_list]
253
253
        self.assertItemsEqual(expected_queues, actual_queues)
254
254
 
255
 
 
256
 
def make_archive_url(name):
257
 
    """Create a fake archive URL."""
258
 
    return "http://%s.example.com/%s/" % (
259
 
        factory.make_name(name),
260
 
        factory.make_name('path'),
261
 
        )
262
 
 
263
255
    def test_refresh_workers_refreshes_accepted_cluster_controllers(self):
264
256
        self.patch(nodegroup_module, 'refresh_worker')
265
257
        nodegroup = factory.make_node_group(status=NODEGROUP_STATUS.ACCEPTED)
447
439
            (proxy, proxy),
448
440
            (env.get('http_proxy'), env.get('https_proxy')))
449
441
 
450
 
    def test_import_boot_images_selects_archive_locations_from_config(self):
451
 
        recorder = self.patch(nodegroup_module, 'import_boot_images')
452
 
        nodegroup = factory.make_node_group(status=NODEGROUP_STATUS.ACCEPTED)
453
 
 
454
 
        archives = {
455
 
            'main_archive': make_archive_url('main'),
456
 
            'ports_archive': make_archive_url('ports'),
457
 
            'cloud_images_archive': make_archive_url('cloud_images'),
458
 
        }
459
 
        for key, value in archives.items():
460
 
            Config.objects.set_config(key, value)
461
 
 
462
 
        nodegroup.import_boot_images()
463
 
 
464
 
        kwargs = recorder.apply_async.call_args[1]['kwargs']
465
 
        archive_options = {arg: kwargs.get(arg) for arg in archives}
466
 
        self.assertEqual(archives, archive_options)
467
 
 
468
442
    def test_import_boot_images_sent_to_nodegroup_queue(self):
469
443
        recorder = self.patch(nodegroup_module, 'import_boot_images')
470
444
        nodegroup = factory.make_node_group()