diff --git a/thinkit/BUILD.bazel b/thinkit/BUILD.bazel index cbb277c47..0023c859c 100644 --- a/thinkit/BUILD.bazel +++ b/thinkit/BUILD.bazel @@ -38,6 +38,7 @@ cc_library( hdrs = ["switch.h"], deps = [ "@com_github_gnmi//proto/gnmi:gnmi_cc_grpc_proto", + "@com_github_gnoi//cert:cert_cc_grpc_proto", "@com_github_gnoi//diag:diag_cc_grpc_proto", "@com_github_gnoi//system:system_cc_grpc_proto", "@com_github_grpc_grpc//:grpc++", @@ -54,6 +55,7 @@ cc_library( deps = [ ":switch", "@com_github_gnmi//proto/gnmi:gnmi_cc_grpc_proto", + "@com_github_gnoi//cert:cert_cc_grpc_proto", "@com_github_gnoi//diag:diag_cc_grpc_proto", "@com_github_gnoi//system:system_cc_grpc_proto", "@com_github_p4lang_p4runtime//:p4runtime_cc_grpc", diff --git a/thinkit/mock_switch.h b/thinkit/mock_switch.h index 7092c2168..98b28cc0d 100644 --- a/thinkit/mock_switch.h +++ b/thinkit/mock_switch.h @@ -19,6 +19,7 @@ #include "absl/status/statusor.h" #include "absl/strings/string_view.h" +#include "cert/cert.grpc.pb.h" #include "diag/diag.grpc.pb.h" #include "gmock/gmock.h" #include "p4/v1/p4runtime.grpc.pb.h" @@ -41,6 +42,10 @@ class MockSwitch : public Switch { CreateGnoiSystemStub, (), (override)); MOCK_METHOD(absl::StatusOr>, CreateGnoiDiagStub, (), (override)); + MOCK_METHOD( + absl::StatusOr< + std::unique_ptr>, + CreateGnoiCertificateStub, (), (override)); }; } // namespace thinkit diff --git a/thinkit/switch.h b/thinkit/switch.h index 60f42c652..a9f70a388 100644 --- a/thinkit/switch.h +++ b/thinkit/switch.h @@ -20,6 +20,7 @@ #include "absl/status/statusor.h" #include "absl/strings/string_view.h" +#include "cert/cert.grpc.pb.h" #include "diag/diag.grpc.pb.h" #include "p4/v1/p4runtime.grpc.pb.h" #include "proto/gnmi/gnmi.grpc.pb.h" @@ -55,6 +56,11 @@ class Switch { // Creates and returns a stub to the gNOI Diag service. virtual absl::StatusOr> CreateGnoiDiagStub() = 0; + + // Creates and returns a stub to the gNOI Certificate service. + virtual absl::StatusOr< + std::unique_ptr> + CreateGnoiCertificateStub() = 0; }; } // namespace thinkit