Skip to content
This repository was archived by the owner on Jan 21, 2020. It is now read-only.

Conversation

chungers
Copy link
Contributor

@chungers chungers commented May 14, 2017

This PR makes a significant change in the CLI and will be part of the v0.5 release:

  • The instance, group, flavor commands have been made context-sensitive. Specifically, these are no longer subcommands on their own anymore. Instead, the CLI will look at all the plugins known and their interface types and generate appropriate commands (e.g. provision for an Instance plugin, a prepare for a flavor plugin). The name of the plugin becomes the subject / command, and the methods/actions (e.g. prepare, validate, etc.) become verbs and are subcommands.
  • This makes the CLI context-sensitive and reduces typing and error: all the commands are in context of what is actually possible: there's no point having a instance --name foo provision if the plugin foo isn't running. Instead, the command becomes foo provision and exists only when a plugin named foo of type Instance which supports provision exists.
  • This architecture makes the CLI very modular and dynamic. The commands are now in version specific packages (currently v1). This will allow evolution of the system into v2, v3,... without impacting the functionality of older versions.
  • This new system also introduced a refactor of the common services for CLI -- template processing, output JSON/YAML transcoding, etc. This makes the flags and behaviors across different command modules consistent.

@YujiOshima @ndegory

David Chung added 3 commits May 14, 2017 13:35
Signed-off-by: David Chung <david.chung@docker.com>
Signed-off-by: David Chung <david.chung@docker.com>
Signed-off-by: David Chung <david.chung@docker.com>
@chungers chungers changed the title [WIP] - Infrakit CLI should be dynamic and context-driven [WIP] - Dynamic and context-driven Infrakit CLI May 14, 2017
David Chung added 2 commits May 14, 2017 13:52
Signed-off-by: David Chung <david.chung@docker.com>
Signed-off-by: David Chung <david.chung@docker.com>
@codecov
Copy link

codecov bot commented May 14, 2017

Codecov Report

Merging #544 into master will decrease coverage by 0.04%.
The diff coverage is 20%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #544      +/-   ##
==========================================
- Coverage   56.66%   56.61%   -0.05%     
==========================================
  Files          57       57              
  Lines        3937     3944       +7     
==========================================
+ Hits         2231     2233       +2     
- Misses       1420     1425       +5     
  Partials      286      286
Impacted Files Coverage Δ
pkg/rpc/mux/reverse_proxy.go 38.21% <0%> (-0.25%) ⬇️
pkg/template/template.go 71.11% <0%> (-1.62%) ⬇️
pkg/cli/remote/remote.go 61.9% <40%> (+0.92%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 8f9f533...cb38145. Read the comment docs.

David Chung added 7 commits May 14, 2017 14:47
Signed-off-by: David Chung <david.chung@docker.com>
Signed-off-by: David Chung <david.chung@docker.com>
Signed-off-by: David Chung <david.chung@docker.com>
Signed-off-by: David Chung <david.chung@docker.com>
Signed-off-by: David Chung <david.chung@docker.com>
Signed-off-by: David Chung <david.chung@docker.com>
Signed-off-by: David Chung <david.chung@docker.com>
@chungers chungers changed the title [WIP] - Dynamic and context-driven Infrakit CLI Dynamic and context-driven Infrakit CLI May 16, 2017
Signed-off-by: David Chung <david.chung@docker.com>
@chungers chungers merged commit ce00509 into docker-archive:master May 16, 2017
chungers pushed a commit to chungers/infrakit that referenced this pull request Sep 30, 2017
chungers pushed a commit to chungers/infrakit that referenced this pull request Oct 1, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant