Actions
Bug #26120
closedInsufficient parsing capabilities of complex list type options
Difficulty:
Triaged:
No
Pull request:
Team Backlog:
Description
It is not possible to parse complex parameters of type list. E.g.
hammer os create --architectures amd64,i386 --description "Windows 7 EN (2019-01)" --major 6 --minor 1.7601 --family Windows --partition-tables Empty --password-hash SHA256 --provisioning-templates winpe_clone,winpe_finish,winpe_pxelinux_boot_clone,winpe_unattend_template --name Windows7EM2019-01 --os-parameters-attributes="test=1,other=2" Error: ApipieBindings::InvalidArgumentTypesError: operatingsystem[os_parameters_attributes][0] - Hash was expected, operatingsystem[os_parameters_attributes][1] - Hash was expected
The field is defined as a list of hashes in the API
param :os_parameters_attributes, Array, :desc => N_("Array of parameters") do  param :name, String, :desc => N_("Name of the parameter"), :required => true param :value, String, :desc => N_("Parameter value"), :required => true end
Actions