Skip to content

Commit 1b3737d

Browse files
authored
feat(assets): add ListMicrogrids, GetGridpool RPC and associated request/response messages (#55)
This pull request introduces two new RPCs, `ListMicrogrids` and `GetGridpool`, to `PlatformAssetsService` API , enhancing the ability to retrieve microgrid and gridpool metadata. It also updates the release notes and synchronizes the common API submodule.
2 parents e71a4de + 6dc9804 commit 1b3737d

3 files changed

Lines changed: 43 additions & 7 deletions

File tree

RELEASE_NOTES.md

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,15 +2,19 @@
22

33
## Summary
44

5-
Documentation improvement
6-
Rename service
5+
This release adds `ListMicrogrids` and `GetGridpool` to
6+
`frequenz.api.platformassets.v1alpha1`.
77

88
## Upgrading
99

10-
- Improved ListMicrogridElectricalComponentConnectionsRequest header doc
11-
- Rename service
12-
- Introduced new version
10+
- `frequenz.api.platformassets.v1alpha1.PlatformAssetsService` now includes
11+
`ListMicrogrids`.
12+
- `frequenz.api.platformassets.v1alpha1` includes the `GetGridpool`
13+
request/response messages and RPC.
14+
- `frequenz.api.platformassets.v1alpha1` remains a separate versioned package
15+
with the renamed `PlatformAssetsService`.
1316

1417
## New Features
1518

16-
n/a
19+
- Add the `ListMicrogrids` RPC to the `PlatformAssetsService` service.
20+
- Add the `GetGridpool` RPC to the `PlatformAssetsService` service.

proto/frequenz/api/platformassets/v1alpha1/platformassets.proto

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,8 @@ syntax = "proto3";
1212

1313
package frequenz.api.platformassets.v1alpha1;
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";
1719
import "frequenz/api/common/v1alpha8/microgrid/microgrid.proto";
@@ -36,6 +38,12 @@ import "frequenz/api/common/v1alpha8/microgrid/microgrid.proto";
3638
// over TLS (HTTPS).
3739
//
3840
service PlatformAssetsService {
41+
// Returns metadata for all microgrids visible to the caller.
42+
rpc ListMicrogrids(ListMicrogridsRequest) returns (ListMicrogridsResponse);
43+
44+
// Returns metadata for a specific gridpool.
45+
rpc GetGridpool(GetGridpoolRequest) returns (GetGridpoolResponse);
46+
3947
// Returns metadata for a specific microgrid.
4048
rpc GetMicrogrid(GetMicrogridRequest) returns (GetMicrogridResponse);
4149

@@ -51,6 +59,30 @@ service PlatformAssetsService {
5159
returns (ListMicrogridElectricalComponentConnectionsResponse);
5260
}
5361

62+
// Request message for listing all visible microgrids.
63+
message ListMicrogridsRequest {
64+
}
65+
66+
// Response message containing all visible microgrids.
67+
message ListMicrogridsResponse {
68+
// Microgrids visible to the caller.
69+
repeated frequenz.api.common.v1alpha8.microgrid.Microgrid microgrids = 1;
70+
}
71+
72+
// Request message for retrieving metadata for a specific gridpool.
73+
message GetGridpoolRequest {
74+
// The unique identifier of the gridpool for which to fetch details.
75+
uint64 gridpool_id = 1;
76+
}
77+
78+
// Response message containing metadata for a specific gridpool.
79+
message GetGridpoolResponse {
80+
// Details of the requested gridpool.
81+
frequenz.api.common.v1alpha8.gridpool.Gridpool gridpool = 1;
82+
// Microgrids belonging to the requested gridpool.
83+
repeated frequenz.api.common.v1alpha8.microgrid.Microgrid microgrids = 2;
84+
}
85+
5486
// Filters for selecting electrical component connections in a microgrid.
5587
//
5688
// A connection must match all specified filter fields to be included in the

0 commit comments

Comments
 (0)