Skip to content

Commit 36828b4

Browse files
rahkrcopybara-github
authored andcommitted
Remove definitions of synchronous CreateSubscription API
PiperOrigin-RevId: 615186290
1 parent 5551413 commit 36828b4

3 files changed

Lines changed: 0 additions & 24 deletions

File tree

ecclesia/lib/redfish/event/server/subscription.h

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -270,11 +270,6 @@ class SubscriptionBackend {
270270
virtual absl::Status Query(absl::string_view url,
271271
QueryCallback query_callback) = 0;
272272

273-
// Subscribes to Redfish events for the given URL and returns the list of
274-
// event source IDs
275-
virtual absl::StatusOr<std::vector<EventSourceId>> Subscribe(
276-
absl::string_view url) = 0;
277-
278273
// Subscribes to Redfish events for the given URL and invokes the callback
279274
// post subscription.
280275
virtual absl::Status Subscribe(absl::string_view url,
@@ -290,10 +285,6 @@ class SubscriptionService {
290285
// created subscription.
291286
// Note: the implementation must guarantee that `on_event_callback` will only
292287
// be called once at a time. No parallel call will be allowed!
293-
virtual absl::StatusOr<SubscriptionId> CreateSubscription(
294-
const nlohmann::json &request,
295-
std::function<void(const nlohmann::json &)> &&on_event_callback) = 0;
296-
297288
virtual void CreateSubscription(
298289
const nlohmann::json &request,
299290
std::function<void(const absl::StatusOr<SubscriptionId> &)>

ecclesia/lib/redfish/event/server/subscription_impl.cc

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -331,14 +331,6 @@ class SubscriptionServiceImpl
331331
}
332332
}
333333

334-
ABSL_DEPRECATED("Use asynchrounous version of CreateSubscription instead.")
335-
absl::StatusOr<SubscriptionId> CreateSubscription(
336-
const nlohmann::json &request,
337-
std::function<void(const nlohmann::json &)> &&on_event_callback)
338-
override {
339-
return absl::UnimplementedError("CreateSubscription:: Deprecated!");
340-
}
341-
342334
void DeleteSubscription(const SubscriptionId& subscription_id) override {
343335
subscription_store_->DeleteSubscription(subscription_id);
344336
}

ecclesia/lib/redfish/event/server/subscription_mock.h

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -52,8 +52,6 @@ class SubscriptionStoreMock : public SubscriptionStore {
5252

5353
class SubscriptionBackendMock : public SubscriptionBackend {
5454
public:
55-
MOCK_METHOD(absl::StatusOr<std::vector<EventSourceId>>, Subscribe,
56-
(absl::string_view url), (override));
5755
MOCK_METHOD(absl::Status, Subscribe,
5856
(absl::string_view url, SubscribeCallback subscribe_callback),
5957
(override));
@@ -72,11 +70,6 @@ class EventStoreMock : public EventStore {
7270

7371
class SubscriptionServiceMock : public SubscriptionService {
7472
public:
75-
MOCK_METHOD(absl::StatusOr<SubscriptionId>, CreateSubscription,
76-
(const nlohmann::json &request,
77-
std::function<void(const nlohmann::json &)> &&on_event_callback),
78-
(override));
79-
8073
MOCK_METHOD(void, CreateSubscription,
8174
(const nlohmann::json &request,
8275
std::function<void(const absl::StatusOr<SubscriptionId> &)>

0 commit comments

Comments
 (0)