google-cloud-container 0.1.0 → 0.2.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/.yardopts +1 -0
- data/README.md +40 -3
- data/lib/google/cloud/container.rb +34 -4
- data/lib/google/cloud/container/v1.rb +74 -40
- data/lib/google/cloud/container/v1/cluster_manager_client.rb +544 -158
- data/lib/google/cloud/container/v1/credentials.rb +40 -0
- data/lib/google/cloud/container/v1/doc/google/container/v1/cluster_service.rb +1 -12
- data/lib/google/cloud/container/{credentials.rb → v1/doc/google/protobuf/empty.rb} +13 -15
- data/lib/google/cloud/container/v1/doc/overview.rb +29 -4
- metadata +40 -11
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 5985387da03022bbbc72dff93bc8936b65974873be331abdd49fae00b6ff65d7
|
4
|
+
data.tar.gz: 037cf99ed6c8191df7c0afc05ad514a90cadfebc4024a88668f6e01aae1c8bda
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e095c56d813cc0051c5340ca8476cf48aa738fd63b99b20e63e069c558cc7566c8175dc70ccbfb89eb15c8813462fbfcdcc0972ca9ae72252ec872abf4643160
|
7
|
+
data.tar.gz: 32483576ad656c53b68cb4014ebce6ecd9313efd151e5995670bc8a1d02855b992e7e83278cbb4e9986bf5c6864816ef7e4a9c98e9d3e47c60a240d15b379c17
|
data/.yardopts
CHANGED
data/README.md
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
# Ruby Client for Google Container Engine API ([
|
1
|
+
# Ruby Client for Google Container Engine API ([Beta](https://github.com/GoogleCloudPlatform/google-cloud-ruby#versioning))
|
2
2
|
|
3
3
|
[Google Container Engine API][Product Documentation]:
|
4
4
|
The Google Kubernetes Engine API is used for building and managing container
|
@@ -12,7 +12,7 @@ steps:
|
|
12
12
|
|
13
13
|
1. [Select or create a Cloud Platform project.](https://console.cloud.google.com/project)
|
14
14
|
2. [Enable billing for your project.](https://cloud.google.com/billing/docs/how-to/modify-project#enable_billing_for_a_project)
|
15
|
-
3. [Enable the Google Container Engine API.](https://console.cloud.google.com/apis/
|
15
|
+
3. [Enable the Google Container Engine API.](https://console.cloud.google.com/apis/library/container.googleapis.com)
|
16
16
|
4. [Setup Authentication.](https://googlecloudplatform.github.io/google-cloud-ruby/#/docs/google-cloud/master/guides/authentication)
|
17
17
|
|
18
18
|
### Installation
|
@@ -40,4 +40,41 @@ response = cluster_manager_client.list_clusters(project_id_2, zone)
|
|
40
40
|
to see the full list of Cloud APIs that we cover.
|
41
41
|
|
42
42
|
[Client Library Documentation]: https://googlecloudplatform.github.io/google-cloud-ruby/#/docs/google-cloud-container/latest/google/container/v1
|
43
|
-
[Product Documentation]: https://cloud.google.com/
|
43
|
+
[Product Documentation]: https://cloud.google.com/kubernetes-engine
|
44
|
+
|
45
|
+
## Enabling Logging
|
46
|
+
|
47
|
+
To enable logging for this library, set the logger for the underlying [gRPC](https://github.com/grpc/grpc/tree/master/src/ruby) library.
|
48
|
+
The logger that you set may be a Ruby stdlib [`Logger`](https://ruby-doc.org/stdlib-2.5.0/libdoc/logger/rdoc/Logger.html) as shown below,
|
49
|
+
or a [`Google::Cloud::Logging::Logger`](https://googlecloudplatform.github.io/google-cloud-ruby/#/docs/google-cloud-logging/latest/google/cloud/logging/logger)
|
50
|
+
that will write logs to [Stackdriver Logging](https://cloud.google.com/logging/). See [grpc/logconfig.rb](https://github.com/grpc/grpc/blob/master/src/ruby/lib/grpc/logconfig.rb)
|
51
|
+
and the gRPC [spec_helper.rb](https://github.com/grpc/grpc/blob/master/src/ruby/spec/spec_helper.rb) for additional information.
|
52
|
+
|
53
|
+
Configuring a Ruby stdlib logger:
|
54
|
+
|
55
|
+
```ruby
|
56
|
+
require "logger"
|
57
|
+
|
58
|
+
module MyLogger
|
59
|
+
LOGGER = Logger.new $stderr, level: Logger::WARN
|
60
|
+
def logger
|
61
|
+
LOGGER
|
62
|
+
end
|
63
|
+
end
|
64
|
+
|
65
|
+
# Define a gRPC module-level logger method before grpc/logconfig.rb loads.
|
66
|
+
module GRPC
|
67
|
+
extend MyLogger
|
68
|
+
end
|
69
|
+
```
|
70
|
+
|
71
|
+
## Supported Ruby Versions
|
72
|
+
|
73
|
+
This library is supported on Ruby 2.3+.
|
74
|
+
|
75
|
+
Google provides official support for Ruby versions that are actively supported
|
76
|
+
by Ruby Core—that is, Ruby versions that are either in normal maintenance or
|
77
|
+
in security maintenance, and not end of life. Currently, this means Ruby 2.3
|
78
|
+
and later. Older versions of Ruby _may_ still work, but are unsupported and not
|
79
|
+
recommended. See https://www.ruby-lang.org/en/downloads/branches/ for details
|
80
|
+
about the Ruby support schedule.
|
@@ -1,4 +1,4 @@
|
|
1
|
-
# Copyright
|
1
|
+
# Copyright 2018 Google LLC
|
2
2
|
#
|
3
3
|
# Licensed under the Apache License, Version 2.0 (the "License");
|
4
4
|
# you may not use this file except in compliance with the License.
|
@@ -20,7 +20,7 @@ module Google
|
|
20
20
|
# rubocop:disable LineLength
|
21
21
|
|
22
22
|
##
|
23
|
-
# # Ruby Client for Google Container Engine API ([
|
23
|
+
# # Ruby Client for Google Container Engine API ([Beta](https://github.com/GoogleCloudPlatform/google-cloud-ruby#versioning))
|
24
24
|
#
|
25
25
|
# [Google Container Engine API][Product Documentation]:
|
26
26
|
# The Google Kubernetes Engine API is used for building and managing container
|
@@ -33,7 +33,7 @@ module Google
|
|
33
33
|
#
|
34
34
|
# 1. [Select or create a Cloud Platform project.](https://console.cloud.google.com/project)
|
35
35
|
# 2. [Enable billing for your project.](https://cloud.google.com/billing/docs/how-to/modify-project#enable_billing_for_a_project)
|
36
|
-
# 3. [Enable the Google Container Engine API.](https://console.cloud.google.com/apis/
|
36
|
+
# 3. [Enable the Google Container Engine API.](https://console.cloud.google.com/apis/library/container.googleapis.com)
|
37
37
|
# 4. [Setup Authentication.](https://googlecloudplatform.github.io/google-cloud-ruby/#/docs/google-cloud/master/guides/authentication)
|
38
38
|
#
|
39
39
|
# ### Preview
|
@@ -53,8 +53,33 @@ module Google
|
|
53
53
|
# - View this [repository's main README](https://github.com/GoogleCloudPlatform/google-cloud-ruby/blob/master/README.md)
|
54
54
|
# to see the full list of Cloud APIs that we cover.
|
55
55
|
#
|
56
|
-
# [Product Documentation]: https://cloud.google.com/
|
56
|
+
# [Product Documentation]: https://cloud.google.com/kubernetes-engine
|
57
57
|
#
|
58
|
+
# ## Enabling Logging
|
59
|
+
#
|
60
|
+
# To enable logging for this library, set the logger for the underlying [gRPC](https://github.com/grpc/grpc/tree/master/src/ruby) library.
|
61
|
+
# The logger that you set may be a Ruby stdlib [`Logger`](https://ruby-doc.org/stdlib-2.5.0/libdoc/logger/rdoc/Logger.html) as shown below,
|
62
|
+
# or a [`Google::Cloud::Logging::Logger`](https://googlecloudplatform.github.io/google-cloud-ruby/#/docs/google-cloud-logging/latest/google/cloud/logging/logger)
|
63
|
+
# that will write logs to [Stackdriver Logging](https://cloud.google.com/logging/). See [grpc/logconfig.rb](https://github.com/grpc/grpc/blob/master/src/ruby/lib/grpc/logconfig.rb)
|
64
|
+
# and the gRPC [spec_helper.rb](https://github.com/grpc/grpc/blob/master/src/ruby/spec/spec_helper.rb) for additional information.
|
65
|
+
#
|
66
|
+
# Configuring a Ruby stdlib logger:
|
67
|
+
#
|
68
|
+
# ```ruby
|
69
|
+
# require "logger"
|
70
|
+
#
|
71
|
+
# module MyLogger
|
72
|
+
# LOGGER = Logger.new $stderr, level: Logger::WARN
|
73
|
+
# def logger
|
74
|
+
# LOGGER
|
75
|
+
# end
|
76
|
+
# end
|
77
|
+
#
|
78
|
+
# # Define a gRPC module-level logger method before grpc/logconfig.rb loads.
|
79
|
+
# module GRPC
|
80
|
+
# extend MyLogger
|
81
|
+
# end
|
82
|
+
# ```
|
58
83
|
#
|
59
84
|
module Container
|
60
85
|
# rubocop:enable LineLength
|
@@ -98,6 +123,11 @@ module Google
|
|
98
123
|
# or the specified config is missing data points.
|
99
124
|
# @param timeout [Numeric]
|
100
125
|
# The default timeout, in seconds, for calls made through this client.
|
126
|
+
# @param metadata [Hash]
|
127
|
+
# Default metadata to be sent with each request. This can be overridden on a per call basis.
|
128
|
+
# @param exception_transformer [Proc]
|
129
|
+
# An optional proc that intercepts any exceptions raised during an API call to inject
|
130
|
+
# custom error handling.
|
101
131
|
def self.new(*args, version: :v1, **kwargs)
|
102
132
|
unless AVAILABLE_VERSIONS.include?(version.to_s.downcase)
|
103
133
|
raise "The version: #{version} is not available. The available versions " \
|
@@ -1,4 +1,4 @@
|
|
1
|
-
# Copyright
|
1
|
+
# Copyright 2018 Google LLC
|
2
2
|
#
|
3
3
|
# Licensed under the Apache License, Version 2.0 (the "License");
|
4
4
|
# you may not use this file except in compliance with the License.
|
@@ -16,46 +16,71 @@ require "google/cloud/container/v1/cluster_manager_client"
|
|
16
16
|
|
17
17
|
module Google
|
18
18
|
module Cloud
|
19
|
-
# rubocop:disable LineLength
|
20
|
-
|
21
|
-
##
|
22
|
-
# # Ruby Client for Google Container Engine API ([Alpha](https://github.com/GoogleCloudPlatform/google-cloud-ruby#versioning))
|
23
|
-
#
|
24
|
-
# [Google Container Engine API][Product Documentation]:
|
25
|
-
# The Google Kubernetes Engine API is used for building and managing container
|
26
|
-
# based applications, powered by the open source Kubernetes technology.
|
27
|
-
# - [Product Documentation][]
|
28
|
-
#
|
29
|
-
# ## Quick Start
|
30
|
-
# In order to use this library, you first need to go through the following
|
31
|
-
# steps:
|
32
|
-
#
|
33
|
-
# 1. [Select or create a Cloud Platform project.](https://console.cloud.google.com/project)
|
34
|
-
# 2. [Enable billing for your project.](https://cloud.google.com/billing/docs/how-to/modify-project#enable_billing_for_a_project)
|
35
|
-
# 3. [Enable the Google Container Engine API.](https://console.cloud.google.com/apis/api/container)
|
36
|
-
# 4. [Setup Authentication.](https://googlecloudplatform.github.io/google-cloud-ruby/#/docs/google-cloud/master/guides/authentication)
|
37
|
-
#
|
38
|
-
# ### Preview
|
39
|
-
# #### ClusterManagerClient
|
40
|
-
# ```rb
|
41
|
-
# require "google/cloud/container/v1"
|
42
|
-
#
|
43
|
-
# cluster_manager_client = Google::Cloud::Container::V1.new
|
44
|
-
# project_id_2 = project_id
|
45
|
-
# zone = "us-central1-a"
|
46
|
-
# response = cluster_manager_client.list_clusters(project_id_2, zone)
|
47
|
-
# ```
|
48
|
-
#
|
49
|
-
# ### Next Steps
|
50
|
-
# - Read the [Google Container Engine API Product documentation][Product Documentation]
|
51
|
-
# to learn more about the product and see How-to Guides.
|
52
|
-
# - View this [repository's main README](https://github.com/GoogleCloudPlatform/google-cloud-ruby/blob/master/README.md)
|
53
|
-
# to see the full list of Cloud APIs that we cover.
|
54
|
-
#
|
55
|
-
# [Product Documentation]: https://cloud.google.com/container
|
56
|
-
#
|
57
|
-
#
|
58
19
|
module Container
|
20
|
+
# rubocop:disable LineLength
|
21
|
+
|
22
|
+
##
|
23
|
+
# # Ruby Client for Google Container Engine API ([Beta](https://github.com/GoogleCloudPlatform/google-cloud-ruby#versioning))
|
24
|
+
#
|
25
|
+
# [Google Container Engine API][Product Documentation]:
|
26
|
+
# The Google Kubernetes Engine API is used for building and managing container
|
27
|
+
# based applications, powered by the open source Kubernetes technology.
|
28
|
+
# - [Product Documentation][]
|
29
|
+
#
|
30
|
+
# ## Quick Start
|
31
|
+
# In order to use this library, you first need to go through the following
|
32
|
+
# steps:
|
33
|
+
#
|
34
|
+
# 1. [Select or create a Cloud Platform project.](https://console.cloud.google.com/project)
|
35
|
+
# 2. [Enable billing for your project.](https://cloud.google.com/billing/docs/how-to/modify-project#enable_billing_for_a_project)
|
36
|
+
# 3. [Enable the Google Container Engine API.](https://console.cloud.google.com/apis/library/container.googleapis.com)
|
37
|
+
# 4. [Setup Authentication.](https://googlecloudplatform.github.io/google-cloud-ruby/#/docs/google-cloud/master/guides/authentication)
|
38
|
+
#
|
39
|
+
# ### Preview
|
40
|
+
# #### ClusterManagerClient
|
41
|
+
# ```rb
|
42
|
+
# require "google/cloud/container"
|
43
|
+
#
|
44
|
+
# cluster_manager_client = Google::Cloud::Container.new(version: :v1)
|
45
|
+
# project_id_2 = project_id
|
46
|
+
# zone = "us-central1-a"
|
47
|
+
# response = cluster_manager_client.list_clusters(project_id_2, zone)
|
48
|
+
# ```
|
49
|
+
#
|
50
|
+
# ### Next Steps
|
51
|
+
# - Read the [Google Container Engine API Product documentation][Product Documentation]
|
52
|
+
# to learn more about the product and see How-to Guides.
|
53
|
+
# - View this [repository's main README](https://github.com/GoogleCloudPlatform/google-cloud-ruby/blob/master/README.md)
|
54
|
+
# to see the full list of Cloud APIs that we cover.
|
55
|
+
#
|
56
|
+
# [Product Documentation]: https://cloud.google.com/kubernetes-engine
|
57
|
+
#
|
58
|
+
# ## Enabling Logging
|
59
|
+
#
|
60
|
+
# To enable logging for this library, set the logger for the underlying [gRPC](https://github.com/grpc/grpc/tree/master/src/ruby) library.
|
61
|
+
# The logger that you set may be a Ruby stdlib [`Logger`](https://ruby-doc.org/stdlib-2.5.0/libdoc/logger/rdoc/Logger.html) as shown below,
|
62
|
+
# or a [`Google::Cloud::Logging::Logger`](https://googlecloudplatform.github.io/google-cloud-ruby/#/docs/google-cloud-logging/latest/google/cloud/logging/logger)
|
63
|
+
# that will write logs to [Stackdriver Logging](https://cloud.google.com/logging/). See [grpc/logconfig.rb](https://github.com/grpc/grpc/blob/master/src/ruby/lib/grpc/logconfig.rb)
|
64
|
+
# and the gRPC [spec_helper.rb](https://github.com/grpc/grpc/blob/master/src/ruby/spec/spec_helper.rb) for additional information.
|
65
|
+
#
|
66
|
+
# Configuring a Ruby stdlib logger:
|
67
|
+
#
|
68
|
+
# ```ruby
|
69
|
+
# require "logger"
|
70
|
+
#
|
71
|
+
# module MyLogger
|
72
|
+
# LOGGER = Logger.new $stderr, level: Logger::WARN
|
73
|
+
# def logger
|
74
|
+
# LOGGER
|
75
|
+
# end
|
76
|
+
# end
|
77
|
+
#
|
78
|
+
# # Define a gRPC module-level logger method before grpc/logconfig.rb loads.
|
79
|
+
# module GRPC
|
80
|
+
# extend MyLogger
|
81
|
+
# end
|
82
|
+
# ```
|
83
|
+
#
|
59
84
|
module V1
|
60
85
|
# rubocop:enable LineLength
|
61
86
|
|
@@ -86,11 +111,18 @@ module Google
|
|
86
111
|
# or the specified config is missing data points.
|
87
112
|
# @param timeout [Numeric]
|
88
113
|
# The default timeout, in seconds, for calls made through this client.
|
114
|
+
# @param metadata [Hash]
|
115
|
+
# Default metadata to be sent with each request. This can be overridden on a per call basis.
|
116
|
+
# @param exception_transformer [Proc]
|
117
|
+
# An optional proc that intercepts any exceptions raised during an API call to inject
|
118
|
+
# custom error handling.
|
89
119
|
def self.new \
|
90
120
|
credentials: nil,
|
91
121
|
scopes: nil,
|
92
122
|
client_config: nil,
|
93
123
|
timeout: nil,
|
124
|
+
metadata: nil,
|
125
|
+
exception_transformer: nil,
|
94
126
|
lib_name: nil,
|
95
127
|
lib_version: nil
|
96
128
|
kwargs = {
|
@@ -98,6 +130,8 @@ module Google
|
|
98
130
|
scopes: scopes,
|
99
131
|
client_config: client_config,
|
100
132
|
timeout: timeout,
|
133
|
+
metadata: metadata,
|
134
|
+
exception_transformer: exception_transformer,
|
101
135
|
lib_name: lib_name,
|
102
136
|
lib_version: lib_version
|
103
137
|
}.select { |_, v| v != nil }
|
@@ -1,4 +1,4 @@
|
|
1
|
-
# Copyright
|
1
|
+
# Copyright 2018 Google LLC
|
2
2
|
#
|
3
3
|
# Licensed under the Apache License, Version 2.0 (the "License");
|
4
4
|
# you may not use this file except in compliance with the License.
|
@@ -18,9 +18,6 @@
|
|
18
18
|
# and updates to that file get reflected here through a refresh process.
|
19
19
|
# For the short term, the refresh process will only be runnable by Google
|
20
20
|
# engineers.
|
21
|
-
#
|
22
|
-
# The only allowed edits are to method and file documentation. A 3-way
|
23
|
-
# merge preserves those additions if the generated source changes.
|
24
21
|
|
25
22
|
require "json"
|
26
23
|
require "pathname"
|
@@ -28,7 +25,7 @@ require "pathname"
|
|
28
25
|
require "google/gax"
|
29
26
|
|
30
27
|
require "google/container/v1/cluster_service_pb"
|
31
|
-
require "google/cloud/container/credentials"
|
28
|
+
require "google/cloud/container/v1/credentials"
|
32
29
|
|
33
30
|
module Google
|
34
31
|
module Cloud
|
@@ -47,6 +44,9 @@ module Google
|
|
47
44
|
# The default port of the service.
|
48
45
|
DEFAULT_SERVICE_PORT = 443
|
49
46
|
|
47
|
+
# The default set of gRPC interceptors.
|
48
|
+
GRPC_INTERCEPTORS = []
|
49
|
+
|
50
50
|
DEFAULT_TIMEOUT = 30
|
51
51
|
|
52
52
|
# The scopes needed to make gRPC calls to all of the methods defined in
|
@@ -80,11 +80,18 @@ module Google
|
|
80
80
|
# or the specified config is missing data points.
|
81
81
|
# @param timeout [Numeric]
|
82
82
|
# The default timeout, in seconds, for calls made through this client.
|
83
|
+
# @param metadata [Hash]
|
84
|
+
# Default metadata to be sent with each request. This can be overridden on a per call basis.
|
85
|
+
# @param exception_transformer [Proc]
|
86
|
+
# An optional proc that intercepts any exceptions raised during an API call to inject
|
87
|
+
# custom error handling.
|
83
88
|
def initialize \
|
84
89
|
credentials: nil,
|
85
90
|
scopes: ALL_SCOPES,
|
86
91
|
client_config: {},
|
87
92
|
timeout: DEFAULT_TIMEOUT,
|
93
|
+
metadata: nil,
|
94
|
+
exception_transformer: nil,
|
88
95
|
lib_name: nil,
|
89
96
|
lib_version: ""
|
90
97
|
# These require statements are intentionally placed here to initialize
|
@@ -93,10 +100,10 @@ module Google
|
|
93
100
|
require "google/gax/grpc"
|
94
101
|
require "google/container/v1/cluster_service_services_pb"
|
95
102
|
|
96
|
-
credentials ||= Google::Cloud::Container::Credentials.default
|
103
|
+
credentials ||= Google::Cloud::Container::V1::Credentials.default
|
97
104
|
|
98
105
|
if credentials.is_a?(String) || credentials.is_a?(Hash)
|
99
|
-
updater_proc = Google::Cloud::Container::Credentials.new(credentials).updater_proc
|
106
|
+
updater_proc = Google::Cloud::Container::V1::Credentials.new(credentials).updater_proc
|
100
107
|
end
|
101
108
|
if credentials.is_a?(GRPC::Core::Channel)
|
102
109
|
channel = credentials
|
@@ -120,6 +127,7 @@ module Google
|
|
120
127
|
google_api_client.freeze
|
121
128
|
|
122
129
|
headers = { :"x-goog-api-client" => google_api_client }
|
130
|
+
headers.merge!(metadata) unless metadata.nil?
|
123
131
|
client_config_file = Pathname.new(__dir__).join(
|
124
132
|
"cluster_manager_client_config.json"
|
125
133
|
)
|
@@ -131,13 +139,14 @@ module Google
|
|
131
139
|
Google::Gax::Grpc::STATUS_CODE_NAMES,
|
132
140
|
timeout,
|
133
141
|
errors: Google::Gax::Grpc::API_ERRORS,
|
134
|
-
|
142
|
+
metadata: headers
|
135
143
|
)
|
136
144
|
end
|
137
145
|
|
138
146
|
# Allow overriding the service path/port in subclasses.
|
139
147
|
service_path = self.class::SERVICE_ADDRESS
|
140
148
|
port = self.class::DEFAULT_SERVICE_PORT
|
149
|
+
interceptors = self.class::GRPC_INTERCEPTORS
|
141
150
|
@cluster_manager_stub = Google::Gax::Grpc.create_stub(
|
142
151
|
service_path,
|
143
152
|
port,
|
@@ -145,128 +154,159 @@ module Google
|
|
145
154
|
channel: channel,
|
146
155
|
updater_proc: updater_proc,
|
147
156
|
scopes: scopes,
|
157
|
+
interceptors: interceptors,
|
148
158
|
&Google::Container::V1::ClusterManager::Stub.method(:new)
|
149
159
|
)
|
150
160
|
|
151
161
|
@list_clusters = Google::Gax.create_api_call(
|
152
162
|
@cluster_manager_stub.method(:list_clusters),
|
153
|
-
defaults["list_clusters"]
|
163
|
+
defaults["list_clusters"],
|
164
|
+
exception_transformer: exception_transformer
|
154
165
|
)
|
155
166
|
@get_cluster = Google::Gax.create_api_call(
|
156
167
|
@cluster_manager_stub.method(:get_cluster),
|
157
|
-
defaults["get_cluster"]
|
168
|
+
defaults["get_cluster"],
|
169
|
+
exception_transformer: exception_transformer
|
158
170
|
)
|
159
171
|
@create_cluster = Google::Gax.create_api_call(
|
160
172
|
@cluster_manager_stub.method(:create_cluster),
|
161
|
-
defaults["create_cluster"]
|
173
|
+
defaults["create_cluster"],
|
174
|
+
exception_transformer: exception_transformer
|
162
175
|
)
|
163
176
|
@update_cluster = Google::Gax.create_api_call(
|
164
177
|
@cluster_manager_stub.method(:update_cluster),
|
165
|
-
defaults["update_cluster"]
|
178
|
+
defaults["update_cluster"],
|
179
|
+
exception_transformer: exception_transformer
|
166
180
|
)
|
167
181
|
@update_node_pool = Google::Gax.create_api_call(
|
168
182
|
@cluster_manager_stub.method(:update_node_pool),
|
169
|
-
defaults["update_node_pool"]
|
183
|
+
defaults["update_node_pool"],
|
184
|
+
exception_transformer: exception_transformer
|
170
185
|
)
|
171
186
|
@set_node_pool_autoscaling = Google::Gax.create_api_call(
|
172
187
|
@cluster_manager_stub.method(:set_node_pool_autoscaling),
|
173
|
-
defaults["set_node_pool_autoscaling"]
|
188
|
+
defaults["set_node_pool_autoscaling"],
|
189
|
+
exception_transformer: exception_transformer
|
174
190
|
)
|
175
191
|
@set_logging_service = Google::Gax.create_api_call(
|
176
192
|
@cluster_manager_stub.method(:set_logging_service),
|
177
|
-
defaults["set_logging_service"]
|
193
|
+
defaults["set_logging_service"],
|
194
|
+
exception_transformer: exception_transformer
|
178
195
|
)
|
179
196
|
@set_monitoring_service = Google::Gax.create_api_call(
|
180
197
|
@cluster_manager_stub.method(:set_monitoring_service),
|
181
|
-
defaults["set_monitoring_service"]
|
198
|
+
defaults["set_monitoring_service"],
|
199
|
+
exception_transformer: exception_transformer
|
182
200
|
)
|
183
201
|
@set_addons_config = Google::Gax.create_api_call(
|
184
202
|
@cluster_manager_stub.method(:set_addons_config),
|
185
|
-
defaults["set_addons_config"]
|
203
|
+
defaults["set_addons_config"],
|
204
|
+
exception_transformer: exception_transformer
|
186
205
|
)
|
187
206
|
@set_locations = Google::Gax.create_api_call(
|
188
207
|
@cluster_manager_stub.method(:set_locations),
|
189
|
-
defaults["set_locations"]
|
208
|
+
defaults["set_locations"],
|
209
|
+
exception_transformer: exception_transformer
|
190
210
|
)
|
191
211
|
@update_master = Google::Gax.create_api_call(
|
192
212
|
@cluster_manager_stub.method(:update_master),
|
193
|
-
defaults["update_master"]
|
213
|
+
defaults["update_master"],
|
214
|
+
exception_transformer: exception_transformer
|
194
215
|
)
|
195
216
|
@set_master_auth = Google::Gax.create_api_call(
|
196
217
|
@cluster_manager_stub.method(:set_master_auth),
|
197
|
-
defaults["set_master_auth"]
|
218
|
+
defaults["set_master_auth"],
|
219
|
+
exception_transformer: exception_transformer
|
198
220
|
)
|
199
221
|
@delete_cluster = Google::Gax.create_api_call(
|
200
222
|
@cluster_manager_stub.method(:delete_cluster),
|
201
|
-
defaults["delete_cluster"]
|
223
|
+
defaults["delete_cluster"],
|
224
|
+
exception_transformer: exception_transformer
|
202
225
|
)
|
203
226
|
@list_operations = Google::Gax.create_api_call(
|
204
227
|
@cluster_manager_stub.method(:list_operations),
|
205
|
-
defaults["list_operations"]
|
228
|
+
defaults["list_operations"],
|
229
|
+
exception_transformer: exception_transformer
|
206
230
|
)
|
207
231
|
@get_operation = Google::Gax.create_api_call(
|
208
232
|
@cluster_manager_stub.method(:get_operation),
|
209
|
-
defaults["get_operation"]
|
233
|
+
defaults["get_operation"],
|
234
|
+
exception_transformer: exception_transformer
|
210
235
|
)
|
211
236
|
@cancel_operation = Google::Gax.create_api_call(
|
212
237
|
@cluster_manager_stub.method(:cancel_operation),
|
213
|
-
defaults["cancel_operation"]
|
238
|
+
defaults["cancel_operation"],
|
239
|
+
exception_transformer: exception_transformer
|
214
240
|
)
|
215
241
|
@get_server_config = Google::Gax.create_api_call(
|
216
242
|
@cluster_manager_stub.method(:get_server_config),
|
217
|
-
defaults["get_server_config"]
|
243
|
+
defaults["get_server_config"],
|
244
|
+
exception_transformer: exception_transformer
|
218
245
|
)
|
219
246
|
@list_node_pools = Google::Gax.create_api_call(
|
220
247
|
@cluster_manager_stub.method(:list_node_pools),
|
221
|
-
defaults["list_node_pools"]
|
248
|
+
defaults["list_node_pools"],
|
249
|
+
exception_transformer: exception_transformer
|
222
250
|
)
|
223
251
|
@get_node_pool = Google::Gax.create_api_call(
|
224
252
|
@cluster_manager_stub.method(:get_node_pool),
|
225
|
-
defaults["get_node_pool"]
|
253
|
+
defaults["get_node_pool"],
|
254
|
+
exception_transformer: exception_transformer
|
226
255
|
)
|
227
256
|
@create_node_pool = Google::Gax.create_api_call(
|
228
257
|
@cluster_manager_stub.method(:create_node_pool),
|
229
|
-
defaults["create_node_pool"]
|
258
|
+
defaults["create_node_pool"],
|
259
|
+
exception_transformer: exception_transformer
|
230
260
|
)
|
231
261
|
@delete_node_pool = Google::Gax.create_api_call(
|
232
262
|
@cluster_manager_stub.method(:delete_node_pool),
|
233
|
-
defaults["delete_node_pool"]
|
263
|
+
defaults["delete_node_pool"],
|
264
|
+
exception_transformer: exception_transformer
|
234
265
|
)
|
235
266
|
@rollback_node_pool_upgrade = Google::Gax.create_api_call(
|
236
267
|
@cluster_manager_stub.method(:rollback_node_pool_upgrade),
|
237
|
-
defaults["rollback_node_pool_upgrade"]
|
268
|
+
defaults["rollback_node_pool_upgrade"],
|
269
|
+
exception_transformer: exception_transformer
|
238
270
|
)
|
239
271
|
@set_node_pool_management = Google::Gax.create_api_call(
|
240
272
|
@cluster_manager_stub.method(:set_node_pool_management),
|
241
|
-
defaults["set_node_pool_management"]
|
273
|
+
defaults["set_node_pool_management"],
|
274
|
+
exception_transformer: exception_transformer
|
242
275
|
)
|
243
276
|
@set_labels = Google::Gax.create_api_call(
|
244
277
|
@cluster_manager_stub.method(:set_labels),
|
245
|
-
defaults["set_labels"]
|
278
|
+
defaults["set_labels"],
|
279
|
+
exception_transformer: exception_transformer
|
246
280
|
)
|
247
281
|
@set_legacy_abac = Google::Gax.create_api_call(
|
248
282
|
@cluster_manager_stub.method(:set_legacy_abac),
|
249
|
-
defaults["set_legacy_abac"]
|
283
|
+
defaults["set_legacy_abac"],
|
284
|
+
exception_transformer: exception_transformer
|
250
285
|
)
|
251
286
|
@start_ip_rotation = Google::Gax.create_api_call(
|
252
287
|
@cluster_manager_stub.method(:start_ip_rotation),
|
253
|
-
defaults["start_ip_rotation"]
|
288
|
+
defaults["start_ip_rotation"],
|
289
|
+
exception_transformer: exception_transformer
|
254
290
|
)
|
255
291
|
@complete_ip_rotation = Google::Gax.create_api_call(
|
256
292
|
@cluster_manager_stub.method(:complete_ip_rotation),
|
257
|
-
defaults["complete_ip_rotation"]
|
293
|
+
defaults["complete_ip_rotation"],
|
294
|
+
exception_transformer: exception_transformer
|
258
295
|
)
|
259
296
|
@set_node_pool_size = Google::Gax.create_api_call(
|
260
297
|
@cluster_manager_stub.method(:set_node_pool_size),
|
261
|
-
defaults["set_node_pool_size"]
|
298
|
+
defaults["set_node_pool_size"],
|
299
|
+
exception_transformer: exception_transformer
|
262
300
|
)
|
263
301
|
@set_network_policy = Google::Gax.create_api_call(
|
264
302
|
@cluster_manager_stub.method(:set_network_policy),
|
265
|
-
defaults["set_network_policy"]
|
303
|
+
defaults["set_network_policy"],
|
304
|
+
exception_transformer: exception_transformer
|
266
305
|
)
|
267
306
|
@set_maintenance_policy = Google::Gax.create_api_call(
|
268
307
|
@cluster_manager_stub.method(:set_maintenance_policy),
|
269
|
-
defaults["set_maintenance_policy"]
|
308
|
+
defaults["set_maintenance_policy"],
|
309
|
+
exception_transformer: exception_transformer
|
270
310
|
)
|
271
311
|
end
|
272
312
|
|
@@ -285,26 +325,34 @@ module Google
|
|
285
325
|
# @param options [Google::Gax::CallOptions]
|
286
326
|
# Overrides the default settings for this call, e.g, timeout,
|
287
327
|
# retries, etc.
|
328
|
+
# @yield [result, operation] Access the result along with the RPC operation
|
329
|
+
# @yieldparam result [Google::Container::V1::ListClustersResponse]
|
330
|
+
# @yieldparam operation [GRPC::ActiveCall::Operation]
|
288
331
|
# @return [Google::Container::V1::ListClustersResponse]
|
289
332
|
# @raise [Google::Gax::GaxError] if the RPC is aborted.
|
290
333
|
# @example
|
291
|
-
# require "google/cloud/container
|
334
|
+
# require "google/cloud/container"
|
292
335
|
#
|
293
|
-
# cluster_manager_client = Google::Cloud::Container
|
336
|
+
# cluster_manager_client = Google::Cloud::Container.new(version: :v1)
|
337
|
+
#
|
338
|
+
# # TODO: Initialize +project_id+:
|
294
339
|
# project_id = ''
|
340
|
+
#
|
341
|
+
# # TODO: Initialize +zone+:
|
295
342
|
# zone = ''
|
296
343
|
# response = cluster_manager_client.list_clusters(project_id, zone)
|
297
344
|
|
298
345
|
def list_clusters \
|
299
346
|
project_id,
|
300
347
|
zone,
|
301
|
-
options: nil
|
348
|
+
options: nil,
|
349
|
+
&block
|
302
350
|
req = {
|
303
351
|
project_id: project_id,
|
304
352
|
zone: zone
|
305
353
|
}.delete_if { |_, v| v.nil? }
|
306
354
|
req = Google::Gax::to_proto(req, Google::Container::V1::ListClustersRequest)
|
307
|
-
@list_clusters.call(req, options)
|
355
|
+
@list_clusters.call(req, options, &block)
|
308
356
|
end
|
309
357
|
|
310
358
|
# Gets the details of a specific cluster.
|
@@ -321,14 +369,23 @@ module Google
|
|
321
369
|
# @param options [Google::Gax::CallOptions]
|
322
370
|
# Overrides the default settings for this call, e.g, timeout,
|
323
371
|
# retries, etc.
|
372
|
+
# @yield [result, operation] Access the result along with the RPC operation
|
373
|
+
# @yieldparam result [Google::Container::V1::Cluster]
|
374
|
+
# @yieldparam operation [GRPC::ActiveCall::Operation]
|
324
375
|
# @return [Google::Container::V1::Cluster]
|
325
376
|
# @raise [Google::Gax::GaxError] if the RPC is aborted.
|
326
377
|
# @example
|
327
|
-
# require "google/cloud/container
|
378
|
+
# require "google/cloud/container"
|
328
379
|
#
|
329
|
-
# cluster_manager_client = Google::Cloud::Container
|
380
|
+
# cluster_manager_client = Google::Cloud::Container.new(version: :v1)
|
381
|
+
#
|
382
|
+
# # TODO: Initialize +project_id+:
|
330
383
|
# project_id = ''
|
384
|
+
#
|
385
|
+
# # TODO: Initialize +zone+:
|
331
386
|
# zone = ''
|
387
|
+
#
|
388
|
+
# # TODO: Initialize +cluster_id+:
|
332
389
|
# cluster_id = ''
|
333
390
|
# response = cluster_manager_client.get_cluster(project_id, zone, cluster_id)
|
334
391
|
|
@@ -336,14 +393,15 @@ module Google
|
|
336
393
|
project_id,
|
337
394
|
zone,
|
338
395
|
cluster_id,
|
339
|
-
options: nil
|
396
|
+
options: nil,
|
397
|
+
&block
|
340
398
|
req = {
|
341
399
|
project_id: project_id,
|
342
400
|
zone: zone,
|
343
401
|
cluster_id: cluster_id
|
344
402
|
}.delete_if { |_, v| v.nil? }
|
345
403
|
req = Google::Gax::to_proto(req, Google::Container::V1::GetClusterRequest)
|
346
|
-
@get_cluster.call(req, options)
|
404
|
+
@get_cluster.call(req, options, &block)
|
347
405
|
end
|
348
406
|
|
349
407
|
# Creates a cluster, consisting of the specified number and type of Google
|
@@ -375,14 +433,23 @@ module Google
|
|
375
433
|
# @param options [Google::Gax::CallOptions]
|
376
434
|
# Overrides the default settings for this call, e.g, timeout,
|
377
435
|
# retries, etc.
|
436
|
+
# @yield [result, operation] Access the result along with the RPC operation
|
437
|
+
# @yieldparam result [Google::Container::V1::Operation]
|
438
|
+
# @yieldparam operation [GRPC::ActiveCall::Operation]
|
378
439
|
# @return [Google::Container::V1::Operation]
|
379
440
|
# @raise [Google::Gax::GaxError] if the RPC is aborted.
|
380
441
|
# @example
|
381
|
-
# require "google/cloud/container
|
442
|
+
# require "google/cloud/container"
|
443
|
+
#
|
444
|
+
# cluster_manager_client = Google::Cloud::Container.new(version: :v1)
|
382
445
|
#
|
383
|
-
#
|
446
|
+
# # TODO: Initialize +project_id+:
|
384
447
|
# project_id = ''
|
448
|
+
#
|
449
|
+
# # TODO: Initialize +zone+:
|
385
450
|
# zone = ''
|
451
|
+
#
|
452
|
+
# # TODO: Initialize +cluster+:
|
386
453
|
# cluster = {}
|
387
454
|
# response = cluster_manager_client.create_cluster(project_id, zone, cluster)
|
388
455
|
|
@@ -390,14 +457,15 @@ module Google
|
|
390
457
|
project_id,
|
391
458
|
zone,
|
392
459
|
cluster,
|
393
|
-
options: nil
|
460
|
+
options: nil,
|
461
|
+
&block
|
394
462
|
req = {
|
395
463
|
project_id: project_id,
|
396
464
|
zone: zone,
|
397
465
|
cluster: cluster
|
398
466
|
}.delete_if { |_, v| v.nil? }
|
399
467
|
req = Google::Gax::to_proto(req, Google::Container::V1::CreateClusterRequest)
|
400
|
-
@create_cluster.call(req, options)
|
468
|
+
@create_cluster.call(req, options, &block)
|
401
469
|
end
|
402
470
|
|
403
471
|
# Updates the settings of a specific cluster.
|
@@ -418,15 +486,26 @@ module Google
|
|
418
486
|
# @param options [Google::Gax::CallOptions]
|
419
487
|
# Overrides the default settings for this call, e.g, timeout,
|
420
488
|
# retries, etc.
|
489
|
+
# @yield [result, operation] Access the result along with the RPC operation
|
490
|
+
# @yieldparam result [Google::Container::V1::Operation]
|
491
|
+
# @yieldparam operation [GRPC::ActiveCall::Operation]
|
421
492
|
# @return [Google::Container::V1::Operation]
|
422
493
|
# @raise [Google::Gax::GaxError] if the RPC is aborted.
|
423
494
|
# @example
|
424
|
-
# require "google/cloud/container
|
495
|
+
# require "google/cloud/container"
|
425
496
|
#
|
426
|
-
# cluster_manager_client = Google::Cloud::Container
|
497
|
+
# cluster_manager_client = Google::Cloud::Container.new(version: :v1)
|
498
|
+
#
|
499
|
+
# # TODO: Initialize +project_id+:
|
427
500
|
# project_id = ''
|
501
|
+
#
|
502
|
+
# # TODO: Initialize +zone+:
|
428
503
|
# zone = ''
|
504
|
+
#
|
505
|
+
# # TODO: Initialize +cluster_id+:
|
429
506
|
# cluster_id = ''
|
507
|
+
#
|
508
|
+
# # TODO: Initialize +update+:
|
430
509
|
# update = {}
|
431
510
|
# response = cluster_manager_client.update_cluster(project_id, zone, cluster_id, update)
|
432
511
|
|
@@ -435,7 +514,8 @@ module Google
|
|
435
514
|
zone,
|
436
515
|
cluster_id,
|
437
516
|
update,
|
438
|
-
options: nil
|
517
|
+
options: nil,
|
518
|
+
&block
|
439
519
|
req = {
|
440
520
|
project_id: project_id,
|
441
521
|
zone: zone,
|
@@ -443,7 +523,7 @@ module Google
|
|
443
523
|
update: update
|
444
524
|
}.delete_if { |_, v| v.nil? }
|
445
525
|
req = Google::Gax::to_proto(req, Google::Container::V1::UpdateClusterRequest)
|
446
|
-
@update_cluster.call(req, options)
|
526
|
+
@update_cluster.call(req, options, &block)
|
447
527
|
end
|
448
528
|
|
449
529
|
# Updates the version and/or image type of a specific node pool.
|
@@ -468,17 +548,32 @@ module Google
|
|
468
548
|
# @param options [Google::Gax::CallOptions]
|
469
549
|
# Overrides the default settings for this call, e.g, timeout,
|
470
550
|
# retries, etc.
|
551
|
+
# @yield [result, operation] Access the result along with the RPC operation
|
552
|
+
# @yieldparam result [Google::Container::V1::Operation]
|
553
|
+
# @yieldparam operation [GRPC::ActiveCall::Operation]
|
471
554
|
# @return [Google::Container::V1::Operation]
|
472
555
|
# @raise [Google::Gax::GaxError] if the RPC is aborted.
|
473
556
|
# @example
|
474
|
-
# require "google/cloud/container
|
557
|
+
# require "google/cloud/container"
|
558
|
+
#
|
559
|
+
# cluster_manager_client = Google::Cloud::Container.new(version: :v1)
|
475
560
|
#
|
476
|
-
#
|
561
|
+
# # TODO: Initialize +project_id+:
|
477
562
|
# project_id = ''
|
563
|
+
#
|
564
|
+
# # TODO: Initialize +zone+:
|
478
565
|
# zone = ''
|
566
|
+
#
|
567
|
+
# # TODO: Initialize +cluster_id+:
|
479
568
|
# cluster_id = ''
|
569
|
+
#
|
570
|
+
# # TODO: Initialize +node_pool_id+:
|
480
571
|
# node_pool_id = ''
|
572
|
+
#
|
573
|
+
# # TODO: Initialize +node_version+:
|
481
574
|
# node_version = ''
|
575
|
+
#
|
576
|
+
# # TODO: Initialize +image_type+:
|
482
577
|
# image_type = ''
|
483
578
|
# response = cluster_manager_client.update_node_pool(project_id, zone, cluster_id, node_pool_id, node_version, image_type)
|
484
579
|
|
@@ -489,7 +584,8 @@ module Google
|
|
489
584
|
node_pool_id,
|
490
585
|
node_version,
|
491
586
|
image_type,
|
492
|
-
options: nil
|
587
|
+
options: nil,
|
588
|
+
&block
|
493
589
|
req = {
|
494
590
|
project_id: project_id,
|
495
591
|
zone: zone,
|
@@ -499,7 +595,7 @@ module Google
|
|
499
595
|
image_type: image_type
|
500
596
|
}.delete_if { |_, v| v.nil? }
|
501
597
|
req = Google::Gax::to_proto(req, Google::Container::V1::UpdateNodePoolRequest)
|
502
|
-
@update_node_pool.call(req, options)
|
598
|
+
@update_node_pool.call(req, options, &block)
|
503
599
|
end
|
504
600
|
|
505
601
|
# Sets the autoscaling settings of a specific node pool.
|
@@ -522,16 +618,29 @@ module Google
|
|
522
618
|
# @param options [Google::Gax::CallOptions]
|
523
619
|
# Overrides the default settings for this call, e.g, timeout,
|
524
620
|
# retries, etc.
|
621
|
+
# @yield [result, operation] Access the result along with the RPC operation
|
622
|
+
# @yieldparam result [Google::Container::V1::Operation]
|
623
|
+
# @yieldparam operation [GRPC::ActiveCall::Operation]
|
525
624
|
# @return [Google::Container::V1::Operation]
|
526
625
|
# @raise [Google::Gax::GaxError] if the RPC is aborted.
|
527
626
|
# @example
|
528
|
-
# require "google/cloud/container
|
627
|
+
# require "google/cloud/container"
|
628
|
+
#
|
629
|
+
# cluster_manager_client = Google::Cloud::Container.new(version: :v1)
|
529
630
|
#
|
530
|
-
#
|
631
|
+
# # TODO: Initialize +project_id+:
|
531
632
|
# project_id = ''
|
633
|
+
#
|
634
|
+
# # TODO: Initialize +zone+:
|
532
635
|
# zone = ''
|
636
|
+
#
|
637
|
+
# # TODO: Initialize +cluster_id+:
|
533
638
|
# cluster_id = ''
|
639
|
+
#
|
640
|
+
# # TODO: Initialize +node_pool_id+:
|
534
641
|
# node_pool_id = ''
|
642
|
+
#
|
643
|
+
# # TODO: Initialize +autoscaling+:
|
535
644
|
# autoscaling = {}
|
536
645
|
# response = cluster_manager_client.set_node_pool_autoscaling(project_id, zone, cluster_id, node_pool_id, autoscaling)
|
537
646
|
|
@@ -541,7 +650,8 @@ module Google
|
|
541
650
|
cluster_id,
|
542
651
|
node_pool_id,
|
543
652
|
autoscaling,
|
544
|
-
options: nil
|
653
|
+
options: nil,
|
654
|
+
&block
|
545
655
|
req = {
|
546
656
|
project_id: project_id,
|
547
657
|
zone: zone,
|
@@ -550,7 +660,7 @@ module Google
|
|
550
660
|
autoscaling: autoscaling
|
551
661
|
}.delete_if { |_, v| v.nil? }
|
552
662
|
req = Google::Gax::to_proto(req, Google::Container::V1::SetNodePoolAutoscalingRequest)
|
553
|
-
@set_node_pool_autoscaling.call(req, options)
|
663
|
+
@set_node_pool_autoscaling.call(req, options, &block)
|
554
664
|
end
|
555
665
|
|
556
666
|
# Sets the logging service of a specific cluster.
|
@@ -573,15 +683,26 @@ module Google
|
|
573
683
|
# @param options [Google::Gax::CallOptions]
|
574
684
|
# Overrides the default settings for this call, e.g, timeout,
|
575
685
|
# retries, etc.
|
686
|
+
# @yield [result, operation] Access the result along with the RPC operation
|
687
|
+
# @yieldparam result [Google::Container::V1::Operation]
|
688
|
+
# @yieldparam operation [GRPC::ActiveCall::Operation]
|
576
689
|
# @return [Google::Container::V1::Operation]
|
577
690
|
# @raise [Google::Gax::GaxError] if the RPC is aborted.
|
578
691
|
# @example
|
579
|
-
# require "google/cloud/container
|
692
|
+
# require "google/cloud/container"
|
693
|
+
#
|
694
|
+
# cluster_manager_client = Google::Cloud::Container.new(version: :v1)
|
580
695
|
#
|
581
|
-
#
|
696
|
+
# # TODO: Initialize +project_id+:
|
582
697
|
# project_id = ''
|
698
|
+
#
|
699
|
+
# # TODO: Initialize +zone+:
|
583
700
|
# zone = ''
|
701
|
+
#
|
702
|
+
# # TODO: Initialize +cluster_id+:
|
584
703
|
# cluster_id = ''
|
704
|
+
#
|
705
|
+
# # TODO: Initialize +logging_service+:
|
585
706
|
# logging_service = ''
|
586
707
|
# response = cluster_manager_client.set_logging_service(project_id, zone, cluster_id, logging_service)
|
587
708
|
|
@@ -590,7 +711,8 @@ module Google
|
|
590
711
|
zone,
|
591
712
|
cluster_id,
|
592
713
|
logging_service,
|
593
|
-
options: nil
|
714
|
+
options: nil,
|
715
|
+
&block
|
594
716
|
req = {
|
595
717
|
project_id: project_id,
|
596
718
|
zone: zone,
|
@@ -598,7 +720,7 @@ module Google
|
|
598
720
|
logging_service: logging_service
|
599
721
|
}.delete_if { |_, v| v.nil? }
|
600
722
|
req = Google::Gax::to_proto(req, Google::Container::V1::SetLoggingServiceRequest)
|
601
|
-
@set_logging_service.call(req, options)
|
723
|
+
@set_logging_service.call(req, options, &block)
|
602
724
|
end
|
603
725
|
|
604
726
|
# Sets the monitoring service of a specific cluster.
|
@@ -621,15 +743,26 @@ module Google
|
|
621
743
|
# @param options [Google::Gax::CallOptions]
|
622
744
|
# Overrides the default settings for this call, e.g, timeout,
|
623
745
|
# retries, etc.
|
746
|
+
# @yield [result, operation] Access the result along with the RPC operation
|
747
|
+
# @yieldparam result [Google::Container::V1::Operation]
|
748
|
+
# @yieldparam operation [GRPC::ActiveCall::Operation]
|
624
749
|
# @return [Google::Container::V1::Operation]
|
625
750
|
# @raise [Google::Gax::GaxError] if the RPC is aborted.
|
626
751
|
# @example
|
627
|
-
# require "google/cloud/container
|
752
|
+
# require "google/cloud/container"
|
628
753
|
#
|
629
|
-
# cluster_manager_client = Google::Cloud::Container
|
754
|
+
# cluster_manager_client = Google::Cloud::Container.new(version: :v1)
|
755
|
+
#
|
756
|
+
# # TODO: Initialize +project_id+:
|
630
757
|
# project_id = ''
|
758
|
+
#
|
759
|
+
# # TODO: Initialize +zone+:
|
631
760
|
# zone = ''
|
761
|
+
#
|
762
|
+
# # TODO: Initialize +cluster_id+:
|
632
763
|
# cluster_id = ''
|
764
|
+
#
|
765
|
+
# # TODO: Initialize +monitoring_service+:
|
633
766
|
# monitoring_service = ''
|
634
767
|
# response = cluster_manager_client.set_monitoring_service(project_id, zone, cluster_id, monitoring_service)
|
635
768
|
|
@@ -638,7 +771,8 @@ module Google
|
|
638
771
|
zone,
|
639
772
|
cluster_id,
|
640
773
|
monitoring_service,
|
641
|
-
options: nil
|
774
|
+
options: nil,
|
775
|
+
&block
|
642
776
|
req = {
|
643
777
|
project_id: project_id,
|
644
778
|
zone: zone,
|
@@ -646,7 +780,7 @@ module Google
|
|
646
780
|
monitoring_service: monitoring_service
|
647
781
|
}.delete_if { |_, v| v.nil? }
|
648
782
|
req = Google::Gax::to_proto(req, Google::Container::V1::SetMonitoringServiceRequest)
|
649
|
-
@set_monitoring_service.call(req, options)
|
783
|
+
@set_monitoring_service.call(req, options, &block)
|
650
784
|
end
|
651
785
|
|
652
786
|
# Sets the addons of a specific cluster.
|
@@ -668,15 +802,26 @@ module Google
|
|
668
802
|
# @param options [Google::Gax::CallOptions]
|
669
803
|
# Overrides the default settings for this call, e.g, timeout,
|
670
804
|
# retries, etc.
|
805
|
+
# @yield [result, operation] Access the result along with the RPC operation
|
806
|
+
# @yieldparam result [Google::Container::V1::Operation]
|
807
|
+
# @yieldparam operation [GRPC::ActiveCall::Operation]
|
671
808
|
# @return [Google::Container::V1::Operation]
|
672
809
|
# @raise [Google::Gax::GaxError] if the RPC is aborted.
|
673
810
|
# @example
|
674
|
-
# require "google/cloud/container
|
811
|
+
# require "google/cloud/container"
|
675
812
|
#
|
676
|
-
# cluster_manager_client = Google::Cloud::Container
|
813
|
+
# cluster_manager_client = Google::Cloud::Container.new(version: :v1)
|
814
|
+
#
|
815
|
+
# # TODO: Initialize +project_id+:
|
677
816
|
# project_id = ''
|
817
|
+
#
|
818
|
+
# # TODO: Initialize +zone+:
|
678
819
|
# zone = ''
|
820
|
+
#
|
821
|
+
# # TODO: Initialize +cluster_id+:
|
679
822
|
# cluster_id = ''
|
823
|
+
#
|
824
|
+
# # TODO: Initialize +addons_config+:
|
680
825
|
# addons_config = {}
|
681
826
|
# response = cluster_manager_client.set_addons_config(project_id, zone, cluster_id, addons_config)
|
682
827
|
|
@@ -685,7 +830,8 @@ module Google
|
|
685
830
|
zone,
|
686
831
|
cluster_id,
|
687
832
|
addons_config,
|
688
|
-
options: nil
|
833
|
+
options: nil,
|
834
|
+
&block
|
689
835
|
req = {
|
690
836
|
project_id: project_id,
|
691
837
|
zone: zone,
|
@@ -693,7 +839,7 @@ module Google
|
|
693
839
|
addons_config: addons_config
|
694
840
|
}.delete_if { |_, v| v.nil? }
|
695
841
|
req = Google::Gax::to_proto(req, Google::Container::V1::SetAddonsConfigRequest)
|
696
|
-
@set_addons_config.call(req, options)
|
842
|
+
@set_addons_config.call(req, options, &block)
|
697
843
|
end
|
698
844
|
|
699
845
|
# Sets the locations of a specific cluster.
|
@@ -718,15 +864,26 @@ module Google
|
|
718
864
|
# @param options [Google::Gax::CallOptions]
|
719
865
|
# Overrides the default settings for this call, e.g, timeout,
|
720
866
|
# retries, etc.
|
867
|
+
# @yield [result, operation] Access the result along with the RPC operation
|
868
|
+
# @yieldparam result [Google::Container::V1::Operation]
|
869
|
+
# @yieldparam operation [GRPC::ActiveCall::Operation]
|
721
870
|
# @return [Google::Container::V1::Operation]
|
722
871
|
# @raise [Google::Gax::GaxError] if the RPC is aborted.
|
723
872
|
# @example
|
724
|
-
# require "google/cloud/container
|
873
|
+
# require "google/cloud/container"
|
725
874
|
#
|
726
|
-
# cluster_manager_client = Google::Cloud::Container
|
875
|
+
# cluster_manager_client = Google::Cloud::Container.new(version: :v1)
|
876
|
+
#
|
877
|
+
# # TODO: Initialize +project_id+:
|
727
878
|
# project_id = ''
|
879
|
+
#
|
880
|
+
# # TODO: Initialize +zone+:
|
728
881
|
# zone = ''
|
882
|
+
#
|
883
|
+
# # TODO: Initialize +cluster_id+:
|
729
884
|
# cluster_id = ''
|
885
|
+
#
|
886
|
+
# # TODO: Initialize +locations+:
|
730
887
|
# locations = []
|
731
888
|
# response = cluster_manager_client.set_locations(project_id, zone, cluster_id, locations)
|
732
889
|
|
@@ -735,7 +892,8 @@ module Google
|
|
735
892
|
zone,
|
736
893
|
cluster_id,
|
737
894
|
locations,
|
738
|
-
options: nil
|
895
|
+
options: nil,
|
896
|
+
&block
|
739
897
|
req = {
|
740
898
|
project_id: project_id,
|
741
899
|
zone: zone,
|
@@ -743,7 +901,7 @@ module Google
|
|
743
901
|
locations: locations
|
744
902
|
}.delete_if { |_, v| v.nil? }
|
745
903
|
req = Google::Gax::to_proto(req, Google::Container::V1::SetLocationsRequest)
|
746
|
-
@set_locations.call(req, options)
|
904
|
+
@set_locations.call(req, options, &block)
|
747
905
|
end
|
748
906
|
|
749
907
|
# Updates the master of a specific cluster.
|
@@ -764,15 +922,26 @@ module Google
|
|
764
922
|
# @param options [Google::Gax::CallOptions]
|
765
923
|
# Overrides the default settings for this call, e.g, timeout,
|
766
924
|
# retries, etc.
|
925
|
+
# @yield [result, operation] Access the result along with the RPC operation
|
926
|
+
# @yieldparam result [Google::Container::V1::Operation]
|
927
|
+
# @yieldparam operation [GRPC::ActiveCall::Operation]
|
767
928
|
# @return [Google::Container::V1::Operation]
|
768
929
|
# @raise [Google::Gax::GaxError] if the RPC is aborted.
|
769
930
|
# @example
|
770
|
-
# require "google/cloud/container
|
931
|
+
# require "google/cloud/container"
|
771
932
|
#
|
772
|
-
# cluster_manager_client = Google::Cloud::Container
|
933
|
+
# cluster_manager_client = Google::Cloud::Container.new(version: :v1)
|
934
|
+
#
|
935
|
+
# # TODO: Initialize +project_id+:
|
773
936
|
# project_id = ''
|
937
|
+
#
|
938
|
+
# # TODO: Initialize +zone+:
|
774
939
|
# zone = ''
|
940
|
+
#
|
941
|
+
# # TODO: Initialize +cluster_id+:
|
775
942
|
# cluster_id = ''
|
943
|
+
#
|
944
|
+
# # TODO: Initialize +master_version+:
|
776
945
|
# master_version = ''
|
777
946
|
# response = cluster_manager_client.update_master(project_id, zone, cluster_id, master_version)
|
778
947
|
|
@@ -781,7 +950,8 @@ module Google
|
|
781
950
|
zone,
|
782
951
|
cluster_id,
|
783
952
|
master_version,
|
784
|
-
options: nil
|
953
|
+
options: nil,
|
954
|
+
&block
|
785
955
|
req = {
|
786
956
|
project_id: project_id,
|
787
957
|
zone: zone,
|
@@ -789,7 +959,7 @@ module Google
|
|
789
959
|
master_version: master_version
|
790
960
|
}.delete_if { |_, v| v.nil? }
|
791
961
|
req = Google::Gax::to_proto(req, Google::Container::V1::UpdateMasterRequest)
|
792
|
-
@update_master.call(req, options)
|
962
|
+
@update_master.call(req, options, &block)
|
793
963
|
end
|
794
964
|
|
795
965
|
# Used to set master auth materials. Currently supports :-
|
@@ -814,16 +984,29 @@ module Google
|
|
814
984
|
# @param options [Google::Gax::CallOptions]
|
815
985
|
# Overrides the default settings for this call, e.g, timeout,
|
816
986
|
# retries, etc.
|
987
|
+
# @yield [result, operation] Access the result along with the RPC operation
|
988
|
+
# @yieldparam result [Google::Container::V1::Operation]
|
989
|
+
# @yieldparam operation [GRPC::ActiveCall::Operation]
|
817
990
|
# @return [Google::Container::V1::Operation]
|
818
991
|
# @raise [Google::Gax::GaxError] if the RPC is aborted.
|
819
992
|
# @example
|
820
|
-
# require "google/cloud/container
|
993
|
+
# require "google/cloud/container"
|
994
|
+
#
|
995
|
+
# cluster_manager_client = Google::Cloud::Container.new(version: :v1)
|
821
996
|
#
|
822
|
-
#
|
997
|
+
# # TODO: Initialize +project_id+:
|
823
998
|
# project_id = ''
|
999
|
+
#
|
1000
|
+
# # TODO: Initialize +zone+:
|
824
1001
|
# zone = ''
|
1002
|
+
#
|
1003
|
+
# # TODO: Initialize +cluster_id+:
|
825
1004
|
# cluster_id = ''
|
1005
|
+
#
|
1006
|
+
# # TODO: Initialize +action+:
|
826
1007
|
# action = :UNKNOWN
|
1008
|
+
#
|
1009
|
+
# # TODO: Initialize +update+:
|
827
1010
|
# update = {}
|
828
1011
|
# response = cluster_manager_client.set_master_auth(project_id, zone, cluster_id, action, update)
|
829
1012
|
|
@@ -833,7 +1016,8 @@ module Google
|
|
833
1016
|
cluster_id,
|
834
1017
|
action,
|
835
1018
|
update,
|
836
|
-
options: nil
|
1019
|
+
options: nil,
|
1020
|
+
&block
|
837
1021
|
req = {
|
838
1022
|
project_id: project_id,
|
839
1023
|
zone: zone,
|
@@ -842,7 +1026,7 @@ module Google
|
|
842
1026
|
update: update
|
843
1027
|
}.delete_if { |_, v| v.nil? }
|
844
1028
|
req = Google::Gax::to_proto(req, Google::Container::V1::SetMasterAuthRequest)
|
845
|
-
@set_master_auth.call(req, options)
|
1029
|
+
@set_master_auth.call(req, options, &block)
|
846
1030
|
end
|
847
1031
|
|
848
1032
|
# Deletes the cluster, including the Kubernetes endpoint and all worker
|
@@ -867,14 +1051,23 @@ module Google
|
|
867
1051
|
# @param options [Google::Gax::CallOptions]
|
868
1052
|
# Overrides the default settings for this call, e.g, timeout,
|
869
1053
|
# retries, etc.
|
1054
|
+
# @yield [result, operation] Access the result along with the RPC operation
|
1055
|
+
# @yieldparam result [Google::Container::V1::Operation]
|
1056
|
+
# @yieldparam operation [GRPC::ActiveCall::Operation]
|
870
1057
|
# @return [Google::Container::V1::Operation]
|
871
1058
|
# @raise [Google::Gax::GaxError] if the RPC is aborted.
|
872
1059
|
# @example
|
873
|
-
# require "google/cloud/container
|
1060
|
+
# require "google/cloud/container"
|
1061
|
+
#
|
1062
|
+
# cluster_manager_client = Google::Cloud::Container.new(version: :v1)
|
874
1063
|
#
|
875
|
-
#
|
1064
|
+
# # TODO: Initialize +project_id+:
|
876
1065
|
# project_id = ''
|
1066
|
+
#
|
1067
|
+
# # TODO: Initialize +zone+:
|
877
1068
|
# zone = ''
|
1069
|
+
#
|
1070
|
+
# # TODO: Initialize +cluster_id+:
|
878
1071
|
# cluster_id = ''
|
879
1072
|
# response = cluster_manager_client.delete_cluster(project_id, zone, cluster_id)
|
880
1073
|
|
@@ -882,14 +1075,15 @@ module Google
|
|
882
1075
|
project_id,
|
883
1076
|
zone,
|
884
1077
|
cluster_id,
|
885
|
-
options: nil
|
1078
|
+
options: nil,
|
1079
|
+
&block
|
886
1080
|
req = {
|
887
1081
|
project_id: project_id,
|
888
1082
|
zone: zone,
|
889
1083
|
cluster_id: cluster_id
|
890
1084
|
}.delete_if { |_, v| v.nil? }
|
891
1085
|
req = Google::Gax::to_proto(req, Google::Container::V1::DeleteClusterRequest)
|
892
|
-
@delete_cluster.call(req, options)
|
1086
|
+
@delete_cluster.call(req, options, &block)
|
893
1087
|
end
|
894
1088
|
|
895
1089
|
# Lists all operations in a project in a specific zone or all zones.
|
@@ -903,26 +1097,34 @@ module Google
|
|
903
1097
|
# @param options [Google::Gax::CallOptions]
|
904
1098
|
# Overrides the default settings for this call, e.g, timeout,
|
905
1099
|
# retries, etc.
|
1100
|
+
# @yield [result, operation] Access the result along with the RPC operation
|
1101
|
+
# @yieldparam result [Google::Container::V1::ListOperationsResponse]
|
1102
|
+
# @yieldparam operation [GRPC::ActiveCall::Operation]
|
906
1103
|
# @return [Google::Container::V1::ListOperationsResponse]
|
907
1104
|
# @raise [Google::Gax::GaxError] if the RPC is aborted.
|
908
1105
|
# @example
|
909
|
-
# require "google/cloud/container
|
1106
|
+
# require "google/cloud/container"
|
910
1107
|
#
|
911
|
-
# cluster_manager_client = Google::Cloud::Container
|
1108
|
+
# cluster_manager_client = Google::Cloud::Container.new(version: :v1)
|
1109
|
+
#
|
1110
|
+
# # TODO: Initialize +project_id+:
|
912
1111
|
# project_id = ''
|
1112
|
+
#
|
1113
|
+
# # TODO: Initialize +zone+:
|
913
1114
|
# zone = ''
|
914
1115
|
# response = cluster_manager_client.list_operations(project_id, zone)
|
915
1116
|
|
916
1117
|
def list_operations \
|
917
1118
|
project_id,
|
918
1119
|
zone,
|
919
|
-
options: nil
|
1120
|
+
options: nil,
|
1121
|
+
&block
|
920
1122
|
req = {
|
921
1123
|
project_id: project_id,
|
922
1124
|
zone: zone
|
923
1125
|
}.delete_if { |_, v| v.nil? }
|
924
1126
|
req = Google::Gax::to_proto(req, Google::Container::V1::ListOperationsRequest)
|
925
|
-
@list_operations.call(req, options)
|
1127
|
+
@list_operations.call(req, options, &block)
|
926
1128
|
end
|
927
1129
|
|
928
1130
|
# Gets the specified operation.
|
@@ -939,14 +1141,23 @@ module Google
|
|
939
1141
|
# @param options [Google::Gax::CallOptions]
|
940
1142
|
# Overrides the default settings for this call, e.g, timeout,
|
941
1143
|
# retries, etc.
|
1144
|
+
# @yield [result, operation] Access the result along with the RPC operation
|
1145
|
+
# @yieldparam result [Google::Container::V1::Operation]
|
1146
|
+
# @yieldparam operation [GRPC::ActiveCall::Operation]
|
942
1147
|
# @return [Google::Container::V1::Operation]
|
943
1148
|
# @raise [Google::Gax::GaxError] if the RPC is aborted.
|
944
1149
|
# @example
|
945
|
-
# require "google/cloud/container
|
1150
|
+
# require "google/cloud/container"
|
946
1151
|
#
|
947
|
-
# cluster_manager_client = Google::Cloud::Container
|
1152
|
+
# cluster_manager_client = Google::Cloud::Container.new(version: :v1)
|
1153
|
+
#
|
1154
|
+
# # TODO: Initialize +project_id+:
|
948
1155
|
# project_id = ''
|
1156
|
+
#
|
1157
|
+
# # TODO: Initialize +zone+:
|
949
1158
|
# zone = ''
|
1159
|
+
#
|
1160
|
+
# # TODO: Initialize +operation_id+:
|
950
1161
|
# operation_id = ''
|
951
1162
|
# response = cluster_manager_client.get_operation(project_id, zone, operation_id)
|
952
1163
|
|
@@ -954,14 +1165,15 @@ module Google
|
|
954
1165
|
project_id,
|
955
1166
|
zone,
|
956
1167
|
operation_id,
|
957
|
-
options: nil
|
1168
|
+
options: nil,
|
1169
|
+
&block
|
958
1170
|
req = {
|
959
1171
|
project_id: project_id,
|
960
1172
|
zone: zone,
|
961
1173
|
operation_id: operation_id
|
962
1174
|
}.delete_if { |_, v| v.nil? }
|
963
1175
|
req = Google::Gax::to_proto(req, Google::Container::V1::GetOperationRequest)
|
964
|
-
@get_operation.call(req, options)
|
1176
|
+
@get_operation.call(req, options, &block)
|
965
1177
|
end
|
966
1178
|
|
967
1179
|
# Cancels the specified operation.
|
@@ -977,13 +1189,22 @@ module Google
|
|
977
1189
|
# @param options [Google::Gax::CallOptions]
|
978
1190
|
# Overrides the default settings for this call, e.g, timeout,
|
979
1191
|
# retries, etc.
|
1192
|
+
# @yield [result, operation] Access the result along with the RPC operation
|
1193
|
+
# @yieldparam result []
|
1194
|
+
# @yieldparam operation [GRPC::ActiveCall::Operation]
|
980
1195
|
# @raise [Google::Gax::GaxError] if the RPC is aborted.
|
981
1196
|
# @example
|
982
|
-
# require "google/cloud/container
|
1197
|
+
# require "google/cloud/container"
|
983
1198
|
#
|
984
|
-
# cluster_manager_client = Google::Cloud::Container
|
1199
|
+
# cluster_manager_client = Google::Cloud::Container.new(version: :v1)
|
1200
|
+
#
|
1201
|
+
# # TODO: Initialize +project_id+:
|
985
1202
|
# project_id = ''
|
1203
|
+
#
|
1204
|
+
# # TODO: Initialize +zone+:
|
986
1205
|
# zone = ''
|
1206
|
+
#
|
1207
|
+
# # TODO: Initialize +operation_id+:
|
987
1208
|
# operation_id = ''
|
988
1209
|
# cluster_manager_client.cancel_operation(project_id, zone, operation_id)
|
989
1210
|
|
@@ -991,14 +1212,15 @@ module Google
|
|
991
1212
|
project_id,
|
992
1213
|
zone,
|
993
1214
|
operation_id,
|
994
|
-
options: nil
|
1215
|
+
options: nil,
|
1216
|
+
&block
|
995
1217
|
req = {
|
996
1218
|
project_id: project_id,
|
997
1219
|
zone: zone,
|
998
1220
|
operation_id: operation_id
|
999
1221
|
}.delete_if { |_, v| v.nil? }
|
1000
1222
|
req = Google::Gax::to_proto(req, Google::Container::V1::CancelOperationRequest)
|
1001
|
-
@cancel_operation.call(req, options)
|
1223
|
+
@cancel_operation.call(req, options, &block)
|
1002
1224
|
nil
|
1003
1225
|
end
|
1004
1226
|
|
@@ -1013,26 +1235,34 @@ module Google
|
|
1013
1235
|
# @param options [Google::Gax::CallOptions]
|
1014
1236
|
# Overrides the default settings for this call, e.g, timeout,
|
1015
1237
|
# retries, etc.
|
1238
|
+
# @yield [result, operation] Access the result along with the RPC operation
|
1239
|
+
# @yieldparam result [Google::Container::V1::ServerConfig]
|
1240
|
+
# @yieldparam operation [GRPC::ActiveCall::Operation]
|
1016
1241
|
# @return [Google::Container::V1::ServerConfig]
|
1017
1242
|
# @raise [Google::Gax::GaxError] if the RPC is aborted.
|
1018
1243
|
# @example
|
1019
|
-
# require "google/cloud/container
|
1244
|
+
# require "google/cloud/container"
|
1245
|
+
#
|
1246
|
+
# cluster_manager_client = Google::Cloud::Container.new(version: :v1)
|
1020
1247
|
#
|
1021
|
-
#
|
1248
|
+
# # TODO: Initialize +project_id+:
|
1022
1249
|
# project_id = ''
|
1250
|
+
#
|
1251
|
+
# # TODO: Initialize +zone+:
|
1023
1252
|
# zone = ''
|
1024
1253
|
# response = cluster_manager_client.get_server_config(project_id, zone)
|
1025
1254
|
|
1026
1255
|
def get_server_config \
|
1027
1256
|
project_id,
|
1028
1257
|
zone,
|
1029
|
-
options: nil
|
1258
|
+
options: nil,
|
1259
|
+
&block
|
1030
1260
|
req = {
|
1031
1261
|
project_id: project_id,
|
1032
1262
|
zone: zone
|
1033
1263
|
}.delete_if { |_, v| v.nil? }
|
1034
1264
|
req = Google::Gax::to_proto(req, Google::Container::V1::GetServerConfigRequest)
|
1035
|
-
@get_server_config.call(req, options)
|
1265
|
+
@get_server_config.call(req, options, &block)
|
1036
1266
|
end
|
1037
1267
|
|
1038
1268
|
# Lists the node pools for a cluster.
|
@@ -1049,14 +1279,23 @@ module Google
|
|
1049
1279
|
# @param options [Google::Gax::CallOptions]
|
1050
1280
|
# Overrides the default settings for this call, e.g, timeout,
|
1051
1281
|
# retries, etc.
|
1282
|
+
# @yield [result, operation] Access the result along with the RPC operation
|
1283
|
+
# @yieldparam result [Google::Container::V1::ListNodePoolsResponse]
|
1284
|
+
# @yieldparam operation [GRPC::ActiveCall::Operation]
|
1052
1285
|
# @return [Google::Container::V1::ListNodePoolsResponse]
|
1053
1286
|
# @raise [Google::Gax::GaxError] if the RPC is aborted.
|
1054
1287
|
# @example
|
1055
|
-
# require "google/cloud/container
|
1288
|
+
# require "google/cloud/container"
|
1289
|
+
#
|
1290
|
+
# cluster_manager_client = Google::Cloud::Container.new(version: :v1)
|
1056
1291
|
#
|
1057
|
-
#
|
1292
|
+
# # TODO: Initialize +project_id+:
|
1058
1293
|
# project_id = ''
|
1294
|
+
#
|
1295
|
+
# # TODO: Initialize +zone+:
|
1059
1296
|
# zone = ''
|
1297
|
+
#
|
1298
|
+
# # TODO: Initialize +cluster_id+:
|
1060
1299
|
# cluster_id = ''
|
1061
1300
|
# response = cluster_manager_client.list_node_pools(project_id, zone, cluster_id)
|
1062
1301
|
|
@@ -1064,14 +1303,15 @@ module Google
|
|
1064
1303
|
project_id,
|
1065
1304
|
zone,
|
1066
1305
|
cluster_id,
|
1067
|
-
options: nil
|
1306
|
+
options: nil,
|
1307
|
+
&block
|
1068
1308
|
req = {
|
1069
1309
|
project_id: project_id,
|
1070
1310
|
zone: zone,
|
1071
1311
|
cluster_id: cluster_id
|
1072
1312
|
}.delete_if { |_, v| v.nil? }
|
1073
1313
|
req = Google::Gax::to_proto(req, Google::Container::V1::ListNodePoolsRequest)
|
1074
|
-
@list_node_pools.call(req, options)
|
1314
|
+
@list_node_pools.call(req, options, &block)
|
1075
1315
|
end
|
1076
1316
|
|
1077
1317
|
# Retrieves the node pool requested.
|
@@ -1090,15 +1330,26 @@ module Google
|
|
1090
1330
|
# @param options [Google::Gax::CallOptions]
|
1091
1331
|
# Overrides the default settings for this call, e.g, timeout,
|
1092
1332
|
# retries, etc.
|
1333
|
+
# @yield [result, operation] Access the result along with the RPC operation
|
1334
|
+
# @yieldparam result [Google::Container::V1::NodePool]
|
1335
|
+
# @yieldparam operation [GRPC::ActiveCall::Operation]
|
1093
1336
|
# @return [Google::Container::V1::NodePool]
|
1094
1337
|
# @raise [Google::Gax::GaxError] if the RPC is aborted.
|
1095
1338
|
# @example
|
1096
|
-
# require "google/cloud/container
|
1339
|
+
# require "google/cloud/container"
|
1097
1340
|
#
|
1098
|
-
# cluster_manager_client = Google::Cloud::Container
|
1341
|
+
# cluster_manager_client = Google::Cloud::Container.new(version: :v1)
|
1342
|
+
#
|
1343
|
+
# # TODO: Initialize +project_id+:
|
1099
1344
|
# project_id = ''
|
1345
|
+
#
|
1346
|
+
# # TODO: Initialize +zone+:
|
1100
1347
|
# zone = ''
|
1348
|
+
#
|
1349
|
+
# # TODO: Initialize +cluster_id+:
|
1101
1350
|
# cluster_id = ''
|
1351
|
+
#
|
1352
|
+
# # TODO: Initialize +node_pool_id+:
|
1102
1353
|
# node_pool_id = ''
|
1103
1354
|
# response = cluster_manager_client.get_node_pool(project_id, zone, cluster_id, node_pool_id)
|
1104
1355
|
|
@@ -1107,7 +1358,8 @@ module Google
|
|
1107
1358
|
zone,
|
1108
1359
|
cluster_id,
|
1109
1360
|
node_pool_id,
|
1110
|
-
options: nil
|
1361
|
+
options: nil,
|
1362
|
+
&block
|
1111
1363
|
req = {
|
1112
1364
|
project_id: project_id,
|
1113
1365
|
zone: zone,
|
@@ -1115,7 +1367,7 @@ module Google
|
|
1115
1367
|
node_pool_id: node_pool_id
|
1116
1368
|
}.delete_if { |_, v| v.nil? }
|
1117
1369
|
req = Google::Gax::to_proto(req, Google::Container::V1::GetNodePoolRequest)
|
1118
|
-
@get_node_pool.call(req, options)
|
1370
|
+
@get_node_pool.call(req, options, &block)
|
1119
1371
|
end
|
1120
1372
|
|
1121
1373
|
# Creates a node pool for a cluster.
|
@@ -1136,15 +1388,26 @@ module Google
|
|
1136
1388
|
# @param options [Google::Gax::CallOptions]
|
1137
1389
|
# Overrides the default settings for this call, e.g, timeout,
|
1138
1390
|
# retries, etc.
|
1391
|
+
# @yield [result, operation] Access the result along with the RPC operation
|
1392
|
+
# @yieldparam result [Google::Container::V1::Operation]
|
1393
|
+
# @yieldparam operation [GRPC::ActiveCall::Operation]
|
1139
1394
|
# @return [Google::Container::V1::Operation]
|
1140
1395
|
# @raise [Google::Gax::GaxError] if the RPC is aborted.
|
1141
1396
|
# @example
|
1142
|
-
# require "google/cloud/container
|
1397
|
+
# require "google/cloud/container"
|
1143
1398
|
#
|
1144
|
-
# cluster_manager_client = Google::Cloud::Container
|
1399
|
+
# cluster_manager_client = Google::Cloud::Container.new(version: :v1)
|
1400
|
+
#
|
1401
|
+
# # TODO: Initialize +project_id+:
|
1145
1402
|
# project_id = ''
|
1403
|
+
#
|
1404
|
+
# # TODO: Initialize +zone+:
|
1146
1405
|
# zone = ''
|
1406
|
+
#
|
1407
|
+
# # TODO: Initialize +cluster_id+:
|
1147
1408
|
# cluster_id = ''
|
1409
|
+
#
|
1410
|
+
# # TODO: Initialize +node_pool+:
|
1148
1411
|
# node_pool = {}
|
1149
1412
|
# response = cluster_manager_client.create_node_pool(project_id, zone, cluster_id, node_pool)
|
1150
1413
|
|
@@ -1153,7 +1416,8 @@ module Google
|
|
1153
1416
|
zone,
|
1154
1417
|
cluster_id,
|
1155
1418
|
node_pool,
|
1156
|
-
options: nil
|
1419
|
+
options: nil,
|
1420
|
+
&block
|
1157
1421
|
req = {
|
1158
1422
|
project_id: project_id,
|
1159
1423
|
zone: zone,
|
@@ -1161,7 +1425,7 @@ module Google
|
|
1161
1425
|
node_pool: node_pool
|
1162
1426
|
}.delete_if { |_, v| v.nil? }
|
1163
1427
|
req = Google::Gax::to_proto(req, Google::Container::V1::CreateNodePoolRequest)
|
1164
|
-
@create_node_pool.call(req, options)
|
1428
|
+
@create_node_pool.call(req, options, &block)
|
1165
1429
|
end
|
1166
1430
|
|
1167
1431
|
# Deletes a node pool from a cluster.
|
@@ -1180,15 +1444,26 @@ module Google
|
|
1180
1444
|
# @param options [Google::Gax::CallOptions]
|
1181
1445
|
# Overrides the default settings for this call, e.g, timeout,
|
1182
1446
|
# retries, etc.
|
1447
|
+
# @yield [result, operation] Access the result along with the RPC operation
|
1448
|
+
# @yieldparam result [Google::Container::V1::Operation]
|
1449
|
+
# @yieldparam operation [GRPC::ActiveCall::Operation]
|
1183
1450
|
# @return [Google::Container::V1::Operation]
|
1184
1451
|
# @raise [Google::Gax::GaxError] if the RPC is aborted.
|
1185
1452
|
# @example
|
1186
|
-
# require "google/cloud/container
|
1453
|
+
# require "google/cloud/container"
|
1454
|
+
#
|
1455
|
+
# cluster_manager_client = Google::Cloud::Container.new(version: :v1)
|
1187
1456
|
#
|
1188
|
-
#
|
1457
|
+
# # TODO: Initialize +project_id+:
|
1189
1458
|
# project_id = ''
|
1459
|
+
#
|
1460
|
+
# # TODO: Initialize +zone+:
|
1190
1461
|
# zone = ''
|
1462
|
+
#
|
1463
|
+
# # TODO: Initialize +cluster_id+:
|
1191
1464
|
# cluster_id = ''
|
1465
|
+
#
|
1466
|
+
# # TODO: Initialize +node_pool_id+:
|
1192
1467
|
# node_pool_id = ''
|
1193
1468
|
# response = cluster_manager_client.delete_node_pool(project_id, zone, cluster_id, node_pool_id)
|
1194
1469
|
|
@@ -1197,7 +1472,8 @@ module Google
|
|
1197
1472
|
zone,
|
1198
1473
|
cluster_id,
|
1199
1474
|
node_pool_id,
|
1200
|
-
options: nil
|
1475
|
+
options: nil,
|
1476
|
+
&block
|
1201
1477
|
req = {
|
1202
1478
|
project_id: project_id,
|
1203
1479
|
zone: zone,
|
@@ -1205,7 +1481,7 @@ module Google
|
|
1205
1481
|
node_pool_id: node_pool_id
|
1206
1482
|
}.delete_if { |_, v| v.nil? }
|
1207
1483
|
req = Google::Gax::to_proto(req, Google::Container::V1::DeleteNodePoolRequest)
|
1208
|
-
@delete_node_pool.call(req, options)
|
1484
|
+
@delete_node_pool.call(req, options, &block)
|
1209
1485
|
end
|
1210
1486
|
|
1211
1487
|
# Roll back the previously Aborted or Failed NodePool upgrade.
|
@@ -1225,15 +1501,26 @@ module Google
|
|
1225
1501
|
# @param options [Google::Gax::CallOptions]
|
1226
1502
|
# Overrides the default settings for this call, e.g, timeout,
|
1227
1503
|
# retries, etc.
|
1504
|
+
# @yield [result, operation] Access the result along with the RPC operation
|
1505
|
+
# @yieldparam result [Google::Container::V1::Operation]
|
1506
|
+
# @yieldparam operation [GRPC::ActiveCall::Operation]
|
1228
1507
|
# @return [Google::Container::V1::Operation]
|
1229
1508
|
# @raise [Google::Gax::GaxError] if the RPC is aborted.
|
1230
1509
|
# @example
|
1231
|
-
# require "google/cloud/container
|
1510
|
+
# require "google/cloud/container"
|
1511
|
+
#
|
1512
|
+
# cluster_manager_client = Google::Cloud::Container.new(version: :v1)
|
1232
1513
|
#
|
1233
|
-
#
|
1514
|
+
# # TODO: Initialize +project_id+:
|
1234
1515
|
# project_id = ''
|
1516
|
+
#
|
1517
|
+
# # TODO: Initialize +zone+:
|
1235
1518
|
# zone = ''
|
1519
|
+
#
|
1520
|
+
# # TODO: Initialize +cluster_id+:
|
1236
1521
|
# cluster_id = ''
|
1522
|
+
#
|
1523
|
+
# # TODO: Initialize +node_pool_id+:
|
1237
1524
|
# node_pool_id = ''
|
1238
1525
|
# response = cluster_manager_client.rollback_node_pool_upgrade(project_id, zone, cluster_id, node_pool_id)
|
1239
1526
|
|
@@ -1242,7 +1529,8 @@ module Google
|
|
1242
1529
|
zone,
|
1243
1530
|
cluster_id,
|
1244
1531
|
node_pool_id,
|
1245
|
-
options: nil
|
1532
|
+
options: nil,
|
1533
|
+
&block
|
1246
1534
|
req = {
|
1247
1535
|
project_id: project_id,
|
1248
1536
|
zone: zone,
|
@@ -1250,7 +1538,7 @@ module Google
|
|
1250
1538
|
node_pool_id: node_pool_id
|
1251
1539
|
}.delete_if { |_, v| v.nil? }
|
1252
1540
|
req = Google::Gax::to_proto(req, Google::Container::V1::RollbackNodePoolUpgradeRequest)
|
1253
|
-
@rollback_node_pool_upgrade.call(req, options)
|
1541
|
+
@rollback_node_pool_upgrade.call(req, options, &block)
|
1254
1542
|
end
|
1255
1543
|
|
1256
1544
|
# Sets the NodeManagement options for a node pool.
|
@@ -1273,16 +1561,29 @@ module Google
|
|
1273
1561
|
# @param options [Google::Gax::CallOptions]
|
1274
1562
|
# Overrides the default settings for this call, e.g, timeout,
|
1275
1563
|
# retries, etc.
|
1564
|
+
# @yield [result, operation] Access the result along with the RPC operation
|
1565
|
+
# @yieldparam result [Google::Container::V1::Operation]
|
1566
|
+
# @yieldparam operation [GRPC::ActiveCall::Operation]
|
1276
1567
|
# @return [Google::Container::V1::Operation]
|
1277
1568
|
# @raise [Google::Gax::GaxError] if the RPC is aborted.
|
1278
1569
|
# @example
|
1279
|
-
# require "google/cloud/container
|
1570
|
+
# require "google/cloud/container"
|
1280
1571
|
#
|
1281
|
-
# cluster_manager_client = Google::Cloud::Container
|
1572
|
+
# cluster_manager_client = Google::Cloud::Container.new(version: :v1)
|
1573
|
+
#
|
1574
|
+
# # TODO: Initialize +project_id+:
|
1282
1575
|
# project_id = ''
|
1576
|
+
#
|
1577
|
+
# # TODO: Initialize +zone+:
|
1283
1578
|
# zone = ''
|
1579
|
+
#
|
1580
|
+
# # TODO: Initialize +cluster_id+:
|
1284
1581
|
# cluster_id = ''
|
1582
|
+
#
|
1583
|
+
# # TODO: Initialize +node_pool_id+:
|
1285
1584
|
# node_pool_id = ''
|
1585
|
+
#
|
1586
|
+
# # TODO: Initialize +management+:
|
1286
1587
|
# management = {}
|
1287
1588
|
# response = cluster_manager_client.set_node_pool_management(project_id, zone, cluster_id, node_pool_id, management)
|
1288
1589
|
|
@@ -1292,7 +1593,8 @@ module Google
|
|
1292
1593
|
cluster_id,
|
1293
1594
|
node_pool_id,
|
1294
1595
|
management,
|
1295
|
-
options: nil
|
1596
|
+
options: nil,
|
1597
|
+
&block
|
1296
1598
|
req = {
|
1297
1599
|
project_id: project_id,
|
1298
1600
|
zone: zone,
|
@@ -1301,7 +1603,7 @@ module Google
|
|
1301
1603
|
management: management
|
1302
1604
|
}.delete_if { |_, v| v.nil? }
|
1303
1605
|
req = Google::Gax::to_proto(req, Google::Container::V1::SetNodePoolManagementRequest)
|
1304
|
-
@set_node_pool_management.call(req, options)
|
1606
|
+
@set_node_pool_management.call(req, options, &block)
|
1305
1607
|
end
|
1306
1608
|
|
1307
1609
|
# Sets labels on a cluster.
|
@@ -1327,16 +1629,29 @@ module Google
|
|
1327
1629
|
# @param options [Google::Gax::CallOptions]
|
1328
1630
|
# Overrides the default settings for this call, e.g, timeout,
|
1329
1631
|
# retries, etc.
|
1632
|
+
# @yield [result, operation] Access the result along with the RPC operation
|
1633
|
+
# @yieldparam result [Google::Container::V1::Operation]
|
1634
|
+
# @yieldparam operation [GRPC::ActiveCall::Operation]
|
1330
1635
|
# @return [Google::Container::V1::Operation]
|
1331
1636
|
# @raise [Google::Gax::GaxError] if the RPC is aborted.
|
1332
1637
|
# @example
|
1333
|
-
# require "google/cloud/container
|
1638
|
+
# require "google/cloud/container"
|
1334
1639
|
#
|
1335
|
-
# cluster_manager_client = Google::Cloud::Container
|
1640
|
+
# cluster_manager_client = Google::Cloud::Container.new(version: :v1)
|
1641
|
+
#
|
1642
|
+
# # TODO: Initialize +project_id+:
|
1336
1643
|
# project_id = ''
|
1644
|
+
#
|
1645
|
+
# # TODO: Initialize +zone+:
|
1337
1646
|
# zone = ''
|
1647
|
+
#
|
1648
|
+
# # TODO: Initialize +cluster_id+:
|
1338
1649
|
# cluster_id = ''
|
1650
|
+
#
|
1651
|
+
# # TODO: Initialize +resource_labels+:
|
1339
1652
|
# resource_labels = {}
|
1653
|
+
#
|
1654
|
+
# # TODO: Initialize +label_fingerprint+:
|
1340
1655
|
# label_fingerprint = ''
|
1341
1656
|
# response = cluster_manager_client.set_labels(project_id, zone, cluster_id, resource_labels, label_fingerprint)
|
1342
1657
|
|
@@ -1346,7 +1661,8 @@ module Google
|
|
1346
1661
|
cluster_id,
|
1347
1662
|
resource_labels,
|
1348
1663
|
label_fingerprint,
|
1349
|
-
options: nil
|
1664
|
+
options: nil,
|
1665
|
+
&block
|
1350
1666
|
req = {
|
1351
1667
|
project_id: project_id,
|
1352
1668
|
zone: zone,
|
@@ -1355,7 +1671,7 @@ module Google
|
|
1355
1671
|
label_fingerprint: label_fingerprint
|
1356
1672
|
}.delete_if { |_, v| v.nil? }
|
1357
1673
|
req = Google::Gax::to_proto(req, Google::Container::V1::SetLabelsRequest)
|
1358
|
-
@set_labels.call(req, options)
|
1674
|
+
@set_labels.call(req, options, &block)
|
1359
1675
|
end
|
1360
1676
|
|
1361
1677
|
# Enables or disables the ABAC authorization mechanism on a cluster.
|
@@ -1374,15 +1690,26 @@ module Google
|
|
1374
1690
|
# @param options [Google::Gax::CallOptions]
|
1375
1691
|
# Overrides the default settings for this call, e.g, timeout,
|
1376
1692
|
# retries, etc.
|
1693
|
+
# @yield [result, operation] Access the result along with the RPC operation
|
1694
|
+
# @yieldparam result [Google::Container::V1::Operation]
|
1695
|
+
# @yieldparam operation [GRPC::ActiveCall::Operation]
|
1377
1696
|
# @return [Google::Container::V1::Operation]
|
1378
1697
|
# @raise [Google::Gax::GaxError] if the RPC is aborted.
|
1379
1698
|
# @example
|
1380
|
-
# require "google/cloud/container
|
1699
|
+
# require "google/cloud/container"
|
1700
|
+
#
|
1701
|
+
# cluster_manager_client = Google::Cloud::Container.new(version: :v1)
|
1381
1702
|
#
|
1382
|
-
#
|
1703
|
+
# # TODO: Initialize +project_id+:
|
1383
1704
|
# project_id = ''
|
1705
|
+
#
|
1706
|
+
# # TODO: Initialize +zone+:
|
1384
1707
|
# zone = ''
|
1708
|
+
#
|
1709
|
+
# # TODO: Initialize +cluster_id+:
|
1385
1710
|
# cluster_id = ''
|
1711
|
+
#
|
1712
|
+
# # TODO: Initialize +enabled+:
|
1386
1713
|
# enabled = false
|
1387
1714
|
# response = cluster_manager_client.set_legacy_abac(project_id, zone, cluster_id, enabled)
|
1388
1715
|
|
@@ -1391,7 +1718,8 @@ module Google
|
|
1391
1718
|
zone,
|
1392
1719
|
cluster_id,
|
1393
1720
|
enabled,
|
1394
|
-
options: nil
|
1721
|
+
options: nil,
|
1722
|
+
&block
|
1395
1723
|
req = {
|
1396
1724
|
project_id: project_id,
|
1397
1725
|
zone: zone,
|
@@ -1399,7 +1727,7 @@ module Google
|
|
1399
1727
|
enabled: enabled
|
1400
1728
|
}.delete_if { |_, v| v.nil? }
|
1401
1729
|
req = Google::Gax::to_proto(req, Google::Container::V1::SetLegacyAbacRequest)
|
1402
|
-
@set_legacy_abac.call(req, options)
|
1730
|
+
@set_legacy_abac.call(req, options, &block)
|
1403
1731
|
end
|
1404
1732
|
|
1405
1733
|
# Start master IP rotation.
|
@@ -1416,14 +1744,23 @@ module Google
|
|
1416
1744
|
# @param options [Google::Gax::CallOptions]
|
1417
1745
|
# Overrides the default settings for this call, e.g, timeout,
|
1418
1746
|
# retries, etc.
|
1747
|
+
# @yield [result, operation] Access the result along with the RPC operation
|
1748
|
+
# @yieldparam result [Google::Container::V1::Operation]
|
1749
|
+
# @yieldparam operation [GRPC::ActiveCall::Operation]
|
1419
1750
|
# @return [Google::Container::V1::Operation]
|
1420
1751
|
# @raise [Google::Gax::GaxError] if the RPC is aborted.
|
1421
1752
|
# @example
|
1422
|
-
# require "google/cloud/container
|
1753
|
+
# require "google/cloud/container"
|
1423
1754
|
#
|
1424
|
-
# cluster_manager_client = Google::Cloud::Container
|
1755
|
+
# cluster_manager_client = Google::Cloud::Container.new(version: :v1)
|
1756
|
+
#
|
1757
|
+
# # TODO: Initialize +project_id+:
|
1425
1758
|
# project_id = ''
|
1759
|
+
#
|
1760
|
+
# # TODO: Initialize +zone+:
|
1426
1761
|
# zone = ''
|
1762
|
+
#
|
1763
|
+
# # TODO: Initialize +cluster_id+:
|
1427
1764
|
# cluster_id = ''
|
1428
1765
|
# response = cluster_manager_client.start_ip_rotation(project_id, zone, cluster_id)
|
1429
1766
|
|
@@ -1431,14 +1768,15 @@ module Google
|
|
1431
1768
|
project_id,
|
1432
1769
|
zone,
|
1433
1770
|
cluster_id,
|
1434
|
-
options: nil
|
1771
|
+
options: nil,
|
1772
|
+
&block
|
1435
1773
|
req = {
|
1436
1774
|
project_id: project_id,
|
1437
1775
|
zone: zone,
|
1438
1776
|
cluster_id: cluster_id
|
1439
1777
|
}.delete_if { |_, v| v.nil? }
|
1440
1778
|
req = Google::Gax::to_proto(req, Google::Container::V1::StartIPRotationRequest)
|
1441
|
-
@start_ip_rotation.call(req, options)
|
1779
|
+
@start_ip_rotation.call(req, options, &block)
|
1442
1780
|
end
|
1443
1781
|
|
1444
1782
|
# Completes master IP rotation.
|
@@ -1455,14 +1793,23 @@ module Google
|
|
1455
1793
|
# @param options [Google::Gax::CallOptions]
|
1456
1794
|
# Overrides the default settings for this call, e.g, timeout,
|
1457
1795
|
# retries, etc.
|
1796
|
+
# @yield [result, operation] Access the result along with the RPC operation
|
1797
|
+
# @yieldparam result [Google::Container::V1::Operation]
|
1798
|
+
# @yieldparam operation [GRPC::ActiveCall::Operation]
|
1458
1799
|
# @return [Google::Container::V1::Operation]
|
1459
1800
|
# @raise [Google::Gax::GaxError] if the RPC is aborted.
|
1460
1801
|
# @example
|
1461
|
-
# require "google/cloud/container
|
1802
|
+
# require "google/cloud/container"
|
1803
|
+
#
|
1804
|
+
# cluster_manager_client = Google::Cloud::Container.new(version: :v1)
|
1462
1805
|
#
|
1463
|
-
#
|
1806
|
+
# # TODO: Initialize +project_id+:
|
1464
1807
|
# project_id = ''
|
1808
|
+
#
|
1809
|
+
# # TODO: Initialize +zone+:
|
1465
1810
|
# zone = ''
|
1811
|
+
#
|
1812
|
+
# # TODO: Initialize +cluster_id+:
|
1466
1813
|
# cluster_id = ''
|
1467
1814
|
# response = cluster_manager_client.complete_ip_rotation(project_id, zone, cluster_id)
|
1468
1815
|
|
@@ -1470,14 +1817,15 @@ module Google
|
|
1470
1817
|
project_id,
|
1471
1818
|
zone,
|
1472
1819
|
cluster_id,
|
1473
|
-
options: nil
|
1820
|
+
options: nil,
|
1821
|
+
&block
|
1474
1822
|
req = {
|
1475
1823
|
project_id: project_id,
|
1476
1824
|
zone: zone,
|
1477
1825
|
cluster_id: cluster_id
|
1478
1826
|
}.delete_if { |_, v| v.nil? }
|
1479
1827
|
req = Google::Gax::to_proto(req, Google::Container::V1::CompleteIPRotationRequest)
|
1480
|
-
@complete_ip_rotation.call(req, options)
|
1828
|
+
@complete_ip_rotation.call(req, options, &block)
|
1481
1829
|
end
|
1482
1830
|
|
1483
1831
|
# Sets the size of a specific node pool.
|
@@ -1498,16 +1846,29 @@ module Google
|
|
1498
1846
|
# @param options [Google::Gax::CallOptions]
|
1499
1847
|
# Overrides the default settings for this call, e.g, timeout,
|
1500
1848
|
# retries, etc.
|
1849
|
+
# @yield [result, operation] Access the result along with the RPC operation
|
1850
|
+
# @yieldparam result [Google::Container::V1::Operation]
|
1851
|
+
# @yieldparam operation [GRPC::ActiveCall::Operation]
|
1501
1852
|
# @return [Google::Container::V1::Operation]
|
1502
1853
|
# @raise [Google::Gax::GaxError] if the RPC is aborted.
|
1503
1854
|
# @example
|
1504
|
-
# require "google/cloud/container
|
1855
|
+
# require "google/cloud/container"
|
1856
|
+
#
|
1857
|
+
# cluster_manager_client = Google::Cloud::Container.new(version: :v1)
|
1505
1858
|
#
|
1506
|
-
#
|
1859
|
+
# # TODO: Initialize +project_id+:
|
1507
1860
|
# project_id = ''
|
1861
|
+
#
|
1862
|
+
# # TODO: Initialize +zone+:
|
1508
1863
|
# zone = ''
|
1864
|
+
#
|
1865
|
+
# # TODO: Initialize +cluster_id+:
|
1509
1866
|
# cluster_id = ''
|
1867
|
+
#
|
1868
|
+
# # TODO: Initialize +node_pool_id+:
|
1510
1869
|
# node_pool_id = ''
|
1870
|
+
#
|
1871
|
+
# # TODO: Initialize +node_count+:
|
1511
1872
|
# node_count = 0
|
1512
1873
|
# response = cluster_manager_client.set_node_pool_size(project_id, zone, cluster_id, node_pool_id, node_count)
|
1513
1874
|
|
@@ -1517,7 +1878,8 @@ module Google
|
|
1517
1878
|
cluster_id,
|
1518
1879
|
node_pool_id,
|
1519
1880
|
node_count,
|
1520
|
-
options: nil
|
1881
|
+
options: nil,
|
1882
|
+
&block
|
1521
1883
|
req = {
|
1522
1884
|
project_id: project_id,
|
1523
1885
|
zone: zone,
|
@@ -1526,7 +1888,7 @@ module Google
|
|
1526
1888
|
node_count: node_count
|
1527
1889
|
}.delete_if { |_, v| v.nil? }
|
1528
1890
|
req = Google::Gax::to_proto(req, Google::Container::V1::SetNodePoolSizeRequest)
|
1529
|
-
@set_node_pool_size.call(req, options)
|
1891
|
+
@set_node_pool_size.call(req, options, &block)
|
1530
1892
|
end
|
1531
1893
|
|
1532
1894
|
# Enables/Disables Network Policy for a cluster.
|
@@ -1547,15 +1909,26 @@ module Google
|
|
1547
1909
|
# @param options [Google::Gax::CallOptions]
|
1548
1910
|
# Overrides the default settings for this call, e.g, timeout,
|
1549
1911
|
# retries, etc.
|
1912
|
+
# @yield [result, operation] Access the result along with the RPC operation
|
1913
|
+
# @yieldparam result [Google::Container::V1::Operation]
|
1914
|
+
# @yieldparam operation [GRPC::ActiveCall::Operation]
|
1550
1915
|
# @return [Google::Container::V1::Operation]
|
1551
1916
|
# @raise [Google::Gax::GaxError] if the RPC is aborted.
|
1552
1917
|
# @example
|
1553
|
-
# require "google/cloud/container
|
1918
|
+
# require "google/cloud/container"
|
1919
|
+
#
|
1920
|
+
# cluster_manager_client = Google::Cloud::Container.new(version: :v1)
|
1554
1921
|
#
|
1555
|
-
#
|
1922
|
+
# # TODO: Initialize +project_id+:
|
1556
1923
|
# project_id = ''
|
1924
|
+
#
|
1925
|
+
# # TODO: Initialize +zone+:
|
1557
1926
|
# zone = ''
|
1927
|
+
#
|
1928
|
+
# # TODO: Initialize +cluster_id+:
|
1558
1929
|
# cluster_id = ''
|
1930
|
+
#
|
1931
|
+
# # TODO: Initialize +network_policy+:
|
1559
1932
|
# network_policy = {}
|
1560
1933
|
# response = cluster_manager_client.set_network_policy(project_id, zone, cluster_id, network_policy)
|
1561
1934
|
|
@@ -1564,7 +1937,8 @@ module Google
|
|
1564
1937
|
zone,
|
1565
1938
|
cluster_id,
|
1566
1939
|
network_policy,
|
1567
|
-
options: nil
|
1940
|
+
options: nil,
|
1941
|
+
&block
|
1568
1942
|
req = {
|
1569
1943
|
project_id: project_id,
|
1570
1944
|
zone: zone,
|
@@ -1572,7 +1946,7 @@ module Google
|
|
1572
1946
|
network_policy: network_policy
|
1573
1947
|
}.delete_if { |_, v| v.nil? }
|
1574
1948
|
req = Google::Gax::to_proto(req, Google::Container::V1::SetNetworkPolicyRequest)
|
1575
|
-
@set_network_policy.call(req, options)
|
1949
|
+
@set_network_policy.call(req, options, &block)
|
1576
1950
|
end
|
1577
1951
|
|
1578
1952
|
# Sets the maintenance policy for a cluster.
|
@@ -1594,15 +1968,26 @@ module Google
|
|
1594
1968
|
# @param options [Google::Gax::CallOptions]
|
1595
1969
|
# Overrides the default settings for this call, e.g, timeout,
|
1596
1970
|
# retries, etc.
|
1971
|
+
# @yield [result, operation] Access the result along with the RPC operation
|
1972
|
+
# @yieldparam result [Google::Container::V1::Operation]
|
1973
|
+
# @yieldparam operation [GRPC::ActiveCall::Operation]
|
1597
1974
|
# @return [Google::Container::V1::Operation]
|
1598
1975
|
# @raise [Google::Gax::GaxError] if the RPC is aborted.
|
1599
1976
|
# @example
|
1600
|
-
# require "google/cloud/container
|
1977
|
+
# require "google/cloud/container"
|
1978
|
+
#
|
1979
|
+
# cluster_manager_client = Google::Cloud::Container.new(version: :v1)
|
1601
1980
|
#
|
1602
|
-
#
|
1981
|
+
# # TODO: Initialize +project_id+:
|
1603
1982
|
# project_id = ''
|
1983
|
+
#
|
1984
|
+
# # TODO: Initialize +zone+:
|
1604
1985
|
# zone = ''
|
1986
|
+
#
|
1987
|
+
# # TODO: Initialize +cluster_id+:
|
1605
1988
|
# cluster_id = ''
|
1989
|
+
#
|
1990
|
+
# # TODO: Initialize +maintenance_policy+:
|
1606
1991
|
# maintenance_policy = {}
|
1607
1992
|
# response = cluster_manager_client.set_maintenance_policy(project_id, zone, cluster_id, maintenance_policy)
|
1608
1993
|
|
@@ -1611,7 +1996,8 @@ module Google
|
|
1611
1996
|
zone,
|
1612
1997
|
cluster_id,
|
1613
1998
|
maintenance_policy,
|
1614
|
-
options: nil
|
1999
|
+
options: nil,
|
2000
|
+
&block
|
1615
2001
|
req = {
|
1616
2002
|
project_id: project_id,
|
1617
2003
|
zone: zone,
|
@@ -1619,7 +2005,7 @@ module Google
|
|
1619
2005
|
maintenance_policy: maintenance_policy
|
1620
2006
|
}.delete_if { |_, v| v.nil? }
|
1621
2007
|
req = Google::Gax::to_proto(req, Google::Container::V1::SetMaintenancePolicyRequest)
|
1622
|
-
@set_maintenance_policy.call(req, options)
|
2008
|
+
@set_maintenance_policy.call(req, options, &block)
|
1623
2009
|
end
|
1624
2010
|
end
|
1625
2011
|
end
|