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:
khneal 2021-05-05 05:15:43 -07:00 committed by GitHub
commit e5b3f4181d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 13 additions and 1 deletions

View file

@ -6,6 +6,7 @@ import pytest
from botocore.exceptions import ClientError
from moto import mock_ec2_deprecated, mock_ec2
from moto.ec2.models import OWNER_ID
@mock_ec2_deprecated
@ -297,6 +298,11 @@ def test_describe_network_acls():
resp2 = conn.describe_network_acls()["NetworkAcls"]
resp2.should.have.length_of(3)
resp3 = conn.describe_network_acls(
Filters=[{"Name": "owner-id", "Values": [OWNER_ID]}]
)["NetworkAcls"]
resp3.should.have.length_of(3)
with pytest.raises(ClientError) as ex:
conn.describe_network_acls(NetworkAclIds=["1"])