/* Create a connection to the OVSDB at db_path and create a dB cache * for this daemon. */ void classifierd_ovsdb_init(const char *db_path) { VLOG_DBG("%s: db_path = %s\n",__FUNCTION__,db_path); /* Initialize IDL through a new connection to the dB. */ idl = ovsdb_idl_create(db_path, &ovsrec_idl_class, false, true); idl_seqno = ovsdb_idl_get_seqno(idl); ovsdb_idl_set_lock(idl, "ops_classifierd"); /* Reject writes to columns which are not marked write-only using * ovsdb_idl_omit_alert(). */ ovsdb_idl_verify_write_only(idl); /* Choose some OVSDB tables and columns to cache. */ ovsdb_idl_add_table(idl, &ovsrec_table_system); ovsdb_idl_add_table(idl, &ovsrec_table_subsystem); /* Monitor the following columns, marking them read-only. */ ovsdb_idl_add_column(idl, &ovsrec_system_col_cur_cfg); /* Initialize ovsdb interfaces for ACL */ acl_ovsdb_init(idl); } /* classifierd_ovsdb_init */
static void usermgmt_init(const char *remote) { /* Create connection to OVSDB. */ idl = ovsdb_idl_create(remote, &ovsrec_idl_class, false, true); idl_seqno = ovsdb_idl_get_seqno(idl); ovsdb_idl_set_lock(idl, "ops_usermgmt"); /* Get notified when either of these change. */ ovsdb_idl_add_column(idl, &ovsrec_user_col_username); ovsdb_idl_add_column(idl, &ovsrec_user_col_password); }