Merge pull request #467 from EarthmanT/support_default_filter_network_acl
Support Associate NetworkACL and Filtering in Describe
This commit is contained in:
commit
025445d23e
@ -2597,6 +2597,7 @@ class NetworkAclAssociation(object):
|
||||
subnet_id, network_acl_id):
|
||||
self.ec2_backend = ec2_backend
|
||||
self.id = new_association_id
|
||||
self.new_association_id = new_association_id
|
||||
self.subnet_id = subnet_id
|
||||
self.network_acl_id = network_acl_id
|
||||
super(NetworkAclAssociation, self).__init__()
|
||||
@ -2609,10 +2610,12 @@ class NetworkAcl(TaggedEC2Resource):
|
||||
self.vpc_id = vpc_id
|
||||
self.network_acl_entries = []
|
||||
self.associations = {}
|
||||
self.default = default
|
||||
self.default = 'true' if default is True else 'false'
|
||||
|
||||
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
|
||||
elif filter_name == "association.network-acl-id":
|
||||
return self.id
|
||||
|
@ -96,7 +96,7 @@ DESCRIBE_NETWORK_ACL_RESPONSE = """
|
||||
<item>
|
||||
<networkAclId>{{ network_acl.id }}</networkAclId>
|
||||
<vpcId>{{ network_acl.vpc_id }}</vpcId>
|
||||
<default>true</default>
|
||||
<default>{{ network_acl.default }}</default>
|
||||
<entrySet>
|
||||
{% for entry in network_acl.network_acl_entries %}
|
||||
<item>
|
||||
|
Loading…
x
Reference in New Issue
Block a user