Beispiel #1
0
def hello_client(container, actor_id='anonymous', org_id='no-ooi', text='mytext 123'):

   # client = ProcessRPCClient(node=container.node, name="hello", iface=IHelloService,  process=FakeProcess())

    try:
        client = HelloServiceProcessClient(node=container.node, process=FakeProcess())

        ret = client.hello(text, headers={'ion-actor-id': actor_id, 'ion-org-id': org_id})

        print "Returned: " + str(ret)
    except Exception, e:
        print "client.hello() failed: " + e.message
Beispiel #2
0
def hello_client(container, actor_id='anonymous', text='mytext 123'):

    try:
        client = HelloServiceProcessClient(node=container.node,
                                           process=FakeProcess())

        actor_headers = container.governance_controller.build_actor_header(
            actor_id)
        ret = client.hello(text)
        print "Returned: " + str(ret)

        ret = client.hello('second message text')
        print "Returned: " + str(ret)

    except Exception, e:
        print "client.hello() failed: " + e.message
Beispiel #3
0
def hello_noop(container,
               actor_id='anonymous',
               org_id='no-ooi',
               text='mytext 123'):

    try:
        client = HelloServiceProcessClient(node=container.node,
                                           process=FakeProcess())

        ret = client.noop(text,
                          headers={
                              'ion-actor-id': actor_id,
                              'ion-org-id': org_id
                          })

    except Exception, e:
        print "client.hello() failed: " + e.message