Merge lp:~lamont/maas/trunk-bug-1519396 into lp:~maas-committers/maas/trunk

Proposed by LaMont Jones
Status: Merged
Approved by: LaMont Jones
Approved revision: no longer in the source branch.
Merged at revision: 4519
Proposed branch: lp:~lamont/maas/trunk-bug-1519396
Merge into: lp:~maas-committers/maas/trunk
Diff against target: 31 lines (+4/-0)
2 files modified
src/maasserver/api/tests/test_vlans.py (+3/-0)
src/maasserver/api/vlans.py (+1/-0)
To merge this branch: bzr merge lp:~lamont/maas/trunk-bug-1519396
Reviewer Review Type Date Requested Status
Blake Rouse (community) Approve
Review via email: mp+278477@code.launchpad.net

Commit message

Add mtu to the "vlans read" api output.

Description of the change

Add mtu to the "vlans read" api output.

To post a comment you must log in.
Revision history for this message
Blake Rouse (blake-rouse) wrote :

Looks good.

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

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

Hit http://security.ubuntu.com xenial-security InRelease
Get:1 http://prodstack-zone-1.clouds.archive.ubuntu.com xenial InRelease [218 kB]
Hit http://prodstack-zone-1.clouds.archive.ubuntu.com xenial-updates InRelease
Hit http://prodstack-zone-1.clouds.archive.ubuntu.com xenial-backports InRelease
Hit http://security.ubuntu.com xenial-security/main Sources
Hit http://security.ubuntu.com xenial-security/restricted Sources
Hit http://security.ubuntu.com xenial-security/universe Sources
Hit http://security.ubuntu.com xenial-security/multiverse Sources
Hit http://security.ubuntu.com xenial-security/main amd64 Packages
Hit http://security.ubuntu.com xenial-security/restricted amd64 Packages
Hit http://security.ubuntu.com xenial-security/universe amd64 Packages
Hit http://security.ubuntu.com xenial-security/multiverse amd64 Packages
Hit http://security.ubuntu.com xenial-security/main Translation-en
Hit http://security.ubuntu.com xenial-security/multiverse Translation-en
Hit http://security.ubuntu.com xenial-security/restricted Translation-en
Hit http://security.ubuntu.com xenial-security/universe Translation-en
Get:2 http://prodstack-zone-1.clouds.archive.ubuntu.com xenial/main Sources [1,118 kB]
Get:3 http://prodstack-zone-1.clouds.archive.ubuntu.com xenial/restricted Sources [7,228 B]
Get:4 http://prodstack-zone-1.clouds.archive.ubuntu.com xenial/universe Sources [7,478 kB]
Get:5 http://prodstack-zone-1.clouds.archive.ubuntu.com xenial/multiverse Sources [178 kB]
Get:6 http://prodstack-zone-1.clouds.archive.ubuntu.com xenial/main amd64 Packages [1,444 kB]
Get:7 http://prodstack-zone-1.clouds.archive.ubuntu.com xenial/restricted amd64 Packages [15.8 kB]
Get:8 http://prodstack-zone-1.clouds.archive.ubuntu.com xenial/universe amd64 Packages [6,980 kB]
Get:9 http://prodstack-zone-1.clouds.archive.ubuntu.com xenial/multiverse amd64 Packages [138 kB]
Get:10 http://prodstack-zone-1.clouds.archive.ubuntu.com xenial/main Translation-en [842 kB]
Get:11 http://prodstack-zone-1.clouds.archive.ubuntu.com xenial/multiverse Translation-en [108 kB]
Get:12 http://prodstack-zone-1.clouds.archive.ubuntu.com xenial/restricted Translation-en [4,302 B]
Get:13 http://prodstack-zone-1.clouds.archive.ubuntu.com xenial/universe Translation-en [4,713 kB]
Hit http://prodstack-zone-1.clouds.archive.ubuntu.com xenial-updates/main Sources
Hit http://prodstack-zone-1.clouds.archive.ubuntu.com xenial-updates/restricted Sources
Hit http://prodstack-zone-1.clouds.archive.ubuntu.com xenial-updates/universe Sources
Hit http://prodstack-zone-1.clouds.archive.ubuntu.com xenial-updates/multiverse Sources
Hit http://prodstack-zone-1.clouds.archive.ubuntu.com xenial-updates/main amd64 Packages
Hit http://prodstack-zone-1.clouds.archive.ubuntu.com xenial-updates/restricted amd64 Packages
Hit http://prodstack-zone-1.clouds.archive.ubuntu.com xenial-updates/universe amd64 Packages
Hit http://prodstack-zone-1.clouds.archive.ubuntu.com xenial-updates/multiverse amd64 Packages
Hit http://prodstack-zone-1.clouds.archive.ubuntu.com xenial-updates/main Translation-en
Hit http://...

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'src/maasserver/api/tests/test_vlans.py'
2--- src/maasserver/api/tests/test_vlans.py 2015-11-10 00:14:45 +0000
3+++ src/maasserver/api/tests/test_vlans.py 2015-11-25 02:15:28 +0000
4@@ -75,14 +75,17 @@
5 fabric = factory.make_Fabric()
6 vlan_name = factory.make_name("fabric")
7 vid = random.randint(1, 1000)
8+ mtu = random.randint(552, 1500)
9 uri = get_vlans_uri(fabric)
10 response = self.client.post(uri, {
11 "name": vlan_name,
12 "vid": vid,
13+ "mtu": mtu,
14 })
15 self.assertEqual(httplib.OK, response.status_code, response.content)
16 self.assertEqual(vlan_name, json.loads(response.content)['name'])
17 self.assertEqual(vid, json.loads(response.content)['vid'])
18+ self.assertEqual(mtu, json.loads(response.content)['mtu'])
19
20 def test_create_admin_only(self):
21 fabric = factory.make_Fabric()
22
23=== modified file 'src/maasserver/api/vlans.py'
24--- src/maasserver/api/vlans.py 2015-11-10 17:13:36 +0000
25+++ src/maasserver/api/vlans.py 2015-11-25 02:15:28 +0000
26@@ -31,6 +31,7 @@
27 'name',
28 'vid',
29 'fabric',
30+ 'mtu',
31 )
32
33