Merge lp:~blake-rouse/maas/fix-1509405 into lp:maas/trunk

Proposed by Blake Rouse on 2015-10-23
Status: Merged
Approved by: Blake Rouse on 2015-10-26
Approved revision: 4407
Merged at revision: 4412
Proposed branch: lp:~blake-rouse/maas/fix-1509405
Merge into: lp:maas/trunk
Diff against target: 69 lines (+23/-0)
3 files modified
src/maasserver/api/nodes.py (+13/-0)
src/maasserver/api/tests/test_enlistment.py (+3/-0)
src/maasserver/api/tests/test_node.py (+7/-0)
To merge this branch: bzr merge lp:~blake-rouse/maas/fix-1509405
Reviewer Review Type Date Requested Status
Mike Pontillo (community) 2015-10-23 Approve on 2015-10-23
Review via email: mp+275568@code.launchpad.net

Commit message

Add interface_set to the node API.

To post a comment you must log in.
Mike Pontillo (mpontillo) wrote :

Looks good. Thanks for the fix.

review: Approve
MAAS Lander (maas-lander) wrote :
Download full text (2.4 MiB)

The attempt to merge lp:~blake-rouse/maas/fix-1509405 into lp:maas failed. Below is the output from the failed tests.

Hit http://security.ubuntu.com trusty-security InRelease
Ign http://nova.clouds.archive.ubuntu.com trusty InRelease
Get:1 http://nova.clouds.archive.ubuntu.com trusty-updates InRelease [64.4 kB]
Hit http://nova.clouds.archive.ubuntu.com trusty Release.gpg
Hit http://nova.clouds.archive.ubuntu.com trusty Release
Hit http://security.ubuntu.com trusty-security/main Sources
Hit http://security.ubuntu.com trusty-security/universe Sources
Hit http://security.ubuntu.com trusty-security/main amd64 Packages
Hit http://security.ubuntu.com trusty-security/universe amd64 Packages
Hit http://security.ubuntu.com trusty-security/main Translation-en
Get:2 http://nova.clouds.archive.ubuntu.com trusty-updates/main Sources [240 kB]
Hit http://security.ubuntu.com trusty-security/universe Translation-en
Get:3 http://nova.clouds.archive.ubuntu.com trusty-updates/universe Sources [140 kB]
Get:4 http://nova.clouds.archive.ubuntu.com trusty-updates/main amd64 Packages [635 kB]
Get:5 http://nova.clouds.archive.ubuntu.com trusty-updates/universe amd64 Packages [323 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
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
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,403 kB in 7s (183 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 git 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 phantomjs 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-jinja2 python-jsonschema python-lxml python-mock python-netaddr python-netifaces python-nose python-oauth python-openssl python-paramiko python-pexpect python-pip python-pocket-lint python-psycopg2 python-pyinotify python-pyparsing python-seamicroclient python-simplejson python-simplestreams python-sphinx python-subunit python-tempita python-testresources python-testscenarios python-testtools python-twisted python-txtftp python-tz python-unitt...

MAAS Lander (maas-lander) wrote :
Download full text (2.4 MiB)

The attempt to merge lp:~blake-rouse/maas/fix-1509405 into lp:maas failed. Below is the output from the failed tests.

Hit http://security.ubuntu.com trusty-security InRelease
Ign http://nova.clouds.archive.ubuntu.com trusty InRelease
Get:1 http://nova.clouds.archive.ubuntu.com trusty-updates InRelease [64.4 kB]
Hit http://nova.clouds.archive.ubuntu.com trusty Release.gpg
Hit http://nova.clouds.archive.ubuntu.com trusty Release
Hit http://security.ubuntu.com trusty-security/main Sources
Hit http://security.ubuntu.com trusty-security/universe Sources
Get:2 http://nova.clouds.archive.ubuntu.com trusty-updates/main Sources [240 kB]
Hit http://security.ubuntu.com trusty-security/main amd64 Packages
Hit http://security.ubuntu.com trusty-security/universe amd64 Packages
Hit http://security.ubuntu.com trusty-security/main Translation-en
Hit http://security.ubuntu.com trusty-security/universe Translation-en
Get:3 http://nova.clouds.archive.ubuntu.com trusty-updates/universe Sources [140 kB]
Get:4 http://nova.clouds.archive.ubuntu.com trusty-updates/main amd64 Packages [635 kB]
Get:5 http://nova.clouds.archive.ubuntu.com trusty-updates/universe amd64 Packages [323 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
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
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,403 kB in 3s (357 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 git 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 phantomjs 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-jinja2 python-jsonschema python-lxml python-mock python-netaddr python-netifaces python-nose python-oauth python-openssl python-paramiko python-pexpect python-pip python-pocket-lint python-psycopg2 python-pyinotify python-pyparsing python-seamicroclient python-simplejson python-simplestreams python-sphinx python-subunit python-tempita python-testresources python-testscenarios python-testtools python-twisted python-txtftp python-tz python-unitt...

lp:~blake-rouse/maas/fix-1509405 updated on 2015-10-26
4407. By Blake Rouse on 2015-10-26

Fix max depth error.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'src/maasserver/api/nodes.py'
2--- src/maasserver/api/nodes.py 2015-10-09 21:36:08 +0000
3+++ src/maasserver/api/nodes.py 2015-10-26 18:15:28 +0000
4@@ -120,6 +120,19 @@
5 'power_state',
6 'tag_names',
7 'ip_addresses',
8+ ('interface_set', (
9+ 'id',
10+ 'name',
11+ 'type',
12+ 'vlan',
13+ 'mac_address',
14+ 'parents',
15+ 'children',
16+ 'tags',
17+ 'enabled',
18+ 'links',
19+ 'params',
20+ )),
21 'routers',
22 'zone',
23 'disable_ipv4',
24
25=== modified file 'src/maasserver/api/tests/test_enlistment.py'
26--- src/maasserver/api/tests/test_enlistment.py 2015-10-15 09:28:07 +0000
27+++ src/maasserver/api/tests/test_enlistment.py 2015-10-26 18:15:28 +0000
28@@ -552,6 +552,7 @@
29 'power_state',
30 'tag_names',
31 'ip_addresses',
32+ 'interface_set',
33 'resource_uri',
34 'cpu_count',
35 'storage',
36@@ -663,6 +664,7 @@
37 'resource_uri',
38 'tag_names',
39 'ip_addresses',
40+ 'interface_set',
41 'cpu_count',
42 'storage',
43 'memory',
44@@ -827,6 +829,7 @@
45 'resource_uri',
46 'tag_names',
47 'ip_addresses',
48+ 'interface_set',
49 'cpu_count',
50 'storage',
51 'memory',
52
53=== modified file 'src/maasserver/api/tests/test_node.py'
54--- src/maasserver/api/tests/test_node.py 2015-10-15 09:28:07 +0000
55+++ src/maasserver/api/tests/test_node.py 2015-10-26 18:15:28 +0000
56@@ -203,6 +203,13 @@
57 self.assertItemsEqual(
58 [mac.get_raw() for mac in macs], parsed_result['routers'])
59
60+ def test_GET_returns_interface_set(self):
61+ node = factory.make_Node()
62+ response = self.client.get(self.get_node_uri(node))
63+ self.assertEqual(httplib.OK, response.status_code)
64+ parsed_result = json.loads(response.content)
65+ self.assertIn('interface_set', parsed_result)
66+
67 def test_GET_returns_zone(self):
68 node = factory.make_Node()
69 response = self.client.get(self.get_node_uri(node))