Fix conflict with subnet/network ACL association during subnet creation.
This commit is contained in:
commit
2a6c4c89bf
54 changed files with 616 additions and 303 deletions
|
|
@ -139,7 +139,7 @@ def generate_route_id(route_table_id, cidr_block):
|
|||
|
||||
|
||||
def split_route_id(route_id):
|
||||
values = string.split(route_id, '~')
|
||||
values = route_id.split('~')
|
||||
return values[0], values[1]
|
||||
|
||||
|
||||
|
|
@ -407,8 +407,8 @@ def generic_filter(filters, objects):
|
|||
|
||||
def simple_aws_filter_to_re(filter_string):
|
||||
import fnmatch
|
||||
tmp_filter = filter_string.replace('\?','[?]')
|
||||
tmp_filter = tmp_filter.replace('\*','[*]')
|
||||
tmp_filter = filter_string.replace('\?', '[?]')
|
||||
tmp_filter = tmp_filter.replace('\*', '[*]')
|
||||
tmp_filter = fnmatch.translate(tmp_filter)
|
||||
return tmp_filter
|
||||
|
||||
|
|
@ -442,7 +442,7 @@ def get_prefix(resource_id):
|
|||
if resource_id_prefix == EC2_RESOURCE_TO_PREFIX['network-interface']:
|
||||
if after.startswith('attach'):
|
||||
resource_id_prefix = EC2_RESOURCE_TO_PREFIX['network-interface-attachment']
|
||||
if not resource_id_prefix in EC2_RESOURCE_TO_PREFIX.values():
|
||||
if resource_id_prefix not in EC2_RESOURCE_TO_PREFIX.values():
|
||||
uuid4hex = re.compile('[0-9a-f]{12}4[0-9a-f]{3}[89ab][0-9a-f]{15}\Z', re.I)
|
||||
if uuid4hex.match(resource_id) is not None:
|
||||
resource_id_prefix = EC2_RESOURCE_TO_PREFIX['reserved-instance']
|
||||
|
|
@ -454,7 +454,7 @@ def get_prefix(resource_id):
|
|||
def is_valid_resource_id(resource_id):
|
||||
valid_prefixes = EC2_RESOURCE_TO_PREFIX.values()
|
||||
resource_id_prefix = get_prefix(resource_id)
|
||||
if not resource_id_prefix in valid_prefixes:
|
||||
if resource_id_prefix not in valid_prefixes:
|
||||
return False
|
||||
resource_id_pattern = resource_id_prefix + '-[0-9a-f]{8}'
|
||||
resource_pattern_re = re.compile(resource_id_pattern)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue