Support default ACL in a VPC
a vpc usually has a default acl this makes sure that moto flags it and that the describe response has it in there
This commit is contained in:
parent
4b59c6b907
commit
18fe3e41e9
@ -2610,10 +2610,12 @@ class NetworkAcl(TaggedEC2Resource):
|
|||||||
self.vpc_id = vpc_id
|
self.vpc_id = vpc_id
|
||||||
self.network_acl_entries = []
|
self.network_acl_entries = []
|
||||||
self.associations = {}
|
self.associations = {}
|
||||||
self.default = default
|
self.default = 'true' if default is True else 'false'
|
||||||
|
|
||||||
def get_filter_value(self, filter_name):
|
def get_filter_value(self, filter_name):
|
||||||
if filter_name == "vpc-id":
|
if filter_name == "default":
|
||||||
|
return self.default
|
||||||
|
elif filter_name == "vpc-id":
|
||||||
return self.vpc_id
|
return self.vpc_id
|
||||||
elif filter_name == "association.network-acl-id":
|
elif filter_name == "association.network-acl-id":
|
||||||
return self.id
|
return self.id
|
||||||
|
@ -96,7 +96,7 @@ DESCRIBE_NETWORK_ACL_RESPONSE = """
|
|||||||
<item>
|
<item>
|
||||||
<networkAclId>{{ network_acl.id }}</networkAclId>
|
<networkAclId>{{ network_acl.id }}</networkAclId>
|
||||||
<vpcId>{{ network_acl.vpc_id }}</vpcId>
|
<vpcId>{{ network_acl.vpc_id }}</vpcId>
|
||||||
<default>true</default>
|
<default>{{ network_acl.default }}</default>
|
||||||
<entrySet>
|
<entrySet>
|
||||||
{% for entry in network_acl.network_acl_entries %}
|
{% for entry in network_acl.network_acl_entries %}
|
||||||
<item>
|
<item>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user