From ddeda902b986972cb0e5e7dc946a5e39f36bf68d Mon Sep 17 00:00:00 2001 From: Kefu Chai Date: Wed, 12 Jun 2019 00:28:53 +0800 Subject: [PATCH] mgr/dashboard: s/portal_ip_address/portal_ip_addresses/ and take portal_ip_addresses as a list it's a follow-up fix of #28084 Signed-off-by: Kefu Chai --- src/pybind/mgr/dashboard/tests/test_iscsi.py | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/src/pybind/mgr/dashboard/tests/test_iscsi.py b/src/pybind/mgr/dashboard/tests/test_iscsi.py index c375f8a5488..db684234c3e 100644 --- a/src/pybind/mgr/dashboard/tests/test_iscsi.py +++ b/src/pybind/mgr/dashboard/tests/test_iscsi.py @@ -544,19 +544,20 @@ class IscsiClientMock(object): "portals": {} } - def create_gateway(self, target_iqn, gateway_name, ip_address): + def create_gateway(self, target_iqn, gateway_name, ip_addresses): target_config = self.config['targets'][target_iqn] if 'ip_list' not in target_config: target_config['ip_list'] = [] - target_config['ip_list'] += ip_address + target_config['ip_list'] += ip_addresses target_config['portals'][gateway_name] = { - "portal_ip_addresses": ip_address + "portal_ip_addresses": ip_addresses } def delete_gateway(self, target_iqn, gateway_name): target_config = self.config['targets'][target_iqn] portal_config = target_config['portals'][gateway_name] - target_config['ip_list'].remove(portal_config['portal_ip_address']) + for ip in portal_config['portal_ip_addresses']: + target_config['ip_list'].remove(ip) target_config['portals'].pop(gateway_name) def create_disk(self, pool, image, backstore): -- 2.39.5