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 web/resource-manager] [DO NOT MERGE] Add API for adding external storage account configurations to a web app #2964

Closed
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
13 changes: 10 additions & 3 deletions azure-mgmt-web/azure/mgmt/web/models/azure_storage_info_value.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,9 @@ class AzureStorageInfoValue(Model):
"""Azure Files or Blob Storage access information value for dictionary
storage.

Variables are only populated by the server, and will be ignored when
sending a request.

:param type: Type of storage. Possible values include: 'AzureFiles',
'AzureBlob'
:type type: str or ~azure.mgmt.web.models.AzureStorageType
Expand All @@ -29,11 +32,15 @@ class AzureStorageInfoValue(Model):
:param mount_path: Path to mount the storage within the site's runtime
environment.
:type mount_path: str
:param state: State of the storage account. Possible values include: 'Ok',
:ivar state: State of the storage account. Possible values include: 'Ok',
'InvalidCredentials', 'InvalidShare'
:type state: str or ~azure.mgmt.web.models.AzureStorageState
:vartype state: str or ~azure.mgmt.web.models.AzureStorageState
"""

_validation = {
'state': {'readonly': True},
}

_attribute_map = {
'type': {'key': 'type', 'type': 'AzureStorageType'},
'account_name': {'key': 'accountName', 'type': 'str'},
Expand All @@ -50,4 +57,4 @@ def __init__(self, **kwargs):
self.share_name = kwargs.get('share_name', None)
self.access_key = kwargs.get('access_key', None)
self.mount_path = kwargs.get('mount_path', None)
self.state = kwargs.get('state', None)
self.state = None
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,9 @@ class AzureStorageInfoValue(Model):
"""Azure Files or Blob Storage access information value for dictionary
storage.

Variables are only populated by the server, and will be ignored when
sending a request.

:param type: Type of storage. Possible values include: 'AzureFiles',
'AzureBlob'
:type type: str or ~azure.mgmt.web.models.AzureStorageType
Expand All @@ -29,11 +32,15 @@ class AzureStorageInfoValue(Model):
:param mount_path: Path to mount the storage within the site's runtime
environment.
:type mount_path: str
:param state: State of the storage account. Possible values include: 'Ok',
:ivar state: State of the storage account. Possible values include: 'Ok',
'InvalidCredentials', 'InvalidShare'
:type state: str or ~azure.mgmt.web.models.AzureStorageState
:vartype state: str or ~azure.mgmt.web.models.AzureStorageState
"""

_validation = {
'state': {'readonly': True},
}

_attribute_map = {
'type': {'key': 'type', 'type': 'AzureStorageType'},
'account_name': {'key': 'accountName', 'type': 'str'},
Expand All @@ -43,11 +50,11 @@ class AzureStorageInfoValue(Model):
'state': {'key': 'state', 'type': 'AzureStorageState'},
}

def __init__(self, *, type=None, account_name: str=None, share_name: str=None, access_key: str=None, mount_path: str=None, state=None, **kwargs) -> None:
def __init__(self, *, type=None, account_name: str=None, share_name: str=None, access_key: str=None, mount_path: str=None, **kwargs) -> None:
super(AzureStorageInfoValue, self).__init__(**kwargs)
self.type = type
self.account_name = account_name
self.share_name = share_name
self.access_key = access_key
self.mount_path = mount_path
self.state = state
self.state = None

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 @@ -71,7 +71,7 @@ def internal_paging(next_link=None, raw=False):

# Construct headers
header_parameters = {}
header_parameters['Content-Type'] = 'application/json; charset=utf-8'
header_parameters['Accept'] = 'application/json'
if self.config.generate_client_request_id:
header_parameters['x-ms-client-request-id'] = str(uuid.uuid1())
if custom_headers:
Expand All @@ -80,9 +80,8 @@ def internal_paging(next_link=None, raw=False):
header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str')

# Construct and send request
request = self._client.get(url, query_parameters)
response = self._client.send(
request, header_parameters, stream=False, **operation_config)
request = self._client.get(url, query_parameters, header_parameters)
response = self._client.send(request, stream=False, **operation_config)

if response.status_code not in [200]:
raise models.DefaultErrorResponseException(self._deserialize, response)
Expand Down
37 changes: 17 additions & 20 deletions azure-mgmt-web/azure/mgmt/web/operations/certificates_operations.py
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ def internal_paging(next_link=None, raw=False):

# Construct headers
header_parameters = {}
header_parameters['Content-Type'] = 'application/json; charset=utf-8'
header_parameters['Accept'] = 'application/json'
if self.config.generate_client_request_id:
header_parameters['x-ms-client-request-id'] = str(uuid.uuid1())
if custom_headers:
Expand All @@ -83,9 +83,8 @@ def internal_paging(next_link=None, raw=False):
header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str')

# Construct and send request
request = self._client.get(url, query_parameters)
response = self._client.send(
request, header_parameters, stream=False, **operation_config)
request = self._client.get(url, query_parameters, header_parameters)
response = self._client.send(request, stream=False, **operation_config)

if response.status_code not in [200]:
raise models.DefaultErrorResponseException(self._deserialize, response)
Expand Down Expand Up @@ -144,7 +143,7 @@ def internal_paging(next_link=None, raw=False):

# Construct headers
header_parameters = {}
header_parameters['Content-Type'] = 'application/json; charset=utf-8'
header_parameters['Accept'] = 'application/json'
if self.config.generate_client_request_id:
header_parameters['x-ms-client-request-id'] = str(uuid.uuid1())
if custom_headers:
Expand All @@ -153,9 +152,8 @@ def internal_paging(next_link=None, raw=False):
header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str')

# Construct and send request
request = self._client.get(url, query_parameters)
response = self._client.send(
request, header_parameters, stream=False, **operation_config)
request = self._client.get(url, query_parameters, header_parameters)
response = self._client.send(request, stream=False, **operation_config)

if response.status_code not in [200]:
raise models.DefaultErrorResponseException(self._deserialize, response)
Expand Down Expand Up @@ -210,7 +208,7 @@ def get(

# Construct headers
header_parameters = {}
header_parameters['Content-Type'] = 'application/json; charset=utf-8'
header_parameters['Accept'] = 'application/json'
if self.config.generate_client_request_id:
header_parameters['x-ms-client-request-id'] = str(uuid.uuid1())
if custom_headers:
Expand All @@ -219,8 +217,8 @@ def get(
header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str')

# Construct and send request
request = self._client.get(url, query_parameters)
response = self._client.send(request, header_parameters, stream=False, **operation_config)
request = self._client.get(url, query_parameters, header_parameters)
response = self._client.send(request, stream=False, **operation_config)

if response.status_code not in [200]:
raise models.DefaultErrorResponseException(self._deserialize, response)
Expand Down Expand Up @@ -277,6 +275,7 @@ def create_or_update(

# Construct headers
header_parameters = {}
header_parameters['Accept'] = 'application/json'
header_parameters['Content-Type'] = 'application/json; charset=utf-8'
if self.config.generate_client_request_id:
header_parameters['x-ms-client-request-id'] = str(uuid.uuid1())
Expand All @@ -289,9 +288,8 @@ def create_or_update(
body_content = self._serialize.body(certificate_envelope, 'Certificate')

# Construct and send request
request = self._client.put(url, query_parameters)
response = self._client.send(
request, header_parameters, body_content, stream=False, **operation_config)
request = self._client.put(url, query_parameters, header_parameters, body_content)
response = self._client.send(request, stream=False, **operation_config)

if response.status_code not in [200]:
raise models.DefaultErrorResponseException(self._deserialize, response)
Expand Down Expand Up @@ -343,7 +341,6 @@ def delete(

# Construct headers
header_parameters = {}
header_parameters['Content-Type'] = 'application/json; charset=utf-8'
if self.config.generate_client_request_id:
header_parameters['x-ms-client-request-id'] = str(uuid.uuid1())
if custom_headers:
Expand All @@ -352,8 +349,8 @@ def delete(
header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str')

# Construct and send request
request = self._client.delete(url, query_parameters)
response = self._client.send(request, header_parameters, stream=False, **operation_config)
request = self._client.delete(url, query_parameters, header_parameters)
response = self._client.send(request, stream=False, **operation_config)

if response.status_code not in [200, 204]:
exp = CloudError(response)
Expand Down Expand Up @@ -406,6 +403,7 @@ def update(

# Construct headers
header_parameters = {}
header_parameters['Accept'] = 'application/json'
header_parameters['Content-Type'] = 'application/json; charset=utf-8'
if self.config.generate_client_request_id:
header_parameters['x-ms-client-request-id'] = str(uuid.uuid1())
Expand All @@ -418,9 +416,8 @@ def update(
body_content = self._serialize.body(certificate_envelope, 'CertificatePatchResource')

# Construct and send request
request = self._client.patch(url, query_parameters)
response = self._client.send(
request, header_parameters, body_content, stream=False, **operation_config)
request = self._client.patch(url, query_parameters, header_parameters, body_content)
response = self._client.send(request, stream=False, **operation_config)

if response.status_code not in [200]:
raise models.DefaultErrorResponseException(self._deserialize, response)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ def internal_paging(next_link=None, raw=False):

# Construct headers
header_parameters = {}
header_parameters['Content-Type'] = 'application/json; charset=utf-8'
header_parameters['Accept'] = 'application/json'
if self.config.generate_client_request_id:
header_parameters['x-ms-client-request-id'] = str(uuid.uuid1())
if custom_headers:
Expand All @@ -82,9 +82,8 @@ def internal_paging(next_link=None, raw=False):
header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str')

# Construct and send request
request = self._client.get(url, query_parameters)
response = self._client.send(
request, header_parameters, stream=False, **operation_config)
request = self._client.get(url, query_parameters, header_parameters)
response = self._client.send(request, stream=False, **operation_config)

if response.status_code not in [200]:
raise models.DefaultErrorResponseException(self._deserialize, response)
Expand Down
Loading