Skip to content

Commit 26d4871

Browse files
shawncxmsxichen
andauthored
Release sdk automanage (#13693)
* add automanage ci * auto generated sdk * add init Co-authored-by: xichen <[email protected]>
1 parent 2774439 commit 26d4871

33 files changed

+5093
-0
lines changed
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
# Release History
2+
3+
## 1.0.0b1 (2020-09-10)
4+
5+
* Initial Release
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
recursive-include tests *.py *.yaml
2+
include *.md
3+
include azure/__init__.py
4+
include azure/mgmt/__init__.py
5+
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
# Microsoft Azure SDK for Python
2+
3+
This is the Microsoft Azure Auto Manage Management Client Library.
4+
This package has been tested with Python 2.7, 3.5, 3.6, 3.7 and 3.8.
5+
For a more complete view of Azure libraries, see the [azure sdk python release](https://aka.ms/azsdk/python/all).
6+
7+
8+
# Usage
9+
10+
For code examples, see [Auto Manage Management](https://docs.microsoft.com/python/api/overview/azure/)
11+
on docs.microsoft.com.
12+
13+
14+
# Provide Feedback
15+
16+
If you encounter any bugs or have suggestions, please file an issue in the
17+
[Issues](https://github.com/Azure/azure-sdk-for-python/issues)
18+
section of the project.
19+
20+
21+
![Impressions](https://azure-sdk-impressions.azurewebsites.net/api/impressions/azure-sdk-for-python%2Fazure-mgmt-automanage%2FREADME.png)
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
__path__ = __import__('pkgutil').extend_path(__path__, __name__)
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
__path__ = __import__('pkgutil').extend_path(__path__, __name__)
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
# coding=utf-8
2+
# --------------------------------------------------------------------------
3+
# Copyright (c) Microsoft Corporation. All rights reserved.
4+
# Licensed under the MIT License. See License.txt in the project root for license information.
5+
# Code generated by Microsoft (R) AutoRest Code Generator.
6+
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
7+
# --------------------------------------------------------------------------
8+
9+
from ._automanage_client import AutomanageClient
10+
from ._version import VERSION
11+
12+
__version__ = VERSION
13+
__all__ = ['AutomanageClient']
14+
15+
try:
16+
from ._patch import patch_sdk
17+
patch_sdk()
18+
except ImportError:
19+
pass
Lines changed: 84 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,84 @@
1+
# coding=utf-8
2+
# --------------------------------------------------------------------------
3+
# Copyright (c) Microsoft Corporation. All rights reserved.
4+
# Licensed under the MIT License. See License.txt in the project root for license information.
5+
# Code generated by Microsoft (R) AutoRest Code Generator.
6+
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
7+
# --------------------------------------------------------------------------
8+
9+
from typing import TYPE_CHECKING
10+
11+
from azure.mgmt.core import ARMPipelineClient
12+
from msrest import Deserializer, Serializer
13+
14+
if TYPE_CHECKING:
15+
# pylint: disable=unused-import,ungrouped-imports
16+
from typing import Any, Optional
17+
18+
from azure.core.credentials import TokenCredential
19+
20+
from ._configuration import AutomanageClientConfiguration
21+
from .operations import AccountsOperations
22+
from .operations import ConfigurationProfileAssignmentsOperations
23+
from .operations import ConfigurationProfilePreferencesOperations
24+
from .operations import Operations
25+
from . import models
26+
27+
28+
class AutomanageClient(object):
29+
"""Automanage Client.
30+
31+
:ivar accounts: AccountsOperations operations
32+
:vartype accounts: automanage_client.operations.AccountsOperations
33+
:ivar configuration_profile_assignments: ConfigurationProfileAssignmentsOperations operations
34+
:vartype configuration_profile_assignments: automanage_client.operations.ConfigurationProfileAssignmentsOperations
35+
:ivar configuration_profile_preferences: ConfigurationProfilePreferencesOperations operations
36+
:vartype configuration_profile_preferences: automanage_client.operations.ConfigurationProfilePreferencesOperations
37+
:ivar operations: Operations operations
38+
:vartype operations: automanage_client.operations.Operations
39+
:param credential: Credential needed for the client to connect to Azure.
40+
:type credential: ~azure.core.credentials.TokenCredential
41+
:param subscription_id: The ID of the target subscription.
42+
:type subscription_id: str
43+
:param str base_url: Service URL
44+
:keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present.
45+
"""
46+
47+
def __init__(
48+
self,
49+
credential, # type: "TokenCredential"
50+
subscription_id, # type: str
51+
base_url=None, # type: Optional[str]
52+
**kwargs # type: Any
53+
):
54+
# type: (...) -> None
55+
if not base_url:
56+
base_url = 'https://management.azure.com'
57+
self._config = AutomanageClientConfiguration(credential, subscription_id, **kwargs)
58+
self._client = ARMPipelineClient(base_url=base_url, config=self._config, **kwargs)
59+
60+
client_models = {k: v for k, v in models.__dict__.items() if isinstance(v, type)}
61+
self._serialize = Serializer(client_models)
62+
self._deserialize = Deserializer(client_models)
63+
64+
self.accounts = AccountsOperations(
65+
self._client, self._config, self._serialize, self._deserialize)
66+
self.configuration_profile_assignments = ConfigurationProfileAssignmentsOperations(
67+
self._client, self._config, self._serialize, self._deserialize)
68+
self.configuration_profile_preferences = ConfigurationProfilePreferencesOperations(
69+
self._client, self._config, self._serialize, self._deserialize)
70+
self.operations = Operations(
71+
self._client, self._config, self._serialize, self._deserialize)
72+
73+
def close(self):
74+
# type: () -> None
75+
self._client.close()
76+
77+
def __enter__(self):
78+
# type: () -> AutomanageClient
79+
self._client.__enter__()
80+
return self
81+
82+
def __exit__(self, *exc_details):
83+
# type: (Any) -> None
84+
self._client.__exit__(*exc_details)
Lines changed: 70 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,70 @@
1+
# coding=utf-8
2+
# --------------------------------------------------------------------------
3+
# Copyright (c) Microsoft Corporation. All rights reserved.
4+
# Licensed under the MIT License. See License.txt in the project root for license information.
5+
# Code generated by Microsoft (R) AutoRest Code Generator.
6+
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
7+
# --------------------------------------------------------------------------
8+
9+
from typing import TYPE_CHECKING
10+
11+
from azure.core.configuration import Configuration
12+
from azure.core.pipeline import policies
13+
14+
from ._version import VERSION
15+
16+
if TYPE_CHECKING:
17+
# pylint: disable=unused-import,ungrouped-imports
18+
from typing import Any
19+
20+
from azure.core.credentials import TokenCredential
21+
22+
23+
class AutomanageClientConfiguration(Configuration):
24+
"""Configuration for AutomanageClient.
25+
26+
Note that all parameters used to create this instance are saved as instance
27+
attributes.
28+
29+
:param credential: Credential needed for the client to connect to Azure.
30+
:type credential: ~azure.core.credentials.TokenCredential
31+
:param subscription_id: The ID of the target subscription.
32+
:type subscription_id: str
33+
"""
34+
35+
def __init__(
36+
self,
37+
credential, # type: "TokenCredential"
38+
subscription_id, # type: str
39+
**kwargs # type: Any
40+
):
41+
# type: (...) -> None
42+
if credential is None:
43+
raise ValueError("Parameter 'credential' must not be None.")
44+
if subscription_id is None:
45+
raise ValueError("Parameter 'subscription_id' must not be None.")
46+
super(AutomanageClientConfiguration, self).__init__(**kwargs)
47+
48+
self.credential = credential
49+
self.subscription_id = subscription_id
50+
self.api_version = "2020-06-30-preview"
51+
self.credential_scopes = ['https://management.azure.com/.default']
52+
self.credential_scopes.extend(kwargs.pop('credential_scopes', []))
53+
kwargs.setdefault('sdk_moniker', 'mgmt-automanage/{}'.format(VERSION))
54+
self._configure(**kwargs)
55+
56+
def _configure(
57+
self,
58+
**kwargs # type: Any
59+
):
60+
# type: (...) -> None
61+
self.user_agent_policy = kwargs.get('user_agent_policy') or policies.UserAgentPolicy(**kwargs)
62+
self.headers_policy = kwargs.get('headers_policy') or policies.HeadersPolicy(**kwargs)
63+
self.proxy_policy = kwargs.get('proxy_policy') or policies.ProxyPolicy(**kwargs)
64+
self.logging_policy = kwargs.get('logging_policy') or policies.NetworkTraceLoggingPolicy(**kwargs)
65+
self.retry_policy = kwargs.get('retry_policy') or policies.RetryPolicy(**kwargs)
66+
self.custom_hook_policy = kwargs.get('custom_hook_policy') or policies.CustomHookPolicy(**kwargs)
67+
self.redirect_policy = kwargs.get('redirect_policy') or policies.RedirectPolicy(**kwargs)
68+
self.authentication_policy = kwargs.get('authentication_policy')
69+
if self.credential and not self.authentication_policy:
70+
self.authentication_policy = policies.BearerTokenCredentialPolicy(self.credential, *self.credential_scopes, **kwargs)
Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
{
2+
"chosen_version": "2020-06-30-preview",
3+
"total_api_version_list": ["2020-06-30-preview"],
4+
"client": {
5+
"name": "AutomanageClient",
6+
"filename": "_automanage_client",
7+
"description": "Automanage Client."
8+
},
9+
"global_parameters": {
10+
"sync_method": {
11+
"credential": {
12+
"method_signature": "credential, # type: \"TokenCredential\"",
13+
"description": "Credential needed for the client to connect to Azure.",
14+
"docstring_type": "~azure.core.credentials.TokenCredential",
15+
"required": true
16+
},
17+
"subscription_id": {
18+
"method_signature": "subscription_id, # type: str",
19+
"description": "The ID of the target subscription.",
20+
"docstring_type": "str",
21+
"required": true
22+
}
23+
},
24+
"async_method": {
25+
"credential": {
26+
"method_signature": "credential, # type: \"AsyncTokenCredential\"",
27+
"description": "Credential needed for the client to connect to Azure.",
28+
"docstring_type": "~azure.core.credentials_async.AsyncTokenCredential",
29+
"required": true
30+
},
31+
"subscription_id": {
32+
"method_signature": "subscription_id, # type: str",
33+
"description": "The ID of the target subscription.",
34+
"docstring_type": "str",
35+
"required": true
36+
}
37+
},
38+
"constant": {
39+
},
40+
"call": "credential, subscription_id"
41+
},
42+
"config": {
43+
"credential": true,
44+
"credential_scopes": ["https://management.azure.com/.default"]
45+
},
46+
"operation_groups": {
47+
"accounts": "AccountsOperations",
48+
"configuration_profile_assignments": "ConfigurationProfileAssignmentsOperations",
49+
"configuration_profile_preferences": "ConfigurationProfilePreferencesOperations",
50+
"operations": "Operations"
51+
},
52+
"operation_mixins": {
53+
},
54+
"sync_imports": "None",
55+
"async_imports": "None"
56+
}
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
# coding=utf-8
2+
# --------------------------------------------------------------------------
3+
# Copyright (c) Microsoft Corporation. All rights reserved.
4+
# Licensed under the MIT License. See License.txt in the project root for license information.
5+
# Code generated by Microsoft (R) AutoRest Code Generator.
6+
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
7+
# --------------------------------------------------------------------------
8+
9+
VERSION = "1.0.0b1"

0 commit comments

Comments
 (0)