google-cloud-gke_multi_cloud 0.2.0 → 0.3.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/AUTHENTICATION.md +6 -6
- data/README.md +1 -1
- data/lib/google/cloud/gke_multi_cloud/version.rb +1 -1
- data/lib/google/cloud/gke_multi_cloud.rb +43 -11
- metadata +5 -5
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: ef4692c5c2b050d2c3e203d2cd859e9634a7d16e5d866641c3e90a0b853df40f
|
4
|
+
data.tar.gz: cf5d68ce12d8a1a8dafef6ce7c4e327a6fef9d1fa173f2e506612ef87ade182b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: bd386357a7293f1e28f5f8a939438961e5d6c581d14b2558e941a10dd40200ac52587b438a18a23bcbb51adea1b58e9dd6e046d80c6adaa9b4a05d1e7cf8d360
|
7
|
+
data.tar.gz: 10fa9570a88582987f9be5f620371b8229d12940024efd331a890b29c7ec8d013a9b190f7fd0b05416470402b6988f3df6d42e232a6b3d3cbedac21ff72e8345
|
data/AUTHENTICATION.md
CHANGED
@@ -27,7 +27,7 @@ export GOOGLE_CLOUD_CREDENTIALS=path/to/keyfile.json
|
|
27
27
|
```ruby
|
28
28
|
require "google/cloud/gke_multi_cloud"
|
29
29
|
|
30
|
-
client = Google::Cloud::GkeMultiCloud.
|
30
|
+
client = Google::Cloud::GkeMultiCloud.attached_clusters
|
31
31
|
```
|
32
32
|
|
33
33
|
## Credential Lookup
|
@@ -64,7 +64,7 @@ containers where writing files is difficult or not encouraged.
|
|
64
64
|
|
65
65
|
The environment variables that google-cloud-gke_multi_cloud
|
66
66
|
checks for credentials are configured on the service Credentials class (such as
|
67
|
-
`::Google::Cloud::GkeMultiCloud::V1::
|
67
|
+
`::Google::Cloud::GkeMultiCloud::V1::AttachedClusters::Credentials`):
|
68
68
|
|
69
69
|
* `GOOGLE_CLOUD_CREDENTIALS` - Path to JSON file, or JSON contents
|
70
70
|
* `GOOGLE_CLOUD_KEYFILE` - Path to JSON file, or JSON contents
|
@@ -75,7 +75,7 @@ require "google/cloud/gke_multi_cloud"
|
|
75
75
|
|
76
76
|
ENV["GOOGLE_CLOUD_CREDENTIALS"] = "path/to/keyfile.json"
|
77
77
|
|
78
|
-
client = Google::Cloud::GkeMultiCloud.
|
78
|
+
client = Google::Cloud::GkeMultiCloud.attached_clusters
|
79
79
|
```
|
80
80
|
|
81
81
|
### Configuration
|
@@ -86,7 +86,7 @@ it in an environment variable. Either on an individual client initialization:
|
|
86
86
|
```ruby
|
87
87
|
require "google/cloud/gke_multi_cloud"
|
88
88
|
|
89
|
-
client = Google::Cloud::GkeMultiCloud.
|
89
|
+
client = Google::Cloud::GkeMultiCloud.attached_clusters do |config|
|
90
90
|
config.credentials = "path/to/keyfile.json"
|
91
91
|
end
|
92
92
|
```
|
@@ -100,7 +100,7 @@ Google::Cloud::GkeMultiCloud.configure do |config|
|
|
100
100
|
config.credentials = "path/to/keyfile.json"
|
101
101
|
end
|
102
102
|
|
103
|
-
client = Google::Cloud::GkeMultiCloud.
|
103
|
+
client = Google::Cloud::GkeMultiCloud.attached_clusters
|
104
104
|
```
|
105
105
|
|
106
106
|
### Cloud SDK
|
@@ -112,7 +112,7 @@ credentials are discovered.
|
|
112
112
|
To configure your system for this, simply:
|
113
113
|
|
114
114
|
1. [Download and install the Cloud SDK](https://cloud.google.com/sdk)
|
115
|
-
2. Authenticate using OAuth 2.0 `$ gcloud auth login`
|
115
|
+
2. Authenticate using OAuth 2.0 `$ gcloud auth application-default login`
|
116
116
|
3. Write code as if already authenticated.
|
117
117
|
|
118
118
|
**NOTE:** This is _not_ recommended for running in production. The Cloud SDK
|
data/README.md
CHANGED
@@ -37,7 +37,7 @@ In order to use this library, you first need to go through the following steps:
|
|
37
37
|
## Enabling Logging
|
38
38
|
|
39
39
|
To enable logging for this library, set the logger for the underlying [gRPC](https://github.com/grpc/grpc/tree/master/src/ruby) library.
|
40
|
-
The logger that you set may be a Ruby stdlib [`Logger`](https://ruby-doc.org/
|
40
|
+
The logger that you set may be a Ruby stdlib [`Logger`](https://ruby-doc.org/current/stdlibs/logger/Logger.html) as shown below,
|
41
41
|
or a [`Google::Cloud::Logging::Logger`](https://googleapis.dev/ruby/google-cloud-logging/latest)
|
42
42
|
that will write logs to [Cloud Logging](https://cloud.google.com/logging/). See [grpc/logconfig.rb](https://github.com/grpc/grpc/blob/master/src/ruby/lib/grpc/logconfig.rb)
|
43
43
|
and the gRPC [spec_helper.rb](https://github.com/grpc/grpc/blob/master/src/ruby/spec/spec_helper.rb) for additional information.
|
@@ -44,13 +44,45 @@ end
|
|
44
44
|
module Google
|
45
45
|
module Cloud
|
46
46
|
module GkeMultiCloud
|
47
|
+
##
|
48
|
+
# Create a new client object for AttachedClusters.
|
49
|
+
#
|
50
|
+
# By default, this returns an instance of
|
51
|
+
# [Google::Cloud::GkeMultiCloud::V1::AttachedClusters::Client](https://googleapis.dev/ruby/google-cloud-gke_multi_cloud-v1/latest/Google/Cloud/GkeMultiCloud/V1/AttachedClusters/Client.html)
|
52
|
+
# for a gRPC client for version V1 of the API.
|
53
|
+
# However, you can specify a different API version by passing it in the
|
54
|
+
# `version` parameter. If the AttachedClusters service is
|
55
|
+
# supported by that API version, and the corresponding gem is available, the
|
56
|
+
# appropriate versioned client will be returned.
|
57
|
+
#
|
58
|
+
# ## About AttachedClusters
|
59
|
+
#
|
60
|
+
# The AttachedClusters API provides a single centrally managed service
|
61
|
+
# to register and manage Anthos attached clusters that run on customer's owned
|
62
|
+
# infrastructure.
|
63
|
+
#
|
64
|
+
# @param version [::String, ::Symbol] The API version to connect to. Optional.
|
65
|
+
# Defaults to `:v1`.
|
66
|
+
# @return [::Object] A client object for the specified version.
|
67
|
+
#
|
68
|
+
def self.attached_clusters version: :v1, &block
|
69
|
+
require "google/cloud/gke_multi_cloud/#{version.to_s.downcase}"
|
70
|
+
|
71
|
+
package_name = Google::Cloud::GkeMultiCloud
|
72
|
+
.constants
|
73
|
+
.select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") }
|
74
|
+
.first
|
75
|
+
service_module = Google::Cloud::GkeMultiCloud.const_get(package_name).const_get(:AttachedClusters)
|
76
|
+
service_module.const_get(:Client).new(&block)
|
77
|
+
end
|
78
|
+
|
47
79
|
##
|
48
80
|
# Create a new client object for AwsClusters.
|
49
81
|
#
|
50
82
|
# By default, this returns an instance of
|
51
83
|
# [Google::Cloud::GkeMultiCloud::V1::AwsClusters::Client](https://googleapis.dev/ruby/google-cloud-gke_multi_cloud-v1/latest/Google/Cloud/GkeMultiCloud/V1/AwsClusters/Client.html)
|
52
|
-
# for version V1 of the API.
|
53
|
-
# However, you can specify
|
84
|
+
# for a gRPC client for version V1 of the API.
|
85
|
+
# However, you can specify a different API version by passing it in the
|
54
86
|
# `version` parameter. If the AwsClusters service is
|
55
87
|
# supported by that API version, and the corresponding gem is available, the
|
56
88
|
# appropriate versioned client will be returned.
|
@@ -62,7 +94,7 @@ module Google
|
|
62
94
|
#
|
63
95
|
# @param version [::String, ::Symbol] The API version to connect to. Optional.
|
64
96
|
# Defaults to `:v1`.
|
65
|
-
# @return [
|
97
|
+
# @return [::Object] A client object for the specified version.
|
66
98
|
#
|
67
99
|
def self.aws_clusters version: :v1, &block
|
68
100
|
require "google/cloud/gke_multi_cloud/#{version.to_s.downcase}"
|
@@ -71,8 +103,8 @@ module Google
|
|
71
103
|
.constants
|
72
104
|
.select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") }
|
73
105
|
.first
|
74
|
-
|
75
|
-
|
106
|
+
service_module = Google::Cloud::GkeMultiCloud.const_get(package_name).const_get(:AwsClusters)
|
107
|
+
service_module.const_get(:Client).new(&block)
|
76
108
|
end
|
77
109
|
|
78
110
|
##
|
@@ -80,8 +112,8 @@ module Google
|
|
80
112
|
#
|
81
113
|
# By default, this returns an instance of
|
82
114
|
# [Google::Cloud::GkeMultiCloud::V1::AzureClusters::Client](https://googleapis.dev/ruby/google-cloud-gke_multi_cloud-v1/latest/Google/Cloud/GkeMultiCloud/V1/AzureClusters/Client.html)
|
83
|
-
# for version V1 of the API.
|
84
|
-
# However, you can specify
|
115
|
+
# for a gRPC client for version V1 of the API.
|
116
|
+
# However, you can specify a different API version by passing it in the
|
85
117
|
# `version` parameter. If the AzureClusters service is
|
86
118
|
# supported by that API version, and the corresponding gem is available, the
|
87
119
|
# appropriate versioned client will be returned.
|
@@ -93,7 +125,7 @@ module Google
|
|
93
125
|
#
|
94
126
|
# @param version [::String, ::Symbol] The API version to connect to. Optional.
|
95
127
|
# Defaults to `:v1`.
|
96
|
-
# @return [
|
128
|
+
# @return [::Object] A client object for the specified version.
|
97
129
|
#
|
98
130
|
def self.azure_clusters version: :v1, &block
|
99
131
|
require "google/cloud/gke_multi_cloud/#{version.to_s.downcase}"
|
@@ -102,8 +134,8 @@ module Google
|
|
102
134
|
.constants
|
103
135
|
.select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") }
|
104
136
|
.first
|
105
|
-
|
106
|
-
|
137
|
+
service_module = Google::Cloud::GkeMultiCloud.const_get(package_name).const_get(:AzureClusters)
|
138
|
+
service_module.const_get(:Client).new(&block)
|
107
139
|
end
|
108
140
|
|
109
141
|
##
|
@@ -123,7 +155,7 @@ module Google
|
|
123
155
|
# * `timeout` (*type:* `Numeric`) -
|
124
156
|
# Default timeout in seconds.
|
125
157
|
# * `metadata` (*type:* `Hash{Symbol=>String}`) -
|
126
|
-
# Additional
|
158
|
+
# Additional headers to be sent with the call.
|
127
159
|
# * `retry_policy` (*type:* `Hash`) -
|
128
160
|
# The retry policy. The value is a hash with the following keys:
|
129
161
|
# * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds.
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: google-cloud-gke_multi_cloud
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.3.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:
|
11
|
+
date: 2023-02-14 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: google-cloud-core
|
@@ -30,7 +30,7 @@ dependencies:
|
|
30
30
|
requirements:
|
31
31
|
- - ">="
|
32
32
|
- !ruby/object:Gem::Version
|
33
|
-
version: '0.
|
33
|
+
version: '0.4'
|
34
34
|
- - "<"
|
35
35
|
- !ruby/object:Gem::Version
|
36
36
|
version: 2.a
|
@@ -40,7 +40,7 @@ dependencies:
|
|
40
40
|
requirements:
|
41
41
|
- - ">="
|
42
42
|
- !ruby/object:Gem::Version
|
43
|
-
version: '0.
|
43
|
+
version: '0.4'
|
44
44
|
- - "<"
|
45
45
|
- !ruby/object:Gem::Version
|
46
46
|
version: 2.a
|
@@ -191,7 +191,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
191
191
|
- !ruby/object:Gem::Version
|
192
192
|
version: '0'
|
193
193
|
requirements: []
|
194
|
-
rubygems_version: 3.
|
194
|
+
rubygems_version: 3.4.2
|
195
195
|
signing_key:
|
196
196
|
specification_version: 4
|
197
197
|
summary: API Client library for the Anthos Multi-Cloud API
|