foreman_omaha 4.0.0 → 5.0.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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 2d18486e7d9ec48f38e24dc3230ac7952154b6368bb03b6200b530d40dfccb56
4
- data.tar.gz: a35576ff4b8182f2d12364c3440d8fea31e194f1c39e4b8ed9787a5f487fdb69
3
+ metadata.gz: 4de0935e85838acb0fdd917072c2619b9fb24eb9496f8075ecf5addc0c517e4f
4
+ data.tar.gz: '0047259a6a55630216f155c2751c391256fddb5b11d8f47a2494d647283b4a62'
5
5
  SHA512:
6
- metadata.gz: ea1a506216f9a64abe54920027716bfe31557db3d32b7cd867ad10c7bf6617f76413264be1b560bee338d6ece41c04b4752631cb773b27d53f664431b848fc5b
7
- data.tar.gz: 9209885e3ca0b369d6acca9de2b59fbca45ce5d97ab163aa9d922bf6091f81453609c4fe0764f3b57b02cb162d7a5a093ed814d533f7b6d786743e47e83f8447
6
+ metadata.gz: d1aa36e5c03a1104802f968f9417217ffcb67c628aefba80efc4ecadd6ba940275d0c08ce9c2a490ec8ddb66782f8bf366945732506ad3244ef3f0e849667447
7
+ data.tar.gz: 32bf0acccb2ebd329f66651874fa1b68822851c7c1c9ce8d85b0c45e29505455b1fd2be09e59c0564f5173f1ddca8940c81dda13f2848817c777ebaaaf6805dd
data/README.md CHANGED
@@ -13,6 +13,7 @@ Foreman core already supports deploying CoreOS hosts and is great for on-premise
13
13
  | >= 1.18 | ~> 2.0 |
14
14
  | >= 1.20 | ~> 3.0 |
15
15
  | >= 1.24 | ~> 4.0 |
16
+ | >= 3.0 | ~> 5.0 |
16
17
 
17
18
  ## Installation
18
19
 
data/Rakefile CHANGED
@@ -1,4 +1,6 @@
1
1
  #!/usr/bin/env rake
2
+ # frozen_string_literal: true
3
+
2
4
  begin
3
5
  require 'bundler/setup'
4
6
  rescue LoadError
@@ -20,7 +22,7 @@ RDoc::Task.new(:rdoc) do |rdoc|
20
22
  rdoc.rdoc_files.include('lib/**/*.rb')
21
23
  end
22
24
 
23
- APP_RAKEFILE = File.expand_path('../test/dummy/Rakefile', __FILE__)
25
+ APP_RAKEFILE = File.expand_path('test/dummy/Rakefile', __dir__)
24
26
 
25
27
  Bundler::GemHelper.install_tasks
26
28
 
@@ -38,7 +40,7 @@ task default: :test
38
40
  begin
39
41
  require 'rubocop/rake_task'
40
42
  RuboCop::RakeTask.new
41
- rescue => _
43
+ rescue StandardError => _e
42
44
  puts 'Rubocop not loaded.'
43
45
  end
44
46
 
@@ -17,10 +17,10 @@ class OmahaHostsController < ApplicationController
17
17
 
18
18
  def welcome
19
19
  has_entries = begin
20
- resource_base.first.nil?
21
- rescue StandardError
22
- false
23
- end
20
+ resource_base.first.nil?
21
+ rescue StandardError
22
+ false
23
+ end
24
24
  if has_entries
25
25
  @welcome = true
26
26
  render :welcome
