From 9b7e38cc194108d93059e67520aa47f3fd937e2e Mon Sep 17 00:00:00 2001 From: cwasicki <126617870+cwasicki@users.noreply.github.com> Date: Tue, 12 Nov 2024 21:13:54 +0100 Subject: [PATCH] Support requesting no metrics in CLI tools The service will soon support requesting states without a metric. This adds support for this feature in the CLI tool. --- RELEASE_NOTES.md | 1 + src/frequenz/client/reporting/__main__.py | 5 +++-- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/RELEASE_NOTES.md b/RELEASE_NOTES.md index b2cb7c2..59c1c12 100644 --- a/RELEASE_NOTES.md +++ b/RELEASE_NOTES.md @@ -10,6 +10,7 @@ ## New Features +* The CLI tool supports requesting component states without metrics. ## Bug Fixes diff --git a/src/frequenz/client/reporting/__main__.py b/src/frequenz/client/reporting/__main__.py index 296858f..f922ddd 100644 --- a/src/frequenz/client/reporting/__main__.py +++ b/src/frequenz/client/reporting/__main__.py @@ -29,10 +29,11 @@ def main() -> None: parser.add_argument( "--metrics", type=str, - nargs="+", + nargs="*", choices=[e.name for e in Metric], help="List of metrics to process", - required=True, + required=False, + default=[], ) parser.add_argument( "--states",