azure_mgmt_peering 0.17.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/LICENSE.txt +21 -0
- data/lib/2019-08-01-preview/generated/azure_mgmt_peering.rb +85 -0
- data/lib/2019-08-01-preview/generated/azure_mgmt_peering/legacy_peerings.rb +242 -0
- data/lib/2019-08-01-preview/generated/azure_mgmt_peering/models/bgp_session.rb +170 -0
- data/lib/2019-08-01-preview/generated/azure_mgmt_peering/models/check_service_provider_availability_input.rb +57 -0
- data/lib/2019-08-01-preview/generated/azure_mgmt_peering/models/connection_state.rb +22 -0
- data/lib/2019-08-01-preview/generated/azure_mgmt_peering/models/contact_info.rb +73 -0
- data/lib/2019-08-01-preview/generated/azure_mgmt_peering/models/direct_connection.rb +131 -0
- data/lib/2019-08-01-preview/generated/azure_mgmt_peering/models/direct_peering_facility.rb +80 -0
- data/lib/2019-08-01-preview/generated/azure_mgmt_peering/models/direct_peering_type.rb +18 -0
- data/lib/2019-08-01-preview/generated/azure_mgmt_peering/models/error_response.rb +59 -0
- data/lib/2019-08-01-preview/generated/azure_mgmt_peering/models/exchange_connection.rb +84 -0
- data/lib/2019-08-01-preview/generated/azure_mgmt_peering/models/exchange_peering_facility.rb +128 -0
- data/lib/2019-08-01-preview/generated/azure_mgmt_peering/models/family.rb +16 -0
- data/lib/2019-08-01-preview/generated/azure_mgmt_peering/models/kind.rb +16 -0
- data/lib/2019-08-01-preview/generated/azure_mgmt_peering/models/learned_type.rb +17 -0
- data/lib/2019-08-01-preview/generated/azure_mgmt_peering/models/name.rb +20 -0
- data/lib/2019-08-01-preview/generated/azure_mgmt_peering/models/operation.rb +74 -0
- data/lib/2019-08-01-preview/generated/azure_mgmt_peering/models/operation_display_info.rb +83 -0
- data/lib/2019-08-01-preview/generated/azure_mgmt_peering/models/operation_list_result.rb +99 -0
- data/lib/2019-08-01-preview/generated/azure_mgmt_peering/models/peer_asn.rb +109 -0
- data/lib/2019-08-01-preview/generated/azure_mgmt_peering/models/peer_asn_list_result.rb +98 -0
- data/lib/2019-08-01-preview/generated/azure_mgmt_peering/models/peering.rb +168 -0
- data/lib/2019-08-01-preview/generated/azure_mgmt_peering/models/peering_bandwidth_offer.rb +57 -0
- data/lib/2019-08-01-preview/generated/azure_mgmt_peering/models/peering_list_result.rb +98 -0
- data/lib/2019-08-01-preview/generated/azure_mgmt_peering/models/peering_location.rb +134 -0
- data/lib/2019-08-01-preview/generated/azure_mgmt_peering/models/peering_location_list_result.rb +98 -0
- data/lib/2019-08-01-preview/generated/azure_mgmt_peering/models/peering_location_properties_direct.rb +77 -0
- data/lib/2019-08-01-preview/generated/azure_mgmt_peering/models/peering_location_properties_exchange.rb +56 -0
- data/lib/2019-08-01-preview/generated/azure_mgmt_peering/models/peering_properties_direct.rb +92 -0
- data/lib/2019-08-01-preview/generated/azure_mgmt_peering/models/peering_properties_exchange.rb +68 -0
- data/lib/2019-08-01-preview/generated/azure_mgmt_peering/models/peering_service.rb +127 -0
- data/lib/2019-08-01-preview/generated/azure_mgmt_peering/models/peering_service_list_result.rb +98 -0
- data/lib/2019-08-01-preview/generated/azure_mgmt_peering/models/peering_service_location.rb +95 -0
- data/lib/2019-08-01-preview/generated/azure_mgmt_peering/models/peering_service_location_list_result.rb +100 -0
- data/lib/2019-08-01-preview/generated/azure_mgmt_peering/models/peering_service_prefix.rb +111 -0
- data/lib/2019-08-01-preview/generated/azure_mgmt_peering/models/peering_service_prefix_list_result.rb +98 -0
- data/lib/2019-08-01-preview/generated/azure_mgmt_peering/models/peering_service_provider.rb +73 -0
- data/lib/2019-08-01-preview/generated/azure_mgmt_peering/models/peering_service_provider_list_result.rb +100 -0
- data/lib/2019-08-01-preview/generated/azure_mgmt_peering/models/peering_sku.rb +85 -0
- data/lib/2019-08-01-preview/generated/azure_mgmt_peering/models/prefix_validation_state.rb +20 -0
- data/lib/2019-08-01-preview/generated/azure_mgmt_peering/models/provisioning_state.rb +18 -0
- data/lib/2019-08-01-preview/generated/azure_mgmt_peering/models/resource.rb +80 -0
- data/lib/2019-08-01-preview/generated/azure_mgmt_peering/models/resource_tags.rb +55 -0
- data/lib/2019-08-01-preview/generated/azure_mgmt_peering/models/session_address_provider.rb +16 -0
- data/lib/2019-08-01-preview/generated/azure_mgmt_peering/models/session_state_v4.rb +25 -0
- data/lib/2019-08-01-preview/generated/azure_mgmt_peering/models/session_state_v6.rb +25 -0
- data/lib/2019-08-01-preview/generated/azure_mgmt_peering/models/size.rb +17 -0
- data/lib/2019-08-01-preview/generated/azure_mgmt_peering/models/sub_resource.rb +46 -0
- data/lib/2019-08-01-preview/generated/azure_mgmt_peering/models/tier.rb +16 -0
- data/lib/2019-08-01-preview/generated/azure_mgmt_peering/models/validation_state.rb +18 -0
- data/lib/2019-08-01-preview/generated/azure_mgmt_peering/module_definition.rb +9 -0
- data/lib/2019-08-01-preview/generated/azure_mgmt_peering/operations.rb +219 -0
- data/lib/2019-08-01-preview/generated/azure_mgmt_peering/peer_asns.rb +507 -0
- data/lib/2019-08-01-preview/generated/azure_mgmt_peering/peering_client.rb +283 -0
- data/lib/2019-08-01-preview/generated/azure_mgmt_peering/peering_locations.rb +245 -0
- data/lib/2019-08-01-preview/generated/azure_mgmt_peering/peering_service_locations.rb +228 -0
- data/lib/2019-08-01-preview/generated/azure_mgmt_peering/peering_service_prefixes.rb +332 -0
- data/lib/2019-08-01-preview/generated/azure_mgmt_peering/peering_service_providers.rb +228 -0
- data/lib/2019-08-01-preview/generated/azure_mgmt_peering/peering_services.rb +841 -0
- data/lib/2019-08-01-preview/generated/azure_mgmt_peering/peerings.rb +831 -0
- data/lib/2019-08-01-preview/generated/azure_mgmt_peering/prefixes.rb +231 -0
- data/lib/azure_mgmt_peering.rb +6 -0
- data/lib/module_definition.rb +7 -0
- data/lib/profiles/latest/modules/peering_profile_module.rb +271 -0
- data/lib/profiles/latest/peering_latest_profile_client.rb +40 -0
- data/lib/profiles/latest/peering_module_definition.rb +8 -0
- data/lib/version.rb +7 -0
- metadata +185 -0
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: 30af267e632bba9b0be1e7b147f8e0582068929930ac5baee3e51d9cbc682473
|
4
|
+
data.tar.gz: a268b65e0d22f8ee72c7e723d1b1e6e7b27e043d0acc752b37227e1e58bd9ecd
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: 25d90d7159b38be09225413f99f451ebed9aa4d91da222d61d68ec37f87ba2e0d563cd23283def5616883a26c76ce28060f2d812bbcf2a05a450acd5537a9f10
|
7
|
+
data.tar.gz: 750290235b3093cbd22d5246e77c8a39939f9cf0b55daadc2568b50be91ae4dcc6ce3fe7af9499ac658e4c1179e6b4c41e0c86241146a1b6cfeb6f3abb73d4ea
|
data/LICENSE.txt
ADDED
@@ -0,0 +1,21 @@
|
|
1
|
+
The MIT License (MIT)
|
2
|
+
|
3
|
+
Copyright (c) 2015 Microsoft Corporation
|
4
|
+
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
7
|
+
in the Software without restriction, including without limitation the rights
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
10
|
+
furnished to do so, subject to the following conditions:
|
11
|
+
|
12
|
+
The above copyright notice and this permission notice shall be included in
|
13
|
+
all copies or substantial portions of the Software.
|
14
|
+
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
21
|
+
THE SOFTWARE.
|
@@ -0,0 +1,85 @@
|
|
1
|
+
# encoding: utf-8
|
2
|
+
# Code generated by Microsoft (R) AutoRest Code Generator.
|
3
|
+
# Changes may cause incorrect behavior and will be lost if the code is
|
4
|
+
# regenerated.
|
5
|
+
|
6
|
+
require 'uri'
|
7
|
+
require 'cgi'
|
8
|
+
require 'date'
|
9
|
+
require 'json'
|
10
|
+
require 'base64'
|
11
|
+
require 'erb'
|
12
|
+
require 'securerandom'
|
13
|
+
require 'time'
|
14
|
+
require 'timeliness'
|
15
|
+
require 'faraday'
|
16
|
+
require 'faraday-cookie_jar'
|
17
|
+
require 'concurrent'
|
18
|
+
require 'ms_rest'
|
19
|
+
require '2019-08-01-preview/generated/azure_mgmt_peering/module_definition'
|
20
|
+
require 'ms_rest_azure'
|
21
|
+
|
22
|
+
module Azure::Peering::Mgmt::V2019_08_01_preview
|
23
|
+
autoload :LegacyPeerings, '2019-08-01-preview/generated/azure_mgmt_peering/legacy_peerings.rb'
|
24
|
+
autoload :Operations, '2019-08-01-preview/generated/azure_mgmt_peering/operations.rb'
|
25
|
+
autoload :PeerAsns, '2019-08-01-preview/generated/azure_mgmt_peering/peer_asns.rb'
|
26
|
+
autoload :PeeringLocations, '2019-08-01-preview/generated/azure_mgmt_peering/peering_locations.rb'
|
27
|
+
autoload :Peerings, '2019-08-01-preview/generated/azure_mgmt_peering/peerings.rb'
|
28
|
+
autoload :PeeringServiceLocations, '2019-08-01-preview/generated/azure_mgmt_peering/peering_service_locations.rb'
|
29
|
+
autoload :PeeringServicePrefixes, '2019-08-01-preview/generated/azure_mgmt_peering/peering_service_prefixes.rb'
|
30
|
+
autoload :Prefixes, '2019-08-01-preview/generated/azure_mgmt_peering/prefixes.rb'
|
31
|
+
autoload :PeeringServiceProviders, '2019-08-01-preview/generated/azure_mgmt_peering/peering_service_providers.rb'
|
32
|
+
autoload :PeeringServices, '2019-08-01-preview/generated/azure_mgmt_peering/peering_services.rb'
|
33
|
+
autoload :PeeringClient, '2019-08-01-preview/generated/azure_mgmt_peering/peering_client.rb'
|
34
|
+
|
35
|
+
module Models
|
36
|
+
autoload :PeeringBandwidthOffer, '2019-08-01-preview/generated/azure_mgmt_peering/models/peering_bandwidth_offer.rb'
|
37
|
+
autoload :CheckServiceProviderAvailabilityInput, '2019-08-01-preview/generated/azure_mgmt_peering/models/check_service_provider_availability_input.rb'
|
38
|
+
autoload :PeeringLocationPropertiesDirect, '2019-08-01-preview/generated/azure_mgmt_peering/models/peering_location_properties_direct.rb'
|
39
|
+
autoload :BgpSession, '2019-08-01-preview/generated/azure_mgmt_peering/models/bgp_session.rb'
|
40
|
+
autoload :ExchangePeeringFacility, '2019-08-01-preview/generated/azure_mgmt_peering/models/exchange_peering_facility.rb'
|
41
|
+
autoload :SubResource, '2019-08-01-preview/generated/azure_mgmt_peering/models/sub_resource.rb'
|
42
|
+
autoload :PeeringLocationPropertiesExchange, '2019-08-01-preview/generated/azure_mgmt_peering/models/peering_location_properties_exchange.rb'
|
43
|
+
autoload :ExchangeConnection, '2019-08-01-preview/generated/azure_mgmt_peering/models/exchange_connection.rb'
|
44
|
+
autoload :DirectConnection, '2019-08-01-preview/generated/azure_mgmt_peering/models/direct_connection.rb'
|
45
|
+
autoload :PeeringPropertiesDirect, '2019-08-01-preview/generated/azure_mgmt_peering/models/peering_properties_direct.rb'
|
46
|
+
autoload :PeeringListResult, '2019-08-01-preview/generated/azure_mgmt_peering/models/peering_list_result.rb'
|
47
|
+
autoload :PeeringPropertiesExchange, '2019-08-01-preview/generated/azure_mgmt_peering/models/peering_properties_exchange.rb'
|
48
|
+
autoload :Operation, '2019-08-01-preview/generated/azure_mgmt_peering/models/operation.rb'
|
49
|
+
autoload :ContactInfo, '2019-08-01-preview/generated/azure_mgmt_peering/models/contact_info.rb'
|
50
|
+
autoload :PeeringLocationListResult, '2019-08-01-preview/generated/azure_mgmt_peering/models/peering_location_list_result.rb'
|
51
|
+
autoload :PeerAsnListResult, '2019-08-01-preview/generated/azure_mgmt_peering/models/peer_asn_list_result.rb'
|
52
|
+
autoload :ResourceTags, '2019-08-01-preview/generated/azure_mgmt_peering/models/resource_tags.rb'
|
53
|
+
autoload :PeeringSku, '2019-08-01-preview/generated/azure_mgmt_peering/models/peering_sku.rb'
|
54
|
+
autoload :Resource, '2019-08-01-preview/generated/azure_mgmt_peering/models/resource.rb'
|
55
|
+
autoload :OperationDisplayInfo, '2019-08-01-preview/generated/azure_mgmt_peering/models/operation_display_info.rb'
|
56
|
+
autoload :PeeringServiceLocationListResult, '2019-08-01-preview/generated/azure_mgmt_peering/models/peering_service_location_list_result.rb'
|
57
|
+
autoload :PeeringServiceProviderListResult, '2019-08-01-preview/generated/azure_mgmt_peering/models/peering_service_provider_list_result.rb'
|
58
|
+
autoload :DirectPeeringFacility, '2019-08-01-preview/generated/azure_mgmt_peering/models/direct_peering_facility.rb'
|
59
|
+
autoload :ErrorResponse, '2019-08-01-preview/generated/azure_mgmt_peering/models/error_response.rb'
|
60
|
+
autoload :OperationListResult, '2019-08-01-preview/generated/azure_mgmt_peering/models/operation_list_result.rb'
|
61
|
+
autoload :PeeringServicePrefixListResult, '2019-08-01-preview/generated/azure_mgmt_peering/models/peering_service_prefix_list_result.rb'
|
62
|
+
autoload :PeeringServiceListResult, '2019-08-01-preview/generated/azure_mgmt_peering/models/peering_service_list_result.rb'
|
63
|
+
autoload :Peering, '2019-08-01-preview/generated/azure_mgmt_peering/models/peering.rb'
|
64
|
+
autoload :PeerAsn, '2019-08-01-preview/generated/azure_mgmt_peering/models/peer_asn.rb'
|
65
|
+
autoload :PeeringLocation, '2019-08-01-preview/generated/azure_mgmt_peering/models/peering_location.rb'
|
66
|
+
autoload :PeeringServiceLocation, '2019-08-01-preview/generated/azure_mgmt_peering/models/peering_service_location.rb'
|
67
|
+
autoload :PeeringServicePrefix, '2019-08-01-preview/generated/azure_mgmt_peering/models/peering_service_prefix.rb'
|
68
|
+
autoload :PeeringServiceProvider, '2019-08-01-preview/generated/azure_mgmt_peering/models/peering_service_provider.rb'
|
69
|
+
autoload :PeeringService, '2019-08-01-preview/generated/azure_mgmt_peering/models/peering_service.rb'
|
70
|
+
autoload :Name, '2019-08-01-preview/generated/azure_mgmt_peering/models/name.rb'
|
71
|
+
autoload :Tier, '2019-08-01-preview/generated/azure_mgmt_peering/models/tier.rb'
|
72
|
+
autoload :Family, '2019-08-01-preview/generated/azure_mgmt_peering/models/family.rb'
|
73
|
+
autoload :Size, '2019-08-01-preview/generated/azure_mgmt_peering/models/size.rb'
|
74
|
+
autoload :Kind, '2019-08-01-preview/generated/azure_mgmt_peering/models/kind.rb'
|
75
|
+
autoload :SessionAddressProvider, '2019-08-01-preview/generated/azure_mgmt_peering/models/session_address_provider.rb'
|
76
|
+
autoload :ConnectionState, '2019-08-01-preview/generated/azure_mgmt_peering/models/connection_state.rb'
|
77
|
+
autoload :SessionStateV4, '2019-08-01-preview/generated/azure_mgmt_peering/models/session_state_v4.rb'
|
78
|
+
autoload :SessionStateV6, '2019-08-01-preview/generated/azure_mgmt_peering/models/session_state_v6.rb'
|
79
|
+
autoload :DirectPeeringType, '2019-08-01-preview/generated/azure_mgmt_peering/models/direct_peering_type.rb'
|
80
|
+
autoload :ProvisioningState, '2019-08-01-preview/generated/azure_mgmt_peering/models/provisioning_state.rb'
|
81
|
+
autoload :ValidationState, '2019-08-01-preview/generated/azure_mgmt_peering/models/validation_state.rb'
|
82
|
+
autoload :PrefixValidationState, '2019-08-01-preview/generated/azure_mgmt_peering/models/prefix_validation_state.rb'
|
83
|
+
autoload :LearnedType, '2019-08-01-preview/generated/azure_mgmt_peering/models/learned_type.rb'
|
84
|
+
end
|
85
|
+
end
|
@@ -0,0 +1,242 @@
|
|
1
|
+
# encoding: utf-8
|
2
|
+
# Code generated by Microsoft (R) AutoRest Code Generator.
|
3
|
+
# Changes may cause incorrect behavior and will be lost if the code is
|
4
|
+
# regenerated.
|
5
|
+
|
6
|
+
module Azure::Peering::Mgmt::V2019_08_01_preview
|
7
|
+
#
|
8
|
+
# Peering Client
|
9
|
+
#
|
10
|
+
class LegacyPeerings
|
11
|
+
include MsRestAzure
|
12
|
+
|
13
|
+
#
|
14
|
+
# Creates and initializes a new instance of the LegacyPeerings class.
|
15
|
+
# @param client service class for accessing basic functionality.
|
16
|
+
#
|
17
|
+
def initialize(client)
|
18
|
+
@client = client
|
19
|
+
end
|
20
|
+
|
21
|
+
# @return [PeeringClient] reference to the PeeringClient
|
22
|
+
attr_reader :client
|
23
|
+
|
24
|
+
#
|
25
|
+
# Lists all of the legacy peerings under the given subscription matching the
|
26
|
+
# specified kind and location.
|
27
|
+
#
|
28
|
+
# @param peering_location [String] The location of the peering.
|
29
|
+
# @param kind [Enum] The kind of the peering. Possible values include:
|
30
|
+
# 'Direct', 'Exchange'
|
31
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
32
|
+
# will be added to the HTTP request.
|
33
|
+
#
|
34
|
+
# @return [Array<Peering>] operation results.
|
35
|
+
#
|
36
|
+
def list(peering_location, kind, custom_headers:nil)
|
37
|
+
first_page = list_as_lazy(peering_location, kind, custom_headers:custom_headers)
|
38
|
+
first_page.get_all_items
|
39
|
+
end
|
40
|
+
|
41
|
+
#
|
42
|
+
# Lists all of the legacy peerings under the given subscription matching the
|
43
|
+
# specified kind and location.
|
44
|
+
#
|
45
|
+
# @param peering_location [String] The location of the peering.
|
46
|
+
# @param kind [Enum] The kind of the peering. Possible values include:
|
47
|
+
# 'Direct', 'Exchange'
|
48
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
49
|
+
# will be added to the HTTP request.
|
50
|
+
#
|
51
|
+
# @return [MsRestAzure::AzureOperationResponse] HTTP response information.
|
52
|
+
#
|
53
|
+
def list_with_http_info(peering_location, kind, custom_headers:nil)
|
54
|
+
list_async(peering_location, kind, custom_headers:custom_headers).value!
|
55
|
+
end
|
56
|
+
|
57
|
+
#
|
58
|
+
# Lists all of the legacy peerings under the given subscription matching the
|
59
|
+
# specified kind and location.
|
60
|
+
#
|
61
|
+
# @param peering_location [String] The location of the peering.
|
62
|
+
# @param kind [Enum] The kind of the peering. Possible values include:
|
63
|
+
# 'Direct', 'Exchange'
|
64
|
+
# @param [Hash{String => String}] A hash of custom headers that will be added
|
65
|
+
# to the HTTP request.
|
66
|
+
#
|
67
|
+
# @return [Concurrent::Promise] Promise object which holds the HTTP response.
|
68
|
+
#
|
69
|
+
def list_async(peering_location, kind, custom_headers:nil)
|
70
|
+
fail ArgumentError, 'peering_location is nil' if peering_location.nil?
|
71
|
+
fail ArgumentError, 'kind is nil' if kind.nil?
|
72
|
+
fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
|
73
|
+
fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
|
74
|
+
|
75
|
+
|
76
|
+
request_headers = {}
|
77
|
+
request_headers['Content-Type'] = 'application/json; charset=utf-8'
|
78
|
+
|
79
|
+
# Set Headers
|
80
|
+
request_headers['x-ms-client-request-id'] = SecureRandom.uuid
|
81
|
+
request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
|
82
|
+
path_template = 'subscriptions/{subscriptionId}/providers/Microsoft.Peering/legacyPeerings'
|
83
|
+
|
84
|
+
request_url = @base_url || @client.base_url
|
85
|
+
|
86
|
+
options = {
|
87
|
+
middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
|
88
|
+
path_params: {'subscriptionId' => @client.subscription_id},
|
89
|
+
query_params: {'peeringLocation' => peering_location,'kind' => kind,'api-version' => @client.api_version},
|
90
|
+
headers: request_headers.merge(custom_headers || {}),
|
91
|
+
base_url: request_url
|
92
|
+
}
|
93
|
+
promise = @client.make_request_async(:get, path_template, options)
|
94
|
+
|
95
|
+
promise = promise.then do |result|
|
96
|
+
http_response = result.response
|
97
|
+
status_code = http_response.status
|
98
|
+
response_content = http_response.body
|
99
|
+
unless status_code == 200
|
100
|
+
error_model = JSON.load(response_content)
|
101
|
+
fail MsRest::HttpOperationError.new(result.request, http_response, error_model)
|
102
|
+
end
|
103
|
+
|
104
|
+
result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
|
105
|
+
result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
|
106
|
+
result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
|
107
|
+
# Deserialize Response
|
108
|
+
if status_code == 200
|
109
|
+
begin
|
110
|
+
parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
|
111
|
+
result_mapper = Azure::Peering::Mgmt::V2019_08_01_preview::Models::PeeringListResult.mapper()
|
112
|
+
result.body = @client.deserialize(result_mapper, parsed_response)
|
113
|
+
rescue Exception => e
|
114
|
+
fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
|
115
|
+
end
|
116
|
+
end
|
117
|
+
|
118
|
+
result
|
119
|
+
end
|
120
|
+
|
121
|
+
promise.execute
|
122
|
+
end
|
123
|
+
|
124
|
+
#
|
125
|
+
# Lists all of the legacy peerings under the given subscription matching the
|
126
|
+
# specified kind and location.
|
127
|
+
#
|
128
|
+
# @param next_page_link [String] The NextLink from the previous successful call
|
129
|
+
# to List operation.
|
130
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
131
|
+
# will be added to the HTTP request.
|
132
|
+
#
|
133
|
+
# @return [PeeringListResult] operation results.
|
134
|
+
#
|
135
|
+
def list_next(next_page_link, custom_headers:nil)
|
136
|
+
response = list_next_async(next_page_link, custom_headers:custom_headers).value!
|
137
|
+
response.body unless response.nil?
|
138
|
+
end
|
139
|
+
|
140
|
+
#
|
141
|
+
# Lists all of the legacy peerings under the given subscription matching the
|
142
|
+
# specified kind and location.
|
143
|
+
#
|
144
|
+
# @param next_page_link [String] The NextLink from the previous successful call
|
145
|
+
# to List operation.
|
146
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
147
|
+
# will be added to the HTTP request.
|
148
|
+
#
|
149
|
+
# @return [MsRestAzure::AzureOperationResponse] HTTP response information.
|
150
|
+
#
|
151
|
+
def list_next_with_http_info(next_page_link, custom_headers:nil)
|
152
|
+
list_next_async(next_page_link, custom_headers:custom_headers).value!
|
153
|
+
end
|
154
|
+
|
155
|
+
#
|
156
|
+
# Lists all of the legacy peerings under the given subscription matching the
|
157
|
+
# specified kind and location.
|
158
|
+
#
|
159
|
+
# @param next_page_link [String] The NextLink from the previous successful call
|
160
|
+
# to List operation.
|
161
|
+
# @param [Hash{String => String}] A hash of custom headers that will be added
|
162
|
+
# to the HTTP request.
|
163
|
+
#
|
164
|
+
# @return [Concurrent::Promise] Promise object which holds the HTTP response.
|
165
|
+
#
|
166
|
+
def list_next_async(next_page_link, custom_headers:nil)
|
167
|
+
fail ArgumentError, 'next_page_link is nil' if next_page_link.nil?
|
168
|
+
|
169
|
+
|
170
|
+
request_headers = {}
|
171
|
+
request_headers['Content-Type'] = 'application/json; charset=utf-8'
|
172
|
+
|
173
|
+
# Set Headers
|
174
|
+
request_headers['x-ms-client-request-id'] = SecureRandom.uuid
|
175
|
+
request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
|
176
|
+
path_template = '{nextLink}'
|
177
|
+
|
178
|
+
request_url = @base_url || @client.base_url
|
179
|
+
|
180
|
+
options = {
|
181
|
+
middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
|
182
|
+
skip_encoding_path_params: {'nextLink' => next_page_link},
|
183
|
+
headers: request_headers.merge(custom_headers || {}),
|
184
|
+
base_url: request_url
|
185
|
+
}
|
186
|
+
promise = @client.make_request_async(:get, path_template, options)
|
187
|
+
|
188
|
+
promise = promise.then do |result|
|
189
|
+
http_response = result.response
|
190
|
+
status_code = http_response.status
|
191
|
+
response_content = http_response.body
|
192
|
+
unless status_code == 200
|
193
|
+
error_model = JSON.load(response_content)
|
194
|
+
fail MsRest::HttpOperationError.new(result.request, http_response, error_model)
|
195
|
+
end
|
196
|
+
|
197
|
+
result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
|
198
|
+
result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
|
199
|
+
result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
|
200
|
+
# Deserialize Response
|
201
|
+
if status_code == 200
|
202
|
+
begin
|
203
|
+
parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
|
204
|
+
result_mapper = Azure::Peering::Mgmt::V2019_08_01_preview::Models::PeeringListResult.mapper()
|
205
|
+
result.body = @client.deserialize(result_mapper, parsed_response)
|
206
|
+
rescue Exception => e
|
207
|
+
fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
|
208
|
+
end
|
209
|
+
end
|
210
|
+
|
211
|
+
result
|
212
|
+
end
|
213
|
+
|
214
|
+
promise.execute
|
215
|
+
end
|
216
|
+
|
217
|
+
#
|
218
|
+
# Lists all of the legacy peerings under the given subscription matching the
|
219
|
+
# specified kind and location.
|
220
|
+
#
|
221
|
+
# @param peering_location [String] The location of the peering.
|
222
|
+
# @param kind [Enum] The kind of the peering. Possible values include:
|
223
|
+
# 'Direct', 'Exchange'
|
224
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
225
|
+
# will be added to the HTTP request.
|
226
|
+
#
|
227
|
+
# @return [PeeringListResult] which provide lazy access to pages of the
|
228
|
+
# response.
|
229
|
+
#
|
230
|
+
def list_as_lazy(peering_location, kind, custom_headers:nil)
|
231
|
+
response = list_async(peering_location, kind, custom_headers:custom_headers).value!
|
232
|
+
unless response.nil?
|
233
|
+
page = response.body
|
234
|
+
page.next_method = Proc.new do |next_page_link|
|
235
|
+
list_next_async(next_page_link, custom_headers:custom_headers)
|
236
|
+
end
|
237
|
+
page
|
238
|
+
end
|
239
|
+
end
|
240
|
+
|
241
|
+
end
|
242
|
+
end
|
@@ -0,0 +1,170 @@
|
|
1
|
+
# encoding: utf-8
|
2
|
+
# Code generated by Microsoft (R) AutoRest Code Generator.
|
3
|
+
# Changes may cause incorrect behavior and will be lost if the code is
|
4
|
+
# regenerated.
|
5
|
+
|
6
|
+
module Azure::Peering::Mgmt::V2019_08_01_preview
|
7
|
+
module Models
|
8
|
+
#
|
9
|
+
# The properties that define a BGP session.
|
10
|
+
#
|
11
|
+
class BgpSession
|
12
|
+
|
13
|
+
include MsRestAzure
|
14
|
+
|
15
|
+
# @return [String] The IPv4 prefix that contains both ends' IPv4
|
16
|
+
# addresses.
|
17
|
+
attr_accessor :session_prefix_v4
|
18
|
+
|
19
|
+
# @return [String] The IPv6 prefix that contains both ends' IPv6
|
20
|
+
# addresses.
|
21
|
+
attr_accessor :session_prefix_v6
|
22
|
+
|
23
|
+
# @return [String] The IPv4 session address on Microsoft's end.
|
24
|
+
attr_accessor :microsoft_session_ipv4address
|
25
|
+
|
26
|
+
# @return [String] The IPv6 session address on Microsoft's end.
|
27
|
+
attr_accessor :microsoft_session_ipv6address
|
28
|
+
|
29
|
+
# @return [String] The IPv4 session address on peer's end.
|
30
|
+
attr_accessor :peer_session_ipv4address
|
31
|
+
|
32
|
+
# @return [String] The IPv6 session address on peer's end.
|
33
|
+
attr_accessor :peer_session_ipv6address
|
34
|
+
|
35
|
+
# @return [SessionStateV4] The state of the IPv4 session. Possible values
|
36
|
+
# include: 'None', 'Idle', 'Connect', 'Active', 'OpenSent',
|
37
|
+
# 'OpenConfirm', 'OpenReceived', 'Established', 'PendingAdd',
|
38
|
+
# 'PendingUpdate', 'PendingRemove'
|
39
|
+
attr_accessor :session_state_v4
|
40
|
+
|
41
|
+
# @return [SessionStateV6] The state of the IPv6 session. Possible values
|
42
|
+
# include: 'None', 'Idle', 'Connect', 'Active', 'OpenSent',
|
43
|
+
# 'OpenConfirm', 'OpenReceived', 'Established', 'PendingAdd',
|
44
|
+
# 'PendingUpdate', 'PendingRemove'
|
45
|
+
attr_accessor :session_state_v6
|
46
|
+
|
47
|
+
# @return [Integer] The maximum number of prefixes advertised over the
|
48
|
+
# IPv4 session.
|
49
|
+
attr_accessor :max_prefixes_advertised_v4
|
50
|
+
|
51
|
+
# @return [Integer] The maximum number of prefixes advertised over the
|
52
|
+
# IPv6 session.
|
53
|
+
attr_accessor :max_prefixes_advertised_v6
|
54
|
+
|
55
|
+
# @return [String] The MD5 authentication key of the session.
|
56
|
+
attr_accessor :md5authentication_key
|
57
|
+
|
58
|
+
|
59
|
+
#
|
60
|
+
# Mapper for BgpSession class as Ruby Hash.
|
61
|
+
# This will be used for serialization/deserialization.
|
62
|
+
#
|
63
|
+
def self.mapper()
|
64
|
+
{
|
65
|
+
client_side_validation: true,
|
66
|
+
required: false,
|
67
|
+
serialized_name: 'BgpSession',
|
68
|
+
type: {
|
69
|
+
name: 'Composite',
|
70
|
+
class_name: 'BgpSession',
|
71
|
+
model_properties: {
|
72
|
+
session_prefix_v4: {
|
73
|
+
client_side_validation: true,
|
74
|
+
required: false,
|
75
|
+
serialized_name: 'sessionPrefixV4',
|
76
|
+
type: {
|
77
|
+
name: 'String'
|
78
|
+
}
|
79
|
+
},
|
80
|
+
session_prefix_v6: {
|
81
|
+
client_side_validation: true,
|
82
|
+
required: false,
|
83
|
+
serialized_name: 'sessionPrefixV6',
|
84
|
+
type: {
|
85
|
+
name: 'String'
|
86
|
+
}
|
87
|
+
},
|
88
|
+
microsoft_session_ipv4address: {
|
89
|
+
client_side_validation: true,
|
90
|
+
required: false,
|
91
|
+
read_only: true,
|
92
|
+
serialized_name: 'microsoftSessionIPv4Address',
|
93
|
+
type: {
|
94
|
+
name: 'String'
|
95
|
+
}
|
96
|
+
},
|
97
|
+
microsoft_session_ipv6address: {
|
98
|
+
client_side_validation: true,
|
99
|
+
required: false,
|
100
|
+
read_only: true,
|
101
|
+
serialized_name: 'microsoftSessionIPv6Address',
|
102
|
+
type: {
|
103
|
+
name: 'String'
|
104
|
+
}
|
105
|
+
},
|
106
|
+
peer_session_ipv4address: {
|
107
|
+
client_side_validation: true,
|
108
|
+
required: false,
|
109
|
+
serialized_name: 'peerSessionIPv4Address',
|
110
|
+
type: {
|
111
|
+
name: 'String'
|
112
|
+
}
|
113
|
+
},
|
114
|
+
peer_session_ipv6address: {
|
115
|
+
client_side_validation: true,
|
116
|
+
required: false,
|
117
|
+
serialized_name: 'peerSessionIPv6Address',
|
118
|
+
type: {
|
119
|
+
name: 'String'
|
120
|
+
}
|
121
|
+
},
|
122
|
+
session_state_v4: {
|
123
|
+
client_side_validation: true,
|
124
|
+
required: false,
|
125
|
+
read_only: true,
|
126
|
+
serialized_name: 'sessionStateV4',
|
127
|
+
type: {
|
128
|
+
name: 'String'
|
129
|
+
}
|
130
|
+
},
|
131
|
+
session_state_v6: {
|
132
|
+
client_side_validation: true,
|
133
|
+
required: false,
|
134
|
+
read_only: true,
|
135
|
+
serialized_name: 'sessionStateV6',
|
136
|
+
type: {
|
137
|
+
name: 'String'
|
138
|
+
}
|
139
|
+
},
|
140
|
+
max_prefixes_advertised_v4: {
|
141
|
+
client_side_validation: true,
|
142
|
+
required: false,
|
143
|
+
serialized_name: 'maxPrefixesAdvertisedV4',
|
144
|
+
type: {
|
145
|
+
name: 'Number'
|
146
|
+
}
|
147
|
+
},
|
148
|
+
max_prefixes_advertised_v6: {
|
149
|
+
client_side_validation: true,
|
150
|
+
required: false,
|
151
|
+
serialized_name: 'maxPrefixesAdvertisedV6',
|
152
|
+
type: {
|
153
|
+
name: 'Number'
|
154
|
+
}
|
155
|
+
},
|
156
|
+
md5authentication_key: {
|
157
|
+
client_side_validation: true,
|
158
|
+
required: false,
|
159
|
+
serialized_name: 'md5AuthenticationKey',
|
160
|
+
type: {
|
161
|
+
name: 'String'
|
162
|
+
}
|
163
|
+
}
|
164
|
+
}
|
165
|
+
}
|
166
|
+
}
|
167
|
+
end
|
168
|
+
end
|
169
|
+
end
|
170
|
+
end
|