Skip to content

Commit

Permalink
Adds instance UUID to associate floating ip dialog
Browse files Browse the repository at this point in the history
Fixes launchpad Bug #1039092

Change-Id: If8887b096de2663059e8127e2fcef6a910baa966
  • Loading branch information
Kelsey Tripp committed Aug 21, 2012
1 parent 1048ac6 commit 7df3c9e
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 10 deletions.
Expand Up @@ -65,13 +65,7 @@ def populate_instance_id_choices(self, request, context):
redirect=redirect)
instances = []
for server in servers:
# FIXME(ttrifonov): show IP in case of non-unique names
# to be removed when nova can support unique names
server_name = server.name
if any(s.id != server.id and
s.name == server.name for s in servers):
# duplicate instance name
server_name = "%s [%s]" % (server.name, server.id)
server_name = "%s (%s)" % (server.name, server.id)
instances.append((server.id, server_name))

# Sort instances for easy browsing
Expand Down
6 changes: 3 additions & 3 deletions horizon/dashboards/nova/access_and_security/tests.py
Expand Up @@ -80,7 +80,7 @@ def test_association(self):
'nova/access_and_security/floating_ips/associate.html')

self.assertContains(res,
'<option value="1">server_1 [1]</option>')
'<option value="1">server_1 (1)</option>')
self.assertContains(res,
'<option value="101">server_1 [101]</option>')
self.assertContains(res, '<option value="2">server_2</option>')
'<option value="101">server_1 (101)</option>')
self.assertContains(res, '<option value="2">server_2 (2)</option>')

0 comments on commit 7df3c9e

Please sign in to comment.