Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.Sign up
Fixes #27868 - Add option to support host's param type #448
Or we could remove
Note: if both
@shiramax, thanks for review! :)
I'm adding a new option because of parsing the values provided for that option(s).
For example option
hammer host update --parameters "par1=val1,par2=val2"
hammer host update --typed-parameters "name=par1\,value=val1\,parameter_type=string\,hidden_value=false,name=par2\,value=val2\,parameter_type=string\,hidden_value=false"
Please notice that we cannot pass the parameter_type for
Thanks for the explanation @ofedoren, I think this input of the typed-parameter, can be a bit confusing: "name=par1,value=val1,parameter_type=string,hidden_value=false,name=par2,value=val2,parameter_type=string,hidden_value=false"
I wonder if we could to do a different format for this, for example, maybe we could do this like we do the --interfaces or --volume. it means --typed-parameters should be a parameter we could speficy multiple times. also we will need to generate help for the parameters, and finally you should change the parameters that send to the server.
I quite like the solution that @shiramax suggested. That would be probably easier to input manually for the users. For the solution provided in this PR I can see benefits for automation where the parameters are added in scripts especially in JSON format.
It seems these two ways are not conflicting and there is chance to add also the multivalue variant @shiramax suggested. I assume the name of the option would be --typed-parameter (singular) so there is no conflict. It may be confusing if it is not consistent though.