Skip to content

Commit f11851e

Browse files
committed
refactor(api): rename list methods to streaming methods in assets.proto
Updated the RPC methods in assets.proto to use streaming for electrical components and connections, enhancing consistency with other APIs. Adjusted corresponding request and response message names in the proto file. Updated release notes to reflect these breaking changes.
1 parent 676e2c5 commit f11851e

File tree

2 files changed

+15
-18
lines changed

2 files changed

+15
-18
lines changed

RELEASE_NOTES.md

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,8 @@
22

33
## Summary
44

5+
## Breaking Changes
56

6-
## Upgrading
7-
8-
- Update the `frequenz-api-common` dependency
9-
10-
## New Features
7+
- Changed list methods to streaming methods to align with the rest of the APIs
118

129

proto/frequenz/api/assets/v1/assets.proto

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -25,14 +25,14 @@ service PlatformAssets {
2525
rpc GetMicrogrid(GetMicrogridRequest) returns (GetMicrogridResponse);
2626

2727
// Returns list of a electrical components for a specific microgrid.
28-
rpc ListMicrogridElectricalComponents(ListMicrogridElectricalComponentsRequest)
29-
returns (ListMicrogridElectricalComponentsResponse);
28+
rpc ReceiveMicrogridElectricalComponents(ReceiveMicrogridElectricalComponentsRequest)
29+
returns (stream ReceiveMicrogridElectricalComponentsResponse);
3030

3131
// Returns a list of the connections between electrical components for a
3232
// specific microgrid.
33-
rpc ListMicrogridElectricalComponentConnections(
34-
ListMicrogridElectricalComponentConnectionsRequest
35-
) returns (ListMicrogridElectricalComponentConnectionsResponse);
33+
rpc ReceiveMicrogridElectricalComponentConnections(
34+
ReceiveMicrogridElectricalComponentConnectionsRequest
35+
) returns (stream ReceiveMicrogridElectricalComponentConnectionsResponse);
3636
}
3737

3838
// GetMicrogridRequest is the input parameter for fetching details
@@ -49,8 +49,8 @@ message GetMicrogridResponse {
4949
frequenz.api.common.v1alpha8.microgrid.Microgrid microgrid = 1;
5050
}
5151

52-
// Request parameters for the RPC `ListMicrogridElectricalComponents`.
53-
message ListMicrogridElectricalComponentsRequest {
52+
// Request parameters for the RPC `ReceiveMicrogridElectricalComponents`.
53+
message ReceiveMicrogridElectricalComponentsRequest {
5454
// Mandatory field. The ID of the microgrid for which components
5555
// are to be listed.
5656
uint64 microgrid_id = 1;
@@ -63,15 +63,15 @@ message ListMicrogridElectricalComponentsRequest {
6363
}
6464

6565
// A message containing a list of electrical components.
66-
message ListMicrogridElectricalComponentsResponse {
66+
message ReceiveMicrogridElectricalComponentsResponse {
6767
// Unique microgrid identifier used in the request.
6868
uint64 microgrid_id = 1;
6969

7070
// List of electrical components matching the filter criteria.
7171
repeated frequenz.api.common.v1alpha8.microgrid.electrical_components.ElectricalComponent components = 2;
7272
}
7373

74-
// ListMicrogridElectricalComponentConnectionsRequest is used for filtering and listing
74+
// ReceiveMicrogridElectricalComponentConnectionsRequest is used for filtering and listing
7575
// the electrical connections between components in a specific microgrid.
7676
// These connections can be used to construct a component graph of the
7777
// microgrid.
@@ -94,7 +94,7 @@ message ListMicrogridElectricalComponentsResponse {
9494
// destination_component_id. If these fields are left empty, connections with
9595
// any source or destination will be returned.
9696
//
97-
message ListMicrogridElectricalComponentConnectionsRequest {
97+
message ReceiveMicrogridElectricalComponentConnectionsRequest {
9898
// Mandatory field. The ID of the microgrid
9999
// for which connections are to be listed.
100100
uint64 microgrid_id = 1;
@@ -108,10 +108,10 @@ message ListMicrogridElectricalComponentConnectionsRequest {
108108
repeated uint64 destination_component_ids = 3;
109109
}
110110

111-
// ListMicrogridElectricalComponentConnectionsResponse holds the list of electrical
111+
// ReceiveMicrogridElectricalComponentConnectionsResponse holds the list of electrical
112112
// connections that match the filter criteria specified in the
113-
// ListMicrogridElectricalComponentConnectionsRequest.
114-
message ListMicrogridElectricalComponentConnectionsResponse {
113+
// ReceiveMicrogridElectricalComponentConnectionsRequest.
114+
message ReceiveMicrogridElectricalComponentConnectionsResponse {
115115
// The ID of the microgrid for which connections are returned.
116116
uint64 microgrid_id = 1;
117117

0 commit comments

Comments
 (0)