foreman_google 1.0.1 → 1.0.3

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: 3387889c509d7c5e6374b66fbe1a53635ecd5227a4f92dab8ab47a5227275782
4
- data.tar.gz: 1a54d851fc1b61d2a9bb5d0f8c802ff137152b0a43ecbc761a76724106510cad
3
+ metadata.gz: 8b338a987ab4135f00fbdb21f1aefb2bc6e09ac5337b53ea09954a72890b2bba
4
+ data.tar.gz: 78e7d640594e2b928855c5b5d6ac285e1b9ee5b984cbc14ba9aab50db64ac2aa
5
5
  SHA512:
6
- metadata.gz: f17acaa93e46fb7bfecac30a4169d996aee5d895a3cb1f3b7b710001bba2765d122e7f2ad29a00bf184d61eeda56349a8dd662388546e51c5f67720176ece1a0
7
- data.tar.gz: af406a295cac958fcf4b9c5e4f7060f9c64e9736868be96299608ccdb4531d7802d4ca2bbf7ed2b01e3e98e1b938bded6856d0dcaede1164079317b7da63274f
6
+ metadata.gz: 40a2ab4f5b7b8b690bbbf59efba473cb78d00a1a0570328f86e214a03ed3e2413b84490380b76d08e33f2758e5b31815f456432ce34be677824126af35a2ba36
7
+ data.tar.gz: cb0749dc7f3f70555574e3c68fc14f75abd60b536f0355a3551c31b1ada4e8132003c721694f8390e5ce90d7d3f92a105cb2249ad83753fbbf86080e00776545
@@ -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
@@ -33,7 +33,7 @@ module ForemanGoogle
33
33
  end
34
34
 
35
35
  def available_networks(_cluster_id = nil)
36
- client.networks.items
36
+ client.networks
37
37
  end
38
38
 
39
39
  def machine_types
@@ -1,3 +1,3 @@
1
1
  module ForemanGoogle
2
- VERSION = '1.0.1'.freeze
2
+ VERSION = '1.0.3'.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.3
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-02-06 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: google-apis-compute_v1
@@ -196,10 +196,10 @@ test_files:
196
196
  - test/fixtures/instance_start.json
197
197
  - test/fixtures/instance_stop.json
198
198
  - test/fixtures/machine_types.json
199
- - test/fixtures/networks.json
200
199
  - test/fixtures/operation_error.json
201
200
  - test/fixtures/operation_get.json
202
201
  - test/fixtures/zones.json
202
+ - test/fixtures/networks.json
203
203
  - test/factories/gce.rb
204
204
  - test/unit/foreman_google/google_compute_adapter_test.rb
205
205
  - test/unit/google_extensions/attached_disk_test.rb