Skip to content

Commit 7c8f726

Browse files
authored
Allow specifying multiple component categories (#187)
It was decided for this again XD
2 parents af44fdf + 93ce1a0 commit 7c8f726

File tree

2 files changed

+13
-7
lines changed

2 files changed

+13
-7
lines changed

RELEASE_NOTES.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ In this release, we have made some changes to the API to improve the user experi
1111
* `id` was renamed to `dispatch_id` in all requests.
1212
* Naming conventions were updated to match API projects.
1313
* The possibility to update the `dry_run` and `type` fields was removed.
14+
* The ComponentSelector now can contain multiple component categories.
1415

1516
## New Features
1617

proto/frequenz/api/dispatch/v1/dispatch.proto

Lines changed: 12 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -257,27 +257,32 @@ message DispatchFilter {
257257
}
258258

259259
// Parameter for controlling which components a dispatch applies to
260-
// either a set of component IDs, or all components belonging to a category.
261-
//
262-
// When specifying a set of IDs, all IDs should have the same component
263-
// category, mixing components from different categories in one dispatch
264-
// message is not supported.
260+
// either a set of component IDs, or a set of component categories.
265261
message ComponentSelector {
266262
oneof selector {
267263
// Set of component IDs
268264
ComponentIDs component_ids = 1;
269265

270-
// Component category
271-
frequenz.api.common.v1.microgrid.components.ComponentCategory component_category = 2;
266+
// Component categories
267+
ComponentCategories component_category = 2;
272268
}
273269
}
274270

275271
// Wrapper for controlling dispatches with a set of component IDs
272+
// Required as we can't use `repeated` directly in a `oneof`
276273
message ComponentIDs {
277274
// Set of component IDs
278275
repeated uint64 component_ids = 1;
279276
}
280277

278+
// Wrapper for controlling dispatches with a set of component categories
279+
// Required as we can't use `repeated` directly in a `oneof`
280+
message ComponentCategories {
281+
// Set of component categories
282+
repeated frequenz.api.common.v1.microgrid.components.ComponentCategory component_categories = 1;
283+
}
284+
285+
281286
// Ruleset governing when and how a dispatch should re-occur.
282287
//
283288
// Timezone Note: Timestamps are in UTC. It is the responsibility of each microgrid to translate UTC

0 commit comments

Comments
 (0)