Description of problem: A comma seperated list cannot be passed as a value in a key/value pair when using the --parameters option when creating a host. Version-Release number of selected component (if applicable): # hammer --version hammer (0.1.0) * hammer_cli_foreman (0.1.0) How reproducible: Always Steps to Reproduce: 1.Create a host and specify the --parameters option with a comma seperated list as a value in a keypair. 2. hammer host create --name "test.example.org" --build true --enabled true --managed true --environment-id 1 --ip "192.168.10.10" --mac "02:00:00:00:00:b0" --subnet-id 1 --architecture-id 1 --medium-id 8 --partition-table-id 11 --root-password changeme --parameters subscription_manager=true,subscription_manager_username=smuser,subscription_manager_password=smpass,subscription_manager_repos="rhel-server-rhscl-6-rpms, rhel-6-server-rpms, rhel-6-server-openstack-5.0-rpms",subscription_manager_pool=34gf434gf34f34f4442 3. Actual results: Could not create the host: Error: option '--parameters': value must be defined as a comma-separated list of key=value See: 'hammer host create --help' Expected results: Expect the host to be created with appropriate parameters Additional info: I am using the --parameters option to the "hammer host create" or "hammer host update" commands. This option takes a comma seperated list of key=value pairs. The issue I am running into is I need to specify a comma seperated list as a value. The above command fails telling me I must specify a comma seperated list of key/values: I can specify the same command without the subscription_manager_repos="..." key/value pair and it works fine. If I specify only the subscription_manager_repos="..." key and value, it fails. I suspect the hammer code is splitting the command at all commas and ignoring any quotes that indicate grouping.
Fix for this issue is included in rubygem-hammer-cli-0.1.3. The PR is https://github.com/theforeman/hammer-cli/pull/137. With the patch applied the format of the correct command would be (the list needs to be enclosed in the square brackets, no spaces): hammer host create --name "test.example.org" --build true --enabled true --managed true --environment-id 1 --ip "192.168.10.10" --mac "02:00:00:00:00:b0" --subnet-id 1 --architecture-id 1 --medium-id 8 --partition-table-id 11 --root-password changeme --parameters "subscription_manager=true,subscription_manager_username=smuser,subscription_manager_password=smpass,subscription_manager_repos=[rhel-server-rhscl-6-rpms,rhel-6-server-rpms,rhel-6-server-openstack-5.0-rpms],subscription_manager_pool=34gf434gf34f34f4442"
This bug was accidentally moved from POST to MODIFIED via an error in automation, please see mmccune with any questions
Closing list of bugs for RHEL OSP Installer since its support cycle has already ended [0]. If there is some bug closed by mistake, feel free to re-open. For new deployments, please, use RHOSP director (starting with version 7). -- Jaromir Coufal -- Sr. Product Manager -- Red Hat OpenStack Platform [0] https://access.redhat.com/support/policy/updates/openstack/platform