Browse Source

Fixing floating ip allocation.

Change-Id: Ie229923384fdaf59e5141cf781bfb6f8dc8f30fb
jakedahn 7 years ago
parent
commit
e7d7643e3b
1 changed files with 2 additions and 3 deletions
  1. 2
    3
      horizon/horizon/dashboards/nova/access_and_security/views.py

+ 2
- 3
horizon/horizon/dashboards/nova/access_and_security/views.py View File

@@ -73,8 +73,6 @@ def index(request):
73 73
         LOG.exception("ClientException in floating ip index")
74 74
         messages.error(request,
75 75
                     _('Error fetching floating ips: %s') % e.message)
76
-    allocate_form = FloatingIpAllocate(initial={
77
-                                     'tenant_id': request.user.tenant_id})
78 76
     try:
79 77
         keypairs = api.keypair_list(request)
80 78
     except novaclient_exceptions.ClientException, e:
@@ -86,9 +84,10 @@ def index(request):
86 84
                'floating_ips': floating_ips,
87 85
                'security_groups': security_groups,
88 86
                'keypair_delete_form': DeleteKeypair(),
89
-               'allocate_form': FloatingIpAllocate(),
90 87
                'disassociate_form': FloatingIpDisassociate(),
91 88
                'release_form': ReleaseFloatingIp(),
89
+               'allocate_form': FloatingIpAllocate(initial={
90
+                                        'tenant_id': request.user.tenant_id}),
92 91
                'sec_group_create_form': CreateGroup(
93 92
                                             initial={'tenant_id': tenant_id}),
94 93
                'sec_group_delete_form': DeleteGroup.maybe_handle(request,

Loading…
Cancel
Save