diff options
author | Bo Tran <botv@vccloud.vn> | 2022-06-08 15:44:05 +0700 |
---|---|---|
committer | Bo Tran <ministry.96.nd@gmail.com> | 2022-07-12 16:59:11 +0700 |
commit | 7fbed57c4ef9cbcbdb4df78e37a1f0b2a29a4120 (patch) | |
tree | 257ee347c2c2be3422d0c0567f319688627e0819 /trove/instance | |
parent | b36d0b23a2ec66f50ddd5b0e8fdcdd888d19994a (diff) | |
download | trove-7fbed57c4ef9cbcbdb4df78e37a1f0b2a29a4120.tar.gz |
Fix error when list database instances
When list database instances, you can't because
we doing return with wrong self.addresses in db_info
Story: #2010077
Task: #45568
Change-Id: I3275f605e03e6c74b744b29178de380ed2521425
Diffstat (limited to 'trove/instance')
-rw-r--r-- | trove/instance/models.py | 15 |
1 files changed, 7 insertions, 8 deletions
diff --git a/trove/instance/models.py b/trove/instance/models.py index 3e2d9854..28570445 100644 --- a/trove/instance/models.py +++ b/trove/instance/models.py @@ -266,14 +266,13 @@ class SimpleInstance(object): return None IPs = [] - for address_list in self.addresses.values(): - for addr_info in address_list: - if CONF.ip_regex and CONF.black_list_regex: - if not ip_visible(addr_info['addr'], CONF.ip_regex, - CONF.black_list_regex): - continue - - IPs.append(addr_info['addr']) + for address in self.addresses: + if CONF.ip_regex and CONF.black_list_regex: + if not ip_visible(address['address'], CONF.ip_regex, + CONF.black_list_regex): + continue + + IPs.append(address) return IPs |