Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Agentctl output format #1581

Merged
merged 1 commit into from
Dec 9, 2019
Merged

Conversation

ondrej-fabry
Copy link
Member

Signed-off-by: Ondrej Fabry ofabry@cisco.com

Signed-off-by: Ondrej Fabry <ofabry@cisco.com>
@ondrej-fabry ondrej-fabry added 🔧 enhancement 🚧 WIP do not merge! work in progress! labels Dec 6, 2019
@ondrej-fabry ondrej-fabry changed the title Support custom format for model inspect Agentctl enhancements Dec 6, 2019
@codecov
Copy link

codecov bot commented Dec 6, 2019

Codecov Report

Merging #1581 into dev will increase coverage by 3.49%.
The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff             @@
##              dev    #1581      +/-   ##
==========================================
+ Coverage   50.61%   54.11%   +3.49%     
==========================================
  Files         673      370     -303     
  Lines       79720    31150   -48570     
==========================================
- Hits        40350    16856   -23494     
+ Misses      36811    12937   -23874     
+ Partials     2559     1357    -1202
Flag Coverage Δ
#e2e ?
#unittests 54.11% <ø> (ø) ⬆️

@@ -168,8 +167,7 @@ func newModelInspectCommand(cli agentcli.Cli) *cobra.Command {
return runModelInspect(cli, opts)
},
}
// TODO: add support for custom formatting instead of json
//cmd.Flags().StringVar(&opts.Format, "format", "", "Format for the output")
cmd.Flags().StringVarP(&opts.Format, "format", "f", "", "Format for the output")
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why not use "json" as default value here (instead of empty string)?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

To make the default output type configurable globally in the future for all commands. Config for agentctl might define default as yaml then empty string will default to YAML format instead of JSON.

@ondrej-fabry ondrej-fabry changed the title Agentctl enhancements feat: Agentctl output format Dec 9, 2019
@ondrej-fabry ondrej-fabry removed the 🚧 WIP do not merge! work in progress! label Dec 9, 2019
@ondrej-fabry ondrej-fabry merged commit 6a1e571 into ligato:dev Dec 9, 2019
@ondrej-fabry ondrej-fabry deleted the agentctl branch December 9, 2019 10:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants