Merge "Huawei: Don't fail when port group does not exist"
This commit is contained in:
commit
0018c92d96
@ -3034,6 +3034,12 @@ class HuaweiISCSIDriverTestCase(test.TestCase):
|
||||
op.get_replica_info(replica_id)
|
||||
op._is_status(None, {'key': 'volue'}, None)
|
||||
|
||||
@mock.patch.object(rest_client.RestClient, 'call',
|
||||
return_value={"error": {"code": 0}})
|
||||
def test_get_tgt_port_group_no_portg_exist(self, mock_call):
|
||||
portg = self.driver.client.get_tgt_port_group('test_portg')
|
||||
self.assertIsNone(portg)
|
||||
|
||||
|
||||
class FCSanLookupService(object):
|
||||
|
||||
|
@ -369,8 +369,6 @@ class RestClient(object):
|
||||
|
||||
msg = _('Find portgroup error.')
|
||||
self._assert_rest_result(result, msg)
|
||||
msg = _('Can not find the portgroup on the array.')
|
||||
self._assert_data_in_result(result, msg)
|
||||
|
||||
return self._get_id_from_result(result, tgt_port_group, 'NAME')
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user