]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph-ci.git/commitdiff
Merge pull request #28084 from ricardoasmarques/improve-portal-ips-calculation
authorKefu Chai <kchai@redhat.com>
Tue, 11 Jun 2019 12:17:32 +0000 (20:17 +0800)
committerGitHub <noreply@github.com>
Tue, 11 Jun 2019 12:17:32 +0000 (20:17 +0800)
mgr/dashboard: Optimize portal IPs calculation

Reviewed-by: Tiago Melo <tmelo@suse.com>
1  2 
src/pybind/mgr/dashboard/controllers/iscsi.py
src/pybind/mgr/dashboard/tests/test_iscsi.py

index c3c6c159c5c748b1b3564dfc4f5da5044e2c8d6c,4493e8f9f44aaace7c48f551ce5a60749a0cb473..c375f8a548839a62873749a0ea1439a358001cf8
@@@ -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] = {