Motr  M0
schema.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 #ifndef __MOTR_CONF_SCHEMA_H__
24 #define __MOTR_CONF_SCHEMA_H__
25 
26 #include "lib/types.h" /* bool */
27 #include "xcode/xcode.h"
28 
77 
80 } M0_XCA_ENUM;
81 
87  M0_CFG_FLAG_REAL = 1 << 0,
88 
91 
94 } M0_XCA_ENUM;
95 
96 
103 
106 
109 
112 
115 } M0_XCA_ENUM;
116 
129 } M0_XCA_ENUM;
130 
131 #define M0_CFG_SDEV_INTERFACE_TYPE_IS_VALID(dtype) \
132  (0 < (dtype) && (dtype) < M0_CFG_DEVICE_INTERFACE_NR)
133 
139 
142 
145 
148 
150 } M0_XCA_ENUM;
151 #define M0_CFG_SDEV_MEDIA_TYPE_IS_VALID(dtype) \
152  (0 < (dtype) && (dtype) < M0_CFG_DEVICE_MEDIA_NR)
153 
154 enum {
157 };
158 
169 #define M0_CONF_SERVICE_TYPES \
170  X_CST(M0_CST__UNUSED) \
171  X_CST(M0_CST_MDS) \
172  X_CST(M0_CST_IOS) \
173  X_CST(M0_CST_CONFD) \
174  X_CST(M0_CST_RMS) \
175  X_CST(M0_CST_STATS) \
176  X_CST(M0_CST_HA) \
177  X_CST(M0_CST_SSS) \
178  X_CST(M0_CST_SNS_REP) \
179  X_CST(M0_CST_SNS_REB) \
180  X_CST(M0_CST_ADDB2) \
181  X_CST(M0_CST_CAS) \
182  X_CST(M0_CST_DIX_REP) \
183  X_CST(M0_CST_DIX_REB) \
184  X_CST(M0_CST_DS1) \
185  X_CST(M0_CST_DS2) \
186  X_CST(M0_CST_FIS) \
187  X_CST(M0_CST_FDMI) \
188  X_CST(M0_CST_BE) \
189  X_CST(M0_CST_M0T1FS) \
190  X_CST(M0_CST_CLIENT) \
191  X_CST(M0_CST_ISCS) \
192  X_CST(M0_CST_DTM0)
194 enum m0_conf_service_type {
195 #define X_CST(name) name,
197 #undef X_CST
199 } M0_XCA_ENUM;
200 
201 M0_INTERNAL const char *
203 
205 {
206  return 0 < t && t < M0_CST_NR;
207 }
208 
210 #endif /* __MOTR_CONF_SCHEMA_H__ */
m0_conf_service_type
Definition: schema.h:194
m0_cfg_state_bit
Definition: schema.h:74
static bool m0_conf_service_type_is_valid(enum m0_conf_service_type t)
Definition: schema.h:204
#define M0_CONF_SERVICE_TYPES
Definition: schema.h:169
M0_INTERNAL const char * m0_conf_service_type2str(enum m0_conf_service_type type)
Definition: service.c:169
m0_cfg_flag_bit
Definition: schema.h:85
static struct m0_thread t[8]
Definition: service_ut.c:1230
m0_cfg_storage_device_media_type
Definition: schema.h:136
enum m0_cfg_state_bit M0_XCA_ENUM
m0_cfg_storage_device_interface_type
Definition: schema.h:120
m0_cfg_nic_type
Definition: schema.h:100
int type
Definition: dir.c:1031