hammer_cli_katello 0.13.6 → 0.14.0
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.rb +6 -6
- data/lib/hammer_cli_katello/activation_key.rb +6 -6
- data/lib/hammer_cli_katello/associating_commands.rb +6 -6
- data/lib/hammer_cli_katello/capsule.rb +3 -3
- data/lib/hammer_cli_katello/content_override.rb +1 -1
- data/lib/hammer_cli_katello/content_view.rb +9 -9
- data/lib/hammer_cli_katello/content_view_component.rb +3 -3
- data/lib/hammer_cli_katello/content_view_puppet_module.rb +2 -2
- data/lib/hammer_cli_katello/content_view_version.rb +4 -4
- data/lib/hammer_cli_katello/filter.rb +3 -3
- data/lib/hammer_cli_katello/filter_rule.rb +3 -3
- data/lib/hammer_cli_katello/gpg_key.rb +3 -3
- data/lib/hammer_cli_katello/host_collection.rb +6 -6
- data/lib/hammer_cli_katello/host_errata.rb +1 -1
- data/lib/hammer_cli_katello/host_kickstart_repository_options.rb +3 -3
- data/lib/hammer_cli_katello/host_package.rb +4 -4
- data/lib/hammer_cli_katello/host_package_group.rb +2 -2
- data/lib/hammer_cli_katello/host_subscription.rb +5 -5
- data/lib/hammer_cli_katello/lifecycle_environment.rb +3 -3
- data/lib/hammer_cli_katello/organization.rb +3 -3
- data/lib/hammer_cli_katello/product.rb +8 -8
- data/lib/hammer_cli_katello/repository.rb +8 -8
- data/lib/hammer_cli_katello/repository_set.rb +2 -2
- data/lib/hammer_cli_katello/subscription.rb +3 -3
- data/lib/hammer_cli_katello/sync_plan.rb +3 -3
- data/lib/hammer_cli_katello/version.rb +1 -1
- data/test/data/3.7/foreman_api.json +1 -1
- data/test/data/3.8/foreman_api.json +1 -0
- data/test/functional/activation_key/content_override_test.rb +4 -4
- data/test/functional/content_view/create_test.rb +3 -3
- data/test/functional/content_view/filter/create_test.rb +2 -2
- data/test/functional/content_view/remove_test.rb +4 -4
- data/test/functional/host/errata/apply_test.rb +1 -1
- data/test/functional/host/subscription/attach_test.rb +2 -2
- data/test/functional/host/subscription/auto_attach_test.rb +1 -1
- data/test/functional/host/subscription/content_override_test.rb +4 -4
- data/test/functional/host/subscription/register_test.rb +2 -2
- data/test/functional/host/subscription/remove_test.rb +2 -2
- data/test/functional/host/subscription/unregister_test.rb +1 -1
- data/test/functional/repository/export_test.rb +10 -10
- data/test/functional/repository/synchronize_test.rb +3 -3
- data/test/test_helper.rb +1 -1
- metadata +15 -10
@@ -29,7 +29,7 @@ describe 'content-view filter create' do
|
|
29
29
|
.with_params('name' => filter_name, 'repository_ids' => repo_ids.map(&:to_s))
|
30
30
|
.returns({})
|
31
31
|
|
32
|
-
expected_result = success_result("Filter created
|
32
|
+
expected_result = success_result("Filter created.\n")
|
33
33
|
result = run_cmd(@cmd + @base_params + params)
|
34
34
|
assert_cmd(expected_result, result)
|
35
35
|
end
|
@@ -42,7 +42,7 @@ describe 'content-view filter create' do
|
|
42
42
|
api_expects(:content_view_filters, :create, "Create content-view filter")
|
43
43
|
.with_params('name' => filter_name, 'repository_ids' => repo_ids, 'type' => 'rpm')
|
44
44
|
|
45
|
-
expected_result = success_result("Filter created
|
45
|
+
expected_result = success_result("Filter created.\n")
|
46
46
|
result = run_cmd(@cmd + @base_params + params)
|
47
47
|
assert_cmd(expected_result, result)
|
48
48
|
end
|
@@ -10,7 +10,7 @@ module HammerCLIKatello
|
|
10
10
|
ex = api_expects(:content_views, :remove) do |p|
|
11
11
|
p['id'] == 1 && p['content_view_version_ids'] == %w(6 7 8)
|
12
12
|
end
|
13
|
-
ex.returns(id: 9)
|
13
|
+
ex.returns(id: '9')
|
14
14
|
|
15
15
|
expect_foreman_task('9')
|
16
16
|
|
@@ -28,7 +28,7 @@ module HammerCLIKatello
|
|
28
28
|
|
29
29
|
api_expects(:content_views, :remove).with_params(
|
30
30
|
'id' => 1, 'content_view_version_ids' => ids
|
31
|
-
).returns(id: 9)
|
31
|
+
).returns(id: '9')
|
32
32
|
|
33
33
|
expect_foreman_task('9')
|
34
34
|
|
@@ -41,7 +41,7 @@ module HammerCLIKatello
|
|
41
41
|
ex = api_expects(:content_views, :remove) do |p|
|
42
42
|
p['id'] == 1 && p['environment_ids'] == %w(6 7 8)
|
43
43
|
end
|
44
|
-
ex.returns(id: 9)
|
44
|
+
ex.returns(id: '9')
|
45
45
|
|
46
46
|
expect_foreman_task('9')
|
47
47
|
|
@@ -68,7 +68,7 @@ module HammerCLIKatello
|
|
68
68
|
ex = api_expects(:content_views, :remove) do |p|
|
69
69
|
p['id'] == 1 && p['environment_ids'] == environment_ids
|
70
70
|
end
|
71
|
-
ex.returns(id: 9)
|
71
|
+
ex.returns(id: '9')
|
72
72
|
|
73
73
|
expect_foreman_task('9')
|
74
74
|
|
@@ -16,7 +16,7 @@ describe 'host subscription attach' do
|
|
16
16
|
ex.returns({})
|
17
17
|
|
18
18
|
expected_result = success_result(
|
19
|
-
'Subscription attached to the host successfully
|
19
|
+
'Subscription attached to the host successfully.
|
20
20
|
'
|
21
21
|
)
|
22
22
|
|
@@ -33,7 +33,7 @@ describe 'host subscription attach' do
|
|
33
33
|
ex.returns({})
|
34
34
|
|
35
35
|
expected_result = success_result(
|
36
|
-
'Subscription attached to the host successfully
|
36
|
+
'Subscription attached to the host successfully.
|
37
37
|
'
|
38
38
|
)
|
39
39
|
|
@@ -21,7 +21,7 @@ describe 'host subscription content-override' do
|
|
21
21
|
end
|
22
22
|
ex.returns({})
|
23
23
|
|
24
|
-
expected_result = success_result("Updated content override
|
24
|
+
expected_result = success_result("Updated content override.\n")
|
25
25
|
|
26
26
|
result = run_cmd(@cmd + params)
|
27
27
|
assert_cmd(expected_result, result)
|
@@ -41,7 +41,7 @@ describe 'host subscription content-override' do
|
|
41
41
|
end
|
42
42
|
ex.returns({})
|
43
43
|
|
44
|
-
expected_result = success_result("Updated content override
|
44
|
+
expected_result = success_result("Updated content override.\n")
|
45
45
|
|
46
46
|
result = run_cmd(@cmd + params)
|
47
47
|
assert_cmd(expected_result, result)
|
@@ -58,7 +58,7 @@ describe 'host subscription content-override' do
|
|
58
58
|
end
|
59
59
|
ex.returns({})
|
60
60
|
|
61
|
-
expected_result = success_result("Updated content override
|
61
|
+
expected_result = success_result("Updated content override.\n")
|
62
62
|
|
63
63
|
result = run_cmd(@cmd + params)
|
64
64
|
assert_cmd(expected_result, result)
|
@@ -76,7 +76,7 @@ describe 'host subscription content-override' do
|
|
76
76
|
end
|
77
77
|
ex.returns({})
|
78
78
|
|
79
|
-
expected_result = success_result("Updated content override
|
79
|
+
expected_result = success_result("Updated content override.\n")
|
80
80
|
|
81
81
|
result = run_cmd(@cmd + params)
|
82
82
|
assert_cmd(expected_result, result)
|
@@ -22,7 +22,7 @@ describe 'host subscription register' do
|
|
22
22
|
ex.returns({})
|
23
23
|
|
24
24
|
expected_result = success_result(
|
25
|
-
'Host successfully registered
|
25
|
+
'Host successfully registered.
|
26
26
|
'
|
27
27
|
)
|
28
28
|
|
@@ -44,7 +44,7 @@ describe 'host subscription register' do
|
|
44
44
|
expect_lifecycle_environment_search(3, 'someenv', 2)
|
45
45
|
|
46
46
|
expected_result = success_result(
|
47
|
-
'Host successfully registered
|
47
|
+
'Host successfully registered.
|
48
48
|
'
|
49
49
|
)
|
50
50
|
result = run_cmd(@cmd + params)
|
@@ -15,7 +15,7 @@ describe 'host subscription remove' do
|
|
15
15
|
ex.returns({})
|
16
16
|
|
17
17
|
expected_result = success_result(
|
18
|
-
'Subscription removed from the host successfully
|
18
|
+
'Subscription removed from the host successfully.
|
19
19
|
'
|
20
20
|
)
|
21
21
|
|
@@ -32,7 +32,7 @@ describe 'host subscription remove' do
|
|
32
32
|
ex.returns({})
|
33
33
|
|
34
34
|
expected_result = success_result(
|
35
|
-
'Subscription removed from the host successfully
|
35
|
+
'Subscription removed from the host successfully.
|
36
36
|
'
|
37
37
|
)
|
38
38
|
|
@@ -11,9 +11,9 @@ module HammerCLIKatello
|
|
11
11
|
ex = api_expects(:repositories, :export) do |p|
|
12
12
|
p['id'] == 1
|
13
13
|
end
|
14
|
-
ex.returns(id: 2)
|
14
|
+
ex.returns(id: '2')
|
15
15
|
|
16
|
-
expect_foreman_task(2)
|
16
|
+
expect_foreman_task('2')
|
17
17
|
|
18
18
|
run_cmd(%w(repository export --id 1))
|
19
19
|
end
|
@@ -34,9 +34,9 @@ module HammerCLIKatello
|
|
34
34
|
ex = api_expects(:repositories, :export) do |p|
|
35
35
|
p['id'] == 1
|
36
36
|
end
|
37
|
-
ex.returns(id: 2)
|
37
|
+
ex.returns(id: '2')
|
38
38
|
|
39
|
-
expect_foreman_task(2)
|
39
|
+
expect_foreman_task('2')
|
40
40
|
|
41
41
|
run_cmd(%w(repository export --name repo1 --product-id 3))
|
42
42
|
end
|
@@ -64,9 +64,9 @@ module HammerCLIKatello
|
|
64
64
|
ex = api_expects(:repositories, :export) do |p|
|
65
65
|
p['id'] == 1
|
66
66
|
end
|
67
|
-
ex.returns(id: 2)
|
67
|
+
ex.returns(id: '2')
|
68
68
|
|
69
|
-
expect_foreman_task(2)
|
69
|
+
expect_foreman_task('2')
|
70
70
|
|
71
71
|
run_cmd(%w(repository export --name repo1 --product prod3 --organization-id 5))
|
72
72
|
end
|
@@ -87,9 +87,9 @@ module HammerCLIKatello
|
|
87
87
|
ex = api_expects(:repositories, :export) do |p|
|
88
88
|
p['id'] == 1
|
89
89
|
end
|
90
|
-
ex.returns(id: 2)
|
90
|
+
ex.returns(id: '2')
|
91
91
|
|
92
|
-
expect_foreman_task(2)
|
92
|
+
expect_foreman_task('2')
|
93
93
|
|
94
94
|
run_cmd(%w(repository export --name repo1 --product prod3 --organization org5))
|
95
95
|
end
|
@@ -110,9 +110,9 @@ module HammerCLIKatello
|
|
110
110
|
ex = api_expects(:repositories, :export) do |p|
|
111
111
|
p['id'] == 1
|
112
112
|
end
|
113
|
-
ex.returns(id: 2)
|
113
|
+
ex.returns(id: '2')
|
114
114
|
|
115
|
-
expect_foreman_task(2)
|
115
|
+
expect_foreman_task('2')
|
116
116
|
|
117
117
|
run_cmd(%w(repository export --name repo1 --product prod3 --organization-label org5))
|
118
118
|
end
|
@@ -16,7 +16,7 @@ describe 'Synchronize a repository' do
|
|
16
16
|
let(:product_id) { 3 }
|
17
17
|
let(:sync_response) do
|
18
18
|
{
|
19
|
-
'id' => repo_id,
|
19
|
+
'id' => repo_id.to_s,
|
20
20
|
'state' => 'planned'
|
21
21
|
}
|
22
22
|
end
|
@@ -30,7 +30,7 @@ describe 'Synchronize a repository' do
|
|
30
30
|
|
31
31
|
ex.returns(sync_response)
|
32
32
|
|
33
|
-
expect_foreman_task(3)
|
33
|
+
expect_foreman_task('3')
|
34
34
|
|
35
35
|
result = run_cmd(@cmd + params)
|
36
36
|
assert_equal(result.exit_code, 0)
|
@@ -49,7 +49,7 @@ describe 'Synchronize a repository' do
|
|
49
49
|
|
50
50
|
ex.returns(sync_response)
|
51
51
|
|
52
|
-
expect_foreman_task(3)
|
52
|
+
expect_foreman_task('3')
|
53
53
|
|
54
54
|
result = run_cmd(@cmd + params)
|
55
55
|
assert_equal(result.exit_code, 0)
|
data/test/test_helper.rb
CHANGED
@@ -17,7 +17,7 @@ require 'minitest/spec'
|
|
17
17
|
require 'mocha/setup'
|
18
18
|
require 'hammer_cli'
|
19
19
|
|
20
|
-
KATELLO_VERSION = Gem::Version.new(ENV['TEST_API_VERSION'] || '3.
|
20
|
+
KATELLO_VERSION = Gem::Version.new(ENV['TEST_API_VERSION'] || '3.8')
|
21
21
|
|
22
22
|
if HammerCLI.context[:api_connection]
|
23
23
|
HammerCLI.context[:api_connection].create('foreman') do
|
metadata
CHANGED
@@ -1,11 +1,12 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: hammer_cli_katello
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.14.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Adam Price
|
8
8
|
- Adam Ruzicka
|
9
|
+
- Anand Agrawal
|
9
10
|
- Andrew Kofink
|
10
11
|
- Brad Buckingham
|
11
12
|
- Bryan Kearney
|
@@ -25,8 +26,10 @@ authors:
|
|
25
26
|
- Og Maciel
|
26
27
|
- Partha Aji
|
27
28
|
- Pavel Moravec
|
29
|
+
- Rahul Bajaj
|
28
30
|
- Roman Plevka
|
29
31
|
- Stephen Benjamin
|
32
|
+
- Shira Maximov
|
30
33
|
- Tomas Strachota
|
31
34
|
- Tom McKay
|
32
35
|
- Walden Raines
|
@@ -34,36 +37,36 @@ authors:
|
|
34
37
|
autorequire:
|
35
38
|
bindir: bin
|
36
39
|
cert_chain: []
|
37
|
-
date: 2018-
|
40
|
+
date: 2018-08-29 00:00:00.000000000 Z
|
38
41
|
dependencies:
|
39
42
|
- !ruby/object:Gem::Dependency
|
40
43
|
name: hammer_cli_foreman
|
41
44
|
requirement: !ruby/object:Gem::Requirement
|
42
45
|
requirements:
|
43
|
-
- - "
|
46
|
+
- - ">="
|
44
47
|
- !ruby/object:Gem::Version
|
45
|
-
version: 0
|
48
|
+
version: '0'
|
46
49
|
type: :runtime
|
47
50
|
prerelease: false
|
48
51
|
version_requirements: !ruby/object:Gem::Requirement
|
49
52
|
requirements:
|
50
|
-
- - "
|
53
|
+
- - ">="
|
51
54
|
- !ruby/object:Gem::Version
|
52
|
-
version: 0
|
55
|
+
version: '0'
|
53
56
|
- !ruby/object:Gem::Dependency
|
54
57
|
name: hammer_cli_foreman_tasks
|
55
58
|
requirement: !ruby/object:Gem::Requirement
|
56
59
|
requirements:
|
57
|
-
- - "
|
60
|
+
- - ">="
|
58
61
|
- !ruby/object:Gem::Version
|
59
|
-
version: 0
|
62
|
+
version: '0'
|
60
63
|
type: :runtime
|
61
64
|
prerelease: false
|
62
65
|
version_requirements: !ruby/object:Gem::Requirement
|
63
66
|
requirements:
|
64
|
-
- - "
|
67
|
+
- - ">="
|
65
68
|
- !ruby/object:Gem::Version
|
66
|
-
version: 0
|
69
|
+
version: '0'
|
67
70
|
- !ruby/object:Gem::Dependency
|
68
71
|
name: hammer_cli_foreman_bootdisk
|
69
72
|
requirement: !ruby/object:Gem::Requirement
|
@@ -309,6 +312,7 @@ files:
|
|
309
312
|
- test/data/3.5/foreman_api.json
|
310
313
|
- test/data/3.6/foreman_api.json
|
311
314
|
- test/data/3.7/foreman_api.json
|
315
|
+
- test/data/3.8/foreman_api.json
|
312
316
|
- test/data/Readme.md
|
313
317
|
- test/functional/activation_key/add_host_collection_test.rb
|
314
318
|
- test/functional/activation_key/content_override_test.rb
|
@@ -469,6 +473,7 @@ test_files:
|
|
469
473
|
- test/data/3.5/foreman_api.json
|
470
474
|
- test/data/3.6/foreman_api.json
|
471
475
|
- test/data/3.7/foreman_api.json
|
476
|
+
- test/data/3.8/foreman_api.json
|
472
477
|
- test/data/Readme.md
|
473
478
|
- test/functional/activation_key/add_host_collection_test.rb
|
474
479
|
- test/functional/activation_key/content_override_test.rb
|