def _request_eip(interface, vm_):
 params = {'Action': 'AllocateAddress'}
 params['Domain'] = interface.setdefault('domain', 'vpc')
 eips = aws.query(params, return_root=True, location=get_location(vm_), provider=get_provider(), opts=__opts__, sigver='4')
 for eip in eips:
  if ('allocationId' in eip):
   return eip['allocationId']
 return None

def _request_eip ( interface , vm_ ) : params = { 'Action' : 'AllocateAddress' } params [ 'Domain' ] = interface . setdefault ( 'domain' , 'vpc' ) eips = aws . query ( params , return_root = True , location = get_location ( vm_ ) , provider = get_provider ( ) , opts = __opts__ , sigver = '4' ) for eip in eips : if ( 'allocationId' in eip ) : return eip [ 'allocationId' ] return None
request and return elastic ip .