google-cloud-compute 1.12.0 → 1.14.0
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 +4 -4
- data/lib/google/cloud/compute/version.rb +1 -1
- data/lib/google/cloud/compute.rb +252 -0
- metadata +1 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 90f4ddb04d1a5438bb0ce789c1480e219a57f291209cdcdd7f48292d5dcb503f
|
|
4
|
+
data.tar.gz: edf050eb82c3e547d6458084d0e2f60bf03f1baf46014ea29ec3352161b00bd7
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: ede765a3831b399ce944dfe8f2e538ca8e6dff56aa727116b26b07534d50c011ceb01ffc4e0827245e4f7858a58634b95d490a9e260014f1482b5a32b560ba8a
|
|
7
|
+
data.tar.gz: 4bda8e07c9f3e7a7065929a82037c57907e2e93db1595c2594519e1eec401399983715db8135a47f2b40571d8ce5cf024187075959128ad24f52ed745514b0f4
|
data/lib/google/cloud/compute.rb
CHANGED
|
@@ -172,6 +172,69 @@ module Google
|
|
|
172
172
|
false
|
|
173
173
|
end
|
|
174
174
|
|
|
175
|
+
##
|
|
176
|
+
# Create a new client object for Advice.
|
|
177
|
+
#
|
|
178
|
+
# By default, this returns an instance of
|
|
179
|
+
# [Google::Cloud::Compute::V1::Advice::Rest::Client](https://cloud.google.com/ruby/docs/reference/google-cloud-compute-v1/latest/Google-Cloud-Compute-V1-Advice-Rest-Client)
|
|
180
|
+
# for a REST client for version V1 of the API.
|
|
181
|
+
# However, you can specify a different API version by passing it in the
|
|
182
|
+
# `version` parameter. If the Advice service is
|
|
183
|
+
# supported by that API version, and the corresponding gem is available, the
|
|
184
|
+
# appropriate versioned client will be returned.
|
|
185
|
+
#
|
|
186
|
+
# Raises an exception if the currently installed versioned client gem for the
|
|
187
|
+
# given API version does not support the Advice service.
|
|
188
|
+
# You can determine whether the method will succeed by calling
|
|
189
|
+
# {Google::Cloud::Compute.advice_available?}.
|
|
190
|
+
#
|
|
191
|
+
# ## About Advice
|
|
192
|
+
#
|
|
193
|
+
# The Advice API.
|
|
194
|
+
#
|
|
195
|
+
# @param version [::String, ::Symbol] The API version to connect to. Optional.
|
|
196
|
+
# Defaults to `:v1`.
|
|
197
|
+
# @return [::Object] A client object for the specified version.
|
|
198
|
+
#
|
|
199
|
+
def self.advice version: :v1, &block
|
|
200
|
+
require "google/cloud/compute/#{version.to_s.downcase}"
|
|
201
|
+
|
|
202
|
+
package_name = Google::Cloud::Compute
|
|
203
|
+
.constants
|
|
204
|
+
.select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") }
|
|
205
|
+
.first
|
|
206
|
+
service_module = Google::Cloud::Compute.const_get(package_name).const_get(:Advice)
|
|
207
|
+
service_module.const_get(:Rest).const_get(:Client).new(&block)
|
|
208
|
+
end
|
|
209
|
+
|
|
210
|
+
##
|
|
211
|
+
# Determines whether the Advice service is supported by the current client.
|
|
212
|
+
# If true, you can retrieve a client object by calling {Google::Cloud::Compute.advice}.
|
|
213
|
+
# If false, that method will raise an exception. This could happen if the given
|
|
214
|
+
# API version does not exist or does not support the Advice service,
|
|
215
|
+
# or if the versioned client gem needs an update to support the Advice service.
|
|
216
|
+
#
|
|
217
|
+
# @param version [::String, ::Symbol] The API version to connect to. Optional.
|
|
218
|
+
# Defaults to `:v1`.
|
|
219
|
+
# @return [boolean] Whether the service is available.
|
|
220
|
+
#
|
|
221
|
+
def self.advice_available? version: :v1
|
|
222
|
+
require "google/cloud/compute/#{version.to_s.downcase}"
|
|
223
|
+
package_name = Google::Cloud::Compute
|
|
224
|
+
.constants
|
|
225
|
+
.select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") }
|
|
226
|
+
.first
|
|
227
|
+
return false unless package_name
|
|
228
|
+
service_module = Google::Cloud::Compute.const_get package_name
|
|
229
|
+
return false unless service_module.const_defined? :Advice
|
|
230
|
+
service_module = service_module.const_get :Advice
|
|
231
|
+
return false unless service_module.const_defined? :Rest
|
|
232
|
+
service_module = service_module.const_get :Rest
|
|
233
|
+
service_module.const_defined? :Client
|
|
234
|
+
rescue ::LoadError
|
|
235
|
+
false
|
|
236
|
+
end
|
|
237
|
+
|
|
175
238
|
##
|
|
176
239
|
# Create a new client object for Autoscalers.
|
|
177
240
|
#
|
|
@@ -361,6 +424,69 @@ module Google
|
|
|
361
424
|
false
|
|
362
425
|
end
|
|
363
426
|
|
|
427
|
+
##
|
|
428
|
+
# Create a new client object for CrossSiteNetworks.
|
|
429
|
+
#
|
|
430
|
+
# By default, this returns an instance of
|
|
431
|
+
# [Google::Cloud::Compute::V1::CrossSiteNetworks::Rest::Client](https://cloud.google.com/ruby/docs/reference/google-cloud-compute-v1/latest/Google-Cloud-Compute-V1-CrossSiteNetworks-Rest-Client)
|
|
432
|
+
# for a REST client for version V1 of the API.
|
|
433
|
+
# However, you can specify a different API version by passing it in the
|
|
434
|
+
# `version` parameter. If the CrossSiteNetworks service is
|
|
435
|
+
# supported by that API version, and the corresponding gem is available, the
|
|
436
|
+
# appropriate versioned client will be returned.
|
|
437
|
+
#
|
|
438
|
+
# Raises an exception if the currently installed versioned client gem for the
|
|
439
|
+
# given API version does not support the CrossSiteNetworks service.
|
|
440
|
+
# You can determine whether the method will succeed by calling
|
|
441
|
+
# {Google::Cloud::Compute.cross_site_networks_available?}.
|
|
442
|
+
#
|
|
443
|
+
# ## About CrossSiteNetworks
|
|
444
|
+
#
|
|
445
|
+
# The CrossSiteNetworks API.
|
|
446
|
+
#
|
|
447
|
+
# @param version [::String, ::Symbol] The API version to connect to. Optional.
|
|
448
|
+
# Defaults to `:v1`.
|
|
449
|
+
# @return [::Object] A client object for the specified version.
|
|
450
|
+
#
|
|
451
|
+
def self.cross_site_networks version: :v1, &block
|
|
452
|
+
require "google/cloud/compute/#{version.to_s.downcase}"
|
|
453
|
+
|
|
454
|
+
package_name = Google::Cloud::Compute
|
|
455
|
+
.constants
|
|
456
|
+
.select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") }
|
|
457
|
+
.first
|
|
458
|
+
service_module = Google::Cloud::Compute.const_get(package_name).const_get(:CrossSiteNetworks)
|
|
459
|
+
service_module.const_get(:Rest).const_get(:Client).new(&block)
|
|
460
|
+
end
|
|
461
|
+
|
|
462
|
+
##
|
|
463
|
+
# Determines whether the CrossSiteNetworks service is supported by the current client.
|
|
464
|
+
# If true, you can retrieve a client object by calling {Google::Cloud::Compute.cross_site_networks}.
|
|
465
|
+
# If false, that method will raise an exception. This could happen if the given
|
|
466
|
+
# API version does not exist or does not support the CrossSiteNetworks service,
|
|
467
|
+
# or if the versioned client gem needs an update to support the CrossSiteNetworks service.
|
|
468
|
+
#
|
|
469
|
+
# @param version [::String, ::Symbol] The API version to connect to. Optional.
|
|
470
|
+
# Defaults to `:v1`.
|
|
471
|
+
# @return [boolean] Whether the service is available.
|
|
472
|
+
#
|
|
473
|
+
def self.cross_site_networks_available? version: :v1
|
|
474
|
+
require "google/cloud/compute/#{version.to_s.downcase}"
|
|
475
|
+
package_name = Google::Cloud::Compute
|
|
476
|
+
.constants
|
|
477
|
+
.select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") }
|
|
478
|
+
.first
|
|
479
|
+
return false unless package_name
|
|
480
|
+
service_module = Google::Cloud::Compute.const_get package_name
|
|
481
|
+
return false unless service_module.const_defined? :CrossSiteNetworks
|
|
482
|
+
service_module = service_module.const_get :CrossSiteNetworks
|
|
483
|
+
return false unless service_module.const_defined? :Rest
|
|
484
|
+
service_module = service_module.const_get :Rest
|
|
485
|
+
service_module.const_defined? :Client
|
|
486
|
+
rescue ::LoadError
|
|
487
|
+
false
|
|
488
|
+
end
|
|
489
|
+
|
|
364
490
|
##
|
|
365
491
|
# Create a new client object for DiskTypes.
|
|
366
492
|
#
|
|
@@ -739,6 +865,69 @@ module Google
|
|
|
739
865
|
false
|
|
740
866
|
end
|
|
741
867
|
|
|
868
|
+
##
|
|
869
|
+
# Create a new client object for FutureReservations.
|
|
870
|
+
#
|
|
871
|
+
# By default, this returns an instance of
|
|
872
|
+
# [Google::Cloud::Compute::V1::FutureReservations::Rest::Client](https://cloud.google.com/ruby/docs/reference/google-cloud-compute-v1/latest/Google-Cloud-Compute-V1-FutureReservations-Rest-Client)
|
|
873
|
+
# for a REST client for version V1 of the API.
|
|
874
|
+
# However, you can specify a different API version by passing it in the
|
|
875
|
+
# `version` parameter. If the FutureReservations service is
|
|
876
|
+
# supported by that API version, and the corresponding gem is available, the
|
|
877
|
+
# appropriate versioned client will be returned.
|
|
878
|
+
#
|
|
879
|
+
# Raises an exception if the currently installed versioned client gem for the
|
|
880
|
+
# given API version does not support the FutureReservations service.
|
|
881
|
+
# You can determine whether the method will succeed by calling
|
|
882
|
+
# {Google::Cloud::Compute.future_reservations_available?}.
|
|
883
|
+
#
|
|
884
|
+
# ## About FutureReservations
|
|
885
|
+
#
|
|
886
|
+
# The FutureReservations API.
|
|
887
|
+
#
|
|
888
|
+
# @param version [::String, ::Symbol] The API version to connect to. Optional.
|
|
889
|
+
# Defaults to `:v1`.
|
|
890
|
+
# @return [::Object] A client object for the specified version.
|
|
891
|
+
#
|
|
892
|
+
def self.future_reservations version: :v1, &block
|
|
893
|
+
require "google/cloud/compute/#{version.to_s.downcase}"
|
|
894
|
+
|
|
895
|
+
package_name = Google::Cloud::Compute
|
|
896
|
+
.constants
|
|
897
|
+
.select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") }
|
|
898
|
+
.first
|
|
899
|
+
service_module = Google::Cloud::Compute.const_get(package_name).const_get(:FutureReservations)
|
|
900
|
+
service_module.const_get(:Rest).const_get(:Client).new(&block)
|
|
901
|
+
end
|
|
902
|
+
|
|
903
|
+
##
|
|
904
|
+
# Determines whether the FutureReservations service is supported by the current client.
|
|
905
|
+
# If true, you can retrieve a client object by calling {Google::Cloud::Compute.future_reservations}.
|
|
906
|
+
# If false, that method will raise an exception. This could happen if the given
|
|
907
|
+
# API version does not exist or does not support the FutureReservations service,
|
|
908
|
+
# or if the versioned client gem needs an update to support the FutureReservations service.
|
|
909
|
+
#
|
|
910
|
+
# @param version [::String, ::Symbol] The API version to connect to. Optional.
|
|
911
|
+
# Defaults to `:v1`.
|
|
912
|
+
# @return [boolean] Whether the service is available.
|
|
913
|
+
#
|
|
914
|
+
def self.future_reservations_available? version: :v1
|
|
915
|
+
require "google/cloud/compute/#{version.to_s.downcase}"
|
|
916
|
+
package_name = Google::Cloud::Compute
|
|
917
|
+
.constants
|
|
918
|
+
.select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") }
|
|
919
|
+
.first
|
|
920
|
+
return false unless package_name
|
|
921
|
+
service_module = Google::Cloud::Compute.const_get package_name
|
|
922
|
+
return false unless service_module.const_defined? :FutureReservations
|
|
923
|
+
service_module = service_module.const_get :FutureReservations
|
|
924
|
+
return false unless service_module.const_defined? :Rest
|
|
925
|
+
service_module = service_module.const_get :Rest
|
|
926
|
+
service_module.const_defined? :Client
|
|
927
|
+
rescue ::LoadError
|
|
928
|
+
false
|
|
929
|
+
end
|
|
930
|
+
|
|
742
931
|
##
|
|
743
932
|
# Create a new client object for GlobalAddresses.
|
|
744
933
|
#
|
|
@@ -6535,6 +6724,69 @@ module Google
|
|
|
6535
6724
|
false
|
|
6536
6725
|
end
|
|
6537
6726
|
|
|
6727
|
+
##
|
|
6728
|
+
# Create a new client object for WireGroups.
|
|
6729
|
+
#
|
|
6730
|
+
# By default, this returns an instance of
|
|
6731
|
+
# [Google::Cloud::Compute::V1::WireGroups::Rest::Client](https://cloud.google.com/ruby/docs/reference/google-cloud-compute-v1/latest/Google-Cloud-Compute-V1-WireGroups-Rest-Client)
|
|
6732
|
+
# for a REST client for version V1 of the API.
|
|
6733
|
+
# However, you can specify a different API version by passing it in the
|
|
6734
|
+
# `version` parameter. If the WireGroups service is
|
|
6735
|
+
# supported by that API version, and the corresponding gem is available, the
|
|
6736
|
+
# appropriate versioned client will be returned.
|
|
6737
|
+
#
|
|
6738
|
+
# Raises an exception if the currently installed versioned client gem for the
|
|
6739
|
+
# given API version does not support the WireGroups service.
|
|
6740
|
+
# You can determine whether the method will succeed by calling
|
|
6741
|
+
# {Google::Cloud::Compute.wire_groups_available?}.
|
|
6742
|
+
#
|
|
6743
|
+
# ## About WireGroups
|
|
6744
|
+
#
|
|
6745
|
+
# The WireGroups API.
|
|
6746
|
+
#
|
|
6747
|
+
# @param version [::String, ::Symbol] The API version to connect to. Optional.
|
|
6748
|
+
# Defaults to `:v1`.
|
|
6749
|
+
# @return [::Object] A client object for the specified version.
|
|
6750
|
+
#
|
|
6751
|
+
def self.wire_groups version: :v1, &block
|
|
6752
|
+
require "google/cloud/compute/#{version.to_s.downcase}"
|
|
6753
|
+
|
|
6754
|
+
package_name = Google::Cloud::Compute
|
|
6755
|
+
.constants
|
|
6756
|
+
.select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") }
|
|
6757
|
+
.first
|
|
6758
|
+
service_module = Google::Cloud::Compute.const_get(package_name).const_get(:WireGroups)
|
|
6759
|
+
service_module.const_get(:Rest).const_get(:Client).new(&block)
|
|
6760
|
+
end
|
|
6761
|
+
|
|
6762
|
+
##
|
|
6763
|
+
# Determines whether the WireGroups service is supported by the current client.
|
|
6764
|
+
# If true, you can retrieve a client object by calling {Google::Cloud::Compute.wire_groups}.
|
|
6765
|
+
# If false, that method will raise an exception. This could happen if the given
|
|
6766
|
+
# API version does not exist or does not support the WireGroups service,
|
|
6767
|
+
# or if the versioned client gem needs an update to support the WireGroups service.
|
|
6768
|
+
#
|
|
6769
|
+
# @param version [::String, ::Symbol] The API version to connect to. Optional.
|
|
6770
|
+
# Defaults to `:v1`.
|
|
6771
|
+
# @return [boolean] Whether the service is available.
|
|
6772
|
+
#
|
|
6773
|
+
def self.wire_groups_available? version: :v1
|
|
6774
|
+
require "google/cloud/compute/#{version.to_s.downcase}"
|
|
6775
|
+
package_name = Google::Cloud::Compute
|
|
6776
|
+
.constants
|
|
6777
|
+
.select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") }
|
|
6778
|
+
.first
|
|
6779
|
+
return false unless package_name
|
|
6780
|
+
service_module = Google::Cloud::Compute.const_get package_name
|
|
6781
|
+
return false unless service_module.const_defined? :WireGroups
|
|
6782
|
+
service_module = service_module.const_get :WireGroups
|
|
6783
|
+
return false unless service_module.const_defined? :Rest
|
|
6784
|
+
service_module = service_module.const_get :Rest
|
|
6785
|
+
service_module.const_defined? :Client
|
|
6786
|
+
rescue ::LoadError
|
|
6787
|
+
false
|
|
6788
|
+
end
|
|
6789
|
+
|
|
6538
6790
|
##
|
|
6539
6791
|
# Create a new client object for ZoneOperations.
|
|
6540
6792
|
#
|