File tree Expand file tree Collapse file tree 2 files changed +7
-5
lines changed Expand file tree Collapse file tree 2 files changed +7
-5
lines changed Original file line number Diff line number Diff line change 1
- 1!9.3.0
1
+ 1!9.3.1
Original file line number Diff line number Diff line change @@ -652,15 +652,15 @@ def _attach_floating_ip_until_success(
652
652
Raises:
653
653
IBMException: If failed to attach floating IP after 10 tries
654
654
"""
655
- attached_floating_ip = None
655
+ floating_ip_is_attached = None
656
656
self ._log .info (
657
657
"Will attempt to attach floating ip with name containing: %s"
658
658
"until successful or all floating ips are in use." ,
659
659
floating_ip_substring ,
660
660
)
661
661
662
662
tries = 0
663
- while attached_floating_ip is None :
663
+ while not floating_ip_is_attached :
664
664
tries += 1
665
665
target_floating_ip = self ._choose_from_existing_floating_ips (
666
666
name_includes = floating_ip_substring ,
@@ -669,8 +669,10 @@ def _attach_floating_ip_until_success(
669
669
"Attempting to attach floating ip: %s" ,
670
670
target_floating_ip ["name" ],
671
671
)
672
- attached_floating_ip = self ._attach_floating_ip (target_floating_ip )
673
- if not attached_floating_ip :
672
+ floating_ip_is_attached = self ._attach_floating_ip (
673
+ floating_ip = target_floating_ip
674
+ )
675
+ if not floating_ip_is_attached :
674
676
self ._log .info (
675
677
"Failed to attach floating ip: %s. Will try again." ,
676
678
target_floating_ip ["name" ],
You can’t perform that action at this time.
0 commit comments