DescribeSubnets: Added support for 'filters' parameter.
This commit is contained in:
parent
348d1803ed
commit
d683c3b291
3 changed files with 68 additions and 3 deletions
|
|
@ -2,6 +2,7 @@ from jinja2 import Template
|
|||
|
||||
from moto.core.responses import BaseResponse
|
||||
from moto.ec2.models import ec2_backend
|
||||
from moto.ec2.utils import filters_from_querystring
|
||||
|
||||
|
||||
class Subnets(BaseResponse):
|
||||
|
|
@ -19,7 +20,8 @@ class Subnets(BaseResponse):
|
|||
return template.render(subnet=subnet)
|
||||
|
||||
def describe_subnets(self):
|
||||
subnets = ec2_backend.get_all_subnets()
|
||||
filters = filters_from_querystring(self.querystring)
|
||||
subnets = ec2_backend.get_all_subnets(filters)
|
||||
template = Template(DESCRIBE_SUBNETS_RESPONSE)
|
||||
return template.render(subnets=subnets)
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue