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

Add support for obtaining parameters for product subcommands from JSON file #96

Open
feil0n9wan9 opened this issue Dec 27, 2018 · 1 comment

Comments

@feil0n9wan9
Copy link
Member

It's not friendly for large number of parameters to be given in the form [--parameter1 value1 --parameter2 value2 ...]. Can we support parsing parameters for product subcommands from a JSON file?

For example:

aliyun ecs CreateDeploymentSet --cli-input-json create-deployment-set.json

and the JSON file looks like:

{
  "RegionId": "cn-hangzhou",
  "DeploymentSetName": "Default",
  "Description": "My default deployment set."
  "Domain":  "Default",
  "Granularity": "Host",
  "Strategy": "LooseDispersion"
}

Also, the command line parameters still take effect. The later same parameters override what appear before.

@LeChuckDE
Copy link

sudo yum install jq -y
man jq
Parse the JSON Config by yourselfe and call everything with an own script.
Easy as hell

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

No branches or pull requests

3 participants