google-cloud-compute 1.12.0 → 1.13.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 +189 -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: '016800b94a9df611606ac8008564ebc8f666bb4ec224a9006195712701fcf62b'
|
|
4
|
+
data.tar.gz: 50d797366758b24b774846494fb502c6ea781bd89ec9493d2929c7cf4880c9d3
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: a55ee1eb23380117733c4728182289d8facd69110f8a58ffa00ad5d8af4e0ae6eb3ba30d8405db28b37130f2f05fb36a4d4fc0170616f6f6a8c55bd00cb21110
|
|
7
|
+
data.tar.gz: aee0aef86a23681bf06f45c69b4f5e7b1b5b5309c2f1aa4d8f65a4905fc29e4e9ec190e55e69b7bb3328c26a7e7cacd49ba4d032d53d66b7d4dd20e0bf0d41ef
|
data/lib/google/cloud/compute.rb
CHANGED
|
@@ -361,6 +361,69 @@ module Google
|
|
|
361
361
|
false
|
|
362
362
|
end
|
|
363
363
|
|
|
364
|
+
##
|
|
365
|
+
# Create a new client object for CrossSiteNetworks.
|
|
366
|
+
#
|
|
367
|
+
# By default, this returns an instance of
|
|
368
|
+
# [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)
|
|
369
|
+
# for a REST client for version V1 of the API.
|
|
370
|
+
# However, you can specify a different API version by passing it in the
|
|
371
|
+
# `version` parameter. If the CrossSiteNetworks service is
|
|
372
|
+
# supported by that API version, and the corresponding gem is available, the
|
|
373
|
+
# appropriate versioned client will be returned.
|
|
374
|
+
#
|
|
375
|
+
# Raises an exception if the currently installed versioned client gem for the
|
|
376
|
+
# given API version does not support the CrossSiteNetworks service.
|
|
377
|
+
# You can determine whether the method will succeed by calling
|
|
378
|
+
# {Google::Cloud::Compute.cross_site_networks_available?}.
|
|
379
|
+
#
|
|
380
|
+
# ## About CrossSiteNetworks
|
|
381
|
+
#
|
|
382
|
+
# The CrossSiteNetworks API.
|
|
383
|
+
#
|
|
384
|
+
# @param version [::String, ::Symbol] The API version to connect to. Optional.
|
|
385
|
+
# Defaults to `:v1`.
|
|
386
|
+
# @return [::Object] A client object for the specified version.
|
|
387
|
+
#
|
|
388
|
+
def self.cross_site_networks version: :v1, &block
|
|
389
|
+
require "google/cloud/compute/#{version.to_s.downcase}"
|
|
390
|
+
|
|
391
|
+
package_name = Google::Cloud::Compute
|
|
392
|
+
.constants
|
|
393
|
+
.select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") }
|
|
394
|
+
.first
|
|
395
|
+
service_module = Google::Cloud::Compute.const_get(package_name).const_get(:CrossSiteNetworks)
|
|
396
|
+
service_module.const_get(:Rest).const_get(:Client).new(&block)
|
|
397
|
+
end
|
|
398
|
+
|
|
399
|
+
##
|
|
400
|
+
# Determines whether the CrossSiteNetworks service is supported by the current client.
|
|
401
|
+
# If true, you can retrieve a client object by calling {Google::Cloud::Compute.cross_site_networks}.
|
|
402
|
+
# If false, that method will raise an exception. This could happen if the given
|
|
403
|
+
# API version does not exist or does not support the CrossSiteNetworks service,
|
|
404
|
+
# or if the versioned client gem needs an update to support the CrossSiteNetworks service.
|
|
405
|
+
#
|
|
406
|
+
# @param version [::String, ::Symbol] The API version to connect to. Optional.
|
|
407
|
+
# Defaults to `:v1`.
|
|
408
|
+
# @return [boolean] Whether the service is available.
|
|
409
|
+
#
|
|
410
|
+
def self.cross_site_networks_available? version: :v1
|
|
411
|
+
require "google/cloud/compute/#{version.to_s.downcase}"
|
|
412
|
+
package_name = Google::Cloud::Compute
|
|
413
|
+
.constants
|
|
414
|
+
.select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") }
|
|
415
|
+
.first
|
|
416
|
+
return false unless package_name
|
|
417
|
+
service_module = Google::Cloud::Compute.const_get package_name
|
|
418
|
+
return false unless service_module.const_defined? :CrossSiteNetworks
|
|
419
|
+
service_module = service_module.const_get :CrossSiteNetworks
|
|
420
|
+
return false unless service_module.const_defined? :Rest
|
|
421
|
+
service_module = service_module.const_get :Rest
|
|
422
|
+
service_module.const_defined? :Client
|
|
423
|
+
rescue ::LoadError
|
|
424
|
+
false
|
|
425
|
+
end
|
|
426
|
+
|
|
364
427
|
##
|
|
365
428
|
# Create a new client object for DiskTypes.
|
|
366
429
|
#
|
|
@@ -739,6 +802,69 @@ module Google
|
|
|
739
802
|
false
|
|
740
803
|
end
|
|
741
804
|
|
|
805
|
+
##
|
|
806
|
+
# Create a new client object for FutureReservations.
|
|
807
|
+
#
|
|
808
|
+
# By default, this returns an instance of
|
|
809
|
+
# [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)
|
|
810
|
+
# for a REST client for version V1 of the API.
|
|
811
|
+
# However, you can specify a different API version by passing it in the
|
|
812
|
+
# `version` parameter. If the FutureReservations service is
|
|
813
|
+
# supported by that API version, and the corresponding gem is available, the
|
|
814
|
+
# appropriate versioned client will be returned.
|
|
815
|
+
#
|
|
816
|
+
# Raises an exception if the currently installed versioned client gem for the
|
|
817
|
+
# given API version does not support the FutureReservations service.
|
|
818
|
+
# You can determine whether the method will succeed by calling
|
|
819
|
+
# {Google::Cloud::Compute.future_reservations_available?}.
|
|
820
|
+
#
|
|
821
|
+
# ## About FutureReservations
|
|
822
|
+
#
|
|
823
|
+
# The FutureReservations API.
|
|
824
|
+
#
|
|
825
|
+
# @param version [::String, ::Symbol] The API version to connect to. Optional.
|
|
826
|
+
# Defaults to `:v1`.
|
|
827
|
+
# @return [::Object] A client object for the specified version.
|
|
828
|
+
#
|
|
829
|
+
def self.future_reservations version: :v1, &block
|
|
830
|
+
require "google/cloud/compute/#{version.to_s.downcase}"
|
|
831
|
+
|
|
832
|
+
package_name = Google::Cloud::Compute
|
|
833
|
+
.constants
|
|
834
|
+
.select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") }
|
|
835
|
+
.first
|
|
836
|
+
service_module = Google::Cloud::Compute.const_get(package_name).const_get(:FutureReservations)
|
|
837
|
+
service_module.const_get(:Rest).const_get(:Client).new(&block)
|
|
838
|
+
end
|
|
839
|
+
|
|
840
|
+
##
|
|
841
|
+
# Determines whether the FutureReservations service is supported by the current client.
|
|
842
|
+
# If true, you can retrieve a client object by calling {Google::Cloud::Compute.future_reservations}.
|
|
843
|
+
# If false, that method will raise an exception. This could happen if the given
|
|
844
|
+
# API version does not exist or does not support the FutureReservations service,
|
|
845
|
+
# or if the versioned client gem needs an update to support the FutureReservations service.
|
|
846
|
+
#
|
|
847
|
+
# @param version [::String, ::Symbol] The API version to connect to. Optional.
|
|
848
|
+
# Defaults to `:v1`.
|
|
849
|
+
# @return [boolean] Whether the service is available.
|
|
850
|
+
#
|
|
851
|
+
def self.future_reservations_available? version: :v1
|
|
852
|
+
require "google/cloud/compute/#{version.to_s.downcase}"
|
|
853
|
+
package_name = Google::Cloud::Compute
|
|
854
|
+
.constants
|
|
855
|
+
.select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") }
|
|
856
|
+
.first
|
|
857
|
+
return false unless package_name
|
|
858
|
+
service_module = Google::Cloud::Compute.const_get package_name
|
|
859
|
+
return false unless service_module.const_defined? :FutureReservations
|
|
860
|
+
service_module = service_module.const_get :FutureReservations
|
|
861
|
+
return false unless service_module.const_defined? :Rest
|
|
862
|
+
service_module = service_module.const_get :Rest
|
|
863
|
+
service_module.const_defined? :Client
|
|
864
|
+
rescue ::LoadError
|
|
865
|
+
false
|
|
866
|
+
end
|
|
867
|
+
|
|
742
868
|
##
|
|
743
869
|
# Create a new client object for GlobalAddresses.
|
|
744
870
|
#
|
|
@@ -6535,6 +6661,69 @@ module Google
|
|
|
6535
6661
|
false
|
|
6536
6662
|
end
|
|
6537
6663
|
|
|
6664
|
+
##
|
|
6665
|
+
# Create a new client object for WireGroups.
|
|
6666
|
+
#
|
|
6667
|
+
# By default, this returns an instance of
|
|
6668
|
+
# [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)
|
|
6669
|
+
# for a REST client for version V1 of the API.
|
|
6670
|
+
# However, you can specify a different API version by passing it in the
|
|
6671
|
+
# `version` parameter. If the WireGroups service is
|
|
6672
|
+
# supported by that API version, and the corresponding gem is available, the
|
|
6673
|
+
# appropriate versioned client will be returned.
|
|
6674
|
+
#
|
|
6675
|
+
# Raises an exception if the currently installed versioned client gem for the
|
|
6676
|
+
# given API version does not support the WireGroups service.
|
|
6677
|
+
# You can determine whether the method will succeed by calling
|
|
6678
|
+
# {Google::Cloud::Compute.wire_groups_available?}.
|
|
6679
|
+
#
|
|
6680
|
+
# ## About WireGroups
|
|
6681
|
+
#
|
|
6682
|
+
# The WireGroups API.
|
|
6683
|
+
#
|
|
6684
|
+
# @param version [::String, ::Symbol] The API version to connect to. Optional.
|
|
6685
|
+
# Defaults to `:v1`.
|
|
6686
|
+
# @return [::Object] A client object for the specified version.
|
|
6687
|
+
#
|
|
6688
|
+
def self.wire_groups version: :v1, &block
|
|
6689
|
+
require "google/cloud/compute/#{version.to_s.downcase}"
|
|
6690
|
+
|
|
6691
|
+
package_name = Google::Cloud::Compute
|
|
6692
|
+
.constants
|
|
6693
|
+
.select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") }
|
|
6694
|
+
.first
|
|
6695
|
+
service_module = Google::Cloud::Compute.const_get(package_name).const_get(:WireGroups)
|
|
6696
|
+
service_module.const_get(:Rest).const_get(:Client).new(&block)
|
|
6697
|
+
end
|
|
6698
|
+
|
|
6699
|
+
##
|
|
6700
|
+
# Determines whether the WireGroups service is supported by the current client.
|
|
6701
|
+
# If true, you can retrieve a client object by calling {Google::Cloud::Compute.wire_groups}.
|
|
6702
|
+
# If false, that method will raise an exception. This could happen if the given
|
|
6703
|
+
# API version does not exist or does not support the WireGroups service,
|
|
6704
|
+
# or if the versioned client gem needs an update to support the WireGroups service.
|
|
6705
|
+
#
|
|
6706
|
+
# @param version [::String, ::Symbol] The API version to connect to. Optional.
|
|
6707
|
+
# Defaults to `:v1`.
|
|
6708
|
+
# @return [boolean] Whether the service is available.
|
|
6709
|
+
#
|
|
6710
|
+
def self.wire_groups_available? version: :v1
|
|
6711
|
+
require "google/cloud/compute/#{version.to_s.downcase}"
|
|
6712
|
+
package_name = Google::Cloud::Compute
|
|
6713
|
+
.constants
|
|
6714
|
+
.select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") }
|
|
6715
|
+
.first
|
|
6716
|
+
return false unless package_name
|
|
6717
|
+
service_module = Google::Cloud::Compute.const_get package_name
|
|
6718
|
+
return false unless service_module.const_defined? :WireGroups
|
|
6719
|
+
service_module = service_module.const_get :WireGroups
|
|
6720
|
+
return false unless service_module.const_defined? :Rest
|
|
6721
|
+
service_module = service_module.const_get :Rest
|
|
6722
|
+
service_module.const_defined? :Client
|
|
6723
|
+
rescue ::LoadError
|
|
6724
|
+
false
|
|
6725
|
+
end
|
|
6726
|
+
|
|
6538
6727
|
##
|
|
6539
6728
|
# Create a new client object for ZoneOperations.
|
|
6540
6729
|
#
|