Updates to FlowLogs and IMPLEMENTATION_COVERAGE (#3356)

* Replacing Unsuccessful class with tuple

* Updating coverage
This commit is contained in:
ljakimczuk 2020-10-06 07:33:16 +02:00 committed by GitHub
commit c26bef6f79
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 11 additions and 20 deletions

View file

@ -3532,15 +3532,6 @@ class SubnetBackend(object):
raise InvalidParameterValueError(attr_name)
class Unsuccessful(object):
def __init__(
self, resource_id, error_code, error_message,
):
self.resource_id = resource_id
self.error_code = error_code
self.error_message = error_message
class FlowLogs(TaggedEC2Resource, CloudFormationModel):
def __init__(
self,
@ -3749,11 +3740,11 @@ class FlowLogsBackend(object):
try:
s3_backend.get_bucket(arn)
except MissingBucket:
# Instead of creating FlowLog report
# the unsuccessful status for the
# given resource_id
unsuccessful.append(
# Instead of creating FlowLog report
# the unsuccessful status for the
# given resource_id
Unsuccessful(
(
resource_id,
"400",
"LogDestination: {0} does not exist.".format(arn),

View file

@ -59,10 +59,10 @@ CREATE_FLOW_LOGS_RESPONSE = """
{% for error in errors %}
<item>
<error>
<code>{{ error.error_code }}</code>
<message>{{ error.error_message }}</message>
<code>{{ error.1 }}</code>
<message>{{ error.2 }}</message>
</error>
<resourceId>{{ error.resource_id }}</resourceId>
<resourceId>{{ error.0 }}</resourceId>
</item>
{% endfor %}
</unsuccessful>