Merge lp:~jakedahn/horizon/lp77670 into lp:~hudson-openstack/horizon/trunk

Proposed by Jake Dahn
Status: Superseded
Proposed branch: lp:~jakedahn/horizon/lp77670
Merge into: lp:~hudson-openstack/horizon/trunk
Diff against target: 13 lines (+2/-1)
1 file modified
django-nova/src/django_nova/forms.py (+2/-1)
To merge this branch: bzr merge lp:~jakedahn/horizon/lp77670
Reviewer Review Type Date Requested Status
Devin Carlen Approve
Jake Dahn (community) Needs Resubmitting
Review via email: mp+59845@code.launchpad.net

This proposal has been superseded by a proposal from 2011-05-04.

Description of the change

This branch adds the instance 'display name' (nickname) to attach the attache volume to instance form.

To post a comment you must log in.
Revision history for this message
Devin Carlen (devcamcar) wrote :

9 + choices = [(i.id, i.id + " ("+i.displayName+")")
10 + for i in project.get_instances()]

can be

9 + choices = [(i.id, "%s (%s)" % (i.id, i.displayName)
10 + for i in project.get_instances()]

review: Needs Fixing
lp:~jakedahn/horizon/lp77670 updated
46. By Jake Dahn

changing string formatting

Revision history for this message
Jake Dahn (jakedahn) wrote :

Right-o, updated string formatting. I take it that concatenation by '+' is generally seen as a bad thing then?

review: Needs Resubmitting
Revision history for this message
Devin Carlen (devcamcar) wrote :

lgtm

review: Approve
lp:~jakedahn/horizon/lp77670 updated
47. By Jake Dahn

adding the forgotten parentheses

Unmerged revisions

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'django-nova/src/django_nova/forms.py'
2--- django-nova/src/django_nova/forms.py 2011-03-18 17:08:27 +0000
3+++ django-nova/src/django_nova/forms.py 2011-05-04 06:17:25 +0000
4@@ -48,7 +48,8 @@
5 return rv
6
7 def get_instance_choices(project):
8- choices = [(i.id, i.id) for i in project.get_instances()]
9+ choices = [(i.id, "%s (%s)" % (i.id, i.displayName)
10+ for i in project.get_instances()]
11 if not len(choices):
12 choices = [('', 'none available')]
13 return choices

Subscribers

People subscribed via source and target branches