google-cloud-container 0.4.0 → 0.4.1

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: cc38e9352fcf4315cadd3852c1986606a8c7f2ae2f36c71e0d9a2b1f373671c4
4
- data.tar.gz: '087ffd9e3464633852e42ecbc2799a5bf24f6da7af10dd2391606b8a18f5e671'
3
+ metadata.gz: 9132c33a257e828e92caab7808286975f42237a6a46e6f409991c46f87b28a31
4
+ data.tar.gz: 21810d3c90d7866ea2c7fef2492b2b3bcd8c602373c7e907082f8173c3515611
5
5
  SHA512:
6
- metadata.gz: ba8c035b4d7fd8c8898128e35df2e8d0790a7b9d17dbd6441c0f3bbf105e0ecce7f48c490abf0fc3fdc4d38486390f45fb11630d6227fe0fa87b7c30443d907a
7
- data.tar.gz: 96a7c9df583f6d7531913e64a2efe3c10a07ecc6abc5edba1010a87ca6a09095ae7ba2aa77dad2e3878046f2c5dc803403e3f337451149a53674cb96acaf27d2
6
+ metadata.gz: 4fb1883a6cffa02ad0863cec78ba0401f80d0c4afca65d8587d08799735f37175aa412a91d87776209bd9c69c6bcb941d4be52d3ee3f0b2064d0da6b4d1a9287
7
+ data.tar.gz: 47eda248e25b1eb18d0ae06bb8849a7c84d88cdacc062e170369001037fc4a46c77eb7fada8f067f0111d259873b1cb119b8bc4be4a5a5aabacd49493538ad64
data/.yardopts CHANGED
@@ -7,3 +7,5 @@
7
7
  ./lib/**/*.rb
8
8
  -
9
9
  README.md
