google-cloud-network_connectivity 1.5.1 → 2.0.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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 1fe1b3aaaad43097b4e977fead28347385468dfe4934b15d9179dd63f547653d
4
- data.tar.gz: 0a0a6a32d5b7cbdaf069e6df9285f10af90e9ee15d0df62e9df39dcb2ccaa7e6
3
+ metadata.gz: 3f1681a80afee80a92334533006d923a66582366620416500fbff01b484b670c
4
+ data.tar.gz: 92d34d6d896f692a7e3c37a67d1e405b8936589a1c319116d668422ab49cad43
5
5
  SHA512:
6
- metadata.gz: d52a556f662a93b7bb6dbd1d4184b88332eb48f5271bea229fddf0ed39c641059bdbc5746ae2ef173b20676cc2578e214d39ec2210c129f2df418dfa498d04b2
7
- data.tar.gz: 6db880cf63296a2b8a254c941a831fa8daaad5b0ce6505c342e6986463f66b8b0a6cdea4763f7e98dfa233fb51cfc772b10005f828bec8a4d708788fd05ef625
6
+ metadata.gz: 1dd8721cbd0ac7549b633177f4490a75b97fc198f9da5bdc0a24c8875021d7d9888321713cc14684e315e60deeeb88414d5dfd38039ea861047abd24ed68d7a8
7
+ data.tar.gz: 57b5458c2bafaee91eec20680446c16e3e089d74da8d72ef09327026c1eb255e8afd4a2a4ec64a6c3fd01616611ae7bb7c477898f974f83e53c2af68bc17b00d
data/README.md CHANGED
@@ -16,8 +16,7 @@ for this library, google-cloud-network_connectivity, to see the convenience meth
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-network_connectivity-v1](https://cloud.google.com/ruby/docs/reference/google-cloud-network_connectivity-v1/latest),
20
- [google-cloud-network_connectivity-v1alpha1](https://cloud.google.com/ruby/docs/reference/google-cloud-network_connectivity-v1alpha1/latest).
19
+ [google-cloud-network_connectivity-v1](https://cloud.google.com/ruby/docs/reference/google-cloud-network_connectivity-v1/latest).
21
20
 
22
21
  See also the [Product Documentation](https://cloud.google.com/network-connectivity/docs)
23
22
  for more usage information.
@@ -35,35 +34,39 @@ 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/networkconnectivity.googleapis.com)
36
35
  1. {file:AUTHENTICATION.md Set up authentication.}
37
36
 
38
- ## Enabling Logging
39
-
40
- To enable logging for this library, set the logger for the underlying [gRPC](https://github.com/grpc/grpc/tree/master/src/ruby) library.
41
- The logger that you set may be a Ruby stdlib [`Logger`](https://ruby-doc.org/current/stdlibs/logger/Logger.html) as shown below,
42
- or a [`Google::Cloud::Logging::Logger`](https://cloud.google.com/ruby/docs/reference/google-cloud-logging/latest)
43
- that will write logs to [Cloud Logging](https://cloud.google.com/logging/). See [grpc/logconfig.rb](https://github.com/grpc/grpc/blob/master/src/ruby/lib/grpc/logconfig.rb)
44
- and the gRPC [spec_helper.rb](https://github.com/grpc/grpc/blob/master/src/ruby/spec/spec_helper.rb) for additional information.
45
-
46
- Configuring a Ruby stdlib logger:
47
-
48
- ```ruby
49
- require "logger"
50
-
51
- module MyLogger
52
- LOGGER = Logger.new $stderr, level: Logger::WARN
53
- def logger
54
- LOGGER
55
- end
56
- end
57
-
58
- # Define a gRPC module-level logger method before grpc/logconfig.rb loads.
59
- module GRPC
60
- extend MyLogger
61
- end
62
- ```
37
+ ## Debug Logging
38
+
39
+ This library comes with opt-in Debug Logging that can help you troubleshoot
40
+ your application's integration with the API. When logging is activated, key
41
+ events such as requests and responses, along with data payloads and metadata
42
+ such as headers and client configuration, are logged to the standard error
43
+ stream.
44
+
45
+ **WARNING:** Client Library Debug Logging includes your data payloads in
46
+ plaintext, which could include sensitive data such as PII for yourself or your
47
+ customers, private keys, or other security data that could be compromising if
48
+ leaked. Always practice good data hygiene with your application logs, and follow
49
+ the principle of least access. Google also recommends that Client Library Debug
50
+ Logging be enabled only temporarily during active debugging, and not used
51
+ permanently in production.
52
+
53
+ To enable logging, set the environment variable `GOOGLE_SDK_RUBY_LOGGING_GEMS`
54
+ to the value `all`. Alternatively, you can set the value to a comma-delimited
55
+ list of client library gem names. This will select the default logging behavior,
56
+ which writes logs to the standard error stream. On a local workstation, this may
57
+ result in logs appearing on the console. When running on a Google Cloud hosting
58
+ service such as [Google Cloud Run](https://cloud.google.com/run), this generally
59
+ results in logs appearing alongside your application logs in the
60
+ [Google Cloud Logging](https://cloud.google.com/logging/) service.
61
+
62
+ Debug logging also requires that the versioned clients for this service be
63
+ sufficiently recent, released after about Dec 10, 2024. If logging is not
64
+ working, try updating the versioned clients in your bundle or installed gems:
65
+ [google-cloud-network_connectivity-v1](https://cloud.google.com/ruby/docs/reference/google-cloud-network_connectivity-v1/latest).
63
66
 
64
67
  ## Supported Ruby Versions
65
68
 
66
- This library is supported on Ruby 2.7+.
69
+ This library is supported on Ruby 3.0+.
67
70
 
68
71
  Google provides official support for Ruby versions that are actively supported
69
72
  by Ruby Core—that is, Ruby versions that are either in normal maintenance or
@@ -20,7 +20,7 @@
20
20
  module Google
21
21
  module Cloud
22
22
  module NetworkConnectivity
23
- VERSION = "1.5.1"
23
+ VERSION = "2.0.0"
24
24
  end
25
25
  end
26
26
  end
@@ -56,6 +56,11 @@ module Google
56
56
  # supported by that API version, and the corresponding gem is available, the
57
57
  # appropriate versioned client will be returned.
58
58
  #
59
+ # Raises an exception if the currently installed versioned client gem for the
60
+ # given API version does not support the HubService service.
61
+ # You can determine whether the method will succeed by calling
62
+ # {Google::Cloud::NetworkConnectivity.hub_service_available?}.
63
+ #
59
64
  # ## About HubService
60
65
  #
61
66
  # Network Connectivity Center is a hub-and-spoke abstraction for network
@@ -77,6 +82,32 @@ module Google
77
82
  service_module.const_get(:Client).new(&block)
78
83
  end
79
84
 
85
+ ##
86
+ # Determines whether the HubService service is supported by the current client.
87
+ # If true, you can retrieve a client object by calling {Google::Cloud::NetworkConnectivity.hub_service}.
88
+ # If false, that method will raise an exception. This could happen if the given
89
+ # API version does not exist or does not support the HubService service,
90
+ # or if the versioned client gem needs an update to support the HubService service.
91
+ #
92
+ # @param version [::String, ::Symbol] The API version to connect to. Optional.
93
+ # Defaults to `:v1`.
94
+ # @return [boolean] Whether the service is available.
95
+ #
96
+ def self.hub_service_available? version: :v1
97
+ require "google/cloud/network_connectivity/#{version.to_s.downcase}"
98
+ package_name = Google::Cloud::NetworkConnectivity
99
+ .constants
100
+ .select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") }
101
+ .first
102
+ return false unless package_name
103
+ service_module = Google::Cloud::NetworkConnectivity.const_get package_name
104
+ return false unless service_module.const_defined? :HubService
105
+ service_module = service_module.const_get :HubService
106
+ service_module.const_defined? :Client
107
+ rescue ::LoadError
108
+ false
109
+ end
110
+
80
111
  ##
81
112
  # Create a new client object for PolicyBasedRoutingService.
82
113
  #
@@ -88,6 +119,11 @@ module Google
88
119
  # supported by that API version, and the corresponding gem is available, the
89
120
  # appropriate versioned client will be returned.
90
121
  #
122
+ # Raises an exception if the currently installed versioned client gem for the
123
+ # given API version does not support the PolicyBasedRoutingService service.
124
+ # You can determine whether the method will succeed by calling
125
+ # {Google::Cloud::NetworkConnectivity.policy_based_routing_service_available?}.
126
+ #
91
127
  # ## About PolicyBasedRoutingService
92
128
  #
93
129
  # Policy-Based Routing allows GCP customers to specify flexibile routing
@@ -108,6 +144,32 @@ module Google
108
144
  service_module.const_get(:Client).new(&block)
109
145
  end
110
146
 
147
+ ##
148
+ # Determines whether the PolicyBasedRoutingService service is supported by the current client.
149
+ # If true, you can retrieve a client object by calling {Google::Cloud::NetworkConnectivity.policy_based_routing_service}.
150
+ # If false, that method will raise an exception. This could happen if the given
151
+ # API version does not exist or does not support the PolicyBasedRoutingService service,
152
+ # or if the versioned client gem needs an update to support the PolicyBasedRoutingService service.
153
+ #
154
+ # @param version [::String, ::Symbol] The API version to connect to. Optional.
155
+ # Defaults to `:v1`.
156
+ # @return [boolean] Whether the service is available.
157
+ #
158
+ def self.policy_based_routing_service_available? version: :v1
159
+ require "google/cloud/network_connectivity/#{version.to_s.downcase}"
160
+ package_name = Google::Cloud::NetworkConnectivity
161
+ .constants
162
+ .select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") }
163
+ .first
164
+ return false unless package_name
165
+ service_module = Google::Cloud::NetworkConnectivity.const_get package_name
166
+ return false unless service_module.const_defined? :PolicyBasedRoutingService
167
+ service_module = service_module.const_get :PolicyBasedRoutingService
168
+ service_module.const_defined? :Client
169
+ rescue ::LoadError
170
+ false
171
+ end
172
+
111
173
  ##
112
174
  # Configure the google-cloud-network_connectivity library.
113
175
  #
metadata CHANGED
@@ -1,14 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: google-cloud-network_connectivity
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.5.1
4
+ version: 2.0.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Google LLC
8
- autorequire:
9
8
  bindir: bin
10
9
  cert_chain: []
11
- date: 2024-08-09 00:00:00.000000000 Z
10
+ date: 2025-02-13 00:00:00.000000000 Z
12
11
  dependencies:
13
12
  - !ruby/object:Gem::Dependency
14
13
  name: google-cloud-core
@@ -28,42 +27,16 @@ dependencies:
28
27
  name: google-cloud-network_connectivity-v1
29
28
  requirement: !ruby/object:Gem::Requirement
30
29
  requirements:
31
- - - ">="
32
- - !ruby/object:Gem::Version
33
- version: '0.9'
34
- - - "<"
35
- - !ruby/object:Gem::Version
36
- version: 2.a
37
- type: :runtime
38
- prerelease: false
39
- version_requirements: !ruby/object:Gem::Requirement
40
- requirements:
41
- - - ">="
42
- - !ruby/object:Gem::Version
43
- version: '0.9'
44
- - - "<"
45
- - !ruby/object:Gem::Version
46
- version: 2.a
47
- - !ruby/object:Gem::Dependency
48
- name: google-cloud-network_connectivity-v1alpha1
49
- requirement: !ruby/object:Gem::Requirement
50
- requirements:
51
- - - ">="
52
- - !ruby/object:Gem::Version
53
- version: '0.8'
54
- - - "<"
30
+ - - "~>"
55
31
  - !ruby/object:Gem::Version
56
- version: 2.a
32
+ version: '1.3'
57
33
  type: :runtime
58
34
  prerelease: false
59
35
  version_requirements: !ruby/object:Gem::Requirement
60
36
  requirements:
61
- - - ">="
62
- - !ruby/object:Gem::Version
63
- version: '0.8'
64
- - - "<"
37
+ - - "~>"
65
38
  - !ruby/object:Gem::Version
66
- version: 2.a
39
+ version: '1.3'
67
40
  description: Network Connectivity is Google's suite of products that provide enterprise
68
41
  connectivity from your on-premises network or from another cloud provider to your
69
42
  Virtual Private Cloud (VPC) network.
@@ -83,7 +56,6 @@ homepage: https://github.com/googleapis/google-cloud-ruby
83
56
  licenses:
84
57
  - Apache-2.0
85
58
  metadata: {}
86
- post_install_message:
87
59
  rdoc_options: []
88
60
  require_paths:
89
61
  - lib
@@ -91,15 +63,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
91
63
  requirements:
92
64
  - - ">="
93
65
  - !ruby/object:Gem::Version
94
- version: '2.7'
66
+ version: '3.0'
95
67
  required_rubygems_version: !ruby/object:Gem::Requirement
96
68
  requirements:
97
69
  - - ">="
98
70
  - !ruby/object:Gem::Version
99
71
  version: '0'
100
72
  requirements: []
101
- rubygems_version: 3.5.6
102
- signing_key:
73
+ rubygems_version: 3.6.3
103
74
  specification_version: 4
104
75
  summary: API Client library for the Network Connectivity API
105
76
  test_files: []