def route_table_absent(name, region=None, key=None, keyid=None, profile=None):
 ret = {'name': name, 'result': True, 'comment': '', 'changes': {}}
 r = __salt__['boto_vpc.get_resource_id']('route_table', name=name, region=region, key=key, keyid=keyid, profile=profile)
 if ('error' in r):
  ret['result'] = False
  ret['comment'] = r['error']['message']
  return ret
 rtbl_id = r['id']
 if (not rtbl_id):
  ret['comment'] = 'Route table {0} does not exist.'.format(name)
  return ret
 if __opts__['test']:
  ret['comment'] = 'Route table {0} is set to be removed.'.format(name)
  ret['result'] = None
  return ret
 r = __salt__['boto_vpc.delete_route_table'](route_table_name=name, region=region, key=key, keyid=keyid, profile=profile)
 if ('error' in r):
  ret['result'] = False
  ret['comment'] = 'Failed to delete route table: {0}'.format(r['error']['message'])
  return ret
 ret['changes']['old'] = {'route_table': rtbl_id}
 ret['changes']['new'] = {'route_table': None}
 ret['comment'] = 'Route table {0} deleted.'.format(name)
 return ret

def route_table_absent ( name , region = None , key = None , keyid = None , profile = None ) : ret = { 'name' : name , 'result' : True , 'comment' : '' , 'changes' : { } } r = __salt__ [ 'boto_vpc.get_resource_id' ] ( 'route_table' , name = name , region = region , key = key , keyid = keyid , profile = profile ) if ( 'error' in r ) : ret [ 'result' ] = False ret [ 'comment' ] = r [ 'error' ] [ 'message' ] return ret rtbl_id = r [ 'id' ] if ( not rtbl_id ) : ret [ 'comment' ] = 'Route table {0} does not exist.' . format ( name ) return ret if __opts__ [ 'test' ] : ret [ 'comment' ] = 'Route table {0} is set to be removed.' . format ( name ) ret [ 'result' ] = None return ret r = __salt__ [ 'boto_vpc.delete_route_table' ] ( route_table_name = name , region = region , key = key , keyid = keyid , profile = profile ) if ( 'error' in r ) : ret [ 'result' ] = False ret [ 'comment' ] = 'Failed to delete route table: {0}' . format ( r [ 'error' ] [ 'message' ] ) return ret ret [ 'changes' ] [ 'old' ] = { 'route_table' : rtbl_id } ret [ 'changes' ] [ 'new' ] = { 'route_table' : None } ret [ 'comment' ] = 'Route table {0} deleted.' . format ( name ) return ret
ensure the named route table is absent .