mirror of
https://github.com/ceph/ceph
synced 2025-01-19 17:41:39 +00:00
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 <kchai@redhat.com>
This commit is contained in:
parent
304c791db2
commit
ddeda902b9
@ -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):
|
||||
|
Loading…
Reference in New Issue
Block a user