hammer_cli_katello 0.11.4 → 0.11.5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/hammer_cli_katello/content_override.rb +4 -4
- data/lib/hammer_cli_katello/product_content.rb +1 -1
- data/lib/hammer_cli_katello/version.rb +1 -1
- data/test/functional/activation_key/content_override_test.rb +4 -3
- data/test/functional/activation_key/product_content_test.rb +3 -3
- data/test/functional/host/subscription/content_override_test.rb +4 -3
- data/test/functional/host/subscription/product_content_test.rb +3 -3
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: fc2a8fc17f230d1f7b33ba733d185cc5937845e0
|
4
|
+
data.tar.gz: b88aa839da9f19ba9e3145ee6f6c546c0ea6f37a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c720b5cc0784c7067ff5f53a3a269dbb012b340423e0307786ab71797193d5067de3258f6ad4633ed41262dc56b97aadac03a256f091a947ead126b60dc9311a
|
7
|
+
data.tar.gz: c382f82363d5b952baecd4e9a598432d3da457575ddc039e038ac0ab5d18ee470118ae4658c6d2a551d070dce5a3e8d01bb34c21f45e5b02c587c0fc416e2b42
|
@@ -11,10 +11,10 @@ module HammerCLIKatello
|
|
11
11
|
option "--content-label", "CONTENT_LABEL", _("Label of the content"),
|
12
12
|
:attribute_name => :option_content_label, :required => true
|
13
13
|
|
14
|
-
option "--name", "
|
15
|
-
"To enable or disable a repo select 'enabled'
|
14
|
+
option "--override-name", "OVERRIDE_NAME", _("Override parameter key or name.\n" \
|
15
|
+
"To enable or disable a repo select 'enabled'.\n" \
|
16
16
|
"Default value: enabled"),
|
17
|
-
:attribute_name => :
|
17
|
+
:attribute_name => :option_override_name, :default => "enabled"
|
18
18
|
|
19
19
|
option "--value", "VALUE", _("Override value. " \
|
20
20
|
"Note for repo enablement you can use a boolean value"),
|
@@ -39,7 +39,7 @@ module HammerCLIKatello
|
|
39
39
|
override = { 'content_label' => option_content_label }
|
40
40
|
override['value'] = option_value if option_value
|
41
41
|
override['remove'] = true if option_remove?
|
42
|
-
override['name'] =
|
42
|
+
override['name'] = option_override_name
|
43
43
|
opts['content_overrides'] = [override]
|
44
44
|
end
|
45
45
|
end
|
@@ -14,7 +14,7 @@ module HammerCLIKatello
|
|
14
14
|
field :gpgUrl, _("GPG Key")
|
15
15
|
field :label, _("Label")
|
16
16
|
end
|
17
|
-
field :enabled, _("Enabled?"), Fields::Boolean
|
17
|
+
field :enabled, _("Default Enabled?"), Fields::Boolean
|
18
18
|
field :override_description, _("Override")
|
19
19
|
end
|
20
20
|
build_options
|
@@ -28,7 +28,8 @@ describe 'activation-key content-override' do
|
|
28
28
|
value = '1'
|
29
29
|
id = 20
|
30
30
|
name = 'protected'
|
31
|
-
params = ["--id=#{id}", "--content-label=#{label}", "--value=#{value}",
|
31
|
+
params = ["--id=#{id}", "--content-label=#{label}", "--value=#{value}",
|
32
|
+
"--override-name=#{name}"]
|
32
33
|
ex = api_expects(:activation_keys, :content_override) do |par|
|
33
34
|
par['id'] == id && par["content_overrides"][0]['content_label'] == label &&
|
34
35
|
par['content_overrides'][0]['value'] == value &&
|
@@ -63,7 +64,7 @@ describe 'activation-key content-override' do
|
|
63
64
|
label = "foo"
|
64
65
|
id = 20
|
65
66
|
name = 'protected'
|
66
|
-
params = ["--id=#{id}", "--content-label=#{label}", "--name=#{name}", "--remove"]
|
67
|
+
params = ["--id=#{id}", "--content-label=#{label}", "--override-name=#{name}", "--remove"]
|
67
68
|
ex = api_expects(:activation_keys, :content_override) do |par|
|
68
69
|
par['id'] == id && par["content_overrides"][0]['content_label'] == label &&
|
69
70
|
par['content_overrides'][0]['remove'] == true &&
|
@@ -82,7 +83,7 @@ describe 'activation-key content-override' do
|
|
82
83
|
label = "foo"
|
83
84
|
id = 20
|
84
85
|
name = 'protected'
|
85
|
-
params = ["--id=#{id}", "--content-label=#{label}", "--name=#{name}"]
|
86
|
+
params = ["--id=#{id}", "--content-label=#{label}", "--override-name=#{name}"]
|
86
87
|
result = run_cmd(@cmd + params)
|
87
88
|
|
88
89
|
assert(result.err[/At least one of options --remove, --value is required/],
|
@@ -4,9 +4,9 @@ describe 'listing available product content' do
|
|
4
4
|
let(:activation_key_id) { 1 }
|
5
5
|
let(:empty_response_table) do
|
6
6
|
<<eostring
|
7
|
-
|
8
|
-
ID | NAME | TYPE | URL | GPG KEY | LABEL | ENABLED? | OVERRIDE
|
9
|
-
|
7
|
+
---|------|------|-----|---------|-------|------------------|---------
|
8
|
+
ID | NAME | TYPE | URL | GPG KEY | LABEL | DEFAULT ENABLED? | OVERRIDE
|
9
|
+
---|------|------|-----|---------|-------|------------------|---------
|
10
10
|
eostring
|
11
11
|
end
|
12
12
|
|
@@ -32,7 +32,8 @@ describe 'host subscription content-override' do
|
|
32
32
|
value = '1'
|
33
33
|
id = '20'
|
34
34
|
name = 'protected'
|
35
|
-
params = ["--host-id=#{id}", "--content-label=#{label}", "--value=#{value}",
|
35
|
+
params = ["--host-id=#{id}", "--content-label=#{label}", "--value=#{value}",
|
36
|
+
"--override-name=#{name}"]
|
36
37
|
ex = api_expects(:host_subscriptions, :content_override, "content override") do |par|
|
37
38
|
par['host_id'].to_s == id && par["content_overrides"][0]['content_label'] == label &&
|
38
39
|
par['content_overrides'][0]['value'] == value &&
|
@@ -67,7 +68,7 @@ describe 'host subscription content-override' do
|
|
67
68
|
label = "foo"
|
68
69
|
id = '20'
|
69
70
|
name = 'protected'
|
70
|
-
params = ["--host-id=#{id}", "--content-label=#{label}", "--name=#{name}", "--remove"]
|
71
|
+
params = ["--host-id=#{id}", "--content-label=#{label}", "--override-name=#{name}", "--remove"]
|
71
72
|
ex = api_expects(:host_subscriptions, :content_override, "content override") do |par|
|
72
73
|
par['host_id'].to_s == id && par["content_overrides"][0]['content_label'] == label &&
|
73
74
|
par['content_overrides'][0]['remove'] == true &&
|
@@ -86,7 +87,7 @@ describe 'host subscription content-override' do
|
|
86
87
|
label = "foo"
|
87
88
|
id = '20'
|
88
89
|
name = 'protected'
|
89
|
-
params = ["--host-id=#{id}", "--content-label=#{label}", "--name=#{name}"]
|
90
|
+
params = ["--host-id=#{id}", "--content-label=#{label}", "--override-name=#{name}"]
|
90
91
|
result = run_cmd(@cmd + params)
|
91
92
|
|
92
93
|
assert(result.err[/At least one of options --remove, --value is required/],
|
@@ -8,9 +8,9 @@ describe 'listing available product content' do
|
|
8
8
|
let(:host_id) { 1 }
|
9
9
|
let(:empty_response_table) do
|
10
10
|
<<eostring
|
11
|
-
|
12
|
-
ID | NAME | TYPE | URL | GPG KEY | LABEL | ENABLED? | OVERRIDE
|
13
|
-
|
11
|
+
---|------|------|-----|---------|-------|------------------|---------
|
12
|
+
ID | NAME | TYPE | URL | GPG KEY | LABEL | DEFAULT ENABLED? | OVERRIDE
|
13
|
+
---|------|------|-----|---------|-------|------------------|---------
|
14
14
|
eostring
|
15
15
|
end
|
16
16
|
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: hammer_cli_katello
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.11.
|
4
|
+
version: 0.11.5
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Adam Price
|
@@ -34,7 +34,7 @@ authors:
|
|
34
34
|
autorequire:
|
35
35
|
bindir: bin
|
36
36
|
cert_chain: []
|
37
|
-
date:
|
37
|
+
date: 2018-02-02 00:00:00.000000000 Z
|
38
38
|
dependencies:
|
39
39
|
- !ruby/object:Gem::Dependency
|
40
40
|
name: hammer_cli
|