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
=== modified file 'src/maasserver/api/nodes.py'
--- src/maasserver/api/nodes.py 2015-10-09 21:36:08 +0000
+++ src/maasserver/api/nodes.py 2015-10-26 18:15:28 +0000
@@ -120,6 +120,19 @@
120 'power_state',120 'power_state',
121 'tag_names',121 'tag_names',
122 'ip_addresses',122 'ip_addresses',
123 ('interface_set', (
124 'id',
125 'name',
126 'type',
127 'vlan',
128 'mac_address',
129 'parents',
130 'children',
131 'tags',
132 'enabled',
133 'links',
134 'params',
135 )),
123 'routers',136 'routers',
124 'zone',137 'zone',
125 'disable_ipv4',138 'disable_ipv4',
126139
=== modified file 'src/maasserver/api/tests/test_enlistment.py'
--- src/maasserver/api/tests/test_enlistment.py 2015-10-15 09:28:07 +0000
+++ src/maasserver/api/tests/test_enlistment.py 2015-10-26 18:15:28 +0000
@@ -552,6 +552,7 @@
552 'power_state',552 'power_state',
553 'tag_names',553 'tag_names',
554 'ip_addresses',554 'ip_addresses',
555 'interface_set',
555 'resource_uri',556 'resource_uri',
556 'cpu_count',557 'cpu_count',
557 'storage',558 'storage',
@@ -663,6 +664,7 @@
663 'resource_uri',664 'resource_uri',
664 'tag_names',665 'tag_names',
665 'ip_addresses',666 'ip_addresses',
667 'interface_set',
666 'cpu_count',668 'cpu_count',
667 'storage',669 'storage',
668 'memory',670 'memory',
@@ -827,6 +829,7 @@
827 'resource_uri',829 'resource_uri',
828 'tag_names',830 'tag_names',
829 'ip_addresses',831 'ip_addresses',
832 'interface_set',
830 'cpu_count',833 'cpu_count',
831 'storage',834 'storage',
832 'memory',835 'memory',
833836
=== modified file 'src/maasserver/api/tests/test_node.py'
--- src/maasserver/api/tests/test_node.py 2015-10-15 09:28:07 +0000
+++ src/maasserver/api/tests/test_node.py 2015-10-26 18:15:28 +0000
@@ -203,6 +203,13 @@
203 self.assertItemsEqual(203 self.assertItemsEqual(
204 [mac.get_raw() for mac in macs], parsed_result['routers'])204 [mac.get_raw() for mac in macs], parsed_result['routers'])
205205
206 def test_GET_returns_interface_set(self):
207 node = factory.make_Node()
208 response = self.client.get(self.get_node_uri(node))
209 self.assertEqual(httplib.OK, response.status_code)
210 parsed_result = json.loads(response.content)
211 self.assertIn('interface_set', parsed_result)
212
206 def test_GET_returns_zone(self):213 def test_GET_returns_zone(self):
207 node = factory.make_Node()214 node = factory.make_Node()
208 response = self.client.get(self.get_node_uri(node))215 response = self.client.get(self.get_node_uri(node))