Skip to content
This repository was archived by the owner on Jan 11, 2023. It is now read-only.
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,15 @@ class NetworkManagementClient < MsRestAzure::AzureServiceClient
# @return [String] Client API version.
attr_reader :api_version

# @return [String] The resource group name of the Microsoft Azure resource.
attr_accessor :resource_group_name

# @return [String] The name of the Virtual Hub resource.
attr_accessor :virtual_hub_name

# @return [String] The name of the connection resource.
attr_accessor :connection_name

# @return [String] Gets or sets the preferred language for the response.
attr_accessor :accept_language

Expand Down Expand Up @@ -494,46 +503,43 @@ def check_dns_name_availability_async(location, domain_name_label, custom_header
#
# Gives the supported security providers for the virtual wan.
#
# @param resource_group_name [String] The resource group name.
# @param virtual_wanname [String] The name of the VirtualWAN for which
# supported security providers are needed.
# @param custom_headers [Hash{String => String}] A hash of custom headers that
# will be added to the HTTP request.
#
# @return [VirtualWanSecurityProviders] operation results.
#
def supported_security_providers(resource_group_name, virtual_wanname, custom_headers = nil)
response = supported_security_providers_async(resource_group_name, virtual_wanname, custom_headers).value!
def supported_security_providers(virtual_wanname, custom_headers = nil)
response = supported_security_providers_async(virtual_wanname, custom_headers).value!
response.body unless response.nil?
end

#
# Gives the supported security providers for the virtual wan.
#
# @param resource_group_name [String] The resource group name.
# @param virtual_wanname [String] The name of the VirtualWAN for which
# supported security providers are needed.
# @param custom_headers [Hash{String => String}] A hash of custom headers that
# will be added to the HTTP request.
#
# @return [MsRestAzure::AzureOperationResponse] HTTP response information.
#
def supported_security_providers_with_http_info(resource_group_name, virtual_wanname, custom_headers = nil)
supported_security_providers_async(resource_group_name, virtual_wanname, custom_headers).value!
def supported_security_providers_with_http_info(virtual_wanname, custom_headers = nil)
supported_security_providers_async(virtual_wanname, custom_headers).value!
end

#
# Gives the supported security providers for the virtual wan.
#
# @param resource_group_name [String] The resource group name.
# @param virtual_wanname [String] The name of the VirtualWAN for which
# supported security providers are needed.
# @param [Hash{String => String}] A hash of custom headers that will be added
# to the HTTP request.
#
# @return [Concurrent::Promise] Promise object which holds the HTTP response.
#
def supported_security_providers_async(resource_group_name, virtual_wanname, custom_headers = nil)
def supported_security_providers_async(virtual_wanname, custom_headers = nil)
fail ArgumentError, 'subscription_id is nil' if subscription_id.nil?
fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
fail ArgumentError, 'virtual_wanname is nil' if virtual_wanname.nil?
Expand Down

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -25,21 +25,19 @@ def initialize(client)
# Gives the sas-url to download the configurations for vpn-sites in a resource
# group.
#
# @param resource_group_name [String] The resource group name.
# @param virtual_wanname [String] The name of the VirtualWAN for which
# configuration of all vpn-sites is needed.
# @param request [GetVpnSitesConfigurationRequest] Parameters supplied to
# download vpn-sites configuration.
# @param custom_headers [Hash{String => String}] A hash of custom headers that
# will be added to the HTTP request.
#
def download(resource_group_name, virtual_wanname, request, custom_headers = nil)
response = download_async(resource_group_name, virtual_wanname, request, custom_headers).value!
def download(virtual_wanname, request, custom_headers = nil)
response = download_async(virtual_wanname, request, custom_headers).value!
nil
end

#
# @param resource_group_name [String] The resource group name.
# @param virtual_wanname [String] The name of the VirtualWAN for which
# configuration of all vpn-sites is needed.
# @param request [GetVpnSitesConfigurationRequest] Parameters supplied to
Expand All @@ -50,9 +48,9 @@ def download(resource_group_name, virtual_wanname, request, custom_headers = nil
# @return [Concurrent::Promise] promise which provides async access to http
# response.
#
def download_async(resource_group_name, virtual_wanname, request, custom_headers = nil)
def download_async(virtual_wanname, request, custom_headers = nil)
# Send request
promise = begin_download_async(resource_group_name, virtual_wanname, request, custom_headers)
promise = begin_download_async(virtual_wanname, request, custom_headers)

promise = promise.then do |response|
# Defining deserialization method.
Expand All @@ -70,7 +68,6 @@ def download_async(resource_group_name, virtual_wanname, request, custom_headers
# Gives the sas-url to download the configurations for vpn-sites in a resource
# group.
#
# @param resource_group_name [String] The resource group name.
# @param virtual_wanname [String] The name of the VirtualWAN for which
# configuration of all vpn-sites is needed.
# @param request [GetVpnSitesConfigurationRequest] Parameters supplied to
Expand All @@ -79,16 +76,15 @@ def download_async(resource_group_name, virtual_wanname, request, custom_headers
# will be added to the HTTP request.
#
#
def begin_download(resource_group_name, virtual_wanname, request, custom_headers = nil)
response = begin_download_async(resource_group_name, virtual_wanname, request, custom_headers).value!
def begin_download(virtual_wanname, request, custom_headers = nil)
response = begin_download_async(virtual_wanname, request, custom_headers).value!
nil
end

#
# Gives the sas-url to download the configurations for vpn-sites in a resource
# group.
#
# @param resource_group_name [String] The resource group name.
# @param virtual_wanname [String] The name of the VirtualWAN for which
# configuration of all vpn-sites is needed.
# @param request [GetVpnSitesConfigurationRequest] Parameters supplied to
Expand All @@ -98,15 +94,14 @@ def begin_download(resource_group_name, virtual_wanname, request, custom_headers
#
# @return [MsRestAzure::AzureOperationResponse] HTTP response information.
#
def begin_download_with_http_info(resource_group_name, virtual_wanname, request, custom_headers = nil)
begin_download_async(resource_group_name, virtual_wanname, request, custom_headers).value!
def begin_download_with_http_info(virtual_wanname, request, custom_headers = nil)
begin_download_async(virtual_wanname, request, custom_headers).value!
end

#
# Gives the sas-url to download the configurations for vpn-sites in a resource
# group.
#
# @param resource_group_name [String] The resource group name.
# @param virtual_wanname [String] The name of the VirtualWAN for which
# configuration of all vpn-sites is needed.
# @param request [GetVpnSitesConfigurationRequest] Parameters supplied to
Expand All @@ -116,9 +111,9 @@ def begin_download_with_http_info(resource_group_name, virtual_wanname, request,
#
# @return [Concurrent::Promise] Promise object which holds the HTTP response.
#
def begin_download_async(resource_group_name, virtual_wanname, request, custom_headers = nil)
def begin_download_async(virtual_wanname, request, custom_headers = nil)
fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
fail ArgumentError, '@client.resource_group_name is nil' if @client.resource_group_name.nil?
fail ArgumentError, 'virtual_wanname is nil' if virtual_wanname.nil?
fail ArgumentError, 'request is nil' if request.nil?
fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
Expand All @@ -143,7 +138,7 @@ def begin_download_async(resource_group_name, virtual_wanname, request, custom_h

options = {
middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
path_params: {'subscriptionId' => @client.subscription_id,'resourceGroupName' => resource_group_name,'virtualWANName' => virtual_wanname},
path_params: {'subscriptionId' => @client.subscription_id,'resourceGroupName' => @client.resource_group_name,'virtualWANName' => virtual_wanname},
query_params: {'api-version' => @client.api_version},
body: request_content,
headers: request_headers.merge(custom_headers || {}),
Expand Down