google-cloud-vm_migration-v1 1.0.2 → 1.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +30 -20
- data/lib/google/cloud/vm_migration/v1/version.rb +1 -1
- data/lib/google/cloud/vm_migration/v1/vm_migration/client.rb +65 -47
- data/lib/google/cloud/vm_migration/v1/vm_migration/operations.rb +9 -5
- data/lib/google/cloud/vm_migration/v1/vm_migration/rest/client.rb +56 -47
- data/lib/google/cloud/vm_migration/v1/vm_migration/rest/operations.rb +40 -28
- data/lib/google/cloud/vm_migration/v1/vm_migration/rest/service_stub.rb +382 -278
- data/proto_docs/google/api/client.rb +19 -0
- metadata +4 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 401d80d9c1fa835ff1d0863832db62ecabbf2acad7d73c1942dd9aefa48aeb6a
|
4
|
+
data.tar.gz: 4b5fc50676d322aa9b4a35f7fae93484edd28d897f5211da35bcc17adaf26c11
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 979382b237643e564ec50844b45b400ffa8069cd63462fa859bb6bd4e14be8da1b339c4d388b370bb250a3bba7edd286bf521eead5b9a26578ab21e97fd64fab
|
7
|
+
data.tar.gz: '0869b197b8fd4cbb60bf42dd213914d75778ef6d252ff7c170a1015d60a5e57da608fbdfa5d5ebe404d09a0cc26f0e45f9643831636e818c2e2c66a22ce0e9f1'
|
data/README.md
CHANGED
@@ -43,33 +43,43 @@ for class and method documentation.
|
|
43
43
|
See also the [Product Documentation](https://cloud.google.com/migrate/compute-engine/)
|
44
44
|
for general usage information.
|
45
45
|
|
46
|
-
##
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
46
|
+
## Debug Logging
|
47
|
+
|
48
|
+
This library comes with opt-in Debug Logging that can help you troubleshoot
|
49
|
+
your application's integration with the API. When logging is activated, key
|
50
|
+
events such as requests and responses, along with data payloads and metadata
|
51
|
+
such as headers and client configuration, are logged to the standard error
|
52
|
+
stream.
|
53
|
+
|
54
|
+
**WARNING:** Client Library Debug Logging includes your data payloads in
|
55
|
+
plaintext, which could include sensitive data such as PII for yourself or your
|
56
|
+
customers, private keys, or other security data that could be compromising if
|
57
|
+
leaked. Always practice good data hygiene with your application logs, and follow
|
58
|
+
the principle of least access. Google also recommends that Client Library Debug
|
59
|
+
Logging be enabled only temporarily during active debugging, and not used
|
60
|
+
permanently in production.
|
61
|
+
|
62
|
+
To enable logging, set the environment variable `GOOGLE_SDK_RUBY_LOGGING_GEMS`
|
63
|
+
to the value `all`. Alternatively, you can set the value to a comma-delimited
|
64
|
+
list of client library gem names. This will select the default logging behavior,
|
65
|
+
which writes logs to the standard error stream. On a local workstation, this may
|
66
|
+
result in logs appearing on the console. When running on a Google Cloud hosting
|
67
|
+
service such as [Google Cloud Run](https://cloud.google.com/run), this generally
|
68
|
+
results in logs appearing alongside your application logs in the
|
69
|
+
[Google Cloud Logging](https://cloud.google.com/logging/) service.
|
70
|
+
|
71
|
+
You can customize logging by modifying the `logger` configuration when
|
72
|
+
constructing a client object. For example:
|
55
73
|
|
56
74
|
```ruby
|
75
|
+
require "google/cloud/vm_migration/v1"
|
57
76
|
require "logger"
|
58
77
|
|
59
|
-
|
60
|
-
|
61
|
-
def logger
|
62
|
-
LOGGER
|
63
|
-
end
|
64
|
-
end
|
65
|
-
|
66
|
-
# Define a gRPC module-level logger method before grpc/logconfig.rb loads.
|
67
|
-
module GRPC
|
68
|
-
extend MyLogger
|
78
|
+
client = ::Google::Cloud::VMMigration::V1::VMMigration::Client.new do |config|
|
79
|
+
config.logger = Logger.new "my-app.log"
|
69
80
|
end
|
70
81
|
```
|
71
82
|
|
72
|
-
|
73
83
|
## Google Cloud Samples
|
74
84
|
|
75
85
|
To browse ready to use code samples check [Google Cloud Samples](https://cloud.google.com/docs/samples).
|
@@ -174,14 +174,26 @@ module Google
|
|
174
174
|
universe_domain: @config.universe_domain,
|
175
175
|
channel_args: @config.channel_args,
|
176
176
|
interceptors: @config.interceptors,
|
177
|
-
channel_pool_config: @config.channel_pool
|
177
|
+
channel_pool_config: @config.channel_pool,
|
178
|
+
logger: @config.logger
|
178
179
|
)
|
179
180
|
|
181
|
+
@vm_migration_stub.stub_logger&.info do |entry|
|
182
|
+
entry.set_system_name
|
183
|
+
entry.set_service
|
184
|
+
entry.message = "Created client for #{entry.service}"
|
185
|
+
entry.set_credentials_fields credentials
|
186
|
+
entry.set "customEndpoint", @config.endpoint if @config.endpoint
|
187
|
+
entry.set "defaultTimeout", @config.timeout if @config.timeout
|
188
|
+
entry.set "quotaProject", @quota_project_id if @quota_project_id
|
189
|
+
end
|
190
|
+
|
180
191
|
@location_client = Google::Cloud::Location::Locations::Client.new do |config|
|
181
192
|
config.credentials = credentials
|
182
193
|
config.quota_project = @quota_project_id
|
183
194
|
config.endpoint = @vm_migration_stub.endpoint
|
184
195
|
config.universe_domain = @vm_migration_stub.universe_domain
|
196
|
+
config.logger = @vm_migration_stub.logger if config.respond_to? :logger=
|
185
197
|
end
|
186
198
|
|
187
199
|
@iam_policy_client = Google::Iam::V1::IAMPolicy::Client.new do |config|
|
@@ -189,6 +201,7 @@ module Google
|
|
189
201
|
config.quota_project = @quota_project_id
|
190
202
|
config.endpoint = @vm_migration_stub.endpoint
|
191
203
|
config.universe_domain = @vm_migration_stub.universe_domain
|
204
|
+
config.logger = @vm_migration_stub.logger if config.respond_to? :logger=
|
192
205
|
end
|
193
206
|
end
|
194
207
|
|
@@ -213,6 +226,15 @@ module Google
|
|
213
226
|
#
|
214
227
|
attr_reader :iam_policy_client
|
215
228
|
|
229
|
+
##
|
230
|
+
# The logger used for request/response debug logging.
|
231
|
+
#
|
232
|
+
# @return [Logger]
|
233
|
+
#
|
234
|
+
def logger
|
235
|
+
@vm_migration_stub.logger
|
236
|
+
end
|
237
|
+
|
216
238
|
# Service calls
|
217
239
|
|
218
240
|
##
|
@@ -315,7 +337,7 @@ module Google
|
|
315
337
|
@vm_migration_stub.call_rpc :list_sources, request, options: options do |response, operation|
|
316
338
|
response = ::Gapic::PagedEnumerable.new @vm_migration_stub, :list_sources, request, response, operation, options
|
317
339
|
yield response, operation if block_given?
|
318
|
-
|
340
|
+
throw :response, response
|
319
341
|
end
|
320
342
|
rescue ::GRPC::BadStatus => e
|
321
343
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -401,7 +423,6 @@ module Google
|
|
401
423
|
|
402
424
|
@vm_migration_stub.call_rpc :get_source, request, options: options do |response, operation|
|
403
425
|
yield response, operation if block_given?
|
404
|
-
return response
|
405
426
|
end
|
406
427
|
rescue ::GRPC::BadStatus => e
|
407
428
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -513,7 +534,7 @@ module Google
|
|
513
534
|
@vm_migration_stub.call_rpc :create_source, request, options: options do |response, operation|
|
514
535
|
response = ::Gapic::Operation.new response, @operations_client, options: options
|
515
536
|
yield response, operation if block_given?
|
516
|
-
|
537
|
+
throw :response, response
|
517
538
|
end
|
518
539
|
rescue ::GRPC::BadStatus => e
|
519
540
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -627,7 +648,7 @@ module Google
|
|
627
648
|
@vm_migration_stub.call_rpc :update_source, request, options: options do |response, operation|
|
628
649
|
response = ::Gapic::Operation.new response, @operations_client, options: options
|
629
650
|
yield response, operation if block_given?
|
630
|
-
|
651
|
+
throw :response, response
|
631
652
|
end
|
632
653
|
rescue ::GRPC::BadStatus => e
|
633
654
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -735,7 +756,7 @@ module Google
|
|
735
756
|
@vm_migration_stub.call_rpc :delete_source, request, options: options do |response, operation|
|
736
757
|
response = ::Gapic::Operation.new response, @operations_client, options: options
|
737
758
|
yield response, operation if block_given?
|
738
|
-
|
759
|
+
throw :response, response
|
739
760
|
end
|
740
761
|
rescue ::GRPC::BadStatus => e
|
741
762
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -828,7 +849,6 @@ module Google
|
|
828
849
|
|
829
850
|
@vm_migration_stub.call_rpc :fetch_inventory, request, options: options do |response, operation|
|
830
851
|
yield response, operation if block_given?
|
831
|
-
return response
|
832
852
|
end
|
833
853
|
rescue ::GRPC::BadStatus => e
|
834
854
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -937,7 +957,7 @@ module Google
|
|
937
957
|
@vm_migration_stub.call_rpc :list_utilization_reports, request, options: options do |response, operation|
|
938
958
|
response = ::Gapic::PagedEnumerable.new @vm_migration_stub, :list_utilization_reports, request, response, operation, options
|
939
959
|
yield response, operation if block_given?
|
940
|
-
|
960
|
+
throw :response, response
|
941
961
|
end
|
942
962
|
rescue ::GRPC::BadStatus => e
|
943
963
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -1026,7 +1046,6 @@ module Google
|
|
1026
1046
|
|
1027
1047
|
@vm_migration_stub.call_rpc :get_utilization_report, request, options: options do |response, operation|
|
1028
1048
|
yield response, operation if block_given?
|
1029
|
-
return response
|
1030
1049
|
end
|
1031
1050
|
rescue ::GRPC::BadStatus => e
|
1032
1051
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -1143,7 +1162,7 @@ module Google
|
|
1143
1162
|
@vm_migration_stub.call_rpc :create_utilization_report, request, options: options do |response, operation|
|
1144
1163
|
response = ::Gapic::Operation.new response, @operations_client, options: options
|
1145
1164
|
yield response, operation if block_given?
|
1146
|
-
|
1165
|
+
throw :response, response
|
1147
1166
|
end
|
1148
1167
|
rescue ::GRPC::BadStatus => e
|
1149
1168
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -1251,7 +1270,7 @@ module Google
|
|
1251
1270
|
@vm_migration_stub.call_rpc :delete_utilization_report, request, options: options do |response, operation|
|
1252
1271
|
response = ::Gapic::Operation.new response, @operations_client, options: options
|
1253
1272
|
yield response, operation if block_given?
|
1254
|
-
|
1273
|
+
throw :response, response
|
1255
1274
|
end
|
1256
1275
|
rescue ::GRPC::BadStatus => e
|
1257
1276
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -1358,7 +1377,7 @@ module Google
|
|
1358
1377
|
@vm_migration_stub.call_rpc :list_datacenter_connectors, request, options: options do |response, operation|
|
1359
1378
|
response = ::Gapic::PagedEnumerable.new @vm_migration_stub, :list_datacenter_connectors, request, response, operation, options
|
1360
1379
|
yield response, operation if block_given?
|
1361
|
-
|
1380
|
+
throw :response, response
|
1362
1381
|
end
|
1363
1382
|
rescue ::GRPC::BadStatus => e
|
1364
1383
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -1444,7 +1463,6 @@ module Google
|
|
1444
1463
|
|
1445
1464
|
@vm_migration_stub.call_rpc :get_datacenter_connector, request, options: options do |response, operation|
|
1446
1465
|
yield response, operation if block_given?
|
1447
|
-
return response
|
1448
1466
|
end
|
1449
1467
|
rescue ::GRPC::BadStatus => e
|
1450
1468
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -1559,7 +1577,7 @@ module Google
|
|
1559
1577
|
@vm_migration_stub.call_rpc :create_datacenter_connector, request, options: options do |response, operation|
|
1560
1578
|
response = ::Gapic::Operation.new response, @operations_client, options: options
|
1561
1579
|
yield response, operation if block_given?
|
1562
|
-
|
1580
|
+
throw :response, response
|
1563
1581
|
end
|
1564
1582
|
rescue ::GRPC::BadStatus => e
|
1565
1583
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -1667,7 +1685,7 @@ module Google
|
|
1667
1685
|
@vm_migration_stub.call_rpc :delete_datacenter_connector, request, options: options do |response, operation|
|
1668
1686
|
response = ::Gapic::Operation.new response, @operations_client, options: options
|
1669
1687
|
yield response, operation if block_given?
|
1670
|
-
|
1688
|
+
throw :response, response
|
1671
1689
|
end
|
1672
1690
|
rescue ::GRPC::BadStatus => e
|
1673
1691
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -1776,7 +1794,7 @@ module Google
|
|
1776
1794
|
@vm_migration_stub.call_rpc :upgrade_appliance, request, options: options do |response, operation|
|
1777
1795
|
response = ::Gapic::Operation.new response, @operations_client, options: options
|
1778
1796
|
yield response, operation if block_given?
|
1779
|
-
|
1797
|
+
throw :response, response
|
1780
1798
|
end
|
1781
1799
|
rescue ::GRPC::BadStatus => e
|
1782
1800
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -1888,7 +1906,7 @@ module Google
|
|
1888
1906
|
@vm_migration_stub.call_rpc :create_migrating_vm, request, options: options do |response, operation|
|
1889
1907
|
response = ::Gapic::Operation.new response, @operations_client, options: options
|
1890
1908
|
yield response, operation if block_given?
|
1891
|
-
|
1909
|
+
throw :response, response
|
1892
1910
|
end
|
1893
1911
|
rescue ::GRPC::BadStatus => e
|
1894
1912
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -1996,7 +2014,7 @@ module Google
|
|
1996
2014
|
@vm_migration_stub.call_rpc :list_migrating_vms, request, options: options do |response, operation|
|
1997
2015
|
response = ::Gapic::PagedEnumerable.new @vm_migration_stub, :list_migrating_vms, request, response, operation, options
|
1998
2016
|
yield response, operation if block_given?
|
1999
|
-
|
2017
|
+
throw :response, response
|
2000
2018
|
end
|
2001
2019
|
rescue ::GRPC::BadStatus => e
|
2002
2020
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -2084,7 +2102,6 @@ module Google
|
|
2084
2102
|
|
2085
2103
|
@vm_migration_stub.call_rpc :get_migrating_vm, request, options: options do |response, operation|
|
2086
2104
|
yield response, operation if block_given?
|
2087
|
-
return response
|
2088
2105
|
end
|
2089
2106
|
rescue ::GRPC::BadStatus => e
|
2090
2107
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -2198,7 +2215,7 @@ module Google
|
|
2198
2215
|
@vm_migration_stub.call_rpc :update_migrating_vm, request, options: options do |response, operation|
|
2199
2216
|
response = ::Gapic::Operation.new response, @operations_client, options: options
|
2200
2217
|
yield response, operation if block_given?
|
2201
|
-
|
2218
|
+
throw :response, response
|
2202
2219
|
end
|
2203
2220
|
rescue ::GRPC::BadStatus => e
|
2204
2221
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -2292,7 +2309,7 @@ module Google
|
|
2292
2309
|
@vm_migration_stub.call_rpc :delete_migrating_vm, request, options: options do |response, operation|
|
2293
2310
|
response = ::Gapic::Operation.new response, @operations_client, options: options
|
2294
2311
|
yield response, operation if block_given?
|
2295
|
-
|
2312
|
+
throw :response, response
|
2296
2313
|
end
|
2297
2314
|
rescue ::GRPC::BadStatus => e
|
2298
2315
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -2387,7 +2404,7 @@ module Google
|
|
2387
2404
|
@vm_migration_stub.call_rpc :start_migration, request, options: options do |response, operation|
|
2388
2405
|
response = ::Gapic::Operation.new response, @operations_client, options: options
|
2389
2406
|
yield response, operation if block_given?
|
2390
|
-
|
2407
|
+
throw :response, response
|
2391
2408
|
end
|
2392
2409
|
rescue ::GRPC::BadStatus => e
|
2393
2410
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -2484,7 +2501,7 @@ module Google
|
|
2484
2501
|
@vm_migration_stub.call_rpc :resume_migration, request, options: options do |response, operation|
|
2485
2502
|
response = ::Gapic::Operation.new response, @operations_client, options: options
|
2486
2503
|
yield response, operation if block_given?
|
2487
|
-
|
2504
|
+
throw :response, response
|
2488
2505
|
end
|
2489
2506
|
rescue ::GRPC::BadStatus => e
|
2490
2507
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -2580,7 +2597,7 @@ module Google
|
|
2580
2597
|
@vm_migration_stub.call_rpc :pause_migration, request, options: options do |response, operation|
|
2581
2598
|
response = ::Gapic::Operation.new response, @operations_client, options: options
|
2582
2599
|
yield response, operation if block_given?
|
2583
|
-
|
2600
|
+
throw :response, response
|
2584
2601
|
end
|
2585
2602
|
rescue ::GRPC::BadStatus => e
|
2586
2603
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -2675,7 +2692,7 @@ module Google
|
|
2675
2692
|
@vm_migration_stub.call_rpc :finalize_migration, request, options: options do |response, operation|
|
2676
2693
|
response = ::Gapic::Operation.new response, @operations_client, options: options
|
2677
2694
|
yield response, operation if block_given?
|
2678
|
-
|
2695
|
+
throw :response, response
|
2679
2696
|
end
|
2680
2697
|
rescue ::GRPC::BadStatus => e
|
2681
2698
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -2787,7 +2804,7 @@ module Google
|
|
2787
2804
|
@vm_migration_stub.call_rpc :create_clone_job, request, options: options do |response, operation|
|
2788
2805
|
response = ::Gapic::Operation.new response, @operations_client, options: options
|
2789
2806
|
yield response, operation if block_given?
|
2790
|
-
|
2807
|
+
throw :response, response
|
2791
2808
|
end
|
2792
2809
|
rescue ::GRPC::BadStatus => e
|
2793
2810
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -2881,7 +2898,7 @@ module Google
|
|
2881
2898
|
@vm_migration_stub.call_rpc :cancel_clone_job, request, options: options do |response, operation|
|
2882
2899
|
response = ::Gapic::Operation.new response, @operations_client, options: options
|
2883
2900
|
yield response, operation if block_given?
|
2884
|
-
|
2901
|
+
throw :response, response
|
2885
2902
|
end
|
2886
2903
|
rescue ::GRPC::BadStatus => e
|
2887
2904
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -2987,7 +3004,7 @@ module Google
|
|
2987
3004
|
@vm_migration_stub.call_rpc :list_clone_jobs, request, options: options do |response, operation|
|
2988
3005
|
response = ::Gapic::PagedEnumerable.new @vm_migration_stub, :list_clone_jobs, request, response, operation, options
|
2989
3006
|
yield response, operation if block_given?
|
2990
|
-
|
3007
|
+
throw :response, response
|
2991
3008
|
end
|
2992
3009
|
rescue ::GRPC::BadStatus => e
|
2993
3010
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -3073,7 +3090,6 @@ module Google
|
|
3073
3090
|
|
3074
3091
|
@vm_migration_stub.call_rpc :get_clone_job, request, options: options do |response, operation|
|
3075
3092
|
yield response, operation if block_given?
|
3076
|
-
return response
|
3077
3093
|
end
|
3078
3094
|
rescue ::GRPC::BadStatus => e
|
3079
3095
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -3187,7 +3203,7 @@ module Google
|
|
3187
3203
|
@vm_migration_stub.call_rpc :create_cutover_job, request, options: options do |response, operation|
|
3188
3204
|
response = ::Gapic::Operation.new response, @operations_client, options: options
|
3189
3205
|
yield response, operation if block_given?
|
3190
|
-
|
3206
|
+
throw :response, response
|
3191
3207
|
end
|
3192
3208
|
rescue ::GRPC::BadStatus => e
|
3193
3209
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -3281,7 +3297,7 @@ module Google
|
|
3281
3297
|
@vm_migration_stub.call_rpc :cancel_cutover_job, request, options: options do |response, operation|
|
3282
3298
|
response = ::Gapic::Operation.new response, @operations_client, options: options
|
3283
3299
|
yield response, operation if block_given?
|
3284
|
-
|
3300
|
+
throw :response, response
|
3285
3301
|
end
|
3286
3302
|
rescue ::GRPC::BadStatus => e
|
3287
3303
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -3387,7 +3403,7 @@ module Google
|
|
3387
3403
|
@vm_migration_stub.call_rpc :list_cutover_jobs, request, options: options do |response, operation|
|
3388
3404
|
response = ::Gapic::PagedEnumerable.new @vm_migration_stub, :list_cutover_jobs, request, response, operation, options
|
3389
3405
|
yield response, operation if block_given?
|
3390
|
-
|
3406
|
+
throw :response, response
|
3391
3407
|
end
|
3392
3408
|
rescue ::GRPC::BadStatus => e
|
3393
3409
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -3473,7 +3489,6 @@ module Google
|
|
3473
3489
|
|
3474
3490
|
@vm_migration_stub.call_rpc :get_cutover_job, request, options: options do |response, operation|
|
3475
3491
|
yield response, operation if block_given?
|
3476
|
-
return response
|
3477
3492
|
end
|
3478
3493
|
rescue ::GRPC::BadStatus => e
|
3479
3494
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -3579,7 +3594,7 @@ module Google
|
|
3579
3594
|
@vm_migration_stub.call_rpc :list_groups, request, options: options do |response, operation|
|
3580
3595
|
response = ::Gapic::PagedEnumerable.new @vm_migration_stub, :list_groups, request, response, operation, options
|
3581
3596
|
yield response, operation if block_given?
|
3582
|
-
|
3597
|
+
throw :response, response
|
3583
3598
|
end
|
3584
3599
|
rescue ::GRPC::BadStatus => e
|
3585
3600
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -3665,7 +3680,6 @@ module Google
|
|
3665
3680
|
|
3666
3681
|
@vm_migration_stub.call_rpc :get_group, request, options: options do |response, operation|
|
3667
3682
|
yield response, operation if block_given?
|
3668
|
-
return response
|
3669
3683
|
end
|
3670
3684
|
rescue ::GRPC::BadStatus => e
|
3671
3685
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -3777,7 +3791,7 @@ module Google
|
|
3777
3791
|
@vm_migration_stub.call_rpc :create_group, request, options: options do |response, operation|
|
3778
3792
|
response = ::Gapic::Operation.new response, @operations_client, options: options
|
3779
3793
|
yield response, operation if block_given?
|
3780
|
-
|
3794
|
+
throw :response, response
|
3781
3795
|
end
|
3782
3796
|
rescue ::GRPC::BadStatus => e
|
3783
3797
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -3891,7 +3905,7 @@ module Google
|
|
3891
3905
|
@vm_migration_stub.call_rpc :update_group, request, options: options do |response, operation|
|
3892
3906
|
response = ::Gapic::Operation.new response, @operations_client, options: options
|
3893
3907
|
yield response, operation if block_given?
|
3894
|
-
|
3908
|
+
throw :response, response
|
3895
3909
|
end
|
3896
3910
|
rescue ::GRPC::BadStatus => e
|
3897
3911
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -3999,7 +4013,7 @@ module Google
|
|
3999
4013
|
@vm_migration_stub.call_rpc :delete_group, request, options: options do |response, operation|
|
4000
4014
|
response = ::Gapic::Operation.new response, @operations_client, options: options
|
4001
4015
|
yield response, operation if block_given?
|
4002
|
-
|
4016
|
+
throw :response, response
|
4003
4017
|
end
|
4004
4018
|
rescue ::GRPC::BadStatus => e
|
4005
4019
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -4095,7 +4109,7 @@ module Google
|
|
4095
4109
|
@vm_migration_stub.call_rpc :add_group_migration, request, options: options do |response, operation|
|
4096
4110
|
response = ::Gapic::Operation.new response, @operations_client, options: options
|
4097
4111
|
yield response, operation if block_given?
|
4098
|
-
|
4112
|
+
throw :response, response
|
4099
4113
|
end
|
4100
4114
|
rescue ::GRPC::BadStatus => e
|
4101
4115
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -4191,7 +4205,7 @@ module Google
|
|
4191
4205
|
@vm_migration_stub.call_rpc :remove_group_migration, request, options: options do |response, operation|
|
4192
4206
|
response = ::Gapic::Operation.new response, @operations_client, options: options
|
4193
4207
|
yield response, operation if block_given?
|
4194
|
-
|
4208
|
+
throw :response, response
|
4195
4209
|
end
|
4196
4210
|
rescue ::GRPC::BadStatus => e
|
4197
4211
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -4300,7 +4314,7 @@ module Google
|
|
4300
4314
|
@vm_migration_stub.call_rpc :list_target_projects, request, options: options do |response, operation|
|
4301
4315
|
response = ::Gapic::PagedEnumerable.new @vm_migration_stub, :list_target_projects, request, response, operation, options
|
4302
4316
|
yield response, operation if block_given?
|
4303
|
-
|
4317
|
+
throw :response, response
|
4304
4318
|
end
|
4305
4319
|
rescue ::GRPC::BadStatus => e
|
4306
4320
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -4389,7 +4403,6 @@ module Google
|
|
4389
4403
|
|
4390
4404
|
@vm_migration_stub.call_rpc :get_target_project, request, options: options do |response, operation|
|
4391
4405
|
yield response, operation if block_given?
|
4392
|
-
return response
|
4393
4406
|
end
|
4394
4407
|
rescue ::GRPC::BadStatus => e
|
4395
4408
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -4504,7 +4517,7 @@ module Google
|
|
4504
4517
|
@vm_migration_stub.call_rpc :create_target_project, request, options: options do |response, operation|
|
4505
4518
|
response = ::Gapic::Operation.new response, @operations_client, options: options
|
4506
4519
|
yield response, operation if block_given?
|
4507
|
-
|
4520
|
+
throw :response, response
|
4508
4521
|
end
|
4509
4522
|
rescue ::GRPC::BadStatus => e
|
4510
4523
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -4621,7 +4634,7 @@ module Google
|
|
4621
4634
|
@vm_migration_stub.call_rpc :update_target_project, request, options: options do |response, operation|
|
4622
4635
|
response = ::Gapic::Operation.new response, @operations_client, options: options
|
4623
4636
|
yield response, operation if block_given?
|
4624
|
-
|
4637
|
+
throw :response, response
|
4625
4638
|
end
|
4626
4639
|
rescue ::GRPC::BadStatus => e
|
4627
4640
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -4732,7 +4745,7 @@ module Google
|
|
4732
4745
|
@vm_migration_stub.call_rpc :delete_target_project, request, options: options do |response, operation|
|
4733
4746
|
response = ::Gapic::Operation.new response, @operations_client, options: options
|
4734
4747
|
yield response, operation if block_given?
|
4735
|
-
|
4748
|
+
throw :response, response
|
4736
4749
|
end
|
4737
4750
|
rescue ::GRPC::BadStatus => e
|
4738
4751
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -4838,7 +4851,7 @@ module Google
|
|
4838
4851
|
@vm_migration_stub.call_rpc :list_replication_cycles, request, options: options do |response, operation|
|
4839
4852
|
response = ::Gapic::PagedEnumerable.new @vm_migration_stub, :list_replication_cycles, request, response, operation, options
|
4840
4853
|
yield response, operation if block_given?
|
4841
|
-
|
4854
|
+
throw :response, response
|
4842
4855
|
end
|
4843
4856
|
rescue ::GRPC::BadStatus => e
|
4844
4857
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -4924,7 +4937,6 @@ module Google
|
|
4924
4937
|
|
4925
4938
|
@vm_migration_stub.call_rpc :get_replication_cycle, request, options: options do |response, operation|
|
4926
4939
|
yield response, operation if block_given?
|
4927
|
-
return response
|
4928
4940
|
end
|
4929
4941
|
rescue ::GRPC::BadStatus => e
|
4930
4942
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -5013,6 +5025,11 @@ module Google
|
|
5013
5025
|
# default endpoint URL. The default value of nil uses the environment
|
5014
5026
|
# universe (usually the default "googleapis.com" universe).
|
5015
5027
|
# @return [::String,nil]
|
5028
|
+
# @!attribute [rw] logger
|
5029
|
+
# A custom logger to use for request/response debug logging, or the value
|
5030
|
+
# `:default` (the default) to construct a default logger, or `nil` to
|
5031
|
+
# explicitly disable logging.
|
5032
|
+
# @return [::Logger,:default,nil]
|
5016
5033
|
#
|
5017
5034
|
class Configuration
|
5018
5035
|
extend ::Gapic::Config
|
@@ -5037,6 +5054,7 @@ module Google
|
|
5037
5054
|
config_attr :retry_policy, nil, ::Hash, ::Proc, nil
|
5038
5055
|
config_attr :quota_project, nil, ::String, nil
|
5039
5056
|
config_attr :universe_domain, nil, ::String, nil
|
5057
|
+
config_attr :logger, :default, ::Logger, nil, :default
|
5040
5058
|
|
5041
5059
|
# @private
|
5042
5060
|
def initialize parent_config = nil
|
@@ -213,7 +213,7 @@ module Google
|
|
213
213
|
wrap_lro_operation = ->(op_response) { ::Gapic::Operation.new op_response, @operations_client }
|
214
214
|
response = ::Gapic::PagedEnumerable.new @operations_stub, :list_operations, request, response, operation, options, format_resource: wrap_lro_operation
|
215
215
|
yield response, operation if block_given?
|
216
|
-
|
216
|
+
throw :response, response
|
217
217
|
end
|
218
218
|
rescue ::GRPC::BadStatus => e
|
219
219
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -309,7 +309,7 @@ module Google
|
|
309
309
|
@operations_stub.call_rpc :get_operation, request, options: options do |response, operation|
|
310
310
|
response = ::Gapic::Operation.new response, @operations_client, options: options
|
311
311
|
yield response, operation if block_given?
|
312
|
-
|
312
|
+
throw :response, response
|
313
313
|
end
|
314
314
|
rescue ::GRPC::BadStatus => e
|
315
315
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -398,7 +398,6 @@ module Google
|
|
398
398
|
|
399
399
|
@operations_stub.call_rpc :delete_operation, request, options: options do |response, operation|
|
400
400
|
yield response, operation if block_given?
|
401
|
-
return response
|
402
401
|
end
|
403
402
|
rescue ::GRPC::BadStatus => e
|
404
403
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -494,7 +493,6 @@ module Google
|
|
494
493
|
|
495
494
|
@operations_stub.call_rpc :cancel_operation, request, options: options do |response, operation|
|
496
495
|
yield response, operation if block_given?
|
497
|
-
return response
|
498
496
|
end
|
499
497
|
rescue ::GRPC::BadStatus => e
|
500
498
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -592,7 +590,7 @@ module Google
|
|
592
590
|
@operations_stub.call_rpc :wait_operation, request, options: options do |response, operation|
|
593
591
|
response = ::Gapic::Operation.new response, @operations_client, options: options
|
594
592
|
yield response, operation if block_given?
|
595
|
-
|
593
|
+
throw :response, response
|
596
594
|
end
|
597
595
|
rescue ::GRPC::BadStatus => e
|
598
596
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -681,6 +679,11 @@ module Google
|
|
681
679
|
# default endpoint URL. The default value of nil uses the environment
|
682
680
|
# universe (usually the default "googleapis.com" universe).
|
683
681
|
# @return [::String,nil]
|
682
|
+
# @!attribute [rw] logger
|
683
|
+
# A custom logger to use for request/response debug logging, or the value
|
684
|
+
# `:default` (the default) to construct a default logger, or `nil` to
|
685
|
+
# explicitly disable logging.
|
686
|
+
# @return [::Logger,:default,nil]
|
684
687
|
#
|
685
688
|
class Configuration
|
686
689
|
extend ::Gapic::Config
|
@@ -705,6 +708,7 @@ module Google
|
|
705
708
|
config_attr :retry_policy, nil, ::Hash, ::Proc, nil
|
706
709
|
config_attr :quota_project, nil, ::String, nil
|
707
710
|
config_attr :universe_domain, nil, ::String, nil
|
711
|
+
config_attr :logger, :default, ::Logger, nil, :default
|
708
712
|
|
709
713
|
# @private
|
710
714
|
def initialize parent_config = nil
|