...
 
Commits (2)
......@@ -11,6 +11,15 @@ kind on interface with the implementation under test (IUT), it will
enable the creation of a private network between all devices in the
session.
OS requirements
---------------
This component has been tested with MacOs and Ubuntu (v15.04 or +).
Windows OS (yet) are not supported.
For Ubuntu 17.04 or +, you need to install iproute2:
`apt-get -y -qq install iproute2`
Installation
------------
......
......@@ -70,15 +70,23 @@ class TunConsumer(BaseConsumer):
def _publish_agent_tun_started_message(self):
assert self.tun is not None
def errback(exc, interval):
self.log.error('Error: %r', exc, exc_info=1)
self.log.info('Retry in %s seconds.', interval)
# get config from tun
conf_params = self.tun.get_tun_configuration()
conf_params.update({'name': self.name})
# publish message in event bus
msg = messages.MsgAgentTunStarted(**conf_params)
logging.info('Publishing %s' % repr(msg))
self.log.debug('Publishing %s' % repr(msg))
producer = Producer(self.connection, serializer='json')
producer.publish(
publish = self.connection.ensure(producer, producer.publish, errback=errback, max_retries=3)
publish(
body=msg.to_dict(),
exchange=self.exchange,
routing_key='fromAgent.{0}.ip.tun.started'.format(self.name)
......
......@@ -8,7 +8,7 @@ from setuptools import setup, find_packages
MAJOR = 0
MINOR = 1
PATCH = 9
PATCH = 10
VERSION = '{}.{}.{}'.format(MAJOR, MINOR, PATCH)
name = 'ioppytest-agent'
......