-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathBUILD
More file actions
287 lines (272 loc) · 11.3 KB
/
BUILD
File metadata and controls
287 lines (272 loc) · 11.3 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
load("@bazel_skylib//:bzl_library.bzl", "bzl_library")
load("//ecclesia/build_defs:embed.bzl", "cc_data_library")
load("//third_party/protobuf/bazel:proto_library.bzl", "proto_library")
licenses(["notice"])
cc_library(
name = "query_engine_cc",
srcs = ["query_engine.cc"],
hdrs = ["query_engine.h"],
visibility = ["//visibility:public"],
deps = [
":factory",
":query_rules_cc_proto",
"//ecclesia/lib/redfish:interface",
"//ecclesia/lib/redfish:topology",
"//ecclesia/lib/redfish/dellicius/engine/internal:interface",
"//ecclesia/lib/redfish/dellicius/engine/internal:passkey",
"//ecclesia/lib/redfish/dellicius/engine/internal:query_planner",
"//ecclesia/lib/redfish/dellicius/query:query_cc_proto",
"//ecclesia/lib/redfish/dellicius/query:query_errors_cc_proto",
"//ecclesia/lib/redfish/dellicius/query:query_result_cc_proto",
"//ecclesia/lib/redfish/dellicius/query:query_variables_cc_proto",
"//ecclesia/lib/redfish/dellicius/utils:id_assigner",
"//ecclesia/lib/redfish/dellicius/utils:parsers",
"//ecclesia/lib/redfish/redpath/definitions/query_engine:query_engine_features",
"//ecclesia/lib/redfish/redpath/definitions/query_engine:query_engine_features_cc_proto",
"//ecclesia/lib/redfish/redpath/definitions/query_engine:query_spec",
"//ecclesia/lib/redfish/redpath/definitions/query_engine:redpath_subscription",
"//ecclesia/lib/redfish/redpath/definitions/query_result",
"//ecclesia/lib/redfish/redpath/definitions/query_result:converter",
"//ecclesia/lib/redfish/redpath/definitions/query_result:query_result_cc_proto",
"//ecclesia/lib/redfish/redpath/engine:normalizer",
"//ecclesia/lib/redfish/redpath/engine:query_planner",
"//ecclesia/lib/redfish/redpath/engine:query_planner_impl",
"//ecclesia/lib/redfish/transport:cache",
"//ecclesia/lib/redfish/transport:http_redfish_intf",
"//ecclesia/lib/redfish/transport:interface",
"//ecclesia/lib/redfish/transport:metrical_transport",
"//ecclesia/lib/redfish/transport:transport_metrics_cc_proto",
"//ecclesia/lib/status:macros",
"//ecclesia/lib/time:clock",
"//ecclesia/lib/time:proto",
"@com_google_absl//absl/base:core_headers",
"@com_google_absl//absl/container:flat_hash_map",
"@com_google_absl//absl/functional:any_invocable",
"@com_google_absl//absl/functional:function_ref",
"@com_google_absl//absl/log",
"@com_google_absl//absl/log:check",
"@com_google_absl//absl/log:die_if_null",
"@com_google_absl//absl/status",
"@com_google_absl//absl/status:statusor",
"@com_google_absl//absl/strings",
"@com_google_absl//absl/time",
"@com_google_absl//absl/types:span",
],
)
cc_library(
name = "file_backed_query_engine",
srcs = ["file_backed_query_engine.cc"],
hdrs = ["file_backed_query_engine.h"],
visibility = ["//visibility:public"],
deps = [
":query_engine_cc",
"//ecclesia/lib/apifs",
"//ecclesia/lib/redfish:interface",
"//ecclesia/lib/redfish/dellicius/engine/internal:passkey",
"//ecclesia/lib/redfish/dellicius/query:query_cc_proto",
"//ecclesia/lib/redfish/dellicius/query:query_result_cc_proto",
"//ecclesia/lib/redfish/redpath/definitions/query_result",
"//ecclesia/lib/redfish/redpath/definitions/query_result:query_result_cc_proto",
"//ecclesia/lib/status:macros",
"@com_google_absl//absl/base:core_headers",
"@com_google_absl//absl/container:flat_hash_map",
"@com_google_absl//absl/memory",
"@com_google_absl//absl/status",
"@com_google_absl//absl/status:statusor",
"@com_google_absl//absl/strings",
"@com_google_absl//absl/synchronization",
"@com_google_absl//absl/types:span",
"@com_google_protobuf//:protobuf",
],
)
cc_test(
name = "file_backed_query_engine_test",
srcs = ["file_backed_query_engine_test.cc"],
deps = [
":file_backed_query_engine",
"//ecclesia/lib/apifs",
"//ecclesia/lib/file:test_filesystem",
"//ecclesia/lib/protobuf:parse",
"//ecclesia/lib/redfish/redpath/definitions/query_result",
"//ecclesia/lib/redfish/redpath/definitions/query_result:query_result_cc_proto",
"//ecclesia/lib/status:test_macros",
"//ecclesia/lib/testing:proto",
"//ecclesia/lib/testing:status",
"@com_google_absl//absl/strings",
"@com_google_absl//absl/strings:str_format",
"@com_google_googletest//:gtest_main",
"@com_google_protobuf//:protobuf",
],
)
cc_library(
name = "mock_query_engine",
testonly = 1,
hdrs = ["mock_query_engine.h"],
visibility = ["//visibility:public"],
deps = [
":query_engine_cc",
"//ecclesia/lib/redfish:interface",
"//ecclesia/lib/redfish/dellicius/engine/internal:passkey",
"//ecclesia/lib/redfish/redpath/definitions/query_result",
"@com_google_absl//absl/status:statusor",
"@com_google_absl//absl/strings",
"@com_google_absl//absl/types:span",
"@com_google_googletest//:gtest",
],
)
cc_library(
name = "fake_query_engine",
testonly = 1,
hdrs = ["fake_query_engine.h"],
visibility = ["//visibility:public"],
deps = [
":query_engine_cc",
"//ecclesia/lib/redfish:interface",
"//ecclesia/lib/redfish/dellicius/engine/internal:passkey",
"//ecclesia/lib/redfish/dellicius/query:query_result_cc_proto",
"//ecclesia/lib/redfish/dellicius/utils:id_assigner",
"//ecclesia/lib/redfish/redpath/definitions/passkey:annotation_passkey",
"//ecclesia/lib/redfish/redpath/definitions/query_engine:query_engine_features",
"//ecclesia/lib/redfish/redpath/definitions/query_engine:query_spec",
"//ecclesia/lib/redfish/redpath/definitions/query_result",
"//ecclesia/lib/redfish/redpath/definitions/query_router:query_router_spec_cc_proto",
"//ecclesia/lib/redfish/testing:fake_redfish_server",
"//ecclesia/lib/redfish/transport:cache",
"//ecclesia/lib/redfish/transport:interface",
"//ecclesia/lib/status:macros",
"@com_google_absl//absl/memory",
"@com_google_absl//absl/status",
"@com_google_absl//absl/status:statusor",
"@com_google_absl//absl/strings",
"@com_google_absl//absl/time",
"@com_google_absl//absl/types:span",
],
)
proto_library(
name = "query_rules_proto",
srcs = ["query_rules.proto"],
visibility = ["//visibility:public"],
)
cc_proto_library(
name = "query_rules_cc_proto",
visibility = ["//visibility:public"],
deps = [":query_rules_proto"],
)
filegroup(
name = "sample_query_rules_in",
srcs = [
"sample_query_rules.textproto",
],
visibility = ["//visibility:public"],
)
bzl_library(
name = "redpath_query_bzl",
srcs = ["redpath_query.bzl"],
visibility = ["//visibility:private"],
deps = [
"//ecclesia/build_defs:embed",
"//ecclesia/build_defs:proto",
],
)
cc_library(
name = "factory",
hdrs = ["factory.h"],
visibility = [
"//ecclesia/lib/redfish:__subpackages__",
"//platforms/ecclesia/lib/redfish/redpath/engine/tests:__subpackages__",
"//platforms/redfish/lib/query_engine:__subpackages__",
],
deps = [
"//ecclesia/lib/redfish:node_topology",
"//ecclesia/lib/redfish/dellicius/engine/internal:interface",
"//ecclesia/lib/redfish/dellicius/engine/internal:normalizer",
"//ecclesia/lib/redfish/dellicius/utils:id_assigner",
"@com_google_absl//absl/memory",
],
)
cc_data_library(
name = "test_queries_embedded",
cc_namespace = "ecclesia",
data = [
"//ecclesia/lib/redfish/dellicius/query/samples:sample_queries_in",
],
var_name = "kDelliciusQueries",
)
cc_data_library(
name = "test_malformed_queries_embedded",
cc_namespace = "ecclesia",
data = [
"//ecclesia/lib/redfish/dellicius/query/samples:sample_malformed_queries_in",
],
var_name = "kMalformedDelliciusQueries",
)
cc_data_library(
name = "test_query_rules_embedded",
cc_namespace = "ecclesia",
data = [
":sample_query_rules_in",
],
var_name = "kQueryRules",
)
cc_test(
name = "query_engine_test",
srcs = ["query_engine_test.cc"],
data = [
"//ecclesia/lib/redfish/dellicius/query/samples:sample_queries_out",
"//ecclesia/redfish_mockups/features/component_integrity:mockup.shar",
"//ecclesia/redfish_mockups/indus_hmb_cn:mockup.shar",
"//ecclesia/redfish_mockups/indus_hmb_shim:mockup.shar",
],
deps = [
":fake_query_engine",
":query_engine_cc",
":query_rules_cc_proto",
":test_queries_embedded",
":test_query_rules_embedded",
"//ecclesia/lib/file:cc_embed_interface",
"//ecclesia/lib/file:path",
"//ecclesia/lib/file:test_filesystem",
"//ecclesia/lib/http:cred_cc_proto",
"//ecclesia/lib/http:curl_client",
"//ecclesia/lib/network:testing",
"//ecclesia/lib/protobuf:parse",
"//ecclesia/lib/redfish:interface",
"//ecclesia/lib/redfish/dellicius/engine/internal:passkey",
"//ecclesia/lib/redfish/dellicius/query:query_cc_proto",
"//ecclesia/lib/redfish/dellicius/query:query_result_cc_proto",
"//ecclesia/lib/redfish/dellicius/query:query_variables_cc_proto",
"//ecclesia/lib/redfish/dellicius/utils:id_assigner_devpath",
"//ecclesia/lib/redfish/proto:redfish_v1_cc_proto",
"//ecclesia/lib/redfish/redpath/definitions/query_engine:query_engine_features",
"//ecclesia/lib/redfish/redpath/definitions/query_engine:query_spec",
"//ecclesia/lib/redfish/redpath/definitions/query_engine:redpath_subscription",
"//ecclesia/lib/redfish/redpath/definitions/query_result",
"//ecclesia/lib/redfish/redpath/definitions/query_result:query_result_cc_proto",
"//ecclesia/lib/redfish/redpath/definitions/query_router:query_router_spec_cc_proto",
"//ecclesia/lib/redfish/testing:fake_redfish_server",
"//ecclesia/lib/redfish/testing:grpc_dynamic_mockup_server",
"//ecclesia/lib/redfish/testing:json_mockup",
"//ecclesia/lib/redfish/transport:grpc",
"//ecclesia/lib/redfish/transport:grpc_tls_options",
"//ecclesia/lib/redfish/transport:http",
"//ecclesia/lib/redfish/transport:interface",
"//ecclesia/lib/redfish/transport:transport_metrics_cc_proto",
"//ecclesia/lib/status:test_macros",
"//ecclesia/lib/testing:proto",
"//ecclesia/lib/testing:status",
"//ecclesia/lib/thread",
"//ecclesia/lib/time:clock",
"//ecclesia/lib/time:clock_fake",
"@com_github_grpc_grpc//:grpc++",
"@com_google_absl//absl/log:check",
"@com_google_absl//absl/status",
"@com_google_absl//absl/status:statusor",
"@com_google_absl//absl/strings",
"@com_google_absl//absl/strings:str_format",
"@com_google_absl//absl/synchronization",
"@com_google_absl//absl/time",
"@com_google_absl//absl/types:span",
"@com_google_googletest//:gtest_main",
"@com_google_tensorflow_serving//tensorflow_serving/util/net_http/public:shared_files",
],
)