google-cloud-network_connectivity 1.5.0 → 1.6.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +31 -26
- data/lib/google/cloud/network_connectivity/version.rb +1 -1
- data/lib/google/cloud/network_connectivity.rb +62 -0
- metadata +4 -7
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: e3470bccaef2fc5e0850be47e716264bf9bb22160e4c53bf08431cb455ce502c
|
4
|
+
data.tar.gz: 7f97895315bb794a2496df877729d14957aa51b282092ef093347a8efea2409f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 65676a39c3f49a284e034fd4cdff71103f2d500c5c751f1dd9146bb2bc88cec93c5723d9b412d78ec1ec0545b70a88c3b44468d3335adbe56a980eb479df3b66
|
7
|
+
data.tar.gz: 18129164b11c7c09f239e877798727231d0edf7baf60f1f3e40793ad0d0d5c2c5dfe1dfa1c93de3b934a45e5e3a1a685646a80103eab6332713ab5d8825e5429
|
data/README.md
CHANGED
@@ -35,35 +35,40 @@ In order to use this library, you first need to go through the following steps:
|
|
35
35
|
1. [Enable the API.](https://console.cloud.google.com/apis/library/networkconnectivity.googleapis.com)
|
36
36
|
1. {file:AUTHENTICATION.md Set up authentication.}
|
37
37
|
|
38
|
-
##
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
38
|
+
## Debug Logging
|
39
|
+
|
40
|
+
This library comes with opt-in Debug Logging that can help you troubleshoot
|
41
|
+
your application's integration with the API. When logging is activated, key
|
42
|
+
events such as requests and responses, along with data payloads and metadata
|
43
|
+
such as headers and client configuration, are logged to the standard error
|
44
|
+
stream.
|
45
|
+
|
46
|
+
**WARNING:** Client Library Debug Logging includes your data payloads in
|
47
|
+
plaintext, which could include sensitive data such as PII for yourself or your
|
48
|
+
customers, private keys, or other security data that could be compromising if
|
49
|
+
leaked. Always practice good data hygiene with your application logs, and follow
|
50
|
+
the principle of least access. Google also recommends that Client Library Debug
|
51
|
+
Logging be enabled only temporarily during active debugging, and not used
|
52
|
+
permanently in production.
|
53
|
+
|
54
|
+
To enable logging, set the environment variable `GOOGLE_SDK_RUBY_LOGGING_GEMS`
|
55
|
+
to the value `all`. Alternatively, you can set the value to a comma-delimited
|
56
|
+
list of client library gem names. This will select the default logging behavior,
|
57
|
+
which writes logs to the standard error stream. On a local workstation, this may
|
58
|
+
result in logs appearing on the console. When running on a Google Cloud hosting
|
59
|
+
service such as [Google Cloud Run](https://cloud.google.com/run), this generally
|
60
|
+
results in logs appearing alongside your application logs in the
|
61
|
+
[Google Cloud Logging](https://cloud.google.com/logging/) service.
|
62
|
+
|
63
|
+
Debug logging also requires that the versioned clients for this service be
|
64
|
+
sufficiently recent, released after about Dec 10, 2024. If logging is not
|
65
|
+
working, try updating the versioned clients in your bundle or installed gems:
|
66
|
+
[google-cloud-network_connectivity-v1](https://cloud.google.com/ruby/docs/reference/google-cloud-network_connectivity-v1/latest),
|
67
|
+
[google-cloud-network_connectivity-v1alpha1](https://cloud.google.com/ruby/docs/reference/google-cloud-network_connectivity-v1alpha1/latest).
|
63
68
|
|
64
69
|
## Supported Ruby Versions
|
65
70
|
|
66
|
-
This library is supported on Ruby
|
71
|
+
This library is supported on Ruby 3.0+.
|
67
72
|
|
68
73
|
Google provides official support for Ruby versions that are actively supported
|
69
74
|
by Ruby Core—that is, Ruby versions that are either in normal maintenance or
|
@@ -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.
|
4
|
+
version: 1.6.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Google LLC
|
8
|
-
autorequire:
|
9
8
|
bindir: bin
|
10
9
|
cert_chain: []
|
11
|
-
date:
|
10
|
+
date: 2025-01-29 00:00:00.000000000 Z
|
12
11
|
dependencies:
|
13
12
|
- !ruby/object:Gem::Dependency
|
14
13
|
name: google-cloud-core
|
@@ -83,7 +82,6 @@ homepage: https://github.com/googleapis/google-cloud-ruby
|
|
83
82
|
licenses:
|
84
83
|
- Apache-2.0
|
85
84
|
metadata: {}
|
86
|
-
post_install_message:
|
87
85
|
rdoc_options: []
|
88
86
|
require_paths:
|
89
87
|
- lib
|
@@ -91,15 +89,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
91
89
|
requirements:
|
92
90
|
- - ">="
|
93
91
|
- !ruby/object:Gem::Version
|
94
|
-
version: '
|
92
|
+
version: '3.0'
|
95
93
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
96
94
|
requirements:
|
97
95
|
- - ">="
|
98
96
|
- !ruby/object:Gem::Version
|
99
97
|
version: '0'
|
100
98
|
requirements: []
|
101
|
-
rubygems_version: 3.
|
102
|
-
signing_key:
|
99
|
+
rubygems_version: 3.6.2
|
103
100
|
specification_version: 4
|
104
101
|
summary: API Client library for the Network Connectivity API
|
105
102
|
test_files: []
|