def get_dhcp_options(dhcp_options_name=None, dhcp_options_id=None, region=None, key=None, keyid=None, profile=None):
 if (not any((dhcp_options_name, dhcp_options_id))):
  raise SaltInvocationError('At least one of the following must be specified: dhcp_options_name, dhcp_options_id.')
 if ((not dhcp_options_id) and dhcp_options_name):
  dhcp_options_id = _get_resource_id('dhcp_options', dhcp_options_name, region=region, key=key, keyid=keyid, profile=profile)
 if (not dhcp_options_id):
  return {'dhcp_options': {}}
 try:
  conn = _get_conn(region=region, key=key, keyid=keyid, profile=profile)
  r = conn.get_all_dhcp_options(dhcp_options_ids=[dhcp_options_id])
 except BotoServerError as e:
  return {'error': salt.utils.boto.get_error(e)}
 if (not r):
  return {'dhcp_options': None}
 keys = ('domain_name', 'domain_name_servers', 'ntp_servers', 'netbios_name_servers', 'netbios_node_type')
 return {'dhcp_options': dict(((k, r[0].options.get(k)) for k in keys))}

def get_dhcp_options ( dhcp_options_name = None , dhcp_options_id = None , region = None , key = None , keyid = None , profile = None ) : if ( not any ( ( dhcp_options_name , dhcp_options_id ) ) ) : raise SaltInvocationError ( 'At least one of the following must be specified: dhcp_options_name, dhcp_options_id.' ) if ( ( not dhcp_options_id ) and dhcp_options_name ) : dhcp_options_id = _get_resource_id ( 'dhcp_options' , dhcp_options_name , region = region , key = key , keyid = keyid , profile = profile ) if ( not dhcp_options_id ) : return { 'dhcp_options' : { } } try : conn = _get_conn ( region = region , key = key , keyid = keyid , profile = profile ) r = conn . get_all_dhcp_options ( dhcp_options_ids = [ dhcp_options_id ] ) except BotoServerError as e : return { 'error' : salt . utils . boto . get_error ( e ) } if ( not r ) : return { 'dhcp_options' : None } keys = ( 'domain_name' , 'domain_name_servers' , 'ntp_servers' , 'netbios_name_servers' , 'netbios_node_type' ) return { 'dhcp_options' : dict ( ( ( k , r [ 0 ] . options . get ( k ) ) for k in keys ) ) }
return a dict with the current values of the requested dhcp options set cli example: .