Skip to content

Commit 79a4606

Browse files
Zuulopenstack-gerrit
authored andcommitted
Merge "add group by time help to CLI"
2 parents e912feb + 98c1330 commit 79a4606

1 file changed

Lines changed: 12 additions & 2 deletions

File tree

cloudkittyclient/v2/summary_cli.py

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,10 +35,20 @@ def filter_(elem):
3535
help='Maximal number of elements')
3636
parser.add_argument('-g', '--groupby', type=str, action='append',
3737
help='Attribute to group the summary by. Can be '
38-
'specified several times')
38+
'specified several times. One can also group '
39+
'by different time options such as: "time-d" '
40+
'to group by day of the year, "time-w" to '
41+
'group by week of the year, "time-m" to '
42+
'group by month, and "time-y" to group data '
43+
'by year.')
3944
parser.add_argument('--filter', type=filter_, action='append',
4045
help="Optional filter, in 'key:value' format. Can "
41-
"be specified several times.")
46+
"be specified several times. It is also "
47+
"possible to filter data using the group by "
48+
"values. However, one needs to group by as "
49+
"well; for instance, if one wants to filter "
50+
"by resource id (id), then we need to group "
51+
"by id via the option '-g id'.")
4252
parser.add_argument('-b', '--begin', type=timeutils.parse_isotime,
4353
help="Start of the period to query, in iso8601 "
4454
"format. Example: 2019-05-01T00:00:00Z.")

0 commit comments

Comments
 (0)