Project

General

Profile

Bug #22552

Bootdisk provision method does not appear

Added by Lukas Zapletal over 1 year ago. Updated 11 months ago.

Status:
Closed
Priority:
Normal
Category:
Hosts
Difficulty:
trivial
Triaged:
Bugzilla link:
Team Backlog:
Fixed in Releases:
Found in Releases:

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.


Related issues

Blocked by Foreman - Bug #22557: provision_method in host create API should list possible values in param typeClosed2018-02-12

Associated revisions

Revision 7152d51b (diff)
Added by Tomas Strachota over 1 year ago

Fixes #22552 - generate --provision-method from apidoc

History

#1 Updated by Tomáš Strachota over 1 year ago

  • Difficulty set to trivial
  • Category changed from Hammer core to Hosts

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.

#2 Updated by Tomáš Strachota over 1 year ago

  • Blocked by Bug #22557: provision_method in host create API should list possible values in param type added

#3 Updated by The Foreman Bot over 1 year ago

  • Assignee set to Tomáš Strachota
  • Status changed from New to Ready For Testing
  • Pull request https://github.com/theforeman/hammer-cli-foreman/pull/354 added

#4 Updated by Lukas Zapletal over 1 year ago

  • Bugzilla link set to 1544498

#5 Updated by Martin Bacovsky over 1 year ago

  • Legacy Backlogs Release (now unused) set to 290

#6 Updated by Anonymous over 1 year ago

  • % Done changed from 0 to 100
  • Status changed from Ready For Testing to Closed

#7 Updated by Peter Ondrejka about 1 year 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:

  1. 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?

#8 Updated by Tomáš Strachota about 1 year ago

Lukas, do you have any clue why the change didn't take effect?

#9 Updated by Martin Bacovsky about 1 year ago

Peter Ondrejka wrote:

  1. 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 `

#10 Updated by Tomáš Strachota about 1 year ago

Yes, we checked that. The new value doesn't appear even in the api docs.

Also available in: Atom PDF