def get_connection_ip_list(as_wmi_format=False, server=_DEFAULT_SERVER):
 ret = dict()
 setting = 'IPGrant'
 reg_separator = ',\\s*'
 if as_wmi_format:
  ret = list()
 addresses = _get_wmi_setting('IIsIPSecuritySetting', setting, server)
 for unnormalized_address in addresses:
  (ip_address, subnet) = re.split(reg_separator, unnormalized_address)
  if as_wmi_format:
   ret.append('{0}, {1}'.format(ip_address, subnet))
  else:
   ret[ip_address] = subnet
 if (not ret):
  _LOG.debug('%s is empty.', setting)
 return ret

def get_connection_ip_list ( as_wmi_format = False , server = _DEFAULT_SERVER ) : ret = dict ( ) setting = 'IPGrant' reg_separator = ',\\s*' if as_wmi_format : ret = list ( ) addresses = _get_wmi_setting ( 'IIsIPSecuritySetting' , setting , server ) for unnormalized_address in addresses : ( ip_address , subnet ) = re . split ( reg_separator , unnormalized_address ) if as_wmi_format : ret . append ( '{0}, {1}' . format ( ip_address , subnet ) ) else : ret [ ip_address ] = subnet if ( not ret ) : _LOG . debug ( '%s is empty.' , setting ) return ret
get the ipgrant list for the smtp virtual server .