]> git.proxmox.com Git - mirror_ovs.git/blame - ovsdb/replication.h
Eliminate "whitelist" and "blacklist" terms.
[mirror_ovs.git] / ovsdb / replication.h
CommitLineData
ae671c5f
MC
1/*
2 * (c) Copyright 2016 Hewlett Packard Enterprise Development LP
3 * Copyright (c) 2009, 2010, 2012, 2013 Nicira, Inc.
4 *
5 * Licensed under the Apache License, Version 2.0 (the "License");
6 * you may not use this file except in compliance with the License.
7 * You may obtain a copy of the License at:
8 *
9 * http://www.apache.org/licenses/LICENSE-2.0
10 *
11 * Unless required by applicable law or agreed to in writing, software
12 * distributed under the License is distributed on an "AS IS" BASIS,
13 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 * See the License for the specific language governing permissions and
15 * limitations under the License.
16 */
17
18#ifndef REPLICATION_H
19#define REPLICATION_H 1
20
3109b4e1 21#include <stdbool.h>
6ab3dd96 22struct ovsdb;
ae671c5f 23
60e0cd04
AZ
24/* Replication module runs when OVSDB server runs in the backup mode.
25 *
26 * API Usage
27 *===========
28 *
29 * - replication_init() needs to be called whenever OVSDB server switches into
30 * the backup mode.
31 *
32 * - replication_add_local_db() should be called immediately after to add all
33 * known database that OVSDB server owns, one at a time.
34 *
35 * - replication_destroy() should be called when OVSDB server shutdown to
36 * reclaim resources.
37 *
38 * - replication_run(), replication_wait(), replication_is_alive() and
39 * replication_get_last_error() should be call within the main loop
40 * whenever OVSDB server runs in the backup mode.
41 *
8205fbc8
BP
42 * - set_excluded_tables(), get_excluded_tables(), disconnect_active_server()
43 * and replication_usage() are support functions used mainly by unixctl
44 * commands.
60e0cd04
AZ
45 */
46
e988b8ab
NS
47#define REPLICATION_DEFAULT_PROBE_INTERVAL 60000
48
05ac209a 49void replication_init(const char *sync_from, const char *exclude_tables,
e988b8ab 50 const struct uuid *server, int probe_interval);
6ab3dd96 51void replication_run(void);
8c945cec 52void replication_wait(void);
3109b4e1
AZ
53void replication_destroy(void);
54void replication_usage(void);
23c16b51
AZ
55void replication_add_local_db(const char *databse, struct ovsdb *db);
56bool replication_is_alive(void);
57int replication_get_last_error(void);
60e0cd04 58char *replication_status(void);
e988b8ab 59void replication_set_probe_interval(int);
3109b4e1 60
8205fbc8 61char *set_excluded_tables(const char *excluded, bool dryrun)
3109b4e1 62 OVS_WARN_UNUSED_RESULT;
8205fbc8 63char *get_excluded_tables(void) OVS_WARN_UNUSED_RESULT;
f53d7518 64void disconnect_active_server(void);
ae671c5f
MC
65
66#endif /* ovsdb/replication.h */