def endpoint_create(service, publicurl=None, internalurl=None, adminurl=None, region=None, profile=None, url=None, interface=None, **connection_args):
 kstone = auth(profile, **connection_args)
 keystone_service = service_get(name=service, profile=profile, **connection_args)
 if ((not keystone_service) or ('Error' in keystone_service)):
  return {'Error': 'Could not find the specified service'}
 if (_OS_IDENTITY_API_VERSION > 2):
  kstone.endpoints.create(service=keystone_service[service]['id'], region_id=region, url=url, interface=interface)
 else:
  kstone.endpoints.create(region=region, service_id=keystone_service[service]['id'], publicurl=publicurl, adminurl=adminurl, internalurl=internalurl)
 return endpoint_get(service, profile, **connection_args)

def endpoint_create ( service , publicurl = None , internalurl = None , adminurl = None , region = None , profile = None , url = None , interface = None , ** connection_args ) : kstone = auth ( profile , ** connection_args ) keystone_service = service_get ( name = service , profile = profile , ** connection_args ) if ( ( not keystone_service ) or ( 'Error' in keystone_service ) ) : return { 'Error' : 'Could not find the specified service' } if ( _OS_IDENTITY_API_VERSION > 2 ) : kstone . endpoints . create ( service = keystone_service [ service ] [ 'id' ] , region_id = region , url = url , interface = interface ) else : kstone . endpoints . create ( region = region , service_id = keystone_service [ service ] [ 'id' ] , publicurl = publicurl , adminurl = adminurl , internalurl = internalurl ) return endpoint_get ( service , profile , ** connection_args )
create an endpoint for an openstack service cli examples: .