foreman_rh_cloud 8.0.52 → 9.0.51

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: c1d1f1eec1e7f83d5fea8b52102c9966fd8429dd01368150b5c4448ea9d5cb92
4
- data.tar.gz: 3ecdf1a64c836187cafca7c27b9fba8cef99bb7094f3d09e2dfd085295b8f18e
3
+ metadata.gz: 1fd555061d766a7bdffb964b4fe5214a22651b2be5ebcc729f7cc689c188b2ee
4
+ data.tar.gz: 60b2ad4169a6495a372006138848f7faf63d05ec5775dc78ee16c69f0a6fa4df
5
5
  SHA512:
6
- metadata.gz: dd8dd41fd2ffbb9f66b075e4dbe73e64f9439dedc08974d73851f6a37262ff26b87fb376df6f8ce5817ee9e90bb185185805b3e5f1bd9f63120919a962794a9f
7
- data.tar.gz: 4ea0b00bd56be43485483107665dd9fab550dd362fc9e4784732b8174aed5f23527816ee320c7bf00b244f22601c60acf1386791c94909a301ff55cf250d9127
6
+ metadata.gz: 7c93f25c3b1eb2bd0b7a388f6db1dfc506da5ab98a8004752e3e737fa9585c9c226d99d56718c917f933889a06c89230e001bbb99cdf8a0337c8f312321f5f62
7
+ data.tar.gz: e2f56f3f2135515c5f647d74b89698963bc38d09214f77c3737f159b23f2fde30d90c71cea05df69ca973dd74031a8244f48c3170c3eb7b203b622de02ebe29f
@@ -18,12 +18,10 @@ module Api
18
18
 
19
19
  api :POST, "/organizations/:organization_id/rh_cloud/report", N_("Start report generation")
20
20
  param :organization_id, Integer, required: true, desc: N_("Set the current organization context for the request")
21
- param :disconnected, :bool, required: false, desc: N_('Generate the report, but do not upload')
22
21
  def generate_report
23
22
  organization_id = params[:organization_id]
24
- disconnected = params[:disconnected]
25
23
 
26
- start_report_generation(organization_id, disconnected)
24
+ start_report_generation(organization_id)
27
25
 
