Motr  M0
spiel_ut_common.h
Go to the documentation of this file.
1 /* -*- C -*- */
2 /*
3  * Copyright (c) 2013-2020 Seagate Technology LLC and/or its Affiliates
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  * For any questions about this software or licensing,
18  * please email opensource@seagate.com or cortx-questions@seagate.com.
19  *
20  */
21 
22 #pragma once
23 
24 #ifndef __MOTR_SPIEL_UT_SPIEL_UT_COMMON_H__
25 #define __MOTR_SPIEL_UT_SPIEL_UT_COMMON_H__
26 
27 #include "conf/ut/common.h" /* SERVER_ENDPOINT, CLIENT_ENDPOINT_ADDR */
28 #include "net/net.h" /* m0_net_domain */
29 #include "net/buffer_pool.h" /* m0_net_buffer_pool */
30 #include "reqh/reqh.h" /* m0_reqh */
31 #include "rpc/rpc_machine.h" /* m0_rpc_machine */
32 #include "rpc/rpclib.h" /* m0_rpc_server_ctx */
33 #include "rm/rm_service.h" /* m0_rms_type */
34 
35 struct m0_spiel;
36 
37 extern const char *confd_addr[];
38 extern const char *rm_addr;
39 
48  struct m0_reqh sur_reqh;
51 };
52 
53 M0_INTERNAL int m0_spiel__ut_reqh_init(struct m0_spiel_ut_reqh *spl_reqh,
54  const char *ep_addr);
55 
56 M0_INTERNAL void m0_spiel__ut_reqh_fini(struct m0_spiel_ut_reqh *spl_reqh);
57 
58 M0_INTERNAL int m0_spiel__ut_rpc_server_start(struct m0_rpc_server_ctx *rpc_srv,
59  const char *confd_ep,
60  const char *confdb_path);
61 
62 M0_INTERNAL void m0_spiel__ut_rpc_server_stop(
63  struct m0_rpc_server_ctx *rpc_srv);
64 
65 M0_INTERNAL void m0_spiel__ut_init(struct m0_spiel *spiel,
66  const char *confd_path,
67  bool cmd_iface);
68 
69 M0_INTERNAL void m0_spiel__ut_fini(struct m0_spiel *spiel,
70  bool cmd_iface);
71 
72 #endif /* __MOTR_SPIEL_UT_SPIEL_UT_COMMON_H__ */
73 /*
74  * Local variables:
75  * c-indentation-style: "K&R"
76  * c-basic-offset: 8
77  * tab-width: 8
78  * fill-column: 80
79  * scroll-step: 1
80  * End:
81  */
static const char * ep_addr
Definition: rpc_machine.c:35
M0_INTERNAL void m0_spiel__ut_init(struct m0_spiel *spiel, const char *confd_path, bool cmd_iface)
struct m0_rpc_server_ctx sur_confd_srv
const char * rm_addr
M0_INTERNAL int m0_spiel__ut_rpc_server_start(struct m0_rpc_server_ctx *rpc_srv, const char *confd_ep, const char *confdb_path)
M0_INTERNAL void m0_spiel__ut_reqh_fini(struct m0_spiel_ut_reqh *spl_reqh)
M0_INTERNAL void m0_spiel__ut_fini(struct m0_spiel *spiel, bool cmd_iface)
struct m0_reqh sur_reqh
M0_INTERNAL int m0_spiel__ut_reqh_init(struct m0_spiel_ut_reqh *spl_reqh, const char *ep_addr)
struct m0_net_domain sur_net_dom
Definition: reqh.h:94
const char * confd_addr[]
static struct m0_spiel_ut_reqh * spl_reqh
Definition: spiel_ut.c:31
struct m0_rpc_machine sur_rmachine
struct m0_spiel spiel
Definition: spiel_conf_ut.c:42
M0_INTERNAL void m0_spiel__ut_rpc_server_stop(struct m0_rpc_server_ctx *rpc_srv)
struct m0_net_buffer_pool sur_buf_pool