Merge lp:~rvb/maas/bug-1440996 into lp:~maas-committers/maas/trunk

Proposed by Raphaël Badin
Status: Merged
Approved by: Raphaël Badin
Approved revision: no longer in the source branch.
Merged at revision: 3786
Proposed branch: lp:~rvb/maas/bug-1440996
Merge into: lp:~maas-committers/maas/trunk
Diff against target: 30 lines (+9/-0)
2 files modified
src/maasserver/api/devices.py (+1/-0)
src/maasserver/api/tests/test_devices.py (+8/-0)
To merge this branch: bzr merge lp:~rvb/maas/bug-1440996
Reviewer Review Type Date Requested Status
Gavin Panella (community) Approve
Ricardo Bánffy (community) Approve
Review via email: mp+255331@code.launchpad.net

Commit message

Disable `create` method on device handler: it's not used.

To post a comment you must log in.
Revision history for this message
Ricardo Bánffy (rbanffy) wrote :

Looks simple enough.

review: Approve
Revision history for this message
Gavin Panella (allenap) wrote :

I concur :)

review: Approve
Revision history for this message
MAAS Lander (maas-lander) wrote :
Download full text (82.8 KiB)

The attempt to merge lp:~rvb/maas/bug-1440996 into lp:maas failed. Below is the output from the failed tests.

Ign http://security.ubuntu.com trusty-security InRelease
Get:1 http://security.ubuntu.com trusty-security Release.gpg [933 B]
Get:2 http://security.ubuntu.com trusty-security Release [63.5 kB]
Ign http://nova.clouds.archive.ubuntu.com trusty InRelease
Ign http://nova.clouds.archive.ubuntu.com trusty-updates InRelease
Hit http://nova.clouds.archive.ubuntu.com trusty Release.gpg
Get:3 http://nova.clouds.archive.ubuntu.com trusty-updates Release.gpg [933 B]
Hit http://nova.clouds.archive.ubuntu.com trusty Release
Get:4 http://nova.clouds.archive.ubuntu.com trusty-updates Release [63.5 kB]
Get:5 http://security.ubuntu.com trusty-security/main Sources [76.1 kB]
Hit http://nova.clouds.archive.ubuntu.com trusty/main Sources
Hit http://nova.clouds.archive.ubuntu.com trusty/universe Sources
Hit http://nova.clouds.archive.ubuntu.com trusty/main amd64 Packages
Hit http://nova.clouds.archive.ubuntu.com trusty/universe amd64 Packages
Hit http://nova.clouds.archive.ubuntu.com trusty/main Translation-en
Hit http://nova.clouds.archive.ubuntu.com trusty/universe Translation-en
Get:6 http://nova.clouds.archive.ubuntu.com trusty-updates/main Sources [190 kB]
Get:7 http://security.ubuntu.com trusty-security/universe Sources [19.5 kB]
Get:8 http://security.ubuntu.com trusty-security/main amd64 Packages [251 kB]
Get:9 http://nova.clouds.archive.ubuntu.com trusty-updates/universe Sources [108 kB]
Get:10 http://nova.clouds.archive.ubuntu.com trusty-updates/main amd64 Packages [490 kB]
Get:11 http://security.ubuntu.com trusty-security/universe amd64 Packages [92.0 kB]
Hit http://security.ubuntu.com trusty-security/main Translation-en
Hit http://security.ubuntu.com trusty-security/universe Translation-en
Get:12 http://nova.clouds.archive.ubuntu.com trusty-updates/universe amd64 Packages [263 kB]
Hit http://nova.clouds.archive.ubuntu.com trusty-updates/main Translation-en
Hit http://nova.clouds.archive.ubuntu.com trusty-updates/universe Translation-en
Ign http://nova.clouds.archive.ubuntu.com trusty/main Translation-en_US
Ign http://nova.clouds.archive.ubuntu.com trusty/universe Translation-en_US
Fetched 1,619 kB in 3s (531 kB/s)
Reading package lists...
sudo DEBIAN_FRONTEND=noninteractive apt-get -y \
     --no-install-recommends install apache2 authbind bind9 bind9utils build-essential bzr-builddeb chromium-browser chromium-chromedriver curl daemontools debhelper dh-apport dh-systemd distro-info dnsutils firefox freeipmi-tools gjs ipython isc-dhcp-common libjs-angularjs libjs-jquery libjs-jquery-hotkeys libjs-yui3-full libjs-yui3-min libpq-dev make nodejs-legacy npm pep8 postgresql pyflakes python-apt python-bson python-bzrlib python-convoy python-coverage python-crochet python-cssselect python-curtin python-dev python-distro-info python-django python-django-piston python-django-south python-djorm-ext-pgarray python-docutils python-extras python-fixtures python-flake8 python-formencode python-hivex python-httplib2 python-iscpy python-jinja2 python-jsonschema python-lockfile python-lxml python-mock python-netaddr python-netifaces python-nose python-oauth pyth...

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'src/maasserver/api/devices.py'
2--- src/maasserver/api/devices.py 2015-03-25 15:33:23 +0000
3+++ src/maasserver/api/devices.py 2015-04-07 07:47:18 +0000
4@@ -66,6 +66,7 @@
5 """
6 api_doc_section_name = "Device"
7
8+ create = None # Disable create.
9 model = Device
10 fields = DISPLAYED_DEVICE_FIELDS
11
12
13=== modified file 'src/maasserver/api/tests/test_devices.py'
14--- src/maasserver/api/tests/test_devices.py 2015-03-25 15:33:23 +0000
15+++ src/maasserver/api/tests/test_devices.py 2015-04-07 07:47:18 +0000
16@@ -199,6 +199,14 @@
17 '/api/1.0/devices/%s/' % system_id,
18 reverse('device_handler', args=[system_id]))
19
20+ def test_POST_method_doesnt_exist(self):
21+ device = factory.make_Node(
22+ installable=False, owner=self.logged_in_user)
23+
24+ response = self.client.post(get_device_uri(device))
25+ self.assertEqual(
26+ httplib.BAD_REQUEST, response.status_code, response.content)
27+
28 def test_GET_reads_device(self):
29 device = factory.make_Node(
30 installable=False, owner=self.logged_in_user)