Exemple #1
0
def get_rpc_channel(service):
    """
    Returns a RPC channel to the service in the gateway.
    """
    return create_grpc_channel(os.environ.get('GATEWAY_IP', '192.168.60.142'),
                               os.environ.get('GATEWAY_PORT', '8443'),
                               '%s.local' % service)
Exemple #2
0
def get_feg_rpc_channel(port, service):
    """
    Returns RPC channel to the service in the gateway.
    """
    return create_grpc_channel(
        '192.168.60.142',
        port,
        '%s.local' % service,
    )
Exemple #3
0
def get_rpc_channel(service):
    """
    Returns a RPC channel to the service in the gateway.
    """
    # return create_grpc_channel(os.environ.get('GATEWAY_IP', '192.168.60.142'),
    #                           os.environ.get('GATEWAY_PORT', '8443'),
    #                           '%s.local' % service)
    # print(service, sub_config.use_orc8r)
    if sub_config.use_orc8r and service == 'subscriberdb':
        authority = '%s-%s' % (service, 'controller.magma.test')
    else:
        authority = '%s.local' % service
    
    return create_grpc_channel(os.environ.get('GATEWAY_IP', '192.168.60.142'), os.environ.get('GATEWAY_PORT', '8443'), authority)