google-cloud-os_login 1.7.0 → 2.0.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: e765c74e510a85ecc22c0a57b644262642f581dd0087ae53ab1e5539613f2cdf
4
- data.tar.gz: d9e096b14bf022790aa971b830169a1aad6641a72f5c5c2fea255d361fb25475
3
+ metadata.gz: 69be13af8ad1278c129d9becee5d3d3874d0edc4b7d3e983f16eaf8983d43d7f
4
+ data.tar.gz: a0091bbcb6f872cf820c0550ee2f6f2bc9e45c3432a68362d28fa6917ef79a88
5
5
  SHA512:
6
- metadata.gz: bdc109a49659926b373f64cb7f8afa10ac90ac560137f862061a66183b57d47d33fb0baa2e66aa039333857965d9c7ea303c2b8178950f38a7b259af5112ed37
7
- data.tar.gz: bf3e8fef9ec5b59c1b21d3aa25a177be6b4c813a4bc3d9c7b12263739e13ce7b82e4a58c9953bdaae6796c3f9d375fa7e25654f6a9254647bb1e11c71c00b3b4
6
+ metadata.gz: 3f03ad71683b18eebfc70ab4d4743a2de97389d365738e4feaf587cb9db360358cca95c381b41da8efc293c348b846dafa671915d820d8001fc4b81dfdaf4e5a
7
+ data.tar.gz: 3c3ce49f14cebf0a751c5526ec7b8bb61b08b6ba1c4d38401906bfb530062f0fe9855194f920414e60e5bc176f994c2eab7d61059dbcc1998facc0f8917f1a9a
data/.yardopts CHANGED
@@ -8,5 +8,4 @@
8
8
  -
9
9
  README.md
10
10
  AUTHENTICATION.md
11
- MIGRATING.md
12
11
  LICENSE.md
data/README.md CHANGED
@@ -16,8 +16,7 @@ for this library, google-cloud-os_login, to see the convenience methods for
16
16
  constructing client objects. Reference documentation for the client objects
17
17
  themselves can be found in the client library documentation for the versioned
18
18
  client gems:
