#NEWLINE# def route_table_absent( name , region = None , key = None , keyid = None , profile = None ) : #NEWLINE# #INDENT# '\n    Ensure the named route table is absent.\n\n    name\n        Name of the route table.\n\n    region\n        Region to connect to.\n\n    key\n        Secret key to be used.\n\n    keyid\n        Access key to be used.\n\n    profile\n        A dict with region, key and keyid, or a pillar key (string) that\n        contains a dict with region, key and keyid.\n    ' #NEWLINE# ret = { #NEWLINE# #INDENT# 'name' : name , #NEWLINE# 'result' : True , #NEWLINE# 'comment' : '' , #NEWLINE# 'changes' : { #NEWLINE# #INDENT# #NEWLINE# #UNINDENT# } , #NEWLINE# #UNINDENT# } #NEWLINE# r = __salt__ [ 'boto_vpc.get_resource_id' ] ( 'route_table' , name = r , region = region , key = key , keyid = keyid , profile = profile ) #NEWLINE# if ( 'error' in r ) : #NEWLINE# #INDENT# ret [ 'result' ] = False #NEWLINE# ret [ 'comment' ] = r [ 'error' ] [ 'message' ] #NEWLINE# return ret #NEWLINE# #UNINDENT# rtbl_id = r [ 'id' ] #NEWLINE# if ( not rtbl_id ) : #NEWLINE# #INDENT# ret [ 'comment' ] = 'Route table {0} does not exist.' . format ( name ) #NEWLINE# return ret #NEWLINE# #UNINDENT# if __opts__ [ 'test' ] : #NEWLINE# #INDENT# ret [ 'comment' ] = 'Route table {0} is set to be removed.' . format ( name ) #NEWLINE# ret [ 'result' ] = None #NEWLINE# return ret #NEWLINE# #UNINDENT# r = __salt__ [ 'boto_vpc.delete_route_table' ] ( route_table_name = name , region = region , key = key , keyid = keyid , profile = profile ) #NEWLINE# if ( 'error' in r ) : #NEWLINE# #INDENT# ret [ 'result' ] = False #NEWLINE# ret [ 'comment' ] = 'Failed to delete route table: {0}' . format ( r [ 'error' ] [ 'message' ] ) #NEWLINE# return ret #NEWLINE# #UNINDENT# ret [ 'changes' ] [ 'old' ] = { #NEWLINE# #INDENT# 'route_table' : rtbl_id , #NEWLINE# #UNINDENT# } #NEWLINE# ret [ 'changes' ] [ 'new' ] = { #NEWLINE# #INDENT# 'route_table' : None , #NEWLINE# #UNINDENT# } #NEWLINE# ret [ 'comment' ] = 'Route table {0} deleted.' . format ( name ) #NEWLINE# return ret