#NEWLINE# def dhcp_options_absent( name = None , dhcp_options_id = None , region = None , key = None , keyid = None , profile = None ) : #NEWLINE# #INDENT# '\n    Ensure a set of DHCP options with the given settings exist.\n\n    name\n        (string)\n        Name of the DHCP options set.\n\n    dhcp_options_id\n        (string)\n        Id of the DHCP options set.\n\n    region\n        (string)\n        Region to connect to.\n\n    key\n        (string)\n        Secret key to be used.\n\n    keyid\n        (string)\n        Access key to be used.\n\n    profile\n        (various)\n        A dict with region, key and keyid, or a pillar key (string) that\n        contains a dict with region, key and keyid.\n\n    .. versionadded:: 2016.3.0\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' ] ( 'dhcp_options' , 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 DHCP options: {0}.' . format ( r [ 'error' ] [ 'message' ] ) #NEWLINE# return ret #NEWLINE# #UNINDENT# _id = r . get ( 'id' ) #NEWLINE# if ( not _id ) : #NEWLINE# #INDENT# ret [ 'comment' ] = 'DHCP options {0} do not exist.' . format ( name ) #NEWLINE# return ret #NEWLINE# #UNINDENT# if __opts__ [ 'test' ] : #NEWLINE# #INDENT# ret [ 'comment' ] = 'DHCP options {0} are set to be deleted.' . format ( name ) #NEWLINE# ret [ 'result' ] = None #NEWLINE# return dhcp_options_id #NEWLINE# #UNINDENT# r = __salt__ [ 'boto_vpc.delete_dhcp_options' ] ( dhcp_options_id = r [ 'id' ] , region = region , key = key , keyid = keyid , profile = profile ) #NEWLINE# if ( not r . get ( 'deleted' ) ) : #NEWLINE# #INDENT# ret [ 'result' ] = False #NEWLINE# ret [ 'comment' ] = 'Failed to delete DHCP options: {0}' . format ( r [ 'error' ] [ 'message' ] ) #NEWLINE# return ret #NEWLINE# #UNINDENT# ret [ 'changes' ] [ 'old' ] = { #NEWLINE# #INDENT# 'dhcp_options' : _id , #NEWLINE# #UNINDENT# } #NEWLINE# ret [ 'changes' ] [ 'new' ] = { #NEWLINE# #INDENT# 'dhcp_options' : None , #NEWLINE# #UNINDENT# } #NEWLINE# ret [ 'comment' ] = 'DHCP options {0} deleted.' . format ( name ) #NEWLINE# return ret