frequenz-floss / frequenz-api-microgrid

gRPC+protobuf specification and Python bindings for the Frequenz Microgrid API
https://frequenz-floss.github.io/frequenz-api-microgrid/
MIT License
6 stars 6 forks source link

Fix terminology in the `ListConnections` RPC #262

Open llucax opened 2 months ago

llucax commented 2 months ago

What's needed?

The ListConnections RPC has a request message that talks about start and end, which is a bit confusing, as it sounds like it might be referring to ranges of IDs, which is very weird.

https://github.com/frequenz-floss/frequenz-api-microgrid/blob/8f4e4f897d0082140c8eb8da9dd70c8efdb1aa92/proto/frequenz/api/microgrid/v1/microgrid.proto#L360-L370

The ComponentConnection message in api-common was renamed to use source and destination instead of start and end, so the microgrid API should probably adopt those terms too.

Proposed solution

// Request parameters for the RPC `ListConnections`.
// Contains filtering parameters for listing connections.
message ListConnectionsRequest {
  // Only return connections that originate from the specified component ID(s):
  // if empty, connections with any `source_component_id` will be returned
  repeated uint64 source_component_ids = 1;

  // Only return connections that terminate at the specified component ID(s):
  // if empty, connections with any `destination_component_id` will be returned
  repeated uint64 destination_component_ids = 2;
}

Use cases

No response

Alternatives and workarounds

No response

Additional context

No response