VNX Driver: delete_hba() instead of remove_hba()
The storops drivers doesn't have a remove_hba() function, it's called delete_hba(). The confusion comes from the fact that storops uses -removeHBA argument when calling naviseccli. Change-Id: I3f72481442436ddf78c10ab53c161663b05a330a Closes-bug: #1813525 (cherry picked from commit6145f8583a) (cherry picked from commitacca9dbc7c)
This commit is contained in:
@@ -2067,7 +2067,7 @@ test_terminate_connection_cleanup_deregister:
|
|||||||
get_alu_hlu_map: {}
|
get_alu_hlu_map: {}
|
||||||
vnx:
|
vnx:
|
||||||
_methods:
|
_methods:
|
||||||
remove_hba:
|
delete_hba:
|
||||||
|
|
||||||
test_terminate_connection_cleanup_sg_is_not_empty:
|
test_terminate_connection_cleanup_sg_is_not_empty:
|
||||||
sg:
|
sg:
|
||||||
|
|||||||
@@ -994,9 +994,9 @@ class TestCommonAdapter(test.TestCase):
|
|||||||
host = common.Host('fake_host', ['fake_initiator1', 'fake_initiator2'])
|
host = common.Host('fake_host', ['fake_initiator1', 'fake_initiator2'])
|
||||||
sg = mocked_res['sg']
|
sg = mocked_res['sg']
|
||||||
common_adapter.terminate_connection_cleanup(host, sg)
|
common_adapter.terminate_connection_cleanup(host, sg)
|
||||||
common_adapter.client.vnx.remove_hba.assert_any_call(
|
common_adapter.client.vnx.delete_hba.assert_any_call(
|
||||||
'fake_initiator1')
|
'fake_initiator1')
|
||||||
common_adapter.client.vnx.remove_hba.assert_any_call(
|
common_adapter.client.vnx.delete_hba.assert_any_call(
|
||||||
'fake_initiator2')
|
'fake_initiator2')
|
||||||
|
|
||||||
@res_mock.patch_common_adapter
|
@res_mock.patch_common_adapter
|
||||||
|
|||||||
@@ -535,7 +535,10 @@ class Client(object):
|
|||||||
if not isinstance(initiators, list):
|
if not isinstance(initiators, list):
|
||||||
initiators = [initiators]
|
initiators = [initiators]
|
||||||
for initiator_uid in initiators:
|
for initiator_uid in initiators:
|
||||||
self.vnx.remove_hba(initiator_uid)
|
try:
|
||||||
|
self.vnx.delete_hba(initiator_uid)
|
||||||
|
except AttributeError:
|
||||||
|
self.vnx.remove_hba(initiator_uid)
|
||||||
|
|
||||||
def update_consistencygroup(self, cg, lun_ids_to_add, lun_ids_to_remove):
|
def update_consistencygroup(self, cg, lun_ids_to_add, lun_ids_to_remove):
|
||||||
lun_ids_in_cg = (set([l.lun_id for l in cg.lun_list]) if cg.lun_list
|
lun_ids_in_cg = (set([l.lun_id for l in cg.lun_list]) if cg.lun_list
|
||||||
|
|||||||
Reference in New Issue
Block a user