Skip to content

Commit 6d22152

Browse files
azure-sdkmsyyc
andauthored
code and test (Azure#24712)
Co-authored-by: PythonSdkPipelines <PythonSdkPipelines> Co-authored-by: Yuchao Yan <[email protected]>
1 parent e86b4fa commit 6d22152

File tree

74 files changed

+17144
-17675
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

74 files changed

+17144
-17675
lines changed

sdk/logic/azure-mgmt-logic/CHANGELOG.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,16 @@
11
# Release History
22

3+
## 10.0.0 (2022-06-06)
4+
5+
**Features**
6+
7+
- Model IntegrationServiceEnvironment has a new parameter identity
8+
- Model Workflow has a new parameter identity
9+
10+
**Breaking changes**
11+
12+
- Operation IntegrationServiceEnvironmentManagedApisOperations.begin_put has a new parameter integration_service_environment_managed_api
13+
314
## 9.0.0 (2020-12-18)
415

516
**Features**

sdk/logic/azure-mgmt-logic/MANIFEST.in

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,3 +4,4 @@ include *.md
44
include azure/__init__.py
55
include azure/mgmt/__init__.py
66
include LICENSE
7+
include azure/mgmt/logic/py.typed

sdk/logic/azure-mgmt-logic/_meta.json

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
{
2+
"autorest": "3.7.2",
3+
"use": [
4+
"@autorest/[email protected]",
5+
"@autorest/[email protected]"
6+
],
7+
"commit": "2d6cb29af754f48a08f94cb6113bb1f01a4e0eb9",
8+
"repository_url": "https://github.com/Azure/azure-rest-api-specs",
9+
"autorest_command": "autorest specification/logic/resource-manager/readme.md --python --python-sdks-folder=/home/vsts/work/1/azure-sdk-for-python/sdk --python3-only --use=@autorest/[email protected] --use=@autorest/[email protected] --version=3.7.2",
10+
"readme": "specification/logic/resource-manager/readme.md"
11+
}

sdk/logic/azure-mgmt-logic/azure/mgmt/logic/__init__.py

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,7 @@
1212
__version__ = VERSION
1313
__all__ = ['LogicManagementClient']
1414

15-
try:
16-
from ._patch import patch_sdk # type: ignore
17-
patch_sdk()
18-
except ImportError:
19-
pass
15+
# `._patch.py` is used for handwritten extensions to the generated code
16+
# Example: https://github.com/Azure/azure-sdk-for-python/blob/main/doc/dev/customize_code/how-to-patch-sdk-code.md
17+
from ._patch import patch_sdk
18+
patch_sdk()

sdk/logic/azure-mgmt-logic/azure/mgmt/logic/_configuration.py

Lines changed: 15 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -6,22 +6,20 @@
66
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
77
# --------------------------------------------------------------------------
88

9-
from typing import TYPE_CHECKING
9+
from typing import Any, TYPE_CHECKING
1010

1111
from azure.core.configuration import Configuration
1212
from azure.core.pipeline import policies
13-
from azure.mgmt.core.policies import ARMHttpLoggingPolicy
13+
from azure.mgmt.core.policies import ARMChallengeAuthenticationPolicy, ARMHttpLoggingPolicy
1414

1515
from ._version import VERSION
1616

1717
if TYPE_CHECKING:
1818
# pylint: disable=unused-import,ungrouped-imports
19-
from typing import Any
20-
2119
from azure.core.credentials import TokenCredential
2220

2321

24-
class LogicManagementClientConfiguration(Configuration):
22+
class LogicManagementClientConfiguration(Configuration): # pylint: disable=too-many-instance-attributes
2523
"""Configuration for LogicManagementClient.
2624
2725
Note that all parameters used to create this instance are saved as instance
@@ -31,24 +29,28 @@ class LogicManagementClientConfiguration(Configuration):
3129
:type credential: ~azure.core.credentials.TokenCredential
3230
:param subscription_id: The subscription id.
3331
:type subscription_id: str
32+
:keyword api_version: Api Version. Default value is "2019-05-01". Note that overriding this
33+
default value may result in unsupported behavior.
34+
:paramtype api_version: str
3435
"""
3536

3637
def __init__(
3738
self,
38-
credential, # type: "TokenCredential"
39-
subscription_id, # type: str
40-
**kwargs # type: Any
41-
):
42-
# type: (...) -> None
39+
credential: "TokenCredential",
40+
subscription_id: str,
41+
**kwargs: Any
42+
) -> None:
43+
super(LogicManagementClientConfiguration, self).__init__(**kwargs)
44+
api_version = kwargs.pop('api_version', "2019-05-01") # type: str
45+
4346
if credential is None:
4447
raise ValueError("Parameter 'credential' must not be None.")
4548
if subscription_id is None:
4649
raise ValueError("Parameter 'subscription_id' must not be None.")
47-
super(LogicManagementClientConfiguration, self).__init__(**kwargs)
4850

4951
self.credential = credential
5052
self.subscription_id = subscription_id
51-
self.api_version = "2019-05-01"
53+
self.api_version = api_version
5254
self.credential_scopes = kwargs.pop('credential_scopes', ['https://management.azure.com/.default'])
5355
kwargs.setdefault('sdk_moniker', 'mgmt-logic/{}'.format(VERSION))
5456
self._configure(**kwargs)
@@ -68,4 +70,4 @@ def _configure(
6870
self.redirect_policy = kwargs.get('redirect_policy') or policies.RedirectPolicy(**kwargs)
6971
self.authentication_policy = kwargs.get('authentication_policy')
7072
if self.credential and not self.authentication_policy:
71-
self.authentication_policy = policies.BearerTokenCredentialPolicy(self.credential, *self.credential_scopes, **kwargs)
73+
self.authentication_policy = ARMChallengeAuthenticationPolicy(self.credential, *self.credential_scopes, **kwargs)

0 commit comments

Comments
 (0)