replacing the usage

of dhcp_opt_ids_from_querystring with sequence_from_querystring
This commit is contained in:
earthmant 2015-12-03 13:49:08 +02:00
parent 41873b59f7
commit c5bf9d8c94
2 changed files with 2 additions and 10 deletions

View File

@ -2,7 +2,7 @@ from __future__ import unicode_literals
from moto.core.responses import BaseResponse
from moto.ec2.utils import (
filters_from_querystring,
dhcp_opt_ids_from_querystring,
sequence_from_querystring,
dhcp_configuration_from_querystring)
@ -48,7 +48,7 @@ class DHCPOptions(BaseResponse):
return template.render(delete_status=delete_status)
def describe_dhcp_options(self):
dhcp_opt_ids = dhcp_opt_ids_from_querystring(self.querystring)
dhcp_opt_ids = sequence_from_querystring("DhcpOptionsId", self.querystring)
if filters_from_querystring(self.querystring):
raise NotImplementedError("Filtering not supported in describe_dhcp_options.")
dhcp_opts = self.ec2_backend.get_all_dhcp_options(dhcp_opt_ids, None)

View File

@ -185,14 +185,6 @@ def network_acl_ids_from_querystring(querystring_dict):
return network_acl_ids
def dhcp_opt_ids_from_querystring(querystring_dict):
dhcp_opt_ids = []
for key, value in querystring_dict.items():
if 'DhcpOptionsId' in key:
dhcp_opt_ids.append(value[0])
return dhcp_opt_ids
def vpc_ids_from_querystring(querystring_dict):
vpc_ids = []
for key, value in querystring_dict.items():