launchpad-reviewers team mailing list archive
-
launchpad-reviewers team
-
Mailing list archive
-
Message #15125
[Merge] lp:~rvb/maas/bug-1119542 into lp:maas
Raphaël Badin has proposed merging lp:~rvb/maas/bug-1119542 into lp:maas.
Commit message:
Interface names can also contain the character ':' to define interface aliases.
Requested reviews:
Launchpad code reviewers (launchpad-reviewers)
Related bugs:
Bug #1119542 in MAAS: ""Edit cluster controller" page broken when an alias interface is configured"
https://bugs.launchpad.net/maas/+bug/1119542
For more details, see:
https://code.launchpad.net/~rvb/maas/bug-1119542/+merge/147427
--
https://code.launchpad.net/~rvb/maas/bug-1119542/+merge/147427
Your team Launchpad code reviewers is requested to review the proposed merge of lp:~rvb/maas/bug-1119542 into lp:maas.
=== modified file 'src/maasserver/tests/test_views_settings_clusters.py'
--- src/maasserver/tests/test_views_settings_clusters.py 2012-10-15 10:08:22 +0000
+++ src/maasserver/tests/test_views_settings_clusters.py 2013-02-08 17:18:52 +0000
@@ -135,6 +135,18 @@
self.assertFalse(
NodeGroupInterface.objects.filter(id=interface.id).exists())
+ def test_interface_delete_supports_interface_alias(self):
+ nodegroup = factory.make_node_group(
+ management=NODEGROUPINTERFACE_MANAGEMENT.UNMANAGED)
+ interface = factory.make_node_group_interface(
+ nodegroup=nodegroup, interface="eth0:0")
+ delete_link = reverse(
+ 'cluster-interface-delete',
+ args=[nodegroup.uuid, interface.interface])
+ # The real test is that reverse() does not blow up when the
+ # interface's name contains an alias.
+ self.assertIsInstance(delete_link, basestring)
+
class ClusterInterfaceEditTest(AdminLoggedInTestCase):
@@ -155,6 +167,18 @@
reload_object(interface),
MatchesStructure.byEquality(**data))
+ def test_interface_edit_supports_interface_alias(self):
+ nodegroup = factory.make_node_group(
+ management=NODEGROUPINTERFACE_MANAGEMENT.UNMANAGED)
+ interface = factory.make_node_group_interface(
+ nodegroup=nodegroup, interface="eth0:0")
+ edit_link = reverse(
+ 'cluster-interface-edit',
+ args=[nodegroup.uuid, interface.interface])
+ # The real test is that reverse() does not blow up when the
+ # interface's name contains an alias.
+ self.assertIsInstance(edit_link, basestring)
+
class ClusterInterfaceCreateTest(AdminLoggedInTestCase):
=== modified file 'src/maasserver/urls.py'
--- src/maasserver/urls.py 2012-11-30 17:21:28 +0000
+++ src/maasserver/urls.py 2013-02-08 17:18:52 +0000
@@ -141,11 +141,11 @@
r'^clusters/(?P<uuid>[\w\-]+)/interfaces/add/$',
ClusterInterfaceCreate.as_view(), name='cluster-interface-create'),
adminurl(
- r'^clusters/(?P<uuid>[\w\-]+)/interfaces/(?P<interface>[\w\-]*)/'
+ r'^clusters/(?P<uuid>[\w\-]+)/interfaces/(?P<interface>[\w\-\:]*)/'
'edit/$',
ClusterInterfaceEdit.as_view(), name='cluster-interface-edit'),
adminurl(
- r'^clusters/(?P<uuid>[\w\-]+)/interfaces/(?P<interface>[\w\-]*)/'
+ r'^clusters/(?P<uuid>[\w\-]+)/interfaces/(?P<interface>[\w\-\:]*)/'
'delete/$',
ClusterInterfaceDelete.as_view(), name='cluster-interface-delete'),
# XXX: rvb 2012-10-08 bug=1063881:
Follow ups