cloudstack-cloudmonkey icon indicating copy to clipboard operation
cloudstack-cloudmonkey copied to clipboard

Add new filter based on jmespath for 6.0 version

Open snifbr opened this issue 5 years ago • 1 comments

This add to cloudmonkey CLI the abilities to make a JMESPATH filter with following changes in version 6.0:

  • Add new argument 'query'.
  • Import jmespath module.

OBS: I used the same way to print response like "filter=", then all the output formats are compatible with this new feature. I hope this will be useful for a first version of this feature.

Some examples: Screenshot from 2019-07-18 17-34-46

Screenshot from 2019-07-18 17-36-34

snifbr avatar Jul 18 '19 20:07 snifbr

Thanks @snifbr I just saw the PR, I'll test it and get back to review the PR soon.

rohityadavcloud avatar Aug 13 '19 10:08 rohityadavcloud

@rohityadavcloud < is there some hope to see some of this land in the main? Or has it been supplanted by #114?

romain-dartigues avatar Nov 07 '22 08:11 romain-dartigues

@romain-dartigues I think the pipe to jq has always worked from terminal and now with #114 in interpreter mode so I think there's no urgency for this. I don't maintain/manage cmk these days, perhaps our RM for the next release cc @borisstoyanov can advise.

rohityadavcloud avatar Nov 07 '22 11:11 rohityadavcloud

@snifbr could you please resolve the conflicts

borisstoyanov avatar Feb 09 '23 06:02 borisstoyanov

Thanks @snifbr for your PR and hard work. As I've noted on https://github.com/apache/cloudstack-cloudmonkey/issues/45 I think we would prefer that cmk continues to be a simple CLI and other tools such as jq can be used to add in additional filtering mechanisms. Any additional such features are better be supported in the cloudstack mgmt server API.

rohityadavcloud avatar Apr 03 '23 05:04 rohityadavcloud