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

Split Synapse Python into three clients #11608

Merged
merged 29 commits into from
Jul 3, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
29 commits
Select commit Hold shift + click to select a range
167e2f0
Split Python into three clients
lmazuel May 22, 2020
7cc53dc
Missing version file
lmazuel May 22, 2020
995e086
Merge remote-tracking branch 'origin/master' into synapse_split
lmazuel Jun 9, 2020
60df60b
Latest from RestAPI master
lmazuel Jun 9, 2020
31a048c
Remove development (renamed to artificat)
lmazuel Jun 9, 2020
4e17ac4
Merge remote-tracking branch 'origin/master' into synapse_split
lmazuel Jul 1, 2020
a2c4e38
Synapse nspkg
lmazuel Jul 1, 2020
d7ccbfc
Split Synapse SDK in actual packages
lmazuel Jul 1, 2020
42a68ae
Packaging update of azure-synapse-spark
AutorestCI Jul 1, 2020
7ba80ef
Packaging update of azure-synapse-accesscontrol
AutorestCI Jul 1, 2020
f021778
Packaging update of azure-synapse-artifacts
AutorestCI Jul 1, 2020
d742b2d
Fix ci.yml
lmazuel Jul 1, 2020
d78384e
Restore azure-synapse as it was
lmazuel Jul 1, 2020
63fd5d6
CI for Synapse
lmazuel Jul 1, 2020
3492db4
Packaging
lmazuel Jul 1, 2020
18cca66
Versioning
lmazuel Jul 1, 2020
2cfbcec
Packaging update of azure-synapse-spark
AutorestCI Jul 1, 2020
0f01839
Packaging update of azure-synapse-accesscontrol
AutorestCI Jul 1, 2020
09457e3
Packaging update of azure-synapse-artifacts
AutorestCI Jul 1, 2020
7e20565
Update dependencies
lmazuel Jul 1, 2020
2cd9e55
Nspkg shared req
lmazuel Jul 1, 2020
38bce33
Merge remote-tracking branch 'origin/master' into synapse_split
lmazuel Jul 2, 2020
52b4186
Merge remote-tracking branch 'origin/master' into synapse_split
lmazuel Jul 2, 2020
9e38b78
Re-enable auto-packaging
lmazuel Jul 2, 2020
e4de1e8
Packaging update of azure-synapse-artifacts
AutorestCI Jul 2, 2020
0043518
Packaging update of azure-synapse-accesscontrol
AutorestCI Jul 2, 2020
2f55d8e
Packaging update of azure-synapse-spark
AutorestCI Jul 2, 2020
81f535c
Shared req
lmazuel Jul 2, 2020
aae27a5
Merge remote-tracking branch 'origin/master' into synapse_split
lmazuel Jul 3, 2020
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
3 changes: 3 additions & 0 deletions eng/.docsettings.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,9 @@ known_content_issues:
# data plane. common issue filed to azure-sdk-for-python
- ['README.rst', '#4554']
- ['sdk/synapse/azure-synapse/README.md', '#4554']
- ['sdk/synapse/azure-synapse-accesscontrol/README.md', '#4554']
- ['sdk/synapse/azure-synapse-spark/README.md', '#4554']
- ['sdk/synapse/azure-synapse-artifacts/README.md', '#4554']
- ['sdk/synapse/azure-synapse-nspkg/README.md', '#4554']
- ['sdk/applicationinsights/azure-applicationinsights/README.md', '#4554']
- ['sdk/batch/azure-batch/README.md', '#4554']
Expand Down
6 changes: 5 additions & 1 deletion eng/tox/allowed_pylint_failures.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,5 +42,9 @@
"azure-servicefabric",
"azure-template",
"azure-keyvault",
"azure-synapse"
"azure-synapse",
"azure-synapse-artifacts",
"azure-synapse-spark",
"azure-synapse-accesscontrol",
"azure-synapse-nspkg",
]
5 changes: 5 additions & 0 deletions sdk/synapse/azure-synapse-accesscontrol/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# Release History

## 0.2.0 (2020-07-01)

* Initial Release
5 changes: 5 additions & 0 deletions sdk/synapse/azure-synapse-accesscontrol/MANIFEST.in
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
recursive-include tests *.py *.yaml
include *.md
include azure/__init__.py
include azure/synapse/__init__.py

21 changes: 21 additions & 0 deletions sdk/synapse/azure-synapse-accesscontrol/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# Microsoft Azure SDK for Python

