foreman_google 1.0.1 → 1.0.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/app/controllers/concerns/foreman/controller/parameters/compute_resource_extension.rb +1 -5
- data/app/controllers/foreman_google/api/v2/apipie_extensions.rb +2 -0
- data/app/controllers/foreman_google/api/v2/compute_resources_extensions.rb +14 -0
- data/app/models/foreman_google/gce.rb +1 -1
- data/lib/foreman_google/version.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 8b338a987ab4135f00fbdb21f1aefb2bc6e09ac5337b53ea09954a72890b2bba
|
4
|
+
data.tar.gz: 78e7d640594e2b928855c5b5d6ac285e1b9ee5b984cbc14ba9aab50db64ac2aa
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 40a2ab4f5b7b8b690bbbf59efba473cb78d00a1a0570328f86e214a03ed3e2413b84490380b76d08e33f2758e5b31815f456432ce34be677824126af35a2ba36
|
7
|
+
data.tar.gz: cb0749dc7f3f70555574e3c68fc14f75abd60b536f0355a3551c31b1ada4e8132003c721694f8390e5ce90d7d3f92a105cb2249ad83753fbbf86080e00776545
|
@@ -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
|
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.
|
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-
|
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
|