This commit is contained in:
Bert Blommers 2020-11-11 15:55:37 +00:00
commit 273ca63d59
92 changed files with 515 additions and 1200 deletions

View file

@ -1491,12 +1491,7 @@ class AmiBackend(object):
# Limit by owner ids
if owners:
# support filtering by Owners=['self']
owners = list(
map(
lambda o: OWNER_ID if o == "self" else o,
owners,
)
)
owners = list(map(lambda o: OWNER_ID if o == "self" else o, owners,))
images = [ami for ami in images if ami.owner_id in owners]
# Generic filters
@ -3710,17 +3705,13 @@ class FlowLogsBackend(object):
):
if log_group_name is None and log_destination is None:
raise InvalidDependantParameterError(
"LogDestination",
"LogGroupName",
"not provided",
"LogDestination", "LogGroupName", "not provided",
)
if log_destination_type == "s3":
if log_group_name is not None:
raise InvalidDependantParameterTypeError(
"LogDestination",
"cloud-watch-logs",
"LogGroupName",
"LogDestination", "cloud-watch-logs", "LogGroupName",
)
elif log_destination_type == "cloud-watch-logs":
if deliver_logs_permission_arn is None:
@ -3868,8 +3859,7 @@ class FlowLogsBackend(object):
if non_existing:
raise InvalidFlowLogIdError(
len(flow_log_ids),
" ".join(x for x in flow_log_ids),
len(flow_log_ids), " ".join(x for x in flow_log_ids),
)
return True