Skip to content

Commit

Permalink
[AutoRelease] t2-web-2024-11-15-26155(can only be merged by SDK owner) (
Browse files Browse the repository at this point in the history
#38561)

* code and test

* Update app_service_environments_create_or_update_multi_role_pool.py

* udpate version

* update-testcase

* update testcases

* update format

* Update CHANGELOG.md

* Update CHANGELOG.md

* update version

---------

Co-authored-by: azure-sdk <PythonSdkPipelines>
Co-authored-by: Yuchao Yan <[email protected]>
Co-authored-by: msyyc <[email protected]>
Co-authored-by: ChenxiJiang333 <[email protected]>
Co-authored-by: ChenxiJiang333 <[email protected]>
  • Loading branch information
5 people authored Jan 23, 2025
1 parent fac5c4e commit c3447b5
Show file tree
Hide file tree
Showing 61 changed files with 4,008 additions and 3,849 deletions.
6 changes: 4 additions & 2 deletions sdk/appservice/azure-mgmt-web/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
# Release History

## 0.0.0 (2024-11-18)
## 8.0.0 (2025-01-23)

change log generation failed!!!
### Breaking Changes

- Removed subfolders of some unused Api-Versions for smaller package size. If your application requires a specific and non-latest Api-Version, it's recommended to pin this package to the previous released version; If your application always only use latest Api-Version, please ignore this change.

## 7.3.1 (2024-08-19)

Expand Down
4 changes: 3 additions & 1 deletion sdk/appservice/azure-mgmt-web/azure/mgmt/web/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,12 @@
# --------------------------------------------------------------------------

from ._web_site_management_client import WebSiteManagementClient
__all__ = ['WebSiteManagementClient']

__all__ = ["WebSiteManagementClient"]

try:
from ._patch import patch_sdk # type: ignore

patch_sdk()
except ImportError:
pass
Expand Down
39 changes: 17 additions & 22 deletions sdk/appservice/azure-mgmt-web/azure/mgmt/web/_configuration.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
# pylint: disable=unused-import,ungrouped-imports
from azure.core.credentials import TokenCredential


class WebSiteManagementClientConfiguration:
"""Configuration for WebSiteManagementClient.
Expand All @@ -31,36 +32,30 @@ class WebSiteManagementClientConfiguration:
:type subscription_id: str
"""

def __init__(
self,
credential: "TokenCredential",
subscription_id: str,
**kwargs: Any
):
def __init__(self, credential: "TokenCredential", subscription_id: str, **kwargs: Any):
if credential is None:
raise ValueError("Parameter 'credential' must not be None.")
if subscription_id is None:
raise ValueError("Parameter 'subscription_id' must not be None.")

self.credential = credential
self.subscription_id = subscription_id
self.credential_scopes = kwargs.pop('credential_scopes', ['https://management.azure.com/.default'])
kwargs.setdefault('sdk_moniker', 'azure-mgmt-web/{}'.format(VERSION))
self.credential_scopes = kwargs.pop("credential_scopes", ["https://management.azure.com/.default"])
kwargs.setdefault("sdk_moniker", "azure-mgmt-web/{}".format(VERSION))
self.polling_interval = kwargs.get("polling_interval", 30)
self._configure(**kwargs)

def _configure(
self,
**kwargs: Any
):
self.user_agent_policy = kwargs.get('user_agent_policy') or policies.UserAgentPolicy(**kwargs)
self.headers_policy = kwargs.get('headers_policy') or policies.HeadersPolicy(**kwargs)
self.proxy_policy = kwargs.get('proxy_policy') or policies.ProxyPolicy(**kwargs)
self.logging_policy = kwargs.get('logging_policy') or policies.NetworkTraceLoggingPolicy(**kwargs)
self.http_logging_policy = kwargs.get('http_logging_policy') or ARMHttpLoggingPolicy(**kwargs)
self.retry_policy = kwargs.get('retry_policy') or policies.RetryPolicy(**kwargs)
self.custom_hook_policy = kwargs.get('custom_hook_policy') or policies.CustomHookPolicy(**kwargs)
self.redirect_policy = kwargs.get('redirect_policy') or policies.RedirectPolicy(**kwargs)
self.authentication_policy = kwargs.get('authentication_policy')
def _configure(self, **kwargs: Any):
self.user_agent_policy = kwargs.get("user_agent_policy") or policies.UserAgentPolicy(**kwargs)
self.headers_policy = kwargs.get("headers_policy") or policies.HeadersPolicy(**kwargs)
self.proxy_policy = kwargs.get("proxy_policy") or policies.ProxyPolicy(**kwargs)
self.logging_policy = kwargs.get("logging_policy") or policies.NetworkTraceLoggingPolicy(**kwargs)
self.http_logging_policy = kwargs.get("http_logging_policy") or ARMHttpLoggingPolicy(**kwargs)
self.retry_policy = kwargs.get("retry_policy") or policies.RetryPolicy(**kwargs)
self.custom_hook_policy = kwargs.get("custom_hook_policy") or policies.CustomHookPolicy(**kwargs)
self.redirect_policy = kwargs.get("redirect_policy") or policies.RedirectPolicy(**kwargs)
self.authentication_policy = kwargs.get("authentication_policy")
if self.credential and not self.authentication_policy:
self.authentication_policy = ARMChallengeAuthenticationPolicy(self.credential, *self.credential_scopes, **kwargs)
self.authentication_policy = ARMChallengeAuthenticationPolicy(
self.credential, *self.credential_scopes, **kwargs
)
563 changes: 136 additions & 427 deletions sdk/appservice/azure-mgmt-web/azure/mgmt/web/_operations_mixin.py

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion sdk/appservice/azure-mgmt-web/azure/mgmt/web/_version.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,4 @@
# license information.
# --------------------------------------------------------------------------

VERSION = "0.0.0"
VERSION = "8.0.0"
1,383 changes: 541 additions & 842 deletions sdk/appservice/azure-mgmt-web/azure/mgmt/web/_web_site_management_client.py

Large diffs are not rendered by default.

3 changes: 2 additions & 1 deletion sdk/appservice/azure-mgmt-web/azure/mgmt/web/aio/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,5 @@
# --------------------------------------------------------------------------

from ._web_site_management_client import WebSiteManagementClient
__all__ = ['WebSiteManagementClient']

__all__ = ["WebSiteManagementClient"]
39 changes: 17 additions & 22 deletions sdk/appservice/azure-mgmt-web/azure/mgmt/web/aio/_configuration.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
# pylint: disable=unused-import,ungrouped-imports
from azure.core.credentials_async import AsyncTokenCredential


class WebSiteManagementClientConfiguration:
"""Configuration for WebSiteManagementClient.
Expand All @@ -31,36 +32,30 @@ class WebSiteManagementClientConfiguration:
:type subscription_id: str
"""

def __init__(
self,
credential: "AsyncTokenCredential",
subscription_id: str,
**kwargs: Any
) -> None:
def __init__(self, credential: "AsyncTokenCredential", subscription_id: str, **kwargs: Any) -> None:
if credential is None:
raise ValueError("Parameter 'credential' must not be None.")
if subscription_id is None:
raise ValueError("Parameter 'subscription_id' must not be None.")

self.credential = credential
self.subscription_id = subscription_id
self.credential_scopes = kwargs.pop('credential_scopes', ['https://management.azure.com/.default'])
kwargs.setdefault('sdk_moniker', 'azure-mgmt-web/{}'.format(VERSION))
self.credential_scopes = kwargs.pop("credential_scopes", ["https://management.azure.com/.default"])
kwargs.setdefault("sdk_moniker", "azure-mgmt-web/{}".format(VERSION))
self.polling_interval = kwargs.get("polling_interval", 30)
self._configure(**kwargs)

def _configure(
self,
**kwargs: Any
) -> None:
self.user_agent_policy = kwargs.get('user_agent_policy') or policies.UserAgentPolicy(**kwargs)
self.headers_policy = kwargs.get('headers_policy') or policies.HeadersPolicy(**kwargs)
self.proxy_policy = kwargs.get('proxy_policy') or policies.ProxyPolicy(**kwargs)
self.logging_policy = kwargs.get('logging_policy') or policies.NetworkTraceLoggingPolicy(**kwargs)
self.http_logging_policy = kwargs.get('http_logging_policy') or ARMHttpLoggingPolicy(**kwargs)
self.retry_policy = kwargs.get('retry_policy') or policies.AsyncRetryPolicy(**kwargs)
self.custom_hook_policy = kwargs.get('custom_hook_policy') or policies.CustomHookPolicy(**kwargs)
self.redirect_policy = kwargs.get('redirect_policy') or policies.AsyncRedirectPolicy(**kwargs)
self.authentication_policy = kwargs.get('authentication_policy')
def _configure(self, **kwargs: Any) -> None:
self.user_agent_policy = kwargs.get("user_agent_policy") or policies.UserAgentPolicy(**kwargs)
self.headers_policy = kwargs.get("headers_policy") or policies.HeadersPolicy(**kwargs)
self.proxy_policy = kwargs.get("proxy_policy") or policies.ProxyPolicy(**kwargs)
self.logging_policy = kwargs.get("logging_policy") or policies.NetworkTraceLoggingPolicy(**kwargs)
self.http_logging_policy = kwargs.get("http_logging_policy") or ARMHttpLoggingPolicy(**kwargs)
self.retry_policy = kwargs.get("retry_policy") or policies.AsyncRetryPolicy(**kwargs)
self.custom_hook_policy = kwargs.get("custom_hook_policy") or policies.CustomHookPolicy(**kwargs)
self.redirect_policy = kwargs.get("redirect_policy") or policies.AsyncRedirectPolicy(**kwargs)
self.authentication_policy = kwargs.get("authentication_policy")
if self.credential and not self.authentication_policy:
self.authentication_policy = AsyncARMChallengeAuthenticationPolicy(self.credential, *self.credential_scopes, **kwargs)
self.authentication_policy = AsyncARMChallengeAuthenticationPolicy(
self.credential, *self.credential_scopes, **kwargs
)
Loading

0 comments on commit c3447b5

Please sign in to comment.