|
28 | 28 | UnityAttachAluExceedLimitError, UnitySnapAlreadyPromotedException, \ |
29 | 29 | SystemAPINotSupported, UnityHostInitiatorExistedError, \ |
30 | 30 | UnityResourceNotAttachedError, UnityNoHluAvailableError, \ |
31 | | - UnityHluNumberInUseError, UnityAttachExceedLimitError |
| 31 | + UnityHluNumberInUseError, UnityAttachExceedLimitError, \ |
| 32 | + UnityLunModifyByAnotherRequestException |
32 | 33 | from storops.unity.enums import HostTypeEnum, HostManageEnum, \ |
33 | 34 | HostPortTypeEnum, HealthEnum, HostInitiatorTypeEnum, \ |
34 | 35 | HostInitiatorSourceTypeEnum, HostInitiatorIscsiTypeEnum |
@@ -367,6 +368,16 @@ def test_detach_alu(self): |
367 | 368 | resp = host.detach_alu(lun) |
368 | 369 | assert_that(resp.is_ok(), equal_to(True)) |
369 | 370 |
|
| 371 | + @patch_rest |
| 372 | + def test_detach_with_retry_lun_modified_by_another_request(self): |
| 373 | + host = UnityHost(cli=t_rest(), _id='Host_10') |
| 374 | + lun = UnityLun(_id='sv_5', cli=t_rest()) |
| 375 | + |
| 376 | + def f(): |
| 377 | + host.detach(lun) |
| 378 | + |
| 379 | + assert_that(f, raises(UnityLunModifyByAnotherRequestException)) |
| 380 | + |
370 | 381 | @patch_rest |
371 | 382 | def test_attach_attached_hlu(self): |
372 | 383 | host = UnityHost(cli=t_rest(), _id='Host_10') |
|
0 commit comments