def get_opsidl(): extschema = restparser.parseSchema(settings.get('ext_schema')) ovsschema = settings.get('ovs_schema') ovsremote = settings.get('ovs_remote') opsidl = ops.dc.register(extschema, ovsschema, ovsremote) init_seqno = opsidl.change_seqno while True: opsidl.run() if init_seqno != opsidl.change_seqno: break poller = ovs.poller.Poller() opsidl.wait(poller) poller.block() return (extschema, opsidl)
def get_opsidl(): extschema = restparser.parseSchema(settings.get('ext_schema')) ovsschema = settings.get('ovs_schema') ovsremote = settings.get('ovs_remote') opsidl = ops.dc.register(extschema, ovsschema, ovsremote) init_seqno = opsidl.change_seqno while True: opsidl.run() if init_seqno != opsidl.change_seqno: break poller = ovs.poller.Poller() opsidl.wait(poller) poller.block() return (extschema, opsidl)
def connect(): ovsschema = settings.get('cfg_db_schema') ovsremote = settings.get('ovs_remote') schema_helper = SchemaHelper(ovsschema) schema_helper.register_all() idl = Idl(ovsremote, schema_helper) change_seqno = idl.change_seqno while True: idl.run() if change_seqno != idl.change_seqno: break poller = ovs.poller.Poller() idl.wait(poller) poller.block() return idl