Skip to content

Commit 10f59f7

Browse files
authored
[ECS02C-1188]: Make smartquota state=absent idempotent when path does not exist (#265)
1 parent 067e742 commit 10f59f7

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

plugins/modules/smartquota.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -731,8 +731,12 @@ def get_quota_details(self, include_snapshots,
731731
LOG.info("Get Quota Details Failed. Quota does not exist.")
732732
return None, None
733733
except Exception as e:
734+
error_str = determine_error(e)
735+
if 'AEC_NOT_FOUND' in error_str:
736+
LOG.info("Path %s not found, quota does not exist", path)
737+
return None, None
734738
error_message = "Get Quota Details for %s failed with %s" \
735-
% (path, determine_error(e))
739+
% (path, error_str)
736740
LOG.error(error_message)
737741
self.module.fail_json(msg=error_message)
738742

0 commit comments

Comments
 (0)