From: Kefu Chai Date: Tue, 11 Jun 2019 12:17:32 +0000 (+0800) Subject: Merge pull request #28084 from ricardoasmarques/improve-portal-ips-calculation X-Git-Tag: v15.1.0~2494 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=59dcc74f129c0fb87e6d6f7cd8c9871dd4ee1198;p=ceph.git Merge pull request #28084 from ricardoasmarques/improve-portal-ips-calculation mgr/dashboard: Optimize portal IPs calculation Reviewed-by: Tiago Melo --- 59dcc74f129c0fb87e6d6f7cd8c9871dd4ee1198 diff --cc src/pybind/mgr/dashboard/tests/test_iscsi.py index c3c6c159c5c7,4493e8f9f44a..c375f8a54883 --- a/src/pybind/mgr/dashboard/tests/test_iscsi.py +++ b/src/pybind/mgr/dashboard/tests/test_iscsi.py @@@ -550,15 -550,9 +550,15 @@@ class IscsiClientMock(object) target_config['ip_list'] = [] target_config['ip_list'] += ip_address target_config['portals'][gateway_name] = { - "portal_ip_address": ip_address[0] + "portal_ip_addresses": ip_address } + 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']) + target_config['portals'].pop(gateway_name) + def create_disk(self, pool, image, backstore): image_id = '{}/{}'.format(pool, image) self.config['disks'][image_id] = {