def assign_private_ip_addresses(network_interface_name=None, network_interface_id=None, private_ip_addresses=None, secondary_private_ip_address_count=None, allow_reassignment=False, region=None, key=None, keyid=None, profile=None):
 if (not salt.utils.exactly_one((network_interface_name, network_interface_id))):
  raise SaltInvocationError("Exactly one of 'network_interface_name', 'network_interface_id' must be provided")
 conn = _get_conn(region=region, key=key, keyid=keyid, profile=profile)
 if network_interface_name:
  try:
   network_interface_id = get_network_interface_id(network_interface_name, region=region, key=key, keyid=keyid, profile=profile)
  except boto.exception.BotoServerError as e:
   log.error(e)
   return False
  if (not network_interface_id):
   log.error("Given network_interface_name '{0}' cannot be mapped to an network_interface_id".format(network_interface_name))
   return False
 try:
  return conn.assign_private_ip_addresses(network_interface_id=network_interface_id, private_ip_addresses=private_ip_addresses, secondary_private_ip_address_count=secondary_private_ip_address_count, allow_reassignment=allow_reassignment)
 except boto.exception.BotoServerError as e:
  log.error(e)
  return False

def assign_private_ip_addresses ( network_interface_name = None , network_interface_id = None , private_ip_addresses = None , secondary_private_ip_address_count = None , allow_reassignment = False , region = None , key = None , keyid = None , profile = None ) : if ( not salt . utils . exactly_one ( ( network_interface_name , network_interface_id ) ) ) : raise SaltInvocationError ( "Exactly one of 'network_interface_name', 'network_interface_id' must be provided" ) conn = _get_conn ( region = region , key = key , keyid = keyid , profile = profile ) if network_interface_name : try : network_interface_id = get_network_interface_id ( network_interface_name , region = region , key = key , keyid = keyid , profile = profile ) except boto . exception . BotoServerError as e : log . error ( e ) return False if ( not network_interface_id ) : log . error ( "Given network_interface_name '{0}' cannot be mapped to an network_interface_id" . format ( network_interface_name ) ) return False try : return conn . assign_private_ip_addresses ( network_interface_id = network_interface_id , private_ip_addresses = private_ip_addresses , secondary_private_ip_address_count = secondary_private_ip_address_count , allow_reassignment = allow_reassignment ) except boto . exception . BotoServerError as e : log . error ( e ) return False
assigns one or more secondary private ip addresses to a network interface .