19
- [google-cloud-os_login-v1](https://cloud.google.com/ruby/docs/reference/google-cloud-os_login-v1/latest),
20
- [google-cloud-os_login-v1beta](https://cloud.google.com/ruby/docs/reference/google-cloud-os_login-v1beta/latest).
19
+ [google-cloud-os_login-v1](https://cloud.google.com/ruby/docs/reference/google-cloud-os_login-v1/latest).
21
20
 
22
21
  See also the [Product Documentation](https://cloud.google.com/compute/docs/oslogin)
23
22
  for more usage information.
@@ -35,14 +34,6 @@ In order to use this library, you first need to go through the following steps:
35
34
  1. [Enable the API.](https://console.cloud.google.com/apis/library/oslogin.googleapis.com)
36
35
  1. {file:AUTHENTICATION.md Set up authentication.}
37
36
 
38
- ## Migrating from 0.x versions
39
-
40
- The 1.0 release of the google-cloud-os_login client is a significant upgrade
41
- based on a [next-gen code generator](https://github.com/googleapis/gapic-generator-ruby),
42
- and includes substantial interface changes. Existing code written for earlier
43
- versions of this library will likely require updates to use this version.
44
- See the {file:MIGRATING.md MIGRATING.md} document for more information.
45
-
46
37
  ## Debug Logging
47
38
 
48
39
  This library comes with opt-in Debug Logging that can help you troubleshoot
@@ -71,8 +62,7 @@ results in logs appearing alongside your application logs in the
71
62
  Debug logging also requires that the versioned clients for this service be
72
63
  sufficiently recent, released after about Dec 10, 2024. If logging is not
73
64
  working, try updating the versioned clients in your bundle or installed gems:
74
- [google-cloud-os_login-v1](https://cloud.google.com/ruby/docs/reference/google-cloud-os_login-v1/latest),
75
- [google-cloud-os_login-v1beta](https://cloud.google.com/ruby/docs/reference/google-cloud-os_login-v1beta/latest).
65
+ [google-cloud-os_login-v1](https://cloud.google.com/ruby/docs/reference/google-cloud-os_login-v1/latest).
76
66
 
77
67
  ## Supported Ruby Versions
78
68
 
@@ -20,7 +20,7 @@
20
20
  module Google
21
21
  module Cloud
22
22
  module OsLogin
23
- VERSION = "1.7.0"
23
+ VERSION = "2.0.0"
24
24
  end
25
25
  end
26
26
  end
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: google-cloud-os_login
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.7.0
4
+ version: 2.0.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Google LLC
8
8
  bindir: bin
9
9
  cert_chain: []
10
- date: 2025-01-29 00:00:00.000000000 Z
10
+ date: 2025-02-13 00:00:00.000000000 Z
11
11
  dependencies:
12
12
  - !ruby/object:Gem::Dependency
13
13
  name: google-cloud-core
@@ -27,42 +27,16 @@ dependencies:
27
27
  name: google-cloud-os_login-v1
28
28
  requirement: !ruby/object:Gem::Requirement
29
29
  requirements:
30
- - - ">="
31
- - !ruby/object:Gem::Version
32
- version: '0.11'
33
- - - "<"
34
- - !ruby/object:Gem::Version
35
- version: 2.a
36
- type: :runtime
37
- prerelease: false
38
- version_requirements: !ruby/object:Gem::Requirement
39
- requirements:
40
- - - ">="
41
- - !ruby/object:Gem::Version
42
- version: '0.11'
43
- - - "<"
44
- - !ruby/object:Gem::Version
45
- version: 2.a
46
- - !ruby/object:Gem::Dependency
47
- name: google-cloud-os_login-v1beta
48
- requirement: !ruby/object:Gem::Requirement
49
- requirements:
50
- - - ">="
51
- - !ruby/object:Gem::Version
52
- version: '0.14'
53
- - - "<"
30
+ - - "~>"
54
31
  - !ruby/object:Gem::Version
55
- version: 2.a
32
+ version: '1.2'
56
33
  type: :runtime
57
34
  prerelease: false
58
35
  version_requirements: !ruby/object:Gem::Requirement
59
36
  requirements:
60
- - - ">="
61
- - !ruby/object:Gem::Version
62
- version: '0.14'
63
- - - "<"
37
+ - - "~>"
64
38
  - !ruby/object:Gem::Version
65
- version: 2.a
39
+ version: '1.2'
66
40
  description: Use OS Login to manage SSH access to your instances using IAM without
67
41
  having to create and manage individual SSH keys. OS Login maintains a consistent
68
42
  Linux user identity across VM instances and is the recommended way to manage many
@@ -75,7 +49,6 @@ files:
75
49
  - ".yardopts"
76
50
  - AUTHENTICATION.md
77
51
  - LICENSE.md
78
- - MIGRATING.md
79
52
  - README.md
80
53
  - lib/google-cloud-os_login.rb
81
54
  - lib/google/cloud/os_login.rb
@@ -98,7 +71,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
98
71
  - !ruby/object:Gem::Version
99
72
  version: '0'
100
73
  requirements: []
101
- rubygems_version: 3.6.2
74
+ rubygems_version: 3.6.3
102
75
  specification_version: 4
103
76
  summary: API Client library for the Cloud OS Login API
104
77
  test_files: []
data/MIGRATING.md DELETED
@@ -1,323 +0,0 @@
1
- ## Migrating to google-cloud-os_login 1.0
2
-
3
- The 1.0 release of the google-cloud-os_login client is a significant upgrade
4
- based on a [next-gen code generator](https://github.com/googleapis/gapic-generator-ruby),
5
- and includes substantial interface changes. Existing code written for earlier
6
- versions of this library will likely require updates to use this version.
7
- This document describes the changes that have been made, and what you need to
8
- do to update your usage.
9
-
10
- To summarize:
11
-
12
- * The library has been broken out into three libraries. The new gems
13
- `google-cloud-os_login-v1` and `google-cloud-os_login-v1beta` contain the
14
- actual client classes for versions V1 and V1beta of the OS Login
15
- service, and the gem `google-cloud-os_login` now simply provides a
16
- convenience wrapper. See [Library Structure](#library-structure) for more
17
- info.
18
- * The library uses a new configuration mechanism giving you closer control
19
- over endpoint address, network timeouts, and retry. See
20
- [Client Configuration](#client-configuration) for more info. Furthermore,
21
- when creating a client object, you can customize its configuration in a
22
- block rather than passing arguments to the constructor. See
23
- [Creating Clients](#creating-clients) for more info.
24
- * Previously, positional arguments were used to indicate required arguments.
25
- Now, all method arguments are keyword arguments, with documentation that
26
- specifies whether they are required or optional. Additionally, you can pass
27
- a proto request object instead of separate arguments. See
28
- [Passing Arguments](#passing-arguments) for more info.
29
- * Previously, some client classes included class methods for constructing
30
- resource paths. These paths are now instance methods on the client objects,
31
- and are also available in a separate paths module. See
32
- [Resource Path Helpers](#resource-path-helpers) for more info.
33
- * Previously, clients reported RPC errors by raising instances of
34
- `Google::Gax::GaxError` and its subclasses. Now, RPC exceptions are of type
35
- `Google::Cloud::Error` and its subclasses. See
36
- [Handling Errors](#handling-errors) for more info.
37
- * Some classes have moved into different namespaces. See
38
- [Class Namespaces](#class-namespaces) for more info.
39
-
40
- ### Library Structure
41
-
42
- Older 0.x releases of the `google-cloud-os_login` gem were all-in-one gems that
43
- included potentially multiple clients for multiple versions of the OS Login
44
- service. The `Google::Cloud::OsLogin.new` factory method would
45
- return you an instance of a `Google::Cloud::OsLogin::V1::OsLoginServiceClient`
46
- object for the V1 version of the service, or a
47
- `Google::Cloud::OsLogin::V1beta::OsLoginServiceClient` object for the
48
- V1beta version of the service. All these classes were defined in the same gem.
49
-
50
- With the 1.0 release, the `google-cloud-os_login` gem still provides factory
51
- methods for obtaining clients. (The method signatures will have changed. See
52
- [Creating Clients](#creating-clients) for details.) However, the actual client
53
- classes have been moved into separate gems, one per service version. The
54
- `Google::Cloud::OsLogin::V1::OsLoginService::Client` class, along with its
55
- helpers and data types, is now part of the `google-cloud-os_login-v1` gem.
56
- Similarly, the `Google::Cloud::OsLogin::V1beta::OsLoginService::Client`
57
- class is part of the `google-cloud-os_login-v1beta` gem.
58
-
59
- For normal usage, you can continue to install the `google-cloud-os_login` gem
60
- (which will bring in the versioned client gems as dependencies) and continue to
61
- use factory methods to create clients. However, you may alternatively choose to
62
- install only one of the versioned gems. For example, if you know you will use only
63
- `V1` of the service, you can install `google-cloud-os_login-v2` by itself, and
64
- construct instances of the
65
- `Google::Cloud::OsLogin::V1::OsLoginService::Client` client class directly.
66
-
67
- ### Client Configuration
68
-
69
- In older releases, if you wanted to customize performance parameters or
70
- low-level behavior of the client (such as credentials, timeouts, or
71
- instrumentation), you would pass a variety of keyword arguments to the client
72
- constructor. It was also extremely difficult to customize the default settings.
73
-
74
- With the 1.0 release, a configuration interface provides control over these
75
- parameters, including defaults for all instances of a client, and settings for
76
- each specific client instance. For example, to set default credentials and
77
- timeout for all OS Login V1 clients:
78
-
79
- ```
80
- Google::Cloud::OsLogin::V1::OsLoginService::Client.configure do |config|
81
- config.credentials = "/path/to/credentials.json"
82
- config.timeout = 10.0
83
- end
84
- ```
85
-
86
- Individual RPCs can also be configured independently. For example, to set the
87
- timeout for the `get_ssh_public_key` call:
88
-
89
- ```
90
- Google::Cloud::OsLogin::V1::OsLoginService::Client.configure do |config|
91
- config.rpcs.get_ssh_public_key.timeout = 20.0
92
- end
93
- ```
94
-
95
- Defaults for certain configurations can be set for all OS Login versions
96
- globally:
97
-
98
- ```
99
- Google::Cloud::OsLogin.configure do |config|
100
- config.credentials = "/path/to/credentials.json"
101
- config.timeout = 10.0
102
- end
103
- ```
104
-
105
- Finally, you can override the configuration for each client instance. See the
106
- next section on [Creating Clients](#creating-clients) for details.
107
-
108
- ### Creating Clients
109
-
110
- In older releases, to create a client object, you would use the
111
- `Google::Cloud::OsLogin.new` class method. Keyword arguments were available to
112
- select a service version and to configure parameters such as credentials and
113
- timeouts.
114
-
115
- With the 1.0 release, use the `Google::Cloud::OsLogin.os_login_service` class
116
- method to create a client object. You may select a service version using the
117
- `:version` keyword argument. However, other configuration parameters should be
118
- set in a configuration block when you create the client.
119
-
120
- Old:
121
- ```
122
- client = Google::Cloud::OsLogin.new credentials: "/path/to/credentials.json"
123
- ```
124
-
125
- New:
126
- ```
127
- client = Google::Cloud::OsLogin.os_login_service do |config|
128
- config.credentials = "/path/to/credentials.json"
129
- end
130
- ```
131
-
132
- The configuration block is optional. If you do not provide it, or you do not
133
- set some configuration parameters, then the default configuration is used. See
134
- [Client Configuration](#client-configuration).
135
-
136
- ### Passing Arguments
137
-
138
- In older releases, required arguments would be passed as positional method
139
- arguments, while most optional arguments would be passed as keyword arguments.
140
-
141
- With the 1.0 release, all RPC arguments are passed as keyword arguments,
142
- regardless of whether they are required or optional. For example:
143
-
144
- Old:
145
- ```
146
- client = Google::Cloud::OsLogin.new
147
-
148
- key_name = "users/my-user/sshPublicKeys/12345"
149
-
150
- # The key name is a positional argument.
151
- response = client.get_ssh_public_key key_name
152
- ```
153
-
154
- New:
155
- ```
156
- client = Google::Cloud::OsLogin.os_login_service
157
-
158
- key_name = "users/my-user/sshPublicKeys/12345"
159
-
160
- # The key name is a keyword argument.
161
- response = client.get_ssh_public_key name: key_name
162
- ```
163
-
164
- In the 1.0 release, it is also possible to pass a request object, either
165
- as a hash or as a protocol buffer.
166
-
167
- New:
168
- ```
169
- client = Google::Cloud::OsLogin.os_login_service
170
-
171
- request = Google::Cloud::OsLogin::V1::GetSshPublicKeyRequest.new(
172
- name: "users/my-user/sshPublicKeys/12345"
173
- )
174
-
175
- # Pass a request object as a positional argument:
176
- response = client.get_ssh_public_key request
177
- ```
178
-
179
- Finally, in older releases, to provide call options, you would pass a
180
- `Google::Gax::CallOptions` object with the `:options` keyword argument. In the
181
- 1.0 release, pass call options using a _second set_ of keyword arguments.
182
-
183
- Old:
184
- ```
185
- client = Google::Cloud::OsLogin.new
186
-
187
- key_name = "users/my-user/sshPublicKeys/12345"
188
-
189
- options = Google::Gax::CallOptions.new timeout: 10.0
190
-
191
- response = client.get_ssh_public_key key_name, options: options
192
- ```
193
-
194
- New:
195
- ```
196
- client = Google::Cloud::OsLogin.os_login_service
197
-
198
- key_name = "users/my-user/sshPublicKeys/12345"
199
-
200
- # Use a hash to wrap the normal call arguments (or pass a request object), and
201
- # then add further keyword arguments for the call options.
202
- response = client.get_ssh_public_key({ name: key_name }, timeout: 10.0)
203
- ```
204
-
205
- ### Resource Path Helpers
206
-
207
- The client library includes helper methods for generating the resource path
208
- strings passed to many calls. These helpers have changed in two ways:
209
-
210
- * In older releases, they are _class_ methods on the client class. In the 1.0
211
- release, they are _instance_ methods on the client. They are also available
212
- on a separate paths module that you can include elsewhere for convenience.
213
- * In older releases, arguments to a resource path helper are passed as
214
- _positional_ arguments. In the 1.0 release, they are passed as named _keyword_
215
- arguments.
216
-
217
- Following is an example involving using a resource path helper.
218
-
219
- Old:
220
- ```
221
- client = Google::Cloud::OsLogin.new
222
-
223
- # Call the helper on the client class
224
- key_name = Google::Cloud::OsLogin::V1::OsLoginServiceClient.ssh_public_key_path(
225
- "my-user", "12345"
226
- )
227
-
228
- response = client.get_ssh_public_key key_name
229
- ```
230
-
231
- New:
232
- ```
233
- client = Google::Cloud::OsLogin.os_login_service
234
-
235
- # Call the helper on the client instance, and use keyword arguments
236
- key_name = client.ssh_public_key_path user: "my-user", fingerprint: "12345"
237
-
238
- response = client.get_ssh_public_key name: key_name
239
- ```
240
-
241
- In the 1.0 client, you can also use the paths module as a convenience module.
242
-
243
- New:
244
- ```
245
- # Bring the path helper methods into the current class
246
- include Google::Cloud::OsLogin::V1::OsLoginService::Paths
247
-
248
- def foo
249
- client = Google::Cloud::OsLogin.os_login_service
250
-
251
- # Call the included helper method
252
- key_name = ssh_public_key_path user: "my-user", fingerprint: "12345"
253
-
254
- response = client.get_ssh_public_key name: key_name
255
-
256
- # Do something with response...
257
- end
258
- ```
259
-
260
- ### Handling Errors
261
-
262
- The client reports standard
263
- [gRPC error codes](https://github.com/grpc/grpc/blob/master/doc/statuscodes.md)
264
- by raising exceptions. In older releases, these exceptions were located in the
265
- `Google::Gax` namespace and were subclasses of the `Google::Gax::GaxError` base
266
- exception class, defined in the `google-gax` gem. However, these classes were
267
- different from the standard exceptions (subclasses of `Google::Cloud::Error`)
268
- thrown by other client libraries such as `google-cloud-storage`.
269
-
270
- The 1.0 client library now uses the `Google::Cloud::Error` exception hierarchy,
271
- for consistency across all the Google Cloud client libraries. In general, these
272
- exceptions have the same name as their counterparts from older releases, but
273
- are located in the `Google::Cloud` namespace rather than the `Google::Gax`
274
- namespace.
275
-
276
- Old:
277
- ```
278
- client = Google::Cloud::OsLogin.new
279
-
280
- key_name = "users/my-user/sshPublicKeys/12345"
281
-
282
- begin
283
- response = client.get_ssh_public_key key_name
284
- rescue Google::Gax::Error => e
285
- # Handle exceptions that subclass Google::Gax::Error
286
- end
287
- ```
288
-
289
- New:
290
- ```
291
- client = Google::Cloud::OsLogin.os_login_service
292
-
293
- key_name = "users/my-user/sshPublicKeys/12345"
294
-
295
- begin
296
- response = client.get_ssh_public_key name: key_name
297
- rescue Google::Cloud::Error => e
298
- # Handle exceptions that subclass Google::Cloud::Error
299
- end
300
- ```
301
-
302
- ### Class Namespaces
303
-
304
- In older releases, some data type (protobuf) classes were located under the
305
- module `Google::Cloud::Oslogin` (note lower-case "l"). In the 1.0 release,
306
- these classes have been moved into the same `Google::Cloud::OsLogin` (note
307
- upper-case "L") module by the client object, for consistency.
308
-
309
- In older releases, the client object was of class
310
- `Google::Cloud::OsLogin::V1::OsLoginServiceClient`.
311
- In the 1.0 release, the client object is of class
312
- `Google::Cloud::OsLogin::V1::OsLoginService::Client`.
313
- Note that most users will use the `Google::Cloud::OsLogin.os_login_service`
314
- factory method to create instances of the client object, so you may not need to
315
- reference the actual class directly.
316
- See [Creating Clients](#creating-clients).
317
-
318
- In older releases, the credentials object was of class
319
- `Google::Cloud::OsLogin::V1::Credentials`.
320
- In the 1.0 release, the credentials object is of class
321
- `Google::Cloud::OsLogin::V1::OsLoginService::Credentials`.
322
- Again, most users will not need to reference this class directly.
323
- See [Client Configuration](#client-configuration).