summaryrefslogtreecommitdiff
path: root/ovsdb/replication.h
diff options
context:
space:
mode:
authorAndy Zhou <azhou@ovn.org>2016-08-16 14:56:19 -0700
committerAndy Zhou <azhou@ovn.org>2016-08-31 15:09:41 -0700
commit3109b4e127facbed2bb8dea38efdb008d2c0c5c1 (patch)
tree26c28cf862233f7c60f70d0a505e5094354f4004 /ovsdb/replication.h
parent8be420879d4fcfdb2a8aa68bb47b7c7c1cf83844 (diff)
downloadopenvswitch-3109b4e127facbed2bb8dea38efdb008d2c0c5c1.tar.gz
ovsdb: Add blacklist_tables
Currently, 'sync-exclude-tables' command line options are simply stored in a string. Change the implementation to store it in an shash instead to improve modularity. One additional benefit of this change is that errors can be detected and reported to user earlier. Adde a 'dryrun' option to set_blacklist_tables() API to make this feature available to the command line option parsing and unixctl command parsing. Signed-off-by: Andy Zhou <azhou@ovn.org> Acked-by: Ben Pfaff <blp@ovn.org>
Diffstat (limited to 'ovsdb/replication.h')
-rw-r--r--ovsdb/replication.h13
1 files changed, 9 insertions, 4 deletions
diff --git a/ovsdb/replication.h b/ovsdb/replication.h
index d80afb2fa..cc791997e 100644
--- a/ovsdb/replication.h
+++ b/ovsdb/replication.h
@@ -18,6 +18,7 @@
#ifndef REPLICATION_H
#define REPLICATION_H 1
+#include <stdbool.h>
#include "openvswitch/shash.h"
struct db {
@@ -30,16 +31,20 @@ struct db {
struct ovsdb_txn *txn;
};
+/* Functions to be called from the main loop. */
void replication_init(void);
void replication_run(struct shash *dbs);
void replication_wait(void);
+void replication_destroy(void);
+void replication_usage(void);
+
+/* Unixctl APIs */
void set_active_ovsdb_server(const char *remote_server);
const char *get_active_ovsdb_server(void);
-void set_tables_blacklist(const char *blacklist);
-struct sset get_tables_blacklist(void);
+char *set_blacklist_tables(const char *blacklist, bool dryrun)
+ OVS_WARN_UNUSED_RESULT;
+char *get_blacklist_tables(void) OVS_WARN_UNUSED_RESULT;
void disconnect_active_server(void);
-void destroy_active_server(void);
const struct db *find_db(const struct shash *all_dbs, const char *db_name);
-void replication_usage(void);
#endif /* ovsdb/replication.h */