Skip to content

Commit

Permalink
remove dry_run
Browse files Browse the repository at this point in the history
  • Loading branch information
GomathiselviS committed Oct 11, 2024
1 parent cab0f46 commit b599b6e
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 8 deletions.
8 changes: 2 additions & 6 deletions plugins/module_utils/ec2.py
Original file line number Diff line number Diff line change
Expand Up @@ -1294,10 +1294,6 @@ class EC2PlacementGroupErrorHandler(AWSErrorHandler):
def _is_missing(cls):
return is_boto3_error_code("InvalidPlacementGroup.Unknown")

@classmethod
def _is_dry_run(cls):
return is_boto3_error_code("DryRunOperation")


@EC2PlacementGroupErrorHandler.list_error_handler("describe placement group", [])
@AWSRetry.jittered_backoff()
Expand All @@ -1309,8 +1305,8 @@ def describe_ec2_placement_groups(

@EC2PlacementGroupErrorHandler.deletion_error_handler("delete placement group")
@AWSRetry.jittered_backoff()
def delete_ec2_placement_group(client, group_name: str, dry_run: Optional[bool] = False) -> bool:
client.delete_placement_group(GroupName=group_name, DryRun=dry_run)
def delete_ec2_placement_group(client, group_name: str) -> bool:
client.delete_placement_group(GroupName=group_name)
return True


Expand Down
2 changes: 0 additions & 2 deletions plugins/module_utils/errors.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,6 @@ def wrapper(func):
def handler(*args, **kwargs):
try:
return func(*args, **kwargs)
except cls._is_dry_run():
return {"boto3_error_code": "DryRunOperation"}
except botocore.exceptions.WaiterError as e:
raise cls._CUSTOM_EXCEPTION(message=f"Timeout trying to {description}", exception=e) from e
except (botocore.exceptions.ClientError, botocore.exceptions.BotoCoreError) as e:
Expand Down

0 comments on commit b599b6e

Please sign in to comment.