Ejemplo n.º 1
0
def acmeAgentCli(agentCliBuilder, acmeAgentPort, tdirWithClientPoolTxns):
    agent = create_acme(port=acmeAgentPort,
                        base_dir_path=tdirWithClientPoolTxns,
                        wallet=buildAcmeWallet())
    cliBuild = agentCliBuilder(name='Acme-Agent', agent=agent)
    cli = cliBuild('Acme-Agent')
    yield from cli
Ejemplo n.º 2
0
    return agent


async def bootstrap_acme(agent):
    await bootstrap_schema(agent,
                           'Job-Certificate',
                           'Job-Certificate',
                           '0.2',
                           primes["prime1"][0],
                           primes["prime1"][1])

    await bootstrap_schema(agent,
                           'Job-Application',
                           'Job-Application',
                           '0.2',
                           primes["prime2"][0],
                           primes["prime2"][1])


if __name__ == "__main__":
    args = RunnableAgent.parser_cmd_args()
    name = 'Acme Corp'
    port = args.port
    if port is None:
        port = 6666
    with_cli = args.withcli
    agent = create_acme(name=name, wallet=buildAcmeWallet(),
                        base_dir_path=None, port=port)
    RunnableAgent.run_agent(agent, bootstrap=bootstrap_acme(agent),
                            with_cli=with_cli)
Ejemplo n.º 3
0
def acmeWallet():
    return buildAcmeWallet()
Ejemplo n.º 4
0
def acmeWallet():
    return buildAcmeWallet()
Ejemplo n.º 5
0

async def bootstrap_acme(agent):
    await bootstrap_schema(agent, 'Job-Certificate', 'Job-Certificate', '0.2',
                           primes["prime1"][0], primes["prime1"][1])

    await bootstrap_schema(agent, 'Job-Application', 'Job-Application', '0.2',
                           primes["prime2"][0], primes["prime2"][1])


if __name__ == "__main__":
    args = RunnableAgent.parser_cmd_args()
    name = 'Acme Corp'
    port = args.port
    if port is None:
        port = 6666
    network = args.network or 'sandbox'
    with_cli = args.withcli

    config = getConfig()
    base_dir_path = os.path.expanduser(
        os.path.join(config.CLI_NETWORK_DIR, network))

    agent = create_acme(name=name,
                        wallet=buildAcmeWallet(),
                        base_dir_path=base_dir_path,
                        port=port)
    RunnableAgent.run_agent(agent,
                            bootstrap=bootstrap_acme(agent),
                            with_cli=with_cli)
Ejemplo n.º 6
0
                           primes["prime1"][0],
                           primes["prime1"][1])

    await bootstrap_schema(agent,
                           'Job-Application',
                           'Job-Application',
                           '0.2',
                           primes["prime2"][0],
                           primes["prime2"][1])


if __name__ == "__main__":
    args = RunnableAgent.parser_cmd_args()
    name = 'Acme Corp'
    port = args.port
    if port is None:
        port = 6666
    network = args.network or 'sandbox'
    with_cli = args.withcli

    config = getConfig()
    base_dir_path = os.path.expanduser(
        os.path.join(
            config.CLI_NETWORK_DIR, network
        ))

    agent = create_acme(name=name, wallet=buildAcmeWallet(),
                        base_dir_path=base_dir_path, port=port)
    RunnableAgent.run_agent(agent, bootstrap=bootstrap_acme(agent),
                            with_cli=with_cli)
Ejemplo n.º 7
0
def acmeAgentCli(agentCliBuilder, acmeAgentPort, tdirWithClientPoolTxns):
    agent = create_acme(port=acmeAgentPort, base_dir_path=tdirWithClientPoolTxns,
                        wallet=buildAcmeWallet())
    cliBuild = agentCliBuilder(name='Acme-Agent', agent=agent)
    cli = cliBuild('Acme-Agent')
    yield from cli