Bug #22552
closedBootdisk provision method does not appear
Description
When Foreman is started with Bootdisk plugin which registers new provision method called "bootdisk" it does not show up in hammer host create --help
command:
--provision-method METHOD Possible value(s): 'build', 'image'
The method string is properly registered in engine registry, but from here my hammer expertise ends, so filing an issue for that.
Updated by Tomáš Strachota over 6 years ago
- Category changed from Hammer core to Hosts
- Difficulty set to trivial
Hammer blocks generating --provision-method from apidocs and hard-codes it. We should remove the hard-coded option here:
https://github.com/theforeman/hammer-cli-foreman/blob/170e7d8aac5b7d05d76ce0379cfde4ff2de38f65/lib/hammer_cli_foreman/hosts/common_update_options.rb#L46-L47
and delete :provision_method from the option filter:
https://github.com/theforeman/hammer-cli-foreman/blob/170e7d8aac5b7d05d76ce0379cfde4ff2de38f65/lib/hammer_cli_foreman/hosts/common_update_options.rb#L51
That will make hammer use the description string from apidoc.
We'll also need to update the param in apidoc on server side and move available values from the description to param's type.
Updated by Tomáš Strachota over 6 years ago
- Blocked by Bug #22557: provision_method in host create API should list possible values in param type added
Updated by The Foreman Bot over 6 years ago
- Status changed from New to Ready For Testing
- Assignee set to Tomáš Strachota
- Pull request https://github.com/theforeman/hammer-cli-foreman/pull/354 added
Updated by Martin Bacovsky over 6 years ago
- Translation missing: en.field_release set to 290
Updated by Anonymous over 6 years ago
- Status changed from Ready For Testing to Closed
- % Done changed from 0 to 100
Applied in changeset hammer-cli-foreman|7152d51b31299e23a9ea985138f103640d62eca7.
Updated by Peter Ondrejka over 6 years ago
Tested with upstream build, with following packages installed:
foreman-1.18.0-0.develop.201803191746git60d7dd7.el7.noarch
tfm-rubygem-hammer_cli-0.13.pre.develop-1.201803191125git4b10ad6.el7.noarch
tfm-rubygem-hammer_cli_foreman-0.13.pre.develop-1.201803130920git87fdd31.el7.noarch
tfm-rubygem-hammer_cli_foreman_bootdisk-0.1.3-6.el7.noarch
tfm-rubygem-foreman_bootdisk-11.0.0-1.fm1_18.el7.noarch
and with enabled bootdisk via `foreman-installer --enable-foreman-plugin-bootdisk` I'm still not seeing the required update in cli or in apidoc:
- hammer host create -h | grep provision
--provision-method PROVISION_METHOD The method used to provision the host.
Possible value(s): 'build', 'image'
Discussed with tstrachota, it seems both above commits got into the build as expected. Could there be something missing on the foreman_bootdisk side?
Updated by Tomáš Strachota over 6 years ago
Lukas, do you have any clue why the change didn't take effect?
Updated by Martin Bacovsky over 6 years ago
Peter Ondrejka wrote:
- hammer host create -h | grep provision
--provision-method PROVISION_METHOD The method used to provision the host.
Possible value(s): 'build', 'image'
Peter, just for a case, did you refresh the apidoc cache on a client side? `hammer -r host create -h `
Updated by Tomáš Strachota over 6 years ago
Yes, we checked that. The new value doesn't appear even in the api docs.