5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
|
# File 'lib/hammer_cli_foreman/hosts/common_update_options.rb', line 5
def self.included(base)
base.option "--owner", "OWNER_LOGIN", _("Login of the owner"),
:attribute_name => :option_user_login
base.option "--owner-id", "OWNER_ID", _("ID of the owner"),
:attribute_name => :option_user_id
base.option ["--root-password", "--root-pass"], "ROOT_PW",
_("Required if host is managed and value is not inherited from host group or default password in settings"),
:deprecated => { '--root-pass' => _("Use --root-password instead") }
base.option "--ask-root-password", "ASK_ROOT_PW", " ",
:format => HammerCLI::Options::Normalizers::Bool.new
base.option "--puppet-proxy", "PUPPET_PROXY_NAME", ""
base.option "--puppet-ca-proxy", "PUPPET_CA_PROXY_NAME", ""
base.option "--puppet-class-ids", "PUPPET_CLASS_IDS", "",
:format => HammerCLI::Options::Normalizers::List.new,
:attribute_name => :option_puppetclass_ids
base.option "--puppet-classes", "PUPPET_CLASS_NAMES", "",
:format => HammerCLI::Options::Normalizers::List.new
bme_options = {}
bme_options[:default] = 'true' if base.action.to_sym == :create
bme_options[:format] = HammerCLI::Options::Normalizers::Bool.new
base.option "--managed", "MANAGED", " ", bme_options
bme_options[:format] = HammerCLI::Options::Normalizers::Bool.new
base.option "--build", "BUILD", " ", bme_options
bme_options[:format] = HammerCLI::Options::Normalizers::Bool.new
base.option "--enabled", "ENABLED", " ", bme_options
bme_options[:format] = HammerCLI::Options::Normalizers::Bool.new
base.option "--overwrite", "OVERWRITE", " ", bme_options
base.option "--parameters", "PARAMS", _("Host parameters."),
:format => HammerCLI::Options::Normalizers::KeyValueList.new
base.option "--compute-attributes", "COMPUTE_ATTRS", _("Compute resource attributes."),
:format => HammerCLI::Options::Normalizers::KeyValueList.new
base.option "--volume", "VOLUME", _("Volume parameters"), :multivalued => true,
:format => HammerCLI::Options::Normalizers::KeyValueList.new
base.option "--interface", "INTERFACE", _("Interface parameters."), :multivalued => true,
:format => HammerCLI::Options::Normalizers::KeyValueList.new
base.option "--provision-method", "METHOD", " ",
:format => HammerCLI::Options::Normalizers::Enum.new(['build', 'image'])
base.build_options :without => [
:provision_method, :capabilities, :flavour_ref, :image_ref, :start,
:network, :cpus, :memory, :provider, :type, :tenant_id, :image_id,
:puppet_class_ids, :host_parameters_attributes, :interfaces_attributes, :root_pass]
end
|