28
26
  render json: {
29
27
  action_status: 'success',
@@ -10,8 +10,8 @@ module InventoryUpload
10
10
  end
11
11
  end
12
12
 
13
- def start_report_generation(organization_id, disconnected)
14
- ForemanTasks.async_task(ForemanInventoryUpload::Async::GenerateReportJob, ForemanInventoryUpload.generated_reports_folder, organization_id, disconnected)
13
+ def start_report_generation(organization_id)
14
+ ForemanTasks.async_task(ForemanInventoryUpload::Async::GenerateReportJob, ForemanInventoryUpload.generated_reports_folder, organization_id)
15
15
  end
16
16
 
17
17
  def report_file(organization_id)
@@ -21,9 +21,8 @@ module ForemanInventoryUpload
21
21
 
22
22
  def generate
23
23
  organization_id = params[:organization_id]
24
- disconnected = params[:disconnected]
25
24
 
26
- start_report_generation(organization_id, disconnected)
25
+ start_report_generation(organization_id)
27
26
 
28
27
  render json: {
29
28
  action_status: 'success',
@@ -32,8 +32,8 @@ module ForemanInventoryUpload
32
32
  Dynflow::Action::Rescue::Fail
33
33
  end
34
34
 
35
- def plan_generate_report(folder, organization, disconnected)
36
- plan_action(ForemanInventoryUpload::Async::GenerateReportJob, folder, organization.id, disconnected)
35
+ def plan_generate_report(folder, organization)
36
+ plan_action(ForemanInventoryUpload::Async::GenerateReportJob, folder, organization.id)
37
37
  end
38
38
 
39
39
  def logger
@@ -5,7 +5,7 @@ module ForemanInventoryUpload
5
5
  "report_for_#{label}"
6
6
  end
7
7
 
8
- def plan(base_folder, organization_id, disconnected)
8
+ def plan(base_folder, organization_id)
9
9
  sequence do
10
10
  super(
11
11
  GenerateReportJob.output_label(organization_id),
@@ -17,8 +17,7 @@ module ForemanInventoryUpload
17
17
  QueueForUploadJob,
18
18
  base_folder,
19
19
  ForemanInventoryUpload.facts_archive_name(organization_id),
20
- organization_id,
21
- disconnected
20
+ organization_id
22
21
  )
23
22
  end
24
23
  end
@@ -1,9 +1,9 @@
1
1
  module ForemanInventoryUpload
2
2
  module Async
3
3
  class QueueForUploadJob < ::Actions::EntryAction
4
- def plan(base_folder, report_file, organization_id, disconnected)
4
+ def plan(base_folder, report_file, organization_id)
5
5
  enqueue_task = plan_self(base_folder: base_folder, report_file: report_file)
6
- plan_upload_report(enqueue_task.output[:enqueued_file_name], organization_id) unless disconnected
6
+ plan_upload_report(enqueue_task.output[:enqueued_file_name], organization_id)
7
7
  end
8
8
 
9
9
  def run
@@ -127,7 +127,7 @@ module ForemanInventoryUpload
127
127
  @stream.simple_field('os_kernel_version', fact_value(host, 'uname::release'))
128
128
  @stream.simple_field('arch', host.architecture&.name)
129
129
  @stream.simple_field('subscription_status', host.subscription_status_label)
130
- @stream.simple_field('katello_agent_running', host.content_facet&.katello_agent_installed?)
130
+ @stream.simple_field('katello_agent_running', false)
131
131
  @stream.simple_field(
132
132
  'infrastructure_type',
133
133
  ActiveModel::Type::Boolean.new.cast(fact_value(host, 'virt::is_guest')) ? 'virtual' : 'physical'
@@ -1,3 +1,3 @@
1
1
  module ForemanRhCloud
2
- VERSION = '8.0.52'.freeze
2
+ VERSION = '9.0.51'.freeze
3
3
  end
@@ -47,8 +47,7 @@ namespace :rh_cloud_inventory do
47
47
  base_folder = ENV['target'] || ForemanInventoryUpload.generated_reports_folder
48
48
  organization_id = ENV['organization_id']
49
49
  report_file = ForemanInventoryUpload.facts_archive_name(organization_id)
50
- disconnected = false
51
- ForemanTasks.sync_task(ForemanInventoryUpload::Async::QueueForUploadJob, base_folder, report_file, organization_id, disconnected)
50
+ ForemanTasks.sync_task(ForemanInventoryUpload::Async::QueueForUploadJob, base_folder, report_file, organization_id)
52
51
  puts "Uploaded #{report_file}"
53
52
  end
54
53
  end
data/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "foreman_rh_cloud",
3
- "version": "8.0.52",
3
+ "version": "9.0.51",
4
4
  "description": "Inventory Upload =============",
5
5
  "main": "index.js",
6
6
  "scripts": {
@@ -6,15 +6,14 @@ module InventoryUpload::Api
6
6
 
7
7
  setup do
8
8
  @test_org = FactoryBot.create(:organization)
9
- @disconnected = false
10
9
  end
11
10
 
12
11
  test 'Starts report generation' do
13
12
  Api::V2::RhCloud::InventoryController.any_instance
14
13
  .expects(:start_report_generation)
15
- .with(@test_org.id.to_s, @disconnected)
14
+ .with(@test_org.id.to_s)
16
15
 
17
- post :generate_report, params: { organization_id: @test_org.id, disconnected: @disconnected}
16
+ post :generate_report, params: { organization_id: @test_org.id }
18
17
 
19
18
  assert_response :success
20
19
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: foreman_rh_cloud
3
3
  version: !ruby/object:Gem::Version
4
- version: 8.0.52
4
+ version: 9.0.51
5
5
  platform: ruby
6
6
  authors:
7
7
  - Foreman Red Hat Cloud team
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2023-11-01 00:00:00.000000000 Z
11
+ date: 2023-10-12 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: katello