@@ -0,0 +1,13 @@
1
+ # frozen_string_literal: true
2
+
3
+ module ForemanOmaha
4
+ module Types
5
+ module HostExtensions
6
+ extend ActiveSupport::Concern
7
+
8
+ included do
9
+ has_many :omaha_reports, ForemanOmaha::Types::OmahaReport
10
+ end
11
+ end
12
+ end
13
+ end
@@ -0,0 +1,21 @@
1
+ # frozen_string_literal: true
2
+
3
+ module ForemanOmaha
4
+ module Types
5
+ class OmahaGroup < ::Types::BaseObject
6
+ model_class ForemanOmaha::OmahaGroup
7
+ description 'An Omaha Group'
8
+
9
+ global_id_field :id
10
+ timestamps
11
+ field :name, String
12
+ field :uuid, String
13
+
14
+ has_many :hosts, ::Types::Host
15
+
16
+ def self.graphql_definition
17
+ super.tap { |type| type.instance_variable_set(:@name, 'ForemanOmaha::OmahaGroup') }
18
+ end
19
+ end
20
+ end
21
+ end
@@ -0,0 +1,21 @@
1
+ # frozen_string_literal: true
2
+
3
+ module ForemanOmaha
4
+ module Types
5
+ class OmahaReport < ::Types::BaseObject
6
+ model_class ForemanOmaha::OmahaReport
7
+ description 'An Omaha Report'
8
+
9
+ global_id_field :id
10
+ timestamps
11
+ field :status, ForemanOmaha::Types::OmahaReportStatusEnum
12
+ field :omaha_version, String
13
+
14
+ belongs_to :host, ::Types::Host
15
+
16
+ def self.graphql_definition
17
+ super.tap { |type| type.instance_variable_set(:@name, 'ForemanOmaha::OmahaReport') }
18
+ end
19
+ end
20
+ end
21
+ end
@@ -0,0 +1,11 @@
1
+ # frozen_string_literal: true
2
+
3
+ module ForemanOmaha
4
+ module Types
5
+ class OmahaReportStatusEnum < ::Types::BaseEnum
6
+ ForemanOmaha::OmahaFacet::VALID_OMAHA_STATUSES.each do |status|
7
+ value status
8
+ end
9
+ end
10
+ end
11
+ end
@@ -13,13 +13,13 @@ module ForemanOmaha
13
13
  version_list = omaha_group.operatingsystems.pluck(:major, :minor).map { |v| Gem::Version.new(v.join('.')) }.sort.reverse
14
14
  current = version_list.max
15
15
  content_tag :div, :class => 'progress version-breakdown' do
