rpc-jet.py 文件源码

python
阅读 34 收藏 0 点赞 0 评论 0

项目:vmx-docker-lwaftr 作者: Juniper 项目源码 文件源码
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
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号