Skip to content

Commit 68b7f83

Browse files
committed
feat(assets): add GetGridpool RPC and associated request/response messages
- Introduced GetGridpool RPC to fetch details of a specific gridpool. - Added GetGridpoolRequest and GetGridpoolResponse messages for handling the request and response data. - Updated proto imports to include gridpool definitions. Signed-off-by: Richard Sandoval <rsandovaldev@gmail.com>
1 parent e71a4de commit 68b7f83

3 files changed

Lines changed: 28 additions & 10 deletions

File tree

RELEASE_NOTES.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,5 +12,4 @@ Rename service
1212
- Introduced new version
1313

1414
## New Features
15-
16-
n/a
15+
- Add the `GetGridpool` RPC to the `PlatformAssets` service.

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

Lines changed: 26 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,11 @@ syntax = "proto3";
1212

1313
package frequenz.api.assets.v1;
1414

15+
// protolint:disable:next MAX_LINE_LENGTH
16+
import "frequenz/api/common/v1alpha8/gridpool/gridpool.proto";
1517
// protolint:disable:next MAX_LINE_LENGTH
1618
import "frequenz/api/common/v1alpha8/microgrid/electrical_components/electrical_components.proto";
19+
// protolint:disable:next MAX_LINE_LENGTH
1720
import "frequenz/api/common/v1alpha8/microgrid/microgrid.proto";
1821

1922
// Service providing access to manage and retrieve information
@@ -25,13 +28,13 @@ service PlatformAssets {
2528
// Returns list of a electrical components for a specific microgrid.
2629
rpc ListMicrogridElectricalComponents(
2730
ListMicrogridElectricalComponentsRequest)
28-
returns (ListMicrogridElectricalComponentsResponse);
31+
returns (ListMicrogridElectricalComponentsResponse);
2932

3033
// Returns a list of the connections between electrical components for a
3134
// specific microgrid.
3235
rpc ListMicrogridElectricalComponentConnections(
33-
ListMicrogridElectricalComponentConnectionsRequest)
34-
returns (ListMicrogridElectricalComponentConnectionsResponse);
36+
ListMicrogridElectricalComponentConnectionsRequest)
37+
returns (ListMicrogridElectricalComponentConnectionsResponse);
3538
}
3639

3740
// GetMicrogridRequest is the input parameter for fetching details
@@ -53,7 +56,7 @@ message ListMicrogridElectricalComponentsRequest {
5356
// Mandatory field. The ID of the microgrid for which components
5457
// are to be listed.
5558
uint64 microgrid_id = 1;
56-
59+
5760
// Return components that have the specified IDs only.
5861
repeated uint64 component_ids = 2;
5962

@@ -66,7 +69,7 @@ message ListMicrogridElectricalComponentsRequest {
6669
message ListMicrogridElectricalComponentsResponse {
6770
// Unique microgrid identifier used in the request.
6871
uint64 microgrid_id = 1;
69-
72+
7073
// List of electrical components matching the filter criteria.
7174
repeated frequenz.api.common.v1alpha8.microgrid.electrical_components.
7275
ElectricalComponent components = 2;
@@ -112,8 +115,24 @@ message ListMicrogridElectricalComponentConnectionsRequest {
112115
message ListMicrogridElectricalComponentConnectionsResponse {
113116
// The ID of the microgrid for which connections are returned.
114117
uint64 microgrid_id = 1;
115-
118+
116119
// Contains the list of connections that match the filtering criteria.
117120
repeated frequenz.api.common.v1alpha8.microgrid.electrical_components.
118-
ElectricalComponentConnection connections =2;
121+
ElectricalComponentConnection connections = 2;
122+
}
123+
124+
// GetGridpoolRequest is the input parameter for fetching details
125+
// given a specific gridpool.
126+
message GetGridpoolRequest {
127+
// The unique identifier of the gridpool for which to fetch details.
128+
uint64 gridpool_id = 1;
129+
}
130+
131+
// GetGridpoolResponse is the response for fetching details
132+
// given a specific gridpool.
133+
message GetGridpoolResponse {
134+
// Details of the requested gridpool.
135+
frequenz.api.common.v1alpha8.gridpool.Gridpool gridpool = 1;
136+
// List of microgrids in the gridpool.
137+
repeated frequenz.api.common.v1alpha8.microgrid.Microgrid microgrids = 2;
119138
}

0 commit comments

Comments
 (0)