def create_address(kwargs=None, call=None):
 if (call != 'function'):
  raise SaltCloudSystemExit('The create_address function must be called with -f or --function.')
 if ((not kwargs) or ('name' not in kwargs)):
  log.error('A name must be specified when creating an address.')
  return False
 if ('region' not in kwargs):
  log.error('A region must be specified for the address.')
  return False
 name = kwargs['name']
 ex_region = kwargs['region']
 ex_address = kwargs.get('address', None)
 conn = get_conn()
 __utils__['cloud.fire_event']('event', 'create address', 'salt/cloud/address/creating', args=kwargs, sock_dir=__opts__['sock_dir'], transport=__opts__['transport'])
 addy = conn.ex_create_address(name, ex_region, ex_address)
 __utils__['cloud.fire_event']('event', 'created address', 'salt/cloud/address/created', args=kwargs, sock_dir=__opts__['sock_dir'], transport=__opts__['transport'])
 log.info(('Created GCE Address ' + name))
 return _expand_address(addy)

def create_address ( kwargs = None , call = None ) : if ( call != 'function' ) : raise SaltCloudSystemExit ( 'The create_address function must be called with -f or --function.' ) if ( ( not kwargs ) or ( 'name' not in kwargs ) ) : log . error ( 'A name must be specified when creating an address.' ) return False if ( 'region' not in kwargs ) : log . error ( 'A region must be specified for the address.' ) return False name = kwargs [ 'name' ] ex_region = kwargs [ 'region' ] ex_address = kwargs . get ( 'address' , None ) conn = get_conn ( ) __utils__ [ 'cloud.fire_event' ] ( 'event' , 'create address' , 'salt/cloud/address/creating' , args = kwargs , sock_dir = __opts__ [ 'sock_dir' ] , transport = __opts__ [ 'transport' ] ) addy = conn . ex_create_address ( name , ex_region , ex_address ) __utils__ [ 'cloud.fire_event' ] ( 'event' , 'created address' , 'salt/cloud/address/created' , args = kwargs , sock_dir = __opts__ [ 'sock_dir' ] , transport = __opts__ [ 'transport' ] ) log . info ( ( 'Created GCE Address ' + name ) ) return _expand_address ( addy )
create a static address in a region .