Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[AutoPR network/resource-manager] Mark output blob sas url as mandatory parameter in GetVpnSitesConfigu… #4938

Merged
merged 1 commit into from
Apr 23, 2019
Merged
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
Original file line number Diff line number Diff line change
Expand Up @@ -15,14 +15,20 @@
class GetVpnSitesConfigurationRequest(Model):
"""List of Vpn-Sites.

All required parameters must be populated in order to send to Azure.

:param vpn_sites: List of resource-ids of the vpn-sites for which config
is to be downloaded.
:type vpn_sites: list[str]
:param output_blob_sas_url: The sas-url to download the configurations for
vpn-sites
:param output_blob_sas_url: Required. The sas-url to download the
configurations for vpn-sites
:type output_blob_sas_url: str
"""

_validation = {
'output_blob_sas_url': {'required': True},
}

_attribute_map = {
'vpn_sites': {'key': 'vpnSites', 'type': '[str]'},
'output_blob_sas_url': {'key': 'outputBlobSasUrl', 'type': 'str'},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,20 +15,26 @@
class GetVpnSitesConfigurationRequest(Model):
"""List of Vpn-Sites.

All required parameters must be populated in order to send to Azure.

:param vpn_sites: List of resource-ids of the vpn-sites for which config
is to be downloaded.
:type vpn_sites: list[str]
:param output_blob_sas_url: The sas-url to download the configurations for
vpn-sites
:param output_blob_sas_url: Required. The sas-url to download the
configurations for vpn-sites
:type output_blob_sas_url: str
"""

_validation = {
'output_blob_sas_url': {'required': True},
}

_attribute_map = {
'vpn_sites': {'key': 'vpnSites', 'type': '[str]'},
'output_blob_sas_url': {'key': 'outputBlobSasUrl', 'type': 'str'},
}

def __init__(self, *, vpn_sites=None, output_blob_sas_url: str=None, **kwargs) -> None:
def __init__(self, *, output_blob_sas_url: str, vpn_sites=None, **kwargs) -> None:
super(GetVpnSitesConfigurationRequest, self).__init__(**kwargs)
self.vpn_sites = vpn_sites
self.output_blob_sas_url = output_blob_sas_url
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ def __init__(self, client, config, serializer, deserializer):


def _download_initial(
self, resource_group_name, virtual_wan_name, vpn_sites=None, output_blob_sas_url=None, custom_headers=None, raw=False, **operation_config):
self, resource_group_name, virtual_wan_name, output_blob_sas_url, vpn_sites=None, custom_headers=None, raw=False, **operation_config):
request = models.GetVpnSitesConfigurationRequest(vpn_sites=vpn_sites, output_blob_sas_url=output_blob_sas_url)

# Construct URL
Expand Down Expand Up @@ -81,7 +81,7 @@ def _download_initial(
return client_raw_response

def download(
self, resource_group_name, virtual_wan_name, vpn_sites=None, output_blob_sas_url=None, custom_headers=None, raw=False, polling=True, **operation_config):
self, resource_group_name, virtual_wan_name, output_blob_sas_url, vpn_sites=None, custom_headers=None, raw=False, polling=True, **operation_config):
"""Gives the sas-url to download the configurations for vpn-sites in a
resource group.

Expand All @@ -90,12 +90,12 @@ def download(
:param virtual_wan_name: The name of the VirtualWAN for which
configuration of all vpn-sites is needed.
:type virtual_wan_name: str
:param vpn_sites: List of resource-ids of the vpn-sites for which
config is to be downloaded.
:type vpn_sites: list[str]
:param output_blob_sas_url: The sas-url to download the configurations
for vpn-sites
:type output_blob_sas_url: str
:param vpn_sites: List of resource-ids of the vpn-sites for which
config is to be downloaded.
:type vpn_sites: list[str]
:param dict custom_headers: headers that will be added to the request
:param bool raw: The poller return type is ClientRawResponse, the
direct response alongside the deserialized response
Expand All @@ -111,8 +111,8 @@ def download(
raw_result = self._download_initial(
resource_group_name=resource_group_name,
virtual_wan_name=virtual_wan_name,
vpn_sites=vpn_sites,
output_blob_sas_url=output_blob_sas_url,
vpn_sites=vpn_sites,
custom_headers=custom_headers,
raw=True,
**operation_config
Expand Down