Esempio n. 1
0
def with_private_stubs(client):
    rm_loc = urlparse(client.rm_url).netloc
    rm_channel = PelotonClient.resmgr_channel_pool[rm_loc]
    client.resmgr_svc = resmgr_grpc.ResourceManagerServiceStub(
        channel=rm_channel)

    hm_loc = urlparse(client.hm_url).netloc
    hm_channel = PelotonClient.hostmgr_channel_pool[hm_loc]
    client.hostmgr_svc = hostmgr_grpc.InternalHostServiceStub(
        channel=hm_channel)

    return client
Esempio n. 2
0
def with_private_stubs(client):
    rm_loc = urlparse(client.rm_url).netloc
    channel = PelotonClient.resmgr_channel_pool[rm_loc]
    client.resmgr_svc = resmgr_grpc.ResourceManagerServiceStub(
        channel=channel, )
    return client