hammer_cli_foreman 0.15.0 → 0.15.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/doc/release_notes.md +7 -0
- data/lib/hammer_cli_foreman.rb +4 -0
- data/lib/hammer_cli_foreman/api/interactive_basic_auth.rb +3 -5
- data/lib/hammer_cli_foreman/commands.rb +45 -0
- data/lib/hammer_cli_foreman/host.rb +1 -1
- data/lib/hammer_cli_foreman/hostgroup.rb +1 -1
- data/lib/hammer_cli_foreman/hosts/common_update_options.rb +1 -1
- data/lib/hammer_cli_foreman/option_sources/user_params.rb +1 -1
- data/lib/hammer_cli_foreman/report_template.rb +161 -0
- data/lib/hammer_cli_foreman/version.rb +1 -1
- data/test/data/1.20/foreman_api.json +1 -0
- data/test/functional/hostgroup/create_test.rb +3 -3
- data/test/functional/hostgroup/update_test.rb +3 -3
- data/test/functional/report_template_test.rb +254 -0
- data/test/functional/subnet/create_test.rb +3 -3
- data/test/functional/subnet/update_test.rb +5 -5
- data/test/test_helper.rb +1 -1
- metadata +9 -4
@@ -22,7 +22,7 @@ module HammerCLIForeman
|
|
22
22
|
end
|
23
23
|
|
24
24
|
it 'allows dhcp id' do
|
25
|
-
api_expects(:subnets, :create).with_params(subnet_params(:dhcp_id =>
|
25
|
+
api_expects(:subnets, :create).with_params(subnet_params(:dhcp_id => 1))
|
26
26
|
run_cmd(%w(subnet create --name net1 --network=192.168.122.0 --mask=255.255.255.0 --dhcp-id 1))
|
27
27
|
end
|
28
28
|
|
@@ -34,7 +34,7 @@ module HammerCLIForeman
|
|
34
34
|
end
|
35
35
|
|
36
36
|
it 'allows dns id' do
|
37
|
-
api_expects(:subnets, :create).with_params(subnet_params(:dns_id =>
|
37
|
+
api_expects(:subnets, :create).with_params(subnet_params(:dns_id => 1))
|
38
38
|
run_cmd(%w(subnet create --name net1 --network=192.168.122.0 --mask=255.255.255.0 --dns-id 1))
|
39
39
|
end
|
40
40
|
|
@@ -46,7 +46,7 @@ module HammerCLIForeman
|
|
46
46
|
end
|
47
47
|
|
48
48
|
it 'allows tftp id' do
|
49
|
-
api_expects(:subnets, :create).with_params(subnet_params(:tftp_id =>
|
49
|
+
api_expects(:subnets, :create).with_params(subnet_params(:tftp_id => 1))
|
50
50
|
run_cmd(%w(subnet create --name net1 --network=192.168.122.0 --mask=255.255.255.0 --tftp-id 1))
|
51
51
|
end
|
52
52
|
|
@@ -6,7 +6,7 @@ module HammerCLIForeman
|
|
6
6
|
describe UpdateCommand do
|
7
7
|
def subnet_params(additional_params = {})
|
8
8
|
params = {
|
9
|
-
:id =>
|
9
|
+
:id => 1,
|
10
10
|
:subnet => {}
|
11
11
|
}
|
12
12
|
params[:subnet].merge!(additional_params)
|
@@ -15,13 +15,13 @@ module HammerCLIForeman
|
|
15
15
|
|
16
16
|
it 'allows minimal options' do
|
17
17
|
api_expects(:subnets, :update) do |par|
|
18
|
-
par['id'] ==
|
18
|
+
par['id'] == 1
|
19
19
|
end
|
20
20
|
run_cmd(%w(subnet update --id 1))
|
21
21
|
end
|
22
22
|
|
23
23
|
it 'allows dhcp id' do
|
24
|
-
api_expects(:subnets, :update).with_params(subnet_params(:dhcp_id =>
|
24
|
+
api_expects(:subnets, :update).with_params(subnet_params(:dhcp_id => 1))
|
25
25
|
run_cmd(%w(subnet update --id 1 --dhcp-id 1))
|
26
26
|
end
|
27
27
|
|
@@ -33,7 +33,7 @@ module HammerCLIForeman
|
|
33
33
|
end
|
34
34
|
|
35
35
|
it 'allows dns id' do
|
36
|
-
api_expects(:subnets, :update).with_params(subnet_params(:dns_id =>
|
36
|
+
api_expects(:subnets, :update).with_params(subnet_params(:dns_id => 1))
|
37
37
|
run_cmd(%w(subnet update --id 1 --dns-id 1))
|
38
38
|
end
|
39
39
|
|
@@ -45,7 +45,7 @@ module HammerCLIForeman
|
|
45
45
|
end
|
46
46
|
|
47
47
|
it 'allows tftp id' do
|
48
|
-
api_expects(:subnets, :update).with_params(subnet_params(:tftp_id =>
|
48
|
+
api_expects(:subnets, :update).with_params(subnet_params(:tftp_id => 1))
|
49
49
|
run_cmd(%w(subnet update --id 1 --tftp-id 1))
|
50
50
|
end
|
51
51
|
|
data/test/test_helper.rb
CHANGED
@@ -17,7 +17,7 @@ require "mocha/setup"
|
|
17
17
|
require 'hammer_cli'
|
18
18
|
require 'hammer_cli_foreman/testing/api_expectations'
|
19
19
|
|
20
|
-
FOREMAN_VERSION = Gem::Version.new(ENV['TEST_API_VERSION'] || '1.
|
20
|
+
FOREMAN_VERSION = Gem::Version.new(ENV['TEST_API_VERSION'] || '1.20')
|
21
21
|
|
22
22
|
include HammerCLIForeman::Testing::APIExpectations
|
23
23
|
HammerCLI.context[:api_connection].create('foreman') do
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: hammer_cli_foreman
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.15.
|
4
|
+
version: 0.15.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Tomáš Strachota
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2018-
|
12
|
+
date: 2018-11-06 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: hammer_cli
|
@@ -17,14 +17,14 @@ dependencies:
|
|
17
17
|
requirements:
|
18
18
|
- - ">="
|
19
19
|
- !ruby/object:Gem::Version
|
20
|
-
version: 0.15.
|
20
|
+
version: 0.15.1
|
21
21
|
type: :runtime
|
22
22
|
prerelease: false
|
23
23
|
version_requirements: !ruby/object:Gem::Requirement
|
24
24
|
requirements:
|
25
25
|
- - ">="
|
26
26
|
- !ruby/object:Gem::Version
|
27
|
-
version: 0.15.
|
27
|
+
version: 0.15.1
|
28
28
|
- !ruby/object:Gem::Dependency
|
29
29
|
name: apipie-bindings
|
30
30
|
requirement: !ruby/object:Gem::Requirement
|
@@ -159,6 +159,7 @@ files:
|
|
159
159
|
- lib/hammer_cli_foreman/puppet_class.rb
|
160
160
|
- lib/hammer_cli_foreman/realm.rb
|
161
161
|
- lib/hammer_cli_foreman/references.rb
|
162
|
+
- lib/hammer_cli_foreman/report_template.rb
|
162
163
|
- lib/hammer_cli_foreman/resource_supported_test.rb
|
163
164
|
- lib/hammer_cli_foreman/role.rb
|
164
165
|
- lib/hammer_cli_foreman/settings.rb
|
@@ -193,6 +194,7 @@ files:
|
|
193
194
|
- test/data/1.16/foreman_api.json
|
194
195
|
- test/data/1.17/foreman_api.json
|
195
196
|
- test/data/1.18/foreman_api.json
|
197
|
+
- test/data/1.20/foreman_api.json
|
196
198
|
- test/data/README.md
|
197
199
|
- test/functional/audit_test.rb
|
198
200
|
- test/functional/auth_source_test.rb
|
@@ -206,6 +208,7 @@ files:
|
|
206
208
|
- test/functional/organization_test.rb
|
207
209
|
- test/functional/personal_access_token_test.rb
|
208
210
|
- test/functional/proxy_test.rb
|
211
|
+
- test/functional/report_template_test.rb
|
209
212
|
- test/functional/role_test.rb
|
210
213
|
- test/functional/settings_test.rb
|
211
214
|
- test/functional/smart_class_parameter_test.rb
|
@@ -850,10 +853,12 @@ test_files:
|
|
850
853
|
- test/functional/hostgroup/create_test.rb
|
851
854
|
- test/functional/audit_test.rb
|
852
855
|
- test/functional/personal_access_token_test.rb
|
856
|
+
- test/functional/report_template_test.rb
|
853
857
|
- test/functional/template_test.rb
|
854
858
|
- test/functional/test_helper.rb
|
855
859
|
- test/data/1.16/foreman_api.json
|
856
860
|
- test/data/1.11/foreman_api.json
|
861
|
+
- test/data/1.20/foreman_api.json
|
857
862
|
- test/data/1.14/_foreman_api.json
|
858
863
|
- test/data/1.14/foreman_api.json
|
859
864
|
- test/data/1.18/foreman_api.json
|