Browse Source

By default do not associate access keypair to member create

Change-Id: I63571a3de862018377184f47dc500053545046ae
Closes-Bug: #1558540
ank 3 years ago
parent
commit
dcdcb31a64
1 changed files with 2 additions and 6 deletions
  1. 2
    6
      gbpui/panels/policytargets/workflows.py

+ 2
- 6
gbpui/panels/policytargets/workflows.py View File

@@ -354,16 +354,12 @@ class SetAccessControlsAction(workflows.Action):
354 354
 
355 355
     def __init__(self, request, *args, **kwargs):
356 356
         super(SetAccessControlsAction, self).__init__(request, *args, **kwargs)
357
+        self.fields['keypair'].choices = instance_utils.keypair_field_data(
358
+            request, True)
357 359
         if not api.nova.can_set_server_password():
358 360
             del self.fields['admin_pass']
359 361
             del self.fields['confirm_admin_pass']
360 362
 
361
-    def populate_keypair_choices(self, request, context):
362
-        keypairs = instance_utils.keypair_field_data(request, True)
363
-        if len(keypairs) == 2:
364
-            self.fields['keypair'].initial = keypairs[1][0]
365
-        return keypairs
366
-
367 363
     def clean(self):
368 364
         '''Check to make sure password fields match.'''
369 365
         cleaned_data = super(SetAccessControlsAction, self).clean()

Loading…
Cancel
Save