hammer_cli_katello 0.0.26 → 0.1.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/activation_key.rb +23 -43
- data/lib/hammer_cli_katello/associating_commands.rb +3 -5
- data/lib/hammer_cli_katello/capsule.rb +1 -3
- data/lib/hammer_cli_katello/commands.rb +1 -7
- data/lib/hammer_cli_katello/content_view.rb +6 -3
- data/lib/hammer_cli_katello/content_view_name_resolvable.rb +21 -0
- data/lib/hammer_cli_katello/content_view_puppet_module.rb +11 -7
- data/lib/hammer_cli_katello/content_view_version.rb +30 -29
- data/lib/hammer_cli_katello/erratum.rb +0 -1
- data/lib/hammer_cli_katello/exception_handler.rb +0 -2
- data/lib/hammer_cli_katello/filter.rb +11 -3
- data/lib/hammer_cli_katello/filter_rule.rb +8 -2
- data/lib/hammer_cli_katello/foreman_search_options_creators.rb +71 -0
- data/lib/hammer_cli_katello/gpg_key.rb +0 -5
- data/lib/hammer_cli_katello/host.rb +1 -0
- data/lib/hammer_cli_katello/host_collection.rb +48 -16
- data/lib/hammer_cli_katello/host_errata.rb +0 -1
- data/lib/hammer_cli_katello/host_extensions.rb +56 -0
- data/lib/hammer_cli_katello/host_package.rb +0 -3
- data/lib/hammer_cli_katello/host_package_group.rb +0 -3
- data/lib/hammer_cli_katello/host_subscription.rb +67 -1
- data/lib/hammer_cli_katello/hostgroup.rb +2 -0
- data/lib/hammer_cli_katello/hostgroup_extensions.rb +48 -0
- data/lib/hammer_cli_katello/i18n.rb +0 -3
- data/lib/hammer_cli_katello/id_resolver.rb +25 -16
- data/lib/hammer_cli_katello/katello_environment_name_resolvable.rb +4 -3
- data/lib/hammer_cli_katello/lifecycle_environment.rb +0 -3
- data/lib/hammer_cli_katello/lifecycle_environment_name_resolvable.rb +4 -3
- data/lib/hammer_cli_katello/organization.rb +0 -3
- data/lib/hammer_cli_katello/organization_options.rb +12 -0
- data/lib/hammer_cli_katello/ostree_branch.rb +0 -1
- data/lib/hammer_cli_katello/output/fields.rb +0 -2
- data/lib/hammer_cli_katello/output/formatters.rb +0 -4
- data/lib/hammer_cli_katello/package.rb +0 -1
- data/lib/hammer_cli_katello/package_group.rb +0 -1
- data/lib/hammer_cli_katello/ping.rb +0 -6
- data/lib/hammer_cli_katello/product.rb +1 -7
- data/lib/hammer_cli_katello/puppet_module.rb +0 -1
- data/lib/hammer_cli_katello/repository.rb +36 -35
- data/lib/hammer_cli_katello/repository_scoped_to_product.rb +0 -4
- data/lib/hammer_cli_katello/repository_set.rb +0 -3
- data/lib/hammer_cli_katello/search_options_creators.rb +40 -18
- data/lib/hammer_cli_katello/subscription.rb +20 -13
- data/lib/hammer_cli_katello/sync_plan.rb +4 -8
- data/lib/hammer_cli_katello/version.rb +1 -1
- data/lib/hammer_cli_katello.rb +21 -26
- data/test/data/3.0/foreman_api.json +1 -1
- data/test/data/3.2/foreman_api.json +1 -0
- data/test/data/Readme.md +5 -0
- data/test/functional/activaton_key/add_host_collection_test.rb +62 -0
- data/test/functional/activaton_key/create_test.rb +33 -0
- data/test/functional/activaton_key/list_test.rb +15 -16
- data/test/functional/activaton_key/product_content_test.rb +23 -0
- data/test/functional/activaton_key/remove_host_collection_test.rb +62 -0
- data/test/functional/activaton_key/subscriptions_test.rb +57 -0
- data/test/functional/activaton_key/update_test.rb +26 -0
- data/test/functional/capsule/content/cancel_synchronization_test.rb +1 -1
- data/test/functional/capsule/content/capsule_content_helpers.rb +0 -2
- data/test/functional/content_view/add_content_view_version_test.rb +34 -0
- data/test/functional/content_view/add_repository_test.rb +20 -0
- data/test/functional/content_view/content_view_helpers.rb +0 -2
- data/test/functional/content_view/create_test.rb +3 -3
- data/test/functional/content_view/filter/create_test.rb +63 -0
- data/test/functional/content_view/list_test.rb +23 -20
- data/test/functional/content_view/publish_test.rb +23 -0
- data/test/functional/content_view/puppet_module/add_test.rb +23 -0
- data/test/functional/content_view/remove_content_view_version_test.rb +34 -0
- data/test/functional/content_view/version/incremental_update_test.rb +4 -4
- data/test/functional/content_view/version/list_test.rb +44 -0
- data/test/functional/content_view/version/promote_test.rb +35 -0
- data/test/functional/filter_rule/create_test.rb +20 -0
- data/test/functional/host/errata/apply_test.rb +5 -4
- data/test/functional/host/extensions/data/host.json +310 -0
- data/test/functional/host/extensions/data/host_list.json +115 -0
- data/test/functional/host/extensions/info_test.rb +27 -0
- data/test/functional/host/extensions/list_test.rb +21 -0
- data/test/functional/host/host_helpers.rb +0 -2
- data/test/functional/host/subscription/attach_test.rb +54 -0
- data/test/functional/host/subscription/auto_attach_test.rb +35 -0
- data/test/functional/host/subscription/register_test.rb +2 -2
- data/test/functional/host/subscription/remove_test.rb +52 -0
- data/test/functional/host_collection/add_host_test.rb +57 -0
- data/test/functional/host_collection/copy_test.rb +64 -0
- data/test/functional/host_collection/create_test.rb +43 -0
- data/test/functional/host_collection/delete_test.rb +57 -0
- data/test/functional/host_collection/hosts_test.rb +40 -0
- data/test/functional/host_collection/info_test.rb +57 -0
- data/test/functional/host_collection/list_test.rb +42 -0
- data/test/functional/host_collection/remove_host_test.rb +57 -0
- data/test/functional/host_collection/update_test.rb +57 -0
- data/test/functional/hostgroup/create_test.rb +55 -0
- data/test/functional/hostgroup/data/hostgroup.json +48 -0
- data/test/functional/hostgroup/info_test.rb +30 -0
- data/test/functional/hostgroup/update_test.rb +55 -0
- data/test/functional/lifecycle_environment/lifecycle_environment_helpers.rb +0 -2
- data/test/functional/organization/organization_helpers.rb +0 -2
- data/test/functional/product/create_test.rb +54 -0
- data/test/functional/product/delete_test.rb +41 -0
- data/test/functional/product/info_test.rb +33 -0
- data/test/functional/product/list_test.rb +58 -0
- data/test/functional/product/product_helpers.rb +14 -0
- data/test/functional/product/remove_sync_plan_test.rb +35 -0
- data/test/functional/product/set_sync_plan_test.rb +49 -0
- data/test/functional/product/update_test.rb +46 -0
- data/test/functional/repository/info_test.rb +3 -3
- data/test/functional/repository/list_test.rb +14 -13
- data/test/functional/repository/remove_content_test.rb +18 -0
- data/test/functional/repository/repository_helpers.rb +9 -3
- data/test/functional/repository/synchronize_test.rb +3 -3
- data/test/functional/repository/upload_test.rb +17 -5
- data/test/functional/subscription/list_test.rb +92 -0
- data/test/functional/sync_plan/sync_plan_helpers.rb +8 -0
- data/test/test_helper.rb +3 -3
- data/test/unit/id_resolver_test.rb +17 -2
- data/test/unit/search_options_creators_test.rb +49 -12
- metadata +105 -7
- data/lib/hammer_cli_katello/content_host.rb +0 -111
@@ -33,7 +33,7 @@ describe 'Synchronize a repository' do
|
|
33
33
|
expect_foreman_task('3')
|
34
34
|
|
35
35
|
result = run_cmd(@cmd + params)
|
36
|
-
|
36
|
+
assert_equal(result.exit_code, 0)
|
37
37
|
end
|
38
38
|
|
39
39
|
it "synchronizes a repository with a repository name" do
|
@@ -41,7 +41,7 @@ describe 'Synchronize a repository' do
|
|
41
41
|
|
42
42
|
expect_product_search(org_id, "test_product", product_id)
|
43
43
|
|
44
|
-
expect_repository_search(
|
44
|
+
expect_repository_search(product_id, "test_repo", repo_id)
|
45
45
|
|
46
46
|
ex = api_expects(:repositories, :sync, 'Repository is synced') do |par|
|
47
47
|
par['id'] == repo_id
|
@@ -52,6 +52,6 @@ describe 'Synchronize a repository' do
|
|
52
52
|
expect_foreman_task('3')
|
53
53
|
|
54
54
|
result = run_cmd(@cmd + params)
|
55
|
-
|
55
|
+
assert_equal(result.exit_code, 0)
|
56
56
|
end
|
57
57
|
end
|
@@ -35,7 +35,13 @@ describe 'upload repository' do
|
|
35
35
|
ex.returns(upload_response)
|
36
36
|
|
37
37
|
ex2 = api_expects(:repositories, :import_uploads, 'Take in an upload') do |par|
|
38
|
-
|
38
|
+
upload = {
|
39
|
+
:id => '1234',
|
40
|
+
:name => 'test.rpm',
|
41
|
+
:size => 0,
|
42
|
+
:checksum => 'e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855'
|
43
|
+
}
|
44
|
+
par[:id] == repo_id.to_s && par[:uploads] == [upload]
|
39
45
|
end
|
40
46
|
|
41
47
|
ex2.returns("")
|
@@ -47,7 +53,7 @@ describe 'upload repository' do
|
|
47
53
|
ex3.returns("")
|
48
54
|
|
49
55
|
result = run_cmd(@cmd + params)
|
50
|
-
|
56
|
+
assert_equal(result.exit_code, 0)
|
51
57
|
File.delete("test.rpm")
|
52
58
|
end
|
53
59
|
|
@@ -59,7 +65,7 @@ describe 'upload repository' do
|
|
59
65
|
|
60
66
|
expect_product_search(org_id, 'test_product', product_id)
|
61
67
|
|
62
|
-
expect_repository_search(
|
68
|
+
expect_repository_search(product_id, 'test_repo', repo_id)
|
63
69
|
|
64
70
|
ex = api_expects(:content_uploads, :create, "Create upload for content") do |par|
|
65
71
|
par[:repository_id] == repo_id
|
@@ -68,7 +74,13 @@ describe 'upload repository' do
|
|
68
74
|
ex.returns(upload_response)
|
69
75
|
|
70
76
|
ex2 = api_expects(:repositories, :import_uploads, 'Take in an upload') do |par|
|
71
|
-
|
77
|
+
upload = {
|
78
|
+
:id => '1234',
|
79
|
+
:name => 'test.rpm',
|
80
|
+
:size => 0,
|
81
|
+
:checksum => 'e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855'
|
82
|
+
}
|
83
|
+
par[:id] == repo_id && par[:uploads] == [upload]
|
72
84
|
end
|
73
85
|
|
74
86
|
ex2.returns("")
|
@@ -80,7 +92,7 @@ describe 'upload repository' do
|
|
80
92
|
ex3.returns("")
|
81
93
|
|
82
94
|
result = run_cmd(@cmd + params)
|
83
|
-
|
95
|
+
assert_equal(result.exit_code, 0)
|
84
96
|
File.delete("test.rpm")
|
85
97
|
end
|
86
98
|
end
|
@@ -0,0 +1,92 @@
|
|
1
|
+
require_relative '../test_helper'
|
2
|
+
require 'hammer_cli_katello/subscription'
|
3
|
+
|
4
|
+
module HammerCLIKatello
|
5
|
+
describe SubscriptionCommand::ListCommand do
|
6
|
+
before do
|
7
|
+
@cmd = %w(subscription list)
|
8
|
+
end
|
9
|
+
|
10
|
+
let(:org_id) { 1 }
|
11
|
+
|
12
|
+
it "returns the correct subscription type" do
|
13
|
+
cmd = SubscriptionCommand::ListCommand.new({})
|
14
|
+
assert_equal("Physical", cmd.get_subscription_type("virt_only" => false))
|
15
|
+
|
16
|
+
hostname = "boo.com"
|
17
|
+
with_hostname = cmd.get_subscription_type("virt_only" => true, "host" => {"name" => hostname})
|
18
|
+
assert(with_hostname.include?(hostname))
|
19
|
+
|
20
|
+
assert_equal("Temporary",
|
21
|
+
cmd.get_subscription_type("virt_only" => true, "unmapper_guest" => true))
|
22
|
+
|
23
|
+
assert_equal("Virtual",
|
24
|
+
cmd.get_subscription_type("virt_only" => true))
|
25
|
+
end
|
26
|
+
|
27
|
+
it "lists an organizations subscriptions" do
|
28
|
+
params = ["--organization-id=#{org_id}"]
|
29
|
+
|
30
|
+
ex = api_expects(:subscriptions, :index, 'Subscription list') do |par|
|
31
|
+
par['organization_id'] == org_id
|
32
|
+
end
|
33
|
+
|
34
|
+
ex.returns(index_response([]))
|
35
|
+
|
36
|
+
result = run_cmd(@cmd + params)
|
37
|
+
|
38
|
+
fields = ['ID', 'UUID', 'NAME', 'TYPE', 'CONTRACT', 'ACCOUNT', 'SUPPORT',
|
39
|
+
'END DATE', 'QUANTITY', 'CONSUMED']
|
40
|
+
expected_result = success_result(IndexMatcher.new([fields, []]))
|
41
|
+
assert_cmd(expected_result, result)
|
42
|
+
end
|
43
|
+
|
44
|
+
it 'requires organization options' do
|
45
|
+
expected_error = "Could not find organization"
|
46
|
+
result = run_cmd(%w(subscription list))
|
47
|
+
assert_equal(expected_error, result.err[/#{expected_error}/])
|
48
|
+
end
|
49
|
+
|
50
|
+
it 'allows organization name' do
|
51
|
+
api_expects(:organizations, :index) { |par| par[:search] == "name = \"org1\"" }
|
52
|
+
.returns(index_response([{'id' => 1}]))
|
53
|
+
|
54
|
+
api_expects(:subscriptions, :index) { |par| par['organization_id'].to_i == 1 }
|
55
|
+
|
56
|
+
run_cmd(%w(subscription list --organization org1))
|
57
|
+
end
|
58
|
+
|
59
|
+
it 'allows organization label' do
|
60
|
+
api_expects(:organizations, :index) { |par| par[:search] == "label = \"org1\"" }
|
61
|
+
.returns(index_response([{'id' => 1}]))
|
62
|
+
|
63
|
+
api_expects(:subscriptions, :index) { |par| par['organization_id'].to_i == 1 }
|
64
|
+
|
65
|
+
run_cmd(%w(subscription list --organization-label org1))
|
66
|
+
end
|
67
|
+
|
68
|
+
it 'allows host id' do
|
69
|
+
api_expects(:subscriptions, :index) { |par| par['host_id'] == 1 }
|
70
|
+
run_cmd(%w(subscription list --organization-id 1 --host-id 1))
|
71
|
+
end
|
72
|
+
|
73
|
+
it 'allows host name' do
|
74
|
+
api_expects(:hosts, :index) { |par| par[:search] == "name = \"host1\"" }
|
75
|
+
.returns(index_response([{'id' => 1}]))
|
76
|
+
api_expects(:subscriptions, :index) { |par| par['host_id'] == 1 }
|
77
|
+
run_cmd(%w(subscription list --organization-id 1 --host host1))
|
78
|
+
end
|
79
|
+
|
80
|
+
it 'allows activation key id' do
|
81
|
+
api_expects(:subscriptions, :index) { |par| par['activation_key_id'] == 1 }
|
82
|
+
run_cmd(%w(subscription list --organization-id 1 --activation-key-id 1))
|
83
|
+
end
|
84
|
+
|
85
|
+
it 'allows activation key name' do
|
86
|
+
api_expects(:activation_keys, :index) { |par| par['name'] == "ak1" }
|
87
|
+
.returns(index_response([{'id' => 1}]))
|
88
|
+
api_expects(:subscriptions, :index) { |par| par['activation_key_id'] == 1 }
|
89
|
+
run_cmd(%w(subscription list --organization-id 1 --activation-key ak1))
|
90
|
+
end
|
91
|
+
end
|
92
|
+
end
|
data/test/test_helper.rb
CHANGED
@@ -4,8 +4,8 @@ if RUBY_VERSION > "2.2"
|
|
4
4
|
require 'coveralls'
|
5
5
|
SimpleCov.formatters = [SimpleCov::Formatter::HTMLFormatter, Coveralls::SimpleCov::Formatter]
|
6
6
|
SimpleCov.start do
|
7
|
-
minimum_coverage
|
8
|
-
|
7
|
+
minimum_coverage 70
|
8
|
+
maximum_coverage_drop 0.1
|
9
9
|
track_files "lib/**/*.rb"
|
10
10
|
add_filter '/test/'
|
11
11
|
end
|
@@ -18,7 +18,7 @@ require 'mocha/setup'
|
|
18
18
|
require 'hammer_cli'
|
19
19
|
require 'hammer_cli_foreman/commands'
|
20
20
|
|
21
|
-
KATELLO_VERSION = Gem::Version.new(ENV['TEST_API_VERSION'] || '3.
|
21
|
+
KATELLO_VERSION = Gem::Version.new(ENV['TEST_API_VERSION'] || '3.2')
|
22
22
|
|
23
23
|
HammerCLIForeman.stubs(:resource_config).returns(
|
24
24
|
:apidoc_cache_dir => 'test/data/' + KATELLO_VERSION.to_s,
|
@@ -6,10 +6,17 @@ module HammerCLIKatello
|
|
6
6
|
let(:api) { mock('api') }
|
7
7
|
let(:searchables) { mock('searchables') }
|
8
8
|
let(:id_resolver) { IdResolver.new api, searchables }
|
9
|
+
|
10
|
+
before(:each) do
|
11
|
+
api.stubs(:resources).returns([])
|
12
|
+
end
|
13
|
+
|
9
14
|
describe '#repository_ids' do
|
10
|
-
|
11
|
-
|
15
|
+
it 'accepts nil repository_names' do
|
16
|
+
id_resolver.stubs(:find_resources).returns([])
|
17
|
+
id_resolver.repository_ids({}).must_equal(nil)
|
12
18
|
end
|
19
|
+
|
13
20
|
it 'accepts repository_ids' do
|
14
21
|
id_resolver.repository_ids(
|
15
22
|
'option_repository_ids' => [1, 2]
|
@@ -28,5 +35,13 @@ module HammerCLIKatello
|
|
28
35
|
).must_equal [1, 2]
|
29
36
|
end
|
30
37
|
end
|
38
|
+
|
39
|
+
describe '#repository_id' do
|
40
|
+
it 'resolves ID from name' do
|
41
|
+
id_resolver.expects(:find_resource).with(:repositories, name: 'repo1').returns('id' => 5)
|
42
|
+
options = {name: 'repo1'}
|
43
|
+
id_resolver.repository_id(options).must_equal 5
|
44
|
+
end
|
45
|
+
end
|
31
46
|
end
|
32
47
|
end
|
@@ -1,9 +1,6 @@
|
|
1
1
|
require_relative '../test_helper'
|
2
|
-
require 'hammer_cli_katello/search_options_creators'
|
3
|
-
|
4
|
-
class SearchOptionsCreatorsMock
|
5
|
-
include HammerCLIKatello::SearchOptionsCreators
|
6
2
|
|
3
|
+
class SearchOptionsCreatorsMock < HammerCLIKatello::IdResolver
|
7
4
|
def one
|
8
5
|
end
|
9
6
|
|
@@ -12,11 +9,31 @@ class SearchOptionsCreatorsMock
|
|
12
9
|
end
|
13
10
|
|
14
11
|
describe HammerCLIKatello::SearchOptionsCreators do
|
15
|
-
|
16
|
-
let(:
|
12
|
+
let(:api) { mock('api') }
|
13
|
+
let(:searchables) { HammerCLIKatello::Searchables.new }
|
14
|
+
let(:search_options_creators) { SearchOptionsCreatorsMock.new(api, searchables) }
|
17
15
|
let(:options) { Hash.new }
|
18
16
|
let(:resource) { mock('ApipieBindings::Resource') }
|
19
17
|
|
18
|
+
before(:each) do
|
19
|
+
api.stubs(:resources).returns([resource])
|
20
|
+
resource.stubs(:singular_name).returns('')
|
21
|
+
end
|
22
|
+
|
23
|
+
describe '#create_repository_search_options' do
|
24
|
+
it 'handles a repository' do
|
25
|
+
search_options_creators.create_repository_search_options(
|
26
|
+
'option_name' => 'repo1'
|
27
|
+
)['name'].must_equal 'repo1'
|
28
|
+
end
|
29
|
+
|
30
|
+
it 'handles an organization_id' do
|
31
|
+
search_options_creators.create_repository_search_options(
|
32
|
+
'option_organization_id' => 2
|
33
|
+
)['organization_id'].must_equal 2
|
34
|
+
end
|
35
|
+
end
|
36
|
+
|
20
37
|
describe '#create_repositories_search_options' do
|
21
38
|
it 'handles an array of names' do
|
22
39
|
search_options_creators.create_repositories_search_options(
|
@@ -35,6 +52,12 @@ describe HammerCLIKatello::SearchOptionsCreators do
|
|
35
52
|
'option_product_id' => 3
|
36
53
|
)['product_id'].must_equal 3
|
37
54
|
end
|
55
|
+
|
56
|
+
it 'handles an organization_id' do
|
57
|
+
search_options_creators.create_repositories_search_options(
|
58
|
+
'option_organization_id' => 4
|
59
|
+
)['organization_id'].must_equal 4
|
60
|
+
end
|
38
61
|
end
|
39
62
|
|
40
63
|
describe '#create_content_view_versions_search_options(options)' do
|
@@ -58,9 +81,19 @@ describe HammerCLIKatello::SearchOptionsCreators do
|
|
58
81
|
end
|
59
82
|
end
|
60
83
|
|
61
|
-
describe
|
62
|
-
|
84
|
+
describe "#create_host_collections_search_options" do
|
85
|
+
it 'handles organization options' do
|
86
|
+
api.stubs(:resource)
|
87
|
+
search_options_creators.stubs(:scoped_options).returns('option_name' => 'org1')
|
88
|
+
search_options_creators.expects(:organization_id).with('option_name' => 'org1').returns(1)
|
89
|
+
search_options_creators.expects(:create_search_options_with_katello_api)
|
90
|
+
search_options_creators.create_host_collections_search_options(
|
91
|
+
'option_organization_name' => 'org1'
|
92
|
+
)
|
93
|
+
end
|
94
|
+
end
|
63
95
|
|
96
|
+
describe 'without the katello api' do
|
64
97
|
before(:each) do
|
65
98
|
search_options_creators.expects(:create_search_options_without_katello_api)
|
66
99
|
search_options_creators.stubs(:api).returns(api)
|
@@ -73,15 +106,21 @@ describe HammerCLIKatello::SearchOptionsCreators do
|
|
73
106
|
end
|
74
107
|
end
|
75
108
|
|
109
|
+
describe '#create_environments_search_options(options)' do
|
110
|
+
it 'does not use the katello api' do
|
111
|
+
search_options_creators.create_environments_search_options(:environments)
|
112
|
+
end
|
113
|
+
end
|
114
|
+
|
76
115
|
describe '#create_smart_proxies_search_options(options)' do
|
77
116
|
it 'does not use the katello api' do
|
78
|
-
search_options_creators.
|
117
|
+
search_options_creators.create_smart_proxies_search_options(:anything)
|
79
118
|
end
|
80
119
|
end
|
81
120
|
|
82
121
|
describe '#create_capsules_search_options(options)' do
|
83
122
|
it 'does not use the katello api' do
|
84
|
-
search_options_creators.
|
123
|
+
search_options_creators.create_capsules_search_options(:anything)
|
85
124
|
end
|
86
125
|
end
|
87
126
|
|
@@ -90,7 +129,6 @@ describe HammerCLIKatello::SearchOptionsCreators do
|
|
90
129
|
search_options_creators.create_organizations_search_options(:anything)
|
91
130
|
end
|
92
131
|
end
|
93
|
-
|
94
132
|
end # describe 'without the katello api'
|
95
133
|
|
96
134
|
describe '#create_search_options_with_katello_api' do
|
@@ -103,5 +141,4 @@ describe HammerCLIKatello::SearchOptionsCreators do
|
|
103
141
|
).must_equal('one' => '1', 'two' => '2')
|
104
142
|
end
|
105
143
|
end # describe '#create_search_options_with_katello_api'
|
106
|
-
|
107
144
|
end # describe HammerCLIKatello::SearchOptionsCreators
|
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.0
|
4
|
+
version: 0.1.0
|
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: 2016-
|
37
|
+
date: 2016-09-09 00:00:00.000000000 Z
|
38
38
|
dependencies:
|
39
39
|
- !ruby/object:Gem::Dependency
|
40
40
|
name: hammer_cli_foreman
|
@@ -196,14 +196,14 @@ dependencies:
|
|
196
196
|
requirements:
|
197
197
|
- - '='
|
198
198
|
- !ruby/object:Gem::Version
|
199
|
-
version: 0.
|
199
|
+
version: '0.39'
|
200
200
|
type: :development
|
201
201
|
prerelease: false
|
202
202
|
version_requirements: !ruby/object:Gem::Requirement
|
203
203
|
requirements:
|
204
204
|
- - '='
|
205
205
|
- !ruby/object:Gem::Version
|
206
|
-
version: 0.
|
206
|
+
version: '0.39'
|
207
207
|
- !ruby/object:Gem::Dependency
|
208
208
|
name: rubocop-checkstyle_formatter
|
209
209
|
requirement: !ruby/object:Gem::Requirement
|
@@ -232,14 +232,15 @@ files:
|
|
232
232
|
- lib/hammer_cli_katello/associating_commands.rb
|
233
233
|
- lib/hammer_cli_katello/capsule.rb
|
234
234
|
- lib/hammer_cli_katello/commands.rb
|
235
|
-
- lib/hammer_cli_katello/content_host.rb
|
236
235
|
- lib/hammer_cli_katello/content_view.rb
|
236
|
+
- lib/hammer_cli_katello/content_view_name_resolvable.rb
|
237
237
|
- lib/hammer_cli_katello/content_view_puppet_module.rb
|
238
238
|
- lib/hammer_cli_katello/content_view_version.rb
|
239
239
|
- lib/hammer_cli_katello/erratum.rb
|
240
240
|
- lib/hammer_cli_katello/exception_handler.rb
|
241
241
|
- lib/hammer_cli_katello/filter.rb
|
242
242
|
- lib/hammer_cli_katello/filter_rule.rb
|
243
|
+
- lib/hammer_cli_katello/foreman_search_options_creators.rb
|
243
244
|
- lib/hammer_cli_katello/gpg_key.rb
|
244
245
|
- lib/hammer_cli_katello/host.rb
|
245
246
|
- lib/hammer_cli_katello/host_collection.rb
|
@@ -247,15 +248,19 @@ files:
|
|
247
248
|
- lib/hammer_cli_katello/host_collection_package.rb
|
248
249
|
- lib/hammer_cli_katello/host_collection_package_group.rb
|
249
250
|
- lib/hammer_cli_katello/host_errata.rb
|
251
|
+
- lib/hammer_cli_katello/host_extensions.rb
|
250
252
|
- lib/hammer_cli_katello/host_package.rb
|
251
253
|
- lib/hammer_cli_katello/host_package_group.rb
|
252
254
|
- lib/hammer_cli_katello/host_subscription.rb
|
255
|
+
- lib/hammer_cli_katello/hostgroup.rb
|
256
|
+
- lib/hammer_cli_katello/hostgroup_extensions.rb
|
253
257
|
- lib/hammer_cli_katello/i18n.rb
|
254
258
|
- lib/hammer_cli_katello/id_resolver.rb
|
255
259
|
- lib/hammer_cli_katello/katello_environment_name_resolvable.rb
|
256
260
|
- lib/hammer_cli_katello/lifecycle_environment.rb
|
257
261
|
- lib/hammer_cli_katello/lifecycle_environment_name_resolvable.rb
|
258
262
|
- lib/hammer_cli_katello/organization.rb
|
263
|
+
- lib/hammer_cli_katello/organization_options.rb
|
259
264
|
- lib/hammer_cli_katello/ostree_branch.rb
|
260
265
|
- lib/hammer_cli_katello/output/fields.rb
|
261
266
|
- lib/hammer_cli_katello/output/formatters.rb
|
@@ -289,7 +294,15 @@ files:
|
|
289
294
|
- locale/zh_TW/hammer-cli-katello.po
|
290
295
|
- test/data/2.5/foreman_api.json
|
291
296
|
- test/data/3.0/foreman_api.json
|
297
|
+
- test/data/3.2/foreman_api.json
|
298
|
+
- test/data/Readme.md
|
299
|
+
- test/functional/activaton_key/add_host_collection_test.rb
|
300
|
+
- test/functional/activaton_key/create_test.rb
|
292
301
|
- test/functional/activaton_key/list_test.rb
|
302
|
+
- test/functional/activaton_key/product_content_test.rb
|
303
|
+
- test/functional/activaton_key/remove_host_collection_test.rb
|
304
|
+
- test/functional/activaton_key/subscriptions_test.rb
|
305
|
+
- test/functional/activaton_key/update_test.rb
|
293
306
|
- test/functional/capsule/content/cancel_synchronization_test.rb
|
294
307
|
- test/functional/capsule/content/capsule_content_helpers.rb
|
295
308
|
- test/functional/capsule/content/data/library_env.json
|
@@ -297,23 +310,62 @@ files:
|
|
297
310
|
- test/functional/capsule/content/data/sync_tasks.json
|
298
311
|
- test/functional/capsule/content/info_test.rb
|
299
312
|
- test/functional/capsule/content/synchronization_status_test.rb
|
313
|
+
- test/functional/content_view/add_content_view_version_test.rb
|
314
|
+
- test/functional/content_view/add_repository_test.rb
|
300
315
|
- test/functional/content_view/content_view_helpers.rb
|
301
316
|
- test/functional/content_view/create_test.rb
|
317
|
+
- test/functional/content_view/filter/create_test.rb
|
302
318
|
- test/functional/content_view/list_test.rb
|
319
|
+
- test/functional/content_view/publish_test.rb
|
320
|
+
- test/functional/content_view/puppet_module/add_test.rb
|
321
|
+
- test/functional/content_view/remove_content_view_version_test.rb
|
303
322
|
- test/functional/content_view/version/incremental_update_test.rb
|
323
|
+
- test/functional/content_view/version/list_test.rb
|
324
|
+
- test/functional/content_view/version/promote_test.rb
|
325
|
+
- test/functional/filter_rule/create_test.rb
|
304
326
|
- test/functional/host/errata/apply_test.rb
|
327
|
+
- test/functional/host/extensions/data/host.json
|
328
|
+
- test/functional/host/extensions/data/host_list.json
|
329
|
+
- test/functional/host/extensions/info_test.rb
|
330
|
+
- test/functional/host/extensions/list_test.rb
|
305
331
|
- test/functional/host/host_helpers.rb
|
332
|
+
- test/functional/host/subscription/attach_test.rb
|
333
|
+
- test/functional/host/subscription/auto_attach_test.rb
|
306
334
|
- test/functional/host/subscription/register_test.rb
|
335
|
+
- test/functional/host/subscription/remove_test.rb
|
307
336
|
- test/functional/host/subscription/unregister_test.rb
|
337
|
+
- test/functional/host_collection/add_host_test.rb
|
338
|
+
- test/functional/host_collection/copy_test.rb
|
339
|
+
- test/functional/host_collection/create_test.rb
|
340
|
+
- test/functional/host_collection/delete_test.rb
|
341
|
+
- test/functional/host_collection/hosts_test.rb
|
342
|
+
- test/functional/host_collection/info_test.rb
|
343
|
+
- test/functional/host_collection/list_test.rb
|
344
|
+
- test/functional/host_collection/remove_host_test.rb
|
345
|
+
- test/functional/host_collection/update_test.rb
|
346
|
+
- test/functional/hostgroup/create_test.rb
|
347
|
+
- test/functional/hostgroup/data/hostgroup.json
|
348
|
+
- test/functional/hostgroup/info_test.rb
|
349
|
+
- test/functional/hostgroup/update_test.rb
|
308
350
|
- test/functional/lifecycle_environment/lifecycle_environment_helpers.rb
|
309
351
|
- test/functional/organization/organization_helpers.rb
|
310
352
|
- test/functional/ping_test.rb
|
353
|
+
- test/functional/product/create_test.rb
|
354
|
+
- test/functional/product/delete_test.rb
|
355
|
+
- test/functional/product/info_test.rb
|
356
|
+
- test/functional/product/list_test.rb
|
311
357
|
- test/functional/product/product_helpers.rb
|
358
|
+
- test/functional/product/remove_sync_plan_test.rb
|
359
|
+
- test/functional/product/set_sync_plan_test.rb
|
360
|
+
- test/functional/product/update_test.rb
|
312
361
|
- test/functional/repository/info_test.rb
|
313
362
|
- test/functional/repository/list_test.rb
|
363
|
+
- test/functional/repository/remove_content_test.rb
|
314
364
|
- test/functional/repository/repository_helpers.rb
|
315
365
|
- test/functional/repository/synchronize_test.rb
|
316
366
|
- test/functional/repository/upload_test.rb
|
367
|
+
- test/functional/subscription/list_test.rb
|
368
|
+
- test/functional/sync_plan/sync_plan_helpers.rb
|
317
369
|
- test/functional/test_helper.rb
|
318
370
|
- test/task_helper.rb
|
319
371
|
- test/test_helper.rb
|
@@ -339,14 +391,22 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
339
391
|
version: '0'
|
340
392
|
requirements: []
|
341
393
|
rubyforge_project:
|
342
|
-
rubygems_version: 2.4.
|
394
|
+
rubygems_version: 2.4.6
|
343
395
|
signing_key:
|
344
396
|
specification_version: 4
|
345
397
|
summary: Katello commands for Hammer
|
346
398
|
test_files:
|
347
399
|
- test/data/2.5/foreman_api.json
|
348
400
|
- test/data/3.0/foreman_api.json
|
401
|
+
- test/data/3.2/foreman_api.json
|
402
|
+
- test/data/Readme.md
|
403
|
+
- test/functional/activaton_key/add_host_collection_test.rb
|
404
|
+
- test/functional/activaton_key/create_test.rb
|
349
405
|
- test/functional/activaton_key/list_test.rb
|
406
|
+
- test/functional/activaton_key/product_content_test.rb
|
407
|
+
- test/functional/activaton_key/remove_host_collection_test.rb
|
408
|
+
- test/functional/activaton_key/subscriptions_test.rb
|
409
|
+
- test/functional/activaton_key/update_test.rb
|
350
410
|
- test/functional/capsule/content/cancel_synchronization_test.rb
|
351
411
|
- test/functional/capsule/content/capsule_content_helpers.rb
|
352
412
|
- test/functional/capsule/content/data/library_env.json
|
@@ -354,26 +414,64 @@ test_files:
|
|
354
414
|
- test/functional/capsule/content/data/sync_tasks.json
|
355
415
|
- test/functional/capsule/content/info_test.rb
|
356
416
|
- test/functional/capsule/content/synchronization_status_test.rb
|
417
|
+
- test/functional/content_view/add_content_view_version_test.rb
|
418
|
+
- test/functional/content_view/add_repository_test.rb
|
357
419
|
- test/functional/content_view/content_view_helpers.rb
|
358
420
|
- test/functional/content_view/create_test.rb
|
421
|
+
- test/functional/content_view/filter/create_test.rb
|
359
422
|
- test/functional/content_view/list_test.rb
|
423
|
+
- test/functional/content_view/publish_test.rb
|
424
|
+
- test/functional/content_view/puppet_module/add_test.rb
|
425
|
+
- test/functional/content_view/remove_content_view_version_test.rb
|
360
426
|
- test/functional/content_view/version/incremental_update_test.rb
|
427
|
+
- test/functional/content_view/version/list_test.rb
|
428
|
+
- test/functional/content_view/version/promote_test.rb
|
429
|
+
- test/functional/filter_rule/create_test.rb
|
361
430
|
- test/functional/host/errata/apply_test.rb
|
431
|
+
- test/functional/host/extensions/data/host.json
|
432
|
+
- test/functional/host/extensions/data/host_list.json
|
433
|
+
- test/functional/host/extensions/info_test.rb
|
434
|
+
- test/functional/host/extensions/list_test.rb
|
362
435
|
- test/functional/host/host_helpers.rb
|
436
|
+
- test/functional/host/subscription/attach_test.rb
|
437
|
+
- test/functional/host/subscription/auto_attach_test.rb
|
363
438
|
- test/functional/host/subscription/register_test.rb
|
439
|
+
- test/functional/host/subscription/remove_test.rb
|
364
440
|
- test/functional/host/subscription/unregister_test.rb
|
441
|
+
- test/functional/host_collection/add_host_test.rb
|
442
|
+
- test/functional/host_collection/copy_test.rb
|
443
|
+
- test/functional/host_collection/create_test.rb
|
444
|
+
- test/functional/host_collection/delete_test.rb
|
445
|
+
- test/functional/host_collection/hosts_test.rb
|
446
|
+
- test/functional/host_collection/info_test.rb
|
447
|
+
- test/functional/host_collection/list_test.rb
|
448
|
+
- test/functional/host_collection/remove_host_test.rb
|
449
|
+
- test/functional/host_collection/update_test.rb
|
450
|
+
- test/functional/hostgroup/create_test.rb
|
451
|
+
- test/functional/hostgroup/data/hostgroup.json
|
452
|
+
- test/functional/hostgroup/info_test.rb
|
453
|
+
- test/functional/hostgroup/update_test.rb
|
365
454
|
- test/functional/lifecycle_environment/lifecycle_environment_helpers.rb
|
366
455
|
- test/functional/organization/organization_helpers.rb
|
367
456
|
- test/functional/ping_test.rb
|
457
|
+
- test/functional/product/create_test.rb
|
458
|
+
- test/functional/product/delete_test.rb
|
459
|
+
- test/functional/product/info_test.rb
|
460
|
+
- test/functional/product/list_test.rb
|
368
461
|
- test/functional/product/product_helpers.rb
|
462
|
+
- test/functional/product/remove_sync_plan_test.rb
|
463
|
+
- test/functional/product/set_sync_plan_test.rb
|
464
|
+
- test/functional/product/update_test.rb
|
369
465
|
- test/functional/repository/info_test.rb
|
370
466
|
- test/functional/repository/list_test.rb
|
467
|
+
- test/functional/repository/remove_content_test.rb
|
371
468
|
- test/functional/repository/repository_helpers.rb
|
372
469
|
- test/functional/repository/synchronize_test.rb
|
373
470
|
- test/functional/repository/upload_test.rb
|
471
|
+
- test/functional/subscription/list_test.rb
|
472
|
+
- test/functional/sync_plan/sync_plan_helpers.rb
|
374
473
|
- test/functional/test_helper.rb
|
375
474
|
- test/task_helper.rb
|
376
475
|
- test/test_helper.rb
|
377
476
|
- test/unit/id_resolver_test.rb
|
378
477
|
- test/unit/search_options_creators_test.rb
|
379
|
-
has_rdoc:
|