Node Group Template flow improvement
Now if user has to choose a floating_ip_pool, the default value of the dropdown will be the first pool available. Change-Id: I9fa5210ba7655fec101ea503b50783b11c2d16a4
This commit is contained in:
parent
6f6f748417
commit
4d19bacd23
|
@ -101,11 +101,15 @@ class GeneralConfigAction(workflows.Action):
|
|||
pools.append((None, "Do not assign floating IPs"))
|
||||
|
||||
pools_list = network.floating_ip_pools_list(request)
|
||||
first_pool_id = None
|
||||
for pool in pools_list:
|
||||
if not first_pool_id:
|
||||
first_pool_id = pool.id
|
||||
pools.append((pool.id, pool.name))
|
||||
self.fields['floating_ip_pool'] = forms.ChoiceField(
|
||||
label=_("Floationg IP pool"),
|
||||
choices=pools,
|
||||
initial=first_pool_id,
|
||||
required=False)
|
||||
|
||||
self.fields["processes"] = forms.MultipleChoiceField(
|
||||
|
|
Loading…
Reference in New Issue