foreman_google 1.0.1 → 1.0.2

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: 3387889c509d7c5e6374b66fbe1a53635ecd5227a4f92dab8ab47a5227275782
4
- data.tar.gz: 1a54d851fc1b61d2a9bb5d0f8c802ff137152b0a43ecbc761a76724106510cad
3
+ metadata.gz: 8aed6119afb23b1a39f01c94f16dc797d2abc8917778b0028a546b2b8cc0a878
4
+ data.tar.gz: b9978e73177a89c99af612a5a6d70ef84bdb904c3d442ca34656a80745a928e9
5
5
  SHA512:
6
- metadata.gz: f17acaa93e46fb7bfecac30a4169d996aee5d895a3cb1f3b7b710001bba2765d122e7f2ad29a00bf184d61eeda56349a8dd662388546e51c5f67720176ece1a0
7
- data.tar.gz: af406a295cac958fcf4b9c5e4f7060f9c64e9736868be96299608ccdb4531d7802d4ca2bbf7ed2b01e3e98e1b938bded6856d0dcaede1164079317b7da63274f
6
+ metadata.gz: 1d91d97d2d0b71b29ba022baf7870900fa9e71a64a43b6c96473defc69832b2b87603310c8971a326330c1bfffcdaf7fbf1f5cf7b77bac90742a6ac511eb5935
7
+ data.tar.gz: c4247c85322dbbafcec96ab8e21aa4398e535373a274370cec97dc3119eabe4c51035802d13134a887f0cb485471bc6c0b5e07edb4827a4c256a85bd63a049ed
@@ -7,11 +7,7 @@ module Foreman
7
7
  class_methods do
8
8
  def compute_resource_params_filter
9
9
  super.tap do |filter|
10
- filter.permit :email,
11
- :key_pair,
12
- :key_path,
13
- :project,
14
- :zone
10
+ filter.permit :key_path, :zone
15
11
  end
16
12
  end
17
13
  end
@@ -8,6 +8,8 @@ module ForemanGoogle
8
8
  param :compute_resource, Hash do
9
9
  param :key_path, String, desc: N_('Certificate path, for GCE only')
10
10
  param :zone, String, desc: N_('Zone, for GCE only')
11
+ param :project, String, desc: N_('Deprecated, project is automatically loaded from the JSON file. For GCE only')
12
+ param :email, String, desc: N_('Deprecated, email is automatically loaded from the JSON file. For GCE only')
11
13
  end
12
14
  end
13
15
  end
@@ -7,6 +7,7 @@ module ForemanGoogle
7
7
  # rubocop:disable Rails/LexicallyScopedActionFilter
8
8
  included do
9
9
  before_action :read_key, only: [:create]
10
+ before_action :deprecated_params, only: [:create]
10
11
  end
11
12
  # rubocop:enable Rails/LexicallyScopedActionFilter
12
13
 
@@ -16,6 +17,19 @@ module ForemanGoogle
16
17
  return unless compute_resource_params['provider'] == 'GCE'
17
18
  params[:compute_resource][:password] = File.read(params['compute_resource'].delete('key_path'))
18
19
  end
20
+
21
+ def deprecated_params
22
+ return unless compute_resource_params['provider'] == 'GCE'
23
+
24
+ if compute_resource_params['email']
25
+ msg = _('The email parameter is deprecated, value is automatically loaded from the JSON file')
26
+ Foreman::Deprecation.api_deprecation_warning(msg)
27
+ end
28
+
29
+ return unless compute_resource_params['project']
30
+ msg = _('The project parameter is deprecated, value is automatically loaded from the JSON file')
31
+ Foreman::Deprecation.api_deprecation_warning(msg)
32
+ end
19
33
  end
20
34
  end
21
35
  end
@@ -1,3 +1,3 @@
1
1
  module ForemanGoogle
2
- VERSION = '1.0.1'.freeze
2
+ VERSION = '1.0.2'.freeze
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: foreman_google
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.1
4
+ version: 1.0.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - The Foreman Team
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2023-01-04 00:00:00.000000000 Z
11
+ date: 2023-01-31 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: google-apis-compute_v1