10
+ AUTHENTICATION.md
11
+ LICENSE
@@ -0,0 +1,199 @@
1
+ # Authentication
2
+
3
+ In general, the google-cloud-container library uses [Service
4
+ Account](https://cloud.google.com/iam/docs/creating-managing-service-accounts)
5
+ credentials to connect to Google Cloud services. When running within [Google
6
+ Cloud Platform environments](#google-cloud-platform-environments)
7
+ the credentials will be discovered automatically. When running on other
8
+ environments, the Service Account credentials can be specified by providing the
9
+ path to the [JSON
10
+ keyfile](https://cloud.google.com/iam/docs/managing-service-account-keys) for
11
+ the account (or the JSON itself) in [environment
12
+ variables](#environment-variables). Additionally, Cloud SDK credentials can also
13
+ be discovered automatically, but this is only recommended during development.
14
+
15
+ ## Quickstart
16
+
17
+ 1. [Create a service account and credentials](#creating-a-service-account).
18
+ 2. Set the [environment variable](#environment-variables).
19
+
20
+ ```sh
21
+ export CONTAINER_CREDENTIALS=/path/to/json`
22
+ ```
23
+
24
+ 3. Initialize the client.
25
+
26
+ ```ruby
27
+ require "google/cloud/container"
28
+
29
+ client = Google::Cloud::Container.new
30
+ ```
31
+
32
+ ## Project and Credential Lookup
33
+
34
+ The google-cloud-container library aims to make authentication
35
+ as simple as possible, and provides several mechanisms to configure your system
36
+ without providing **Project ID** and **Service Account Credentials** directly in
37
+ code.
38
+
39
+ **Project ID** is discovered in the following order:
40
+
41
+ 1. Specify project ID in method arguments
42
+ 2. Specify project ID in configuration
43
+ 3. Discover project ID in environment variables
44
+ 4. Discover GCE project ID
45
+ 5. Discover project ID in credentials JSON
46
+
47
+ **Credentials** are discovered in the following order:
48
+
49
+ 1. Specify credentials in method arguments
50
+ 2. Specify credentials in configuration
51
+ 3. Discover credentials path in environment variables
52
+ 4. Discover credentials JSON in environment variables
53
+ 5. Discover credentials file in the Cloud SDK's path
54
+ 6. Discover GCE credentials
55
+
56
+ ### Google Cloud Platform environments
57
+
58
+ While running on Google Cloud Platform environments such as Google Compute
59
+ Engine, Google App Engine and Google Kubernetes Engine, no extra work is needed.
60
+ The **Project ID** and **Credentials** and are discovered automatically. Code
61
+ should be written as if already authenticated. Just be sure when you [set up the
62
+ GCE instance][gce-how-to], you add the correct scopes for the APIs you want to
63
+ access. For example:
64
+
65
+ * **All APIs**
66
+ * `https://www.googleapis.com/auth/cloud-platform`
67
+ * `https://www.googleapis.com/auth/cloud-platform.read-only`
68
+ * **BigQuery**
69
+ * `https://www.googleapis.com/auth/bigquery`
70
+ * `https://www.googleapis.com/auth/bigquery.insertdata`
71
+ * **Compute Engine**
72
+ * `https://www.googleapis.com/auth/compute`
73
+ * **Datastore**
74
+ * `https://www.googleapis.com/auth/datastore`
75
+ * `https://www.googleapis.com/auth/userinfo.email`
76
+ * **DNS**
77
+ * `https://www.googleapis.com/auth/ndev.clouddns.readwrite`
78
+ * **Pub/Sub**
79
+ * `https://www.googleapis.com/auth/pubsub`
80
+ * **Storage**
81
+ * `https://www.googleapis.com/auth/devstorage.full_control`
82
+ * `https://www.googleapis.com/auth/devstorage.read_only`
83
+ * `https://www.googleapis.com/auth/devstorage.read_write`
84
+
85
+ ### Environment Variables
86
+
87
+ The **Project ID** and **Credentials JSON** can be placed in environment
88
+ variables instead of declaring them directly in code. Each service has its own
89
+ environment variable, allowing for different service accounts to be used for
90
+ different services. (See the READMEs for the individual service gems for
91
+ details.) The path to the **Credentials JSON** file can be stored in the
92
+ environment variable, or the **Credentials JSON** itself can be stored for
93
+ environments such as Docker containers where writing files is difficult or not
94
+ encouraged.
95
+
96
+ The environment variables that google-cloud-container checks for project ID are:
97
+
98
+ 1. `CONTAINER_PROJECT`
99
+ 2. `GOOGLE_CLOUD_PROJECT`
100
+
101
+ The environment variables that google-cloud-container checks for credentials are configured on {Google::Cloud::Container::V1::Credentials}:
102
+
103
+ 1. `CONTAINER_CREDENTIALS` - Path to JSON file, or JSON contents
104
+ 2. `CONTAINER_KEYFILE` - Path to JSON file, or JSON contents
105
+ 3. `GOOGLE_CLOUD_CREDENTIALS` - Path to JSON file, or JSON contents
106
+ 4. `GOOGLE_CLOUD_KEYFILE` - Path to JSON file, or JSON contents
107
+ 5. `GOOGLE_APPLICATION_CREDENTIALS` - Path to JSON file
108
+
109
+ ```ruby
110
+ require "google/cloud/container"
111
+
112
+ ENV["CONTAINER_PROJECT"] = "my-project-id"
113
+ ENV["CONTAINER_CREDENTIALS"] = "path/to/keyfile.json"
114
+
115
+ client = Google::Cloud::Container.new
116
+ ```
117
+
118
+ ### Configuration
119
+
120
+ The **Project ID** and **Credentials JSON** can be configured instead of placing them in environment variables or providing them as arguments.
121
+
122
+ ```ruby
123
+ require "google/cloud/container"
124
+
125
+ Google::Cloud::Container.configure do |config|
126
+ config.project_id = "my-project-id"
127
+ config.credentials = "path/to/keyfile.json"
128
+ end
129
+
130
+ client = Google::Cloud::Container.new
131
+ ```
132
+
133
+ ### Cloud SDK
134
+
135
+ This option allows for an easy way to authenticate during development. If
136
+ credentials are not provided in code or in environment variables, then Cloud SDK
137
+ credentials are discovered.
138
+
139
+ To configure your system for this, simply:
140
+
141
+ 1. [Download and install the Cloud SDK](https://cloud.google.com/sdk)
142
+ 2. Authenticate using OAuth 2.0 `$ gcloud auth login`
143
+ 3. Write code as if already authenticated.
144
+
145
+ **NOTE:** This is _not_ recommended for running in production. The Cloud SDK
146
+ *should* only be used during development.
147
+
148
+ [gce-how-to]: https://cloud.google.com/compute/docs/authentication#using
149
+ [dev-console]: https://console.cloud.google.com/project
150
+
151
+ [enable-apis]: https://raw.githubusercontent.com/GoogleCloudPlatform/gcloud-common/master/authentication/enable-apis.png
152
+
153
+ [create-new-service-account]: https://raw.githubusercontent.com/GoogleCloudPlatform/gcloud-common/master/authentication/create-new-service-account.png
154
+ [create-new-service-account-existing-keys]: https://raw.githubusercontent.com/GoogleCloudPlatform/gcloud-common/master/authentication/create-new-service-account-existing-keys.png
155
+ [reuse-service-account]: https://raw.githubusercontent.com/GoogleCloudPlatform/gcloud-common/master/authentication/reuse-service-account.png
156
+
157
+ ## Creating a Service Account
158
+
159
+ Google Cloud requires a **Project ID** and **Service Account Credentials** to
160
+ connect to the APIs. You will use the **Project ID** and **JSON key file** to
161
+ connect to most services with google-cloud-container.
162
+
163
+ If you are not running this client within [Google Cloud Platform
164
+ environments](#google-cloud-platform-environments), you need a Google
165
+ Developers service account.
166
+
167
+ 1. Visit the [Google Developers Console][dev-console].
168
+ 1. Create a new project or click on an existing project.
169
+ 1. Activate the slide-out navigation tray and select **API Manager**. From
170
+ here, you will enable the APIs that your application requires.
171
+
172
+ ![Enable the APIs that your application requires][enable-apis]
173
+
174
+ *Note: You may need to enable billing in order to use these services.*
175
+
176
+ 1. Select **Credentials** from the side navigation.
177
+
178
+ You should see a screen like one of the following.
179
+
180
+ ![Create a new service account][create-new-service-account]
181
+
182
+ ![Create a new service account With Existing Keys][create-new-service-account-existing-keys]
183
+
184
+ Find the "Add credentials" drop down and select "Service account" to be
185
+ guided through downloading a new JSON key file.
186
+
187
+ If you want to re-use an existing service account, you can easily generate a
188
+ new key file. Just select the account you wish to re-use, and click "Generate
189
+ new JSON key":
190
+
191
+ ![Re-use an existing service account][reuse-service-account]
192
+
193
+ The key file you download will be used by this library to authenticate API
194
+ requests and should be stored in a secure location.
195
+
196
+ ## Troubleshooting
197
+
198
+ If you're having trouble authenticating you can ask for help by following the
199
+ {file:TROUBLESHOOTING.md Troubleshooting Guide}.
@@ -163,152 +163,242 @@ module Google
163
163
  @list_clusters = Google::Gax.create_api_call(
164
164
  @cluster_manager_stub.method(:list_clusters),
165
165
  defaults["list_clusters"],
166
- exception_transformer: exception_transformer
166
+ exception_transformer: exception_transformer,
167
+ params_extractor: proc do |request|
168
+ {'parent' => request.parent}
169
+ end
167
170
  )
168
171
  @get_cluster = Google::Gax.create_api_call(
169
172
  @cluster_manager_stub.method(:get_cluster),
170
173
  defaults["get_cluster"],
171
- exception_transformer: exception_transformer
174
+ exception_transformer: exception_transformer,
175
+ params_extractor: proc do |request|
176
+ {'name' => request.name}
177
+ end
172
178
  )
173
179
  @create_cluster = Google::Gax.create_api_call(
174
180
  @cluster_manager_stub.method(:create_cluster),
175
181
  defaults["create_cluster"],
176
- exception_transformer: exception_transformer
182
+ exception_transformer: exception_transformer,
183
+ params_extractor: proc do |request|
184
+ {'parent' => request.parent}
185
+ end
177
186
  )
178
187
  @update_cluster = Google::Gax.create_api_call(
179
188
  @cluster_manager_stub.method(:update_cluster),
180
189
  defaults["update_cluster"],
181
- exception_transformer: exception_transformer
190
+ exception_transformer: exception_transformer,
191
+ params_extractor: proc do |request|
192
+ {'name' => request.name}
193
+ end
182
194
  )
183
195
  @update_node_pool = Google::Gax.create_api_call(
184
196
  @cluster_manager_stub.method(:update_node_pool),
185
197
  defaults["update_node_pool"],
186
- exception_transformer: exception_transformer
198
+ exception_transformer: exception_transformer,
199
+ params_extractor: proc do |request|
200
+ {'name' => request.name}
201
+ end
187
202
  )
188
203
  @set_node_pool_autoscaling = Google::Gax.create_api_call(
189
204
  @cluster_manager_stub.method(:set_node_pool_autoscaling),
190
205
  defaults["set_node_pool_autoscaling"],
191
- exception_transformer: exception_transformer
206
+ exception_transformer: exception_transformer,
207
+ params_extractor: proc do |request|
208
+ {'name' => request.name}
209
+ end
192
210
  )
193
211
  @set_logging_service = Google::Gax.create_api_call(
194
212
  @cluster_manager_stub.method(:set_logging_service),
195
213
  defaults["set_logging_service"],
196
- exception_transformer: exception_transformer
214
+ exception_transformer: exception_transformer,
215
+ params_extractor: proc do |request|
216
+ {'name' => request.name}
217
+ end
197
218
  )
198
219
  @set_monitoring_service = Google::Gax.create_api_call(
199
220
  @cluster_manager_stub.method(:set_monitoring_service),
200
221
  defaults["set_monitoring_service"],
201
- exception_transformer: exception_transformer
222
+ exception_transformer: exception_transformer,
223
+ params_extractor: proc do |request|
224
+ {'name' => request.name}
225
+ end
202
226
  )
203
227
  @set_addons_config = Google::Gax.create_api_call(
204
228
  @cluster_manager_stub.method(:set_addons_config),
205
229
  defaults["set_addons_config"],
206
- exception_transformer: exception_transformer
230
+ exception_transformer: exception_transformer,
231
+ params_extractor: proc do |request|
232
+ {'name' => request.name}
233
+ end
207
234
  )
208
235
  @set_locations = Google::Gax.create_api_call(
209
236
  @cluster_manager_stub.method(:set_locations),
210
237
  defaults["set_locations"],
211
- exception_transformer: exception_transformer
238
+ exception_transformer: exception_transformer,
239
+ params_extractor: proc do |request|
240
+ {'name' => request.name}
241
+ end
212
242
  )
213
243
  @update_master = Google::Gax.create_api_call(
214
244
  @cluster_manager_stub.method(:update_master),
215
245
  defaults["update_master"],
216
- exception_transformer: exception_transformer
246
+ exception_transformer: exception_transformer,
247
+ params_extractor: proc do |request|
248
+ {'name' => request.name}
249
+ end
217
250
  )
218
251
  @set_master_auth = Google::Gax.create_api_call(
219
252
  @cluster_manager_stub.method(:set_master_auth),
220
253
  defaults["set_master_auth"],
221
- exception_transformer: exception_transformer
254
+ exception_transformer: exception_transformer,
255
+ params_extractor: proc do |request|
256
+ {'name' => request.name}
257
+ end
222
258
  )
223
259
  @delete_cluster = Google::Gax.create_api_call(
224
260
  @cluster_manager_stub.method(:delete_cluster),
225
261
  defaults["delete_cluster"],
226
- exception_transformer: exception_transformer
262
+ exception_transformer: exception_transformer,
263
+ params_extractor: proc do |request|
264
+ {'name' => request.name}
265
+ end
227
266
  )
228
267
  @list_operations = Google::Gax.create_api_call(
229
268
  @cluster_manager_stub.method(:list_operations),
230
269
  defaults["list_operations"],
231
- exception_transformer: exception_transformer
270
+ exception_transformer: exception_transformer,
271
+ params_extractor: proc do |request|
272
+ {'parent' => request.parent}
273
+ end
232
274
  )
233
275
  @get_operation = Google::Gax.create_api_call(
234
276
  @cluster_manager_stub.method(:get_operation),
235
277
  defaults["get_operation"],
236
- exception_transformer: exception_transformer
278
+ exception_transformer: exception_transformer,
279
+ params_extractor: proc do |request|
280
+ {'name' => request.name}
281
+ end
237
282
  )
238
283
  @cancel_operation = Google::Gax.create_api_call(
239
284
  @cluster_manager_stub.method(:cancel_operation),
240
285
  defaults["cancel_operation"],
241
- exception_transformer: exception_transformer
286
+ exception_transformer: exception_transformer,
287
+ params_extractor: proc do |request|
288
+ {'name' => request.name}
289
+ end
242
290
  )
243
291
  @get_server_config = Google::Gax.create_api_call(
244
292
  @cluster_manager_stub.method(:get_server_config),
245
293
  defaults["get_server_config"],
246
- exception_transformer: exception_transformer
294
+ exception_transformer: exception_transformer,
295
+ params_extractor: proc do |request|
296
+ {'name' => request.name}
297
+ end
247
298
  )
248
299
  @list_node_pools = Google::Gax.create_api_call(
249
300
  @cluster_manager_stub.method(:list_node_pools),
250
301
  defaults["list_node_pools"],
251
- exception_transformer: exception_transformer
302
+ exception_transformer: exception_transformer,
303
+ params_extractor: proc do |request|
304
+ {'parent' => request.parent}
305
+ end
252
306
  )
253
307
  @get_node_pool = Google::Gax.create_api_call(
254
308
  @cluster_manager_stub.method(:get_node_pool),
255
309
  defaults["get_node_pool"],
256
- exception_transformer: exception_transformer
310
+ exception_transformer: exception_transformer,
311
+ params_extractor: proc do |request|
312
+ {'name' => request.name}
313
+ end
257
314
  )
258
315
  @create_node_pool = Google::Gax.create_api_call(
259
316
  @cluster_manager_stub.method(:create_node_pool),
260
317
  defaults["create_node_pool"],
261
- exception_transformer: exception_transformer
318
+ exception_transformer: exception_transformer,
319
+ params_extractor: proc do |request|
320
+ {'parent' => request.parent}
321
+ end
262
322
  )
263
323
  @delete_node_pool = Google::Gax.create_api_call(
264
324
  @cluster_manager_stub.method(:delete_node_pool),
265
325
  defaults["delete_node_pool"],
266
- exception_transformer: exception_transformer
326
+ exception_transformer: exception_transformer,
327
+ params_extractor: proc do |request|
328
+ {'name' => request.name}
329
+ end
267
330
  )
268
331
  @rollback_node_pool_upgrade = Google::Gax.create_api_call(
269
332
  @cluster_manager_stub.method(:rollback_node_pool_upgrade),
270
333
  defaults["rollback_node_pool_upgrade"],
271
- exception_transformer: exception_transformer
334
+ exception_transformer: exception_transformer,
335
+ params_extractor: proc do |request|
336
+ {'name' => request.name}
337
+ end
272
338
  )
273
339
  @set_node_pool_management = Google::Gax.create_api_call(
274
340
  @cluster_manager_stub.method(:set_node_pool_management),
275
341
  defaults["set_node_pool_management"],
276
- exception_transformer: exception_transformer
342
+ exception_transformer: exception_transformer,
343
+ params_extractor: proc do |request|
344
+ {'name' => request.name}
345
+ end
277
346
  )
278
347
  @set_labels = Google::Gax.create_api_call(
279
348
  @cluster_manager_stub.method(:set_labels),
280
349
  defaults["set_labels"],
281
- exception_transformer: exception_transformer
350
+ exception_transformer: exception_transformer,
351
+ params_extractor: proc do |request|
352
+ {'name' => request.name}
353
+ end
282
354
  )
283
355
  @set_legacy_abac = Google::Gax.create_api_call(
284
356
  @cluster_manager_stub.method(:set_legacy_abac),
285
357
  defaults["set_legacy_abac"],
286
- exception_transformer: exception_transformer
358
+ exception_transformer: exception_transformer,
359
+ params_extractor: proc do |request|
360
+ {'name' => request.name}
361
+ end
287
362
  )
288
363
  @start_ip_rotation = Google::Gax.create_api_call(
289
364
  @cluster_manager_stub.method(:start_ip_rotation),
290
365
  defaults["start_ip_rotation"],
291
- exception_transformer: exception_transformer
366
+ exception_transformer: exception_transformer,
367
+ params_extractor: proc do |request|
368
+ {'name' => request.name}
369
+ end
292
370
  )
293
371
  @complete_ip_rotation = Google::Gax.create_api_call(
294
372
  @cluster_manager_stub.method(:complete_ip_rotation),
295
373
  defaults["complete_ip_rotation"],
296
- exception_transformer: exception_transformer
374
+ exception_transformer: exception_transformer,
375
+ params_extractor: proc do |request|
376
+ {'name' => request.name}
377
+ end
297
378
  )
298
379
  @set_node_pool_size = Google::Gax.create_api_call(
299
380
  @cluster_manager_stub.method(:set_node_pool_size),
300
381
  defaults["set_node_pool_size"],
301
- exception_transformer: exception_transformer
382
+ exception_transformer: exception_transformer,
383
+ params_extractor: proc do |request|
384
+ {'name' => request.name}
385
+ end
302
386
  )
303
387
  @set_network_policy = Google::Gax.create_api_call(
304
388
  @cluster_manager_stub.method(:set_network_policy),
305
389
  defaults["set_network_policy"],
306
- exception_transformer: exception_transformer
390
+ exception_transformer: exception_transformer,
391
+ params_extractor: proc do |request|
392
+ {'name' => request.name}
393
+ end
307
394
  )
308
395
  @set_maintenance_policy = Google::Gax.create_api_call(
309
396
  @cluster_manager_stub.method(:set_maintenance_policy),
310
397
  defaults["set_maintenance_policy"],
311
- exception_transformer: exception_transformer
398
+ exception_transformer: exception_transformer,
399
+ params_extractor: proc do |request|
400
+ {'name' => request.name}
401
+ end
312
402
  )
313
403
  end
314
404
 
@@ -173,162 +173,258 @@ module Google
173
173
  @list_clusters = Google::Gax.create_api_call(
174
174
  @cluster_manager_stub.method(:list_clusters),
175
175
  defaults["list_clusters"],
176
- exception_transformer: exception_transformer
176
+ exception_transformer: exception_transformer,
177
+ params_extractor: proc do |request|
178
+ {'parent' => request.parent}
179
+ end
177
180
  )
178
181
  @get_cluster = Google::Gax.create_api_call(
179
182
  @cluster_manager_stub.method(:get_cluster),
180
183
  defaults["get_cluster"],
181
- exception_transformer: exception_transformer
184
+ exception_transformer: exception_transformer,
185
+ params_extractor: proc do |request|
186
+ {'name' => request.name}
187
+ end
182
188
  )
183
189
  @create_cluster = Google::Gax.create_api_call(
184
190
  @cluster_manager_stub.method(:create_cluster),
185
191
  defaults["create_cluster"],
186
- exception_transformer: exception_transformer
192
+ exception_transformer: exception_transformer,
193
+ params_extractor: proc do |request|
194
+ {'parent' => request.parent}
195
+ end
187
196
  )
188
197
  @update_cluster = Google::Gax.create_api_call(
189
198
  @cluster_manager_stub.method(:update_cluster),
190
199
  defaults["update_cluster"],
191
- exception_transformer: exception_transformer
200
+ exception_transformer: exception_transformer,
201
+ params_extractor: proc do |request|
202
+ {'name' => request.name}
203
+ end
192
204
  )
193
205
  @update_node_pool = Google::Gax.create_api_call(
194
206
  @cluster_manager_stub.method(:update_node_pool),
195
207
  defaults["update_node_pool"],
196
- exception_transformer: exception_transformer
208
+ exception_transformer: exception_transformer,
209
+ params_extractor: proc do |request|
210
+ {'name' => request.name}
211
+ end
197
212
  )
198
213
  @set_node_pool_autoscaling = Google::Gax.create_api_call(
199
214
  @cluster_manager_stub.method(:set_node_pool_autoscaling),
200
215
  defaults["set_node_pool_autoscaling"],
201
- exception_transformer: exception_transformer
216
+ exception_transformer: exception_transformer,
217
+ params_extractor: proc do |request|
218
+ {'name' => request.name}
219
+ end
202
220
  )
203
221
  @set_logging_service = Google::Gax.create_api_call(
204
222
  @cluster_manager_stub.method(:set_logging_service),
205
223
  defaults["set_logging_service"],
206
- exception_transformer: exception_transformer
224
+ exception_transformer: exception_transformer,
225
+ params_extractor: proc do |request|
226
+ {'name' => request.name}
227
+ end
207
228
  )
208
229
  @set_monitoring_service = Google::Gax.create_api_call(
209
230
  @cluster_manager_stub.method(:set_monitoring_service),
210
231
  defaults["set_monitoring_service"],
211
- exception_transformer: exception_transformer
232
+ exception_transformer: exception_transformer,
233
+ params_extractor: proc do |request|
234
+ {'name' => request.name}
235
+ end
212
236
  )
213
237
  @set_addons_config = Google::Gax.create_api_call(
214
238
  @cluster_manager_stub.method(:set_addons_config),
215
239
  defaults["set_addons_config"],
216
- exception_transformer: exception_transformer
240
+ exception_transformer: exception_transformer,
241
+ params_extractor: proc do |request|
242
+ {'name' => request.name}
243
+ end
217
244
  )
218
245
  @set_locations = Google::Gax.create_api_call(
219
246
  @cluster_manager_stub.method(:set_locations),
220
247
  defaults["set_locations"],
221
- exception_transformer: exception_transformer
248
+ exception_transformer: exception_transformer,
249
+ params_extractor: proc do |request|
250
+ {'name' => request.name}
251
+ end
222
252
  )
223
253
  @update_master = Google::Gax.create_api_call(
224
254
  @cluster_manager_stub.method(:update_master),
225
255
  defaults["update_master"],
226
- exception_transformer: exception_transformer
256
+ exception_transformer: exception_transformer,
257
+ params_extractor: proc do |request|
258
+ {'name' => request.name}
259
+ end
227
260
  )
228
261
  @set_master_auth = Google::Gax.create_api_call(
229
262
  @cluster_manager_stub.method(:set_master_auth),
230
263
  defaults["set_master_auth"],
231
- exception_transformer: exception_transformer
264
+ exception_transformer: exception_transformer,
265
+ params_extractor: proc do |request|
266
+ {'name' => request.name}
267
+ end
232
268
  )
233
269
  @delete_cluster = Google::Gax.create_api_call(
234
270
  @cluster_manager_stub.method(:delete_cluster),
235
271
  defaults["delete_cluster"],
236
- exception_transformer: exception_transformer
272
+ exception_transformer: exception_transformer,
273
+ params_extractor: proc do |request|
274
+ {'name' => request.name}
275
+ end
237
276
  )
238
277
  @list_operations = Google::Gax.create_api_call(
239
278
  @cluster_manager_stub.method(:list_operations),
240
279
  defaults["list_operations"],
241
- exception_transformer: exception_transformer
280
+ exception_transformer: exception_transformer,
281
+ params_extractor: proc do |request|
282
+ {'parent' => request.parent}
283
+ end
242
284
  )
243
285
  @get_operation = Google::Gax.create_api_call(
244
286
  @cluster_manager_stub.method(:get_operation),
245
287
  defaults["get_operation"],
246
- exception_transformer: exception_transformer
288
+ exception_transformer: exception_transformer,
289
+ params_extractor: proc do |request|
290
+ {'name' => request.name}
291
+ end
247
292
  )
248
293
  @cancel_operation = Google::Gax.create_api_call(
249
294
  @cluster_manager_stub.method(:cancel_operation),
250
295
  defaults["cancel_operation"],
251
- exception_transformer: exception_transformer
296
+ exception_transformer: exception_transformer,
297
+ params_extractor: proc do |request|
298
+ {'name' => request.name}
299
+ end
252
300
  )
253
301
  @get_server_config = Google::Gax.create_api_call(
254
302
  @cluster_manager_stub.method(:get_server_config),
255
303
  defaults["get_server_config"],
256
- exception_transformer: exception_transformer
304
+ exception_transformer: exception_transformer,
305
+ params_extractor: proc do |request|
306
+ {'name' => request.name}
307
+ end
257
308
  )
258
309
  @list_node_pools = Google::Gax.create_api_call(
259
310
  @cluster_manager_stub.method(:list_node_pools),
260
311
  defaults["list_node_pools"],
261
- exception_transformer: exception_transformer
312
+ exception_transformer: exception_transformer,
313
+ params_extractor: proc do |request|
314
+ {'parent' => request.parent}
315
+ end
262
316
  )
263
317
  @get_node_pool = Google::Gax.create_api_call(
264
318
  @cluster_manager_stub.method(:get_node_pool),
265
319
  defaults["get_node_pool"],
266
- exception_transformer: exception_transformer
320
+ exception_transformer: exception_transformer,
321
+ params_extractor: proc do |request|
322
+ {'name' => request.name}
323
+ end
267
324
  )
268
325
  @create_node_pool = Google::Gax.create_api_call(
269
326
  @cluster_manager_stub.method(:create_node_pool),
270
327
  defaults["create_node_pool"],
271
- exception_transformer: exception_transformer
328
+ exception_transformer: exception_transformer,
329
+ params_extractor: proc do |request|
330
+ {'parent' => request.parent}
331
+ end
272
332
  )
273
333
  @delete_node_pool = Google::Gax.create_api_call(
274
334
  @cluster_manager_stub.method(:delete_node_pool),
275
335
  defaults["delete_node_pool"],
276
- exception_transformer: exception_transformer
336
+ exception_transformer: exception_transformer,
337
+ params_extractor: proc do |request|
338
+ {'name' => request.name}
339
+ end
277
340
  )
278
341
  @rollback_node_pool_upgrade = Google::Gax.create_api_call(
279
342
  @cluster_manager_stub.method(:rollback_node_pool_upgrade),
280
343
  defaults["rollback_node_pool_upgrade"],
281
- exception_transformer: exception_transformer
344
+ exception_transformer: exception_transformer,
345
+ params_extractor: proc do |request|
346
+ {'name' => request.name}
347
+ end
282
348
  )
283
349
  @set_node_pool_management = Google::Gax.create_api_call(
284
350
  @cluster_manager_stub.method(:set_node_pool_management),
285
351
  defaults["set_node_pool_management"],
286
- exception_transformer: exception_transformer
352
+ exception_transformer: exception_transformer,
353
+ params_extractor: proc do |request|
354
+ {'name' => request.name}
355
+ end
287
356
  )
288
357
  @set_labels = Google::Gax.create_api_call(
289
358
  @cluster_manager_stub.method(:set_labels),
290
359
  defaults["set_labels"],
291
- exception_transformer: exception_transformer
360
+ exception_transformer: exception_transformer,
361
+ params_extractor: proc do |request|
362
+ {'name' => request.name}
363
+ end
292
364
  )
293
365
  @set_legacy_abac = Google::Gax.create_api_call(
294
366
  @cluster_manager_stub.method(:set_legacy_abac),
295
367
  defaults["set_legacy_abac"],
296
- exception_transformer: exception_transformer
368
+ exception_transformer: exception_transformer,
369
+ params_extractor: proc do |request|
370
+ {'name' => request.name}
371
+ end
297
372
  )
298
373
  @start_ip_rotation = Google::Gax.create_api_call(
299
374
  @cluster_manager_stub.method(:start_ip_rotation),
300
375
  defaults["start_ip_rotation"],
301
- exception_transformer: exception_transformer
376
+ exception_transformer: exception_transformer,
377
+ params_extractor: proc do |request|
378
+ {'name' => request.name}
379
+ end
302
380
  )
303
381
  @complete_ip_rotation = Google::Gax.create_api_call(
304
382
  @cluster_manager_stub.method(:complete_ip_rotation),
305
383
  defaults["complete_ip_rotation"],
306
- exception_transformer: exception_transformer
384
+ exception_transformer: exception_transformer,
385
+ params_extractor: proc do |request|
386
+ {'name' => request.name}
387
+ end
307
388
  )
308
389
  @set_node_pool_size = Google::Gax.create_api_call(
309
390
  @cluster_manager_stub.method(:set_node_pool_size),
310
391
  defaults["set_node_pool_size"],
311
- exception_transformer: exception_transformer
392
+ exception_transformer: exception_transformer,
393
+ params_extractor: proc do |request|
394
+ {'name' => request.name}
395
+ end
312
396
  )
313
397
  @set_network_policy = Google::Gax.create_api_call(
314
398
  @cluster_manager_stub.method(:set_network_policy),
315
399
  defaults["set_network_policy"],
316
- exception_transformer: exception_transformer
400
+ exception_transformer: exception_transformer,
401
+ params_extractor: proc do |request|
402
+ {'name' => request.name}
403
+ end
317
404
  )
318
405
  @set_maintenance_policy = Google::Gax.create_api_call(
319
406
  @cluster_manager_stub.method(:set_maintenance_policy),
320
407
  defaults["set_maintenance_policy"],
321
- exception_transformer: exception_transformer
408
+ exception_transformer: exception_transformer,
409
+ params_extractor: proc do |request|
410
+ {'name' => request.name}
411
+ end
322
412
  )
323
413
  @list_usable_subnetworks = Google::Gax.create_api_call(
324
414
  @cluster_manager_stub.method(:list_usable_subnetworks),
325
415
  defaults["list_usable_subnetworks"],
326
- exception_transformer: exception_transformer
416
+ exception_transformer: exception_transformer,
417
+ params_extractor: proc do |request|
418
+ {'parent' => request.parent}
419
+ end
327
420
  )
328
421
  @list_locations = Google::Gax.create_api_call(
329
422
  @cluster_manager_stub.method(:list_locations),
330
423
  defaults["list_locations"],
331
- exception_transformer: exception_transformer
424
+ exception_transformer: exception_transformer,
425
+ params_extractor: proc do |request|
426
+ {'parent' => request.parent}
427
+ end
332
428
  )
333
429
  end
334
430
 
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: google-cloud-container
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.0
4
+ version: 0.4.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Google LLC
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2019-03-11 00:00:00.000000000 Z
11
+ date: 2019-04-29 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: google-gax
@@ -102,6 +102,7 @@ extensions: []
102
102
  extra_rdoc_files: []
103
103
  files:
104
104
  - ".yardopts"
105
+ - AUTHENTICATION.md
105
106
  - LICENSE
106
107
  - README.md
107
108
  - lib/google/cloud/container.rb
@@ -140,8 +141,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
140
141
  - !ruby/object:Gem::Version
141
142
  version: '0'
142
143
  requirements: []
143
- rubyforge_project:
144
- rubygems_version: 2.7.6
144
+ rubygems_version: 3.0.3
145
145
  signing_key:
146
146
  specification_version: 4
147
147
  summary: API Client library for Kubernetes Engine API