google-cloud-network_connectivity 2.0.0 → 2.1.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:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 325c74ce85a210aa944c31a57e05391b2c89ef56c0fbfe7e0d34698d1fe5da90
|
4
|
+
data.tar.gz: 50374389ebfeaefde8f47033e55208353eebd98e6c508fc7d6659de138395ee4
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 2dce2ceda530e41f736e3f5182b1fde727bfe7e4d1981d3f256c37175e703412a4b0018f01c983c6fd6061bd8a20425301833711c6eb93c865e1bde902e391cd
|
7
|
+
data.tar.gz: e303247a7f586b37a8fdd6e64889d18e15d51e0e19aa3e0d88c126d4394c80cf91f0adede8aca93835c2aa8d069bb1668f9b8439e2b483844266dd028eb511f4
|
data/AUTHENTICATION.md
CHANGED
@@ -56,7 +56,7 @@ To configure a credentials file for an individual client initialization:
|
|
56
56
|
```ruby
|
57
57
|
require "google/cloud/network_connectivity"
|
58
58
|
|
59
|
-
client = Google::Cloud::NetworkConnectivity.
|
59
|
+
client = Google::Cloud::NetworkConnectivity.cross_network_automation_service do |config|
|
60
60
|
config.credentials = "path/to/credentialfile.json"
|
61
61
|
end
|
62
62
|
```
|
@@ -70,7 +70,7 @@ Google::Cloud::NetworkConnectivity.configure do |config|
|
|
70
70
|
config.credentials = "path/to/credentialfile.json"
|
71
71
|
end
|
72
72
|
|
73
|
-
client = Google::Cloud::NetworkConnectivity.
|
73
|
+
client = Google::Cloud::NetworkConnectivity.cross_network_automation_service
|
74
74
|
```
|
75
75
|
|
76
76
|
### Environment Variables
|
@@ -100,7 +100,7 @@ require "google/cloud/network_connectivity"
|
|
100
100
|
|
101
101
|
ENV["GOOGLE_APPLICATION_CREDENTIALS"] = "path/to/credentialfile.json"
|
102
102
|
|
103
|
-
client = Google::Cloud::NetworkConnectivity.
|
103
|
+
client = Google::Cloud::NetworkConnectivity.cross_network_automation_service
|
104
104
|
```
|
105
105
|
|
106
106
|
### Local ADC file
|
@@ -45,6 +45,67 @@ end
|
|
45
45
|
module Google
|
46
46
|
module Cloud
|
47
47
|
module NetworkConnectivity
|
48
|
+
##
|
49
|
+
# Create a new client object for CrossNetworkAutomationService.
|
50
|
+
#
|
51
|
+
# By default, this returns an instance of
|
52
|
+
# [Google::Cloud::NetworkConnectivity::V1::CrossNetworkAutomationService::Client](https://cloud.google.com/ruby/docs/reference/google-cloud-network_connectivity-v1/latest/Google-Cloud-NetworkConnectivity-V1-CrossNetworkAutomationService-Client)
|
53
|
+
# for a gRPC client for version V1 of the API.
|
54
|
+
# However, you can specify a different API version by passing it in the
|
55
|
+
# `version` parameter. If the CrossNetworkAutomationService service is
|
56
|
+
# supported by that API version, and the corresponding gem is available, the
|
57
|
+
# appropriate versioned client will be returned.
|
58
|
+
#
|
59
|
+
# Raises an exception if the currently installed versioned client gem for the
|
60
|
+
# given API version does not support the CrossNetworkAutomationService service.
|
61
|
+
# You can determine whether the method will succeed by calling
|
62
|
+
# {Google::Cloud::NetworkConnectivity.cross_network_automation_service_available?}.
|
63
|
+
#
|
64
|
+
# ## About CrossNetworkAutomationService
|
65
|
+
#
|
66
|
+
# The service for CrossNetworkAutomation resources.
|
67
|
+
#
|
68
|
+
# @param version [::String, ::Symbol] The API version to connect to. Optional.
|
69
|
+
# Defaults to `:v1`.
|
70
|
+
# @return [::Object] A client object for the specified version.
|
71
|
+
#
|
72
|
+
def self.cross_network_automation_service version: :v1, &block
|
73
|
+
require "google/cloud/network_connectivity/#{version.to_s.downcase}"
|
74
|
+
|
75
|
+
package_name = Google::Cloud::NetworkConnectivity
|
76
|
+
.constants
|
77
|
+
.select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") }
|
78
|
+
.first
|
79
|
+
service_module = Google::Cloud::NetworkConnectivity.const_get(package_name).const_get(:CrossNetworkAutomationService)
|
80
|
+
service_module.const_get(:Client).new(&block)
|
81
|
+
end
|
82
|
+
|
83
|
+
##
|
84
|
+
# Determines whether the CrossNetworkAutomationService service is supported by the current client.
|
85
|
+
# If true, you can retrieve a client object by calling {Google::Cloud::NetworkConnectivity.cross_network_automation_service}.
|
86
|
+
# If false, that method will raise an exception. This could happen if the given
|
87
|
+
# API version does not exist or does not support the CrossNetworkAutomationService service,
|
88
|
+
# or if the versioned client gem needs an update to support the CrossNetworkAutomationService service.
|
89
|
+
#
|
90
|
+
# @param version [::String, ::Symbol] The API version to connect to. Optional.
|
91
|
+
# Defaults to `:v1`.
|
92
|
+
# @return [boolean] Whether the service is available.
|
93
|
+
#
|
94
|
+
def self.cross_network_automation_service_available? version: :v1
|
95
|
+
require "google/cloud/network_connectivity/#{version.to_s.downcase}"
|
96
|
+
package_name = Google::Cloud::NetworkConnectivity
|
97
|
+
.constants
|
98
|
+
.select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") }
|
99
|
+
.first
|
100
|
+
return false unless package_name
|
101
|
+
service_module = Google::Cloud::NetworkConnectivity.const_get package_name
|
102
|
+
return false unless service_module.const_defined? :CrossNetworkAutomationService
|
103
|
+
service_module = service_module.const_get :CrossNetworkAutomationService
|
104
|
+
service_module.const_defined? :Client
|
105
|
+
rescue ::LoadError
|
106
|
+
false
|
107
|
+
end
|
108
|
+
|
48
109
|
##
|
49
110
|
# Create a new client object for HubService.
|
50
111
|
#
|
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: google-cloud-network_connectivity
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.
|
4
|
+
version: 2.1.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Google LLC
|
8
8
|
bindir: bin
|
9
9
|
cert_chain: []
|
10
|
-
date: 2025-
|
10
|
+
date: 2025-03-25 00:00:00.000000000 Z
|
11
11
|
dependencies:
|
12
12
|
- !ruby/object:Gem::Dependency
|
13
13
|
name: google-cloud-core
|
@@ -70,7 +70,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
70
70
|
- !ruby/object:Gem::Version
|
71
71
|
version: '0'
|
72
72
|
requirements: []
|
73
|
-
rubygems_version: 3.6.
|
73
|
+
rubygems_version: 3.6.5
|
74
74
|
specification_version: 4
|
75
75
|
summary: API Client library for the Network Connectivity API
|
76
76
|
test_files: []
|