16
- safe_join(versions.map do |version|
16
+ safe_join(versions.compact.map do |version|
17
17
  semver = Gem::Version.new(version[:version])
18
18
  position = version_list.index(semver)
19
19
  css = {
20
20
  :width => "#{version[:percentage]}%"
21
21
  }
22
- label = if semver > current
22
+ label = if !current || semver > current
23
23
  :info
24
24
  elsif semver == current
25
25
  :success
@@ -15,10 +15,7 @@ module ForemanOmaha
15
15
 
16
16
  def to_chart_data
17
17
  query.map do |oem, count|
18
- {
19
- :label => oem,
20
- :data => count
21
- }
18
+ [oem, count]
22
19
  end
23
20
  end
24
21
  end
@@ -15,11 +15,7 @@ module ForemanOmaha
15
15
 
16
16
  def to_chart_data
17
17
  query.map do |status, count|
18
- {
19
- :label => status_label(status),
20
- :data => count,
21
- :color => status_color(status)
22
- }
18
+ [status_label(status), count]
23
19
  end
24
20
  end
25
21
 
@@ -15,10 +15,7 @@ module ForemanOmaha
15
15
 
16
16
  def to_chart_data
17
17
  query.map do |version, count|
18
- {
19
- :label => version,
20
- :data => count
21
- }
18
+ [version, count]
22
19
  end
23
20
  end
24
21
  end
@@ -5,6 +5,7 @@ require 'open3'
5
5
  module ForemanOmaha
6
6
  class ContainerLinuxConfigTranspiler
7
7
  class TranspilerNotFound < StandardError; end
8
+
8
9
  class TranspileError < StandardError; end
9
10
 
10
11
  attr_accessor :input, :output, :errors, :status
@@ -0,0 +1,9 @@
1
+ # frozen_string_literal: true
2
+
3
+ module ForemanOmaha
4
+ module TemplateRendererHelper
5
+ def transpile_container_linux_config(input)
6
+ ForemanOmaha::ContainerLinuxConfigTranspiler.new(input).run!
7
+ end
8
+ end
9
+ end
@@ -71,37 +71,37 @@
71
71
  <div class="card-pf-body">
72
72
  <div class="row">
73
73
  <div class="col-xs-12 col-sm-4 col-md-4">
74
- <h3 class="card-pf-subtitle"><%= _('Version Distribution') %></h3>
75
74
  <%=
76
- flot_pie_chart(
77
- 'omaha_status_distribution_chart',
78
- _('Version Distribution'),
79
- @version_distribution.to_chart_data,
80
- :class => 'statistics-pie small',
81
- :search => "omaha_group = #{@omaha_group} and omaha_version = ~VAL~"
75
+ react_component('ChartBox', type: 'donut',
76
+ status: 'RESOLVED',
77
+ title: _('Version Distribution'),
78
+ chart: {
79
+ data: @version_distribution.to_chart_data,
80
+ search: hosts_path(search: "omaha_group = #{@omaha_group} and omaha_version = ~VAL~")
81
+ }
82
82
  )
83
83
  %>
84
84
  </div>
85
85
  <div class="col-xs-12 col-sm-4 col-md-4">
86
- <h3 class="card-pf-subtitle"><%= _('Host Upgrade Progress') %></h3>
87
86
  <%=
88
- flot_pie_chart(
89
- 'omaha_status_distribution_chart',
90
- _('Version Distribution'),
91
- @status_distribution.to_chart_data,
92
- :class => 'statistics-pie small'
87
+ react_component('ChartBox', type: 'donut',
88
+ status: 'RESOLVED',
89
+ title: _('Host Upgrade Progress'),
90
+ chart: {
91
+ data: @status_distribution.to_chart_data
92
+ }
93
93
  )
94
94
  %>
95
95
  </div>
96
96
  <div class="col-xs-12 col-sm-4 col-md-4">
97
- <h3 class="card-pf-subtitle"><%= _('OEM Distribution') %></h3>
98
97
  <%=
99
- flot_pie_chart(
100
- 'omaha_oem_distribution_chart',
101
- _('OEM Distribution'),
102
- @oem_distribution.to_chart_data,
103
- :class => 'statistics-pie small',
104
- :search => "omaha_group = #{@omaha_group} and omaha_oem = ~VAL~"
98
+ react_component('ChartBox', type: 'donut',
99
+ status: 'RESOLVED',
100
+ title: _('OEM Distribution'),
101
+ chart: {
102
+ data: @oem_distribution.to_chart_data,
103
+ search: hosts_path(search: "omaha_group = #{@omaha_group} and omaha_oem = ~VAL~")
104
+ }
105
105
  )
106
106
  %>
107
107
  </div>
@@ -186,13 +186,3 @@
186
186
  </div>
187
187
  <% end %>
188
188
  </div>
189
- <script>
190
- $(document).on('ContentLoad', function () {
191
- refreshCharts();
192
- // matchHeight the contents of each .card-pf and then the .card-pf itself
193
- $(".row-cards-pf > [class*='col'] > .card-pf .card-pf-title").matchHeight();
194
- $(".row-cards-pf > [class*='col'] > .card-pf > .card-pf-body").matchHeight();
195
- $(".row-cards-pf > [class*='col'] > .card-pf > .card-pf-footer").matchHeight();
196
- $(".row-cards-pf > [class*='col'] > .card-pf").matchHeight();
197
- });
198
- </script>
@@ -11,7 +11,6 @@ module ForemanOmaha
11
11
  config.autoload_paths += Dir["#{config.root}/app/models/concerns"]
12
12
  config.autoload_paths += Dir["#{config.root}/app/services"]
13
13
  config.autoload_paths += Dir["#{config.root}/app/lib"]
14
- config.autoload_paths += Dir["#{config.root}/app/graphql"]
15
14
 
16
15
  # Add any db migrations
17
16
  initializer 'foreman_omaha.load_app_instance_data' do |app|
@@ -22,7 +21,10 @@ module ForemanOmaha
22
21
 
23
22
  initializer 'foreman_omaha.register_plugin', :before => :finisher_hook do |_app|
24
23
  Foreman::Plugin.register :foreman_omaha do
25
- requires_foreman '>= 1.24'
24
+ requires_foreman '>= 3.0'
25
+
26
+ automatic_assets(false)
27
+ precompile_assets(['foreman_omaha/version_breakdown.css', 'foreman_omaha/application.js'])
26
28
 
27
29
  apipie_documented_controllers ["#{ForemanOmaha::Engine.root}/app/controllers/api/v2/*.rb"]
28
30
 
@@ -95,18 +97,14 @@ module ForemanOmaha
95
97
  add_controller_action_scope('HostsController', :index) { |base_scope| base_scope.includes(:omaha_facet) }
96
98
 
97
99
  # add renderer extensions
100
+ extend_template_helpers ForemanOmaha::TemplateRendererHelper
98
101
  allowed_template_helpers :transpile_container_linux_config
99
102
 
100
- # graphql extensions
101
- extend_graphql_type type: Types::Host do
102
- has_many :omaha_reports, Types::OmahaReport
103
- end
104
-
105
- register_graphql_query_field :omaha_group, '::Types::OmahaGroup', :record_field
106
- register_graphql_query_field :omaha_groups, '::Types::OmahaGroup', :collection_field
103
+ register_graphql_query_field :omaha_group, 'ForemanOmaha::Types::OmahaGroup', :record_field
104
+ register_graphql_query_field :omaha_groups, 'ForemanOmaha::Types::OmahaGroup', :collection_field
107
105
 
108
- register_graphql_query_field :omaha_report, '::Types::OmahaReport', :record_field
109
- register_graphql_query_field :omaha_reports, '::Types::OmahaReport', :collection_field
106
+ register_graphql_query_field :omaha_report, 'ForemanOmaha::Types::OmahaReport', :record_field
107
+ register_graphql_query_field :omaha_reports, 'ForemanOmaha::Types::OmahaReport', :collection_field
110
108
  end
111
109
 
112
110
  # Extend built in permissions
@@ -118,17 +116,20 @@ module ForemanOmaha
118
116
 
119
117
  # Include concerns in this config.to_prepare block
120
118
  config.to_prepare do
121
- begin
122
- ::FactImporter.register_fact_importer(:foreman_omaha, ForemanOmaha::FactImporter)
123
- ::FactParser.register_fact_parser(:foreman_omaha, ForemanOmaha::FactParser)
124
-
125
- ::Host::Managed.include(ForemanOmaha::HostExtensions)
126
- ::Host::Managed.include(ForemanOmaha::OmahaFacetHostExtensions)
127
- ::HostsHelper.include(ForemanOmaha::HostsHelperExtensions)
128
- ::Foreman::Renderer::Scope::Base.include(ForemanOmaha::Renderer::Scope::Macros::Omaha)
129
- rescue StandardError => e
130
- Rails.logger.warn "ForemanOmaha: skipping engine hook (#{e})"
119
+ Foreman::Plugin.fact_importer_registry.register(:foreman_omaha, ForemanOmaha::FactImporter, true)
120
+
121
+ if Foreman::Plugin.respond_to?(:fact_parser_registry)
122
+ Foreman::Plugin.fact_parser_registry.register(:foreman_omaha, ForemanOmaha::FactParser, true)
123
+ else
124
+ Foreman::Plugin.fact_importer_registry.register(:foreman_omaha, ForemanOmaha::FactParser, true)
131
125
  end
126
+
127
+ ::Host::Managed.include(ForemanOmaha::HostExtensions)
128
+ ::Host::Managed.include(ForemanOmaha::OmahaFacetHostExtensions)
129
+ ::HostsHelper.include(ForemanOmaha::HostsHelperExtensions)
130
+ ::Types::Host.include(ForemanOmaha::Types::HostExtensions)
131
+ rescue StandardError => e
132
+ Rails.logger.warn "ForemanOmaha: skipping engine hook (#{e})"
132
133
  end
133
134
 
134
135
  rake_tasks do
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module ForemanOmaha
4
- VERSION = '4.0.0'
4
+ VERSION = '5.0.1'
5
5
  end
@@ -100,7 +100,7 @@ class Api::V2::OmahaReportsControllerTest < ActionController::TestCase
100
100
 
101
101
  test 'hosts with a registered smart proxy on should create a report successfully' do
102
102
  Setting[:restrict_registered_smart_proxies] = true
103
- Setting[:require_ssl_smart_proxies] = false
103
+ Setting[:require_ssl_smart_proxies] = false if Gem::Version.new(SETTINGS[:version].notag) < Gem::Version.new('3.1')
104
104
 
105
105
  proxy = FactoryBot.create(:smart_proxy, :omaha)
106
106
  host = URI.parse(proxy.url).host
@@ -17,10 +17,8 @@ module ForemanOmaha
17
17
  end
18
18
 
19
19
  test 'calculates the oem distribution' do
20
- expected = [
21
- { :label => 'rackspace', :data => 5 }
22
- ]
23
- assert_equal(expected, oem_distribition_chart.to_chart_data.sort_by { |e| e[:label] })
20
+ expected = [['rackspace', 5]]
21
+ assert_same_elements expected, oem_distribition_chart.to_chart_data
24
22
  end
25
23
  end
26
24
  end
@@ -18,11 +18,8 @@ module ForemanOmaha
18
18
  end
19
19
 
20
20
  test 'calculates the status distribution' do
21
- expected = [
22
- { :label => 'Complete', :data => 5, :color => '#89A54E' },
23
- { :label => 'Downloading', :data => 3, :color => '#3D96AE' }
24
- ]
25
- assert_equal(expected, status_distribition_chart.to_chart_data.sort_by { |e| e[:label] })
21
+ expected = [['Complete', 5], ['Downloading', 3]]
22
+ assert_same_elements expected, status_distribition_chart.to_chart_data
26
23
  end
27
24
  end
28
25
  end
@@ -18,11 +18,8 @@ module ForemanOmaha
18
18
  end
19
19
 
20
20
  test 'calculates the version distribution' do
21
- expected = [
22
- { :label => '1068.9.0', :data => 5 },
23
- { :label => '1465.7.0', :data => 7 }
24
- ]
25
- assert_equal(expected, version_distribition_chart.to_chart_data.sort_by { |e| e[:label] })
21
+ expected = [['1068.9.0', 5], ['1465.7.0', 7]]
22
+ assert_same_elements expected, version_distribition_chart.to_chart_data
26
23
  end
27
24
  end
28
25
  end
@@ -38,6 +38,11 @@ class OmahaFactsParserTest < ActiveSupport::TestCase
38
38
 
39
39
  context '#operatingsystem' do
40
40
  let(:os) { importer.operatingsystem }
41
+ let(:expected_os_default_templates) do
42
+ OsDefaultTemplate.joins(:provisioning_template)
43
+ .where(operatingsystem: os)
44
+ .where(templates: { name: Setting[:default_host_init_config_template] })
45
+ end
41
46
 
42
47
  context 'without distribution fact' do
43
48
  setup do
@@ -60,7 +65,7 @@ class OmahaFactsParserTest < ActiveSupport::TestCase
60
65
  assert_equal 'stable', os.release_name
61
66
  assert_empty os.ptables
62
67
  assert_empty os.media
63
- assert_empty os.os_default_templates
68
+ assert_same_elements os.os_default_templates, expected_os_default_templates
64
69
  end
65
70
  end
66
71
 
@@ -78,7 +83,7 @@ class OmahaFactsParserTest < ActiveSupport::TestCase
78
83
  assert_equal 'stable', os.release_name
79
84
  assert_empty os.ptables
80
85
  assert_empty os.media
81
- assert_empty os.os_default_templates
86
+ assert_same_elements os.os_default_templates, expected_os_default_templates
82
87
  end
83
88
  end
84
89
 
@@ -88,23 +93,28 @@ class OmahaFactsParserTest < ActiveSupport::TestCase
88
93
  :major => '899',
89
94
  :minor => '17.0',
90
95
  :title => 'CoreOS 899.17.0')
91
- @previous = FactoryBot.create(:coreos,
92
- :with_associations,
93
- :with_provision,
94
- :major => '1010',
95
- :minor => '5.0',
96
- :title => 'CoreOS 1010.5.0')
96
+
97
+ previous.reload
98
+ end
99
+
100
+ let(:previous) do
101
+ FactoryBot.create(:coreos,
102
+ :with_associations,
103
+ :with_provision,
104
+ :major => '1010',
105
+ :minor => '5.0',
106
+ :title => 'CoreOS 1010.5.0')
97
107
  end
98
108
 
99
109
  test 'should copy attributes from previous os version' do
100
110
  assert_equal '1068', os.major
101
111
  assert_equal '9.0', os.minor
102
- assert_equal @previous.ptables, os.ptables
103
- assert_equal @previous.architectures, os.architectures
104
- assert_equal @previous.media, os.media
105
- assert_equal @previous.os_default_templates.map(&:provisioning_template), os.os_default_templates.map(&:provisioning_template)
106
- assert_equal @previous.os_default_templates.map(&:template_kind), os.os_default_templates.map(&:template_kind)
107
- assert_equal @previous.provisioning_templates, os.provisioning_templates
112
+ assert_equal previous.ptables, os.ptables
113
+ assert_equal previous.architectures, os.architectures
114
+ assert_equal previous.media, os.media
115
+ assert_same_elements previous.os_default_templates.map(&:template_kind), os.os_default_templates.map(&:template_kind)
116
+ assert_same_elements previous.os_default_templates.map(&:provisioning_template), os.os_default_templates.map(&:provisioning_template)
117
+ assert_same_elements previous.provisioning_templates, os.provisioning_templates
108
118
  end
109
119
  end
110
120
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: foreman_omaha
3
3
  version: !ruby/object:Gem::Version
4
- version: 4.0.0
4
+ version: 5.0.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Timo Goebel
8
- autorequire:
8
+ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2020-04-08 00:00:00.000000000 Z
11
+ date: 2022-05-24 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: jquery-matchheight-rails
@@ -42,14 +42,14 @@ dependencies:
42
42
  name: rubocop
43
43
  requirement: !ruby/object:Gem::Requirement
44
44
  requirements:
45
- - - "~>"
45
+ - - ">="
46
46
  - !ruby/object:Gem::Version
47
47
  version: 0.80.0
48
48
  type: :development
49
49
  prerelease: false
50
50
  version_requirements: !ruby/object:Gem::Requirement
51
51
  requirements:
52
- - - "~>"
52
+ - - ">="
53
53
  - !ruby/object:Gem::Version
54
54
  version: 0.80.0
55
55
  - !ruby/object:Gem::Dependency
@@ -113,15 +113,15 @@ files:
113
113
  - app/controllers/omaha_groups_controller.rb
114
114
  - app/controllers/omaha_hosts_controller.rb
115
115
  - app/controllers/omaha_reports_controller.rb
116
- - app/graphql/types/omaha_group.rb
117
- - app/graphql/types/omaha_report.rb
118
- - app/graphql/types/omaha_report_status_enum.rb
116
+ - app/graphql/concerns/foreman_omaha/types/host_extensions.rb
117
+ - app/graphql/foreman_omaha/types/omaha_group.rb
118
+ - app/graphql/foreman_omaha/types/omaha_report.rb
119
+ - app/graphql/foreman_omaha/types/omaha_report_status_enum.rb
119
120
  - app/helpers/concerns/foreman_omaha/hosts_helper_extensions.rb
120
121
  - app/helpers/foreman_omaha/application_helper.rb
121
122
  - app/helpers/foreman_omaha/omaha_groups_helper.rb
122
123
  - app/helpers/omaha_hosts_helper.rb
123
124
  - app/helpers/omaha_reports_helper.rb
124
- - app/lib/foreman_omaha/renderer/scope/macros/omaha.rb
125
125
  - app/models/concerns/foreman_omaha/host_extensions.rb
126
126
  - app/models/concerns/foreman_omaha/omaha_facet_host_extensions.rb
127
127
  - app/models/foreman_omaha/fact_name.rb
@@ -138,6 +138,7 @@ files:
138
138
  - app/services/foreman_omaha/group_version_breakdown.rb
139
139
  - app/services/foreman_omaha/omaha_report_importer.rb
140
140
  - app/services/foreman_omaha/status_mapper.rb
141
+ - app/services/foreman_omaha/template_renderer_helper.rb
141
142
  - app/views/api/v2/omaha_groups/base.json.rabl
142
143
  - app/views/api/v2/omaha_groups/index.json.rabl
143
144
  - app/views/api/v2/omaha_groups/main.json.rabl
@@ -203,7 +204,7 @@ homepage: http://github.com/theforeman/foreman_omaha
203
204
  licenses:
204
205
  - GPL-3
205
206
  metadata: {}
206
- post_install_message:
207
+ post_install_message:
207
208
  rdoc_options: []
208
209
  require_paths:
209
210
  - lib
@@ -218,33 +219,32 @@ required_rubygems_version: !ruby/object:Gem::Requirement
218
219
  - !ruby/object:Gem::Version
219
220
  version: '0'
220
221
  requirements: []
221
- rubyforge_project:
222
- rubygems_version: 2.7.6.2
223
- signing_key:
222
+ rubygems_version: 3.3.3
223
+ signing_key:
224
224
  specification_version: 4
225
225
  summary: This plug-in adds support for the Omaha procotol to The Foreman.
226
226
  test_files:
227
- - test/unit/omaha_fact_parser_test.rb
228
- - test/unit/charts/version_distribution_test.rb
229
- - test/unit/charts/oem_distribution_test.rb
230
- - test/unit/charts/status_distribution_test.rb
231
- - test/unit/group_version_breakdown_test.rb
232
- - test/unit/host_test.rb
233
- - test/unit/host_status/omaha_status_test.rb
234
- - test/unit/renderer_test.rb
235
- - test/unit/omaha_report_test.rb
236
- - test/graphql/queries/omaha_group_query_test.rb
237
- - test/graphql/queries/omaha_report_query_test.rb
238
- - test/graphql/queries/omaha_groups_query_test.rb
239
- - test/graphql/queries/omaha_reports_query_test.rb
240
- - test/graphql/queries/host_query_extensions_test.rb
241
- - test/factories/smart_proxy.rb
242
227
  - test/factories/feature.rb
243
- - test/factories/host.rb
244
228
  - test/factories/foreman_omaha_factories.rb
245
- - test/test_plugin_helper.rb
246
- - test/functional/omaha_groups_controller_test.rb
247
- - test/functional/omaha_hosts_controller_test.rb
229
+ - test/factories/host.rb
230
+ - test/factories/smart_proxy.rb
248
231
  - test/functional/api/v2/omaha_groups_controller_test.rb
249
232
  - test/functional/api/v2/omaha_reports_controller_test.rb
233
+ - test/functional/omaha_groups_controller_test.rb
234
+ - test/functional/omaha_hosts_controller_test.rb
250
235
  - test/functional/omaha_reports_controller_test.rb
236
+ - test/graphql/queries/host_query_extensions_test.rb
237
+ - test/graphql/queries/omaha_group_query_test.rb
238
+ - test/graphql/queries/omaha_groups_query_test.rb
239
+ - test/graphql/queries/omaha_report_query_test.rb
240
+ - test/graphql/queries/omaha_reports_query_test.rb
241
+ - test/test_plugin_helper.rb
242
+ - test/unit/charts/oem_distribution_test.rb
243
+ - test/unit/charts/status_distribution_test.rb
244
+ - test/unit/charts/version_distribution_test.rb
245
+ - test/unit/group_version_breakdown_test.rb
246
+ - test/unit/host_status/omaha_status_test.rb
247
+ - test/unit/host_test.rb
248
+ - test/unit/omaha_fact_parser_test.rb
249
+ - test/unit/omaha_report_test.rb
250
+ - test/unit/renderer_test.rb
@@ -1,15 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- module Types
4
- class OmahaGroup < BaseObject
5
- model_class ::ForemanOmaha::OmahaGroup
6
- description 'An Omaha Group'
7
-
8
- global_id_field :id
9
- timestamps
10
- field :name, String
11
- field :uuid, String
12
-
13
- has_many :hosts, Types::Host
14
- end
15
- end
@@ -1,15 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- module Types
4
- class OmahaReport < BaseObject
5
- model_class ::ForemanOmaha::OmahaReport
6
- description 'An Omaha Report'
7
-
8
- global_id_field :id
9
- timestamps
10
- field :status, Types::OmahaReportStatusEnum
11
- field :omaha_version, String
12
-
13
- belongs_to :host, Types::Host
14
- end
15
- end
@@ -1,9 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- module Types
4
- class OmahaReportStatusEnum < BaseEnum
5
- ForemanOmaha::OmahaFacet::VALID_OMAHA_STATUSES.each do |status|
6
- value status
7
- end
8
- end
9
- end
@@ -1,15 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- module ForemanOmaha
4
- module Renderer
5
- module Scope
6
- module Macros
7
- module Omaha
8
- def transpile_container_linux_config(input)
9
- ForemanOmaha::ContainerLinuxConfigTranspiler.new(input).run!
10
- end
11
- end
12
- end
13
- end
14
- end
15
- end