4
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
|
# File 'lib/hammer_cli_katello/content_override.rb', line 4
def self.setup
desc _("Override product content defaults")
command_name "content-override"
success_message _("Updated content override.")
failure_message _("Could not update content override")
option "--content-label", "CONTENT_LABEL", _("Label of the content"),
:attribute_name => :option_content_label, :required => true
option "--override-name", "OVERRIDE_NAME", _("Override parameter key or name.\n" \
"To enable or disable a repo select 'enabled'.\n" \
"Default value: enabled"),
:attribute_name => :option_override_name, :default => "enabled"
option "--value", "VALUE", _("Override value. " \
"Note for repo enablement you can use a boolean value"),
:attribute_name => :option_value, :required => false
option ["--remove"], :flag, _("Remove a content override")
validate_options do
any(:option_remove, :option_value).required
if option(:option_remove).exist?
option(:option_value).rejected
elsif option(:option_value).exist?
option(:option_remove).rejected
end
end
end
|