def getWampAgent(self, config):
'''This method gets and sets the WAMP Board attributes from the conf file.
'''
try:
self.wamp_config = config['iotronic']['wamp']['main-agent']
LOG.info('WAMP Agent settings:')
except Exception:
if (self.status is None) | (self.status == "registered"):
self.wamp_config = \
config['iotronic']['wamp']['registration-agent']
LOG.info('Registration Agent settings:')
else:
LOG.error(
"WAMP Agent configuration is wrong... "
"please check settings.json WAMP configuration... Bye!"
)
os._exit(1)
LOG.info(' - agent: ' + str(self.agent))
LOG.info(' - url: ' + str(self.wamp_config['url']))
LOG.info(' - realm: ' + str(self.wamp_config['realm']))
# LOG.debug("- conf:\n" + json.dumps(self.wamp_config, indent=4))
评论列表
文章目录