Route Tables / Routes: Initial implementation.
This commit is contained in:
parent
22d9141122
commit
22e6166e4e
5 changed files with 552 additions and 24 deletions
|
|
@ -80,6 +80,15 @@ def random_ip():
|
|||
)
|
||||
|
||||
|
||||
def generate_route_id(route_table_id, cidr_block):
|
||||
return "%s~%s" % (route_table_id, cidr_block)
|
||||
|
||||
|
||||
def split_route_id(route_id):
|
||||
values = string.split(route_id,'~')
|
||||
return values[0], values[1]
|
||||
|
||||
|
||||
def instance_ids_from_querystring(querystring_dict):
|
||||
instance_ids = []
|
||||
for key, value in querystring_dict.items():
|
||||
|
|
@ -96,6 +105,14 @@ def image_ids_from_querystring(querystring_dict):
|
|||
return image_ids
|
||||
|
||||
|
||||
def route_table_ids_from_querystring(querystring_dict):
|
||||
route_table_ids = []
|
||||
for key, value in querystring_dict.iteritems():
|
||||
if 'RouteTableId' in key:
|
||||
route_table_ids.append(value[0])
|
||||
return route_table_ids
|
||||
|
||||
|
||||
def sequence_from_querystring(parameter, querystring_dict):
|
||||
parameter_values = []
|
||||
for key, value in querystring_dict.items():
|
||||
|
|
@ -160,6 +177,11 @@ def dhcp_configuration_from_querystring(querystring, option=u'DhcpConfiguration'
|
|||
return response_values
|
||||
|
||||
|
||||
def optional_from_querystring(parameter, querystring):
|
||||
parameter_array = querystring.get(parameter)
|
||||
return parameter_array[0] if parameter_array else None
|
||||
|
||||
|
||||
def filters_from_querystring(querystring_dict):
|
||||
response_values = {}
|
||||
for key, value in querystring_dict.items():
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue