foreman_omaha 0.0.3 → 1.0.0
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 +5 -5
- data/README.md +5 -2
- data/app/assets/javascripts/foreman_omaha/application.js +1 -0
- data/app/assets/stylesheets/foreman_omaha/version_breakdown.scss +13 -0
- data/app/controllers/api/v2/omaha_groups_controller.rb +29 -0
- data/app/controllers/api/v2/omaha_reports_controller.rb +9 -7
- data/app/controllers/omaha_groups_controller.rb +28 -0
- data/app/controllers/omaha_hosts_controller.rb +42 -0
- data/app/controllers/omaha_reports_controller.rb +0 -11
- data/app/helpers/concerns/foreman_omaha/hosts_helper_extensions.rb +15 -6
- data/app/helpers/foreman_omaha/application_helper.rb +7 -0
- data/app/helpers/foreman_omaha/omaha_groups_helper.rb +52 -0
- data/app/helpers/omaha_hosts_helper.rb +43 -0
- data/app/models/concerns/foreman_omaha/host_extensions.rb +16 -2
- data/app/models/concerns/foreman_omaha/omaha_facet_host_extensions.rb +23 -0
- data/app/models/foreman_omaha/omaha_facet.rb +40 -0
- data/app/models/foreman_omaha/omaha_group.rb +34 -0
- data/app/models/foreman_omaha/omaha_report.rb +13 -21
- data/app/models/host_status/omaha_status.rb +6 -16
- data/app/services/foreman_omaha/charts/oem_distribution.rb +24 -0
- data/app/services/foreman_omaha/charts/status_distribution.rb +57 -0
- data/app/services/foreman_omaha/charts/version_distribution.rb +24 -0
- data/app/services/foreman_omaha/container_linux_config_transpiler.rb +33 -0
- data/app/services/foreman_omaha/fact_parser.rb +19 -3
- data/app/services/foreman_omaha/group_version_breakdown.rb +30 -0
- data/app/services/foreman_omaha/omaha_report_importer.rb +52 -3
- data/app/services/foreman_omaha/renderer_methods.rb +7 -0
- data/app/services/foreman_omaha/status_mapper.rb +53 -0
- data/app/views/api/v2/omaha_groups/base.json.rabl +3 -0
- data/app/views/api/v2/omaha_groups/index.json.rabl +3 -0
- data/app/views/api/v2/omaha_groups/main.json.rabl +5 -0
- data/app/views/api/v2/omaha_groups/show.json.rabl +3 -0
- data/app/views/application/foreman_omaha/_toolbar.html.erb +11 -0
- data/app/views/foreman_omaha/api/v2/omaha_facets/base.json.rabl +5 -0
- data/app/views/foreman_omaha/api/v2/omaha_facets/base_with_root.json.rabl +3 -0
- data/app/views/foreman_omaha/api/v2/omaha_facets/show.json.rabl +3 -0
- data/app/views/hosts/_omaha_tab.html.erb +29 -0
- data/app/views/omaha_groups/index.html.erb +34 -0
- data/app/views/omaha_groups/show.html.erb +196 -0
- data/app/views/omaha_hosts/index.html.erb +51 -0
- data/app/views/omaha_hosts/welcome.html.erb +12 -0
- data/app/views/omaha_reports/_details.html.erb +5 -3
- data/app/views/omaha_reports/_list.html.erb +2 -2
- data/app/views/omaha_reports/show.html.erb +1 -1
- data/app/views/omaha_reports/welcome.html.erb +1 -1
- data/config/routes.rb +14 -1
- data/db/migrate/20160812083100_add_omaha_fields_to_reports.foreman_omaha.rb +1 -1
- data/db/migrate/20171101204100_create_omaha_facets.foreman_omaha.rb +22 -0
- data/db/seeds.d/200_omaha_groups.rb +6 -0
- data/lib/foreman_omaha/engine.rb +74 -21
- data/lib/foreman_omaha/version.rb +1 -1
- data/lib/tasks/foreman_omaha_tasks.rake +2 -4
- data/test/factories/feature.rb +1 -1
- data/test/factories/foreman_omaha_factories.rb +16 -1
- data/test/factories/host.rb +21 -0
- data/test/factories/smart_proxy.rb +1 -1
- data/test/functional/api/v2/omaha_groups_controller_test.rb +32 -0
- data/test/functional/api/v2/omaha_reports_controller_test.rb +24 -24
- data/test/functional/omaha_groups_controller_test.rb +18 -0
- data/test/functional/omaha_hosts_controller_test.rb +11 -0
- data/test/functional/omaha_reports_controller_test.rb +13 -13
- data/test/test_plugin_helper.rb +3 -3
- data/test/unit/charts/oem_distribution_test.rb +26 -0
- data/test/unit/charts/status_distribution_test.rb +28 -0
- data/test/unit/charts/version_distribution_test.rb +28 -0
- data/test/unit/group_version_breakdown_test.rb +65 -0
- data/test/unit/host_status/omaha_status_test.rb +19 -0
- data/test/unit/host_test.rb +55 -0
- data/test/unit/omaha_fact_parser_test.rb +77 -0
- data/test/unit/omaha_report_test.rb +63 -17
- data/test/unit/renderer_test.rb +21 -0
- metadata +80 -9
@@ -0,0 +1,21 @@
|
|
1
|
+
require 'test_plugin_helper'
|
2
|
+
|
3
|
+
module ForemanOmaha
|
4
|
+
class RendererTest < ActiveSupport::TestCase
|
5
|
+
class DummyRenderer
|
6
|
+
attr_accessor :host
|
7
|
+
|
8
|
+
include Foreman::Renderer
|
9
|
+
include ForemanOmaha::RendererMethods
|
10
|
+
end
|
11
|
+
|
12
|
+
let(:renderer) { DummyRenderer.new }
|
13
|
+
|
14
|
+
test 'should transpile a container linux config' do
|
15
|
+
expected = '{"ignition":{"config":{},"timeouts":{},"version":"2.1.0"},"networkd":{},"passwd":{},"storage":{},"systemd":{}}'
|
16
|
+
ForemanOmaha::ContainerLinuxConfigTranspiler.any_instance.stubs(:run!).returns(expected)
|
17
|
+
transpiled = renderer.transpile_container_linux_config('---')
|
18
|
+
assert_equal expected, transpiled
|
19
|
+
end
|
20
|
+
end
|
21
|
+
end
|
metadata
CHANGED
@@ -1,29 +1,29 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: foreman_omaha
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0
|
4
|
+
version: 1.0.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Timo Goebel
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2018-01-15 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
|
-
name:
|
14
|
+
name: jquery-matchheight-rails
|
15
15
|
requirement: !ruby/object:Gem::Requirement
|
16
16
|
requirements:
|
17
|
-
- -
|
17
|
+
- - ">="
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version: 0
|
20
|
-
type: :
|
19
|
+
version: '0'
|
20
|
+
type: :runtime
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
|
-
- -
|
24
|
+
- - ">="
|
25
25
|
- !ruby/object:Gem::Version
|
26
|
-
version: 0
|
26
|
+
version: '0'
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: rdoc
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
@@ -38,6 +38,20 @@ dependencies:
|
|
38
38
|
- - ">="
|
39
39
|
- !ruby/object:Gem::Version
|
40
40
|
version: '0'
|
41
|
+
- !ruby/object:Gem::Dependency
|
42
|
+
name: rubocop
|
43
|
+
requirement: !ruby/object:Gem::Requirement
|
44
|
+
requirements:
|
45
|
+
- - '='
|
46
|
+
- !ruby/object:Gem::Version
|
47
|
+
version: 0.52.0
|
48
|
+
type: :development
|
49
|
+
prerelease: false
|
50
|
+
version_requirements: !ruby/object:Gem::Requirement
|
51
|
+
requirements:
|
52
|
+
- - '='
|
53
|
+
- !ruby/object:Gem::Version
|
54
|
+
version: 0.52.0
|
41
55
|
description: This plug-in adds support for the Omaha procotol to The Foreman. It allows
|
42
56
|
you to better manage and update your CoreOS servers.
|
43
57
|
email:
|
@@ -50,23 +64,54 @@ files:
|
|
50
64
|
- README.md
|
51
65
|
- Rakefile
|
52
66
|
- app/assets/images/foreman_omaha/Omaha.png
|
67
|
+
- app/assets/javascripts/foreman_omaha/application.js
|
68
|
+
- app/assets/stylesheets/foreman_omaha/version_breakdown.scss
|
69
|
+
- app/controllers/api/v2/omaha_groups_controller.rb
|
53
70
|
- app/controllers/api/v2/omaha_reports_controller.rb
|
71
|
+
- app/controllers/omaha_groups_controller.rb
|
72
|
+
- app/controllers/omaha_hosts_controller.rb
|
54
73
|
- app/controllers/omaha_reports_controller.rb
|
55
74
|
- app/helpers/concerns/foreman_omaha/hosts_helper_extensions.rb
|
75
|
+
- app/helpers/foreman_omaha/application_helper.rb
|
76
|
+
- app/helpers/foreman_omaha/omaha_groups_helper.rb
|
77
|
+
- app/helpers/omaha_hosts_helper.rb
|
56
78
|
- app/helpers/omaha_reports_helper.rb
|
57
79
|
- app/models/concerns/foreman_omaha/host_extensions.rb
|
80
|
+
- app/models/concerns/foreman_omaha/omaha_facet_host_extensions.rb
|
58
81
|
- app/models/foreman_omaha/fact_name.rb
|
82
|
+
- app/models/foreman_omaha/omaha_facet.rb
|
83
|
+
- app/models/foreman_omaha/omaha_group.rb
|
59
84
|
- app/models/foreman_omaha/omaha_report.rb
|
60
85
|
- app/models/host_status/omaha_status.rb
|
86
|
+
- app/services/foreman_omaha/charts/oem_distribution.rb
|
87
|
+
- app/services/foreman_omaha/charts/status_distribution.rb
|
88
|
+
- app/services/foreman_omaha/charts/version_distribution.rb
|
89
|
+
- app/services/foreman_omaha/container_linux_config_transpiler.rb
|
61
90
|
- app/services/foreman_omaha/fact_importer.rb
|
62
91
|
- app/services/foreman_omaha/fact_parser.rb
|
92
|
+
- app/services/foreman_omaha/group_version_breakdown.rb
|
63
93
|
- app/services/foreman_omaha/omaha_report_importer.rb
|
94
|
+
- app/services/foreman_omaha/renderer_methods.rb
|
95
|
+
- app/services/foreman_omaha/status_mapper.rb
|
96
|
+
- app/views/api/v2/omaha_groups/base.json.rabl
|
97
|
+
- app/views/api/v2/omaha_groups/index.json.rabl
|
98
|
+
- app/views/api/v2/omaha_groups/main.json.rabl
|
99
|
+
- app/views/api/v2/omaha_groups/show.json.rabl
|
64
100
|
- app/views/api/v2/omaha_reports/base.json.rabl
|
65
101
|
- app/views/api/v2/omaha_reports/create.json.rabl
|
66
102
|
- app/views/api/v2/omaha_reports/index.json.rabl
|
67
103
|
- app/views/api/v2/omaha_reports/main.json.rabl
|
68
104
|
- app/views/api/v2/omaha_reports/show.json.rabl
|
69
105
|
- app/views/api/v2/omaha_reports/update.json.rabl
|
106
|
+
- app/views/application/foreman_omaha/_toolbar.html.erb
|
107
|
+
- app/views/foreman_omaha/api/v2/omaha_facets/base.json.rabl
|
108
|
+
- app/views/foreman_omaha/api/v2/omaha_facets/base_with_root.json.rabl
|
109
|
+
- app/views/foreman_omaha/api/v2/omaha_facets/show.json.rabl
|
110
|
+
- app/views/hosts/_omaha_tab.html.erb
|
111
|
+
- app/views/omaha_groups/index.html.erb
|
112
|
+
- app/views/omaha_groups/show.html.erb
|
113
|
+
- app/views/omaha_hosts/index.html.erb
|
114
|
+
- app/views/omaha_hosts/welcome.html.erb
|
70
115
|
- app/views/omaha_reports/_details.html.erb
|
71
116
|
- app/views/omaha_reports/_list.html.erb
|
72
117
|
- app/views/omaha_reports/index.html.erb
|
@@ -74,6 +119,8 @@ files:
|
|
74
119
|
- app/views/omaha_reports/welcome.html.erb
|
75
120
|
- config/routes.rb
|
76
121
|
- db/migrate/20160812083100_add_omaha_fields_to_reports.foreman_omaha.rb
|
122
|
+
- db/migrate/20171101204100_create_omaha_facets.foreman_omaha.rb
|
123
|
+
- db/seeds.d/200_omaha_groups.rb
|
77
124
|
- db/seeds.d/60_omaha_proxy_feature.rb
|
78
125
|
- lib/foreman_omaha.rb
|
79
126
|
- lib/foreman_omaha/engine.rb
|
@@ -85,11 +132,23 @@ files:
|
|
85
132
|
- locale/gemspec.rb
|
86
133
|
- test/factories/feature.rb
|
87
134
|
- test/factories/foreman_omaha_factories.rb
|
135
|
+
- test/factories/host.rb
|
88
136
|
- test/factories/smart_proxy.rb
|
137
|
+
- test/functional/api/v2/omaha_groups_controller_test.rb
|
89
138
|
- test/functional/api/v2/omaha_reports_controller_test.rb
|
139
|
+
- test/functional/omaha_groups_controller_test.rb
|
140
|
+
- test/functional/omaha_hosts_controller_test.rb
|
90
141
|
- test/functional/omaha_reports_controller_test.rb
|
91
142
|
- test/test_plugin_helper.rb
|
143
|
+
- test/unit/charts/oem_distribution_test.rb
|
144
|
+
- test/unit/charts/status_distribution_test.rb
|
145
|
+
- test/unit/charts/version_distribution_test.rb
|
146
|
+
- test/unit/group_version_breakdown_test.rb
|
147
|
+
- test/unit/host_status/omaha_status_test.rb
|
148
|
+
- test/unit/host_test.rb
|
149
|
+
- test/unit/omaha_fact_parser_test.rb
|
92
150
|
- test/unit/omaha_report_test.rb
|
151
|
+
- test/unit/renderer_test.rb
|
93
152
|
homepage: http://github.com/theforeman/foreman_omaha
|
94
153
|
licenses:
|
95
154
|
- GPL-3
|
@@ -110,15 +169,27 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
110
169
|
version: '0'
|
111
170
|
requirements: []
|
112
171
|
rubyforge_project:
|
113
|
-
rubygems_version: 2.
|
172
|
+
rubygems_version: 2.7.3
|
114
173
|
signing_key:
|
115
174
|
specification_version: 4
|
116
175
|
summary: This plug-in adds support for the Omaha procotol to The Foreman.
|
117
176
|
test_files:
|
118
177
|
- test/factories/feature.rb
|
119
178
|
- test/factories/foreman_omaha_factories.rb
|
179
|
+
- test/factories/host.rb
|
120
180
|
- test/factories/smart_proxy.rb
|
181
|
+
- test/functional/api/v2/omaha_groups_controller_test.rb
|
121
182
|
- test/functional/api/v2/omaha_reports_controller_test.rb
|
183
|
+
- test/functional/omaha_groups_controller_test.rb
|
184
|
+
- test/functional/omaha_hosts_controller_test.rb
|
122
185
|
- test/functional/omaha_reports_controller_test.rb
|
123
186
|
- test/test_plugin_helper.rb
|
187
|
+
- test/unit/charts/oem_distribution_test.rb
|
188
|
+
- test/unit/charts/status_distribution_test.rb
|
189
|
+
- test/unit/charts/version_distribution_test.rb
|
190
|
+
- test/unit/group_version_breakdown_test.rb
|
191
|
+
- test/unit/host_status/omaha_status_test.rb
|
192
|
+
- test/unit/host_test.rb
|
193
|
+
- test/unit/omaha_fact_parser_test.rb
|
124
194
|
- test/unit/omaha_report_test.rb
|
195
|
+
- test/unit/renderer_test.rb
|