def main(argv):
"""
Used to fetch the snabb instance information from the JET app.
:param argv: Arguments for the command
:return: Dictionary of instances state information
"""
try:
# log device initialized successfully
print "Device initialized for the configuration updates"
#Start a thread to do the polling
t = Thread(target=poll_snabb)
t.daemon = True
t.start()
opw = OpServer()
server.register_instance(opw)
print ("Starting the reactor")
server.serve_forever()
except Exception as e:
# log device initialization failed
print("JET app exiting due to exception: %s" %str(e.message))
os._exit(0)
return
评论列表
文章目录