~ubuntu-branches/ubuntu/trusty/maas/trusty-security

« back to all changes in this revision

Viewing changes to src/maasserver/tests/test_api_nodegroup.py

  • Committer: Package Import Robot
  • Author(s): Greg Lutostanski, Greg Lutostanski, Gavin Panella, Diogo Matsubara, Raphaël Badin
  • Date: 2014-08-29 13:27:34 UTC
  • mfrom: (1.2.34)
  • mto: This revision was merged to the branch mainline in revision 62.
  • Revision ID: package-import@ubuntu.com-20140829132734-1yaitdu9h4zlgci0
Tags: 1.5.4+bzr2294-0ubuntu1
* New upstream bug fix release:
  - Change supported releases for install to Precise, Saucy, Trusty, Utopic
    (Add Utopic; Remove Quantal/Raring) -- will still only be able to install
    releases with streams available to maas (LP: #1337437)
  - Package fails to install when the default route is through an
    aliased/tagged interface (LP: #1350235)
  - ERROR Nonce already used (LP: #1190986)
  - Add MAAS arm64/xgene support (LP: #1338851)
  - API documentation for nodegroup op=details missing parameter
    (LP: #1331982)
  - Reduce number of celery tasks emitted when updating a cluster controller
    (LP: #1324944)
  - Fix VirshSSH template which was referencing invalid attributes
    (LP: #1324966)
  - Fix a start up problems where a database lock was being taken outside of
    a transaction (LP: #1325640, LP: #1325759)
  - Reformat badly formatted Architecture error message (LP: #1301465)
  - Final changes to support ppc64el (now known as PowerNV) (LP: #1315154)
  - UI tweak to make navigation elements visible for documentation

[ Greg Lutostanski ]
 * debian/control:
  - maas-provisioningserver not maas-cluster-controller depends on
    python-pexpect (LP: #1352273)

[ Gavin Panella ]
 * debian/maas-cluster-controller.postinst
  - Allow maas-pserv to bind to all IPv6 addresses too. (LP: #1342302) 

[ Diogo Matsubara ]
 * debian/control:
  - python-maas-provisioningserver depends on python-paramiko (LP: #1334401)

[ Raphaël Badin ]
 * debian/extras/99-maas-sudoers:
  - Add rule 'maas-dhcp-server stop' job.

Show diffs side-by-side

added added

removed removed

Lines of Context:
460
460
        matcher = MockCalledOnceWith(queue=nodegroup.uuid, args=args)
461
461
        self.assertThat(mock.apply_async, matcher)
462
462
 
 
463
    def test_probe_and_enlist_mscm_adds_mscm(self):
 
464
        nodegroup = factory.make_node_group()
 
465
        host = 'http://host'
 
466
        username = factory.make_name('user')
 
467
        password = factory.make_name('password')
 
468
        self.become_admin()
 
469
 
 
470
        mock = self.patch(nodegroup_module, 'enlist_nodes_from_mscm')
 
471
 
 
472
        response = self.client.post(
 
473
            reverse('nodegroup_handler', args=[nodegroup.uuid]),
 
474
            {
 
475
                'op': 'probe_and_enlist_mscm',
 
476
                'host': host,
 
477
                'username': username,
 
478
                'password': password,
 
479
            })
 
480
 
 
481
        self.assertEqual(
 
482
            httplib.OK, response.status_code,
 
483
            explain_unexpected_response(httplib.OK, response))
 
484
 
 
485
        args = (host, username, password)
 
486
        matcher = MockCalledOnceWith(queue=nodegroup.uuid, args=args)
 
487
        self.assertThat(mock.apply_async, matcher)
 
488
 
463
489
 
464
490
class TestNodeGroupAPIAuth(MAASServerTestCase):
465
491
    """Authorization tests for nodegroup API."""