EC2 describe_network_acls: add support for owner-id filter (#3898)
* add test that fails with FilterNotImplementedError * describe_network_acls: add support for owner-id filter Co-authored-by: Kevin Neal <Kevin_Neal@intuit.com>
This commit is contained in:
parent
94a70e9ad1
commit
e5b3f4181d
3 changed files with 13 additions and 1 deletions
|
|
@ -5667,10 +5667,13 @@ class NetworkAclAssociation(object):
|
|||
|
||||
|
||||
class NetworkAcl(TaggedEC2Resource):
|
||||
def __init__(self, ec2_backend, network_acl_id, vpc_id, default=False):
|
||||
def __init__(
|
||||
self, ec2_backend, network_acl_id, vpc_id, default=False, owner_id=OWNER_ID,
|
||||
):
|
||||
self.ec2_backend = ec2_backend
|
||||
self.id = network_acl_id
|
||||
self.vpc_id = vpc_id
|
||||
self.owner_id = owner_id
|
||||
self.network_acl_entries = []
|
||||
self.associations = {}
|
||||
self.default = "true" if default is True else "false"
|
||||
|
|
@ -5684,6 +5687,8 @@ class NetworkAcl(TaggedEC2Resource):
|
|||
return self.id
|
||||
elif filter_name == "association.subnet-id":
|
||||
return [assoc.subnet_id for assoc in self.associations.values()]
|
||||
elif filter_name == "owner-id":
|
||||
return self.owner_id
|
||||
else:
|
||||
return super(NetworkAcl, self).get_filter_value(
|
||||
filter_name, "DescribeNetworkAcls"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue