]> git.proxmox.com Git - mirror_ovs.git/blame - ovsdb/replication.h
ovn-nbctl: Fix the ovn-nbctl test "LBs - daemon" which fails during rpm build
[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 *
42 * - set_blacklist_tables(), get_blacklist_tables(),
43 * disconnect_active_server() and replication_usage() are support functions
44 * used mainly by uinxctl commands.
45 */
46
05ac209a
AZ
47void replication_init(const char *sync_from, const char *exclude_tables,
48 const struct uuid *server);
6ab3dd96 49void replication_run(void);
8c945cec 50void replication_wait(void);
3109b4e1
AZ
51void replication_destroy(void);
52void replication_usage(void);
23c16b51
AZ
53void replication_add_local_db(const char *databse, struct ovsdb *db);
54bool replication_is_alive(void);
55int replication_get_last_error(void);
60e0cd04 56char *replication_status(void);
3109b4e1 57
3109b4e1
AZ
58char *set_blacklist_tables(const char *blacklist, bool dryrun)
59 OVS_WARN_UNUSED_RESULT;
60char *get_blacklist_tables(void) OVS_WARN_UNUSED_RESULT;
f53d7518 61void disconnect_active_server(void);
ae671c5f
MC
62
63#endif /* ovsdb/replication.h */