17 #ifndef __TESTS_MOCK_CSI_PLUGIN_HPP__ 18 #define __TESTS_MOCK_CSI_PLUGIN_HPP__ 23 #include <gmock/gmock.h> 25 #include <grpcpp/grpcpp.h> 57 const csi::v0::GetPluginInfoRequest*,
58 csi::v0::GetPluginInfoResponse*));
62 const csi::v0::GetPluginCapabilitiesRequest*,
63 csi::v0::GetPluginCapabilitiesResponse*));
67 const csi::v0::ProbeRequest*,
68 csi::v0::ProbeResponse*));
72 const csi::v0::CreateVolumeRequest*,
73 csi::v0::CreateVolumeResponse*));
77 const csi::v0::DeleteVolumeRequest*,
78 csi::v0::DeleteVolumeResponse*));
82 const csi::v0::ControllerPublishVolumeRequest*,
83 csi::v0::ControllerPublishVolumeResponse*));
87 const csi::v0::ControllerUnpublishVolumeRequest*,
88 csi::v0::ControllerUnpublishVolumeResponse*));
92 const csi::v0::ValidateVolumeCapabilitiesRequest*,
93 csi::v0::ValidateVolumeCapabilitiesResponse*));
97 const csi::v0::ListVolumesRequest*,
98 csi::v0::ListVolumesResponse*));
101 grpc::ServerContext*,
102 const csi::v0::GetCapacityRequest*,
103 csi::v0::GetCapacityResponse*));
106 grpc::ServerContext*,
107 const csi::v0::ControllerGetCapabilitiesRequest*,
108 csi::v0::ControllerGetCapabilitiesResponse*));
111 grpc::ServerContext*,
112 const csi::v0::NodeStageVolumeRequest*,
113 csi::v0::NodeStageVolumeResponse*));
116 grpc::ServerContext*,
117 const csi::v0::NodeUnstageVolumeRequest*,
118 csi::v0::NodeUnstageVolumeResponse*));
121 grpc::ServerContext*,
122 const csi::v0::NodePublishVolumeRequest*,
123 csi::v0::NodePublishVolumeResponse*));
126 grpc::ServerContext*,
127 const csi::v0::NodeUnpublishVolumeRequest*,
128 csi::v0::NodeUnpublishVolumeResponse*));
131 grpc::ServerContext*,
132 const csi::v0::NodeGetIdRequest*,
133 csi::v0::NodeGetIdResponse*));
136 grpc::ServerContext*,
137 const csi::v0::NodeGetCapabilitiesRequest*,
138 csi::v0::NodeGetCapabilitiesResponse*));
143 grpc::ServerContext*,
144 const csi::v1::GetPluginInfoRequest*,
145 csi::v1::GetPluginInfoResponse*));
148 grpc::ServerContext*,
149 const csi::v1::GetPluginCapabilitiesRequest*,
150 csi::v1::GetPluginCapabilitiesResponse*));
153 grpc::ServerContext*,
154 const csi::v1::ProbeRequest*,
155 csi::v1::ProbeResponse*));
158 grpc::ServerContext*,
159 const csi::v1::CreateVolumeRequest*,
160 csi::v1::CreateVolumeResponse*));
163 grpc::ServerContext*,
164 const csi::v1::DeleteVolumeRequest*,
165 csi::v1::DeleteVolumeResponse*));
168 grpc::ServerContext*,
169 const csi::v1::ControllerPublishVolumeRequest*,
170 csi::v1::ControllerPublishVolumeResponse*));
173 grpc::ServerContext*,
174 const csi::v1::ControllerUnpublishVolumeRequest*,
175 csi::v1::ControllerUnpublishVolumeResponse*));
178 grpc::ServerContext*,
179 const csi::v1::ValidateVolumeCapabilitiesRequest*,
180 csi::v1::ValidateVolumeCapabilitiesResponse*));
183 grpc::ServerContext*,
184 const csi::v1::ListVolumesRequest*,
185 csi::v1::ListVolumesResponse*));
188 grpc::ServerContext*,
189 const csi::v1::GetCapacityRequest*,
190 csi::v1::GetCapacityResponse*));
193 grpc::ServerContext*,
194 const csi::v1::ControllerGetCapabilitiesRequest*,
195 csi::v1::ControllerGetCapabilitiesResponse*));
198 grpc::ServerContext*,
199 const csi::v1::CreateSnapshotRequest*,
200 csi::v1::CreateSnapshotResponse*));
203 grpc::ServerContext*,
204 const csi::v1::DeleteSnapshotRequest*,
205 csi::v1::DeleteSnapshotResponse*));
208 grpc::ServerContext*,
209 const csi::v1::ListSnapshotsRequest*,
210 csi::v1::ListSnapshotsResponse*));
213 grpc::ServerContext*,
214 const csi::v1::ControllerExpandVolumeRequest*,
215 csi::v1::ControllerExpandVolumeResponse*));
218 grpc::ServerContext*,
219 const csi::v1::NodeStageVolumeRequest*,
220 csi::v1::NodeStageVolumeResponse*));
223 grpc::ServerContext*,
224 const csi::v1::NodeUnstageVolumeRequest*,
225 csi::v1::NodeUnstageVolumeResponse*));
228 grpc::ServerContext*,
229 const csi::v1::NodePublishVolumeRequest*,
230 csi::v1::NodePublishVolumeResponse*));
233 grpc::ServerContext*,
234 const csi::v1::NodeUnpublishVolumeRequest*,
235 csi::v1::NodeUnpublishVolumeResponse*));
238 grpc::ServerContext*,
239 const csi::v1::NodeGetVolumeStatsRequest*,
240 csi::v1::NodeGetVolumeStatsResponse*));
243 grpc::ServerContext*,
244 const csi::v1::NodeExpandVolumeRequest*,
245 csi::v1::NodeExpandVolumeResponse*));
248 grpc::ServerContext*,
249 const csi::v1::NodeGetCapabilitiesRequest*,
250 csi::v1::NodeGetCapabilitiesResponse*));
253 grpc::ServerContext*,
254 const csi::v1::NodeGetInfoRequest*,
255 csi::v1::NodeGetInfoResponse*));
263 std::unique_ptr<grpc::Server> server;
270 #endif // __TESTS_MOCK_CSI_PLUGIN_HPP__
Try< process::grpc::client::Connection > startup(const Option< std::string > &address=None())
Try< Address > address(int_fd s)
Returns the Address with the assigned ip and assigned port.
Definition: network.hpp:79
Try< Nothing > shutdown()
Definition: attributes.hpp:24
Definition: mock_csi_plugin.hpp:42
CSIPluginContainerInfo::Service Service
Definition: service_manager.hpp:38
MOCK_METHOD3(GetPluginInfo, grpc::Status(grpc::ServerContext *, const csi::v0::GetPluginInfoRequest *, csi::v0::GetPluginInfoResponse *))