Skip to content

Commit

Permalink
code and test (Azure#24712)
Browse files Browse the repository at this point in the history
Co-authored-by: PythonSdkPipelines <PythonSdkPipelines>
Co-authored-by: Yuchao Yan <[email protected]>
  • Loading branch information
azure-sdk and msyyc authored Jun 10, 2022
1 parent e86b4fa commit 6d22152
Show file tree
Hide file tree
Showing 74 changed files with 17,144 additions and 17,675 deletions.
11 changes: 11 additions & 0 deletions sdk/logic/azure-mgmt-logic/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,16 @@
# Release History

## 10.0.0 (2022-06-06)

**Features**

- Model IntegrationServiceEnvironment has a new parameter identity
- Model Workflow has a new parameter identity

**Breaking changes**

- Operation IntegrationServiceEnvironmentManagedApisOperations.begin_put has a new parameter integration_service_environment_managed_api

## 9.0.0 (2020-12-18)

**Features**
Expand Down
1 change: 1 addition & 0 deletions sdk/logic/azure-mgmt-logic/MANIFEST.in
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,4 @@ include *.md
include azure/__init__.py
include azure/mgmt/__init__.py
include LICENSE
include azure/mgmt/logic/py.typed
11 changes: 11 additions & 0 deletions sdk/logic/azure-mgmt-logic/_meta.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"autorest": "3.7.2",
"use": [
"@autorest/[email protected]",
"@autorest/[email protected]"
],
"commit": "2d6cb29af754f48a08f94cb6113bb1f01a4e0eb9",
"repository_url": "https://github.com/Azure/azure-rest-api-specs",
"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",
"readme": "specification/logic/resource-manager/readme.md"
}
9 changes: 4 additions & 5 deletions sdk/logic/azure-mgmt-logic/azure/mgmt/logic/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,7 @@
__version__ = VERSION
__all__ = ['LogicManagementClient']

try:
from ._patch import patch_sdk # type: ignore
patch_sdk()
except ImportError:
pass
# `._patch.py` is used for handwritten extensions to the generated code
# Example: https://github.com/Azure/azure-sdk-for-python/blob/main/doc/dev/customize_code/how-to-patch-sdk-code.md
from ._patch import patch_sdk
patch_sdk()
28 changes: 15 additions & 13 deletions sdk/logic/azure-mgmt-logic/azure/mgmt/logic/_configuration.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,22 +6,20 @@
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
# --------------------------------------------------------------------------

from typing import TYPE_CHECKING
from typing import Any, TYPE_CHECKING

from azure.core.configuration import Configuration
from azure.core.pipeline import policies
from azure.mgmt.core.policies import ARMHttpLoggingPolicy
from azure.mgmt.core.policies import ARMChallengeAuthenticationPolicy, ARMHttpLoggingPolicy

from ._version import VERSION

if TYPE_CHECKING:
# pylint: disable=unused-import,ungrouped-imports
from typing import Any

from azure.core.credentials import TokenCredential


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

def __init__(
self,
credential, # type: "TokenCredential"
subscription_id, # type: str
**kwargs # type: Any
):
# type: (...) -> None
credential: "TokenCredential",
subscription_id: str,
**kwargs: Any
) -> None:
super(LogicManagementClientConfiguration, self).__init__(**kwargs)
api_version = kwargs.pop('api_version', "2019-05-01") # type: str

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.")
super(LogicManagementClientConfiguration, self).__init__(**kwargs)

self.credential = credential
self.subscription_id = subscription_id
self.api_version = "2019-05-01"
self.api_version = api_version
self.credential_scopes = kwargs.pop('credential_scopes', ['https://management.azure.com/.default'])
kwargs.setdefault('sdk_moniker', 'mgmt-logic/{}'.format(VERSION))
self._configure(**kwargs)
Expand All @@ -68,4 +70,4 @@ def _configure(
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 = policies.BearerTokenCredentialPolicy(self.credential, *self.credential_scopes, **kwargs)
self.authentication_policy = ARMChallengeAuthenticationPolicy(self.credential, *self.credential_scopes, **kwargs)
Loading

0 comments on commit 6d22152

Please sign in to comment.