google-cloud-compute 0.1.0 → 0.2.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/google/cloud/compute/version.rb +1 -1
- data/lib/google/cloud/compute.rb +30 -0
- metadata +6 -12
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: b4045934ea5582927517f07d73d01c69c420a0120157a7dbe79ab883621e20c2
|
4
|
+
data.tar.gz: 4f7642d5f8096a3b016743903c5e75dc4002824759a8a02438da69ceae4776d6
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 85d36603bede22d2f950318e347fbceccd9db73c98c87e2348e4b71d12790a7e8fd7ad8a815778b1ed89620bda624b10f8756812976501ca1521eb441376ed38
|
7
|
+
data.tar.gz: cccd7fa83b239b6bd9649f58de0e59daaadeb5bce1fc875fc35708d0ddab75be6bd3e2376ff3fb7fe35c7bfa3d495eccca56ab26a47b3a570321a43bb7d799e1
|
data/lib/google/cloud/compute.rb
CHANGED
@@ -913,6 +913,36 @@ module Google
|
|
913
913
|
package_module.const_get(:Licenses).const_get(:Rest).const_get(:Client).new(&block)
|
914
914
|
end
|
915
915
|
|
916
|
+
##
|
917
|
+
# Create a new client object for MachineImages.
|
918
|
+
#
|
919
|
+
# By default, this returns an instance of
|
920
|
+
# [Google::Cloud::Compute::V1::MachineImages::Rest::Client](https://googleapis.dev/ruby/google-cloud-compute-v1/latest/Google/Cloud/Compute/V1/MachineImages/Rest/Client.html)
|
921
|
+
# for version V1 of the API.
|
922
|
+
# However, you can specify specify a different API version by passing it in the
|
923
|
+
# `version` parameter. If the MachineImages service is
|
924
|
+
# supported by that API version, and the corresponding gem is available, the
|
925
|
+
# appropriate versioned client will be returned.
|
926
|
+
#
|
927
|
+
# ## About MachineImages
|
928
|
+
#
|
929
|
+
# The MachineImages API.
|
930
|
+
#
|
931
|
+
# @param version [::String, ::Symbol] The API version to connect to. Optional.
|
932
|
+
# Defaults to `:v1`.
|
933
|
+
# @return [MachineImages::Rest::Client] A client object for the specified version.
|
934
|
+
#
|
935
|
+
def self.machine_images version: :v1, &block
|
936
|
+
require "google/cloud/compute/#{version.to_s.downcase}"
|
937
|
+
|
938
|
+
package_name = Google::Cloud::Compute
|
939
|
+
.constants
|
940
|
+
.select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") }
|
941
|
+
.first
|
942
|
+
package_module = Google::Cloud::Compute.const_get package_name
|
943
|
+
package_module.const_get(:MachineImages).const_get(:Rest).const_get(:Client).new(&block)
|
944
|
+
end
|
945
|
+
|
916
946
|
##
|
917
947
|
# Create a new client object for MachineTypes.
|
918
948
|
#
|
metadata
CHANGED
@@ -1,35 +1,29 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: google-cloud-compute
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.2.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Google LLC
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2022-02-
|
11
|
+
date: 2022-02-17 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: google-cloud-compute-v1
|
15
15
|
requirement: !ruby/object:Gem::Requirement
|
16
16
|
requirements:
|
17
|
-
- - "
|
18
|
-
- !ruby/object:Gem::Version
|
19
|
-
version: '0.0'
|
20
|
-
- - "<"
|
17
|
+
- - "~>"
|
21
18
|
- !ruby/object:Gem::Version
|
22
|
-
version:
|
19
|
+
version: '1.1'
|
23
20
|
type: :runtime
|
24
21
|
prerelease: false
|
25
22
|
version_requirements: !ruby/object:Gem::Requirement
|
26
23
|
requirements:
|
27
|
-
- - "
|
28
|
-
- !ruby/object:Gem::Version
|
29
|
-
version: '0.0'
|
30
|
-
- - "<"
|
24
|
+
- - "~>"
|
31
25
|
- !ruby/object:Gem::Version
|
32
|
-
version:
|
26
|
+
version: '1.1'
|
33
27
|
- !ruby/object:Gem::Dependency
|
34
28
|
name: google-cloud-core
|
35
29
|
requirement: !ruby/object:Gem::Requirement
|