This is the Microsoft Azure Synapse AccessControl Client Library.
This package has been tested with Python 2.7, 3.5, 3.6, 3.7 and 3.8.
For a more complete view of Azure libraries, see the [Github repo](https://github.com/Azure/azure-sdk-for-python/)


# Usage

For code examples, see [Synapse AccessControl](https://docs.microsoft.com/python/api/overview/azure/)
on docs.microsoft.com.


# Provide Feedback

If you encounter any bugs or have suggestions, please file an issue in the
[Issues](https://github.com/Azure/azure-sdk-for-python/issues)
section of the project.


![Impressions](https://azure-sdk-impressions.azurewebsites.net/api/impressions/azure-sdk-for-python%2Fazure-synapse-accesscontrol%2FREADME.png)
1 change: 1 addition & 0 deletions sdk/synapse/azure-synapse-accesscontrol/azure/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
__path__ = __import__('pkgutil').extend_path(__path__, __name__)
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
__path__ = __import__('pkgutil').extend_path(__path__, __name__)
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
# coding=utf-8
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for license information.
# Code generated by Microsoft (R) AutoRest Code Generator.
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
# --------------------------------------------------------------------------

from ._access_control_client import AccessControlClient
from ._version import VERSION

__version__ = VERSION
__all__ = ['AccessControlClient']

try:
from ._patch import patch_sdk
patch_sdk()
except ImportError:
pass
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
# coding=utf-8
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for license information.
# Code generated by Microsoft (R) AutoRest Code Generator.
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
# --------------------------------------------------------------------------

from typing import TYPE_CHECKING

from azure.core import PipelineClient
from msrest import Deserializer, Serializer

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

from azure.core.credentials import TokenCredential

from ._configuration import AccessControlClientConfiguration
from .operations import AccessControlClientOperationsMixin
from . import models


class AccessControlClient(AccessControlClientOperationsMixin):
"""AccessControlClient.

:param credential: Credential needed for the client to connect to Azure.
:type credential: ~azure.core.credentials.TokenCredential
:param endpoint: The workspace development endpoint, for example https://myworkspace.dev.azuresynapse.net.
:type endpoint: str
:keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present.
"""

def __init__(
self,
credential, # type: "TokenCredential"
endpoint, # type: str
**kwargs # type: Any
):
# type: (...) -> None
base_url = '{endpoint}'
self._config = AccessControlClientConfiguration(credential, endpoint, **kwargs)
self._client = PipelineClient(base_url=base_url, config=self._config, **kwargs)

client_models = {k: v for k, v in models.__dict__.items() if isinstance(v, type)}
self._serialize = Serializer(client_models)
self._deserialize = Deserializer(client_models)


def close(self):
# type: () -> None
self._client.close()

def __enter__(self):
# type: () -> AccessControlClient
self._client.__enter__()
return self

def __exit__(self, *exc_details):
# type: (Any) -> None
self._client.__exit__(*exc_details)
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
# coding=utf-8
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for license information.
# Code generated by Microsoft (R) AutoRest Code Generator.
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
# --------------------------------------------------------------------------

from typing import TYPE_CHECKING

from azure.core.configuration import Configuration
from azure.core.pipeline import policies

from ._version import VERSION

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

from azure.core.credentials import TokenCredential


class AccessControlClientConfiguration(Configuration):
"""Configuration for AccessControlClient.

Note that all parameters used to create this instance are saved as instance
attributes.

:param credential: Credential needed for the client to connect to Azure.
:type credential: ~azure.core.credentials.TokenCredential
:param endpoint: The workspace development endpoint, for example https://myworkspace.dev.azuresynapse.net.
:type endpoint: str
"""

def __init__(
self,
credential, # type: "TokenCredential"
endpoint, # type: str
**kwargs # type: Any
):
# type: (...) -> None
if credential is None:
raise ValueError("Parameter 'credential' must not be None.")
if endpoint is None:
raise ValueError("Parameter 'endpoint' must not be None.")
super(AccessControlClientConfiguration, self).__init__(**kwargs)

self.credential = credential
self.endpoint = endpoint
self.api_version = "2020-02-01-preview"
self.credential_scopes = ['https://dev.azuresynapse.net/.default']
self.credential_scopes.extend(kwargs.pop('credential_scopes', []))
kwargs.setdefault('sdk_moniker', 'synapse/{}'.format(VERSION))
self._configure(**kwargs)

def _configure(
self,
**kwargs # type: Any
):
# type: (...) -> 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.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 = policies.BearerTokenCredentialPolicy(self.credential, *self.credential_scopes, **kwargs)
Original file line number Diff line number Diff line change
@@ -0,0 +1,129 @@
{
"chosen_version": "2020-02-01-preview",
"total_api_version_list": ["2020-02-01-preview"],
"client": {
"name": "AccessControlClient",
"filename": "_access_control_client",
"description": "AccessControlClient."
},
"global_parameters": {
"sync_method": {
"credential": {
"method_signature": "credential, # type: \"TokenCredential\"",
"description": "Credential needed for the client to connect to Azure.",
"docstring_type": "~azure.core.credentials.TokenCredential",
"required": true
},
"endpoint": {
"method_signature": "endpoint, # type: str",
"description": "The workspace development endpoint, for example https://myworkspace.dev.azuresynapse.net.",
"docstring_type": "str",
"required": true
}
},
"async_method": {
"credential": {
"method_signature": "credential, # type: \"AsyncTokenCredential\"",
"description": "Credential needed for the client to connect to Azure.",
"docstring_type": "~azure.core.credentials_async.AsyncTokenCredential",
"required": true
},
"endpoint": {
"method_signature": "endpoint, # type: str",
"description": "The workspace development endpoint, for example https://myworkspace.dev.azuresynapse.net.",
"docstring_type": "str",
"required": true
}
},
"constant": {
},
"call": "credential, endpoint"
},
"config": {
"credential": true,
"credential_scopes": ["https://dev.azuresynapse.net/.default"]
},
"operation_groups": {
},
"operation_mixins": {
"get_role_definitions" : {
"sync": {
"signature": "def get_role_definitions(\n self,\n **kwargs # type: Any\n):\n"
},
"async": {
"signature": "def get_role_definitions(\n self,\n **kwargs\n) -\u003e AsyncItemPaged[\"models.RolesListResponse\"]:\n",
"coroutine": false
},
"doc": " \"\"\"List roles.\n\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: RolesListResponse, or the result of cls(response)\n:rtype: ~azure.synapse.accesscontrol.models.RolesListResponse\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"",
"call": ""
},
"get_role_definition_by_id" : {
"sync": {
"signature": "def get_role_definition_by_id(\n self,\n role_id, # type: str\n **kwargs # type: Any\n):\n"
},
"async": {
"signature": "async def get_role_definition_by_id(\n self,\n role_id: str,\n **kwargs\n) -\u003e \"models.SynapseRole\":\n",
"coroutine": true
},
"doc": " \"\"\"Get role by role Id.\n\n:param role_id: Synapse Built-In Role Id.\n:type role_id: str\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: SynapseRole, or the result of cls(response)\n:rtype: ~azure.synapse.accesscontrol.models.SynapseRole\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"",
"call": "role_id"
},
"create_role_assignment" : {
"sync": {
"signature": "def create_role_assignment(\n self,\n create_role_assignment_options, # type: \"models.RoleAssignmentOptions\"\n **kwargs # type: Any\n):\n"
},
"async": {
"signature": "async def create_role_assignment(\n self,\n create_role_assignment_options: \"models.RoleAssignmentOptions\",\n **kwargs\n) -\u003e \"models.RoleAssignmentDetails\":\n",
"coroutine": true
},
"doc": " \"\"\"Create role assignment.\n\n:param create_role_assignment_options: Details of role id and object id.\n:type create_role_assignment_options: ~azure.synapse.accesscontrol.models.RoleAssignmentOptions\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: RoleAssignmentDetails, or the result of cls(response)\n:rtype: ~azure.synapse.accesscontrol.models.RoleAssignmentDetails\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"",
"call": "create_role_assignment_options"
},
"get_role_assignments" : {
"sync": {
"signature": "def get_role_assignments(\n self,\n role_id=None, # type: Optional[str]\n principal_id=None, # type: Optional[str]\n continuation_token_parameter=None, # type: Optional[str]\n **kwargs # type: Any\n):\n"
},
"async": {
"signature": "async def get_role_assignments(\n self,\n role_id: Optional[str] = None,\n principal_id: Optional[str] = None,\n continuation_token_parameter: Optional[str] = None,\n **kwargs\n) -\u003e List[\"models.RoleAssignmentDetails\"]:\n",
"coroutine": true
},
"doc": " \"\"\"List role assignments.\n\n:param role_id: Synapse Built-In Role Id.\n:type role_id: str\n:param principal_id: Object ID of the AAD principal or security-group.\n:type principal_id: str\n:param continuation_token_parameter: Continuation token.\n:type continuation_token_parameter: str\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: list of RoleAssignmentDetails, or the result of cls(response)\n:rtype: list[~azure.synapse.accesscontrol.models.RoleAssignmentDetails]\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"",
"call": "role_id, principal_id, continuation_token_parameter"
},
"get_role_assignment_by_id" : {
"sync": {
"signature": "def get_role_assignment_by_id(\n self,\n role_assignment_id, # type: str\n **kwargs # type: Any\n):\n"
},
"async": {
"signature": "async def get_role_assignment_by_id(\n self,\n role_assignment_id: str,\n **kwargs\n) -\u003e \"models.RoleAssignmentDetails\":\n",
"coroutine": true
},
"doc": " \"\"\"Get role assignment by role assignment Id.\n\n:param role_assignment_id: The ID of the role assignment.\n:type role_assignment_id: str\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: RoleAssignmentDetails, or the result of cls(response)\n:rtype: ~azure.synapse.accesscontrol.models.RoleAssignmentDetails\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"",
"call": "role_assignment_id"
},
"delete_role_assignment_by_id" : {
"sync": {
"signature": "def delete_role_assignment_by_id(\n self,\n role_assignment_id, # type: str\n **kwargs # type: Any\n):\n"
},
"async": {
"signature": "async def delete_role_assignment_by_id(\n self,\n role_assignment_id: str,\n **kwargs\n) -\u003e None:\n",
"coroutine": true
},
"doc": " \"\"\"Delete role assignment by role assignment Id.\n\n:param role_assignment_id: The ID of the role assignment.\n:type role_assignment_id: str\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: None, or the result of cls(response)\n:rtype: None\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"",
"call": "role_assignment_id"
},
"get_caller_role_assignments" : {
"sync": {
"signature": "def get_caller_role_assignments(\n self,\n **kwargs # type: Any\n):\n"
},
"async": {
"signature": "async def get_caller_role_assignments(\n self,\n **kwargs\n) -\u003e List[str]:\n",
"coroutine": true
},
"doc": " \"\"\"List role assignments of the caller.\n\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: list of str, or the result of cls(response)\n:rtype: list[str]\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"",
"call": ""
}
},
"sync_imports": "{\"regular\": {\"azurecore\": {\"azure.core.exceptions\": [\"HttpResponseError\", \"ResourceExistsError\", \"ResourceNotFoundError\", \"map_error\"], \"azure.core.pipeline\": [\"PipelineResponse\"], \"azure.core.pipeline.transport\": [\"HttpRequest\", \"HttpResponse\"], \"azure.core.paging\": [\"ItemPaged\"]}, \"stdlib\": {\"warnings\": [null]}}, \"conditional\": {\"stdlib\": {\"typing\": [\"Any\", \"Callable\", \"Dict\", \"Generic\", \"Iterable\", \"List\", \"Optional\", \"TypeVar\"]}}}",
"async_imports": "{\"regular\": {\"azurecore\": {\"azure.core.exceptions\": [\"HttpResponseError\", \"ResourceExistsError\", \"ResourceNotFoundError\", \"map_error\"], \"azure.core.pipeline\": [\"PipelineResponse\"], \"azure.core.pipeline.transport\": [\"AsyncHttpResponse\", \"HttpRequest\"], \"azure.core.async_paging\": [\"AsyncItemPaged\", \"AsyncList\"]}, \"stdlib\": {\"warnings\": [null]}}, \"conditional\": {\"stdlib\": {\"typing\": [\"Any\", \"AsyncIterable\", \"Callable\", \"Dict\", \"Generic\", \"List\", \"Optional\", \"TypeVar\"]}}}"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# coding=utf-8
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for license information.
# Code generated by Microsoft (R) AutoRest Code Generator.
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
# --------------------------------------------------------------------------

VERSION = "0.2.0"
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
# coding=utf-8
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for license information.
# Code generated by Microsoft (R) AutoRest Code Generator.
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
# --------------------------------------------------------------------------

from ._access_control_client_async import AccessControlClient
__all__ = ['AccessControlClient']
Loading