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

Enhance handling of defaults #7

Open
bruceadams opened this issue Jan 22, 2017 · 0 comments
Open

Enhance handling of defaults #7

bruceadams opened this issue Jan 22, 2017 · 0 comments

Comments

@bruceadams
Copy link
Owner

Chatting with some people about wdscli as it stands helped get me thinking about how it might be made easier to use.

I'm fairly pleased with the current, stateless, implementation, but it does mean that credentials need to be supplied for every command. Also, for most commands, several service calls need to be made to establish context for whatever the command is going to do. That is: figuring out an environment_id, often a collection_id and sometimes a configuration_id. These service calls take time and can fail.

I can imagine wdscli having an option to write current defaults out to a file, then subsequent commands could use the defaults.

Suppose defaults are written to a file in the current directory. By using the current directory for defaults, a user can have different defaults for different contexts. Let's name that file wdscli-defaults.json wdscli could write out to that file: on request and probably whenever a resource is created. For example: creating a collection could set the defaults to: the current service credentials, the environment_id where the collection was created and the collection_id of that newly created collection. Then commands like show-environment, show-collection and add-document do not need any selection arguments.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant