diff --git a/ChangeLog.md b/ChangeLog.md index 216db5a421f..ef3e87162ae 100644 --- a/ChangeLog.md +++ b/ChangeLog.md @@ -10,6 +10,10 @@ | `msrest` dep of generated code | `0.6.21` | | `azure-mgmt-core` dep of generated code (If generating mgmt plane code) | `1.3.0` | +**New Features** + +- Add flag `--package-mode` to generate necessary files for package #1154 + **Bug Fixes** - Improve operation group documentation to prevent users from initializing operation groups themselves #1179 diff --git a/autorest/codegen/__init__.py b/autorest/codegen/__init__.py index c00906aec09..f2a3db96e5a 100644 --- a/autorest/codegen/__init__.py +++ b/autorest/codegen/__init__.py @@ -6,6 +6,7 @@ import logging import sys from typing import Dict, Any, Set, Union, List, Type +from pathlib import Path import yaml from .. import Plugin @@ -70,12 +71,21 @@ def _validate_code_model_options(options: Dict[str, Any]) -> None: if options["basic_setup_py"] and not options["package_version"]: raise ValueError("--basic-setup-py must be used with --package-version") + if options["package_mode"] and not options["package_version"]: + raise ValueError("--package-mode must be used with --package-version") + if not options["show_operations"] and options["combine_operation_files"]: raise ValueError( "Can not combine operation files if you are not showing operations. " "If you want operation files, pass in flag --show-operations" ) + if options["package_mode"]: + if options["package_mode"] not in ("mgmtplane", "dataplane") and not Path(options["package_mode"]).exists(): + raise ValueError( + "--package-mode can only be 'mgmtplane' or 'dataplane' or directory which contains template files" + ) + if options["reformat_next_link"] and options["version_tolerant"]: raise ValueError( "--reformat-next-link can not be true for version tolerant generations. " @@ -117,6 +127,14 @@ def _build_exceptions_set(yaml_data: List[Dict[str, Any]]) -> Set[int]: exceptions_set.add(id(exception["schema"])) return exceptions_set + @staticmethod + def _build_package_dependency() -> Dict[str, str]: + return { + "dependency_azure_mgmt_core": "azure-mgmt-core>=1.3.0,<2.0.0", + "dependency_azure_core": "azure-core<2.0.0,>=1.20.1", + "dependency_msrest": "msrest>=0.6.21", + } + def _create_code_model(self, yaml_data: Dict[str, Any], options: Dict[str, Union[str, bool]]) -> CodeModel: # Create a code model @@ -161,6 +179,7 @@ def _create_code_model(self, yaml_data: Dict[str, Any], options: Dict[str, Union if options["credential"]: code_model.global_parameters.add_credential_global_parameter() + code_model.package_dependency = self._build_package_dependency() return code_model def _get_credential_scopes(self, credential): @@ -295,6 +314,9 @@ def _build_code_model_options(self) -> Dict[str, Any]: "low_level_client": low_level_client, "combine_operation_files": self._autorestapi.get_boolean_value("combine-operation-files", version_tolerant), "python3_only": python3_only, + "package_mode": self._autorestapi.get_value("package-mode"), + "package_pprint_name": self._autorestapi.get_value("package-pprint-name"), + "package_configuration": self._autorestapi.get_value("package-configuration"), "default_optional_constants_to_none": self._autorestapi.get_boolean_value( "default-optional-constants-to-none", low_level_client or version_tolerant ), diff --git a/autorest/codegen/models/code_model.py b/autorest/codegen/models/code_model.py index 06de101e88d..520f45ef40d 100644 --- a/autorest/codegen/models/code_model.py +++ b/autorest/codegen/models/code_model.py @@ -51,6 +51,8 @@ class CodeModel: # pylint: disable=too-many-instance-attributes, too-many-publi :type primitives: Dict[int, ~autorest.models.BaseSchema] :param operation_groups: The operation groups we are going to serialize :type operation_groups: list[~autorest.models.OperationGroup] + :param package_dependency: All the dependencies needed in setup.py + :type package_dependency: Dict[str, str] """ def __init__( @@ -76,6 +78,7 @@ def __init__( self._rest: Optional[Rest] = None self.request_builder_ids: Dict[int, RequestBuilder] = {} self._credential_schema_policy: Optional[CredentialSchemaPolicy] = None + self.package_dependency: Dict[str, str] = {} @property def global_parameters(self) -> GlobalParameterList: diff --git a/autorest/codegen/serializers/__init__.py b/autorest/codegen/serializers/__init__.py index 25cd4dd9ec6..f781cffa7af 100644 --- a/autorest/codegen/serializers/__init__.py +++ b/autorest/codegen/serializers/__init__.py @@ -3,9 +3,9 @@ # Licensed under the MIT License. See License.txt in the project root for # license information. # -------------------------------------------------------------------------- -from typing import List, Optional +from typing import Dict, List, Optional, Any from pathlib import Path -from jinja2 import PackageLoader, Environment +from jinja2 import PackageLoader, Environment, FileSystemLoader, StrictUndefined from autorest.codegen.models.operation_group import OperationGroup from ...jsonrpc import AutorestAPI @@ -13,6 +13,7 @@ CodeModel, OperationGroup, RequestBuilder, + TokenCredentialSchema ) from .enum_serializer import EnumSerializer from .general_serializer import GeneralSerializer @@ -29,6 +30,20 @@ "JinjaSerializer", ] +_PACKAGE_FILES = [ + "CHANGELOG.md.jinja2", + "dev_requirements.txt.jinja2", + "LICENSE.jinja2", + "MANIFEST.in.jinja2", + "README.md.jinja2", + "setup.py.jinja2", +] + +_REGENERATE_FILES = { + "setup.py", + "MANIFEST.in" +} + class JinjaSerializer: def __init__(self, autorestapi: AutorestAPI, code_model: CodeModel) -> None: self._autorestapi = autorestapi @@ -74,6 +89,60 @@ def serialize(self) -> None: if self.code_model.options["models_mode"] and (self.code_model.schemas or self.code_model.enums): self._serialize_and_write_models_folder(env=env, namespace_path=namespace_path) + if self.code_model.options["package_mode"]: + self._serialize_and_write_package_files(out_path=namespace_path) + + + def _serialize_and_write_package_files(self, out_path: Path) -> None: + def _serialize_and_write_package_files_proc(**kwargs: Any): + for template_name in package_files: + file = template_name.replace(".jinja2", "") + output_name = out_path / file + if not self._autorestapi.read_file(output_name) or file in _REGENERATE_FILES: + template = env.get_template(template_name) + render_result = template.render(**kwargs) + self._autorestapi.write_file(output_name, render_result) + + def _prepare_params() -> Dict[Any, Any]: + package_parts = self.code_model.options["package_name"].split("-")[:-1] + try: + token_cred = isinstance(self.code_model.credential_schema_policy.credential, TokenCredentialSchema) + except ValueError: + token_cred = False + version = self.code_model.options["package_version"] + if any(x in version for x in ["a", "b", "rc"]) or version[0] == '0': + dev_status = "4 - Beta" + else: + dev_status = "5 - Production/Stable" + params = { + "token_credential": token_cred, + "pkgutil_names": [".".join(package_parts[: i + 1]) for i in range(len(package_parts))], + "init_names": ["/".join(package_parts[: i + 1]) + "/__init__.py" for i in range(len(package_parts))], + "dev_status": dev_status + } + params.update(self.code_model.options) + params.update(self.code_model.package_dependency) + return params + + count = self.code_model.options["package_name"].count("-") + 1 + for _ in range(count): + out_path = out_path / Path("..") + + if self.code_model.options["package_mode"] in ("dataplane", "mgmtplane"): + env = Environment( + loader=PackageLoader("autorest.codegen", "templates"), + undefined=StrictUndefined) + package_files = _PACKAGE_FILES + _serialize_and_write_package_files_proc(**_prepare_params()) + elif Path(self.code_model.options["package_mode"]).exists(): + env = Environment( + loader=FileSystemLoader(str(Path(self.code_model.options["package_mode"]))), + keep_trailing_newline=True, + undefined=StrictUndefined + ) + package_files = env.list_templates() + params = self.code_model.options["package_configuration"] or {} + _serialize_and_write_package_files_proc(**params) def _keep_patch_file(self, path_file: Path, env: Environment): diff --git a/autorest/codegen/serializers/general_serializer.py b/autorest/codegen/serializers/general_serializer.py index 657e498642c..4d36916e611 100644 --- a/autorest/codegen/serializers/general_serializer.py +++ b/autorest/codegen/serializers/general_serializer.py @@ -119,4 +119,7 @@ def serialize_version_file(self) -> str: def serialize_setup_file(self) -> str: template = self.env.get_template("setup.py.jinja2") - return template.render(code_model=self.code_model) + params = {} + params.update(self.code_model.options) + params.update(self.code_model.package_dependency) + return template.render(code_model=self.code_model, **params) diff --git a/autorest/codegen/templates/CHANGELOG.md.jinja2 b/autorest/codegen/templates/CHANGELOG.md.jinja2 new file mode 100644 index 00000000000..bddf9a22c7b --- /dev/null +++ b/autorest/codegen/templates/CHANGELOG.md.jinja2 @@ -0,0 +1,6 @@ +# Release History + +## 1.0.0b1 (1970-01-01) + +- Initial version + diff --git a/autorest/codegen/templates/LICENSE.jinja2 b/autorest/codegen/templates/LICENSE.jinja2 new file mode 100644 index 00000000000..b2f52a2bad4 --- /dev/null +++ b/autorest/codegen/templates/LICENSE.jinja2 @@ -0,0 +1,21 @@ +Copyright (c) Microsoft Corporation. + +MIT License + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED *AS IS*, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/autorest/codegen/templates/MANIFEST.in.jinja2 b/autorest/codegen/templates/MANIFEST.in.jinja2 new file mode 100644 index 00000000000..5b1dc2e7a47 --- /dev/null +++ b/autorest/codegen/templates/MANIFEST.in.jinja2 @@ -0,0 +1,7 @@ +include *.md +include LICENSE +recursive-include tests *.py +recursive-include samples *.py *.md +{%- for init_name in init_names %} +include {{ init_name }} +{%- endfor %} diff --git a/autorest/codegen/templates/README.md.jinja2 b/autorest/codegen/templates/README.md.jinja2 new file mode 100644 index 00000000000..61e435d859d --- /dev/null +++ b/autorest/codegen/templates/README.md.jinja2 @@ -0,0 +1,105 @@ +{% if package_mode == "mgmtplane" -%} +# Microsoft Azure SDK for Python + +This is the Microsoft {{package_pprint_name}} Client Library. +This package has been tested with Python 3.6+. +For a more complete view of Azure libraries, see the [azure sdk python release](https://aka.ms/azsdk/python/all). + +# Usage + +To learn how to use this package, see the [quickstart guide](https://aka.ms/azsdk/python/mgmt) + +For docs and references, see [Python SDK References](https://docs.microsoft.com/python/api/overview/azure) +Code samples for this package can be found at [{{package_pprint_name}}](https://docs.microsoft.com/samples/browse/?languages=python&term=Getting%20started%20-%20Managing&terms=Getting%20started%20-%20Managing) on docs.microsoft.com. +Additional code samples for different Azure services are available at [Samples Repo](https://aka.ms/azsdk/python/mgmt/samples) + +# 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%2F{{package_name}}%2FREADME.png) +{% else %} +# {{ package_pprint_name }} client library for Python + + +## Getting started + +### Installating the package + +```bash +python -m pip install {{ package_name }} +``` + +#### Prequisites + +- Python 3.6 or later is required to use this package. +- You need an [Azure subscription][azure_sub] to use this package. +- An existing {{ package_pprint_name }} instance. + +{%- if token_credential %} +#### Create with an Azure Active Directory Credential +To use an [Azure Active Directory (AAD) token credential][authenticate_with_token], +provide an instance of the desired credential type obtained from the +[azure-identity][azure_identity_credentials] library. + +To authenticate with AAD, you must first [pip][pip] install [`azure-identity`][azure_identity_pip] + +After setup, you can choose which type of [credential][azure_identity_credentials] from azure.identity to use. +As an example, [DefaultAzureCredential][default_azure_credential] can be used to authenticate the client: + +Set the values of the client ID, tenant ID, and client secret of the AAD application as environment variables: +`AZURE_CLIENT_ID`, `AZURE_TENANT_ID`, `AZURE_CLIENT_SECRET` + +Use the returned token credential to authenticate the client: + +```python +>>> from {{ namespace }} import {{ client_name }} +>>> from azure.identity import DefaultAzureCredential +>>> client = {{ client_name }}(endpoint='', credential=DefaultAzureCredential()) +``` + +## Examples + +```python +>>> from {{ namespace }} import {{ client_name }} +>>> from azure.identity import DefaultAzureCredential +>>> from azure.core.exceptions import HttpResponseError + +>>> client = {{ client_name }}(endpoint='', credential=DefaultAzureCredential()) +>>> try: + + except HttpResponseError as e: + print('service responds error: {}'.format(e.response.json())) + +``` +{%- endif %} + +## Contributing + +This project welcomes contributions and suggestions. Most contributions require +you to agree to a Contributor License Agreement (CLA) declaring that you have +the right to, and actually do, grant us the rights to use your contribution. +For details, visit https://cla.microsoft.com. + +When you submit a pull request, a CLA-bot will automatically determine whether +you need to provide a CLA and decorate the PR appropriately (e.g., label, +comment). Simply follow the instructions provided by the bot. You will only +need to do this once across all repos using our CLA. + +This project has adopted the +[Microsoft Open Source Code of Conduct][code_of_conduct]. For more information, +see the Code of Conduct FAQ or contact opencode@microsoft.com with any +additional questions or comments. + + +[code_of_conduct]: https://opensource.microsoft.com/codeofconduct/ +[authenticate_with_token]: https://docs.microsoft.com/azure/cognitive-services/authentication?tabs=powershell#authenticate-with-an-authentication-token +[azure_identity_credentials]: https://github.com/Azure/azure-sdk-for-python/tree/main/sdk/identity/azure-identity#credentials +[azure_identity_pip]: https://pypi.org/project/azure-identity/ +[default_azure_credential]: https://github.com/Azure/azure-sdk-for-python/tree/main/sdk/identity/azure-identity#defaultazurecredential +[pip]: https://pypi.org/project/pip/ +[azure_sub]: https://azure.microsoft.com/free/ +{% endif %} diff --git a/autorest/codegen/templates/dev_requirements.txt.jinja2 b/autorest/codegen/templates/dev_requirements.txt.jinja2 new file mode 100644 index 00000000000..86677c8fbdb --- /dev/null +++ b/autorest/codegen/templates/dev_requirements.txt.jinja2 @@ -0,0 +1,10 @@ +-e ../../../tools/azure-devtools +-e ../../../tools/azure-sdk-tools +../../core/azure-core +{% if token_credential -%} +../../identity/azure-identity +{% endif -%} +{% if azure_arm -%} +../../core/azure-mgmt-core +{% endif -%} +aiohttp diff --git a/autorest/codegen/templates/setup.py.jinja2 b/autorest/codegen/templates/setup.py.jinja2 index 6eec26aa4b3..add90b63f01 100644 --- a/autorest/codegen/templates/setup.py.jinja2 +++ b/autorest/codegen/templates/setup.py.jinja2 @@ -1,34 +1,93 @@ -{% set name = code_model.options["package_name"] or code_model.class_name %} -{% set azure_mgmt_core_import = ', "azure-mgmt-core<2.0.0,>=1.2.1"' if code_model.options["azure_arm"] else "" %} # coding=utf-8 -{{ code_model.options['license_header'] }} +{{ license_header }} # coding: utf-8 - +{% if package_mode %} +import os +import re +{% endif -%} from setuptools import setup, find_packages -NAME = "{{ name|lower }}" -VERSION = "{{ code_model.options.get('package_version', '0.0.0') }}" +{% set package_name_render = package_name or code_model.class_name %} + +PACKAGE_NAME = "{{ package_name_render|lower }}" +{% if package_mode -%} +PACKAGE_PPRINT_NAME = "{{ package_pprint_name }}" + +# a-b-c => a/b/c +package_folder_path = PACKAGE_NAME.replace("-", "/") -# To install the library, run the following -# -# python setup.py install -# -# prerequisite: setuptools -# http://pypi.python.org/pypi/setuptools +# Version extraction inspired from 'requests' +with open(os.path.join(package_folder_path, "_version.py"), "r") as fd: + version = re.search( + r'^VERSION\s*=\s*[\'"]([^\'"]*)[\'"]', fd.read(), re.MULTILINE + ).group(1) -REQUIRES = ["msrest>=0.6.21", "azure-core<2.0.0,>=1.20.1"{{ azure_mgmt_core_import }}] +if not version: + raise RuntimeError("Cannot find version information") +{% set description = "Microsoft %s Client Library for Python"|format(package_pprint_name) %} +{% set author_email = "azpysdkhelp@microsoft.com" %} +{% set url = "https://github.com/Azure/azure-sdk-for-python/tree/main/sdk" %} +{% else %} +version = "{{ code_model.options['package_version'] }}" +{% set description = "%s"|format(package_name_render) %} +{% set long_description = code_model.description %} +{% set author_email = "" %} +{% set url = "" %} +{% endif -%} setup( - name=NAME, - version=VERSION, - description="{{ name }}", - author_email="", - url="", - keywords=["Swagger", "{{ code_model.class_name }}"], - install_requires=REQUIRES, + name=PACKAGE_NAME, + version=version, + description="{{ description }}", + {% if package_mode %} + long_description=open("README.md", "r").read(), + long_description_content_type="text/markdown", + license="MIT License", + author="Microsoft Corporation", + {% endif %} + author_email="{{ author_email }}", + url="{{ url }}", + keywords="azure, azure sdk", + {% if package_mode %} + classifiers=[ + "Development Status :: {{ dev_status }}", + "Programming Language :: Python", + "Programming Language :: Python :: 3 :: Only", + "Programming Language :: Python :: 3", + "Programming Language :: Python :: 3.6", + "Programming Language :: Python :: 3.7", + "Programming Language :: Python :: 3.8", + "Programming Language :: Python :: 3.9", + "Programming Language :: Python :: 3.10", + "License :: OSI Approved :: MIT License", + ], + zip_safe=False, + packages=find_packages( + exclude=[ + "tests", + # Exclude packages that will be covered by PEP420 or nspkg + {%- for pkgutil_name in pkgutil_names %} + "{{ pkgutil_name }}", + {%- endfor %} + ] + ), + {% else %} packages=find_packages(), include_package_data=True, + {% endif %} + install_requires=[ + "{{ dependency_msrest }}", + {% if azure_arm %} + "{{ dependency_azure_mgmt_core }}", + {% else %} + "{{ dependency_azure_core }}", + {% endif %} + ], + {% if package_mode %} + python_requires=">=3.6", + {% else %} long_description="""\ {{ code_model.description }} """ + {% endif %} ) diff --git a/docs/samples/specification/azure_key_credential/generated/setup.py b/docs/samples/specification/azure_key_credential/generated/setup.py index 41853fcce6a..453739b5ca6 100644 --- a/docs/samples/specification/azure_key_credential/generated/setup.py +++ b/docs/samples/specification/azure_key_credential/generated/setup.py @@ -6,31 +6,24 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- # coding: utf-8 - from setuptools import setup, find_packages -NAME = "azure-key-credential-sample" -VERSION = "0.1.0" - -# To install the library, run the following -# -# python setup.py install -# -# prerequisite: setuptools -# http://pypi.python.org/pypi/setuptools - -REQUIRES = ["msrest>=0.6.21", "azure-core<2.0.0,>=1.20.1"] +PACKAGE_NAME = "azure-key-credential-sample" +version = "0.1.0" setup( - name=NAME, - version=VERSION, + name=PACKAGE_NAME, + version=version, description="azure-key-credential-sample", author_email="", url="", - keywords=["Swagger", "AutoRestHeadTestService"], - install_requires=REQUIRES, + keywords="azure, azure sdk", packages=find_packages(), include_package_data=True, + install_requires=[ + "msrest>=0.6.21", + "azure-core<2.0.0,>=1.20.1", + ], long_description="""\ Test Infrastructure for AutoRest. """ diff --git a/docs/samples/specification/basic/generated/setup.py b/docs/samples/specification/basic/generated/setup.py index 554ab51e539..8684afbe849 100644 --- a/docs/samples/specification/basic/generated/setup.py +++ b/docs/samples/specification/basic/generated/setup.py @@ -6,31 +6,24 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- # coding: utf-8 - from setuptools import setup, find_packages -NAME = "azure-basic-sample" -VERSION = "0.1.0" - -# To install the library, run the following -# -# python setup.py install -# -# prerequisite: setuptools -# http://pypi.python.org/pypi/setuptools - -REQUIRES = ["msrest>=0.6.21", "azure-core<2.0.0,>=1.20.1"] +PACKAGE_NAME = "azure-basic-sample" +version = "0.1.0" setup( - name=NAME, - version=VERSION, + name=PACKAGE_NAME, + version=version, description="azure-basic-sample", author_email="", url="", - keywords=["Swagger", "AutoRestHeadTestService"], - install_requires=REQUIRES, + keywords="azure, azure sdk", packages=find_packages(), include_package_data=True, + install_requires=[ + "msrest>=0.6.21", + "azure-core<2.0.0,>=1.20.1", + ], long_description="""\ Test Infrastructure for AutoRest. """ diff --git a/docs/samples/specification/directives/generated/setup.py b/docs/samples/specification/directives/generated/setup.py index 94df4c161e4..2d6502c24e9 100644 --- a/docs/samples/specification/directives/generated/setup.py +++ b/docs/samples/specification/directives/generated/setup.py @@ -6,31 +6,24 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- # coding: utf-8 - from setuptools import setup, find_packages -NAME = "azure-directives-sample" -VERSION = "0.1.0" - -# To install the library, run the following -# -# python setup.py install -# -# prerequisite: setuptools -# http://pypi.python.org/pypi/setuptools - -REQUIRES = ["msrest>=0.6.21", "azure-core<2.0.0,>=1.20.1"] +PACKAGE_NAME = "azure-directives-sample" +version = "0.1.0" setup( - name=NAME, - version=VERSION, + name=PACKAGE_NAME, + version=version, description="azure-directives-sample", author_email="", url="", - keywords=["Swagger", "PollingPagingExample"], - install_requires=REQUIRES, + keywords="azure, azure sdk", packages=find_packages(), include_package_data=True, + install_requires=[ + "msrest>=0.6.21", + "azure-core<2.0.0,>=1.20.1", + ], long_description="""\ Show polling and paging generation. """ diff --git a/docs/samples/specification/management/generated/setup.py b/docs/samples/specification/management/generated/setup.py index 5242fc4f837..0a6c6b70f01 100644 --- a/docs/samples/specification/management/generated/setup.py +++ b/docs/samples/specification/management/generated/setup.py @@ -6,31 +6,24 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- # coding: utf-8 - from setuptools import setup, find_packages -NAME = "azure-mgmt-sample" -VERSION = "0.1.0" - -# To install the library, run the following -# -# python setup.py install -# -# prerequisite: setuptools -# http://pypi.python.org/pypi/setuptools - -REQUIRES = ["msrest>=0.6.21", "azure-core<2.0.0,>=1.20.1", "azure-mgmt-core<2.0.0,>=1.2.1"] +PACKAGE_NAME = "azure-mgmt-sample" +version = "0.1.0" setup( - name=NAME, - version=VERSION, + name=PACKAGE_NAME, + version=version, description="azure-mgmt-sample", author_email="", url="", - keywords=["Swagger", "AutoRestHeadTestService"], - install_requires=REQUIRES, + keywords="azure, azure sdk", packages=find_packages(), include_package_data=True, + install_requires=[ + "msrest>=0.6.21", + "azure-mgmt-core>=1.3.0,<2.0.0", + ], long_description="""\ Test Infrastructure for AutoRest. """ diff --git a/tasks.py b/tasks.py index 33b9e6dd415..034c08dad2b 100644 --- a/tasks.py +++ b/tasks.py @@ -363,6 +363,7 @@ def regenerate_legacy(c, swagger_name=None, debug=False): regenerate_samples(c, debug) regenerate_with_python3_operation_files(c, debug) regenerate_python3_only(c, debug) + regenerate_package_mode(c, debug) @task def regenerate( @@ -484,6 +485,20 @@ def regenerate_multiapi(c, debug=False, swagger_name="test"): _run_autorest(cmds, debug) +@task +def regenerate_package_mode(c, debug=False): + cwd = os.getcwd() + package_mode = [ + 'test/azure/legacy/specification/packagemodemgmtplane/README.md', + 'test/vanilla/legacy/specification/packagemodedataplane/README.md', + 'test/azure/legacy/specification/packagemodecustomize/README.md', + ] + cmds = [ + f'autorest {readme} --use=. --python-sdks-folder={cwd}/test/' for readme in package_mode + ] + + _run_autorest(cmds, debug=debug) + @task def regenerate_custom_poller_pager_legacy(c, debug=False): cwd = os.getcwd() diff --git a/test/azure/legacy/AcceptanceTests/test_package_mode_customize.py b/test/azure/legacy/AcceptanceTests/test_package_mode_customize.py new file mode 100644 index 00000000000..c65750163d2 --- /dev/null +++ b/test/azure/legacy/AcceptanceTests/test_package_mode_customize.py @@ -0,0 +1,53 @@ +# -------------------------------------------------------------------------- +# +# Copyright (c) Microsoft Corporation. All rights reserved. +# +# The MIT License (MIT) +# +# Permission is hereby granted, free of charge, to any person obtaining a copy +# of this software and associated documentation files (the ""Software""), to +# deal in the Software without restriction, including without limitation the +# rights to use, copy, modify, merge, publish, distribute, sublicense, and/or +# sell copies of the Software, and to permit persons to whom the Software is +# furnished to do so, subject to the following conditions: +# +# The above copyright notice and this permission notice shall be included in +# all copies or substantial portions of the Software. +# +# THE SOFTWARE IS PROVIDED *AS IS*, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS +# IN THE SOFTWARE. +# +# -------------------------------------------------------------------------- +from uuid import uuid4 +from os.path import dirname, join, realpath + +from azure.packagemode.customize import AutoRestHeadTestService +from headexceptions import AutoRestHeadExceptionTestService + +from azure.core.exceptions import HttpResponseError + +import pytest + +class TestHead(object): + + def test_head(self, credential, authentication_policy): + + with AutoRestHeadTestService(credential, base_url="http://localhost:3000", authentication_policy=authentication_policy) as client: + + assert client.http_success.head200() + assert client.http_success.head204() + assert not client.http_success.head404() + + def test_head_exception(self, credential, authentication_policy): + + with AutoRestHeadExceptionTestService(credential, base_url="http://localhost:3000", authentication_policy=authentication_policy) as client: + + client.head_exception.head200() + client.head_exception.head204() + with pytest.raises(HttpResponseError): + client.head_exception.head404() diff --git a/test/azure/legacy/AcceptanceTests/test_package_mode_mgmt.py b/test/azure/legacy/AcceptanceTests/test_package_mode_mgmt.py new file mode 100644 index 00000000000..f19db7c4955 --- /dev/null +++ b/test/azure/legacy/AcceptanceTests/test_package_mode_mgmt.py @@ -0,0 +1,53 @@ +# -------------------------------------------------------------------------- +# +# Copyright (c) Microsoft Corporation. All rights reserved. +# +# The MIT License (MIT) +# +# Permission is hereby granted, free of charge, to any person obtaining a copy +# of this software and associated documentation files (the ""Software""), to +# deal in the Software without restriction, including without limitation the +# rights to use, copy, modify, merge, publish, distribute, sublicense, and/or +# sell copies of the Software, and to permit persons to whom the Software is +# furnished to do so, subject to the following conditions: +# +# The above copyright notice and this permission notice shall be included in +# all copies or substantial portions of the Software. +# +# THE SOFTWARE IS PROVIDED *AS IS*, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS +# IN THE SOFTWARE. +# +# -------------------------------------------------------------------------- +from uuid import uuid4 +from os.path import dirname, join, realpath + +from azure.package.mode import AutoRestHeadTestService +from headexceptions import AutoRestHeadExceptionTestService + +from azure.core.exceptions import HttpResponseError + +import pytest + +class TestHead(object): + + def test_head(self, credential, authentication_policy): + + with AutoRestHeadTestService(credential, base_url="http://localhost:3000", authentication_policy=authentication_policy) as client: + + assert client.http_success.head200() + assert client.http_success.head204() + assert not client.http_success.head404() + + def test_head_exception(self, credential, authentication_policy): + + with AutoRestHeadExceptionTestService(credential, base_url="http://localhost:3000", authentication_policy=authentication_policy) as client: + + client.head_exception.head200() + client.head_exception.head204() + with pytest.raises(HttpResponseError): + client.head_exception.head404() diff --git a/test/azure/legacy/Expected/AcceptanceTests/AzureBodyDuration/setup.py b/test/azure/legacy/Expected/AcceptanceTests/AzureBodyDuration/setup.py index 385afe6573c..6ecee859197 100644 --- a/test/azure/legacy/Expected/AcceptanceTests/AzureBodyDuration/setup.py +++ b/test/azure/legacy/Expected/AcceptanceTests/AzureBodyDuration/setup.py @@ -6,31 +6,24 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- # coding: utf-8 - from setuptools import setup, find_packages -NAME = "autorestdurationtestservice" -VERSION = "0.1.0" - -# To install the library, run the following -# -# python setup.py install -# -# prerequisite: setuptools -# http://pypi.python.org/pypi/setuptools - -REQUIRES = ["msrest>=0.6.21", "azure-core<2.0.0,>=1.20.1"] +PACKAGE_NAME = "autorestdurationtestservice" +version = "0.1.0" setup( - name=NAME, - version=VERSION, + name=PACKAGE_NAME, + version=version, description="AutoRestDurationTestService", author_email="", url="", - keywords=["Swagger", "AutoRestDurationTestService"], - install_requires=REQUIRES, + keywords="azure, azure sdk", packages=find_packages(), include_package_data=True, + install_requires=[ + "msrest>=0.6.21", + "azure-core<2.0.0,>=1.20.1", + ], long_description="""\ Test Infrastructure for AutoRest. """, diff --git a/test/azure/legacy/Expected/AcceptanceTests/AzureParameterGrouping/setup.py b/test/azure/legacy/Expected/AcceptanceTests/AzureParameterGrouping/setup.py index 5b4af33fe8a..33f56ba7f54 100644 --- a/test/azure/legacy/Expected/AcceptanceTests/AzureParameterGrouping/setup.py +++ b/test/azure/legacy/Expected/AcceptanceTests/AzureParameterGrouping/setup.py @@ -6,31 +6,24 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- # coding: utf-8 - from setuptools import setup, find_packages -NAME = "autorestparametergroupingtestservice" -VERSION = "0.1.0" - -# To install the library, run the following -# -# python setup.py install -# -# prerequisite: setuptools -# http://pypi.python.org/pypi/setuptools - -REQUIRES = ["msrest>=0.6.21", "azure-core<2.0.0,>=1.20.1"] +PACKAGE_NAME = "autorestparametergroupingtestservice" +version = "0.1.0" setup( - name=NAME, - version=VERSION, + name=PACKAGE_NAME, + version=version, description="AutoRestParameterGroupingTestService", author_email="", url="", - keywords=["Swagger", "AutoRestParameterGroupingTestService"], - install_requires=REQUIRES, + keywords="azure, azure sdk", packages=find_packages(), include_package_data=True, + install_requires=[ + "msrest>=0.6.21", + "azure-core<2.0.0,>=1.20.1", + ], long_description="""\ Test Infrastructure for AutoRest. """, diff --git a/test/azure/legacy/Expected/AcceptanceTests/AzureReport/setup.py b/test/azure/legacy/Expected/AcceptanceTests/AzureReport/setup.py index 94333e8e5a3..74828b58ead 100644 --- a/test/azure/legacy/Expected/AcceptanceTests/AzureReport/setup.py +++ b/test/azure/legacy/Expected/AcceptanceTests/AzureReport/setup.py @@ -6,31 +6,24 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- # coding: utf-8 - from setuptools import setup, find_packages -NAME = "autorestreportserviceforazure" -VERSION = "0.1.0" - -# To install the library, run the following -# -# python setup.py install -# -# prerequisite: setuptools -# http://pypi.python.org/pypi/setuptools - -REQUIRES = ["msrest>=0.6.21", "azure-core<2.0.0,>=1.20.1"] +PACKAGE_NAME = "autorestreportserviceforazure" +version = "0.1.0" setup( - name=NAME, - version=VERSION, + name=PACKAGE_NAME, + version=version, description="AutoRestReportServiceForAzure", author_email="", url="", - keywords=["Swagger", "AutoRestReportServiceForAzure"], - install_requires=REQUIRES, + keywords="azure, azure sdk", packages=find_packages(), include_package_data=True, + install_requires=[ + "msrest>=0.6.21", + "azure-core<2.0.0,>=1.20.1", + ], long_description="""\ Test Infrastructure for AutoRest. """, diff --git a/test/azure/legacy/Expected/AcceptanceTests/AzureSpecials/setup.py b/test/azure/legacy/Expected/AcceptanceTests/AzureSpecials/setup.py index 4bf95843e93..3749158c9d6 100644 --- a/test/azure/legacy/Expected/AcceptanceTests/AzureSpecials/setup.py +++ b/test/azure/legacy/Expected/AcceptanceTests/AzureSpecials/setup.py @@ -6,31 +6,24 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- # coding: utf-8 - from setuptools import setup, find_packages -NAME = "autorestazurespecialparameterstestclient" -VERSION = "0.1.0" - -# To install the library, run the following -# -# python setup.py install -# -# prerequisite: setuptools -# http://pypi.python.org/pypi/setuptools - -REQUIRES = ["msrest>=0.6.21", "azure-core<2.0.0,>=1.20.1", "azure-mgmt-core<2.0.0,>=1.2.1"] +PACKAGE_NAME = "autorestazurespecialparameterstestclient" +version = "0.1.0" setup( - name=NAME, - version=VERSION, + name=PACKAGE_NAME, + version=version, description="AutoRestAzureSpecialParametersTestClient", author_email="", url="", - keywords=["Swagger", "AutoRestAzureSpecialParametersTestClient"], - install_requires=REQUIRES, + keywords="azure, azure sdk", packages=find_packages(), include_package_data=True, + install_requires=[ + "msrest>=0.6.21", + "azure-mgmt-core>=1.3.0,<2.0.0", + ], long_description="""\ Test Infrastructure for AutoRest. """, diff --git a/test/azure/legacy/Expected/AcceptanceTests/CustomBaseUri/setup.py b/test/azure/legacy/Expected/AcceptanceTests/CustomBaseUri/setup.py index c250c733c08..5771c01ab9f 100644 --- a/test/azure/legacy/Expected/AcceptanceTests/CustomBaseUri/setup.py +++ b/test/azure/legacy/Expected/AcceptanceTests/CustomBaseUri/setup.py @@ -6,31 +6,24 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- # coding: utf-8 - from setuptools import setup, find_packages -NAME = "autorestparameterizedhosttestclient" -VERSION = "0.1.0" - -# To install the library, run the following -# -# python setup.py install -# -# prerequisite: setuptools -# http://pypi.python.org/pypi/setuptools - -REQUIRES = ["msrest>=0.6.21", "azure-core<2.0.0,>=1.20.1"] +PACKAGE_NAME = "autorestparameterizedhosttestclient" +version = "0.1.0" setup( - name=NAME, - version=VERSION, + name=PACKAGE_NAME, + version=version, description="AutoRestParameterizedHostTestClient", author_email="", url="", - keywords=["Swagger", "AutoRestParameterizedHostTestClient"], - install_requires=REQUIRES, + keywords="azure, azure sdk", packages=find_packages(), include_package_data=True, + install_requires=[ + "msrest>=0.6.21", + "azure-core<2.0.0,>=1.20.1", + ], long_description="""\ Test Infrastructure for AutoRest. """, diff --git a/test/azure/legacy/Expected/AcceptanceTests/CustomPollerPager/setup.py b/test/azure/legacy/Expected/AcceptanceTests/CustomPollerPager/setup.py index b55691bd3c5..57ef5d093ed 100644 --- a/test/azure/legacy/Expected/AcceptanceTests/CustomPollerPager/setup.py +++ b/test/azure/legacy/Expected/AcceptanceTests/CustomPollerPager/setup.py @@ -6,31 +6,24 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- # coding: utf-8 - from setuptools import setup, find_packages -NAME = "custompollerpager" -VERSION = "0.1.0" - -# To install the library, run the following -# -# python setup.py install -# -# prerequisite: setuptools -# http://pypi.python.org/pypi/setuptools - -REQUIRES = ["msrest>=0.6.21", "azure-core<2.0.0,>=1.20.1", "azure-mgmt-core<2.0.0,>=1.2.1"] +PACKAGE_NAME = "custompollerpager" +version = "0.1.0" setup( - name=NAME, - version=VERSION, + name=PACKAGE_NAME, + version=version, description="custompollerpager", author_email="", url="", - keywords=["Swagger", "AutoRestPagingTestService"], - install_requires=REQUIRES, + keywords="azure, azure sdk", packages=find_packages(), include_package_data=True, + install_requires=[ + "msrest>=0.6.21", + "azure-mgmt-core>=1.3.0,<2.0.0", + ], long_description="""\ Long-running Operation for AutoRest. """ diff --git a/test/azure/legacy/Expected/AcceptanceTests/CustomUrlPaging/setup.py b/test/azure/legacy/Expected/AcceptanceTests/CustomUrlPaging/setup.py index 8dd0ffbcbef..11dcb529f7b 100644 --- a/test/azure/legacy/Expected/AcceptanceTests/CustomUrlPaging/setup.py +++ b/test/azure/legacy/Expected/AcceptanceTests/CustomUrlPaging/setup.py @@ -6,31 +6,24 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- # coding: utf-8 - from setuptools import setup, find_packages -NAME = "autorestparameterizedhosttestpagingclient" -VERSION = "0.1.0" - -# To install the library, run the following -# -# python setup.py install -# -# prerequisite: setuptools -# http://pypi.python.org/pypi/setuptools - -REQUIRES = ["msrest>=0.6.21", "azure-core<2.0.0,>=1.20.1"] +PACKAGE_NAME = "autorestparameterizedhosttestpagingclient" +version = "0.1.0" setup( - name=NAME, - version=VERSION, + name=PACKAGE_NAME, + version=version, description="AutoRestParameterizedHostTestPagingClient", author_email="", url="", - keywords=["Swagger", "AutoRestParameterizedHostTestPagingClient"], - install_requires=REQUIRES, + keywords="azure, azure sdk", packages=find_packages(), include_package_data=True, + install_requires=[ + "msrest>=0.6.21", + "azure-core<2.0.0,>=1.20.1", + ], long_description="""\ Test Infrastructure for AutoRest. """, diff --git a/test/azure/legacy/Expected/AcceptanceTests/Head/setup.py b/test/azure/legacy/Expected/AcceptanceTests/Head/setup.py index 131cedf730b..6214b085c5e 100644 --- a/test/azure/legacy/Expected/AcceptanceTests/Head/setup.py +++ b/test/azure/legacy/Expected/AcceptanceTests/Head/setup.py @@ -6,31 +6,24 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- # coding: utf-8 - from setuptools import setup, find_packages -NAME = "autorestheadtestservice" -VERSION = "0.1.0" - -# To install the library, run the following -# -# python setup.py install -# -# prerequisite: setuptools -# http://pypi.python.org/pypi/setuptools - -REQUIRES = ["msrest>=0.6.21", "azure-core<2.0.0,>=1.20.1", "azure-mgmt-core<2.0.0,>=1.2.1"] +PACKAGE_NAME = "autorestheadtestservice" +version = "0.1.0" setup( - name=NAME, - version=VERSION, + name=PACKAGE_NAME, + version=version, description="AutoRestHeadTestService", author_email="", url="", - keywords=["Swagger", "AutoRestHeadTestService"], - install_requires=REQUIRES, + keywords="azure, azure sdk", packages=find_packages(), include_package_data=True, + install_requires=[ + "msrest>=0.6.21", + "azure-mgmt-core>=1.3.0,<2.0.0", + ], long_description="""\ Test Infrastructure for AutoRest. """, diff --git a/test/azure/legacy/Expected/AcceptanceTests/HeadExceptions/setup.py b/test/azure/legacy/Expected/AcceptanceTests/HeadExceptions/setup.py index 70236538118..03877a39fb7 100644 --- a/test/azure/legacy/Expected/AcceptanceTests/HeadExceptions/setup.py +++ b/test/azure/legacy/Expected/AcceptanceTests/HeadExceptions/setup.py @@ -6,31 +6,24 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- # coding: utf-8 - from setuptools import setup, find_packages -NAME = "autorestheadexceptiontestservice" -VERSION = "0.1.0" - -# To install the library, run the following -# -# python setup.py install -# -# prerequisite: setuptools -# http://pypi.python.org/pypi/setuptools - -REQUIRES = ["msrest>=0.6.21", "azure-core<2.0.0,>=1.20.1", "azure-mgmt-core<2.0.0,>=1.2.1"] +PACKAGE_NAME = "autorestheadexceptiontestservice" +version = "0.1.0" setup( - name=NAME, - version=VERSION, + name=PACKAGE_NAME, + version=version, description="AutoRestHeadExceptionTestService", author_email="", url="", - keywords=["Swagger", "AutoRestHeadExceptionTestService"], - install_requires=REQUIRES, + keywords="azure, azure sdk", packages=find_packages(), include_package_data=True, + install_requires=[ + "msrest>=0.6.21", + "azure-mgmt-core>=1.3.0,<2.0.0", + ], long_description="""\ Test Infrastructure for AutoRest. """, diff --git a/test/azure/legacy/Expected/AcceptanceTests/HeadWithAzureKeyCredentialPolicy/setup.py b/test/azure/legacy/Expected/AcceptanceTests/HeadWithAzureKeyCredentialPolicy/setup.py index 131cedf730b..6214b085c5e 100644 --- a/test/azure/legacy/Expected/AcceptanceTests/HeadWithAzureKeyCredentialPolicy/setup.py +++ b/test/azure/legacy/Expected/AcceptanceTests/HeadWithAzureKeyCredentialPolicy/setup.py @@ -6,31 +6,24 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- # coding: utf-8 - from setuptools import setup, find_packages -NAME = "autorestheadtestservice" -VERSION = "0.1.0" - -# To install the library, run the following -# -# python setup.py install -# -# prerequisite: setuptools -# http://pypi.python.org/pypi/setuptools - -REQUIRES = ["msrest>=0.6.21", "azure-core<2.0.0,>=1.20.1", "azure-mgmt-core<2.0.0,>=1.2.1"] +PACKAGE_NAME = "autorestheadtestservice" +version = "0.1.0" setup( - name=NAME, - version=VERSION, + name=PACKAGE_NAME, + version=version, description="AutoRestHeadTestService", author_email="", url="", - keywords=["Swagger", "AutoRestHeadTestService"], - install_requires=REQUIRES, + keywords="azure, azure sdk", packages=find_packages(), include_package_data=True, + install_requires=[ + "msrest>=0.6.21", + "azure-mgmt-core>=1.3.0,<2.0.0", + ], long_description="""\ Test Infrastructure for AutoRest. """, diff --git a/test/azure/legacy/Expected/AcceptanceTests/Lro/setup.py b/test/azure/legacy/Expected/AcceptanceTests/Lro/setup.py index 226e1d293dc..72094e6022c 100644 --- a/test/azure/legacy/Expected/AcceptanceTests/Lro/setup.py +++ b/test/azure/legacy/Expected/AcceptanceTests/Lro/setup.py @@ -6,31 +6,24 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- # coding: utf-8 - from setuptools import setup, find_packages -NAME = "autorestlongrunningoperationtestservice" -VERSION = "0.1.0" - -# To install the library, run the following -# -# python setup.py install -# -# prerequisite: setuptools -# http://pypi.python.org/pypi/setuptools - -REQUIRES = ["msrest>=0.6.21", "azure-core<2.0.0,>=1.20.1", "azure-mgmt-core<2.0.0,>=1.2.1"] +PACKAGE_NAME = "autorestlongrunningoperationtestservice" +version = "0.1.0" setup( - name=NAME, - version=VERSION, + name=PACKAGE_NAME, + version=version, description="AutoRestLongRunningOperationTestService", author_email="", url="", - keywords=["Swagger", "AutoRestLongRunningOperationTestService"], - install_requires=REQUIRES, + keywords="azure, azure sdk", packages=find_packages(), include_package_data=True, + install_requires=[ + "msrest>=0.6.21", + "azure-mgmt-core>=1.3.0,<2.0.0", + ], long_description="""\ Long-running Operation for AutoRest. """, diff --git a/test/azure/legacy/Expected/AcceptanceTests/LroWithParameterizedEndpoints/setup.py b/test/azure/legacy/Expected/AcceptanceTests/LroWithParameterizedEndpoints/setup.py index c0c7a324c37..8f6bd70e581 100644 --- a/test/azure/legacy/Expected/AcceptanceTests/LroWithParameterizedEndpoints/setup.py +++ b/test/azure/legacy/Expected/AcceptanceTests/LroWithParameterizedEndpoints/setup.py @@ -6,31 +6,24 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- # coding: utf-8 - from setuptools import setup, find_packages -NAME = "lrowithparamaterizedendpoints" -VERSION = "0.1.0" - -# To install the library, run the following -# -# python setup.py install -# -# prerequisite: setuptools -# http://pypi.python.org/pypi/setuptools - -REQUIRES = ["msrest>=0.6.21", "azure-core<2.0.0,>=1.20.1"] +PACKAGE_NAME = "lrowithparamaterizedendpoints" +version = "0.1.0" setup( - name=NAME, - version=VERSION, + name=PACKAGE_NAME, + version=version, description="LROWithParamaterizedEndpoints", author_email="", url="", - keywords=["Swagger", "LROWithParamaterizedEndpoints"], - install_requires=REQUIRES, + keywords="azure, azure sdk", packages=find_packages(), include_package_data=True, + install_requires=[ + "msrest>=0.6.21", + "azure-core<2.0.0,>=1.20.1", + ], long_description="""\ Test Infrastructure for AutoRest. """, diff --git a/test/azure/legacy/Expected/AcceptanceTests/PackageModeCustomize/azure/__init__.py b/test/azure/legacy/Expected/AcceptanceTests/PackageModeCustomize/azure/__init__.py new file mode 100644 index 00000000000..d55ccad1f57 --- /dev/null +++ b/test/azure/legacy/Expected/AcceptanceTests/PackageModeCustomize/azure/__init__.py @@ -0,0 +1 @@ +__path__ = __import__("pkgutil").extend_path(__path__, __name__) # type: ignore diff --git a/test/azure/legacy/Expected/AcceptanceTests/PackageModeCustomize/azure/packagemode/__init__.py b/test/azure/legacy/Expected/AcceptanceTests/PackageModeCustomize/azure/packagemode/__init__.py new file mode 100644 index 00000000000..d55ccad1f57 --- /dev/null +++ b/test/azure/legacy/Expected/AcceptanceTests/PackageModeCustomize/azure/packagemode/__init__.py @@ -0,0 +1 @@ +__path__ = __import__("pkgutil").extend_path(__path__, __name__) # type: ignore diff --git a/test/azure/legacy/Expected/AcceptanceTests/PackageModeCustomize/azure/packagemode/customize/__init__.py b/test/azure/legacy/Expected/AcceptanceTests/PackageModeCustomize/azure/packagemode/customize/__init__.py new file mode 100644 index 00000000000..2a478ab434d --- /dev/null +++ b/test/azure/legacy/Expected/AcceptanceTests/PackageModeCustomize/azure/packagemode/customize/__init__.py @@ -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 ._auto_rest_head_test_service import AutoRestHeadTestService +from ._version import VERSION + +__version__ = VERSION +__all__ = ["AutoRestHeadTestService"] + +# `._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() diff --git a/test/azure/legacy/Expected/AcceptanceTests/PackageModeCustomize/azure/packagemode/customize/_auto_rest_head_test_service.py b/test/azure/legacy/Expected/AcceptanceTests/PackageModeCustomize/azure/packagemode/customize/_auto_rest_head_test_service.py new file mode 100644 index 00000000000..0c49e7c2752 --- /dev/null +++ b/test/azure/legacy/Expected/AcceptanceTests/PackageModeCustomize/azure/packagemode/customize/_auto_rest_head_test_service.py @@ -0,0 +1,92 @@ +# 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 copy import deepcopy +from typing import TYPE_CHECKING + +from msrest import Deserializer, Serializer + +from azure.mgmt.core import ARMPipelineClient + +from ._configuration import AutoRestHeadTestServiceConfiguration +from .operations import HttpSuccessOperations + +if TYPE_CHECKING: + # pylint: disable=unused-import,ungrouped-imports + from typing import Any, Dict + + from azure.core.credentials import TokenCredential + from azure.core.rest import HttpRequest, HttpResponse + + +class AutoRestHeadTestService(object): + """Test Infrastructure for AutoRest. + + :ivar http_success: HttpSuccessOperations operations + :vartype http_success: azure.packagemode.customize.operations.HttpSuccessOperations + :param credential: Credential needed for the client to connect to Azure. + :type credential: ~azure.core.credentials.TokenCredential + :param base_url: Service URL. Default value is "http://localhost:3000". + :type base_url: str + """ + + def __init__( + self, + credential, # type: "TokenCredential" + base_url="http://localhost:3000", # type: str + **kwargs # type: Any + ): + # type: (...) -> None + self._config = AutoRestHeadTestServiceConfiguration(credential=credential, **kwargs) + self._client = ARMPipelineClient(base_url=base_url, config=self._config, **kwargs) + + client_models = {} # type: Dict[str, Any] + self._serialize = Serializer(client_models) + self._deserialize = Deserializer(client_models) + self._serialize.client_side_validation = False + self.http_success = HttpSuccessOperations(self._client, self._config, self._serialize, self._deserialize) + + def _send_request( + self, + request, # type: HttpRequest + **kwargs # type: Any + ): + # type: (...) -> HttpResponse + """Runs the network request through the client's chained policies. + + >>> from azure.core.rest import HttpRequest + >>> request = HttpRequest("GET", "https://www.example.org/") + + >>> response = client._send_request(request) + + + For more information on this code flow, see https://aka.ms/azsdk/python/protocol/quickstart + + :param request: The network request you want to make. Required. + :type request: ~azure.core.rest.HttpRequest + :keyword bool stream: Whether the response payload will be streamed. Defaults to False. + :return: The response of your network call. Does not do error handling on your response. + :rtype: ~azure.core.rest.HttpResponse + """ + + request_copy = deepcopy(request) + request_copy.url = self._client.format_url(request_copy.url) + return self._client.send_request(request_copy, **kwargs) + + def close(self): + # type: () -> None + self._client.close() + + def __enter__(self): + # type: () -> AutoRestHeadTestService + self._client.__enter__() + return self + + def __exit__(self, *exc_details): + # type: (Any) -> None + self._client.__exit__(*exc_details) diff --git a/test/azure/legacy/Expected/AcceptanceTests/PackageModeCustomize/azure/packagemode/customize/_configuration.py b/test/azure/legacy/Expected/AcceptanceTests/PackageModeCustomize/azure/packagemode/customize/_configuration.py new file mode 100644 index 00000000000..cc46e1fcc11 --- /dev/null +++ b/test/azure/legacy/Expected/AcceptanceTests/PackageModeCustomize/azure/packagemode/customize/_configuration.py @@ -0,0 +1,65 @@ +# 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 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 AutoRestHeadTestServiceConfiguration(Configuration): # pylint: disable=too-many-instance-attributes + """Configuration for AutoRestHeadTestService. + + 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 + """ + + def __init__( + self, + credential, # type: "TokenCredential" + **kwargs # type: Any + ): + # type: (...) -> None + super(AutoRestHeadTestServiceConfiguration, self).__init__(**kwargs) + if credential is None: + raise ValueError("Parameter 'credential' must not be None.") + + self.credential = credential + self.credential_scopes = kwargs.pop("credential_scopes", ["https://management.azure.com/.default"]) + kwargs.setdefault("sdk_moniker", "packagemode-customize/{}".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.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 + ) diff --git a/test/azure/legacy/Expected/AcceptanceTests/PackageModeCustomize/azure/packagemode/customize/_patch.py b/test/azure/legacy/Expected/AcceptanceTests/PackageModeCustomize/azure/packagemode/customize/_patch.py new file mode 100644 index 00000000000..f99e77fef98 --- /dev/null +++ b/test/azure/legacy/Expected/AcceptanceTests/PackageModeCustomize/azure/packagemode/customize/_patch.py @@ -0,0 +1,31 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# +# Copyright (c) Microsoft Corporation. All rights reserved. +# +# The MIT License (MIT) +# +# Permission is hereby granted, free of charge, to any person obtaining a copy +# of this software and associated documentation files (the ""Software""), to +# deal in the Software without restriction, including without limitation the +# rights to use, copy, modify, merge, publish, distribute, sublicense, and/or +# sell copies of the Software, and to permit persons to whom the Software is +# furnished to do so, subject to the following conditions: +# +# The above copyright notice and this permission notice shall be included in +# all copies or substantial portions of the Software. +# +# THE SOFTWARE IS PROVIDED *AS IS*, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS +# IN THE SOFTWARE. +# +# -------------------------------------------------------------------------- + +# This file 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 +def patch_sdk(): + pass diff --git a/test/azure/legacy/Expected/AcceptanceTests/PackageModeCustomize/azure/packagemode/customize/_vendor.py b/test/azure/legacy/Expected/AcceptanceTests/PackageModeCustomize/azure/packagemode/customize/_vendor.py new file mode 100644 index 00000000000..0dafe0e287f --- /dev/null +++ b/test/azure/legacy/Expected/AcceptanceTests/PackageModeCustomize/azure/packagemode/customize/_vendor.py @@ -0,0 +1,16 @@ +# -------------------------------------------------------------------------- +# 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 azure.core.pipeline.transport import HttpRequest + + +def _convert_request(request, files=None): + data = request.content if not files else None + request = HttpRequest(method=request.method, url=request.url, headers=request.headers, data=data) + if files: + request.set_formdata_body(files) + return request diff --git a/test/azure/legacy/Expected/AcceptanceTests/PackageModeCustomize/azure/packagemode/customize/_version.py b/test/azure/legacy/Expected/AcceptanceTests/PackageModeCustomize/azure/packagemode/customize/_version.py new file mode 100644 index 00000000000..eae7c95b6fb --- /dev/null +++ b/test/azure/legacy/Expected/AcceptanceTests/PackageModeCustomize/azure/packagemode/customize/_version.py @@ -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.1.0" diff --git a/test/azure/legacy/Expected/AcceptanceTests/PackageModeCustomize/azure/packagemode/customize/aio/__init__.py b/test/azure/legacy/Expected/AcceptanceTests/PackageModeCustomize/azure/packagemode/customize/aio/__init__.py new file mode 100644 index 00000000000..6c3806fafee --- /dev/null +++ b/test/azure/legacy/Expected/AcceptanceTests/PackageModeCustomize/azure/packagemode/customize/aio/__init__.py @@ -0,0 +1,17 @@ +# 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 ._auto_rest_head_test_service import AutoRestHeadTestService + +__all__ = ["AutoRestHeadTestService"] + +# `._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() diff --git a/test/azure/legacy/Expected/AcceptanceTests/PackageModeCustomize/azure/packagemode/customize/aio/_auto_rest_head_test_service.py b/test/azure/legacy/Expected/AcceptanceTests/PackageModeCustomize/azure/packagemode/customize/aio/_auto_rest_head_test_service.py new file mode 100644 index 00000000000..63d80599c3c --- /dev/null +++ b/test/azure/legacy/Expected/AcceptanceTests/PackageModeCustomize/azure/packagemode/customize/aio/_auto_rest_head_test_service.py @@ -0,0 +1,80 @@ +# 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 copy import deepcopy +from typing import Any, Awaitable, TYPE_CHECKING + +from msrest import Deserializer, Serializer + +from azure.core.rest import AsyncHttpResponse, HttpRequest +from azure.mgmt.core import AsyncARMPipelineClient + +from ._configuration import AutoRestHeadTestServiceConfiguration +from .operations import HttpSuccessOperations + +if TYPE_CHECKING: + # pylint: disable=unused-import,ungrouped-imports + from typing import Dict + + from azure.core.credentials_async import AsyncTokenCredential + + +class AutoRestHeadTestService: + """Test Infrastructure for AutoRest. + + :ivar http_success: HttpSuccessOperations operations + :vartype http_success: azure.packagemode.customize.aio.operations.HttpSuccessOperations + :param credential: Credential needed for the client to connect to Azure. + :type credential: ~azure.core.credentials_async.AsyncTokenCredential + :param base_url: Service URL. Default value is "http://localhost:3000". + :type base_url: str + """ + + def __init__( + self, credential: "AsyncTokenCredential", base_url: str = "http://localhost:3000", **kwargs: Any + ) -> None: + self._config = AutoRestHeadTestServiceConfiguration(credential=credential, **kwargs) + self._client = AsyncARMPipelineClient(base_url=base_url, config=self._config, **kwargs) + + client_models = {} # type: Dict[str, Any] + self._serialize = Serializer(client_models) + self._deserialize = Deserializer(client_models) + self._serialize.client_side_validation = False + self.http_success = HttpSuccessOperations(self._client, self._config, self._serialize, self._deserialize) + + def _send_request(self, request: HttpRequest, **kwargs: Any) -> Awaitable[AsyncHttpResponse]: + """Runs the network request through the client's chained policies. + + >>> from azure.core.rest import HttpRequest + >>> request = HttpRequest("GET", "https://www.example.org/") + + >>> response = await client._send_request(request) + + + For more information on this code flow, see https://aka.ms/azsdk/python/protocol/quickstart + + :param request: The network request you want to make. Required. + :type request: ~azure.core.rest.HttpRequest + :keyword bool stream: Whether the response payload will be streamed. Defaults to False. + :return: The response of your network call. Does not do error handling on your response. + :rtype: ~azure.core.rest.AsyncHttpResponse + """ + + request_copy = deepcopy(request) + request_copy.url = self._client.format_url(request_copy.url) + return self._client.send_request(request_copy, **kwargs) + + async def close(self) -> None: + await self._client.close() + + async def __aenter__(self) -> "AutoRestHeadTestService": + await self._client.__aenter__() + return self + + async def __aexit__(self, *exc_details) -> None: + await self._client.__aexit__(*exc_details) diff --git a/test/azure/legacy/Expected/AcceptanceTests/PackageModeCustomize/azure/packagemode/customize/aio/_configuration.py b/test/azure/legacy/Expected/AcceptanceTests/PackageModeCustomize/azure/packagemode/customize/aio/_configuration.py new file mode 100644 index 00000000000..9b724ea89b4 --- /dev/null +++ b/test/azure/legacy/Expected/AcceptanceTests/PackageModeCustomize/azure/packagemode/customize/aio/_configuration.py @@ -0,0 +1,55 @@ +# 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 Any, TYPE_CHECKING + +from azure.core.configuration import Configuration +from azure.core.pipeline import policies +from azure.mgmt.core.policies import ARMHttpLoggingPolicy, AsyncARMChallengeAuthenticationPolicy + +from .._version import VERSION + +if TYPE_CHECKING: + # pylint: disable=unused-import,ungrouped-imports + from azure.core.credentials_async import AsyncTokenCredential + + +class AutoRestHeadTestServiceConfiguration(Configuration): # pylint: disable=too-many-instance-attributes + """Configuration for AutoRestHeadTestService. + + 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_async.AsyncTokenCredential + """ + + def __init__(self, credential: "AsyncTokenCredential", **kwargs: Any) -> None: + super(AutoRestHeadTestServiceConfiguration, self).__init__(**kwargs) + if credential is None: + raise ValueError("Parameter 'credential' must not be None.") + + self.credential = credential + self.credential_scopes = kwargs.pop("credential_scopes", ["https://management.azure.com/.default"]) + kwargs.setdefault("sdk_moniker", "packagemode-customize/{}".format(VERSION)) + 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") + if self.credential and not self.authentication_policy: + self.authentication_policy = AsyncARMChallengeAuthenticationPolicy( + self.credential, *self.credential_scopes, **kwargs + ) diff --git a/test/azure/legacy/Expected/AcceptanceTests/PackageModeCustomize/azure/packagemode/customize/aio/_patch.py b/test/azure/legacy/Expected/AcceptanceTests/PackageModeCustomize/azure/packagemode/customize/aio/_patch.py new file mode 100644 index 00000000000..f99e77fef98 --- /dev/null +++ b/test/azure/legacy/Expected/AcceptanceTests/PackageModeCustomize/azure/packagemode/customize/aio/_patch.py @@ -0,0 +1,31 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# +# Copyright (c) Microsoft Corporation. All rights reserved. +# +# The MIT License (MIT) +# +# Permission is hereby granted, free of charge, to any person obtaining a copy +# of this software and associated documentation files (the ""Software""), to +# deal in the Software without restriction, including without limitation the +# rights to use, copy, modify, merge, publish, distribute, sublicense, and/or +# sell copies of the Software, and to permit persons to whom the Software is +# furnished to do so, subject to the following conditions: +# +# The above copyright notice and this permission notice shall be included in +# all copies or substantial portions of the Software. +# +# THE SOFTWARE IS PROVIDED *AS IS*, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS +# IN THE SOFTWARE. +# +# -------------------------------------------------------------------------- + +# This file 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 +def patch_sdk(): + pass diff --git a/test/azure/legacy/Expected/AcceptanceTests/PackageModeCustomize/azure/packagemode/customize/aio/operations/__init__.py b/test/azure/legacy/Expected/AcceptanceTests/PackageModeCustomize/azure/packagemode/customize/aio/operations/__init__.py new file mode 100644 index 00000000000..58d4a9d9543 --- /dev/null +++ b/test/azure/legacy/Expected/AcceptanceTests/PackageModeCustomize/azure/packagemode/customize/aio/operations/__init__.py @@ -0,0 +1,13 @@ +# 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 ._http_success_operations import HttpSuccessOperations + +__all__ = [ + "HttpSuccessOperations", +] diff --git a/test/azure/legacy/Expected/AcceptanceTests/PackageModeCustomize/azure/packagemode/customize/aio/operations/_http_success_operations.py b/test/azure/legacy/Expected/AcceptanceTests/PackageModeCustomize/azure/packagemode/customize/aio/operations/_http_success_operations.py new file mode 100644 index 00000000000..35b61636fba --- /dev/null +++ b/test/azure/legacy/Expected/AcceptanceTests/PackageModeCustomize/azure/packagemode/customize/aio/operations/_http_success_operations.py @@ -0,0 +1,148 @@ +# pylint: disable=too-many-lines +# 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 Any, Callable, Dict, Optional, TypeVar + +from azure.core.exceptions import ( + ClientAuthenticationError, + HttpResponseError, + ResourceExistsError, + ResourceNotFoundError, + map_error, +) +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import AsyncHttpResponse +from azure.core.rest import HttpRequest +from azure.core.tracing.decorator_async import distributed_trace_async +from azure.mgmt.core.exceptions import ARMErrorFormat + +from ..._vendor import _convert_request +from ...operations._http_success_operations import build_head200_request, build_head204_request, build_head404_request + +T = TypeVar("T") +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] + + +class HttpSuccessOperations: + """ + .. warning:: + **DO NOT** instantiate this class directly. + + Instead, you should access the following operations through + :class:`~azure.packagemode.customize.aio.AutoRestHeadTestService`'s + :attr:`http_success` attribute. + """ + + def __init__(self, *args, **kwargs) -> None: + args = list(args) + self._client = args.pop(0) if args else kwargs.pop("client") + self._config = args.pop(0) if args else kwargs.pop("config") + self._serialize = args.pop(0) if args else kwargs.pop("serializer") + self._deserialize = args.pop(0) if args else kwargs.pop("deserializer") + + @distributed_trace_async + async def head200(self, **kwargs: Any) -> bool: + """Return 200 status code if successful. + + :keyword callable cls: A custom type or function that will be passed the direct response + :return: bool, or the result of cls(response) + :rtype: bool + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop("cls", None) # type: ClsType[None] + error_map = {401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop("error_map", {})) + + request = build_head200_request( + template_url=self.head200.metadata["url"], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, stream=False, **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200, 404]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + return 200 <= response.status_code <= 299 + + head200.metadata = {"url": "/http/success/200"} # type: ignore + + @distributed_trace_async + async def head204(self, **kwargs: Any) -> bool: + """Return 204 status code if successful. + + :keyword callable cls: A custom type or function that will be passed the direct response + :return: bool, or the result of cls(response) + :rtype: bool + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop("cls", None) # type: ClsType[None] + error_map = {401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop("error_map", {})) + + request = build_head204_request( + template_url=self.head204.metadata["url"], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, stream=False, **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [204, 404]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + return 200 <= response.status_code <= 299 + + head204.metadata = {"url": "/http/success/204"} # type: ignore + + @distributed_trace_async + async def head404(self, **kwargs: Any) -> bool: + """Return 404 status code if successful. + + :keyword callable cls: A custom type or function that will be passed the direct response + :return: bool, or the result of cls(response) + :rtype: bool + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop("cls", None) # type: ClsType[None] + error_map = {401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop("error_map", {})) + + request = build_head404_request( + template_url=self.head404.metadata["url"], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, stream=False, **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [204, 404]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + return 200 <= response.status_code <= 299 + + head404.metadata = {"url": "/http/success/404"} # type: ignore diff --git a/test/azure/legacy/Expected/AcceptanceTests/PackageModeCustomize/azure/packagemode/customize/operations/__init__.py b/test/azure/legacy/Expected/AcceptanceTests/PackageModeCustomize/azure/packagemode/customize/operations/__init__.py new file mode 100644 index 00000000000..58d4a9d9543 --- /dev/null +++ b/test/azure/legacy/Expected/AcceptanceTests/PackageModeCustomize/azure/packagemode/customize/operations/__init__.py @@ -0,0 +1,13 @@ +# 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 ._http_success_operations import HttpSuccessOperations + +__all__ = [ + "HttpSuccessOperations", +] diff --git a/test/azure/legacy/Expected/AcceptanceTests/PackageModeCustomize/azure/packagemode/customize/operations/_http_success_operations.py b/test/azure/legacy/Expected/AcceptanceTests/PackageModeCustomize/azure/packagemode/customize/operations/_http_success_operations.py new file mode 100644 index 00000000000..e93845d2290 --- /dev/null +++ b/test/azure/legacy/Expected/AcceptanceTests/PackageModeCustomize/azure/packagemode/customize/operations/_http_success_operations.py @@ -0,0 +1,207 @@ +# pylint: disable=too-many-lines +# 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 msrest import Serializer + +from azure.core.exceptions import ( + ClientAuthenticationError, + HttpResponseError, + ResourceExistsError, + ResourceNotFoundError, + map_error, +) +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import HttpResponse +from azure.core.rest import HttpRequest +from azure.core.tracing.decorator import distributed_trace +from azure.mgmt.core.exceptions import ARMErrorFormat + +from .._vendor import _convert_request + +if TYPE_CHECKING: + # pylint: disable=unused-import,ungrouped-imports + from typing import Any, Callable, Dict, Optional, TypeVar + + T = TypeVar("T") + ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] + +_SERIALIZER = Serializer() +_SERIALIZER.client_side_validation = False +# fmt: off + +def build_head200_request( + **kwargs # type: Any +): + # type: (...) -> HttpRequest + # Construct URL + _url = kwargs.pop("template_url", "/http/success/200") + + return HttpRequest( + method="HEAD", + url=_url, + **kwargs + ) + + +def build_head204_request( + **kwargs # type: Any +): + # type: (...) -> HttpRequest + # Construct URL + _url = kwargs.pop("template_url", "/http/success/204") + + return HttpRequest( + method="HEAD", + url=_url, + **kwargs + ) + + +def build_head404_request( + **kwargs # type: Any +): + # type: (...) -> HttpRequest + # Construct URL + _url = kwargs.pop("template_url", "/http/success/404") + + return HttpRequest( + method="HEAD", + url=_url, + **kwargs + ) + +# fmt: on +class HttpSuccessOperations(object): + """ + .. warning:: + **DO NOT** instantiate this class directly. + + Instead, you should access the following operations through + :class:`~azure.packagemode.customize.AutoRestHeadTestService`'s + :attr:`http_success` attribute. + """ + + def __init__(self, *args, **kwargs): + args = list(args) + self._client = args.pop(0) if args else kwargs.pop("client") + self._config = args.pop(0) if args else kwargs.pop("config") + self._serialize = args.pop(0) if args else kwargs.pop("serializer") + self._deserialize = args.pop(0) if args else kwargs.pop("deserializer") + + @distributed_trace + def head200( + self, **kwargs # type: Any + ): + # type: (...) -> bool + """Return 200 status code if successful. + + :keyword callable cls: A custom type or function that will be passed the direct response + :return: bool, or the result of cls(response) + :rtype: bool + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop("cls", None) # type: ClsType[None] + error_map = {401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop("error_map", {})) + + request = build_head200_request( + template_url=self.head200.metadata["url"], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, stream=False, **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200, 404]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + return 200 <= response.status_code <= 299 + + head200.metadata = {"url": "/http/success/200"} # type: ignore + + @distributed_trace + def head204( + self, **kwargs # type: Any + ): + # type: (...) -> bool + """Return 204 status code if successful. + + :keyword callable cls: A custom type or function that will be passed the direct response + :return: bool, or the result of cls(response) + :rtype: bool + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop("cls", None) # type: ClsType[None] + error_map = {401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop("error_map", {})) + + request = build_head204_request( + template_url=self.head204.metadata["url"], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, stream=False, **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [204, 404]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + return 200 <= response.status_code <= 299 + + head204.metadata = {"url": "/http/success/204"} # type: ignore + + @distributed_trace + def head404( + self, **kwargs # type: Any + ): + # type: (...) -> bool + """Return 404 status code if successful. + + :keyword callable cls: A custom type or function that will be passed the direct response + :return: bool, or the result of cls(response) + :rtype: bool + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop("cls", None) # type: ClsType[None] + error_map = {401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop("error_map", {})) + + request = build_head404_request( + template_url=self.head404.metadata["url"], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, stream=False, **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [204, 404]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + return 200 <= response.status_code <= 299 + + head404.metadata = {"url": "/http/success/404"} # type: ignore diff --git a/test/azure/legacy/Expected/AcceptanceTests/PackageModeCustomize/azure/packagemode/customize/py.typed b/test/azure/legacy/Expected/AcceptanceTests/PackageModeCustomize/azure/packagemode/customize/py.typed new file mode 100644 index 00000000000..e5aff4f83af --- /dev/null +++ b/test/azure/legacy/Expected/AcceptanceTests/PackageModeCustomize/azure/packagemode/customize/py.typed @@ -0,0 +1 @@ +# Marker file for PEP 561. \ No newline at end of file diff --git a/test/azure/legacy/Expected/AcceptanceTests/PackageModeCustomize/setup.py b/test/azure/legacy/Expected/AcceptanceTests/PackageModeCustomize/setup.py new file mode 100644 index 00000000000..3a5d3d26364 --- /dev/null +++ b/test/azure/legacy/Expected/AcceptanceTests/PackageModeCustomize/setup.py @@ -0,0 +1,71 @@ +# 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. +# -------------------------------------------------------------------------- +# coding: utf-8 + +import os +import re +from setuptools import setup, find_packages + + +PACKAGE_NAME = "azure-packagemode-customize" +PACKAGE_PPRINT_NAME = "Azure Customized Package Mode" + +# a-b-c => a/b/c +package_folder_path = PACKAGE_NAME.replace("-", "/") + +# Version extraction inspired from 'requests' +with open(os.path.join(package_folder_path, "_version.py"), "r") as fd: + version = re.search(r'^VERSION\s*=\s*[\'"]([^\'"]*)[\'"]', fd.read(), re.MULTILINE).group(1) + +if not version: + raise RuntimeError("Cannot find version information") + + +# To install the library, run the following +# +# python setup.py install +# +# prerequisite: setuptools +# http://pypi.python.org/pypi/setuptools +setup( + name=PACKAGE_NAME, + version=version, + description="Microsoft Azure Package Mode Client Library for Python", + license="MIT License", + author="Microsoft Corporation", + author_email="azpysdkhelp@microsoft.com", + url="https://github.com/Azure/azure-sdk-for-python/tree/main/sdk", + keywords="azure, azure sdk", + classifiers=[ + "Development Status :: 4 - Beta", + "Programming Language :: Python", + "Programming Language :: Python :: 3 :: Only", + "Programming Language :: Python :: 3", + "Programming Language :: Python :: 3.6", + "Programming Language :: Python :: 3.7", + "Programming Language :: Python :: 3.8", + "Programming Language :: Python :: 3.9", + "Programming Language :: Python :: 3.10", + "License :: OSI Approved :: MIT License", + ], + zip_safe=False, + packages=find_packages( + exclude=[ + "tests", + # Exclude packages that will be covered by PEP420 or nspkg + "azure", + "azure.package", + ] + ), + install_requires=[ + "msrest>=0.6.21", + "azure-common~=1.1", + "azure-mgmt-core>=1.3.0,<2.0.0", + ], + python_requires=">=3.6", +) diff --git a/test/azure/legacy/Expected/AcceptanceTests/PackageModeMgmtPlane/CHANGELOG.md b/test/azure/legacy/Expected/AcceptanceTests/PackageModeMgmtPlane/CHANGELOG.md new file mode 100644 index 00000000000..628743d283a --- /dev/null +++ b/test/azure/legacy/Expected/AcceptanceTests/PackageModeMgmtPlane/CHANGELOG.md @@ -0,0 +1,5 @@ +# Release History + +## 1.0.0b1 (1970-01-01) + +- Initial version diff --git a/test/azure/legacy/Expected/AcceptanceTests/PackageModeMgmtPlane/LICENSE b/test/azure/legacy/Expected/AcceptanceTests/PackageModeMgmtPlane/LICENSE new file mode 100644 index 00000000000..63447fd8bbb --- /dev/null +++ b/test/azure/legacy/Expected/AcceptanceTests/PackageModeMgmtPlane/LICENSE @@ -0,0 +1,21 @@ +Copyright (c) Microsoft Corporation. + +MIT License + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED *AS IS*, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. \ No newline at end of file diff --git a/test/azure/legacy/Expected/AcceptanceTests/PackageModeMgmtPlane/MANIFEST.in b/test/azure/legacy/Expected/AcceptanceTests/PackageModeMgmtPlane/MANIFEST.in new file mode 100644 index 00000000000..87f373dff23 --- /dev/null +++ b/test/azure/legacy/Expected/AcceptanceTests/PackageModeMgmtPlane/MANIFEST.in @@ -0,0 +1,6 @@ +include *.md +include LICENSE +recursive-include tests *.py +recursive-include samples *.py *.md +include azure/__init__.py +include azure/package/__init__.py \ No newline at end of file diff --git a/test/azure/legacy/Expected/AcceptanceTests/PackageModeMgmtPlane/README.md b/test/azure/legacy/Expected/AcceptanceTests/PackageModeMgmtPlane/README.md new file mode 100644 index 00000000000..0da75ca6ca3 --- /dev/null +++ b/test/azure/legacy/Expected/AcceptanceTests/PackageModeMgmtPlane/README.md @@ -0,0 +1,22 @@ +# Microsoft Azure SDK for Python + +This is the Microsoft Azure Package Mode Client Library. +This package has been tested with Python 3.6+. +For a more complete view of Azure libraries, see the [azure sdk python release](https://aka.ms/azsdk/python/all). + +# Usage + +To learn how to use this package, see the [quickstart guide](https://aka.ms/azsdk/python/mgmt) + +For docs and references, see [Python SDK References](https://docs.microsoft.com/python/api/overview/azure) +Code samples for this package can be found at [Azure Package Mode](https://docs.microsoft.com/samples/browse/?languages=python&term=Getting%20started%20-%20Managing&terms=Getting%20started%20-%20Managing) on docs.microsoft.com. +Additional code samples for different Azure services are available at [Samples Repo](https://aka.ms/azsdk/python/mgmt/samples) + +# 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-package-mode%2FREADME.png) diff --git a/test/azure/legacy/Expected/AcceptanceTests/PackageModeMgmtPlane/azure/__init__.py b/test/azure/legacy/Expected/AcceptanceTests/PackageModeMgmtPlane/azure/__init__.py new file mode 100644 index 00000000000..d55ccad1f57 --- /dev/null +++ b/test/azure/legacy/Expected/AcceptanceTests/PackageModeMgmtPlane/azure/__init__.py @@ -0,0 +1 @@ +__path__ = __import__("pkgutil").extend_path(__path__, __name__) # type: ignore diff --git a/test/azure/legacy/Expected/AcceptanceTests/PackageModeMgmtPlane/azure/package/__init__.py b/test/azure/legacy/Expected/AcceptanceTests/PackageModeMgmtPlane/azure/package/__init__.py new file mode 100644 index 00000000000..d55ccad1f57 --- /dev/null +++ b/test/azure/legacy/Expected/AcceptanceTests/PackageModeMgmtPlane/azure/package/__init__.py @@ -0,0 +1 @@ +__path__ = __import__("pkgutil").extend_path(__path__, __name__) # type: ignore diff --git a/test/azure/legacy/Expected/AcceptanceTests/PackageModeMgmtPlane/azure/package/mode/__init__.py b/test/azure/legacy/Expected/AcceptanceTests/PackageModeMgmtPlane/azure/package/mode/__init__.py new file mode 100644 index 00000000000..2a478ab434d --- /dev/null +++ b/test/azure/legacy/Expected/AcceptanceTests/PackageModeMgmtPlane/azure/package/mode/__init__.py @@ -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 ._auto_rest_head_test_service import AutoRestHeadTestService +from ._version import VERSION + +__version__ = VERSION +__all__ = ["AutoRestHeadTestService"] + +# `._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() diff --git a/test/azure/legacy/Expected/AcceptanceTests/PackageModeMgmtPlane/azure/package/mode/_auto_rest_head_test_service.py b/test/azure/legacy/Expected/AcceptanceTests/PackageModeMgmtPlane/azure/package/mode/_auto_rest_head_test_service.py new file mode 100644 index 00000000000..47cd974a925 --- /dev/null +++ b/test/azure/legacy/Expected/AcceptanceTests/PackageModeMgmtPlane/azure/package/mode/_auto_rest_head_test_service.py @@ -0,0 +1,92 @@ +# 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 copy import deepcopy +from typing import TYPE_CHECKING + +from msrest import Deserializer, Serializer + +from azure.mgmt.core import ARMPipelineClient + +from ._configuration import AutoRestHeadTestServiceConfiguration +from .operations import HttpSuccessOperations + +if TYPE_CHECKING: + # pylint: disable=unused-import,ungrouped-imports + from typing import Any, Dict + + from azure.core.credentials import TokenCredential + from azure.core.rest import HttpRequest, HttpResponse + + +class AutoRestHeadTestService(object): + """Test Infrastructure for AutoRest. + + :ivar http_success: HttpSuccessOperations operations + :vartype http_success: azure.package.mode.operations.HttpSuccessOperations + :param credential: Credential needed for the client to connect to Azure. + :type credential: ~azure.core.credentials.TokenCredential + :param base_url: Service URL. Default value is "http://localhost:3000". + :type base_url: str + """ + + def __init__( + self, + credential, # type: "TokenCredential" + base_url="http://localhost:3000", # type: str + **kwargs # type: Any + ): + # type: (...) -> None + self._config = AutoRestHeadTestServiceConfiguration(credential=credential, **kwargs) + self._client = ARMPipelineClient(base_url=base_url, config=self._config, **kwargs) + + client_models = {} # type: Dict[str, Any] + self._serialize = Serializer(client_models) + self._deserialize = Deserializer(client_models) + self._serialize.client_side_validation = False + self.http_success = HttpSuccessOperations(self._client, self._config, self._serialize, self._deserialize) + + def _send_request( + self, + request, # type: HttpRequest + **kwargs # type: Any + ): + # type: (...) -> HttpResponse + """Runs the network request through the client's chained policies. + + >>> from azure.core.rest import HttpRequest + >>> request = HttpRequest("GET", "https://www.example.org/") + + >>> response = client._send_request(request) + + + For more information on this code flow, see https://aka.ms/azsdk/python/protocol/quickstart + + :param request: The network request you want to make. Required. + :type request: ~azure.core.rest.HttpRequest + :keyword bool stream: Whether the response payload will be streamed. Defaults to False. + :return: The response of your network call. Does not do error handling on your response. + :rtype: ~azure.core.rest.HttpResponse + """ + + request_copy = deepcopy(request) + request_copy.url = self._client.format_url(request_copy.url) + return self._client.send_request(request_copy, **kwargs) + + def close(self): + # type: () -> None + self._client.close() + + def __enter__(self): + # type: () -> AutoRestHeadTestService + self._client.__enter__() + return self + + def __exit__(self, *exc_details): + # type: (Any) -> None + self._client.__exit__(*exc_details) diff --git a/test/azure/legacy/Expected/AcceptanceTests/PackageModeMgmtPlane/azure/package/mode/_configuration.py b/test/azure/legacy/Expected/AcceptanceTests/PackageModeMgmtPlane/azure/package/mode/_configuration.py new file mode 100644 index 00000000000..e1de77d3bd9 --- /dev/null +++ b/test/azure/legacy/Expected/AcceptanceTests/PackageModeMgmtPlane/azure/package/mode/_configuration.py @@ -0,0 +1,65 @@ +# 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 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 AutoRestHeadTestServiceConfiguration(Configuration): # pylint: disable=too-many-instance-attributes + """Configuration for AutoRestHeadTestService. + + 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 + """ + + def __init__( + self, + credential, # type: "TokenCredential" + **kwargs # type: Any + ): + # type: (...) -> None + super(AutoRestHeadTestServiceConfiguration, self).__init__(**kwargs) + if credential is None: + raise ValueError("Parameter 'credential' must not be None.") + + self.credential = credential + self.credential_scopes = kwargs.pop("credential_scopes", ["https://management.azure.com/.default"]) + kwargs.setdefault("sdk_moniker", "package-mode/{}".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.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 + ) diff --git a/test/azure/legacy/Expected/AcceptanceTests/PackageModeMgmtPlane/azure/package/mode/_patch.py b/test/azure/legacy/Expected/AcceptanceTests/PackageModeMgmtPlane/azure/package/mode/_patch.py new file mode 100644 index 00000000000..f99e77fef98 --- /dev/null +++ b/test/azure/legacy/Expected/AcceptanceTests/PackageModeMgmtPlane/azure/package/mode/_patch.py @@ -0,0 +1,31 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# +# Copyright (c) Microsoft Corporation. All rights reserved. +# +# The MIT License (MIT) +# +# Permission is hereby granted, free of charge, to any person obtaining a copy +# of this software and associated documentation files (the ""Software""), to +# deal in the Software without restriction, including without limitation the +# rights to use, copy, modify, merge, publish, distribute, sublicense, and/or +# sell copies of the Software, and to permit persons to whom the Software is +# furnished to do so, subject to the following conditions: +# +# The above copyright notice and this permission notice shall be included in +# all copies or substantial portions of the Software. +# +# THE SOFTWARE IS PROVIDED *AS IS*, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS +# IN THE SOFTWARE. +# +# -------------------------------------------------------------------------- + +# This file 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 +def patch_sdk(): + pass diff --git a/test/azure/legacy/Expected/AcceptanceTests/PackageModeMgmtPlane/azure/package/mode/_vendor.py b/test/azure/legacy/Expected/AcceptanceTests/PackageModeMgmtPlane/azure/package/mode/_vendor.py new file mode 100644 index 00000000000..0dafe0e287f --- /dev/null +++ b/test/azure/legacy/Expected/AcceptanceTests/PackageModeMgmtPlane/azure/package/mode/_vendor.py @@ -0,0 +1,16 @@ +# -------------------------------------------------------------------------- +# 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 azure.core.pipeline.transport import HttpRequest + + +def _convert_request(request, files=None): + data = request.content if not files else None + request = HttpRequest(method=request.method, url=request.url, headers=request.headers, data=data) + if files: + request.set_formdata_body(files) + return request diff --git a/test/azure/legacy/Expected/AcceptanceTests/PackageModeMgmtPlane/azure/package/mode/_version.py b/test/azure/legacy/Expected/AcceptanceTests/PackageModeMgmtPlane/azure/package/mode/_version.py new file mode 100644 index 00000000000..c47f66669f1 --- /dev/null +++ b/test/azure/legacy/Expected/AcceptanceTests/PackageModeMgmtPlane/azure/package/mode/_version.py @@ -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 = "1.0.0" diff --git a/test/azure/legacy/Expected/AcceptanceTests/PackageModeMgmtPlane/azure/package/mode/aio/__init__.py b/test/azure/legacy/Expected/AcceptanceTests/PackageModeMgmtPlane/azure/package/mode/aio/__init__.py new file mode 100644 index 00000000000..6c3806fafee --- /dev/null +++ b/test/azure/legacy/Expected/AcceptanceTests/PackageModeMgmtPlane/azure/package/mode/aio/__init__.py @@ -0,0 +1,17 @@ +# 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 ._auto_rest_head_test_service import AutoRestHeadTestService + +__all__ = ["AutoRestHeadTestService"] + +# `._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() diff --git a/test/azure/legacy/Expected/AcceptanceTests/PackageModeMgmtPlane/azure/package/mode/aio/_auto_rest_head_test_service.py b/test/azure/legacy/Expected/AcceptanceTests/PackageModeMgmtPlane/azure/package/mode/aio/_auto_rest_head_test_service.py new file mode 100644 index 00000000000..750d99bc170 --- /dev/null +++ b/test/azure/legacy/Expected/AcceptanceTests/PackageModeMgmtPlane/azure/package/mode/aio/_auto_rest_head_test_service.py @@ -0,0 +1,80 @@ +# 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 copy import deepcopy +from typing import Any, Awaitable, TYPE_CHECKING + +from msrest import Deserializer, Serializer + +from azure.core.rest import AsyncHttpResponse, HttpRequest +from azure.mgmt.core import AsyncARMPipelineClient + +from ._configuration import AutoRestHeadTestServiceConfiguration +from .operations import HttpSuccessOperations + +if TYPE_CHECKING: + # pylint: disable=unused-import,ungrouped-imports + from typing import Dict + + from azure.core.credentials_async import AsyncTokenCredential + + +class AutoRestHeadTestService: + """Test Infrastructure for AutoRest. + + :ivar http_success: HttpSuccessOperations operations + :vartype http_success: azure.package.mode.aio.operations.HttpSuccessOperations + :param credential: Credential needed for the client to connect to Azure. + :type credential: ~azure.core.credentials_async.AsyncTokenCredential + :param base_url: Service URL. Default value is "http://localhost:3000". + :type base_url: str + """ + + def __init__( + self, credential: "AsyncTokenCredential", base_url: str = "http://localhost:3000", **kwargs: Any + ) -> None: + self._config = AutoRestHeadTestServiceConfiguration(credential=credential, **kwargs) + self._client = AsyncARMPipelineClient(base_url=base_url, config=self._config, **kwargs) + + client_models = {} # type: Dict[str, Any] + self._serialize = Serializer(client_models) + self._deserialize = Deserializer(client_models) + self._serialize.client_side_validation = False + self.http_success = HttpSuccessOperations(self._client, self._config, self._serialize, self._deserialize) + + def _send_request(self, request: HttpRequest, **kwargs: Any) -> Awaitable[AsyncHttpResponse]: + """Runs the network request through the client's chained policies. + + >>> from azure.core.rest import HttpRequest + >>> request = HttpRequest("GET", "https://www.example.org/") + + >>> response = await client._send_request(request) + + + For more information on this code flow, see https://aka.ms/azsdk/python/protocol/quickstart + + :param request: The network request you want to make. Required. + :type request: ~azure.core.rest.HttpRequest + :keyword bool stream: Whether the response payload will be streamed. Defaults to False. + :return: The response of your network call. Does not do error handling on your response. + :rtype: ~azure.core.rest.AsyncHttpResponse + """ + + request_copy = deepcopy(request) + request_copy.url = self._client.format_url(request_copy.url) + return self._client.send_request(request_copy, **kwargs) + + async def close(self) -> None: + await self._client.close() + + async def __aenter__(self) -> "AutoRestHeadTestService": + await self._client.__aenter__() + return self + + async def __aexit__(self, *exc_details) -> None: + await self._client.__aexit__(*exc_details) diff --git a/test/azure/legacy/Expected/AcceptanceTests/PackageModeMgmtPlane/azure/package/mode/aio/_configuration.py b/test/azure/legacy/Expected/AcceptanceTests/PackageModeMgmtPlane/azure/package/mode/aio/_configuration.py new file mode 100644 index 00000000000..689b0ff10fb --- /dev/null +++ b/test/azure/legacy/Expected/AcceptanceTests/PackageModeMgmtPlane/azure/package/mode/aio/_configuration.py @@ -0,0 +1,55 @@ +# 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 Any, TYPE_CHECKING + +from azure.core.configuration import Configuration +from azure.core.pipeline import policies +from azure.mgmt.core.policies import ARMHttpLoggingPolicy, AsyncARMChallengeAuthenticationPolicy + +from .._version import VERSION + +if TYPE_CHECKING: + # pylint: disable=unused-import,ungrouped-imports + from azure.core.credentials_async import AsyncTokenCredential + + +class AutoRestHeadTestServiceConfiguration(Configuration): # pylint: disable=too-many-instance-attributes + """Configuration for AutoRestHeadTestService. + + 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_async.AsyncTokenCredential + """ + + def __init__(self, credential: "AsyncTokenCredential", **kwargs: Any) -> None: + super(AutoRestHeadTestServiceConfiguration, self).__init__(**kwargs) + if credential is None: + raise ValueError("Parameter 'credential' must not be None.") + + self.credential = credential + self.credential_scopes = kwargs.pop("credential_scopes", ["https://management.azure.com/.default"]) + kwargs.setdefault("sdk_moniker", "package-mode/{}".format(VERSION)) + 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") + if self.credential and not self.authentication_policy: + self.authentication_policy = AsyncARMChallengeAuthenticationPolicy( + self.credential, *self.credential_scopes, **kwargs + ) diff --git a/test/azure/legacy/Expected/AcceptanceTests/PackageModeMgmtPlane/azure/package/mode/aio/_patch.py b/test/azure/legacy/Expected/AcceptanceTests/PackageModeMgmtPlane/azure/package/mode/aio/_patch.py new file mode 100644 index 00000000000..f99e77fef98 --- /dev/null +++ b/test/azure/legacy/Expected/AcceptanceTests/PackageModeMgmtPlane/azure/package/mode/aio/_patch.py @@ -0,0 +1,31 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# +# Copyright (c) Microsoft Corporation. All rights reserved. +# +# The MIT License (MIT) +# +# Permission is hereby granted, free of charge, to any person obtaining a copy +# of this software and associated documentation files (the ""Software""), to +# deal in the Software without restriction, including without limitation the +# rights to use, copy, modify, merge, publish, distribute, sublicense, and/or +# sell copies of the Software, and to permit persons to whom the Software is +# furnished to do so, subject to the following conditions: +# +# The above copyright notice and this permission notice shall be included in +# all copies or substantial portions of the Software. +# +# THE SOFTWARE IS PROVIDED *AS IS*, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS +# IN THE SOFTWARE. +# +# -------------------------------------------------------------------------- + +# This file 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 +def patch_sdk(): + pass diff --git a/test/azure/legacy/Expected/AcceptanceTests/PackageModeMgmtPlane/azure/package/mode/aio/operations/__init__.py b/test/azure/legacy/Expected/AcceptanceTests/PackageModeMgmtPlane/azure/package/mode/aio/operations/__init__.py new file mode 100644 index 00000000000..58d4a9d9543 --- /dev/null +++ b/test/azure/legacy/Expected/AcceptanceTests/PackageModeMgmtPlane/azure/package/mode/aio/operations/__init__.py @@ -0,0 +1,13 @@ +# 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 ._http_success_operations import HttpSuccessOperations + +__all__ = [ + "HttpSuccessOperations", +] diff --git a/test/azure/legacy/Expected/AcceptanceTests/PackageModeMgmtPlane/azure/package/mode/aio/operations/_http_success_operations.py b/test/azure/legacy/Expected/AcceptanceTests/PackageModeMgmtPlane/azure/package/mode/aio/operations/_http_success_operations.py new file mode 100644 index 00000000000..edc9954bc9d --- /dev/null +++ b/test/azure/legacy/Expected/AcceptanceTests/PackageModeMgmtPlane/azure/package/mode/aio/operations/_http_success_operations.py @@ -0,0 +1,148 @@ +# pylint: disable=too-many-lines +# 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 Any, Callable, Dict, Optional, TypeVar + +from azure.core.exceptions import ( + ClientAuthenticationError, + HttpResponseError, + ResourceExistsError, + ResourceNotFoundError, + map_error, +) +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import AsyncHttpResponse +from azure.core.rest import HttpRequest +from azure.core.tracing.decorator_async import distributed_trace_async +from azure.mgmt.core.exceptions import ARMErrorFormat + +from ..._vendor import _convert_request +from ...operations._http_success_operations import build_head200_request, build_head204_request, build_head404_request + +T = TypeVar("T") +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] + + +class HttpSuccessOperations: + """ + .. warning:: + **DO NOT** instantiate this class directly. + + Instead, you should access the following operations through + :class:`~azure.package.mode.aio.AutoRestHeadTestService`'s + :attr:`http_success` attribute. + """ + + def __init__(self, *args, **kwargs) -> None: + args = list(args) + self._client = args.pop(0) if args else kwargs.pop("client") + self._config = args.pop(0) if args else kwargs.pop("config") + self._serialize = args.pop(0) if args else kwargs.pop("serializer") + self._deserialize = args.pop(0) if args else kwargs.pop("deserializer") + + @distributed_trace_async + async def head200(self, **kwargs: Any) -> bool: + """Return 200 status code if successful. + + :keyword callable cls: A custom type or function that will be passed the direct response + :return: bool, or the result of cls(response) + :rtype: bool + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop("cls", None) # type: ClsType[None] + error_map = {401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop("error_map", {})) + + request = build_head200_request( + template_url=self.head200.metadata["url"], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, stream=False, **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200, 404]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + return 200 <= response.status_code <= 299 + + head200.metadata = {"url": "/http/success/200"} # type: ignore + + @distributed_trace_async + async def head204(self, **kwargs: Any) -> bool: + """Return 204 status code if successful. + + :keyword callable cls: A custom type or function that will be passed the direct response + :return: bool, or the result of cls(response) + :rtype: bool + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop("cls", None) # type: ClsType[None] + error_map = {401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop("error_map", {})) + + request = build_head204_request( + template_url=self.head204.metadata["url"], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, stream=False, **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [204, 404]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + return 200 <= response.status_code <= 299 + + head204.metadata = {"url": "/http/success/204"} # type: ignore + + @distributed_trace_async + async def head404(self, **kwargs: Any) -> bool: + """Return 404 status code if successful. + + :keyword callable cls: A custom type or function that will be passed the direct response + :return: bool, or the result of cls(response) + :rtype: bool + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop("cls", None) # type: ClsType[None] + error_map = {401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop("error_map", {})) + + request = build_head404_request( + template_url=self.head404.metadata["url"], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, stream=False, **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [204, 404]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + return 200 <= response.status_code <= 299 + + head404.metadata = {"url": "/http/success/404"} # type: ignore diff --git a/test/azure/legacy/Expected/AcceptanceTests/PackageModeMgmtPlane/azure/package/mode/operations/__init__.py b/test/azure/legacy/Expected/AcceptanceTests/PackageModeMgmtPlane/azure/package/mode/operations/__init__.py new file mode 100644 index 00000000000..58d4a9d9543 --- /dev/null +++ b/test/azure/legacy/Expected/AcceptanceTests/PackageModeMgmtPlane/azure/package/mode/operations/__init__.py @@ -0,0 +1,13 @@ +# 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 ._http_success_operations import HttpSuccessOperations + +__all__ = [ + "HttpSuccessOperations", +] diff --git a/test/azure/legacy/Expected/AcceptanceTests/PackageModeMgmtPlane/azure/package/mode/operations/_http_success_operations.py b/test/azure/legacy/Expected/AcceptanceTests/PackageModeMgmtPlane/azure/package/mode/operations/_http_success_operations.py new file mode 100644 index 00000000000..dd64c5c68e1 --- /dev/null +++ b/test/azure/legacy/Expected/AcceptanceTests/PackageModeMgmtPlane/azure/package/mode/operations/_http_success_operations.py @@ -0,0 +1,207 @@ +# pylint: disable=too-many-lines +# 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 msrest import Serializer + +from azure.core.exceptions import ( + ClientAuthenticationError, + HttpResponseError, + ResourceExistsError, + ResourceNotFoundError, + map_error, +) +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import HttpResponse +from azure.core.rest import HttpRequest +from azure.core.tracing.decorator import distributed_trace +from azure.mgmt.core.exceptions import ARMErrorFormat + +from .._vendor import _convert_request + +if TYPE_CHECKING: + # pylint: disable=unused-import,ungrouped-imports + from typing import Any, Callable, Dict, Optional, TypeVar + + T = TypeVar("T") + ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] + +_SERIALIZER = Serializer() +_SERIALIZER.client_side_validation = False +# fmt: off + +def build_head200_request( + **kwargs # type: Any +): + # type: (...) -> HttpRequest + # Construct URL + _url = kwargs.pop("template_url", "/http/success/200") + + return HttpRequest( + method="HEAD", + url=_url, + **kwargs + ) + + +def build_head204_request( + **kwargs # type: Any +): + # type: (...) -> HttpRequest + # Construct URL + _url = kwargs.pop("template_url", "/http/success/204") + + return HttpRequest( + method="HEAD", + url=_url, + **kwargs + ) + + +def build_head404_request( + **kwargs # type: Any +): + # type: (...) -> HttpRequest + # Construct URL + _url = kwargs.pop("template_url", "/http/success/404") + + return HttpRequest( + method="HEAD", + url=_url, + **kwargs + ) + +# fmt: on +class HttpSuccessOperations(object): + """ + .. warning:: + **DO NOT** instantiate this class directly. + + Instead, you should access the following operations through + :class:`~azure.package.mode.AutoRestHeadTestService`'s + :attr:`http_success` attribute. + """ + + def __init__(self, *args, **kwargs): + args = list(args) + self._client = args.pop(0) if args else kwargs.pop("client") + self._config = args.pop(0) if args else kwargs.pop("config") + self._serialize = args.pop(0) if args else kwargs.pop("serializer") + self._deserialize = args.pop(0) if args else kwargs.pop("deserializer") + + @distributed_trace + def head200( + self, **kwargs # type: Any + ): + # type: (...) -> bool + """Return 200 status code if successful. + + :keyword callable cls: A custom type or function that will be passed the direct response + :return: bool, or the result of cls(response) + :rtype: bool + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop("cls", None) # type: ClsType[None] + error_map = {401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop("error_map", {})) + + request = build_head200_request( + template_url=self.head200.metadata["url"], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, stream=False, **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200, 404]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + return 200 <= response.status_code <= 299 + + head200.metadata = {"url": "/http/success/200"} # type: ignore + + @distributed_trace + def head204( + self, **kwargs # type: Any + ): + # type: (...) -> bool + """Return 204 status code if successful. + + :keyword callable cls: A custom type or function that will be passed the direct response + :return: bool, or the result of cls(response) + :rtype: bool + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop("cls", None) # type: ClsType[None] + error_map = {401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop("error_map", {})) + + request = build_head204_request( + template_url=self.head204.metadata["url"], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, stream=False, **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [204, 404]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + return 200 <= response.status_code <= 299 + + head204.metadata = {"url": "/http/success/204"} # type: ignore + + @distributed_trace + def head404( + self, **kwargs # type: Any + ): + # type: (...) -> bool + """Return 404 status code if successful. + + :keyword callable cls: A custom type or function that will be passed the direct response + :return: bool, or the result of cls(response) + :rtype: bool + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop("cls", None) # type: ClsType[None] + error_map = {401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop("error_map", {})) + + request = build_head404_request( + template_url=self.head404.metadata["url"], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, stream=False, **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [204, 404]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + return 200 <= response.status_code <= 299 + + head404.metadata = {"url": "/http/success/404"} # type: ignore diff --git a/test/azure/legacy/Expected/AcceptanceTests/PackageModeMgmtPlane/azure/package/mode/py.typed b/test/azure/legacy/Expected/AcceptanceTests/PackageModeMgmtPlane/azure/package/mode/py.typed new file mode 100644 index 00000000000..e5aff4f83af --- /dev/null +++ b/test/azure/legacy/Expected/AcceptanceTests/PackageModeMgmtPlane/azure/package/mode/py.typed @@ -0,0 +1 @@ +# Marker file for PEP 561. \ No newline at end of file diff --git a/test/azure/legacy/Expected/AcceptanceTests/PackageModeMgmtPlane/dev_requirements.txt b/test/azure/legacy/Expected/AcceptanceTests/PackageModeMgmtPlane/dev_requirements.txt new file mode 100644 index 00000000000..0a1a05a54bb --- /dev/null +++ b/test/azure/legacy/Expected/AcceptanceTests/PackageModeMgmtPlane/dev_requirements.txt @@ -0,0 +1,6 @@ +-e ../../../tools/azure-devtools +-e ../../../tools/azure-sdk-tools +../../core/azure-core +../../identity/azure-identity +../../core/azure-mgmt-core +aiohttp \ No newline at end of file diff --git a/test/azure/legacy/Expected/AcceptanceTests/PackageModeMgmtPlane/setup.py b/test/azure/legacy/Expected/AcceptanceTests/PackageModeMgmtPlane/setup.py new file mode 100644 index 00000000000..66b58fddf53 --- /dev/null +++ b/test/azure/legacy/Expected/AcceptanceTests/PackageModeMgmtPlane/setup.py @@ -0,0 +1,66 @@ +# 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. +# -------------------------------------------------------------------------- +# coding: utf-8 + +import os +import re +from setuptools import setup, find_packages + + +PACKAGE_NAME = "azure-package-mode" +PACKAGE_PPRINT_NAME = "Azure Package Mode" + +# a-b-c => a/b/c +package_folder_path = PACKAGE_NAME.replace("-", "/") + +# Version extraction inspired from 'requests' +with open(os.path.join(package_folder_path, "_version.py"), "r") as fd: + version = re.search(r'^VERSION\s*=\s*[\'"]([^\'"]*)[\'"]', fd.read(), re.MULTILINE).group(1) + +if not version: + raise RuntimeError("Cannot find version information") + + +setup( + name=PACKAGE_NAME, + version=version, + description="Microsoft Azure Package Mode Client Library for Python", + long_description=open("README.md", "r").read(), + long_description_content_type="text/markdown", + license="MIT License", + author="Microsoft Corporation", + author_email="azpysdkhelp@microsoft.com", + url="https://github.com/Azure/azure-sdk-for-python/tree/main/sdk", + keywords="azure, azure sdk", + classifiers=[ + "Development Status :: 5 - Production/Stable", + "Programming Language :: Python", + "Programming Language :: Python :: 3 :: Only", + "Programming Language :: Python :: 3", + "Programming Language :: Python :: 3.6", + "Programming Language :: Python :: 3.7", + "Programming Language :: Python :: 3.8", + "Programming Language :: Python :: 3.9", + "Programming Language :: Python :: 3.10", + "License :: OSI Approved :: MIT License", + ], + zip_safe=False, + packages=find_packages( + exclude=[ + "tests", + # Exclude packages that will be covered by PEP420 or nspkg + "azure", + "azure.package", + ] + ), + install_requires=[ + "msrest>=0.6.21", + "azure-mgmt-core>=1.3.0,<2.0.0", + ], + python_requires=">=3.6", +) diff --git a/test/azure/legacy/Expected/AcceptanceTests/Paging/setup.py b/test/azure/legacy/Expected/AcceptanceTests/Paging/setup.py index 3e9c4b351e5..24ef2916921 100644 --- a/test/azure/legacy/Expected/AcceptanceTests/Paging/setup.py +++ b/test/azure/legacy/Expected/AcceptanceTests/Paging/setup.py @@ -6,31 +6,24 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- # coding: utf-8 - from setuptools import setup, find_packages -NAME = "autorestpagingtestservice" -VERSION = "0.1.0" - -# To install the library, run the following -# -# python setup.py install -# -# prerequisite: setuptools -# http://pypi.python.org/pypi/setuptools - -REQUIRES = ["msrest>=0.6.21", "azure-core<2.0.0,>=1.20.1"] +PACKAGE_NAME = "autorestpagingtestservice" +version = "0.1.0" setup( - name=NAME, - version=VERSION, + name=PACKAGE_NAME, + version=version, description="AutoRestPagingTestService", author_email="", url="", - keywords=["Swagger", "AutoRestPagingTestService"], - install_requires=REQUIRES, + keywords="azure, azure sdk", packages=find_packages(), include_package_data=True, + install_requires=[ + "msrest>=0.6.21", + "azure-core<2.0.0,>=1.20.1", + ], long_description="""\ Long-running Operation for AutoRest. """, diff --git a/test/azure/legacy/Expected/AcceptanceTests/StorageManagementClient/setup.py b/test/azure/legacy/Expected/AcceptanceTests/StorageManagementClient/setup.py index a553c7263e5..f5b20e508d4 100644 --- a/test/azure/legacy/Expected/AcceptanceTests/StorageManagementClient/setup.py +++ b/test/azure/legacy/Expected/AcceptanceTests/StorageManagementClient/setup.py @@ -6,31 +6,24 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- # coding: utf-8 - from setuptools import setup, find_packages -NAME = "storagemanagementclient" -VERSION = "0.1.0" - -# To install the library, run the following -# -# python setup.py install -# -# prerequisite: setuptools -# http://pypi.python.org/pypi/setuptools - -REQUIRES = ["msrest>=0.6.21", "azure-core<2.0.0,>=1.20.1", "azure-mgmt-core<2.0.0,>=1.2.1"] +PACKAGE_NAME = "storagemanagementclient" +version = "0.1.0" setup( - name=NAME, - version=VERSION, + name=PACKAGE_NAME, + version=version, description="StorageManagementClient", author_email="", url="", - keywords=["Swagger", "StorageManagementClient"], - install_requires=REQUIRES, + keywords="azure, azure sdk", packages=find_packages(), include_package_data=True, + install_requires=[ + "msrest>=0.6.21", + "azure-mgmt-core>=1.3.0,<2.0.0", + ], long_description="""\ StorageManagementClient. """, diff --git a/test/azure/legacy/Expected/AcceptanceTests/SubscriptionIdApiVersion/setup.py b/test/azure/legacy/Expected/AcceptanceTests/SubscriptionIdApiVersion/setup.py index 134ed19236e..ae89cf44ecf 100644 --- a/test/azure/legacy/Expected/AcceptanceTests/SubscriptionIdApiVersion/setup.py +++ b/test/azure/legacy/Expected/AcceptanceTests/SubscriptionIdApiVersion/setup.py @@ -6,31 +6,24 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- # coding: utf-8 - from setuptools import setup, find_packages -NAME = "microsoftazuretesturl" -VERSION = "0.1.0" - -# To install the library, run the following -# -# python setup.py install -# -# prerequisite: setuptools -# http://pypi.python.org/pypi/setuptools - -REQUIRES = ["msrest>=0.6.21", "azure-core<2.0.0,>=1.20.1", "azure-mgmt-core<2.0.0,>=1.2.1"] +PACKAGE_NAME = "microsoftazuretesturl" +version = "0.1.0" setup( - name=NAME, - version=VERSION, + name=PACKAGE_NAME, + version=version, description="MicrosoftAzureTestUrl", author_email="", url="", - keywords=["Swagger", "MicrosoftAzureTestUrl"], - install_requires=REQUIRES, + keywords="azure, azure sdk", packages=find_packages(), include_package_data=True, + install_requires=[ + "msrest>=0.6.21", + "azure-mgmt-core>=1.3.0,<2.0.0", + ], long_description="""\ Some cool documentation. """, diff --git a/test/azure/legacy/requirements.txt b/test/azure/legacy/requirements.txt index 54c70f07951..bbe45f71c06 100644 --- a/test/azure/legacy/requirements.txt +++ b/test/azure/legacy/requirements.txt @@ -21,4 +21,6 @@ msrest==0.6.21 -e ./Expected/AcceptanceTests/StorageManagementClient -e ./Expected/AcceptanceTests/SubscriptionIdApiVersion -e ./Expected/AcceptanceTests/CustomPollerPager --e ./Expected/AcceptanceTests/CustomPollerPagerDefinitions \ No newline at end of file +-e ./Expected/AcceptanceTests/CustomPollerPagerDefinitions +-e ./Expected/AcceptanceTests/PackageModeMgmtPlane +-e ./Expected/AcceptanceTests/PackageModeCustomize \ No newline at end of file diff --git a/test/azure/legacy/specification/packagemodecustomize/README.md b/test/azure/legacy/specification/packagemodecustomize/README.md new file mode 100644 index 00000000000..106d6677eb4 --- /dev/null +++ b/test/azure/legacy/specification/packagemodecustomize/README.md @@ -0,0 +1,25 @@ +# Testing package-mode + +### Settings + +``` yaml +input-file: ../../../../../node_modules/@microsoft.azure/autorest.testserver/swagger/head.json +output-folder: $(python-sdks-folder)/azure/legacy/Expected/AcceptanceTests/PackageModeCustomize +namespace: azure.packagemode.customize +package-name: azure-packagemode-customize +license-header: MICROSOFT_MIT_NO_VERSION +azure-arm: true +add-credentials: true +package-version: 0.1.0 +output-artifact: code-model-v4-no-tags +payload-flattening-threshold: 1 +clear-output-folder: true +black: true +package-mode: test/azure/legacy/specification/packagemodecustomize/template +``` + +```yaml $(package-mode) +package-configuration: + min_python_version: 3.6 + key_words: "azure, azure sdk" +``` diff --git a/test/azure/legacy/specification/packagemodecustomize/template/setup.py.jinja2 b/test/azure/legacy/specification/packagemodecustomize/template/setup.py.jinja2 new file mode 100644 index 00000000000..b00b5d01c5e --- /dev/null +++ b/test/azure/legacy/specification/packagemodecustomize/template/setup.py.jinja2 @@ -0,0 +1,71 @@ +# 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. +# -------------------------------------------------------------------------- +# coding: utf-8 + +import os +import re +from setuptools import setup, find_packages + + +PACKAGE_NAME = "azure-packagemode-customize" +PACKAGE_PPRINT_NAME = "Azure Customized Package Mode" + +# a-b-c => a/b/c +package_folder_path = PACKAGE_NAME.replace("-", "/") + +# Version extraction inspired from 'requests' +with open(os.path.join(package_folder_path, "_version.py"), "r") as fd: + version = re.search(r'^VERSION\s*=\s*[\'"]([^\'"]*)[\'"]', fd.read(), re.MULTILINE).group(1) + +if not version: + raise RuntimeError("Cannot find version information") + + +# To install the library, run the following +# +# python setup.py install +# +# prerequisite: setuptools +# http://pypi.python.org/pypi/setuptools +setup( + name=PACKAGE_NAME, + version=version, + description="Microsoft Azure Package Mode Client Library for Python", + license="MIT License", + author="Microsoft Corporation", + author_email="azpysdkhelp@microsoft.com", + url="https://github.com/Azure/azure-sdk-for-python/tree/main/sdk", + keywords="{{ key_words }}", + classifiers=[ + "Development Status :: 4 - Beta", + "Programming Language :: Python", + "Programming Language :: Python :: 3 :: Only", + "Programming Language :: Python :: 3", + "Programming Language :: Python :: 3.6", + "Programming Language :: Python :: 3.7", + "Programming Language :: Python :: 3.8", + "Programming Language :: Python :: 3.9", + "Programming Language :: Python :: 3.10", + "License :: OSI Approved :: MIT License", + ], + zip_safe=False, + packages=find_packages( + exclude=[ + "tests", + # Exclude packages that will be covered by PEP420 or nspkg + "azure", + "azure.package", + ] + ), + install_requires=[ + "msrest>=0.6.21", + "azure-common~=1.1", + "azure-mgmt-core>=1.3.0,<2.0.0", + ], + python_requires=">={{ min_python_version }}", +) diff --git a/test/azure/legacy/specification/packagemodemgmtplane/README.md b/test/azure/legacy/specification/packagemodemgmtplane/README.md new file mode 100644 index 00000000000..a4c9348015f --- /dev/null +++ b/test/azure/legacy/specification/packagemodemgmtplane/README.md @@ -0,0 +1,20 @@ +# Testing package-mode + +### Settings + +``` yaml +input-file: ../../../../../node_modules/@microsoft.azure/autorest.testserver/swagger/head.json +output-folder: $(python-sdks-folder)/azure/legacy/Expected/AcceptanceTests/PackageModeMgmtPlane +namespace: azure.package.mode +package-name: azure-package-mode +package-pprint-name: Azure Package Mode +license-header: MICROSOFT_MIT_NO_VERSION +azure-arm: true +add-credentials: true +package-version: 1.0.0 +output-artifact: code-model-v4-no-tags +payload-flattening-threshold: 1 +clear-output-folder: true +black: true +package-mode: mgmtplane +``` diff --git a/test/azure/low-level/Expected/AcceptanceTests/AzureBodyDurationLowLevel/setup.py b/test/azure/low-level/Expected/AcceptanceTests/AzureBodyDurationLowLevel/setup.py index 385afe6573c..6ecee859197 100644 --- a/test/azure/low-level/Expected/AcceptanceTests/AzureBodyDurationLowLevel/setup.py +++ b/test/azure/low-level/Expected/AcceptanceTests/AzureBodyDurationLowLevel/setup.py @@ -6,31 +6,24 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- # coding: utf-8 - from setuptools import setup, find_packages -NAME = "autorestdurationtestservice" -VERSION = "0.1.0" - -# To install the library, run the following -# -# python setup.py install -# -# prerequisite: setuptools -# http://pypi.python.org/pypi/setuptools - -REQUIRES = ["msrest>=0.6.21", "azure-core<2.0.0,>=1.20.1"] +PACKAGE_NAME = "autorestdurationtestservice" +version = "0.1.0" setup( - name=NAME, - version=VERSION, + name=PACKAGE_NAME, + version=version, description="AutoRestDurationTestService", author_email="", url="", - keywords=["Swagger", "AutoRestDurationTestService"], - install_requires=REQUIRES, + keywords="azure, azure sdk", packages=find_packages(), include_package_data=True, + install_requires=[ + "msrest>=0.6.21", + "azure-core<2.0.0,>=1.20.1", + ], long_description="""\ Test Infrastructure for AutoRest. """, diff --git a/test/azure/low-level/Expected/AcceptanceTests/AzureParameterGroupingLowLevel/setup.py b/test/azure/low-level/Expected/AcceptanceTests/AzureParameterGroupingLowLevel/setup.py index 5b4af33fe8a..33f56ba7f54 100644 --- a/test/azure/low-level/Expected/AcceptanceTests/AzureParameterGroupingLowLevel/setup.py +++ b/test/azure/low-level/Expected/AcceptanceTests/AzureParameterGroupingLowLevel/setup.py @@ -6,31 +6,24 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- # coding: utf-8 - from setuptools import setup, find_packages -NAME = "autorestparametergroupingtestservice" -VERSION = "0.1.0" - -# To install the library, run the following -# -# python setup.py install -# -# prerequisite: setuptools -# http://pypi.python.org/pypi/setuptools - -REQUIRES = ["msrest>=0.6.21", "azure-core<2.0.0,>=1.20.1"] +PACKAGE_NAME = "autorestparametergroupingtestservice" +version = "0.1.0" setup( - name=NAME, - version=VERSION, + name=PACKAGE_NAME, + version=version, description="AutoRestParameterGroupingTestService", author_email="", url="", - keywords=["Swagger", "AutoRestParameterGroupingTestService"], - install_requires=REQUIRES, + keywords="azure, azure sdk", packages=find_packages(), include_package_data=True, + install_requires=[ + "msrest>=0.6.21", + "azure-core<2.0.0,>=1.20.1", + ], long_description="""\ Test Infrastructure for AutoRest. """, diff --git a/test/azure/low-level/Expected/AcceptanceTests/AzureReportLowLevel/setup.py b/test/azure/low-level/Expected/AcceptanceTests/AzureReportLowLevel/setup.py index 94333e8e5a3..74828b58ead 100644 --- a/test/azure/low-level/Expected/AcceptanceTests/AzureReportLowLevel/setup.py +++ b/test/azure/low-level/Expected/AcceptanceTests/AzureReportLowLevel/setup.py @@ -6,31 +6,24 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- # coding: utf-8 - from setuptools import setup, find_packages -NAME = "autorestreportserviceforazure" -VERSION = "0.1.0" - -# To install the library, run the following -# -# python setup.py install -# -# prerequisite: setuptools -# http://pypi.python.org/pypi/setuptools - -REQUIRES = ["msrest>=0.6.21", "azure-core<2.0.0,>=1.20.1"] +PACKAGE_NAME = "autorestreportserviceforazure" +version = "0.1.0" setup( - name=NAME, - version=VERSION, + name=PACKAGE_NAME, + version=version, description="AutoRestReportServiceForAzure", author_email="", url="", - keywords=["Swagger", "AutoRestReportServiceForAzure"], - install_requires=REQUIRES, + keywords="azure, azure sdk", packages=find_packages(), include_package_data=True, + install_requires=[ + "msrest>=0.6.21", + "azure-core<2.0.0,>=1.20.1", + ], long_description="""\ Test Infrastructure for AutoRest. """, diff --git a/test/azure/low-level/Expected/AcceptanceTests/AzureSpecialsLowLevel/setup.py b/test/azure/low-level/Expected/AcceptanceTests/AzureSpecialsLowLevel/setup.py index 4bf95843e93..3749158c9d6 100644 --- a/test/azure/low-level/Expected/AcceptanceTests/AzureSpecialsLowLevel/setup.py +++ b/test/azure/low-level/Expected/AcceptanceTests/AzureSpecialsLowLevel/setup.py @@ -6,31 +6,24 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- # coding: utf-8 - from setuptools import setup, find_packages -NAME = "autorestazurespecialparameterstestclient" -VERSION = "0.1.0" - -# To install the library, run the following -# -# python setup.py install -# -# prerequisite: setuptools -# http://pypi.python.org/pypi/setuptools - -REQUIRES = ["msrest>=0.6.21", "azure-core<2.0.0,>=1.20.1", "azure-mgmt-core<2.0.0,>=1.2.1"] +PACKAGE_NAME = "autorestazurespecialparameterstestclient" +version = "0.1.0" setup( - name=NAME, - version=VERSION, + name=PACKAGE_NAME, + version=version, description="AutoRestAzureSpecialParametersTestClient", author_email="", url="", - keywords=["Swagger", "AutoRestAzureSpecialParametersTestClient"], - install_requires=REQUIRES, + keywords="azure, azure sdk", packages=find_packages(), include_package_data=True, + install_requires=[ + "msrest>=0.6.21", + "azure-mgmt-core>=1.3.0,<2.0.0", + ], long_description="""\ Test Infrastructure for AutoRest. """, diff --git a/test/azure/low-level/Expected/AcceptanceTests/CustomBaseUriLowLevel/setup.py b/test/azure/low-level/Expected/AcceptanceTests/CustomBaseUriLowLevel/setup.py index c250c733c08..5771c01ab9f 100644 --- a/test/azure/low-level/Expected/AcceptanceTests/CustomBaseUriLowLevel/setup.py +++ b/test/azure/low-level/Expected/AcceptanceTests/CustomBaseUriLowLevel/setup.py @@ -6,31 +6,24 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- # coding: utf-8 - from setuptools import setup, find_packages -NAME = "autorestparameterizedhosttestclient" -VERSION = "0.1.0" - -# To install the library, run the following -# -# python setup.py install -# -# prerequisite: setuptools -# http://pypi.python.org/pypi/setuptools - -REQUIRES = ["msrest>=0.6.21", "azure-core<2.0.0,>=1.20.1"] +PACKAGE_NAME = "autorestparameterizedhosttestclient" +version = "0.1.0" setup( - name=NAME, - version=VERSION, + name=PACKAGE_NAME, + version=version, description="AutoRestParameterizedHostTestClient", author_email="", url="", - keywords=["Swagger", "AutoRestParameterizedHostTestClient"], - install_requires=REQUIRES, + keywords="azure, azure sdk", packages=find_packages(), include_package_data=True, + install_requires=[ + "msrest>=0.6.21", + "azure-core<2.0.0,>=1.20.1", + ], long_description="""\ Test Infrastructure for AutoRest. """, diff --git a/test/azure/low-level/Expected/AcceptanceTests/CustomUrlPagingLowLevel/setup.py b/test/azure/low-level/Expected/AcceptanceTests/CustomUrlPagingLowLevel/setup.py index 8dd0ffbcbef..11dcb529f7b 100644 --- a/test/azure/low-level/Expected/AcceptanceTests/CustomUrlPagingLowLevel/setup.py +++ b/test/azure/low-level/Expected/AcceptanceTests/CustomUrlPagingLowLevel/setup.py @@ -6,31 +6,24 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- # coding: utf-8 - from setuptools import setup, find_packages -NAME = "autorestparameterizedhosttestpagingclient" -VERSION = "0.1.0" - -# To install the library, run the following -# -# python setup.py install -# -# prerequisite: setuptools -# http://pypi.python.org/pypi/setuptools - -REQUIRES = ["msrest>=0.6.21", "azure-core<2.0.0,>=1.20.1"] +PACKAGE_NAME = "autorestparameterizedhosttestpagingclient" +version = "0.1.0" setup( - name=NAME, - version=VERSION, + name=PACKAGE_NAME, + version=version, description="AutoRestParameterizedHostTestPagingClient", author_email="", url="", - keywords=["Swagger", "AutoRestParameterizedHostTestPagingClient"], - install_requires=REQUIRES, + keywords="azure, azure sdk", packages=find_packages(), include_package_data=True, + install_requires=[ + "msrest>=0.6.21", + "azure-core<2.0.0,>=1.20.1", + ], long_description="""\ Test Infrastructure for AutoRest. """, diff --git a/test/azure/low-level/Expected/AcceptanceTests/HeadExceptionsLowLevel/setup.py b/test/azure/low-level/Expected/AcceptanceTests/HeadExceptionsLowLevel/setup.py index 70236538118..03877a39fb7 100644 --- a/test/azure/low-level/Expected/AcceptanceTests/HeadExceptionsLowLevel/setup.py +++ b/test/azure/low-level/Expected/AcceptanceTests/HeadExceptionsLowLevel/setup.py @@ -6,31 +6,24 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- # coding: utf-8 - from setuptools import setup, find_packages -NAME = "autorestheadexceptiontestservice" -VERSION = "0.1.0" - -# To install the library, run the following -# -# python setup.py install -# -# prerequisite: setuptools -# http://pypi.python.org/pypi/setuptools - -REQUIRES = ["msrest>=0.6.21", "azure-core<2.0.0,>=1.20.1", "azure-mgmt-core<2.0.0,>=1.2.1"] +PACKAGE_NAME = "autorestheadexceptiontestservice" +version = "0.1.0" setup( - name=NAME, - version=VERSION, + name=PACKAGE_NAME, + version=version, description="AutoRestHeadExceptionTestService", author_email="", url="", - keywords=["Swagger", "AutoRestHeadExceptionTestService"], - install_requires=REQUIRES, + keywords="azure, azure sdk", packages=find_packages(), include_package_data=True, + install_requires=[ + "msrest>=0.6.21", + "azure-mgmt-core>=1.3.0,<2.0.0", + ], long_description="""\ Test Infrastructure for AutoRest. """, diff --git a/test/azure/low-level/Expected/AcceptanceTests/HeadLowLevel/setup.py b/test/azure/low-level/Expected/AcceptanceTests/HeadLowLevel/setup.py index 131cedf730b..6214b085c5e 100644 --- a/test/azure/low-level/Expected/AcceptanceTests/HeadLowLevel/setup.py +++ b/test/azure/low-level/Expected/AcceptanceTests/HeadLowLevel/setup.py @@ -6,31 +6,24 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- # coding: utf-8 - from setuptools import setup, find_packages -NAME = "autorestheadtestservice" -VERSION = "0.1.0" - -# To install the library, run the following -# -# python setup.py install -# -# prerequisite: setuptools -# http://pypi.python.org/pypi/setuptools - -REQUIRES = ["msrest>=0.6.21", "azure-core<2.0.0,>=1.20.1", "azure-mgmt-core<2.0.0,>=1.2.1"] +PACKAGE_NAME = "autorestheadtestservice" +version = "0.1.0" setup( - name=NAME, - version=VERSION, + name=PACKAGE_NAME, + version=version, description="AutoRestHeadTestService", author_email="", url="", - keywords=["Swagger", "AutoRestHeadTestService"], - install_requires=REQUIRES, + keywords="azure, azure sdk", packages=find_packages(), include_package_data=True, + install_requires=[ + "msrest>=0.6.21", + "azure-mgmt-core>=1.3.0,<2.0.0", + ], long_description="""\ Test Infrastructure for AutoRest. """, diff --git a/test/azure/low-level/Expected/AcceptanceTests/LroLowLevel/setup.py b/test/azure/low-level/Expected/AcceptanceTests/LroLowLevel/setup.py index 226e1d293dc..72094e6022c 100644 --- a/test/azure/low-level/Expected/AcceptanceTests/LroLowLevel/setup.py +++ b/test/azure/low-level/Expected/AcceptanceTests/LroLowLevel/setup.py @@ -6,31 +6,24 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- # coding: utf-8 - from setuptools import setup, find_packages -NAME = "autorestlongrunningoperationtestservice" -VERSION = "0.1.0" - -# To install the library, run the following -# -# python setup.py install -# -# prerequisite: setuptools -# http://pypi.python.org/pypi/setuptools - -REQUIRES = ["msrest>=0.6.21", "azure-core<2.0.0,>=1.20.1", "azure-mgmt-core<2.0.0,>=1.2.1"] +PACKAGE_NAME = "autorestlongrunningoperationtestservice" +version = "0.1.0" setup( - name=NAME, - version=VERSION, + name=PACKAGE_NAME, + version=version, description="AutoRestLongRunningOperationTestService", author_email="", url="", - keywords=["Swagger", "AutoRestLongRunningOperationTestService"], - install_requires=REQUIRES, + keywords="azure, azure sdk", packages=find_packages(), include_package_data=True, + install_requires=[ + "msrest>=0.6.21", + "azure-mgmt-core>=1.3.0,<2.0.0", + ], long_description="""\ Long-running Operation for AutoRest. """, diff --git a/test/azure/low-level/Expected/AcceptanceTests/LroWithParameterizedEndpointsLowLevel/setup.py b/test/azure/low-level/Expected/AcceptanceTests/LroWithParameterizedEndpointsLowLevel/setup.py index c0c7a324c37..8f6bd70e581 100644 --- a/test/azure/low-level/Expected/AcceptanceTests/LroWithParameterizedEndpointsLowLevel/setup.py +++ b/test/azure/low-level/Expected/AcceptanceTests/LroWithParameterizedEndpointsLowLevel/setup.py @@ -6,31 +6,24 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- # coding: utf-8 - from setuptools import setup, find_packages -NAME = "lrowithparamaterizedendpoints" -VERSION = "0.1.0" - -# To install the library, run the following -# -# python setup.py install -# -# prerequisite: setuptools -# http://pypi.python.org/pypi/setuptools - -REQUIRES = ["msrest>=0.6.21", "azure-core<2.0.0,>=1.20.1"] +PACKAGE_NAME = "lrowithparamaterizedendpoints" +version = "0.1.0" setup( - name=NAME, - version=VERSION, + name=PACKAGE_NAME, + version=version, description="LROWithParamaterizedEndpoints", author_email="", url="", - keywords=["Swagger", "LROWithParamaterizedEndpoints"], - install_requires=REQUIRES, + keywords="azure, azure sdk", packages=find_packages(), include_package_data=True, + install_requires=[ + "msrest>=0.6.21", + "azure-core<2.0.0,>=1.20.1", + ], long_description="""\ Test Infrastructure for AutoRest. """, diff --git a/test/azure/low-level/Expected/AcceptanceTests/PagingLowLevel/setup.py b/test/azure/low-level/Expected/AcceptanceTests/PagingLowLevel/setup.py index 3e9c4b351e5..24ef2916921 100644 --- a/test/azure/low-level/Expected/AcceptanceTests/PagingLowLevel/setup.py +++ b/test/azure/low-level/Expected/AcceptanceTests/PagingLowLevel/setup.py @@ -6,31 +6,24 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- # coding: utf-8 - from setuptools import setup, find_packages -NAME = "autorestpagingtestservice" -VERSION = "0.1.0" - -# To install the library, run the following -# -# python setup.py install -# -# prerequisite: setuptools -# http://pypi.python.org/pypi/setuptools - -REQUIRES = ["msrest>=0.6.21", "azure-core<2.0.0,>=1.20.1"] +PACKAGE_NAME = "autorestpagingtestservice" +version = "0.1.0" setup( - name=NAME, - version=VERSION, + name=PACKAGE_NAME, + version=version, description="AutoRestPagingTestService", author_email="", url="", - keywords=["Swagger", "AutoRestPagingTestService"], - install_requires=REQUIRES, + keywords="azure, azure sdk", packages=find_packages(), include_package_data=True, + install_requires=[ + "msrest>=0.6.21", + "azure-core<2.0.0,>=1.20.1", + ], long_description="""\ Long-running Operation for AutoRest. """, diff --git a/test/azure/low-level/Expected/AcceptanceTests/StorageManagementClientLowLevel/setup.py b/test/azure/low-level/Expected/AcceptanceTests/StorageManagementClientLowLevel/setup.py index a553c7263e5..f5b20e508d4 100644 --- a/test/azure/low-level/Expected/AcceptanceTests/StorageManagementClientLowLevel/setup.py +++ b/test/azure/low-level/Expected/AcceptanceTests/StorageManagementClientLowLevel/setup.py @@ -6,31 +6,24 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- # coding: utf-8 - from setuptools import setup, find_packages -NAME = "storagemanagementclient" -VERSION = "0.1.0" - -# To install the library, run the following -# -# python setup.py install -# -# prerequisite: setuptools -# http://pypi.python.org/pypi/setuptools - -REQUIRES = ["msrest>=0.6.21", "azure-core<2.0.0,>=1.20.1", "azure-mgmt-core<2.0.0,>=1.2.1"] +PACKAGE_NAME = "storagemanagementclient" +version = "0.1.0" setup( - name=NAME, - version=VERSION, + name=PACKAGE_NAME, + version=version, description="StorageManagementClient", author_email="", url="", - keywords=["Swagger", "StorageManagementClient"], - install_requires=REQUIRES, + keywords="azure, azure sdk", packages=find_packages(), include_package_data=True, + install_requires=[ + "msrest>=0.6.21", + "azure-mgmt-core>=1.3.0,<2.0.0", + ], long_description="""\ StorageManagementClient. """, diff --git a/test/azure/low-level/Expected/AcceptanceTests/SubscriptionIdApiVersionLowLevel/setup.py b/test/azure/low-level/Expected/AcceptanceTests/SubscriptionIdApiVersionLowLevel/setup.py index 134ed19236e..ae89cf44ecf 100644 --- a/test/azure/low-level/Expected/AcceptanceTests/SubscriptionIdApiVersionLowLevel/setup.py +++ b/test/azure/low-level/Expected/AcceptanceTests/SubscriptionIdApiVersionLowLevel/setup.py @@ -6,31 +6,24 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- # coding: utf-8 - from setuptools import setup, find_packages -NAME = "microsoftazuretesturl" -VERSION = "0.1.0" - -# To install the library, run the following -# -# python setup.py install -# -# prerequisite: setuptools -# http://pypi.python.org/pypi/setuptools - -REQUIRES = ["msrest>=0.6.21", "azure-core<2.0.0,>=1.20.1", "azure-mgmt-core<2.0.0,>=1.2.1"] +PACKAGE_NAME = "microsoftazuretesturl" +version = "0.1.0" setup( - name=NAME, - version=VERSION, + name=PACKAGE_NAME, + version=version, description="MicrosoftAzureTestUrl", author_email="", url="", - keywords=["Swagger", "MicrosoftAzureTestUrl"], - install_requires=REQUIRES, + keywords="azure, azure sdk", packages=find_packages(), include_package_data=True, + install_requires=[ + "msrest>=0.6.21", + "azure-mgmt-core>=1.3.0,<2.0.0", + ], long_description="""\ Some cool documentation. """, diff --git a/test/azure/version-tolerant/Expected/AcceptanceTests/AzureBodyDurationVersionTolerant/setup.py b/test/azure/version-tolerant/Expected/AcceptanceTests/AzureBodyDurationVersionTolerant/setup.py index 385afe6573c..6ecee859197 100644 --- a/test/azure/version-tolerant/Expected/AcceptanceTests/AzureBodyDurationVersionTolerant/setup.py +++ b/test/azure/version-tolerant/Expected/AcceptanceTests/AzureBodyDurationVersionTolerant/setup.py @@ -6,31 +6,24 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- # coding: utf-8 - from setuptools import setup, find_packages -NAME = "autorestdurationtestservice" -VERSION = "0.1.0" - -# To install the library, run the following -# -# python setup.py install -# -# prerequisite: setuptools -# http://pypi.python.org/pypi/setuptools - -REQUIRES = ["msrest>=0.6.21", "azure-core<2.0.0,>=1.20.1"] +PACKAGE_NAME = "autorestdurationtestservice" +version = "0.1.0" setup( - name=NAME, - version=VERSION, + name=PACKAGE_NAME, + version=version, description="AutoRestDurationTestService", author_email="", url="", - keywords=["Swagger", "AutoRestDurationTestService"], - install_requires=REQUIRES, + keywords="azure, azure sdk", packages=find_packages(), include_package_data=True, + install_requires=[ + "msrest>=0.6.21", + "azure-core<2.0.0,>=1.20.1", + ], long_description="""\ Test Infrastructure for AutoRest. """, diff --git a/test/azure/version-tolerant/Expected/AcceptanceTests/AzureParameterGroupingVersionTolerant/setup.py b/test/azure/version-tolerant/Expected/AcceptanceTests/AzureParameterGroupingVersionTolerant/setup.py index 5b4af33fe8a..33f56ba7f54 100644 --- a/test/azure/version-tolerant/Expected/AcceptanceTests/AzureParameterGroupingVersionTolerant/setup.py +++ b/test/azure/version-tolerant/Expected/AcceptanceTests/AzureParameterGroupingVersionTolerant/setup.py @@ -6,31 +6,24 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- # coding: utf-8 - from setuptools import setup, find_packages -NAME = "autorestparametergroupingtestservice" -VERSION = "0.1.0" - -# To install the library, run the following -# -# python setup.py install -# -# prerequisite: setuptools -# http://pypi.python.org/pypi/setuptools - -REQUIRES = ["msrest>=0.6.21", "azure-core<2.0.0,>=1.20.1"] +PACKAGE_NAME = "autorestparametergroupingtestservice" +version = "0.1.0" setup( - name=NAME, - version=VERSION, + name=PACKAGE_NAME, + version=version, description="AutoRestParameterGroupingTestService", author_email="", url="", - keywords=["Swagger", "AutoRestParameterGroupingTestService"], - install_requires=REQUIRES, + keywords="azure, azure sdk", packages=find_packages(), include_package_data=True, + install_requires=[ + "msrest>=0.6.21", + "azure-core<2.0.0,>=1.20.1", + ], long_description="""\ Test Infrastructure for AutoRest. """, diff --git a/test/azure/version-tolerant/Expected/AcceptanceTests/AzureReportVersionTolerant/setup.py b/test/azure/version-tolerant/Expected/AcceptanceTests/AzureReportVersionTolerant/setup.py index 94333e8e5a3..74828b58ead 100644 --- a/test/azure/version-tolerant/Expected/AcceptanceTests/AzureReportVersionTolerant/setup.py +++ b/test/azure/version-tolerant/Expected/AcceptanceTests/AzureReportVersionTolerant/setup.py @@ -6,31 +6,24 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- # coding: utf-8 - from setuptools import setup, find_packages -NAME = "autorestreportserviceforazure" -VERSION = "0.1.0" - -# To install the library, run the following -# -# python setup.py install -# -# prerequisite: setuptools -# http://pypi.python.org/pypi/setuptools - -REQUIRES = ["msrest>=0.6.21", "azure-core<2.0.0,>=1.20.1"] +PACKAGE_NAME = "autorestreportserviceforazure" +version = "0.1.0" setup( - name=NAME, - version=VERSION, + name=PACKAGE_NAME, + version=version, description="AutoRestReportServiceForAzure", author_email="", url="", - keywords=["Swagger", "AutoRestReportServiceForAzure"], - install_requires=REQUIRES, + keywords="azure, azure sdk", packages=find_packages(), include_package_data=True, + install_requires=[ + "msrest>=0.6.21", + "azure-core<2.0.0,>=1.20.1", + ], long_description="""\ Test Infrastructure for AutoRest. """, diff --git a/test/azure/version-tolerant/Expected/AcceptanceTests/AzureSpecialsVersionTolerant/setup.py b/test/azure/version-tolerant/Expected/AcceptanceTests/AzureSpecialsVersionTolerant/setup.py index 4bf95843e93..3749158c9d6 100644 --- a/test/azure/version-tolerant/Expected/AcceptanceTests/AzureSpecialsVersionTolerant/setup.py +++ b/test/azure/version-tolerant/Expected/AcceptanceTests/AzureSpecialsVersionTolerant/setup.py @@ -6,31 +6,24 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- # coding: utf-8 - from setuptools import setup, find_packages -NAME = "autorestazurespecialparameterstestclient" -VERSION = "0.1.0" - -# To install the library, run the following -# -# python setup.py install -# -# prerequisite: setuptools -# http://pypi.python.org/pypi/setuptools - -REQUIRES = ["msrest>=0.6.21", "azure-core<2.0.0,>=1.20.1", "azure-mgmt-core<2.0.0,>=1.2.1"] +PACKAGE_NAME = "autorestazurespecialparameterstestclient" +version = "0.1.0" setup( - name=NAME, - version=VERSION, + name=PACKAGE_NAME, + version=version, description="AutoRestAzureSpecialParametersTestClient", author_email="", url="", - keywords=["Swagger", "AutoRestAzureSpecialParametersTestClient"], - install_requires=REQUIRES, + keywords="azure, azure sdk", packages=find_packages(), include_package_data=True, + install_requires=[ + "msrest>=0.6.21", + "azure-mgmt-core>=1.3.0,<2.0.0", + ], long_description="""\ Test Infrastructure for AutoRest. """, diff --git a/test/azure/version-tolerant/Expected/AcceptanceTests/CustomBaseUriVersionTolerant/setup.py b/test/azure/version-tolerant/Expected/AcceptanceTests/CustomBaseUriVersionTolerant/setup.py index c250c733c08..5771c01ab9f 100644 --- a/test/azure/version-tolerant/Expected/AcceptanceTests/CustomBaseUriVersionTolerant/setup.py +++ b/test/azure/version-tolerant/Expected/AcceptanceTests/CustomBaseUriVersionTolerant/setup.py @@ -6,31 +6,24 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- # coding: utf-8 - from setuptools import setup, find_packages -NAME = "autorestparameterizedhosttestclient" -VERSION = "0.1.0" - -# To install the library, run the following -# -# python setup.py install -# -# prerequisite: setuptools -# http://pypi.python.org/pypi/setuptools - -REQUIRES = ["msrest>=0.6.21", "azure-core<2.0.0,>=1.20.1"] +PACKAGE_NAME = "autorestparameterizedhosttestclient" +version = "0.1.0" setup( - name=NAME, - version=VERSION, + name=PACKAGE_NAME, + version=version, description="AutoRestParameterizedHostTestClient", author_email="", url="", - keywords=["Swagger", "AutoRestParameterizedHostTestClient"], - install_requires=REQUIRES, + keywords="azure, azure sdk", packages=find_packages(), include_package_data=True, + install_requires=[ + "msrest>=0.6.21", + "azure-core<2.0.0,>=1.20.1", + ], long_description="""\ Test Infrastructure for AutoRest. """, diff --git a/test/azure/version-tolerant/Expected/AcceptanceTests/CustomPollerPagerVersionTolerant/setup.py b/test/azure/version-tolerant/Expected/AcceptanceTests/CustomPollerPagerVersionTolerant/setup.py index 2c9524810fd..acacbff9836 100644 --- a/test/azure/version-tolerant/Expected/AcceptanceTests/CustomPollerPagerVersionTolerant/setup.py +++ b/test/azure/version-tolerant/Expected/AcceptanceTests/CustomPollerPagerVersionTolerant/setup.py @@ -6,31 +6,24 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- # coding: utf-8 - from setuptools import setup, find_packages -NAME = "custompollerpagerversiontolerant" -VERSION = "0.1.0" - -# To install the library, run the following -# -# python setup.py install -# -# prerequisite: setuptools -# http://pypi.python.org/pypi/setuptools - -REQUIRES = ["msrest>=0.6.21", "azure-core<2.0.0,>=1.20.1", "azure-mgmt-core<2.0.0,>=1.2.1"] +PACKAGE_NAME = "custompollerpagerversiontolerant" +version = "0.1.0" setup( - name=NAME, - version=VERSION, + name=PACKAGE_NAME, + version=version, description="custompollerpagerversiontolerant", author_email="", url="", - keywords=["Swagger", "AutoRestPagingTestService"], - install_requires=REQUIRES, + keywords="azure, azure sdk", packages=find_packages(), include_package_data=True, + install_requires=[ + "msrest>=0.6.21", + "azure-mgmt-core>=1.3.0,<2.0.0", + ], long_description="""\ Long-running Operation for AutoRest. """, diff --git a/test/azure/version-tolerant/Expected/AcceptanceTests/CustomUrlPagingVersionTolerant/setup.py b/test/azure/version-tolerant/Expected/AcceptanceTests/CustomUrlPagingVersionTolerant/setup.py index 8dd0ffbcbef..11dcb529f7b 100644 --- a/test/azure/version-tolerant/Expected/AcceptanceTests/CustomUrlPagingVersionTolerant/setup.py +++ b/test/azure/version-tolerant/Expected/AcceptanceTests/CustomUrlPagingVersionTolerant/setup.py @@ -6,31 +6,24 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- # coding: utf-8 - from setuptools import setup, find_packages -NAME = "autorestparameterizedhosttestpagingclient" -VERSION = "0.1.0" - -# To install the library, run the following -# -# python setup.py install -# -# prerequisite: setuptools -# http://pypi.python.org/pypi/setuptools - -REQUIRES = ["msrest>=0.6.21", "azure-core<2.0.0,>=1.20.1"] +PACKAGE_NAME = "autorestparameterizedhosttestpagingclient" +version = "0.1.0" setup( - name=NAME, - version=VERSION, + name=PACKAGE_NAME, + version=version, description="AutoRestParameterizedHostTestPagingClient", author_email="", url="", - keywords=["Swagger", "AutoRestParameterizedHostTestPagingClient"], - install_requires=REQUIRES, + keywords="azure, azure sdk", packages=find_packages(), include_package_data=True, + install_requires=[ + "msrest>=0.6.21", + "azure-core<2.0.0,>=1.20.1", + ], long_description="""\ Test Infrastructure for AutoRest. """, diff --git a/test/azure/version-tolerant/Expected/AcceptanceTests/HeadExceptionsVersionTolerant/setup.py b/test/azure/version-tolerant/Expected/AcceptanceTests/HeadExceptionsVersionTolerant/setup.py index 70236538118..03877a39fb7 100644 --- a/test/azure/version-tolerant/Expected/AcceptanceTests/HeadExceptionsVersionTolerant/setup.py +++ b/test/azure/version-tolerant/Expected/AcceptanceTests/HeadExceptionsVersionTolerant/setup.py @@ -6,31 +6,24 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- # coding: utf-8 - from setuptools import setup, find_packages -NAME = "autorestheadexceptiontestservice" -VERSION = "0.1.0" - -# To install the library, run the following -# -# python setup.py install -# -# prerequisite: setuptools -# http://pypi.python.org/pypi/setuptools - -REQUIRES = ["msrest>=0.6.21", "azure-core<2.0.0,>=1.20.1", "azure-mgmt-core<2.0.0,>=1.2.1"] +PACKAGE_NAME = "autorestheadexceptiontestservice" +version = "0.1.0" setup( - name=NAME, - version=VERSION, + name=PACKAGE_NAME, + version=version, description="AutoRestHeadExceptionTestService", author_email="", url="", - keywords=["Swagger", "AutoRestHeadExceptionTestService"], - install_requires=REQUIRES, + keywords="azure, azure sdk", packages=find_packages(), include_package_data=True, + install_requires=[ + "msrest>=0.6.21", + "azure-mgmt-core>=1.3.0,<2.0.0", + ], long_description="""\ Test Infrastructure for AutoRest. """, diff --git a/test/azure/version-tolerant/Expected/AcceptanceTests/HeadVersionTolerant/setup.py b/test/azure/version-tolerant/Expected/AcceptanceTests/HeadVersionTolerant/setup.py index 131cedf730b..6214b085c5e 100644 --- a/test/azure/version-tolerant/Expected/AcceptanceTests/HeadVersionTolerant/setup.py +++ b/test/azure/version-tolerant/Expected/AcceptanceTests/HeadVersionTolerant/setup.py @@ -6,31 +6,24 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- # coding: utf-8 - from setuptools import setup, find_packages -NAME = "autorestheadtestservice" -VERSION = "0.1.0" - -# To install the library, run the following -# -# python setup.py install -# -# prerequisite: setuptools -# http://pypi.python.org/pypi/setuptools - -REQUIRES = ["msrest>=0.6.21", "azure-core<2.0.0,>=1.20.1", "azure-mgmt-core<2.0.0,>=1.2.1"] +PACKAGE_NAME = "autorestheadtestservice" +version = "0.1.0" setup( - name=NAME, - version=VERSION, + name=PACKAGE_NAME, + version=version, description="AutoRestHeadTestService", author_email="", url="", - keywords=["Swagger", "AutoRestHeadTestService"], - install_requires=REQUIRES, + keywords="azure, azure sdk", packages=find_packages(), include_package_data=True, + install_requires=[ + "msrest>=0.6.21", + "azure-mgmt-core>=1.3.0,<2.0.0", + ], long_description="""\ Test Infrastructure for AutoRest. """, diff --git a/test/azure/version-tolerant/Expected/AcceptanceTests/LroVersionTolerant/setup.py b/test/azure/version-tolerant/Expected/AcceptanceTests/LroVersionTolerant/setup.py index 226e1d293dc..72094e6022c 100644 --- a/test/azure/version-tolerant/Expected/AcceptanceTests/LroVersionTolerant/setup.py +++ b/test/azure/version-tolerant/Expected/AcceptanceTests/LroVersionTolerant/setup.py @@ -6,31 +6,24 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- # coding: utf-8 - from setuptools import setup, find_packages -NAME = "autorestlongrunningoperationtestservice" -VERSION = "0.1.0" - -# To install the library, run the following -# -# python setup.py install -# -# prerequisite: setuptools -# http://pypi.python.org/pypi/setuptools - -REQUIRES = ["msrest>=0.6.21", "azure-core<2.0.0,>=1.20.1", "azure-mgmt-core<2.0.0,>=1.2.1"] +PACKAGE_NAME = "autorestlongrunningoperationtestservice" +version = "0.1.0" setup( - name=NAME, - version=VERSION, + name=PACKAGE_NAME, + version=version, description="AutoRestLongRunningOperationTestService", author_email="", url="", - keywords=["Swagger", "AutoRestLongRunningOperationTestService"], - install_requires=REQUIRES, + keywords="azure, azure sdk", packages=find_packages(), include_package_data=True, + install_requires=[ + "msrest>=0.6.21", + "azure-mgmt-core>=1.3.0,<2.0.0", + ], long_description="""\ Long-running Operation for AutoRest. """, diff --git a/test/azure/version-tolerant/Expected/AcceptanceTests/LroWithParameterizedEndpointsVersionTolerant/setup.py b/test/azure/version-tolerant/Expected/AcceptanceTests/LroWithParameterizedEndpointsVersionTolerant/setup.py index c0c7a324c37..8f6bd70e581 100644 --- a/test/azure/version-tolerant/Expected/AcceptanceTests/LroWithParameterizedEndpointsVersionTolerant/setup.py +++ b/test/azure/version-tolerant/Expected/AcceptanceTests/LroWithParameterizedEndpointsVersionTolerant/setup.py @@ -6,31 +6,24 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- # coding: utf-8 - from setuptools import setup, find_packages -NAME = "lrowithparamaterizedendpoints" -VERSION = "0.1.0" - -# To install the library, run the following -# -# python setup.py install -# -# prerequisite: setuptools -# http://pypi.python.org/pypi/setuptools - -REQUIRES = ["msrest>=0.6.21", "azure-core<2.0.0,>=1.20.1"] +PACKAGE_NAME = "lrowithparamaterizedendpoints" +version = "0.1.0" setup( - name=NAME, - version=VERSION, + name=PACKAGE_NAME, + version=version, description="LROWithParamaterizedEndpoints", author_email="", url="", - keywords=["Swagger", "LROWithParamaterizedEndpoints"], - install_requires=REQUIRES, + keywords="azure, azure sdk", packages=find_packages(), include_package_data=True, + install_requires=[ + "msrest>=0.6.21", + "azure-core<2.0.0,>=1.20.1", + ], long_description="""\ Test Infrastructure for AutoRest. """, diff --git a/test/azure/version-tolerant/Expected/AcceptanceTests/PagingVersionTolerant/setup.py b/test/azure/version-tolerant/Expected/AcceptanceTests/PagingVersionTolerant/setup.py index 3e9c4b351e5..24ef2916921 100644 --- a/test/azure/version-tolerant/Expected/AcceptanceTests/PagingVersionTolerant/setup.py +++ b/test/azure/version-tolerant/Expected/AcceptanceTests/PagingVersionTolerant/setup.py @@ -6,31 +6,24 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- # coding: utf-8 - from setuptools import setup, find_packages -NAME = "autorestpagingtestservice" -VERSION = "0.1.0" - -# To install the library, run the following -# -# python setup.py install -# -# prerequisite: setuptools -# http://pypi.python.org/pypi/setuptools - -REQUIRES = ["msrest>=0.6.21", "azure-core<2.0.0,>=1.20.1"] +PACKAGE_NAME = "autorestpagingtestservice" +version = "0.1.0" setup( - name=NAME, - version=VERSION, + name=PACKAGE_NAME, + version=version, description="AutoRestPagingTestService", author_email="", url="", - keywords=["Swagger", "AutoRestPagingTestService"], - install_requires=REQUIRES, + keywords="azure, azure sdk", packages=find_packages(), include_package_data=True, + install_requires=[ + "msrest>=0.6.21", + "azure-core<2.0.0,>=1.20.1", + ], long_description="""\ Long-running Operation for AutoRest. """, diff --git a/test/azure/version-tolerant/Expected/AcceptanceTests/StorageManagementClientVersionTolerant/setup.py b/test/azure/version-tolerant/Expected/AcceptanceTests/StorageManagementClientVersionTolerant/setup.py index a553c7263e5..f5b20e508d4 100644 --- a/test/azure/version-tolerant/Expected/AcceptanceTests/StorageManagementClientVersionTolerant/setup.py +++ b/test/azure/version-tolerant/Expected/AcceptanceTests/StorageManagementClientVersionTolerant/setup.py @@ -6,31 +6,24 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- # coding: utf-8 - from setuptools import setup, find_packages -NAME = "storagemanagementclient" -VERSION = "0.1.0" - -# To install the library, run the following -# -# python setup.py install -# -# prerequisite: setuptools -# http://pypi.python.org/pypi/setuptools - -REQUIRES = ["msrest>=0.6.21", "azure-core<2.0.0,>=1.20.1", "azure-mgmt-core<2.0.0,>=1.2.1"] +PACKAGE_NAME = "storagemanagementclient" +version = "0.1.0" setup( - name=NAME, - version=VERSION, + name=PACKAGE_NAME, + version=version, description="StorageManagementClient", author_email="", url="", - keywords=["Swagger", "StorageManagementClient"], - install_requires=REQUIRES, + keywords="azure, azure sdk", packages=find_packages(), include_package_data=True, + install_requires=[ + "msrest>=0.6.21", + "azure-mgmt-core>=1.3.0,<2.0.0", + ], long_description="""\ StorageManagementClient. """, diff --git a/test/azure/version-tolerant/Expected/AcceptanceTests/SubscriptionIdApiVersionVersionTolerant/setup.py b/test/azure/version-tolerant/Expected/AcceptanceTests/SubscriptionIdApiVersionVersionTolerant/setup.py index 134ed19236e..ae89cf44ecf 100644 --- a/test/azure/version-tolerant/Expected/AcceptanceTests/SubscriptionIdApiVersionVersionTolerant/setup.py +++ b/test/azure/version-tolerant/Expected/AcceptanceTests/SubscriptionIdApiVersionVersionTolerant/setup.py @@ -6,31 +6,24 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- # coding: utf-8 - from setuptools import setup, find_packages -NAME = "microsoftazuretesturl" -VERSION = "0.1.0" - -# To install the library, run the following -# -# python setup.py install -# -# prerequisite: setuptools -# http://pypi.python.org/pypi/setuptools - -REQUIRES = ["msrest>=0.6.21", "azure-core<2.0.0,>=1.20.1", "azure-mgmt-core<2.0.0,>=1.2.1"] +PACKAGE_NAME = "microsoftazuretesturl" +version = "0.1.0" setup( - name=NAME, - version=VERSION, + name=PACKAGE_NAME, + version=version, description="MicrosoftAzureTestUrl", author_email="", url="", - keywords=["Swagger", "MicrosoftAzureTestUrl"], - install_requires=REQUIRES, + keywords="azure, azure sdk", packages=find_packages(), include_package_data=True, + install_requires=[ + "msrest>=0.6.21", + "azure-mgmt-core>=1.3.0,<2.0.0", + ], long_description="""\ Some cool documentation. """, diff --git a/test/dpg/low-level/Expected/AcceptanceTests/DPGServiceDrivenInitialLowLevel/setup.py b/test/dpg/low-level/Expected/AcceptanceTests/DPGServiceDrivenInitialLowLevel/setup.py index 73408b7b2d1..3ca575ac498 100644 --- a/test/dpg/low-level/Expected/AcceptanceTests/DPGServiceDrivenInitialLowLevel/setup.py +++ b/test/dpg/low-level/Expected/AcceptanceTests/DPGServiceDrivenInitialLowLevel/setup.py @@ -6,31 +6,24 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- # coding: utf-8 - from setuptools import setup, find_packages -NAME = "dpgservicedriveninitial" -VERSION = "0.1.0" - -# To install the library, run the following -# -# python setup.py install -# -# prerequisite: setuptools -# http://pypi.python.org/pypi/setuptools - -REQUIRES = ["msrest>=0.6.21", "azure-core<2.0.0,>=1.20.1"] +PACKAGE_NAME = "dpgservicedriveninitial" +version = "0.1.0" setup( - name=NAME, - version=VERSION, + name=PACKAGE_NAME, + version=version, description="dpgservicedriveninitial", author_email="", url="", - keywords=["Swagger", "DPGClient"], - install_requires=REQUIRES, + keywords="azure, azure sdk", packages=find_packages(), include_package_data=True, + install_requires=[ + "msrest>=0.6.21", + "azure-core<2.0.0,>=1.20.1", + ], long_description="""\ DPG Swagger, this is the initial swagger a service could do. """, diff --git a/test/dpg/low-level/Expected/AcceptanceTests/DPGServiceDrivenUpdateOneLowLevel/setup.py b/test/dpg/low-level/Expected/AcceptanceTests/DPGServiceDrivenUpdateOneLowLevel/setup.py index 185b531703d..60b1fb97271 100644 --- a/test/dpg/low-level/Expected/AcceptanceTests/DPGServiceDrivenUpdateOneLowLevel/setup.py +++ b/test/dpg/low-level/Expected/AcceptanceTests/DPGServiceDrivenUpdateOneLowLevel/setup.py @@ -6,31 +6,24 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- # coding: utf-8 - from setuptools import setup, find_packages -NAME = "dpgservicedrivenupdateone" -VERSION = "0.1.0" - -# To install the library, run the following -# -# python setup.py install -# -# prerequisite: setuptools -# http://pypi.python.org/pypi/setuptools - -REQUIRES = ["msrest>=0.6.21", "azure-core<2.0.0,>=1.20.1"] +PACKAGE_NAME = "dpgservicedrivenupdateone" +version = "0.1.0" setup( - name=NAME, - version=VERSION, + name=PACKAGE_NAME, + version=version, description="dpgservicedrivenupdateone", author_email="", url="", - keywords=["Swagger", "DPGClient"], - install_requires=REQUIRES, + keywords="azure, azure sdk", packages=find_packages(), include_package_data=True, + install_requires=[ + "msrest>=0.6.21", + "azure-core<2.0.0,>=1.20.1", + ], long_description="""\ DPG Swagger, this is the initial swagger a service could do. """, diff --git a/test/dpg/version-tolerant/Expected/AcceptanceTests/DPGServiceDrivenInitialVersionTolerant/setup.py b/test/dpg/version-tolerant/Expected/AcceptanceTests/DPGServiceDrivenInitialVersionTolerant/setup.py index 73408b7b2d1..3ca575ac498 100644 --- a/test/dpg/version-tolerant/Expected/AcceptanceTests/DPGServiceDrivenInitialVersionTolerant/setup.py +++ b/test/dpg/version-tolerant/Expected/AcceptanceTests/DPGServiceDrivenInitialVersionTolerant/setup.py @@ -6,31 +6,24 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- # coding: utf-8 - from setuptools import setup, find_packages -NAME = "dpgservicedriveninitial" -VERSION = "0.1.0" - -# To install the library, run the following -# -# python setup.py install -# -# prerequisite: setuptools -# http://pypi.python.org/pypi/setuptools - -REQUIRES = ["msrest>=0.6.21", "azure-core<2.0.0,>=1.20.1"] +PACKAGE_NAME = "dpgservicedriveninitial" +version = "0.1.0" setup( - name=NAME, - version=VERSION, + name=PACKAGE_NAME, + version=version, description="dpgservicedriveninitial", author_email="", url="", - keywords=["Swagger", "DPGClient"], - install_requires=REQUIRES, + keywords="azure, azure sdk", packages=find_packages(), include_package_data=True, + install_requires=[ + "msrest>=0.6.21", + "azure-core<2.0.0,>=1.20.1", + ], long_description="""\ DPG Swagger, this is the initial swagger a service could do. """, diff --git a/test/dpg/version-tolerant/Expected/AcceptanceTests/DPGServiceDrivenUpdateOneVersionTolerant/setup.py b/test/dpg/version-tolerant/Expected/AcceptanceTests/DPGServiceDrivenUpdateOneVersionTolerant/setup.py index 185b531703d..60b1fb97271 100644 --- a/test/dpg/version-tolerant/Expected/AcceptanceTests/DPGServiceDrivenUpdateOneVersionTolerant/setup.py +++ b/test/dpg/version-tolerant/Expected/AcceptanceTests/DPGServiceDrivenUpdateOneVersionTolerant/setup.py @@ -6,31 +6,24 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- # coding: utf-8 - from setuptools import setup, find_packages -NAME = "dpgservicedrivenupdateone" -VERSION = "0.1.0" - -# To install the library, run the following -# -# python setup.py install -# -# prerequisite: setuptools -# http://pypi.python.org/pypi/setuptools - -REQUIRES = ["msrest>=0.6.21", "azure-core<2.0.0,>=1.20.1"] +PACKAGE_NAME = "dpgservicedrivenupdateone" +version = "0.1.0" setup( - name=NAME, - version=VERSION, + name=PACKAGE_NAME, + version=version, description="dpgservicedrivenupdateone", author_email="", url="", - keywords=["Swagger", "DPGClient"], - install_requires=REQUIRES, + keywords="azure, azure sdk", packages=find_packages(), include_package_data=True, + install_requires=[ + "msrest>=0.6.21", + "azure-core<2.0.0,>=1.20.1", + ], long_description="""\ DPG Swagger, this is the initial swagger a service could do. """, diff --git a/test/vanilla/legacy/AcceptanceTests/test_packagemode.py b/test/vanilla/legacy/AcceptanceTests/test_packagemode.py new file mode 100644 index 00000000000..e41dda7ce6a --- /dev/null +++ b/test/vanilla/legacy/AcceptanceTests/test_packagemode.py @@ -0,0 +1,50 @@ +# -------------------------------------------------------------------------- +# +# Copyright (c) Microsoft Corporation. All rights reserved. +# +# The MIT License (MIT) +# +# Permission is hereby granted, free of charge, to any person obtaining a copy +# of this software and associated documentation files (the ""Software""), to +# deal in the Software without restriction, including without limitation the +# rights to use, copy, modify, merge, publish, distribute, sublicense, and/or +# sell copies of the Software, and to permit persons to whom the Software is +# furnished to do so, subject to the following conditions: +# +# The above copyright notice and this permission notice shall be included in +# all copies or substantial portions of the Software. +# +# THE SOFTWARE IS PROVIDED *AS IS*, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS +# IN THE SOFTWARE. +# +# -------------------------------------------------------------------------- +import pytest +from packagemode import AnythingClient + +@pytest.fixture +def client(): + with AnythingClient(base_url="http://localhost:3000") as client: + yield client + +def test_get_string(client): + assert client.get_string() == 'anything' + +def test_put_string(client): + client.put_string(input="anything") + +def test_get_object(client): + assert client.get_object() == {"message": "An object was successfully returned"} + +def test_put_object(client): + client.put_object({'foo': 'bar'}) + +def test_get_array(client): + assert client.get_array() == ['foo', 'bar'] + +def test_put_array(client): + client.put_array(['foo', 'bar']) diff --git a/test/vanilla/legacy/Expected/AcceptanceTests/AdditionalProperties/setup.py b/test/vanilla/legacy/Expected/AcceptanceTests/AdditionalProperties/setup.py index afc03668fe3..6c18a93049f 100644 --- a/test/vanilla/legacy/Expected/AcceptanceTests/AdditionalProperties/setup.py +++ b/test/vanilla/legacy/Expected/AcceptanceTests/AdditionalProperties/setup.py @@ -6,31 +6,24 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- # coding: utf-8 - from setuptools import setup, find_packages -NAME = "additionalpropertiesclient" -VERSION = "0.1.0" - -# To install the library, run the following -# -# python setup.py install -# -# prerequisite: setuptools -# http://pypi.python.org/pypi/setuptools - -REQUIRES = ["msrest>=0.6.21", "azure-core<2.0.0,>=1.20.1"] +PACKAGE_NAME = "additionalpropertiesclient" +version = "0.1.0" setup( - name=NAME, - version=VERSION, + name=PACKAGE_NAME, + version=version, description="AdditionalPropertiesClient", author_email="", url="", - keywords=["Swagger", "AdditionalPropertiesClient"], - install_requires=REQUIRES, + keywords="azure, azure sdk", packages=find_packages(), include_package_data=True, + install_requires=[ + "msrest>=0.6.21", + "azure-core<2.0.0,>=1.20.1", + ], long_description="""\ Test Infrastructure for AutoRest. """, diff --git a/test/vanilla/legacy/Expected/AcceptanceTests/Anything/setup.py b/test/vanilla/legacy/Expected/AcceptanceTests/Anything/setup.py index 5983ebe0fb1..49bbca492ca 100644 --- a/test/vanilla/legacy/Expected/AcceptanceTests/Anything/setup.py +++ b/test/vanilla/legacy/Expected/AcceptanceTests/Anything/setup.py @@ -6,31 +6,24 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- # coding: utf-8 - from setuptools import setup, find_packages -NAME = "anythingclient" -VERSION = "0.1.0" - -# To install the library, run the following -# -# python setup.py install -# -# prerequisite: setuptools -# http://pypi.python.org/pypi/setuptools - -REQUIRES = ["msrest>=0.6.21", "azure-core<2.0.0,>=1.20.1"] +PACKAGE_NAME = "anythingclient" +version = "0.1.0" setup( - name=NAME, - version=VERSION, + name=PACKAGE_NAME, + version=version, description="AnythingClient", author_email="", url="", - keywords=["Swagger", "AnythingClient"], - install_requires=REQUIRES, + keywords="azure, azure sdk", packages=find_packages(), include_package_data=True, + install_requires=[ + "msrest>=0.6.21", + "azure-core<2.0.0,>=1.20.1", + ], long_description="""\ Service client for testing basic anything types. Those schemas without types can be anything: primitive, object, array. """, diff --git a/test/vanilla/legacy/Expected/AcceptanceTests/BodyArray/setup.py b/test/vanilla/legacy/Expected/AcceptanceTests/BodyArray/setup.py index 877b4dde4a8..b4496bedec9 100644 --- a/test/vanilla/legacy/Expected/AcceptanceTests/BodyArray/setup.py +++ b/test/vanilla/legacy/Expected/AcceptanceTests/BodyArray/setup.py @@ -6,31 +6,24 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- # coding: utf-8 - from setuptools import setup, find_packages -NAME = "autorestswaggerbatarrayservice" -VERSION = "0.1.0" - -# To install the library, run the following -# -# python setup.py install -# -# prerequisite: setuptools -# http://pypi.python.org/pypi/setuptools - -REQUIRES = ["msrest>=0.6.21", "azure-core<2.0.0,>=1.20.1"] +PACKAGE_NAME = "autorestswaggerbatarrayservice" +version = "0.1.0" setup( - name=NAME, - version=VERSION, + name=PACKAGE_NAME, + version=version, description="AutoRestSwaggerBATArrayService", author_email="", url="", - keywords=["Swagger", "AutoRestSwaggerBATArrayService"], - install_requires=REQUIRES, + keywords="azure, azure sdk", packages=find_packages(), include_package_data=True, + install_requires=[ + "msrest>=0.6.21", + "azure-core<2.0.0,>=1.20.1", + ], long_description="""\ Test Infrastructure for AutoRest Swagger BAT. """, diff --git a/test/vanilla/legacy/Expected/AcceptanceTests/BodyArrayWithNamespaceFolders/setup.py b/test/vanilla/legacy/Expected/AcceptanceTests/BodyArrayWithNamespaceFolders/setup.py index 877b4dde4a8..b4496bedec9 100644 --- a/test/vanilla/legacy/Expected/AcceptanceTests/BodyArrayWithNamespaceFolders/setup.py +++ b/test/vanilla/legacy/Expected/AcceptanceTests/BodyArrayWithNamespaceFolders/setup.py @@ -6,31 +6,24 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- # coding: utf-8 - from setuptools import setup, find_packages -NAME = "autorestswaggerbatarrayservice" -VERSION = "0.1.0" - -# To install the library, run the following -# -# python setup.py install -# -# prerequisite: setuptools -# http://pypi.python.org/pypi/setuptools - -REQUIRES = ["msrest>=0.6.21", "azure-core<2.0.0,>=1.20.1"] +PACKAGE_NAME = "autorestswaggerbatarrayservice" +version = "0.1.0" setup( - name=NAME, - version=VERSION, + name=PACKAGE_NAME, + version=version, description="AutoRestSwaggerBATArrayService", author_email="", url="", - keywords=["Swagger", "AutoRestSwaggerBATArrayService"], - install_requires=REQUIRES, + keywords="azure, azure sdk", packages=find_packages(), include_package_data=True, + install_requires=[ + "msrest>=0.6.21", + "azure-core<2.0.0,>=1.20.1", + ], long_description="""\ Test Infrastructure for AutoRest Swagger BAT. """, diff --git a/test/vanilla/legacy/Expected/AcceptanceTests/BodyArrayWithPythonThreeOperationFiles/setup.py b/test/vanilla/legacy/Expected/AcceptanceTests/BodyArrayWithPythonThreeOperationFiles/setup.py index 877b4dde4a8..b4496bedec9 100644 --- a/test/vanilla/legacy/Expected/AcceptanceTests/BodyArrayWithPythonThreeOperationFiles/setup.py +++ b/test/vanilla/legacy/Expected/AcceptanceTests/BodyArrayWithPythonThreeOperationFiles/setup.py @@ -6,31 +6,24 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- # coding: utf-8 - from setuptools import setup, find_packages -NAME = "autorestswaggerbatarrayservice" -VERSION = "0.1.0" - -# To install the library, run the following -# -# python setup.py install -# -# prerequisite: setuptools -# http://pypi.python.org/pypi/setuptools - -REQUIRES = ["msrest>=0.6.21", "azure-core<2.0.0,>=1.20.1"] +PACKAGE_NAME = "autorestswaggerbatarrayservice" +version = "0.1.0" setup( - name=NAME, - version=VERSION, + name=PACKAGE_NAME, + version=version, description="AutoRestSwaggerBATArrayService", author_email="", url="", - keywords=["Swagger", "AutoRestSwaggerBATArrayService"], - install_requires=REQUIRES, + keywords="azure, azure sdk", packages=find_packages(), include_package_data=True, + install_requires=[ + "msrest>=0.6.21", + "azure-core<2.0.0,>=1.20.1", + ], long_description="""\ Test Infrastructure for AutoRest Swagger BAT. """, diff --git a/test/vanilla/legacy/Expected/AcceptanceTests/BodyBinary/setup.py b/test/vanilla/legacy/Expected/AcceptanceTests/BodyBinary/setup.py index 772307d83f9..b6f3411b4bb 100644 --- a/test/vanilla/legacy/Expected/AcceptanceTests/BodyBinary/setup.py +++ b/test/vanilla/legacy/Expected/AcceptanceTests/BodyBinary/setup.py @@ -6,31 +6,24 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- # coding: utf-8 - from setuptools import setup, find_packages -NAME = "binarywithcontenttypeapplicationjson" -VERSION = "0.1.0" - -# To install the library, run the following -# -# python setup.py install -# -# prerequisite: setuptools -# http://pypi.python.org/pypi/setuptools - -REQUIRES = ["msrest>=0.6.21", "azure-core<2.0.0,>=1.20.1"] +PACKAGE_NAME = "binarywithcontenttypeapplicationjson" +version = "0.1.0" setup( - name=NAME, - version=VERSION, + name=PACKAGE_NAME, + version=version, description="BinaryWithContentTypeApplicationJson", author_email="", url="", - keywords=["Swagger", "BinaryWithContentTypeApplicationJson"], - install_requires=REQUIRES, + keywords="azure, azure sdk", packages=find_packages(), include_package_data=True, + install_requires=[ + "msrest>=0.6.21", + "azure-core<2.0.0,>=1.20.1", + ], long_description="""\ Sample for file with json and binary content type. """, diff --git a/test/vanilla/legacy/Expected/AcceptanceTests/BodyBoolean/setup.py b/test/vanilla/legacy/Expected/AcceptanceTests/BodyBoolean/setup.py index 374eaef7983..c202e9c623a 100644 --- a/test/vanilla/legacy/Expected/AcceptanceTests/BodyBoolean/setup.py +++ b/test/vanilla/legacy/Expected/AcceptanceTests/BodyBoolean/setup.py @@ -6,31 +6,24 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- # coding: utf-8 - from setuptools import setup, find_packages -NAME = "autorestbooltestservice" -VERSION = "0.1.0" - -# To install the library, run the following -# -# python setup.py install -# -# prerequisite: setuptools -# http://pypi.python.org/pypi/setuptools - -REQUIRES = ["msrest>=0.6.21", "azure-core<2.0.0,>=1.20.1"] +PACKAGE_NAME = "autorestbooltestservice" +version = "0.1.0" setup( - name=NAME, - version=VERSION, + name=PACKAGE_NAME, + version=version, description="AutoRestBoolTestService", author_email="", url="", - keywords=["Swagger", "AutoRestBoolTestService"], - install_requires=REQUIRES, + keywords="azure, azure sdk", packages=find_packages(), include_package_data=True, + install_requires=[ + "msrest>=0.6.21", + "azure-core<2.0.0,>=1.20.1", + ], long_description="""\ Test Infrastructure for AutoRest. """, diff --git a/test/vanilla/legacy/Expected/AcceptanceTests/BodyByte/setup.py b/test/vanilla/legacy/Expected/AcceptanceTests/BodyByte/setup.py index 158f73d896a..d1f5e471d62 100644 --- a/test/vanilla/legacy/Expected/AcceptanceTests/BodyByte/setup.py +++ b/test/vanilla/legacy/Expected/AcceptanceTests/BodyByte/setup.py @@ -6,31 +6,24 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- # coding: utf-8 - from setuptools import setup, find_packages -NAME = "autorestswaggerbatbyteservice" -VERSION = "0.1.0" - -# To install the library, run the following -# -# python setup.py install -# -# prerequisite: setuptools -# http://pypi.python.org/pypi/setuptools - -REQUIRES = ["msrest>=0.6.21", "azure-core<2.0.0,>=1.20.1"] +PACKAGE_NAME = "autorestswaggerbatbyteservice" +version = "0.1.0" setup( - name=NAME, - version=VERSION, + name=PACKAGE_NAME, + version=version, description="AutoRestSwaggerBATByteService", author_email="", url="", - keywords=["Swagger", "AutoRestSwaggerBATByteService"], - install_requires=REQUIRES, + keywords="azure, azure sdk", packages=find_packages(), include_package_data=True, + install_requires=[ + "msrest>=0.6.21", + "azure-core<2.0.0,>=1.20.1", + ], long_description="""\ Test Infrastructure for AutoRest Swagger BAT. """, diff --git a/test/vanilla/legacy/Expected/AcceptanceTests/BodyByteWithPackageName/setup.py b/test/vanilla/legacy/Expected/AcceptanceTests/BodyByteWithPackageName/setup.py index 941c608a307..0bf4de594ed 100644 --- a/test/vanilla/legacy/Expected/AcceptanceTests/BodyByteWithPackageName/setup.py +++ b/test/vanilla/legacy/Expected/AcceptanceTests/BodyByteWithPackageName/setup.py @@ -6,31 +6,24 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- # coding: utf-8 - from setuptools import setup, find_packages -NAME = "package-name" -VERSION = "0.1.0" - -# To install the library, run the following -# -# python setup.py install -# -# prerequisite: setuptools -# http://pypi.python.org/pypi/setuptools - -REQUIRES = ["msrest>=0.6.21", "azure-core<2.0.0,>=1.20.1"] +PACKAGE_NAME = "package-name" +version = "0.1.0" setup( - name=NAME, - version=VERSION, + name=PACKAGE_NAME, + version=version, description="package-name", author_email="", url="", - keywords=["Swagger", "ClassName"], - install_requires=REQUIRES, + keywords="azure, azure sdk", packages=find_packages(), include_package_data=True, + install_requires=[ + "msrest>=0.6.21", + "azure-core<2.0.0,>=1.20.1", + ], long_description="""\ Test Infrastructure for AutoRest Swagger BAT. """, diff --git a/test/vanilla/legacy/Expected/AcceptanceTests/BodyComplex/setup.py b/test/vanilla/legacy/Expected/AcceptanceTests/BodyComplex/setup.py index ea77baa0fb5..9d4ebd2b05f 100644 --- a/test/vanilla/legacy/Expected/AcceptanceTests/BodyComplex/setup.py +++ b/test/vanilla/legacy/Expected/AcceptanceTests/BodyComplex/setup.py @@ -6,31 +6,24 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- # coding: utf-8 - from setuptools import setup, find_packages -NAME = "autorestcomplextestservice" -VERSION = "0.1.0" - -# To install the library, run the following -# -# python setup.py install -# -# prerequisite: setuptools -# http://pypi.python.org/pypi/setuptools - -REQUIRES = ["msrest>=0.6.21", "azure-core<2.0.0,>=1.20.1"] +PACKAGE_NAME = "autorestcomplextestservice" +version = "0.1.0" setup( - name=NAME, - version=VERSION, + name=PACKAGE_NAME, + version=version, description="AutoRestComplexTestService", author_email="", url="", - keywords=["Swagger", "AutoRestComplexTestService"], - install_requires=REQUIRES, + keywords="azure, azure sdk", packages=find_packages(), include_package_data=True, + install_requires=[ + "msrest>=0.6.21", + "azure-core<2.0.0,>=1.20.1", + ], long_description="""\ Test Infrastructure for AutoRest. """, diff --git a/test/vanilla/legacy/Expected/AcceptanceTests/BodyComplexPythonThreeOnly/setup.py b/test/vanilla/legacy/Expected/AcceptanceTests/BodyComplexPythonThreeOnly/setup.py index a7ccffb7a49..8792e543b11 100644 --- a/test/vanilla/legacy/Expected/AcceptanceTests/BodyComplexPythonThreeOnly/setup.py +++ b/test/vanilla/legacy/Expected/AcceptanceTests/BodyComplexPythonThreeOnly/setup.py @@ -6,31 +6,24 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- # coding: utf-8 - from setuptools import setup, find_packages -NAME = "bodycomplexpython3only" -VERSION = "0.1.0" - -# To install the library, run the following -# -# python setup.py install -# -# prerequisite: setuptools -# http://pypi.python.org/pypi/setuptools - -REQUIRES = ["msrest>=0.6.21", "azure-core<2.0.0,>=1.20.1"] +PACKAGE_NAME = "bodycomplexpython3only" +version = "0.1.0" setup( - name=NAME, - version=VERSION, + name=PACKAGE_NAME, + version=version, description="bodycomplexpython3only", author_email="", url="", - keywords=["Swagger", "AutoRestComplexTestService"], - install_requires=REQUIRES, + keywords="azure, azure sdk", packages=find_packages(), include_package_data=True, + install_requires=[ + "msrest>=0.6.21", + "azure-core<2.0.0,>=1.20.1", + ], long_description="""\ Test Infrastructure for AutoRest. """, diff --git a/test/vanilla/legacy/Expected/AcceptanceTests/BodyDate/setup.py b/test/vanilla/legacy/Expected/AcceptanceTests/BodyDate/setup.py index 1b7756a102f..46a4f0de64f 100644 --- a/test/vanilla/legacy/Expected/AcceptanceTests/BodyDate/setup.py +++ b/test/vanilla/legacy/Expected/AcceptanceTests/BodyDate/setup.py @@ -6,31 +6,24 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- # coding: utf-8 - from setuptools import setup, find_packages -NAME = "autorestdatetestservice" -VERSION = "0.1.0" - -# To install the library, run the following -# -# python setup.py install -# -# prerequisite: setuptools -# http://pypi.python.org/pypi/setuptools - -REQUIRES = ["msrest>=0.6.21", "azure-core<2.0.0,>=1.20.1"] +PACKAGE_NAME = "autorestdatetestservice" +version = "0.1.0" setup( - name=NAME, - version=VERSION, + name=PACKAGE_NAME, + version=version, description="AutoRestDateTestService", author_email="", url="", - keywords=["Swagger", "AutoRestDateTestService"], - install_requires=REQUIRES, + keywords="azure, azure sdk", packages=find_packages(), include_package_data=True, + install_requires=[ + "msrest>=0.6.21", + "azure-core<2.0.0,>=1.20.1", + ], long_description="""\ Test Infrastructure for AutoRest. """, diff --git a/test/vanilla/legacy/Expected/AcceptanceTests/BodyDateTime/setup.py b/test/vanilla/legacy/Expected/AcceptanceTests/BodyDateTime/setup.py index e3def2be286..c43819edbde 100644 --- a/test/vanilla/legacy/Expected/AcceptanceTests/BodyDateTime/setup.py +++ b/test/vanilla/legacy/Expected/AcceptanceTests/BodyDateTime/setup.py @@ -6,31 +6,24 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- # coding: utf-8 - from setuptools import setup, find_packages -NAME = "autorestdatetimetestservice" -VERSION = "0.1.0" - -# To install the library, run the following -# -# python setup.py install -# -# prerequisite: setuptools -# http://pypi.python.org/pypi/setuptools - -REQUIRES = ["msrest>=0.6.21", "azure-core<2.0.0,>=1.20.1"] +PACKAGE_NAME = "autorestdatetimetestservice" +version = "0.1.0" setup( - name=NAME, - version=VERSION, + name=PACKAGE_NAME, + version=version, description="AutoRestDateTimeTestService", author_email="", url="", - keywords=["Swagger", "AutoRestDateTimeTestService"], - install_requires=REQUIRES, + keywords="azure, azure sdk", packages=find_packages(), include_package_data=True, + install_requires=[ + "msrest>=0.6.21", + "azure-core<2.0.0,>=1.20.1", + ], long_description="""\ Test Infrastructure for AutoRest. """, diff --git a/test/vanilla/legacy/Expected/AcceptanceTests/BodyDateTimeRfc1123/setup.py b/test/vanilla/legacy/Expected/AcceptanceTests/BodyDateTimeRfc1123/setup.py index 8c0de0f8c73..85bb56c5ead 100644 --- a/test/vanilla/legacy/Expected/AcceptanceTests/BodyDateTimeRfc1123/setup.py +++ b/test/vanilla/legacy/Expected/AcceptanceTests/BodyDateTimeRfc1123/setup.py @@ -6,31 +6,24 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- # coding: utf-8 - from setuptools import setup, find_packages -NAME = "autorestrfc1123datetimetestservice" -VERSION = "0.1.0" - -# To install the library, run the following -# -# python setup.py install -# -# prerequisite: setuptools -# http://pypi.python.org/pypi/setuptools - -REQUIRES = ["msrest>=0.6.21", "azure-core<2.0.0,>=1.20.1"] +PACKAGE_NAME = "autorestrfc1123datetimetestservice" +version = "0.1.0" setup( - name=NAME, - version=VERSION, + name=PACKAGE_NAME, + version=version, description="AutoRestRFC1123DateTimeTestService", author_email="", url="", - keywords=["Swagger", "AutoRestRFC1123DateTimeTestService"], - install_requires=REQUIRES, + keywords="azure, azure sdk", packages=find_packages(), include_package_data=True, + install_requires=[ + "msrest>=0.6.21", + "azure-core<2.0.0,>=1.20.1", + ], long_description="""\ Test Infrastructure for AutoRest. """, diff --git a/test/vanilla/legacy/Expected/AcceptanceTests/BodyDictionary/setup.py b/test/vanilla/legacy/Expected/AcceptanceTests/BodyDictionary/setup.py index 17faa081a7f..33c4b91e927 100644 --- a/test/vanilla/legacy/Expected/AcceptanceTests/BodyDictionary/setup.py +++ b/test/vanilla/legacy/Expected/AcceptanceTests/BodyDictionary/setup.py @@ -6,31 +6,24 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- # coding: utf-8 - from setuptools import setup, find_packages -NAME = "autorestswaggerbatdictionaryservice" -VERSION = "0.1.0" - -# To install the library, run the following -# -# python setup.py install -# -# prerequisite: setuptools -# http://pypi.python.org/pypi/setuptools - -REQUIRES = ["msrest>=0.6.21", "azure-core<2.0.0,>=1.20.1"] +PACKAGE_NAME = "autorestswaggerbatdictionaryservice" +version = "0.1.0" setup( - name=NAME, - version=VERSION, + name=PACKAGE_NAME, + version=version, description="AutoRestSwaggerBATDictionaryService", author_email="", url="", - keywords=["Swagger", "AutoRestSwaggerBATDictionaryService"], - install_requires=REQUIRES, + keywords="azure, azure sdk", packages=find_packages(), include_package_data=True, + install_requires=[ + "msrest>=0.6.21", + "azure-core<2.0.0,>=1.20.1", + ], long_description="""\ Test Infrastructure for AutoRest Swagger BAT. """, diff --git a/test/vanilla/legacy/Expected/AcceptanceTests/BodyDuration/setup.py b/test/vanilla/legacy/Expected/AcceptanceTests/BodyDuration/setup.py index 385afe6573c..6ecee859197 100644 --- a/test/vanilla/legacy/Expected/AcceptanceTests/BodyDuration/setup.py +++ b/test/vanilla/legacy/Expected/AcceptanceTests/BodyDuration/setup.py @@ -6,31 +6,24 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- # coding: utf-8 - from setuptools import setup, find_packages -NAME = "autorestdurationtestservice" -VERSION = "0.1.0" - -# To install the library, run the following -# -# python setup.py install -# -# prerequisite: setuptools -# http://pypi.python.org/pypi/setuptools - -REQUIRES = ["msrest>=0.6.21", "azure-core<2.0.0,>=1.20.1"] +PACKAGE_NAME = "autorestdurationtestservice" +version = "0.1.0" setup( - name=NAME, - version=VERSION, + name=PACKAGE_NAME, + version=version, description="AutoRestDurationTestService", author_email="", url="", - keywords=["Swagger", "AutoRestDurationTestService"], - install_requires=REQUIRES, + keywords="azure, azure sdk", packages=find_packages(), include_package_data=True, + install_requires=[ + "msrest>=0.6.21", + "azure-core<2.0.0,>=1.20.1", + ], long_description="""\ Test Infrastructure for AutoRest. """, diff --git a/test/vanilla/legacy/Expected/AcceptanceTests/BodyFile/setup.py b/test/vanilla/legacy/Expected/AcceptanceTests/BodyFile/setup.py index da0628aad71..4bc17cee69e 100644 --- a/test/vanilla/legacy/Expected/AcceptanceTests/BodyFile/setup.py +++ b/test/vanilla/legacy/Expected/AcceptanceTests/BodyFile/setup.py @@ -6,31 +6,24 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- # coding: utf-8 - from setuptools import setup, find_packages -NAME = "autorestswaggerbatfileservice" -VERSION = "0.1.0" - -# To install the library, run the following -# -# python setup.py install -# -# prerequisite: setuptools -# http://pypi.python.org/pypi/setuptools - -REQUIRES = ["msrest>=0.6.21", "azure-core<2.0.0,>=1.20.1"] +PACKAGE_NAME = "autorestswaggerbatfileservice" +version = "0.1.0" setup( - name=NAME, - version=VERSION, + name=PACKAGE_NAME, + version=version, description="AutoRestSwaggerBATFileService", author_email="", url="", - keywords=["Swagger", "AutoRestSwaggerBATFileService"], - install_requires=REQUIRES, + keywords="azure, azure sdk", packages=find_packages(), include_package_data=True, + install_requires=[ + "msrest>=0.6.21", + "azure-core<2.0.0,>=1.20.1", + ], long_description="""\ Test Infrastructure for AutoRest Swagger BAT. """, diff --git a/test/vanilla/legacy/Expected/AcceptanceTests/BodyFormData/setup.py b/test/vanilla/legacy/Expected/AcceptanceTests/BodyFormData/setup.py index b9c8a22987e..9631b836c87 100644 --- a/test/vanilla/legacy/Expected/AcceptanceTests/BodyFormData/setup.py +++ b/test/vanilla/legacy/Expected/AcceptanceTests/BodyFormData/setup.py @@ -6,31 +6,24 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- # coding: utf-8 - from setuptools import setup, find_packages -NAME = "autorestswaggerbatformdataservice" -VERSION = "0.1.0" - -# To install the library, run the following -# -# python setup.py install -# -# prerequisite: setuptools -# http://pypi.python.org/pypi/setuptools - -REQUIRES = ["msrest>=0.6.21", "azure-core<2.0.0,>=1.20.1"] +PACKAGE_NAME = "autorestswaggerbatformdataservice" +version = "0.1.0" setup( - name=NAME, - version=VERSION, + name=PACKAGE_NAME, + version=version, description="AutoRestSwaggerBATFormDataService", author_email="", url="", - keywords=["Swagger", "AutoRestSwaggerBATFormDataService"], - install_requires=REQUIRES, + keywords="azure, azure sdk", packages=find_packages(), include_package_data=True, + install_requires=[ + "msrest>=0.6.21", + "azure-core<2.0.0,>=1.20.1", + ], long_description="""\ Test Infrastructure for AutoRest Swagger BAT. """, diff --git a/test/vanilla/legacy/Expected/AcceptanceTests/BodyFormUrlEncodedData/setup.py b/test/vanilla/legacy/Expected/AcceptanceTests/BodyFormUrlEncodedData/setup.py index 865983fb584..d436bbb30c8 100644 --- a/test/vanilla/legacy/Expected/AcceptanceTests/BodyFormUrlEncodedData/setup.py +++ b/test/vanilla/legacy/Expected/AcceptanceTests/BodyFormUrlEncodedData/setup.py @@ -6,31 +6,24 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- # coding: utf-8 - from setuptools import setup, find_packages -NAME = "bodyformsdataurlencoded" -VERSION = "0.1.0" - -# To install the library, run the following -# -# python setup.py install -# -# prerequisite: setuptools -# http://pypi.python.org/pypi/setuptools - -REQUIRES = ["msrest>=0.6.21", "azure-core<2.0.0,>=1.20.1"] +PACKAGE_NAME = "bodyformsdataurlencoded" +version = "0.1.0" setup( - name=NAME, - version=VERSION, + name=PACKAGE_NAME, + version=version, description="BodyFormsDataURLEncoded", author_email="", url="", - keywords=["Swagger", "BodyFormsDataURLEncoded"], - install_requires=REQUIRES, + keywords="azure, azure sdk", packages=find_packages(), include_package_data=True, + install_requires=[ + "msrest>=0.6.21", + "azure-core<2.0.0,>=1.20.1", + ], long_description="""\ Test Infrastructure for AutoRest Swagger BAT. """, diff --git a/test/vanilla/legacy/Expected/AcceptanceTests/BodyInteger/setup.py b/test/vanilla/legacy/Expected/AcceptanceTests/BodyInteger/setup.py index bcd0dece55b..771458fa5a5 100644 --- a/test/vanilla/legacy/Expected/AcceptanceTests/BodyInteger/setup.py +++ b/test/vanilla/legacy/Expected/AcceptanceTests/BodyInteger/setup.py @@ -6,31 +6,24 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- # coding: utf-8 - from setuptools import setup, find_packages -NAME = "autorestintegertestservice" -VERSION = "0.1.0" - -# To install the library, run the following -# -# python setup.py install -# -# prerequisite: setuptools -# http://pypi.python.org/pypi/setuptools - -REQUIRES = ["msrest>=0.6.21", "azure-core<2.0.0,>=1.20.1"] +PACKAGE_NAME = "autorestintegertestservice" +version = "0.1.0" setup( - name=NAME, - version=VERSION, + name=PACKAGE_NAME, + version=version, description="AutoRestIntegerTestService", author_email="", url="", - keywords=["Swagger", "AutoRestIntegerTestService"], - install_requires=REQUIRES, + keywords="azure, azure sdk", packages=find_packages(), include_package_data=True, + install_requires=[ + "msrest>=0.6.21", + "azure-core<2.0.0,>=1.20.1", + ], long_description="""\ Test Infrastructure for AutoRest. """, diff --git a/test/vanilla/legacy/Expected/AcceptanceTests/BodyNumber/setup.py b/test/vanilla/legacy/Expected/AcceptanceTests/BodyNumber/setup.py index f2c282a12aa..8a60500f42f 100644 --- a/test/vanilla/legacy/Expected/AcceptanceTests/BodyNumber/setup.py +++ b/test/vanilla/legacy/Expected/AcceptanceTests/BodyNumber/setup.py @@ -6,31 +6,24 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- # coding: utf-8 - from setuptools import setup, find_packages -NAME = "autorestnumbertestservice" -VERSION = "0.1.0" - -# To install the library, run the following -# -# python setup.py install -# -# prerequisite: setuptools -# http://pypi.python.org/pypi/setuptools - -REQUIRES = ["msrest>=0.6.21", "azure-core<2.0.0,>=1.20.1"] +PACKAGE_NAME = "autorestnumbertestservice" +version = "0.1.0" setup( - name=NAME, - version=VERSION, + name=PACKAGE_NAME, + version=version, description="AutoRestNumberTestService", author_email="", url="", - keywords=["Swagger", "AutoRestNumberTestService"], - install_requires=REQUIRES, + keywords="azure, azure sdk", packages=find_packages(), include_package_data=True, + install_requires=[ + "msrest>=0.6.21", + "azure-core<2.0.0,>=1.20.1", + ], long_description="""\ Test Infrastructure for AutoRest. """, diff --git a/test/vanilla/legacy/Expected/AcceptanceTests/BodyString/setup.py b/test/vanilla/legacy/Expected/AcceptanceTests/BodyString/setup.py index f9bbe0b13fa..e64e4344057 100644 --- a/test/vanilla/legacy/Expected/AcceptanceTests/BodyString/setup.py +++ b/test/vanilla/legacy/Expected/AcceptanceTests/BodyString/setup.py @@ -6,31 +6,24 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- # coding: utf-8 - from setuptools import setup, find_packages -NAME = "autorestswaggerbatservice" -VERSION = "0.1.0" - -# To install the library, run the following -# -# python setup.py install -# -# prerequisite: setuptools -# http://pypi.python.org/pypi/setuptools - -REQUIRES = ["msrest>=0.6.21", "azure-core<2.0.0,>=1.20.1"] +PACKAGE_NAME = "autorestswaggerbatservice" +version = "0.1.0" setup( - name=NAME, - version=VERSION, + name=PACKAGE_NAME, + version=version, description="AutoRestSwaggerBATService", author_email="", url="", - keywords=["Swagger", "AutoRestSwaggerBATService"], - install_requires=REQUIRES, + keywords="azure, azure sdk", packages=find_packages(), include_package_data=True, + install_requires=[ + "msrest>=0.6.21", + "azure-core<2.0.0,>=1.20.1", + ], long_description="""\ Test Infrastructure for AutoRest Swagger BAT. """, diff --git a/test/vanilla/legacy/Expected/AcceptanceTests/BodyTime/setup.py b/test/vanilla/legacy/Expected/AcceptanceTests/BodyTime/setup.py index 4c61b19cc21..c9653994d04 100644 --- a/test/vanilla/legacy/Expected/AcceptanceTests/BodyTime/setup.py +++ b/test/vanilla/legacy/Expected/AcceptanceTests/BodyTime/setup.py @@ -6,31 +6,24 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- # coding: utf-8 - from setuptools import setup, find_packages -NAME = "autoresttimetestservice" -VERSION = "0.1.0" - -# To install the library, run the following -# -# python setup.py install -# -# prerequisite: setuptools -# http://pypi.python.org/pypi/setuptools - -REQUIRES = ["msrest>=0.6.21", "azure-core<2.0.0,>=1.20.1"] +PACKAGE_NAME = "autoresttimetestservice" +version = "0.1.0" setup( - name=NAME, - version=VERSION, + name=PACKAGE_NAME, + version=version, description="AutoRestTimeTestService", author_email="", url="", - keywords=["Swagger", "AutoRestTimeTestService"], - install_requires=REQUIRES, + keywords="azure, azure sdk", packages=find_packages(), include_package_data=True, + install_requires=[ + "msrest>=0.6.21", + "azure-core<2.0.0,>=1.20.1", + ], long_description="""\ Test Infrastructure for AutoRest. """, diff --git a/test/vanilla/legacy/Expected/AcceptanceTests/Constants/setup.py b/test/vanilla/legacy/Expected/AcceptanceTests/Constants/setup.py index 56088d4f1fe..5c3500f3542 100644 --- a/test/vanilla/legacy/Expected/AcceptanceTests/Constants/setup.py +++ b/test/vanilla/legacy/Expected/AcceptanceTests/Constants/setup.py @@ -6,31 +6,24 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- # coding: utf-8 - from setuptools import setup, find_packages -NAME = "autorestswaggerconstantservice" -VERSION = "0.1.0" - -# To install the library, run the following -# -# python setup.py install -# -# prerequisite: setuptools -# http://pypi.python.org/pypi/setuptools - -REQUIRES = ["msrest>=0.6.21", "azure-core<2.0.0,>=1.20.1"] +PACKAGE_NAME = "autorestswaggerconstantservice" +version = "0.1.0" setup( - name=NAME, - version=VERSION, + name=PACKAGE_NAME, + version=version, description="AutoRestSwaggerConstantService", author_email="", url="", - keywords=["Swagger", "AutoRestSwaggerConstantService"], - install_requires=REQUIRES, + keywords="azure, azure sdk", packages=find_packages(), include_package_data=True, + install_requires=[ + "msrest>=0.6.21", + "azure-core<2.0.0,>=1.20.1", + ], long_description="""\ Test Infrastructure for AutoRest Swagger Constant. """, diff --git a/test/vanilla/legacy/Expected/AcceptanceTests/CustomBaseUri/setup.py b/test/vanilla/legacy/Expected/AcceptanceTests/CustomBaseUri/setup.py index c250c733c08..5771c01ab9f 100644 --- a/test/vanilla/legacy/Expected/AcceptanceTests/CustomBaseUri/setup.py +++ b/test/vanilla/legacy/Expected/AcceptanceTests/CustomBaseUri/setup.py @@ -6,31 +6,24 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- # coding: utf-8 - from setuptools import setup, find_packages -NAME = "autorestparameterizedhosttestclient" -VERSION = "0.1.0" - -# To install the library, run the following -# -# python setup.py install -# -# prerequisite: setuptools -# http://pypi.python.org/pypi/setuptools - -REQUIRES = ["msrest>=0.6.21", "azure-core<2.0.0,>=1.20.1"] +PACKAGE_NAME = "autorestparameterizedhosttestclient" +version = "0.1.0" setup( - name=NAME, - version=VERSION, + name=PACKAGE_NAME, + version=version, description="AutoRestParameterizedHostTestClient", author_email="", url="", - keywords=["Swagger", "AutoRestParameterizedHostTestClient"], - install_requires=REQUIRES, + keywords="azure, azure sdk", packages=find_packages(), include_package_data=True, + install_requires=[ + "msrest>=0.6.21", + "azure-core<2.0.0,>=1.20.1", + ], long_description="""\ Test Infrastructure for AutoRest. """, diff --git a/test/vanilla/legacy/Expected/AcceptanceTests/CustomBaseUriMoreOptions/setup.py b/test/vanilla/legacy/Expected/AcceptanceTests/CustomBaseUriMoreOptions/setup.py index d2c84ca63b8..528516a4fe7 100644 --- a/test/vanilla/legacy/Expected/AcceptanceTests/CustomBaseUriMoreOptions/setup.py +++ b/test/vanilla/legacy/Expected/AcceptanceTests/CustomBaseUriMoreOptions/setup.py @@ -6,31 +6,24 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- # coding: utf-8 - from setuptools import setup, find_packages -NAME = "autorestparameterizedcustomhosttestclient" -VERSION = "0.1.0" - -# To install the library, run the following -# -# python setup.py install -# -# prerequisite: setuptools -# http://pypi.python.org/pypi/setuptools - -REQUIRES = ["msrest>=0.6.21", "azure-core<2.0.0,>=1.20.1"] +PACKAGE_NAME = "autorestparameterizedcustomhosttestclient" +version = "0.1.0" setup( - name=NAME, - version=VERSION, + name=PACKAGE_NAME, + version=version, description="AutoRestParameterizedCustomHostTestClient", author_email="", url="", - keywords=["Swagger", "AutoRestParameterizedCustomHostTestClient"], - install_requires=REQUIRES, + keywords="azure, azure sdk", packages=find_packages(), include_package_data=True, + install_requires=[ + "msrest>=0.6.21", + "azure-core<2.0.0,>=1.20.1", + ], long_description="""\ Test Infrastructure for AutoRest. """, diff --git a/test/vanilla/legacy/Expected/AcceptanceTests/ErrorWithSecrets/setup.py b/test/vanilla/legacy/Expected/AcceptanceTests/ErrorWithSecrets/setup.py index ed786ed0573..2af73e163b1 100644 --- a/test/vanilla/legacy/Expected/AcceptanceTests/ErrorWithSecrets/setup.py +++ b/test/vanilla/legacy/Expected/AcceptanceTests/ErrorWithSecrets/setup.py @@ -6,31 +6,24 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- # coding: utf-8 - from setuptools import setup, find_packages -NAME = "errorwithsecrets" -VERSION = "0.1.0" - -# To install the library, run the following -# -# python setup.py install -# -# prerequisite: setuptools -# http://pypi.python.org/pypi/setuptools - -REQUIRES = ["msrest>=0.6.21", "azure-core<2.0.0,>=1.20.1"] +PACKAGE_NAME = "errorwithsecrets" +version = "0.1.0" setup( - name=NAME, - version=VERSION, + name=PACKAGE_NAME, + version=version, description="ErrorWithSecrets", author_email="", url="", - keywords=["Swagger", "ErrorWithSecrets"], - install_requires=REQUIRES, + keywords="azure, azure sdk", packages=find_packages(), include_package_data=True, + install_requires=[ + "msrest>=0.6.21", + "azure-core<2.0.0,>=1.20.1", + ], long_description="""\ Tests whether loggers/tracers redact secrets and PII within error responses. """, diff --git a/test/vanilla/legacy/Expected/AcceptanceTests/ExtensibleEnums/setup.py b/test/vanilla/legacy/Expected/AcceptanceTests/ExtensibleEnums/setup.py index a7ea89c9d01..f16ec2cbf70 100644 --- a/test/vanilla/legacy/Expected/AcceptanceTests/ExtensibleEnums/setup.py +++ b/test/vanilla/legacy/Expected/AcceptanceTests/ExtensibleEnums/setup.py @@ -6,31 +6,24 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- # coding: utf-8 - from setuptools import setup, find_packages -NAME = "petstoreinc" -VERSION = "0.1.0" - -# To install the library, run the following -# -# python setup.py install -# -# prerequisite: setuptools -# http://pypi.python.org/pypi/setuptools - -REQUIRES = ["msrest>=0.6.21", "azure-core<2.0.0,>=1.20.1"] +PACKAGE_NAME = "petstoreinc" +version = "0.1.0" setup( - name=NAME, - version=VERSION, + name=PACKAGE_NAME, + version=version, description="PetStoreInc", author_email="", url="", - keywords=["Swagger", "PetStoreInc"], - install_requires=REQUIRES, + keywords="azure, azure sdk", packages=find_packages(), include_package_data=True, + install_requires=[ + "msrest>=0.6.21", + "azure-core<2.0.0,>=1.20.1", + ], long_description="""\ PetStore. """, diff --git a/test/vanilla/legacy/Expected/AcceptanceTests/Header/setup.py b/test/vanilla/legacy/Expected/AcceptanceTests/Header/setup.py index 8749e54d402..12460ccdd91 100644 --- a/test/vanilla/legacy/Expected/AcceptanceTests/Header/setup.py +++ b/test/vanilla/legacy/Expected/AcceptanceTests/Header/setup.py @@ -6,31 +6,24 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- # coding: utf-8 - from setuptools import setup, find_packages -NAME = "autorestswaggerbatheaderservice" -VERSION = "0.1.0" - -# To install the library, run the following -# -# python setup.py install -# -# prerequisite: setuptools -# http://pypi.python.org/pypi/setuptools - -REQUIRES = ["msrest>=0.6.21", "azure-core<2.0.0,>=1.20.1"] +PACKAGE_NAME = "autorestswaggerbatheaderservice" +version = "0.1.0" setup( - name=NAME, - version=VERSION, + name=PACKAGE_NAME, + version=version, description="AutoRestSwaggerBATHeaderService", author_email="", url="", - keywords=["Swagger", "AutoRestSwaggerBATHeaderService"], - install_requires=REQUIRES, + keywords="azure, azure sdk", packages=find_packages(), include_package_data=True, + install_requires=[ + "msrest>=0.6.21", + "azure-core<2.0.0,>=1.20.1", + ], long_description="""\ Test Infrastructure for AutoRest. """, diff --git a/test/vanilla/legacy/Expected/AcceptanceTests/Http/setup.py b/test/vanilla/legacy/Expected/AcceptanceTests/Http/setup.py index 69f380ec95e..1da4747d61e 100644 --- a/test/vanilla/legacy/Expected/AcceptanceTests/Http/setup.py +++ b/test/vanilla/legacy/Expected/AcceptanceTests/Http/setup.py @@ -6,31 +6,24 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- # coding: utf-8 - from setuptools import setup, find_packages -NAME = "autoresthttpinfrastructuretestservice" -VERSION = "0.1.0" - -# To install the library, run the following -# -# python setup.py install -# -# prerequisite: setuptools -# http://pypi.python.org/pypi/setuptools - -REQUIRES = ["msrest>=0.6.21", "azure-core<2.0.0,>=1.20.1"] +PACKAGE_NAME = "autoresthttpinfrastructuretestservice" +version = "0.1.0" setup( - name=NAME, - version=VERSION, + name=PACKAGE_NAME, + version=version, description="AutoRestHttpInfrastructureTestService", author_email="", url="", - keywords=["Swagger", "AutoRestHttpInfrastructureTestService"], - install_requires=REQUIRES, + keywords="azure, azure sdk", packages=find_packages(), include_package_data=True, + install_requires=[ + "msrest>=0.6.21", + "azure-core<2.0.0,>=1.20.1", + ], long_description="""\ Test Infrastructure for AutoRest. """, diff --git a/test/vanilla/legacy/Expected/AcceptanceTests/IncorrectErrorResponse/setup.py b/test/vanilla/legacy/Expected/AcceptanceTests/IncorrectErrorResponse/setup.py index 883660291b0..a205df4f873 100644 --- a/test/vanilla/legacy/Expected/AcceptanceTests/IncorrectErrorResponse/setup.py +++ b/test/vanilla/legacy/Expected/AcceptanceTests/IncorrectErrorResponse/setup.py @@ -6,31 +6,24 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- # coding: utf-8 - from setuptools import setup, find_packages -NAME = "incorrectreturnederrormodel" -VERSION = "0.1.0" - -# To install the library, run the following -# -# python setup.py install -# -# prerequisite: setuptools -# http://pypi.python.org/pypi/setuptools - -REQUIRES = ["msrest>=0.6.21", "azure-core<2.0.0,>=1.20.1"] +PACKAGE_NAME = "incorrectreturnederrormodel" +version = "0.1.0" setup( - name=NAME, - version=VERSION, + name=PACKAGE_NAME, + version=version, description="IncorrectReturnedErrorModel", author_email="", url="", - keywords=["Swagger", "IncorrectReturnedErrorModel"], - install_requires=REQUIRES, + keywords="azure, azure sdk", packages=find_packages(), include_package_data=True, + install_requires=[ + "msrest>=0.6.21", + "azure-core<2.0.0,>=1.20.1", + ], long_description="""\ Test to see when throwing an HttpResponseError whether we swallow error model deserialization errors. """, diff --git a/test/vanilla/legacy/Expected/AcceptanceTests/MediaTypes/setup.py b/test/vanilla/legacy/Expected/AcceptanceTests/MediaTypes/setup.py index 5c8489e8153..dd0d3c27d99 100644 --- a/test/vanilla/legacy/Expected/AcceptanceTests/MediaTypes/setup.py +++ b/test/vanilla/legacy/Expected/AcceptanceTests/MediaTypes/setup.py @@ -6,31 +6,24 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- # coding: utf-8 - from setuptools import setup, find_packages -NAME = "mediatypesclient" -VERSION = "0.1.0" - -# To install the library, run the following -# -# python setup.py install -# -# prerequisite: setuptools -# http://pypi.python.org/pypi/setuptools - -REQUIRES = ["msrest>=0.6.21", "azure-core<2.0.0,>=1.20.1"] +PACKAGE_NAME = "mediatypesclient" +version = "0.1.0" setup( - name=NAME, - version=VERSION, + name=PACKAGE_NAME, + version=version, description="MediaTypesClient", author_email="", url="", - keywords=["Swagger", "MediaTypesClient"], - install_requires=REQUIRES, + keywords="azure, azure sdk", packages=find_packages(), include_package_data=True, + install_requires=[ + "msrest>=0.6.21", + "azure-core<2.0.0,>=1.20.1", + ], long_description="""\ Play with produces/consumes and media-types in general. """, diff --git a/test/vanilla/legacy/Expected/AcceptanceTests/MergePatchJson/setup.py b/test/vanilla/legacy/Expected/AcceptanceTests/MergePatchJson/setup.py index 4b34ab99a32..5f536deb0ed 100644 --- a/test/vanilla/legacy/Expected/AcceptanceTests/MergePatchJson/setup.py +++ b/test/vanilla/legacy/Expected/AcceptanceTests/MergePatchJson/setup.py @@ -6,31 +6,24 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- # coding: utf-8 - from setuptools import setup, find_packages -NAME = "mergepatchjsonclient" -VERSION = "0.1.0" - -# To install the library, run the following -# -# python setup.py install -# -# prerequisite: setuptools -# http://pypi.python.org/pypi/setuptools - -REQUIRES = ["msrest>=0.6.21", "azure-core<2.0.0,>=1.20.1"] +PACKAGE_NAME = "mergepatchjsonclient" +version = "0.1.0" setup( - name=NAME, - version=VERSION, + name=PACKAGE_NAME, + version=version, description="MergePatchJsonClient", author_email="", url="", - keywords=["Swagger", "MergePatchJsonClient"], - install_requires=REQUIRES, + keywords="azure, azure sdk", packages=find_packages(), include_package_data=True, + install_requires=[ + "msrest>=0.6.21", + "azure-core<2.0.0,>=1.20.1", + ], long_description="""\ Service client for testing merge patch json. """, diff --git a/test/vanilla/legacy/Expected/AcceptanceTests/ModelFlattening/setup.py b/test/vanilla/legacy/Expected/AcceptanceTests/ModelFlattening/setup.py index 8d1edff1db1..2ee0b516ad1 100644 --- a/test/vanilla/legacy/Expected/AcceptanceTests/ModelFlattening/setup.py +++ b/test/vanilla/legacy/Expected/AcceptanceTests/ModelFlattening/setup.py @@ -6,31 +6,24 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- # coding: utf-8 - from setuptools import setup, find_packages -NAME = "autorestresourceflatteningtestservice" -VERSION = "0.1.0" - -# To install the library, run the following -# -# python setup.py install -# -# prerequisite: setuptools -# http://pypi.python.org/pypi/setuptools - -REQUIRES = ["msrest>=0.6.21", "azure-core<2.0.0,>=1.20.1"] +PACKAGE_NAME = "autorestresourceflatteningtestservice" +version = "0.1.0" setup( - name=NAME, - version=VERSION, + name=PACKAGE_NAME, + version=version, description="AutoRestResourceFlatteningTestService", author_email="", url="", - keywords=["Swagger", "AutoRestResourceFlatteningTestService"], - install_requires=REQUIRES, + keywords="azure, azure sdk", packages=find_packages(), include_package_data=True, + install_requires=[ + "msrest>=0.6.21", + "azure-core<2.0.0,>=1.20.1", + ], long_description="""\ Resource Flattening for AutoRest. """, diff --git a/test/vanilla/legacy/Expected/AcceptanceTests/MultipleInheritance/setup.py b/test/vanilla/legacy/Expected/AcceptanceTests/MultipleInheritance/setup.py index 5d90113dd65..ae12d33c3d8 100644 --- a/test/vanilla/legacy/Expected/AcceptanceTests/MultipleInheritance/setup.py +++ b/test/vanilla/legacy/Expected/AcceptanceTests/MultipleInheritance/setup.py @@ -6,31 +6,24 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- # coding: utf-8 - from setuptools import setup, find_packages -NAME = "multipleinheritanceserviceclient" -VERSION = "0.1.0" - -# To install the library, run the following -# -# python setup.py install -# -# prerequisite: setuptools -# http://pypi.python.org/pypi/setuptools - -REQUIRES = ["msrest>=0.6.21", "azure-core<2.0.0,>=1.20.1"] +PACKAGE_NAME = "multipleinheritanceserviceclient" +version = "0.1.0" setup( - name=NAME, - version=VERSION, + name=PACKAGE_NAME, + version=version, description="MultipleInheritanceServiceClient", author_email="", url="", - keywords=["Swagger", "MultipleInheritanceServiceClient"], - install_requires=REQUIRES, + keywords="azure, azure sdk", packages=find_packages(), include_package_data=True, + install_requires=[ + "msrest>=0.6.21", + "azure-core<2.0.0,>=1.20.1", + ], long_description="""\ Service client for multiinheritance client testing. """, diff --git a/test/vanilla/legacy/Expected/AcceptanceTests/NoOperations/setup.py b/test/vanilla/legacy/Expected/AcceptanceTests/NoOperations/setup.py index 66ffc7560f0..a504a451092 100644 --- a/test/vanilla/legacy/Expected/AcceptanceTests/NoOperations/setup.py +++ b/test/vanilla/legacy/Expected/AcceptanceTests/NoOperations/setup.py @@ -6,31 +6,24 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- # coding: utf-8 - from setuptools import setup, find_packages -NAME = "nooperationsserviceclient" -VERSION = "0.1.0" - -# To install the library, run the following -# -# python setup.py install -# -# prerequisite: setuptools -# http://pypi.python.org/pypi/setuptools - -REQUIRES = ["msrest>=0.6.21", "azure-core<2.0.0,>=1.20.1"] +PACKAGE_NAME = "nooperationsserviceclient" +version = "0.1.0" setup( - name=NAME, - version=VERSION, + name=PACKAGE_NAME, + version=version, description="NoOperationsServiceClient", author_email="", url="", - keywords=["Swagger", "NoOperationsServiceClient"], - install_requires=REQUIRES, + keywords="azure, azure sdk", packages=find_packages(), include_package_data=True, + install_requires=[ + "msrest>=0.6.21", + "azure-core<2.0.0,>=1.20.1", + ], long_description="""\ Service client with no operations. """, diff --git a/test/vanilla/legacy/Expected/AcceptanceTests/NonStringEnums/setup.py b/test/vanilla/legacy/Expected/AcceptanceTests/NonStringEnums/setup.py index 67f8f2e27c2..70074f28998 100644 --- a/test/vanilla/legacy/Expected/AcceptanceTests/NonStringEnums/setup.py +++ b/test/vanilla/legacy/Expected/AcceptanceTests/NonStringEnums/setup.py @@ -6,31 +6,24 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- # coding: utf-8 - from setuptools import setup, find_packages -NAME = "nonstringenumsclient" -VERSION = "0.1.0" - -# To install the library, run the following -# -# python setup.py install -# -# prerequisite: setuptools -# http://pypi.python.org/pypi/setuptools - -REQUIRES = ["msrest>=0.6.21", "azure-core<2.0.0,>=1.20.1"] +PACKAGE_NAME = "nonstringenumsclient" +version = "0.1.0" setup( - name=NAME, - version=VERSION, + name=PACKAGE_NAME, + version=version, description="NonStringEnumsClient", author_email="", url="", - keywords=["Swagger", "NonStringEnumsClient"], - install_requires=REQUIRES, + keywords="azure, azure sdk", packages=find_packages(), include_package_data=True, + install_requires=[ + "msrest>=0.6.21", + "azure-core<2.0.0,>=1.20.1", + ], long_description="""\ Testing non-string enums. """, diff --git a/test/vanilla/legacy/Expected/AcceptanceTests/ObjectType/setup.py b/test/vanilla/legacy/Expected/AcceptanceTests/ObjectType/setup.py index fae955ee4ad..117f87cfb34 100644 --- a/test/vanilla/legacy/Expected/AcceptanceTests/ObjectType/setup.py +++ b/test/vanilla/legacy/Expected/AcceptanceTests/ObjectType/setup.py @@ -6,31 +6,24 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- # coding: utf-8 - from setuptools import setup, find_packages -NAME = "objecttypeclient" -VERSION = "0.1.0" - -# To install the library, run the following -# -# python setup.py install -# -# prerequisite: setuptools -# http://pypi.python.org/pypi/setuptools - -REQUIRES = ["msrest>=0.6.21", "azure-core<2.0.0,>=1.20.1"] +PACKAGE_NAME = "objecttypeclient" +version = "0.1.0" setup( - name=NAME, - version=VERSION, + name=PACKAGE_NAME, + version=version, description="ObjectTypeClient", author_email="", url="", - keywords=["Swagger", "ObjectTypeClient"], - install_requires=REQUIRES, + keywords="azure, azure sdk", packages=find_packages(), include_package_data=True, + install_requires=[ + "msrest>=0.6.21", + "azure-core<2.0.0,>=1.20.1", + ], long_description="""\ Service client for testing basic type: object swaggers. """, diff --git a/test/vanilla/legacy/Expected/AcceptanceTests/PackageModeDataPlane/CHANGELOG.md b/test/vanilla/legacy/Expected/AcceptanceTests/PackageModeDataPlane/CHANGELOG.md new file mode 100644 index 00000000000..628743d283a --- /dev/null +++ b/test/vanilla/legacy/Expected/AcceptanceTests/PackageModeDataPlane/CHANGELOG.md @@ -0,0 +1,5 @@ +# Release History + +## 1.0.0b1 (1970-01-01) + +- Initial version diff --git a/test/vanilla/legacy/Expected/AcceptanceTests/PackageModeDataPlane/LICENSE b/test/vanilla/legacy/Expected/AcceptanceTests/PackageModeDataPlane/LICENSE new file mode 100644 index 00000000000..63447fd8bbb --- /dev/null +++ b/test/vanilla/legacy/Expected/AcceptanceTests/PackageModeDataPlane/LICENSE @@ -0,0 +1,21 @@ +Copyright (c) Microsoft Corporation. + +MIT License + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED *AS IS*, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. \ No newline at end of file diff --git a/test/vanilla/legacy/Expected/AcceptanceTests/PackageModeDataPlane/MANIFEST.in b/test/vanilla/legacy/Expected/AcceptanceTests/PackageModeDataPlane/MANIFEST.in new file mode 100644 index 00000000000..5a06a9376fc --- /dev/null +++ b/test/vanilla/legacy/Expected/AcceptanceTests/PackageModeDataPlane/MANIFEST.in @@ -0,0 +1,4 @@ +include *.md +include LICENSE +recursive-include tests *.py +recursive-include samples *.py *.md \ No newline at end of file diff --git a/test/vanilla/legacy/Expected/AcceptanceTests/PackageModeDataPlane/README.md b/test/vanilla/legacy/Expected/AcceptanceTests/PackageModeDataPlane/README.md new file mode 100644 index 00000000000..004d26e8797 --- /dev/null +++ b/test/vanilla/legacy/Expected/AcceptanceTests/PackageModeDataPlane/README.md @@ -0,0 +1,43 @@ + +# Azure Package Mode client library for Python + + +## Getting started + +### Installating the package + +```bash +python -m pip install packagemode +``` + +#### Prequisites + +- Python 3.6 or later is required to use this package. +- You need an [Azure subscription][azure_sub] to use this package. +- An existing Azure Package Mode instance. + +## Contributing + +This project welcomes contributions and suggestions. Most contributions require +you to agree to a Contributor License Agreement (CLA) declaring that you have +the right to, and actually do, grant us the rights to use your contribution. +For details, visit https://cla.microsoft.com. + +When you submit a pull request, a CLA-bot will automatically determine whether +you need to provide a CLA and decorate the PR appropriately (e.g., label, +comment). Simply follow the instructions provided by the bot. You will only +need to do this once across all repos using our CLA. + +This project has adopted the +[Microsoft Open Source Code of Conduct][code_of_conduct]. For more information, +see the Code of Conduct FAQ or contact opencode@microsoft.com with any +additional questions or comments. + + +[code_of_conduct]: https://opensource.microsoft.com/codeofconduct/ +[authenticate_with_token]: https://docs.microsoft.com/azure/cognitive-services/authentication?tabs=powershell#authenticate-with-an-authentication-token +[azure_identity_credentials]: https://github.com/Azure/azure-sdk-for-python/tree/main/sdk/identity/azure-identity#credentials +[azure_identity_pip]: https://pypi.org/project/azure-identity/ +[default_azure_credential]: https://github.com/Azure/azure-sdk-for-python/tree/main/sdk/identity/azure-identity#defaultazurecredential +[pip]: https://pypi.org/project/pip/ +[azure_sub]: https://azure.microsoft.com/free/ diff --git a/test/vanilla/legacy/Expected/AcceptanceTests/PackageModeDataPlane/dev_requirements.txt b/test/vanilla/legacy/Expected/AcceptanceTests/PackageModeDataPlane/dev_requirements.txt new file mode 100644 index 00000000000..ff12ab35dd0 --- /dev/null +++ b/test/vanilla/legacy/Expected/AcceptanceTests/PackageModeDataPlane/dev_requirements.txt @@ -0,0 +1,4 @@ +-e ../../../tools/azure-devtools +-e ../../../tools/azure-sdk-tools +../../core/azure-core +aiohttp \ No newline at end of file diff --git a/test/vanilla/legacy/Expected/AcceptanceTests/PackageModeDataPlane/packagemode/__init__.py b/test/vanilla/legacy/Expected/AcceptanceTests/PackageModeDataPlane/packagemode/__init__.py new file mode 100644 index 00000000000..7e1dae047a1 --- /dev/null +++ b/test/vanilla/legacy/Expected/AcceptanceTests/PackageModeDataPlane/packagemode/__init__.py @@ -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 ._anything_client import AnythingClient +from ._version import VERSION + +__version__ = VERSION +__all__ = ["AnythingClient"] + +# `._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() diff --git a/test/vanilla/legacy/Expected/AcceptanceTests/PackageModeDataPlane/packagemode/_anything_client.py b/test/vanilla/legacy/Expected/AcceptanceTests/PackageModeDataPlane/packagemode/_anything_client.py new file mode 100644 index 00000000000..02fe39db554 --- /dev/null +++ b/test/vanilla/legacy/Expected/AcceptanceTests/PackageModeDataPlane/packagemode/_anything_client.py @@ -0,0 +1,86 @@ +# 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 copy import deepcopy +from typing import TYPE_CHECKING + +from msrest import Deserializer, Serializer + +from azure.core import PipelineClient + +from ._configuration import AnythingClientConfiguration +from .operations import AnythingClientOperationsMixin + +if TYPE_CHECKING: + # pylint: disable=unused-import,ungrouped-imports + from typing import Any, Dict + + from azure.core.rest import HttpRequest, HttpResponse + + +class AnythingClient(AnythingClientOperationsMixin): + """Service client for testing basic anything types. Those schemas without types can be anything: + primitive, object, array. + + :param base_url: Service URL. Default value is "http://localhost:3000". + :type base_url: str + """ + + def __init__( + self, + base_url="http://localhost:3000", # type: str + **kwargs # type: Any + ): + # type: (...) -> None + self._config = AnythingClientConfiguration(**kwargs) + self._client = PipelineClient(base_url=base_url, config=self._config, **kwargs) + + client_models = {} # type: Dict[str, Any] + self._serialize = Serializer(client_models) + self._deserialize = Deserializer(client_models) + self._serialize.client_side_validation = False + + def _send_request( + self, + request, # type: HttpRequest + **kwargs # type: Any + ): + # type: (...) -> HttpResponse + """Runs the network request through the client's chained policies. + + >>> from azure.core.rest import HttpRequest + >>> request = HttpRequest("GET", "https://www.example.org/") + + >>> response = client._send_request(request) + + + For more information on this code flow, see https://aka.ms/azsdk/python/protocol/quickstart + + :param request: The network request you want to make. Required. + :type request: ~azure.core.rest.HttpRequest + :keyword bool stream: Whether the response payload will be streamed. Defaults to False. + :return: The response of your network call. Does not do error handling on your response. + :rtype: ~azure.core.rest.HttpResponse + """ + + request_copy = deepcopy(request) + request_copy.url = self._client.format_url(request_copy.url) + return self._client.send_request(request_copy, **kwargs) + + def close(self): + # type: () -> None + self._client.close() + + def __enter__(self): + # type: () -> AnythingClient + self._client.__enter__() + return self + + def __exit__(self, *exc_details): + # type: (Any) -> None + self._client.__exit__(*exc_details) diff --git a/test/vanilla/legacy/Expected/AcceptanceTests/PackageModeDataPlane/packagemode/_configuration.py b/test/vanilla/legacy/Expected/AcceptanceTests/PackageModeDataPlane/packagemode/_configuration.py new file mode 100644 index 00000000000..bc617d7bb81 --- /dev/null +++ b/test/vanilla/legacy/Expected/AcceptanceTests/PackageModeDataPlane/packagemode/_configuration.py @@ -0,0 +1,49 @@ +# 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 + + +class AnythingClientConfiguration(Configuration): # pylint: disable=too-many-instance-attributes + """Configuration for AnythingClient. + + Note that all parameters used to create this instance are saved as instance + attributes. + """ + + def __init__( + self, **kwargs # type: Any + ): + # type: (...) -> None + super(AnythingClientConfiguration, self).__init__(**kwargs) + + kwargs.setdefault("sdk_moniker", "packagemode/{}".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.http_logging_policy = kwargs.get("http_logging_policy") or policies.HttpLoggingPolicy(**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") diff --git a/test/vanilla/legacy/Expected/AcceptanceTests/PackageModeDataPlane/packagemode/_patch.py b/test/vanilla/legacy/Expected/AcceptanceTests/PackageModeDataPlane/packagemode/_patch.py new file mode 100644 index 00000000000..f99e77fef98 --- /dev/null +++ b/test/vanilla/legacy/Expected/AcceptanceTests/PackageModeDataPlane/packagemode/_patch.py @@ -0,0 +1,31 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# +# Copyright (c) Microsoft Corporation. All rights reserved. +# +# The MIT License (MIT) +# +# Permission is hereby granted, free of charge, to any person obtaining a copy +# of this software and associated documentation files (the ""Software""), to +# deal in the Software without restriction, including without limitation the +# rights to use, copy, modify, merge, publish, distribute, sublicense, and/or +# sell copies of the Software, and to permit persons to whom the Software is +# furnished to do so, subject to the following conditions: +# +# The above copyright notice and this permission notice shall be included in +# all copies or substantial portions of the Software. +# +# THE SOFTWARE IS PROVIDED *AS IS*, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS +# IN THE SOFTWARE. +# +# -------------------------------------------------------------------------- + +# This file 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 +def patch_sdk(): + pass diff --git a/test/vanilla/legacy/Expected/AcceptanceTests/PackageModeDataPlane/packagemode/_vendor.py b/test/vanilla/legacy/Expected/AcceptanceTests/PackageModeDataPlane/packagemode/_vendor.py new file mode 100644 index 00000000000..0dafe0e287f --- /dev/null +++ b/test/vanilla/legacy/Expected/AcceptanceTests/PackageModeDataPlane/packagemode/_vendor.py @@ -0,0 +1,16 @@ +# -------------------------------------------------------------------------- +# 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 azure.core.pipeline.transport import HttpRequest + + +def _convert_request(request, files=None): + data = request.content if not files else None + request = HttpRequest(method=request.method, url=request.url, headers=request.headers, data=data) + if files: + request.set_formdata_body(files) + return request diff --git a/test/vanilla/legacy/Expected/AcceptanceTests/PackageModeDataPlane/packagemode/_version.py b/test/vanilla/legacy/Expected/AcceptanceTests/PackageModeDataPlane/packagemode/_version.py new file mode 100644 index 00000000000..e5754a47ce6 --- /dev/null +++ b/test/vanilla/legacy/Expected/AcceptanceTests/PackageModeDataPlane/packagemode/_version.py @@ -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 = "1.0.0b1" diff --git a/test/vanilla/legacy/Expected/AcceptanceTests/PackageModeDataPlane/packagemode/aio/__init__.py b/test/vanilla/legacy/Expected/AcceptanceTests/PackageModeDataPlane/packagemode/aio/__init__.py new file mode 100644 index 00000000000..fbe1d346305 --- /dev/null +++ b/test/vanilla/legacy/Expected/AcceptanceTests/PackageModeDataPlane/packagemode/aio/__init__.py @@ -0,0 +1,17 @@ +# 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 ._anything_client import AnythingClient + +__all__ = ["AnythingClient"] + +# `._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() diff --git a/test/vanilla/legacy/Expected/AcceptanceTests/PackageModeDataPlane/packagemode/aio/_anything_client.py b/test/vanilla/legacy/Expected/AcceptanceTests/PackageModeDataPlane/packagemode/aio/_anything_client.py new file mode 100644 index 00000000000..ed8b0d2b824 --- /dev/null +++ b/test/vanilla/legacy/Expected/AcceptanceTests/PackageModeDataPlane/packagemode/aio/_anything_client.py @@ -0,0 +1,72 @@ +# 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 copy import deepcopy +from typing import Any, Awaitable, TYPE_CHECKING + +from msrest import Deserializer, Serializer + +from azure.core import AsyncPipelineClient +from azure.core.rest import AsyncHttpResponse, HttpRequest + +from ._configuration import AnythingClientConfiguration +from .operations import AnythingClientOperationsMixin + +if TYPE_CHECKING: + # pylint: disable=unused-import,ungrouped-imports + from typing import Dict + + +class AnythingClient(AnythingClientOperationsMixin): + """Service client for testing basic anything types. Those schemas without types can be anything: + primitive, object, array. + + :param base_url: Service URL. Default value is "http://localhost:3000". + :type base_url: str + """ + + def __init__(self, base_url: str = "http://localhost:3000", **kwargs: Any) -> None: + self._config = AnythingClientConfiguration(**kwargs) + self._client = AsyncPipelineClient(base_url=base_url, config=self._config, **kwargs) + + client_models = {} # type: Dict[str, Any] + self._serialize = Serializer(client_models) + self._deserialize = Deserializer(client_models) + self._serialize.client_side_validation = False + + def _send_request(self, request: HttpRequest, **kwargs: Any) -> Awaitable[AsyncHttpResponse]: + """Runs the network request through the client's chained policies. + + >>> from azure.core.rest import HttpRequest + >>> request = HttpRequest("GET", "https://www.example.org/") + + >>> response = await client._send_request(request) + + + For more information on this code flow, see https://aka.ms/azsdk/python/protocol/quickstart + + :param request: The network request you want to make. Required. + :type request: ~azure.core.rest.HttpRequest + :keyword bool stream: Whether the response payload will be streamed. Defaults to False. + :return: The response of your network call. Does not do error handling on your response. + :rtype: ~azure.core.rest.AsyncHttpResponse + """ + + request_copy = deepcopy(request) + request_copy.url = self._client.format_url(request_copy.url) + return self._client.send_request(request_copy, **kwargs) + + async def close(self) -> None: + await self._client.close() + + async def __aenter__(self) -> "AnythingClient": + await self._client.__aenter__() + return self + + async def __aexit__(self, *exc_details) -> None: + await self._client.__aexit__(*exc_details) diff --git a/test/vanilla/legacy/Expected/AcceptanceTests/PackageModeDataPlane/packagemode/aio/_configuration.py b/test/vanilla/legacy/Expected/AcceptanceTests/PackageModeDataPlane/packagemode/aio/_configuration.py new file mode 100644 index 00000000000..e6cba365dca --- /dev/null +++ b/test/vanilla/legacy/Expected/AcceptanceTests/PackageModeDataPlane/packagemode/aio/_configuration.py @@ -0,0 +1,39 @@ +# 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 Any + +from azure.core.configuration import Configuration +from azure.core.pipeline import policies + +from .._version import VERSION + + +class AnythingClientConfiguration(Configuration): # pylint: disable=too-many-instance-attributes + """Configuration for AnythingClient. + + Note that all parameters used to create this instance are saved as instance + attributes. + """ + + def __init__(self, **kwargs: Any) -> None: + super(AnythingClientConfiguration, self).__init__(**kwargs) + + kwargs.setdefault("sdk_moniker", "packagemode/{}".format(VERSION)) + 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 policies.HttpLoggingPolicy(**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") diff --git a/test/vanilla/legacy/Expected/AcceptanceTests/PackageModeDataPlane/packagemode/aio/_patch.py b/test/vanilla/legacy/Expected/AcceptanceTests/PackageModeDataPlane/packagemode/aio/_patch.py new file mode 100644 index 00000000000..f99e77fef98 --- /dev/null +++ b/test/vanilla/legacy/Expected/AcceptanceTests/PackageModeDataPlane/packagemode/aio/_patch.py @@ -0,0 +1,31 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# +# Copyright (c) Microsoft Corporation. All rights reserved. +# +# The MIT License (MIT) +# +# Permission is hereby granted, free of charge, to any person obtaining a copy +# of this software and associated documentation files (the ""Software""), to +# deal in the Software without restriction, including without limitation the +# rights to use, copy, modify, merge, publish, distribute, sublicense, and/or +# sell copies of the Software, and to permit persons to whom the Software is +# furnished to do so, subject to the following conditions: +# +# The above copyright notice and this permission notice shall be included in +# all copies or substantial portions of the Software. +# +# THE SOFTWARE IS PROVIDED *AS IS*, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS +# IN THE SOFTWARE. +# +# -------------------------------------------------------------------------- + +# This file 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 +def patch_sdk(): + pass diff --git a/test/vanilla/legacy/Expected/AcceptanceTests/PackageModeDataPlane/packagemode/aio/operations/__init__.py b/test/vanilla/legacy/Expected/AcceptanceTests/PackageModeDataPlane/packagemode/aio/operations/__init__.py new file mode 100644 index 00000000000..f8a033838cd --- /dev/null +++ b/test/vanilla/legacy/Expected/AcceptanceTests/PackageModeDataPlane/packagemode/aio/operations/__init__.py @@ -0,0 +1,13 @@ +# 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 ._anything_client_operations import AnythingClientOperationsMixin + +__all__ = [ + "AnythingClientOperationsMixin", +] diff --git a/test/vanilla/legacy/Expected/AcceptanceTests/PackageModeDataPlane/packagemode/aio/operations/_anything_client_operations.py b/test/vanilla/legacy/Expected/AcceptanceTests/PackageModeDataPlane/packagemode/aio/operations/_anything_client_operations.py new file mode 100644 index 00000000000..1384a87f968 --- /dev/null +++ b/test/vanilla/legacy/Expected/AcceptanceTests/PackageModeDataPlane/packagemode/aio/operations/_anything_client_operations.py @@ -0,0 +1,274 @@ +# pylint: disable=too-many-lines +# 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 Any, Callable, Dict, Optional, TypeVar + +from azure.core.exceptions import ( + ClientAuthenticationError, + HttpResponseError, + ResourceExistsError, + ResourceNotFoundError, + map_error, +) +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import AsyncHttpResponse +from azure.core.rest import HttpRequest +from azure.core.tracing.decorator_async import distributed_trace_async + +from ..._vendor import _convert_request +from ...operations._anything_client_operations import ( + build_get_array_request, + build_get_object_request, + build_get_string_request, + build_put_array_request, + build_put_object_request, + build_put_string_request, +) + +T = TypeVar("T") +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] + + +class AnythingClientOperationsMixin: + @distributed_trace_async + async def get_object(self, **kwargs: Any) -> Any: + """Basic get that returns an object as anything. Returns object { 'message': 'An object was + successfully returned' }. + + :keyword callable cls: A custom type or function that will be passed the direct response + :return: any, or the result of cls(response) + :rtype: any + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop("cls", None) # type: ClsType[Any] + error_map = {401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop("error_map", {})) + + request = build_get_object_request( + template_url=self.get_object.metadata["url"], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, stream=False, **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response) + + deserialized = self._deserialize("object", pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + get_object.metadata = {"url": "/anything/object"} # type: ignore + + @distributed_trace_async + async def put_object(self, input: Any, **kwargs: Any) -> None: # pylint: disable=inconsistent-return-statements + """Basic put that puts an object as anything. Pass in {'foo': 'bar'} to get a 200 and anything + else to get an object error. + + :param input: Pass in {'foo': 'bar'} for a 200, anything else for an object error. + :type input: any + :keyword callable cls: A custom type or function that will be passed the direct response + :return: None, or the result of cls(response) + :rtype: None + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop("cls", None) # type: ClsType[None] + error_map = {401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop("error_map", {})) + + content_type = kwargs.pop("content_type", "application/json") # type: Optional[str] + + _json = self._serialize.body(input, "object") + + request = build_put_object_request( + content_type=content_type, + json=_json, + template_url=self.put_object.metadata["url"], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, stream=False, **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response) + + if cls: + return cls(pipeline_response, None, {}) + + put_object.metadata = {"url": "/anything/object"} # type: ignore + + @distributed_trace_async + async def get_string(self, **kwargs: Any) -> Any: + """Basic get that returns an string as anything. Returns string 'foo'. + + :keyword callable cls: A custom type or function that will be passed the direct response + :return: any, or the result of cls(response) + :rtype: any + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop("cls", None) # type: ClsType[Any] + error_map = {401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop("error_map", {})) + + request = build_get_string_request( + template_url=self.get_string.metadata["url"], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, stream=False, **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response) + + deserialized = self._deserialize("object", pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + get_string.metadata = {"url": "/anything/string"} # type: ignore + + @distributed_trace_async + async def put_string(self, input: Any, **kwargs: Any) -> None: # pylint: disable=inconsistent-return-statements + """Basic put that puts an string as anything. Pass in 'anything' to get a 200 and anything else to + get an object error. + + :param input: Pass in 'anything' for a 200, anything else for an object error. + :type input: any + :keyword callable cls: A custom type or function that will be passed the direct response + :return: None, or the result of cls(response) + :rtype: None + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop("cls", None) # type: ClsType[None] + error_map = {401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop("error_map", {})) + + content_type = kwargs.pop("content_type", "application/json") # type: Optional[str] + + _json = self._serialize.body(input, "object") + + request = build_put_string_request( + content_type=content_type, + json=_json, + template_url=self.put_string.metadata["url"], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, stream=False, **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response) + + if cls: + return cls(pipeline_response, None, {}) + + put_string.metadata = {"url": "/anything/string"} # type: ignore + + @distributed_trace_async + async def get_array(self, **kwargs: Any) -> Any: + """Basic get that returns an array as anything. Returns string ['foo', 'bar']. + + :keyword callable cls: A custom type or function that will be passed the direct response + :return: any, or the result of cls(response) + :rtype: any + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop("cls", None) # type: ClsType[Any] + error_map = {401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop("error_map", {})) + + request = build_get_array_request( + template_url=self.get_array.metadata["url"], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, stream=False, **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response) + + deserialized = self._deserialize("object", pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + get_array.metadata = {"url": "/anything/array"} # type: ignore + + @distributed_trace_async + async def put_array(self, input: Any, **kwargs: Any) -> None: # pylint: disable=inconsistent-return-statements + """Basic put that puts an array as anything. Pass in ['foo', 'bar'] to get a 200 and anything else + to get an object error. + + :param input: Pass in ['foo', 'bar'] for a 200, anything else for an object error. + :type input: any + :keyword callable cls: A custom type or function that will be passed the direct response + :return: None, or the result of cls(response) + :rtype: None + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop("cls", None) # type: ClsType[None] + error_map = {401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop("error_map", {})) + + content_type = kwargs.pop("content_type", "application/json") # type: Optional[str] + + _json = self._serialize.body(input, "object") + + request = build_put_array_request( + content_type=content_type, + json=_json, + template_url=self.put_array.metadata["url"], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, stream=False, **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response) + + if cls: + return cls(pipeline_response, None, {}) + + put_array.metadata = {"url": "/anything/array"} # type: ignore diff --git a/test/vanilla/legacy/Expected/AcceptanceTests/PackageModeDataPlane/packagemode/operations/__init__.py b/test/vanilla/legacy/Expected/AcceptanceTests/PackageModeDataPlane/packagemode/operations/__init__.py new file mode 100644 index 00000000000..f8a033838cd --- /dev/null +++ b/test/vanilla/legacy/Expected/AcceptanceTests/PackageModeDataPlane/packagemode/operations/__init__.py @@ -0,0 +1,13 @@ +# 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 ._anything_client_operations import AnythingClientOperationsMixin + +__all__ = [ + "AnythingClientOperationsMixin", +] diff --git a/test/vanilla/legacy/Expected/AcceptanceTests/PackageModeDataPlane/packagemode/operations/_anything_client_operations.py b/test/vanilla/legacy/Expected/AcceptanceTests/PackageModeDataPlane/packagemode/operations/_anything_client_operations.py new file mode 100644 index 00000000000..99f401490a0 --- /dev/null +++ b/test/vanilla/legacy/Expected/AcceptanceTests/PackageModeDataPlane/packagemode/operations/_anything_client_operations.py @@ -0,0 +1,425 @@ +# pylint: disable=too-many-lines +# 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 msrest import Serializer + +from azure.core.exceptions import ( + ClientAuthenticationError, + HttpResponseError, + ResourceExistsError, + ResourceNotFoundError, + map_error, +) +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import HttpResponse +from azure.core.rest import HttpRequest +from azure.core.tracing.decorator import distributed_trace + +from .._vendor import _convert_request + +if TYPE_CHECKING: + # pylint: disable=unused-import,ungrouped-imports + from typing import Any, Callable, Dict, Optional, TypeVar + + T = TypeVar("T") + ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] + +_SERIALIZER = Serializer() +_SERIALIZER.client_side_validation = False +# fmt: off + +def build_get_object_request( + **kwargs # type: Any +): + # type: (...) -> HttpRequest + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/anything/object") + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="GET", + url=_url, + headers=_header_parameters, + **kwargs + ) + + +def build_put_object_request( + **kwargs # type: Any +): + # type: (...) -> HttpRequest + content_type = kwargs.pop('content_type', None) # type: Optional[str] + + # Construct URL + _url = kwargs.pop("template_url", "/anything/object") + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + if content_type is not None: + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + + return HttpRequest( + method="PUT", + url=_url, + headers=_header_parameters, + **kwargs + ) + + +def build_get_string_request( + **kwargs # type: Any +): + # type: (...) -> HttpRequest + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/anything/string") + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="GET", + url=_url, + headers=_header_parameters, + **kwargs + ) + + +def build_put_string_request( + **kwargs # type: Any +): + # type: (...) -> HttpRequest + content_type = kwargs.pop('content_type', None) # type: Optional[str] + + # Construct URL + _url = kwargs.pop("template_url", "/anything/string") + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + if content_type is not None: + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + + return HttpRequest( + method="PUT", + url=_url, + headers=_header_parameters, + **kwargs + ) + + +def build_get_array_request( + **kwargs # type: Any +): + # type: (...) -> HttpRequest + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/anything/array") + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="GET", + url=_url, + headers=_header_parameters, + **kwargs + ) + + +def build_put_array_request( + **kwargs # type: Any +): + # type: (...) -> HttpRequest + content_type = kwargs.pop('content_type', None) # type: Optional[str] + + # Construct URL + _url = kwargs.pop("template_url", "/anything/array") + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + if content_type is not None: + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + + return HttpRequest( + method="PUT", + url=_url, + headers=_header_parameters, + **kwargs + ) + +# fmt: on +class AnythingClientOperationsMixin(object): + @distributed_trace + def get_object( + self, **kwargs # type: Any + ): + # type: (...) -> Any + """Basic get that returns an object as anything. Returns object { 'message': 'An object was + successfully returned' }. + + :keyword callable cls: A custom type or function that will be passed the direct response + :return: any, or the result of cls(response) + :rtype: any + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop("cls", None) # type: ClsType[Any] + error_map = {401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop("error_map", {})) + + request = build_get_object_request( + template_url=self.get_object.metadata["url"], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, stream=False, **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response) + + deserialized = self._deserialize("object", pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + get_object.metadata = {"url": "/anything/object"} # type: ignore + + @distributed_trace + def put_object( # pylint: disable=inconsistent-return-statements + self, + input, # type: Any + **kwargs # type: Any + ): + # type: (...) -> None + """Basic put that puts an object as anything. Pass in {'foo': 'bar'} to get a 200 and anything + else to get an object error. + + :param input: Pass in {'foo': 'bar'} for a 200, anything else for an object error. + :type input: any + :keyword callable cls: A custom type or function that will be passed the direct response + :return: None, or the result of cls(response) + :rtype: None + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop("cls", None) # type: ClsType[None] + error_map = {401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop("error_map", {})) + + content_type = kwargs.pop("content_type", "application/json") # type: Optional[str] + + _json = self._serialize.body(input, "object") + + request = build_put_object_request( + content_type=content_type, + json=_json, + template_url=self.put_object.metadata["url"], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, stream=False, **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response) + + if cls: + return cls(pipeline_response, None, {}) + + put_object.metadata = {"url": "/anything/object"} # type: ignore + + @distributed_trace + def get_string( + self, **kwargs # type: Any + ): + # type: (...) -> Any + """Basic get that returns an string as anything. Returns string 'foo'. + + :keyword callable cls: A custom type or function that will be passed the direct response + :return: any, or the result of cls(response) + :rtype: any + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop("cls", None) # type: ClsType[Any] + error_map = {401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop("error_map", {})) + + request = build_get_string_request( + template_url=self.get_string.metadata["url"], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, stream=False, **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response) + + deserialized = self._deserialize("object", pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + get_string.metadata = {"url": "/anything/string"} # type: ignore + + @distributed_trace + def put_string( # pylint: disable=inconsistent-return-statements + self, + input, # type: Any + **kwargs # type: Any + ): + # type: (...) -> None + """Basic put that puts an string as anything. Pass in 'anything' to get a 200 and anything else to + get an object error. + + :param input: Pass in 'anything' for a 200, anything else for an object error. + :type input: any + :keyword callable cls: A custom type or function that will be passed the direct response + :return: None, or the result of cls(response) + :rtype: None + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop("cls", None) # type: ClsType[None] + error_map = {401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop("error_map", {})) + + content_type = kwargs.pop("content_type", "application/json") # type: Optional[str] + + _json = self._serialize.body(input, "object") + + request = build_put_string_request( + content_type=content_type, + json=_json, + template_url=self.put_string.metadata["url"], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, stream=False, **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response) + + if cls: + return cls(pipeline_response, None, {}) + + put_string.metadata = {"url": "/anything/string"} # type: ignore + + @distributed_trace + def get_array( + self, **kwargs # type: Any + ): + # type: (...) -> Any + """Basic get that returns an array as anything. Returns string ['foo', 'bar']. + + :keyword callable cls: A custom type or function that will be passed the direct response + :return: any, or the result of cls(response) + :rtype: any + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop("cls", None) # type: ClsType[Any] + error_map = {401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop("error_map", {})) + + request = build_get_array_request( + template_url=self.get_array.metadata["url"], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, stream=False, **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response) + + deserialized = self._deserialize("object", pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + get_array.metadata = {"url": "/anything/array"} # type: ignore + + @distributed_trace + def put_array( # pylint: disable=inconsistent-return-statements + self, + input, # type: Any + **kwargs # type: Any + ): + # type: (...) -> None + """Basic put that puts an array as anything. Pass in ['foo', 'bar'] to get a 200 and anything else + to get an object error. + + :param input: Pass in ['foo', 'bar'] for a 200, anything else for an object error. + :type input: any + :keyword callable cls: A custom type or function that will be passed the direct response + :return: None, or the result of cls(response) + :rtype: None + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop("cls", None) # type: ClsType[None] + error_map = {401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop("error_map", {})) + + content_type = kwargs.pop("content_type", "application/json") # type: Optional[str] + + _json = self._serialize.body(input, "object") + + request = build_put_array_request( + content_type=content_type, + json=_json, + template_url=self.put_array.metadata["url"], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, stream=False, **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response) + + if cls: + return cls(pipeline_response, None, {}) + + put_array.metadata = {"url": "/anything/array"} # type: ignore diff --git a/test/vanilla/legacy/Expected/AcceptanceTests/PackageModeDataPlane/packagemode/py.typed b/test/vanilla/legacy/Expected/AcceptanceTests/PackageModeDataPlane/packagemode/py.typed new file mode 100644 index 00000000000..e5aff4f83af --- /dev/null +++ b/test/vanilla/legacy/Expected/AcceptanceTests/PackageModeDataPlane/packagemode/py.typed @@ -0,0 +1 @@ +# Marker file for PEP 561. \ No newline at end of file diff --git a/test/vanilla/legacy/Expected/AcceptanceTests/PackageModeDataPlane/setup.py b/test/vanilla/legacy/Expected/AcceptanceTests/PackageModeDataPlane/setup.py new file mode 100644 index 00000000000..fb5367838f1 --- /dev/null +++ b/test/vanilla/legacy/Expected/AcceptanceTests/PackageModeDataPlane/setup.py @@ -0,0 +1,64 @@ +# 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. +# -------------------------------------------------------------------------- +# coding: utf-8 + +import os +import re +from setuptools import setup, find_packages + + +PACKAGE_NAME = "packagemode" +PACKAGE_PPRINT_NAME = "Azure Package Mode" + +# a-b-c => a/b/c +package_folder_path = PACKAGE_NAME.replace("-", "/") + +# Version extraction inspired from 'requests' +with open(os.path.join(package_folder_path, "_version.py"), "r") as fd: + version = re.search(r'^VERSION\s*=\s*[\'"]([^\'"]*)[\'"]', fd.read(), re.MULTILINE).group(1) + +if not version: + raise RuntimeError("Cannot find version information") + + +setup( + name=PACKAGE_NAME, + version=version, + description="Microsoft Azure Package Mode Client Library for Python", + long_description=open("README.md", "r").read(), + long_description_content_type="text/markdown", + license="MIT License", + author="Microsoft Corporation", + author_email="azpysdkhelp@microsoft.com", + url="https://github.com/Azure/azure-sdk-for-python/tree/main/sdk", + keywords="azure, azure sdk", + classifiers=[ + "Development Status :: 4 - Beta", + "Programming Language :: Python", + "Programming Language :: Python :: 3 :: Only", + "Programming Language :: Python :: 3", + "Programming Language :: Python :: 3.6", + "Programming Language :: Python :: 3.7", + "Programming Language :: Python :: 3.8", + "Programming Language :: Python :: 3.9", + "Programming Language :: Python :: 3.10", + "License :: OSI Approved :: MIT License", + ], + zip_safe=False, + packages=find_packages( + exclude=[ + "tests", + # Exclude packages that will be covered by PEP420 or nspkg + ] + ), + install_requires=[ + "msrest>=0.6.21", + "azure-core<2.0.0,>=1.20.1", + ], + python_requires=">=3.6", +) diff --git a/test/vanilla/legacy/Expected/AcceptanceTests/ParameterFlattening/setup.py b/test/vanilla/legacy/Expected/AcceptanceTests/ParameterFlattening/setup.py index 5deb8606bc4..0613a67f61c 100644 --- a/test/vanilla/legacy/Expected/AcceptanceTests/ParameterFlattening/setup.py +++ b/test/vanilla/legacy/Expected/AcceptanceTests/ParameterFlattening/setup.py @@ -6,31 +6,24 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- # coding: utf-8 - from setuptools import setup, find_packages -NAME = "autorestparameterflattening" -VERSION = "0.1.0" - -# To install the library, run the following -# -# python setup.py install -# -# prerequisite: setuptools -# http://pypi.python.org/pypi/setuptools - -REQUIRES = ["msrest>=0.6.21", "azure-core<2.0.0,>=1.20.1"] +PACKAGE_NAME = "autorestparameterflattening" +version = "0.1.0" setup( - name=NAME, - version=VERSION, + name=PACKAGE_NAME, + version=version, description="AutoRestParameterFlattening", author_email="", url="", - keywords=["Swagger", "AutoRestParameterFlattening"], - install_requires=REQUIRES, + keywords="azure, azure sdk", packages=find_packages(), include_package_data=True, + install_requires=[ + "msrest>=0.6.21", + "azure-core<2.0.0,>=1.20.1", + ], long_description="""\ Resource Flattening for AutoRest. """, diff --git a/test/vanilla/legacy/Expected/AcceptanceTests/ParameterizedEndpoint/setup.py b/test/vanilla/legacy/Expected/AcceptanceTests/ParameterizedEndpoint/setup.py index b4cd6534537..e2721f41200 100644 --- a/test/vanilla/legacy/Expected/AcceptanceTests/ParameterizedEndpoint/setup.py +++ b/test/vanilla/legacy/Expected/AcceptanceTests/ParameterizedEndpoint/setup.py @@ -6,31 +6,24 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- # coding: utf-8 - from setuptools import setup, find_packages -NAME = "parmaterizedendpointclient" -VERSION = "0.1.0" - -# To install the library, run the following -# -# python setup.py install -# -# prerequisite: setuptools -# http://pypi.python.org/pypi/setuptools - -REQUIRES = ["msrest>=0.6.21", "azure-core<2.0.0,>=1.20.1"] +PACKAGE_NAME = "parmaterizedendpointclient" +version = "0.1.0" setup( - name=NAME, - version=VERSION, + name=PACKAGE_NAME, + version=version, description="ParmaterizedEndpointClient", author_email="", url="", - keywords=["Swagger", "ParmaterizedEndpointClient"], - install_requires=REQUIRES, + keywords="azure, azure sdk", packages=find_packages(), include_package_data=True, + install_requires=[ + "msrest>=0.6.21", + "azure-core<2.0.0,>=1.20.1", + ], long_description="""\ Service client for testing parameterized hosts with the name 'endpoint'. """, diff --git a/test/vanilla/legacy/Expected/AcceptanceTests/Report/setup.py b/test/vanilla/legacy/Expected/AcceptanceTests/Report/setup.py index 2f4459980ef..7f4cac78c72 100644 --- a/test/vanilla/legacy/Expected/AcceptanceTests/Report/setup.py +++ b/test/vanilla/legacy/Expected/AcceptanceTests/Report/setup.py @@ -6,31 +6,24 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- # coding: utf-8 - from setuptools import setup, find_packages -NAME = "autorestreportservice" -VERSION = "0.1.0" - -# To install the library, run the following -# -# python setup.py install -# -# prerequisite: setuptools -# http://pypi.python.org/pypi/setuptools - -REQUIRES = ["msrest>=0.6.21", "azure-core<2.0.0,>=1.20.1"] +PACKAGE_NAME = "autorestreportservice" +version = "0.1.0" setup( - name=NAME, - version=VERSION, + name=PACKAGE_NAME, + version=version, description="AutoRestReportService", author_email="", url="", - keywords=["Swagger", "AutoRestReportService"], - install_requires=REQUIRES, + keywords="azure, azure sdk", packages=find_packages(), include_package_data=True, + install_requires=[ + "msrest>=0.6.21", + "azure-core<2.0.0,>=1.20.1", + ], long_description="""\ Test Infrastructure for AutoRest. """, diff --git a/test/vanilla/legacy/Expected/AcceptanceTests/RequiredOptional/setup.py b/test/vanilla/legacy/Expected/AcceptanceTests/RequiredOptional/setup.py index b6d2db16006..d52335449db 100644 --- a/test/vanilla/legacy/Expected/AcceptanceTests/RequiredOptional/setup.py +++ b/test/vanilla/legacy/Expected/AcceptanceTests/RequiredOptional/setup.py @@ -6,31 +6,24 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- # coding: utf-8 - from setuptools import setup, find_packages -NAME = "autorestrequiredoptionaltestservice" -VERSION = "0.1.0" - -# To install the library, run the following -# -# python setup.py install -# -# prerequisite: setuptools -# http://pypi.python.org/pypi/setuptools - -REQUIRES = ["msrest>=0.6.21", "azure-core<2.0.0,>=1.20.1"] +PACKAGE_NAME = "autorestrequiredoptionaltestservice" +version = "0.1.0" setup( - name=NAME, - version=VERSION, + name=PACKAGE_NAME, + version=version, description="AutoRestRequiredOptionalTestService", author_email="", url="", - keywords=["Swagger", "AutoRestRequiredOptionalTestService"], - install_requires=REQUIRES, + keywords="azure, azure sdk", packages=find_packages(), include_package_data=True, + install_requires=[ + "msrest>=0.6.21", + "azure-core<2.0.0,>=1.20.1", + ], long_description="""\ Test Infrastructure for AutoRest. """, diff --git a/test/vanilla/legacy/Expected/AcceptanceTests/ReservedWords/setup.py b/test/vanilla/legacy/Expected/AcceptanceTests/ReservedWords/setup.py index 938b1069b30..d0c5fc4d616 100644 --- a/test/vanilla/legacy/Expected/AcceptanceTests/ReservedWords/setup.py +++ b/test/vanilla/legacy/Expected/AcceptanceTests/ReservedWords/setup.py @@ -6,31 +6,24 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- # coding: utf-8 - from setuptools import setup, find_packages -NAME = "reservedwordsclient" -VERSION = "0.1.0" - -# To install the library, run the following -# -# python setup.py install -# -# prerequisite: setuptools -# http://pypi.python.org/pypi/setuptools - -REQUIRES = ["msrest>=0.6.21", "azure-core<2.0.0,>=1.20.1"] +PACKAGE_NAME = "reservedwordsclient" +version = "0.1.0" setup( - name=NAME, - version=VERSION, + name=PACKAGE_NAME, + version=version, description="ReservedWordsClient", author_email="", url="", - keywords=["Swagger", "ReservedWordsClient"], - install_requires=REQUIRES, + keywords="azure, azure sdk", packages=find_packages(), include_package_data=True, + install_requires=[ + "msrest>=0.6.21", + "azure-core<2.0.0,>=1.20.1", + ], long_description="""\ Swagger that has operation groups etc. with reserved words. """, diff --git a/test/vanilla/legacy/Expected/AcceptanceTests/Url/setup.py b/test/vanilla/legacy/Expected/AcceptanceTests/Url/setup.py index 3eeeb1be90b..17c1895f399 100644 --- a/test/vanilla/legacy/Expected/AcceptanceTests/Url/setup.py +++ b/test/vanilla/legacy/Expected/AcceptanceTests/Url/setup.py @@ -6,31 +6,24 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- # coding: utf-8 - from setuptools import setup, find_packages -NAME = "autoresturltestservice" -VERSION = "0.1.0" - -# To install the library, run the following -# -# python setup.py install -# -# prerequisite: setuptools -# http://pypi.python.org/pypi/setuptools - -REQUIRES = ["msrest>=0.6.21", "azure-core<2.0.0,>=1.20.1"] +PACKAGE_NAME = "autoresturltestservice" +version = "0.1.0" setup( - name=NAME, - version=VERSION, + name=PACKAGE_NAME, + version=version, description="AutoRestUrlTestService", author_email="", url="", - keywords=["Swagger", "AutoRestUrlTestService"], - install_requires=REQUIRES, + keywords="azure, azure sdk", packages=find_packages(), include_package_data=True, + install_requires=[ + "msrest>=0.6.21", + "azure-core<2.0.0,>=1.20.1", + ], long_description="""\ Test Infrastructure for AutoRest. """, diff --git a/test/vanilla/legacy/Expected/AcceptanceTests/UrlMultiCollectionFormat/setup.py b/test/vanilla/legacy/Expected/AcceptanceTests/UrlMultiCollectionFormat/setup.py index 8c5a64d2402..9c792e881c7 100644 --- a/test/vanilla/legacy/Expected/AcceptanceTests/UrlMultiCollectionFormat/setup.py +++ b/test/vanilla/legacy/Expected/AcceptanceTests/UrlMultiCollectionFormat/setup.py @@ -6,31 +6,24 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- # coding: utf-8 - from setuptools import setup, find_packages -NAME = "autoresturlmutlicollectionformattestservice" -VERSION = "0.1.0" - -# To install the library, run the following -# -# python setup.py install -# -# prerequisite: setuptools -# http://pypi.python.org/pypi/setuptools - -REQUIRES = ["msrest>=0.6.21", "azure-core<2.0.0,>=1.20.1"] +PACKAGE_NAME = "autoresturlmutlicollectionformattestservice" +version = "0.1.0" setup( - name=NAME, - version=VERSION, + name=PACKAGE_NAME, + version=version, description="AutoRestUrlMutliCollectionFormatTestService", author_email="", url="", - keywords=["Swagger", "AutoRestUrlMutliCollectionFormatTestService"], - install_requires=REQUIRES, + keywords="azure, azure sdk", packages=find_packages(), include_package_data=True, + install_requires=[ + "msrest>=0.6.21", + "azure-core<2.0.0,>=1.20.1", + ], long_description="""\ Test Infrastructure for AutoRest. """, diff --git a/test/vanilla/legacy/Expected/AcceptanceTests/Validation/setup.py b/test/vanilla/legacy/Expected/AcceptanceTests/Validation/setup.py index 1ec830f56e0..2801e49bc6c 100644 --- a/test/vanilla/legacy/Expected/AcceptanceTests/Validation/setup.py +++ b/test/vanilla/legacy/Expected/AcceptanceTests/Validation/setup.py @@ -6,31 +6,24 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- # coding: utf-8 - from setuptools import setup, find_packages -NAME = "autorestvalidationtest" -VERSION = "0.1.0" - -# To install the library, run the following -# -# python setup.py install -# -# prerequisite: setuptools -# http://pypi.python.org/pypi/setuptools - -REQUIRES = ["msrest>=0.6.21", "azure-core<2.0.0,>=1.20.1"] +PACKAGE_NAME = "autorestvalidationtest" +version = "0.1.0" setup( - name=NAME, - version=VERSION, + name=PACKAGE_NAME, + version=version, description="AutoRestValidationTest", author_email="", url="", - keywords=["Swagger", "AutoRestValidationTest"], - install_requires=REQUIRES, + keywords="azure, azure sdk", packages=find_packages(), include_package_data=True, + install_requires=[ + "msrest>=0.6.21", + "azure-core<2.0.0,>=1.20.1", + ], long_description="""\ Test Infrastructure for AutoRest. No server backend exists for these tests. """, diff --git a/test/vanilla/legacy/Expected/AcceptanceTests/Xml/setup.py b/test/vanilla/legacy/Expected/AcceptanceTests/Xml/setup.py index 08f2e587366..7238c01d719 100644 --- a/test/vanilla/legacy/Expected/AcceptanceTests/Xml/setup.py +++ b/test/vanilla/legacy/Expected/AcceptanceTests/Xml/setup.py @@ -6,31 +6,24 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- # coding: utf-8 - from setuptools import setup, find_packages -NAME = "autorestswaggerbatxmlservice" -VERSION = "0.1.0" - -# To install the library, run the following -# -# python setup.py install -# -# prerequisite: setuptools -# http://pypi.python.org/pypi/setuptools - -REQUIRES = ["msrest>=0.6.21", "azure-core<2.0.0,>=1.20.1"] +PACKAGE_NAME = "autorestswaggerbatxmlservice" +version = "0.1.0" setup( - name=NAME, - version=VERSION, + name=PACKAGE_NAME, + version=version, description="AutoRestSwaggerBATXMLService", author_email="", url="", - keywords=["Swagger", "AutoRestSwaggerBATXMLService"], - install_requires=REQUIRES, + keywords="azure, azure sdk", packages=find_packages(), include_package_data=True, + install_requires=[ + "msrest>=0.6.21", + "azure-core<2.0.0,>=1.20.1", + ], long_description="""\ Test Infrastructure for AutoRest Swagger BAT. """, diff --git a/test/vanilla/legacy/Expected/AcceptanceTests/XmsErrorResponse/setup.py b/test/vanilla/legacy/Expected/AcceptanceTests/XmsErrorResponse/setup.py index ffc32bf4893..55bf2961b26 100644 --- a/test/vanilla/legacy/Expected/AcceptanceTests/XmsErrorResponse/setup.py +++ b/test/vanilla/legacy/Expected/AcceptanceTests/XmsErrorResponse/setup.py @@ -6,31 +6,24 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- # coding: utf-8 - from setuptools import setup, find_packages -NAME = "xmserrorresponseextensions" -VERSION = "0.1.0" - -# To install the library, run the following -# -# python setup.py install -# -# prerequisite: setuptools -# http://pypi.python.org/pypi/setuptools - -REQUIRES = ["msrest>=0.6.21", "azure-core<2.0.0,>=1.20.1"] +PACKAGE_NAME = "xmserrorresponseextensions" +version = "0.1.0" setup( - name=NAME, - version=VERSION, + name=PACKAGE_NAME, + version=version, description="XMSErrorResponseExtensions", author_email="", url="", - keywords=["Swagger", "XMSErrorResponseExtensions"], - install_requires=REQUIRES, + keywords="azure, azure sdk", packages=find_packages(), include_package_data=True, + install_requires=[ + "msrest>=0.6.21", + "azure-core<2.0.0,>=1.20.1", + ], long_description="""\ XMS Error Response Extensions. """, diff --git a/test/vanilla/legacy/requirements.txt b/test/vanilla/legacy/requirements.txt index 836a5bc3056..b83d74fe621 100644 --- a/test/vanilla/legacy/requirements.txt +++ b/test/vanilla/legacy/requirements.txt @@ -50,4 +50,5 @@ azure-core==1.20.1 -e ./Expected/AcceptanceTests/UrlMultiCollectionFormat -e ./Expected/AcceptanceTests/Validation -e ./Expected/AcceptanceTests/Xml --e ./Expected/AcceptanceTests/XmsErrorResponse \ No newline at end of file +-e ./Expected/AcceptanceTests/XmsErrorResponse +-e ./Expected/AcceptanceTests/PackageModeDataPlane \ No newline at end of file diff --git a/test/vanilla/legacy/specification/packagemodedataplane/README.md b/test/vanilla/legacy/specification/packagemodedataplane/README.md new file mode 100644 index 00000000000..1850f068cd1 --- /dev/null +++ b/test/vanilla/legacy/specification/packagemodedataplane/README.md @@ -0,0 +1,20 @@ +# Testing package-mode + +### Settings + +``` yaml +input-file: ../../../../../node_modules/@microsoft.azure/autorest.testserver/swagger/any-type.json +output-folder: $(python-sdks-folder)/vanilla/legacy/Expected/AcceptanceTests/PackageModeDataPlane +namespace: packagemode +package-name: packagemode +package-pprint-name: Azure Package Mode +add-credentials: false +license-header: MICROSOFT_MIT_NO_VERSION +package-version: 1.0.0b1 +output-artifact: code-model-v4-no-tags +payload-flattening-threshold: 1 +clear-output-folder: true +black: true +vanilla: true +package-mode: dataplane +``` diff --git a/test/vanilla/low-level/Expected/AcceptanceTests/AdditionalPropertiesLowLevel/setup.py b/test/vanilla/low-level/Expected/AcceptanceTests/AdditionalPropertiesLowLevel/setup.py index afc03668fe3..6c18a93049f 100644 --- a/test/vanilla/low-level/Expected/AcceptanceTests/AdditionalPropertiesLowLevel/setup.py +++ b/test/vanilla/low-level/Expected/AcceptanceTests/AdditionalPropertiesLowLevel/setup.py @@ -6,31 +6,24 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- # coding: utf-8 - from setuptools import setup, find_packages -NAME = "additionalpropertiesclient" -VERSION = "0.1.0" - -# To install the library, run the following -# -# python setup.py install -# -# prerequisite: setuptools -# http://pypi.python.org/pypi/setuptools - -REQUIRES = ["msrest>=0.6.21", "azure-core<2.0.0,>=1.20.1"] +PACKAGE_NAME = "additionalpropertiesclient" +version = "0.1.0" setup( - name=NAME, - version=VERSION, + name=PACKAGE_NAME, + version=version, description="AdditionalPropertiesClient", author_email="", url="", - keywords=["Swagger", "AdditionalPropertiesClient"], - install_requires=REQUIRES, + keywords="azure, azure sdk", packages=find_packages(), include_package_data=True, + install_requires=[ + "msrest>=0.6.21", + "azure-core<2.0.0,>=1.20.1", + ], long_description="""\ Test Infrastructure for AutoRest. """, diff --git a/test/vanilla/low-level/Expected/AcceptanceTests/AnythingLowLevel/setup.py b/test/vanilla/low-level/Expected/AcceptanceTests/AnythingLowLevel/setup.py index 5983ebe0fb1..49bbca492ca 100644 --- a/test/vanilla/low-level/Expected/AcceptanceTests/AnythingLowLevel/setup.py +++ b/test/vanilla/low-level/Expected/AcceptanceTests/AnythingLowLevel/setup.py @@ -6,31 +6,24 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- # coding: utf-8 - from setuptools import setup, find_packages -NAME = "anythingclient" -VERSION = "0.1.0" - -# To install the library, run the following -# -# python setup.py install -# -# prerequisite: setuptools -# http://pypi.python.org/pypi/setuptools - -REQUIRES = ["msrest>=0.6.21", "azure-core<2.0.0,>=1.20.1"] +PACKAGE_NAME = "anythingclient" +version = "0.1.0" setup( - name=NAME, - version=VERSION, + name=PACKAGE_NAME, + version=version, description="AnythingClient", author_email="", url="", - keywords=["Swagger", "AnythingClient"], - install_requires=REQUIRES, + keywords="azure, azure sdk", packages=find_packages(), include_package_data=True, + install_requires=[ + "msrest>=0.6.21", + "azure-core<2.0.0,>=1.20.1", + ], long_description="""\ Service client for testing basic anything types. Those schemas without types can be anything: primitive, object, array. """, diff --git a/test/vanilla/low-level/Expected/AcceptanceTests/BodyArrayLowLevel/setup.py b/test/vanilla/low-level/Expected/AcceptanceTests/BodyArrayLowLevel/setup.py index 877b4dde4a8..b4496bedec9 100644 --- a/test/vanilla/low-level/Expected/AcceptanceTests/BodyArrayLowLevel/setup.py +++ b/test/vanilla/low-level/Expected/AcceptanceTests/BodyArrayLowLevel/setup.py @@ -6,31 +6,24 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- # coding: utf-8 - from setuptools import setup, find_packages -NAME = "autorestswaggerbatarrayservice" -VERSION = "0.1.0" - -# To install the library, run the following -# -# python setup.py install -# -# prerequisite: setuptools -# http://pypi.python.org/pypi/setuptools - -REQUIRES = ["msrest>=0.6.21", "azure-core<2.0.0,>=1.20.1"] +PACKAGE_NAME = "autorestswaggerbatarrayservice" +version = "0.1.0" setup( - name=NAME, - version=VERSION, + name=PACKAGE_NAME, + version=version, description="AutoRestSwaggerBATArrayService", author_email="", url="", - keywords=["Swagger", "AutoRestSwaggerBATArrayService"], - install_requires=REQUIRES, + keywords="azure, azure sdk", packages=find_packages(), include_package_data=True, + install_requires=[ + "msrest>=0.6.21", + "azure-core<2.0.0,>=1.20.1", + ], long_description="""\ Test Infrastructure for AutoRest Swagger BAT. """, diff --git a/test/vanilla/low-level/Expected/AcceptanceTests/BodyBinaryLowLevel/setup.py b/test/vanilla/low-level/Expected/AcceptanceTests/BodyBinaryLowLevel/setup.py index 772307d83f9..b6f3411b4bb 100644 --- a/test/vanilla/low-level/Expected/AcceptanceTests/BodyBinaryLowLevel/setup.py +++ b/test/vanilla/low-level/Expected/AcceptanceTests/BodyBinaryLowLevel/setup.py @@ -6,31 +6,24 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- # coding: utf-8 - from setuptools import setup, find_packages -NAME = "binarywithcontenttypeapplicationjson" -VERSION = "0.1.0" - -# To install the library, run the following -# -# python setup.py install -# -# prerequisite: setuptools -# http://pypi.python.org/pypi/setuptools - -REQUIRES = ["msrest>=0.6.21", "azure-core<2.0.0,>=1.20.1"] +PACKAGE_NAME = "binarywithcontenttypeapplicationjson" +version = "0.1.0" setup( - name=NAME, - version=VERSION, + name=PACKAGE_NAME, + version=version, description="BinaryWithContentTypeApplicationJson", author_email="", url="", - keywords=["Swagger", "BinaryWithContentTypeApplicationJson"], - install_requires=REQUIRES, + keywords="azure, azure sdk", packages=find_packages(), include_package_data=True, + install_requires=[ + "msrest>=0.6.21", + "azure-core<2.0.0,>=1.20.1", + ], long_description="""\ Sample for file with json and binary content type. """, diff --git a/test/vanilla/low-level/Expected/AcceptanceTests/BodyBooleanLowLevel/setup.py b/test/vanilla/low-level/Expected/AcceptanceTests/BodyBooleanLowLevel/setup.py index 374eaef7983..c202e9c623a 100644 --- a/test/vanilla/low-level/Expected/AcceptanceTests/BodyBooleanLowLevel/setup.py +++ b/test/vanilla/low-level/Expected/AcceptanceTests/BodyBooleanLowLevel/setup.py @@ -6,31 +6,24 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- # coding: utf-8 - from setuptools import setup, find_packages -NAME = "autorestbooltestservice" -VERSION = "0.1.0" - -# To install the library, run the following -# -# python setup.py install -# -# prerequisite: setuptools -# http://pypi.python.org/pypi/setuptools - -REQUIRES = ["msrest>=0.6.21", "azure-core<2.0.0,>=1.20.1"] +PACKAGE_NAME = "autorestbooltestservice" +version = "0.1.0" setup( - name=NAME, - version=VERSION, + name=PACKAGE_NAME, + version=version, description="AutoRestBoolTestService", author_email="", url="", - keywords=["Swagger", "AutoRestBoolTestService"], - install_requires=REQUIRES, + keywords="azure, azure sdk", packages=find_packages(), include_package_data=True, + install_requires=[ + "msrest>=0.6.21", + "azure-core<2.0.0,>=1.20.1", + ], long_description="""\ Test Infrastructure for AutoRest. """, diff --git a/test/vanilla/low-level/Expected/AcceptanceTests/BodyByteLowLevel/setup.py b/test/vanilla/low-level/Expected/AcceptanceTests/BodyByteLowLevel/setup.py index 158f73d896a..d1f5e471d62 100644 --- a/test/vanilla/low-level/Expected/AcceptanceTests/BodyByteLowLevel/setup.py +++ b/test/vanilla/low-level/Expected/AcceptanceTests/BodyByteLowLevel/setup.py @@ -6,31 +6,24 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- # coding: utf-8 - from setuptools import setup, find_packages -NAME = "autorestswaggerbatbyteservice" -VERSION = "0.1.0" - -# To install the library, run the following -# -# python setup.py install -# -# prerequisite: setuptools -# http://pypi.python.org/pypi/setuptools - -REQUIRES = ["msrest>=0.6.21", "azure-core<2.0.0,>=1.20.1"] +PACKAGE_NAME = "autorestswaggerbatbyteservice" +version = "0.1.0" setup( - name=NAME, - version=VERSION, + name=PACKAGE_NAME, + version=version, description="AutoRestSwaggerBATByteService", author_email="", url="", - keywords=["Swagger", "AutoRestSwaggerBATByteService"], - install_requires=REQUIRES, + keywords="azure, azure sdk", packages=find_packages(), include_package_data=True, + install_requires=[ + "msrest>=0.6.21", + "azure-core<2.0.0,>=1.20.1", + ], long_description="""\ Test Infrastructure for AutoRest Swagger BAT. """, diff --git a/test/vanilla/low-level/Expected/AcceptanceTests/BodyComplexLowLevel/setup.py b/test/vanilla/low-level/Expected/AcceptanceTests/BodyComplexLowLevel/setup.py index ea77baa0fb5..9d4ebd2b05f 100644 --- a/test/vanilla/low-level/Expected/AcceptanceTests/BodyComplexLowLevel/setup.py +++ b/test/vanilla/low-level/Expected/AcceptanceTests/BodyComplexLowLevel/setup.py @@ -6,31 +6,24 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- # coding: utf-8 - from setuptools import setup, find_packages -NAME = "autorestcomplextestservice" -VERSION = "0.1.0" - -# To install the library, run the following -# -# python setup.py install -# -# prerequisite: setuptools -# http://pypi.python.org/pypi/setuptools - -REQUIRES = ["msrest>=0.6.21", "azure-core<2.0.0,>=1.20.1"] +PACKAGE_NAME = "autorestcomplextestservice" +version = "0.1.0" setup( - name=NAME, - version=VERSION, + name=PACKAGE_NAME, + version=version, description="AutoRestComplexTestService", author_email="", url="", - keywords=["Swagger", "AutoRestComplexTestService"], - install_requires=REQUIRES, + keywords="azure, azure sdk", packages=find_packages(), include_package_data=True, + install_requires=[ + "msrest>=0.6.21", + "azure-core<2.0.0,>=1.20.1", + ], long_description="""\ Test Infrastructure for AutoRest. """, diff --git a/test/vanilla/low-level/Expected/AcceptanceTests/BodyDateLowLevel/setup.py b/test/vanilla/low-level/Expected/AcceptanceTests/BodyDateLowLevel/setup.py index 1b7756a102f..46a4f0de64f 100644 --- a/test/vanilla/low-level/Expected/AcceptanceTests/BodyDateLowLevel/setup.py +++ b/test/vanilla/low-level/Expected/AcceptanceTests/BodyDateLowLevel/setup.py @@ -6,31 +6,24 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- # coding: utf-8 - from setuptools import setup, find_packages -NAME = "autorestdatetestservice" -VERSION = "0.1.0" - -# To install the library, run the following -# -# python setup.py install -# -# prerequisite: setuptools -# http://pypi.python.org/pypi/setuptools - -REQUIRES = ["msrest>=0.6.21", "azure-core<2.0.0,>=1.20.1"] +PACKAGE_NAME = "autorestdatetestservice" +version = "0.1.0" setup( - name=NAME, - version=VERSION, + name=PACKAGE_NAME, + version=version, description="AutoRestDateTestService", author_email="", url="", - keywords=["Swagger", "AutoRestDateTestService"], - install_requires=REQUIRES, + keywords="azure, azure sdk", packages=find_packages(), include_package_data=True, + install_requires=[ + "msrest>=0.6.21", + "azure-core<2.0.0,>=1.20.1", + ], long_description="""\ Test Infrastructure for AutoRest. """, diff --git a/test/vanilla/low-level/Expected/AcceptanceTests/BodyDateTimeLowLevel/setup.py b/test/vanilla/low-level/Expected/AcceptanceTests/BodyDateTimeLowLevel/setup.py index e3def2be286..c43819edbde 100644 --- a/test/vanilla/low-level/Expected/AcceptanceTests/BodyDateTimeLowLevel/setup.py +++ b/test/vanilla/low-level/Expected/AcceptanceTests/BodyDateTimeLowLevel/setup.py @@ -6,31 +6,24 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- # coding: utf-8 - from setuptools import setup, find_packages -NAME = "autorestdatetimetestservice" -VERSION = "0.1.0" - -# To install the library, run the following -# -# python setup.py install -# -# prerequisite: setuptools -# http://pypi.python.org/pypi/setuptools - -REQUIRES = ["msrest>=0.6.21", "azure-core<2.0.0,>=1.20.1"] +PACKAGE_NAME = "autorestdatetimetestservice" +version = "0.1.0" setup( - name=NAME, - version=VERSION, + name=PACKAGE_NAME, + version=version, description="AutoRestDateTimeTestService", author_email="", url="", - keywords=["Swagger", "AutoRestDateTimeTestService"], - install_requires=REQUIRES, + keywords="azure, azure sdk", packages=find_packages(), include_package_data=True, + install_requires=[ + "msrest>=0.6.21", + "azure-core<2.0.0,>=1.20.1", + ], long_description="""\ Test Infrastructure for AutoRest. """, diff --git a/test/vanilla/low-level/Expected/AcceptanceTests/BodyDateTimeRfc1123LowLevel/setup.py b/test/vanilla/low-level/Expected/AcceptanceTests/BodyDateTimeRfc1123LowLevel/setup.py index 8c0de0f8c73..85bb56c5ead 100644 --- a/test/vanilla/low-level/Expected/AcceptanceTests/BodyDateTimeRfc1123LowLevel/setup.py +++ b/test/vanilla/low-level/Expected/AcceptanceTests/BodyDateTimeRfc1123LowLevel/setup.py @@ -6,31 +6,24 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- # coding: utf-8 - from setuptools import setup, find_packages -NAME = "autorestrfc1123datetimetestservice" -VERSION = "0.1.0" - -# To install the library, run the following -# -# python setup.py install -# -# prerequisite: setuptools -# http://pypi.python.org/pypi/setuptools - -REQUIRES = ["msrest>=0.6.21", "azure-core<2.0.0,>=1.20.1"] +PACKAGE_NAME = "autorestrfc1123datetimetestservice" +version = "0.1.0" setup( - name=NAME, - version=VERSION, + name=PACKAGE_NAME, + version=version, description="AutoRestRFC1123DateTimeTestService", author_email="", url="", - keywords=["Swagger", "AutoRestRFC1123DateTimeTestService"], - install_requires=REQUIRES, + keywords="azure, azure sdk", packages=find_packages(), include_package_data=True, + install_requires=[ + "msrest>=0.6.21", + "azure-core<2.0.0,>=1.20.1", + ], long_description="""\ Test Infrastructure for AutoRest. """, diff --git a/test/vanilla/low-level/Expected/AcceptanceTests/BodyDictionaryLowLevel/setup.py b/test/vanilla/low-level/Expected/AcceptanceTests/BodyDictionaryLowLevel/setup.py index 17faa081a7f..33c4b91e927 100644 --- a/test/vanilla/low-level/Expected/AcceptanceTests/BodyDictionaryLowLevel/setup.py +++ b/test/vanilla/low-level/Expected/AcceptanceTests/BodyDictionaryLowLevel/setup.py @@ -6,31 +6,24 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- # coding: utf-8 - from setuptools import setup, find_packages -NAME = "autorestswaggerbatdictionaryservice" -VERSION = "0.1.0" - -# To install the library, run the following -# -# python setup.py install -# -# prerequisite: setuptools -# http://pypi.python.org/pypi/setuptools - -REQUIRES = ["msrest>=0.6.21", "azure-core<2.0.0,>=1.20.1"] +PACKAGE_NAME = "autorestswaggerbatdictionaryservice" +version = "0.1.0" setup( - name=NAME, - version=VERSION, + name=PACKAGE_NAME, + version=version, description="AutoRestSwaggerBATDictionaryService", author_email="", url="", - keywords=["Swagger", "AutoRestSwaggerBATDictionaryService"], - install_requires=REQUIRES, + keywords="azure, azure sdk", packages=find_packages(), include_package_data=True, + install_requires=[ + "msrest>=0.6.21", + "azure-core<2.0.0,>=1.20.1", + ], long_description="""\ Test Infrastructure for AutoRest Swagger BAT. """, diff --git a/test/vanilla/low-level/Expected/AcceptanceTests/BodyDurationLowLevel/setup.py b/test/vanilla/low-level/Expected/AcceptanceTests/BodyDurationLowLevel/setup.py index 385afe6573c..6ecee859197 100644 --- a/test/vanilla/low-level/Expected/AcceptanceTests/BodyDurationLowLevel/setup.py +++ b/test/vanilla/low-level/Expected/AcceptanceTests/BodyDurationLowLevel/setup.py @@ -6,31 +6,24 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- # coding: utf-8 - from setuptools import setup, find_packages -NAME = "autorestdurationtestservice" -VERSION = "0.1.0" - -# To install the library, run the following -# -# python setup.py install -# -# prerequisite: setuptools -# http://pypi.python.org/pypi/setuptools - -REQUIRES = ["msrest>=0.6.21", "azure-core<2.0.0,>=1.20.1"] +PACKAGE_NAME = "autorestdurationtestservice" +version = "0.1.0" setup( - name=NAME, - version=VERSION, + name=PACKAGE_NAME, + version=version, description="AutoRestDurationTestService", author_email="", url="", - keywords=["Swagger", "AutoRestDurationTestService"], - install_requires=REQUIRES, + keywords="azure, azure sdk", packages=find_packages(), include_package_data=True, + install_requires=[ + "msrest>=0.6.21", + "azure-core<2.0.0,>=1.20.1", + ], long_description="""\ Test Infrastructure for AutoRest. """, diff --git a/test/vanilla/low-level/Expected/AcceptanceTests/BodyFileLowLevel/setup.py b/test/vanilla/low-level/Expected/AcceptanceTests/BodyFileLowLevel/setup.py index da0628aad71..4bc17cee69e 100644 --- a/test/vanilla/low-level/Expected/AcceptanceTests/BodyFileLowLevel/setup.py +++ b/test/vanilla/low-level/Expected/AcceptanceTests/BodyFileLowLevel/setup.py @@ -6,31 +6,24 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- # coding: utf-8 - from setuptools import setup, find_packages -NAME = "autorestswaggerbatfileservice" -VERSION = "0.1.0" - -# To install the library, run the following -# -# python setup.py install -# -# prerequisite: setuptools -# http://pypi.python.org/pypi/setuptools - -REQUIRES = ["msrest>=0.6.21", "azure-core<2.0.0,>=1.20.1"] +PACKAGE_NAME = "autorestswaggerbatfileservice" +version = "0.1.0" setup( - name=NAME, - version=VERSION, + name=PACKAGE_NAME, + version=version, description="AutoRestSwaggerBATFileService", author_email="", url="", - keywords=["Swagger", "AutoRestSwaggerBATFileService"], - install_requires=REQUIRES, + keywords="azure, azure sdk", packages=find_packages(), include_package_data=True, + install_requires=[ + "msrest>=0.6.21", + "azure-core<2.0.0,>=1.20.1", + ], long_description="""\ Test Infrastructure for AutoRest Swagger BAT. """, diff --git a/test/vanilla/low-level/Expected/AcceptanceTests/BodyFormDataLowLevel/setup.py b/test/vanilla/low-level/Expected/AcceptanceTests/BodyFormDataLowLevel/setup.py index b9c8a22987e..9631b836c87 100644 --- a/test/vanilla/low-level/Expected/AcceptanceTests/BodyFormDataLowLevel/setup.py +++ b/test/vanilla/low-level/Expected/AcceptanceTests/BodyFormDataLowLevel/setup.py @@ -6,31 +6,24 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- # coding: utf-8 - from setuptools import setup, find_packages -NAME = "autorestswaggerbatformdataservice" -VERSION = "0.1.0" - -# To install the library, run the following -# -# python setup.py install -# -# prerequisite: setuptools -# http://pypi.python.org/pypi/setuptools - -REQUIRES = ["msrest>=0.6.21", "azure-core<2.0.0,>=1.20.1"] +PACKAGE_NAME = "autorestswaggerbatformdataservice" +version = "0.1.0" setup( - name=NAME, - version=VERSION, + name=PACKAGE_NAME, + version=version, description="AutoRestSwaggerBATFormDataService", author_email="", url="", - keywords=["Swagger", "AutoRestSwaggerBATFormDataService"], - install_requires=REQUIRES, + keywords="azure, azure sdk", packages=find_packages(), include_package_data=True, + install_requires=[ + "msrest>=0.6.21", + "azure-core<2.0.0,>=1.20.1", + ], long_description="""\ Test Infrastructure for AutoRest Swagger BAT. """, diff --git a/test/vanilla/low-level/Expected/AcceptanceTests/BodyFormUrlEncodedDataLowLevel/setup.py b/test/vanilla/low-level/Expected/AcceptanceTests/BodyFormUrlEncodedDataLowLevel/setup.py index 865983fb584..d436bbb30c8 100644 --- a/test/vanilla/low-level/Expected/AcceptanceTests/BodyFormUrlEncodedDataLowLevel/setup.py +++ b/test/vanilla/low-level/Expected/AcceptanceTests/BodyFormUrlEncodedDataLowLevel/setup.py @@ -6,31 +6,24 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- # coding: utf-8 - from setuptools import setup, find_packages -NAME = "bodyformsdataurlencoded" -VERSION = "0.1.0" - -# To install the library, run the following -# -# python setup.py install -# -# prerequisite: setuptools -# http://pypi.python.org/pypi/setuptools - -REQUIRES = ["msrest>=0.6.21", "azure-core<2.0.0,>=1.20.1"] +PACKAGE_NAME = "bodyformsdataurlencoded" +version = "0.1.0" setup( - name=NAME, - version=VERSION, + name=PACKAGE_NAME, + version=version, description="BodyFormsDataURLEncoded", author_email="", url="", - keywords=["Swagger", "BodyFormsDataURLEncoded"], - install_requires=REQUIRES, + keywords="azure, azure sdk", packages=find_packages(), include_package_data=True, + install_requires=[ + "msrest>=0.6.21", + "azure-core<2.0.0,>=1.20.1", + ], long_description="""\ Test Infrastructure for AutoRest Swagger BAT. """, diff --git a/test/vanilla/low-level/Expected/AcceptanceTests/BodyIntegerLowLevel/setup.py b/test/vanilla/low-level/Expected/AcceptanceTests/BodyIntegerLowLevel/setup.py index bcd0dece55b..771458fa5a5 100644 --- a/test/vanilla/low-level/Expected/AcceptanceTests/BodyIntegerLowLevel/setup.py +++ b/test/vanilla/low-level/Expected/AcceptanceTests/BodyIntegerLowLevel/setup.py @@ -6,31 +6,24 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- # coding: utf-8 - from setuptools import setup, find_packages -NAME = "autorestintegertestservice" -VERSION = "0.1.0" - -# To install the library, run the following -# -# python setup.py install -# -# prerequisite: setuptools -# http://pypi.python.org/pypi/setuptools - -REQUIRES = ["msrest>=0.6.21", "azure-core<2.0.0,>=1.20.1"] +PACKAGE_NAME = "autorestintegertestservice" +version = "0.1.0" setup( - name=NAME, - version=VERSION, + name=PACKAGE_NAME, + version=version, description="AutoRestIntegerTestService", author_email="", url="", - keywords=["Swagger", "AutoRestIntegerTestService"], - install_requires=REQUIRES, + keywords="azure, azure sdk", packages=find_packages(), include_package_data=True, + install_requires=[ + "msrest>=0.6.21", + "azure-core<2.0.0,>=1.20.1", + ], long_description="""\ Test Infrastructure for AutoRest. """, diff --git a/test/vanilla/low-level/Expected/AcceptanceTests/BodyNumberLowLevel/setup.py b/test/vanilla/low-level/Expected/AcceptanceTests/BodyNumberLowLevel/setup.py index f2c282a12aa..8a60500f42f 100644 --- a/test/vanilla/low-level/Expected/AcceptanceTests/BodyNumberLowLevel/setup.py +++ b/test/vanilla/low-level/Expected/AcceptanceTests/BodyNumberLowLevel/setup.py @@ -6,31 +6,24 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- # coding: utf-8 - from setuptools import setup, find_packages -NAME = "autorestnumbertestservice" -VERSION = "0.1.0" - -# To install the library, run the following -# -# python setup.py install -# -# prerequisite: setuptools -# http://pypi.python.org/pypi/setuptools - -REQUIRES = ["msrest>=0.6.21", "azure-core<2.0.0,>=1.20.1"] +PACKAGE_NAME = "autorestnumbertestservice" +version = "0.1.0" setup( - name=NAME, - version=VERSION, + name=PACKAGE_NAME, + version=version, description="AutoRestNumberTestService", author_email="", url="", - keywords=["Swagger", "AutoRestNumberTestService"], - install_requires=REQUIRES, + keywords="azure, azure sdk", packages=find_packages(), include_package_data=True, + install_requires=[ + "msrest>=0.6.21", + "azure-core<2.0.0,>=1.20.1", + ], long_description="""\ Test Infrastructure for AutoRest. """, diff --git a/test/vanilla/low-level/Expected/AcceptanceTests/BodyStringLowLevel/setup.py b/test/vanilla/low-level/Expected/AcceptanceTests/BodyStringLowLevel/setup.py index f9bbe0b13fa..e64e4344057 100644 --- a/test/vanilla/low-level/Expected/AcceptanceTests/BodyStringLowLevel/setup.py +++ b/test/vanilla/low-level/Expected/AcceptanceTests/BodyStringLowLevel/setup.py @@ -6,31 +6,24 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- # coding: utf-8 - from setuptools import setup, find_packages -NAME = "autorestswaggerbatservice" -VERSION = "0.1.0" - -# To install the library, run the following -# -# python setup.py install -# -# prerequisite: setuptools -# http://pypi.python.org/pypi/setuptools - -REQUIRES = ["msrest>=0.6.21", "azure-core<2.0.0,>=1.20.1"] +PACKAGE_NAME = "autorestswaggerbatservice" +version = "0.1.0" setup( - name=NAME, - version=VERSION, + name=PACKAGE_NAME, + version=version, description="AutoRestSwaggerBATService", author_email="", url="", - keywords=["Swagger", "AutoRestSwaggerBATService"], - install_requires=REQUIRES, + keywords="azure, azure sdk", packages=find_packages(), include_package_data=True, + install_requires=[ + "msrest>=0.6.21", + "azure-core<2.0.0,>=1.20.1", + ], long_description="""\ Test Infrastructure for AutoRest Swagger BAT. """, diff --git a/test/vanilla/low-level/Expected/AcceptanceTests/BodyTimeLowLevel/setup.py b/test/vanilla/low-level/Expected/AcceptanceTests/BodyTimeLowLevel/setup.py index 4c61b19cc21..c9653994d04 100644 --- a/test/vanilla/low-level/Expected/AcceptanceTests/BodyTimeLowLevel/setup.py +++ b/test/vanilla/low-level/Expected/AcceptanceTests/BodyTimeLowLevel/setup.py @@ -6,31 +6,24 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- # coding: utf-8 - from setuptools import setup, find_packages -NAME = "autoresttimetestservice" -VERSION = "0.1.0" - -# To install the library, run the following -# -# python setup.py install -# -# prerequisite: setuptools -# http://pypi.python.org/pypi/setuptools - -REQUIRES = ["msrest>=0.6.21", "azure-core<2.0.0,>=1.20.1"] +PACKAGE_NAME = "autoresttimetestservice" +version = "0.1.0" setup( - name=NAME, - version=VERSION, + name=PACKAGE_NAME, + version=version, description="AutoRestTimeTestService", author_email="", url="", - keywords=["Swagger", "AutoRestTimeTestService"], - install_requires=REQUIRES, + keywords="azure, azure sdk", packages=find_packages(), include_package_data=True, + install_requires=[ + "msrest>=0.6.21", + "azure-core<2.0.0,>=1.20.1", + ], long_description="""\ Test Infrastructure for AutoRest. """, diff --git a/test/vanilla/low-level/Expected/AcceptanceTests/ConstantsLowLevel/setup.py b/test/vanilla/low-level/Expected/AcceptanceTests/ConstantsLowLevel/setup.py index 56088d4f1fe..5c3500f3542 100644 --- a/test/vanilla/low-level/Expected/AcceptanceTests/ConstantsLowLevel/setup.py +++ b/test/vanilla/low-level/Expected/AcceptanceTests/ConstantsLowLevel/setup.py @@ -6,31 +6,24 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- # coding: utf-8 - from setuptools import setup, find_packages -NAME = "autorestswaggerconstantservice" -VERSION = "0.1.0" - -# To install the library, run the following -# -# python setup.py install -# -# prerequisite: setuptools -# http://pypi.python.org/pypi/setuptools - -REQUIRES = ["msrest>=0.6.21", "azure-core<2.0.0,>=1.20.1"] +PACKAGE_NAME = "autorestswaggerconstantservice" +version = "0.1.0" setup( - name=NAME, - version=VERSION, + name=PACKAGE_NAME, + version=version, description="AutoRestSwaggerConstantService", author_email="", url="", - keywords=["Swagger", "AutoRestSwaggerConstantService"], - install_requires=REQUIRES, + keywords="azure, azure sdk", packages=find_packages(), include_package_data=True, + install_requires=[ + "msrest>=0.6.21", + "azure-core<2.0.0,>=1.20.1", + ], long_description="""\ Test Infrastructure for AutoRest Swagger Constant. """, diff --git a/test/vanilla/low-level/Expected/AcceptanceTests/CustomBaseUriLowLevel/setup.py b/test/vanilla/low-level/Expected/AcceptanceTests/CustomBaseUriLowLevel/setup.py index c250c733c08..5771c01ab9f 100644 --- a/test/vanilla/low-level/Expected/AcceptanceTests/CustomBaseUriLowLevel/setup.py +++ b/test/vanilla/low-level/Expected/AcceptanceTests/CustomBaseUriLowLevel/setup.py @@ -6,31 +6,24 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- # coding: utf-8 - from setuptools import setup, find_packages -NAME = "autorestparameterizedhosttestclient" -VERSION = "0.1.0" - -# To install the library, run the following -# -# python setup.py install -# -# prerequisite: setuptools -# http://pypi.python.org/pypi/setuptools - -REQUIRES = ["msrest>=0.6.21", "azure-core<2.0.0,>=1.20.1"] +PACKAGE_NAME = "autorestparameterizedhosttestclient" +version = "0.1.0" setup( - name=NAME, - version=VERSION, + name=PACKAGE_NAME, + version=version, description="AutoRestParameterizedHostTestClient", author_email="", url="", - keywords=["Swagger", "AutoRestParameterizedHostTestClient"], - install_requires=REQUIRES, + keywords="azure, azure sdk", packages=find_packages(), include_package_data=True, + install_requires=[ + "msrest>=0.6.21", + "azure-core<2.0.0,>=1.20.1", + ], long_description="""\ Test Infrastructure for AutoRest. """, diff --git a/test/vanilla/low-level/Expected/AcceptanceTests/CustomBaseUriMoreOptionsLowLevel/setup.py b/test/vanilla/low-level/Expected/AcceptanceTests/CustomBaseUriMoreOptionsLowLevel/setup.py index d2c84ca63b8..528516a4fe7 100644 --- a/test/vanilla/low-level/Expected/AcceptanceTests/CustomBaseUriMoreOptionsLowLevel/setup.py +++ b/test/vanilla/low-level/Expected/AcceptanceTests/CustomBaseUriMoreOptionsLowLevel/setup.py @@ -6,31 +6,24 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- # coding: utf-8 - from setuptools import setup, find_packages -NAME = "autorestparameterizedcustomhosttestclient" -VERSION = "0.1.0" - -# To install the library, run the following -# -# python setup.py install -# -# prerequisite: setuptools -# http://pypi.python.org/pypi/setuptools - -REQUIRES = ["msrest>=0.6.21", "azure-core<2.0.0,>=1.20.1"] +PACKAGE_NAME = "autorestparameterizedcustomhosttestclient" +version = "0.1.0" setup( - name=NAME, - version=VERSION, + name=PACKAGE_NAME, + version=version, description="AutoRestParameterizedCustomHostTestClient", author_email="", url="", - keywords=["Swagger", "AutoRestParameterizedCustomHostTestClient"], - install_requires=REQUIRES, + keywords="azure, azure sdk", packages=find_packages(), include_package_data=True, + install_requires=[ + "msrest>=0.6.21", + "azure-core<2.0.0,>=1.20.1", + ], long_description="""\ Test Infrastructure for AutoRest. """, diff --git a/test/vanilla/low-level/Expected/AcceptanceTests/ErrorWithSecretsLowLevel/setup.py b/test/vanilla/low-level/Expected/AcceptanceTests/ErrorWithSecretsLowLevel/setup.py index ed786ed0573..2af73e163b1 100644 --- a/test/vanilla/low-level/Expected/AcceptanceTests/ErrorWithSecretsLowLevel/setup.py +++ b/test/vanilla/low-level/Expected/AcceptanceTests/ErrorWithSecretsLowLevel/setup.py @@ -6,31 +6,24 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- # coding: utf-8 - from setuptools import setup, find_packages -NAME = "errorwithsecrets" -VERSION = "0.1.0" - -# To install the library, run the following -# -# python setup.py install -# -# prerequisite: setuptools -# http://pypi.python.org/pypi/setuptools - -REQUIRES = ["msrest>=0.6.21", "azure-core<2.0.0,>=1.20.1"] +PACKAGE_NAME = "errorwithsecrets" +version = "0.1.0" setup( - name=NAME, - version=VERSION, + name=PACKAGE_NAME, + version=version, description="ErrorWithSecrets", author_email="", url="", - keywords=["Swagger", "ErrorWithSecrets"], - install_requires=REQUIRES, + keywords="azure, azure sdk", packages=find_packages(), include_package_data=True, + install_requires=[ + "msrest>=0.6.21", + "azure-core<2.0.0,>=1.20.1", + ], long_description="""\ Tests whether loggers/tracers redact secrets and PII within error responses. """, diff --git a/test/vanilla/low-level/Expected/AcceptanceTests/ExtensibleEnumsLowLevel/setup.py b/test/vanilla/low-level/Expected/AcceptanceTests/ExtensibleEnumsLowLevel/setup.py index a7ea89c9d01..f16ec2cbf70 100644 --- a/test/vanilla/low-level/Expected/AcceptanceTests/ExtensibleEnumsLowLevel/setup.py +++ b/test/vanilla/low-level/Expected/AcceptanceTests/ExtensibleEnumsLowLevel/setup.py @@ -6,31 +6,24 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- # coding: utf-8 - from setuptools import setup, find_packages -NAME = "petstoreinc" -VERSION = "0.1.0" - -# To install the library, run the following -# -# python setup.py install -# -# prerequisite: setuptools -# http://pypi.python.org/pypi/setuptools - -REQUIRES = ["msrest>=0.6.21", "azure-core<2.0.0,>=1.20.1"] +PACKAGE_NAME = "petstoreinc" +version = "0.1.0" setup( - name=NAME, - version=VERSION, + name=PACKAGE_NAME, + version=version, description="PetStoreInc", author_email="", url="", - keywords=["Swagger", "PetStoreInc"], - install_requires=REQUIRES, + keywords="azure, azure sdk", packages=find_packages(), include_package_data=True, + install_requires=[ + "msrest>=0.6.21", + "azure-core<2.0.0,>=1.20.1", + ], long_description="""\ PetStore. """, diff --git a/test/vanilla/low-level/Expected/AcceptanceTests/HeaderLowLevel/setup.py b/test/vanilla/low-level/Expected/AcceptanceTests/HeaderLowLevel/setup.py index 8749e54d402..12460ccdd91 100644 --- a/test/vanilla/low-level/Expected/AcceptanceTests/HeaderLowLevel/setup.py +++ b/test/vanilla/low-level/Expected/AcceptanceTests/HeaderLowLevel/setup.py @@ -6,31 +6,24 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- # coding: utf-8 - from setuptools import setup, find_packages -NAME = "autorestswaggerbatheaderservice" -VERSION = "0.1.0" - -# To install the library, run the following -# -# python setup.py install -# -# prerequisite: setuptools -# http://pypi.python.org/pypi/setuptools - -REQUIRES = ["msrest>=0.6.21", "azure-core<2.0.0,>=1.20.1"] +PACKAGE_NAME = "autorestswaggerbatheaderservice" +version = "0.1.0" setup( - name=NAME, - version=VERSION, + name=PACKAGE_NAME, + version=version, description="AutoRestSwaggerBATHeaderService", author_email="", url="", - keywords=["Swagger", "AutoRestSwaggerBATHeaderService"], - install_requires=REQUIRES, + keywords="azure, azure sdk", packages=find_packages(), include_package_data=True, + install_requires=[ + "msrest>=0.6.21", + "azure-core<2.0.0,>=1.20.1", + ], long_description="""\ Test Infrastructure for AutoRest. """, diff --git a/test/vanilla/low-level/Expected/AcceptanceTests/HttpLowLevel/setup.py b/test/vanilla/low-level/Expected/AcceptanceTests/HttpLowLevel/setup.py index 69f380ec95e..1da4747d61e 100644 --- a/test/vanilla/low-level/Expected/AcceptanceTests/HttpLowLevel/setup.py +++ b/test/vanilla/low-level/Expected/AcceptanceTests/HttpLowLevel/setup.py @@ -6,31 +6,24 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- # coding: utf-8 - from setuptools import setup, find_packages -NAME = "autoresthttpinfrastructuretestservice" -VERSION = "0.1.0" - -# To install the library, run the following -# -# python setup.py install -# -# prerequisite: setuptools -# http://pypi.python.org/pypi/setuptools - -REQUIRES = ["msrest>=0.6.21", "azure-core<2.0.0,>=1.20.1"] +PACKAGE_NAME = "autoresthttpinfrastructuretestservice" +version = "0.1.0" setup( - name=NAME, - version=VERSION, + name=PACKAGE_NAME, + version=version, description="AutoRestHttpInfrastructureTestService", author_email="", url="", - keywords=["Swagger", "AutoRestHttpInfrastructureTestService"], - install_requires=REQUIRES, + keywords="azure, azure sdk", packages=find_packages(), include_package_data=True, + install_requires=[ + "msrest>=0.6.21", + "azure-core<2.0.0,>=1.20.1", + ], long_description="""\ Test Infrastructure for AutoRest. """, diff --git a/test/vanilla/low-level/Expected/AcceptanceTests/IncorrectErrorResponseLowLevel/setup.py b/test/vanilla/low-level/Expected/AcceptanceTests/IncorrectErrorResponseLowLevel/setup.py index 883660291b0..a205df4f873 100644 --- a/test/vanilla/low-level/Expected/AcceptanceTests/IncorrectErrorResponseLowLevel/setup.py +++ b/test/vanilla/low-level/Expected/AcceptanceTests/IncorrectErrorResponseLowLevel/setup.py @@ -6,31 +6,24 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- # coding: utf-8 - from setuptools import setup, find_packages -NAME = "incorrectreturnederrormodel" -VERSION = "0.1.0" - -# To install the library, run the following -# -# python setup.py install -# -# prerequisite: setuptools -# http://pypi.python.org/pypi/setuptools - -REQUIRES = ["msrest>=0.6.21", "azure-core<2.0.0,>=1.20.1"] +PACKAGE_NAME = "incorrectreturnederrormodel" +version = "0.1.0" setup( - name=NAME, - version=VERSION, + name=PACKAGE_NAME, + version=version, description="IncorrectReturnedErrorModel", author_email="", url="", - keywords=["Swagger", "IncorrectReturnedErrorModel"], - install_requires=REQUIRES, + keywords="azure, azure sdk", packages=find_packages(), include_package_data=True, + install_requires=[ + "msrest>=0.6.21", + "azure-core<2.0.0,>=1.20.1", + ], long_description="""\ Test to see when throwing an HttpResponseError whether we swallow error model deserialization errors. """, diff --git a/test/vanilla/low-level/Expected/AcceptanceTests/MediaTypesLowLevel/setup.py b/test/vanilla/low-level/Expected/AcceptanceTests/MediaTypesLowLevel/setup.py index 5c8489e8153..dd0d3c27d99 100644 --- a/test/vanilla/low-level/Expected/AcceptanceTests/MediaTypesLowLevel/setup.py +++ b/test/vanilla/low-level/Expected/AcceptanceTests/MediaTypesLowLevel/setup.py @@ -6,31 +6,24 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- # coding: utf-8 - from setuptools import setup, find_packages -NAME = "mediatypesclient" -VERSION = "0.1.0" - -# To install the library, run the following -# -# python setup.py install -# -# prerequisite: setuptools -# http://pypi.python.org/pypi/setuptools - -REQUIRES = ["msrest>=0.6.21", "azure-core<2.0.0,>=1.20.1"] +PACKAGE_NAME = "mediatypesclient" +version = "0.1.0" setup( - name=NAME, - version=VERSION, + name=PACKAGE_NAME, + version=version, description="MediaTypesClient", author_email="", url="", - keywords=["Swagger", "MediaTypesClient"], - install_requires=REQUIRES, + keywords="azure, azure sdk", packages=find_packages(), include_package_data=True, + install_requires=[ + "msrest>=0.6.21", + "azure-core<2.0.0,>=1.20.1", + ], long_description="""\ Play with produces/consumes and media-types in general. """, diff --git a/test/vanilla/low-level/Expected/AcceptanceTests/MergePatchJsonLowLevel/setup.py b/test/vanilla/low-level/Expected/AcceptanceTests/MergePatchJsonLowLevel/setup.py index 4b34ab99a32..5f536deb0ed 100644 --- a/test/vanilla/low-level/Expected/AcceptanceTests/MergePatchJsonLowLevel/setup.py +++ b/test/vanilla/low-level/Expected/AcceptanceTests/MergePatchJsonLowLevel/setup.py @@ -6,31 +6,24 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- # coding: utf-8 - from setuptools import setup, find_packages -NAME = "mergepatchjsonclient" -VERSION = "0.1.0" - -# To install the library, run the following -# -# python setup.py install -# -# prerequisite: setuptools -# http://pypi.python.org/pypi/setuptools - -REQUIRES = ["msrest>=0.6.21", "azure-core<2.0.0,>=1.20.1"] +PACKAGE_NAME = "mergepatchjsonclient" +version = "0.1.0" setup( - name=NAME, - version=VERSION, + name=PACKAGE_NAME, + version=version, description="MergePatchJsonClient", author_email="", url="", - keywords=["Swagger", "MergePatchJsonClient"], - install_requires=REQUIRES, + keywords="azure, azure sdk", packages=find_packages(), include_package_data=True, + install_requires=[ + "msrest>=0.6.21", + "azure-core<2.0.0,>=1.20.1", + ], long_description="""\ Service client for testing merge patch json. """, diff --git a/test/vanilla/low-level/Expected/AcceptanceTests/ModelFlatteningLowLevel/setup.py b/test/vanilla/low-level/Expected/AcceptanceTests/ModelFlatteningLowLevel/setup.py index 8d1edff1db1..2ee0b516ad1 100644 --- a/test/vanilla/low-level/Expected/AcceptanceTests/ModelFlatteningLowLevel/setup.py +++ b/test/vanilla/low-level/Expected/AcceptanceTests/ModelFlatteningLowLevel/setup.py @@ -6,31 +6,24 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- # coding: utf-8 - from setuptools import setup, find_packages -NAME = "autorestresourceflatteningtestservice" -VERSION = "0.1.0" - -# To install the library, run the following -# -# python setup.py install -# -# prerequisite: setuptools -# http://pypi.python.org/pypi/setuptools - -REQUIRES = ["msrest>=0.6.21", "azure-core<2.0.0,>=1.20.1"] +PACKAGE_NAME = "autorestresourceflatteningtestservice" +version = "0.1.0" setup( - name=NAME, - version=VERSION, + name=PACKAGE_NAME, + version=version, description="AutoRestResourceFlatteningTestService", author_email="", url="", - keywords=["Swagger", "AutoRestResourceFlatteningTestService"], - install_requires=REQUIRES, + keywords="azure, azure sdk", packages=find_packages(), include_package_data=True, + install_requires=[ + "msrest>=0.6.21", + "azure-core<2.0.0,>=1.20.1", + ], long_description="""\ Resource Flattening for AutoRest. """, diff --git a/test/vanilla/low-level/Expected/AcceptanceTests/MultipleInheritanceLowLevel/setup.py b/test/vanilla/low-level/Expected/AcceptanceTests/MultipleInheritanceLowLevel/setup.py index 5d90113dd65..ae12d33c3d8 100644 --- a/test/vanilla/low-level/Expected/AcceptanceTests/MultipleInheritanceLowLevel/setup.py +++ b/test/vanilla/low-level/Expected/AcceptanceTests/MultipleInheritanceLowLevel/setup.py @@ -6,31 +6,24 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- # coding: utf-8 - from setuptools import setup, find_packages -NAME = "multipleinheritanceserviceclient" -VERSION = "0.1.0" - -# To install the library, run the following -# -# python setup.py install -# -# prerequisite: setuptools -# http://pypi.python.org/pypi/setuptools - -REQUIRES = ["msrest>=0.6.21", "azure-core<2.0.0,>=1.20.1"] +PACKAGE_NAME = "multipleinheritanceserviceclient" +version = "0.1.0" setup( - name=NAME, - version=VERSION, + name=PACKAGE_NAME, + version=version, description="MultipleInheritanceServiceClient", author_email="", url="", - keywords=["Swagger", "MultipleInheritanceServiceClient"], - install_requires=REQUIRES, + keywords="azure, azure sdk", packages=find_packages(), include_package_data=True, + install_requires=[ + "msrest>=0.6.21", + "azure-core<2.0.0,>=1.20.1", + ], long_description="""\ Service client for multiinheritance client testing. """, diff --git a/test/vanilla/low-level/Expected/AcceptanceTests/NoOperationsLowLevel/setup.py b/test/vanilla/low-level/Expected/AcceptanceTests/NoOperationsLowLevel/setup.py index 66ffc7560f0..a504a451092 100644 --- a/test/vanilla/low-level/Expected/AcceptanceTests/NoOperationsLowLevel/setup.py +++ b/test/vanilla/low-level/Expected/AcceptanceTests/NoOperationsLowLevel/setup.py @@ -6,31 +6,24 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- # coding: utf-8 - from setuptools import setup, find_packages -NAME = "nooperationsserviceclient" -VERSION = "0.1.0" - -# To install the library, run the following -# -# python setup.py install -# -# prerequisite: setuptools -# http://pypi.python.org/pypi/setuptools - -REQUIRES = ["msrest>=0.6.21", "azure-core<2.0.0,>=1.20.1"] +PACKAGE_NAME = "nooperationsserviceclient" +version = "0.1.0" setup( - name=NAME, - version=VERSION, + name=PACKAGE_NAME, + version=version, description="NoOperationsServiceClient", author_email="", url="", - keywords=["Swagger", "NoOperationsServiceClient"], - install_requires=REQUIRES, + keywords="azure, azure sdk", packages=find_packages(), include_package_data=True, + install_requires=[ + "msrest>=0.6.21", + "azure-core<2.0.0,>=1.20.1", + ], long_description="""\ Service client with no operations. """, diff --git a/test/vanilla/low-level/Expected/AcceptanceTests/NonStringEnumsLowLevel/setup.py b/test/vanilla/low-level/Expected/AcceptanceTests/NonStringEnumsLowLevel/setup.py index 67f8f2e27c2..70074f28998 100644 --- a/test/vanilla/low-level/Expected/AcceptanceTests/NonStringEnumsLowLevel/setup.py +++ b/test/vanilla/low-level/Expected/AcceptanceTests/NonStringEnumsLowLevel/setup.py @@ -6,31 +6,24 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- # coding: utf-8 - from setuptools import setup, find_packages -NAME = "nonstringenumsclient" -VERSION = "0.1.0" - -# To install the library, run the following -# -# python setup.py install -# -# prerequisite: setuptools -# http://pypi.python.org/pypi/setuptools - -REQUIRES = ["msrest>=0.6.21", "azure-core<2.0.0,>=1.20.1"] +PACKAGE_NAME = "nonstringenumsclient" +version = "0.1.0" setup( - name=NAME, - version=VERSION, + name=PACKAGE_NAME, + version=version, description="NonStringEnumsClient", author_email="", url="", - keywords=["Swagger", "NonStringEnumsClient"], - install_requires=REQUIRES, + keywords="azure, azure sdk", packages=find_packages(), include_package_data=True, + install_requires=[ + "msrest>=0.6.21", + "azure-core<2.0.0,>=1.20.1", + ], long_description="""\ Testing non-string enums. """, diff --git a/test/vanilla/low-level/Expected/AcceptanceTests/ObjectTypeLowLevel/setup.py b/test/vanilla/low-level/Expected/AcceptanceTests/ObjectTypeLowLevel/setup.py index fae955ee4ad..117f87cfb34 100644 --- a/test/vanilla/low-level/Expected/AcceptanceTests/ObjectTypeLowLevel/setup.py +++ b/test/vanilla/low-level/Expected/AcceptanceTests/ObjectTypeLowLevel/setup.py @@ -6,31 +6,24 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- # coding: utf-8 - from setuptools import setup, find_packages -NAME = "objecttypeclient" -VERSION = "0.1.0" - -# To install the library, run the following -# -# python setup.py install -# -# prerequisite: setuptools -# http://pypi.python.org/pypi/setuptools - -REQUIRES = ["msrest>=0.6.21", "azure-core<2.0.0,>=1.20.1"] +PACKAGE_NAME = "objecttypeclient" +version = "0.1.0" setup( - name=NAME, - version=VERSION, + name=PACKAGE_NAME, + version=version, description="ObjectTypeClient", author_email="", url="", - keywords=["Swagger", "ObjectTypeClient"], - install_requires=REQUIRES, + keywords="azure, azure sdk", packages=find_packages(), include_package_data=True, + install_requires=[ + "msrest>=0.6.21", + "azure-core<2.0.0,>=1.20.1", + ], long_description="""\ Service client for testing basic type: object swaggers. """, diff --git a/test/vanilla/low-level/Expected/AcceptanceTests/ParameterFlatteningLowLevel/setup.py b/test/vanilla/low-level/Expected/AcceptanceTests/ParameterFlatteningLowLevel/setup.py index 5deb8606bc4..0613a67f61c 100644 --- a/test/vanilla/low-level/Expected/AcceptanceTests/ParameterFlatteningLowLevel/setup.py +++ b/test/vanilla/low-level/Expected/AcceptanceTests/ParameterFlatteningLowLevel/setup.py @@ -6,31 +6,24 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- # coding: utf-8 - from setuptools import setup, find_packages -NAME = "autorestparameterflattening" -VERSION = "0.1.0" - -# To install the library, run the following -# -# python setup.py install -# -# prerequisite: setuptools -# http://pypi.python.org/pypi/setuptools - -REQUIRES = ["msrest>=0.6.21", "azure-core<2.0.0,>=1.20.1"] +PACKAGE_NAME = "autorestparameterflattening" +version = "0.1.0" setup( - name=NAME, - version=VERSION, + name=PACKAGE_NAME, + version=version, description="AutoRestParameterFlattening", author_email="", url="", - keywords=["Swagger", "AutoRestParameterFlattening"], - install_requires=REQUIRES, + keywords="azure, azure sdk", packages=find_packages(), include_package_data=True, + install_requires=[ + "msrest>=0.6.21", + "azure-core<2.0.0,>=1.20.1", + ], long_description="""\ Resource Flattening for AutoRest. """, diff --git a/test/vanilla/low-level/Expected/AcceptanceTests/ParameterizedEndpointLowLevel/setup.py b/test/vanilla/low-level/Expected/AcceptanceTests/ParameterizedEndpointLowLevel/setup.py index b4cd6534537..e2721f41200 100644 --- a/test/vanilla/low-level/Expected/AcceptanceTests/ParameterizedEndpointLowLevel/setup.py +++ b/test/vanilla/low-level/Expected/AcceptanceTests/ParameterizedEndpointLowLevel/setup.py @@ -6,31 +6,24 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- # coding: utf-8 - from setuptools import setup, find_packages -NAME = "parmaterizedendpointclient" -VERSION = "0.1.0" - -# To install the library, run the following -# -# python setup.py install -# -# prerequisite: setuptools -# http://pypi.python.org/pypi/setuptools - -REQUIRES = ["msrest>=0.6.21", "azure-core<2.0.0,>=1.20.1"] +PACKAGE_NAME = "parmaterizedendpointclient" +version = "0.1.0" setup( - name=NAME, - version=VERSION, + name=PACKAGE_NAME, + version=version, description="ParmaterizedEndpointClient", author_email="", url="", - keywords=["Swagger", "ParmaterizedEndpointClient"], - install_requires=REQUIRES, + keywords="azure, azure sdk", packages=find_packages(), include_package_data=True, + install_requires=[ + "msrest>=0.6.21", + "azure-core<2.0.0,>=1.20.1", + ], long_description="""\ Service client for testing parameterized hosts with the name 'endpoint'. """, diff --git a/test/vanilla/low-level/Expected/AcceptanceTests/ReportLowLevel/setup.py b/test/vanilla/low-level/Expected/AcceptanceTests/ReportLowLevel/setup.py index 2f4459980ef..7f4cac78c72 100644 --- a/test/vanilla/low-level/Expected/AcceptanceTests/ReportLowLevel/setup.py +++ b/test/vanilla/low-level/Expected/AcceptanceTests/ReportLowLevel/setup.py @@ -6,31 +6,24 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- # coding: utf-8 - from setuptools import setup, find_packages -NAME = "autorestreportservice" -VERSION = "0.1.0" - -# To install the library, run the following -# -# python setup.py install -# -# prerequisite: setuptools -# http://pypi.python.org/pypi/setuptools - -REQUIRES = ["msrest>=0.6.21", "azure-core<2.0.0,>=1.20.1"] +PACKAGE_NAME = "autorestreportservice" +version = "0.1.0" setup( - name=NAME, - version=VERSION, + name=PACKAGE_NAME, + version=version, description="AutoRestReportService", author_email="", url="", - keywords=["Swagger", "AutoRestReportService"], - install_requires=REQUIRES, + keywords="azure, azure sdk", packages=find_packages(), include_package_data=True, + install_requires=[ + "msrest>=0.6.21", + "azure-core<2.0.0,>=1.20.1", + ], long_description="""\ Test Infrastructure for AutoRest. """, diff --git a/test/vanilla/low-level/Expected/AcceptanceTests/RequiredOptionalLowLevel/setup.py b/test/vanilla/low-level/Expected/AcceptanceTests/RequiredOptionalLowLevel/setup.py index b6d2db16006..d52335449db 100644 --- a/test/vanilla/low-level/Expected/AcceptanceTests/RequiredOptionalLowLevel/setup.py +++ b/test/vanilla/low-level/Expected/AcceptanceTests/RequiredOptionalLowLevel/setup.py @@ -6,31 +6,24 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- # coding: utf-8 - from setuptools import setup, find_packages -NAME = "autorestrequiredoptionaltestservice" -VERSION = "0.1.0" - -# To install the library, run the following -# -# python setup.py install -# -# prerequisite: setuptools -# http://pypi.python.org/pypi/setuptools - -REQUIRES = ["msrest>=0.6.21", "azure-core<2.0.0,>=1.20.1"] +PACKAGE_NAME = "autorestrequiredoptionaltestservice" +version = "0.1.0" setup( - name=NAME, - version=VERSION, + name=PACKAGE_NAME, + version=version, description="AutoRestRequiredOptionalTestService", author_email="", url="", - keywords=["Swagger", "AutoRestRequiredOptionalTestService"], - install_requires=REQUIRES, + keywords="azure, azure sdk", packages=find_packages(), include_package_data=True, + install_requires=[ + "msrest>=0.6.21", + "azure-core<2.0.0,>=1.20.1", + ], long_description="""\ Test Infrastructure for AutoRest. """, diff --git a/test/vanilla/low-level/Expected/AcceptanceTests/ReservedWordsLowLevel/setup.py b/test/vanilla/low-level/Expected/AcceptanceTests/ReservedWordsLowLevel/setup.py index 938b1069b30..d0c5fc4d616 100644 --- a/test/vanilla/low-level/Expected/AcceptanceTests/ReservedWordsLowLevel/setup.py +++ b/test/vanilla/low-level/Expected/AcceptanceTests/ReservedWordsLowLevel/setup.py @@ -6,31 +6,24 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- # coding: utf-8 - from setuptools import setup, find_packages -NAME = "reservedwordsclient" -VERSION = "0.1.0" - -# To install the library, run the following -# -# python setup.py install -# -# prerequisite: setuptools -# http://pypi.python.org/pypi/setuptools - -REQUIRES = ["msrest>=0.6.21", "azure-core<2.0.0,>=1.20.1"] +PACKAGE_NAME = "reservedwordsclient" +version = "0.1.0" setup( - name=NAME, - version=VERSION, + name=PACKAGE_NAME, + version=version, description="ReservedWordsClient", author_email="", url="", - keywords=["Swagger", "ReservedWordsClient"], - install_requires=REQUIRES, + keywords="azure, azure sdk", packages=find_packages(), include_package_data=True, + install_requires=[ + "msrest>=0.6.21", + "azure-core<2.0.0,>=1.20.1", + ], long_description="""\ Swagger that has operation groups etc. with reserved words. """, diff --git a/test/vanilla/low-level/Expected/AcceptanceTests/UrlLowLevel/setup.py b/test/vanilla/low-level/Expected/AcceptanceTests/UrlLowLevel/setup.py index 3eeeb1be90b..17c1895f399 100644 --- a/test/vanilla/low-level/Expected/AcceptanceTests/UrlLowLevel/setup.py +++ b/test/vanilla/low-level/Expected/AcceptanceTests/UrlLowLevel/setup.py @@ -6,31 +6,24 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- # coding: utf-8 - from setuptools import setup, find_packages -NAME = "autoresturltestservice" -VERSION = "0.1.0" - -# To install the library, run the following -# -# python setup.py install -# -# prerequisite: setuptools -# http://pypi.python.org/pypi/setuptools - -REQUIRES = ["msrest>=0.6.21", "azure-core<2.0.0,>=1.20.1"] +PACKAGE_NAME = "autoresturltestservice" +version = "0.1.0" setup( - name=NAME, - version=VERSION, + name=PACKAGE_NAME, + version=version, description="AutoRestUrlTestService", author_email="", url="", - keywords=["Swagger", "AutoRestUrlTestService"], - install_requires=REQUIRES, + keywords="azure, azure sdk", packages=find_packages(), include_package_data=True, + install_requires=[ + "msrest>=0.6.21", + "azure-core<2.0.0,>=1.20.1", + ], long_description="""\ Test Infrastructure for AutoRest. """, diff --git a/test/vanilla/low-level/Expected/AcceptanceTests/UrlMultiCollectionFormatLowLevel/setup.py b/test/vanilla/low-level/Expected/AcceptanceTests/UrlMultiCollectionFormatLowLevel/setup.py index 8c5a64d2402..9c792e881c7 100644 --- a/test/vanilla/low-level/Expected/AcceptanceTests/UrlMultiCollectionFormatLowLevel/setup.py +++ b/test/vanilla/low-level/Expected/AcceptanceTests/UrlMultiCollectionFormatLowLevel/setup.py @@ -6,31 +6,24 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- # coding: utf-8 - from setuptools import setup, find_packages -NAME = "autoresturlmutlicollectionformattestservice" -VERSION = "0.1.0" - -# To install the library, run the following -# -# python setup.py install -# -# prerequisite: setuptools -# http://pypi.python.org/pypi/setuptools - -REQUIRES = ["msrest>=0.6.21", "azure-core<2.0.0,>=1.20.1"] +PACKAGE_NAME = "autoresturlmutlicollectionformattestservice" +version = "0.1.0" setup( - name=NAME, - version=VERSION, + name=PACKAGE_NAME, + version=version, description="AutoRestUrlMutliCollectionFormatTestService", author_email="", url="", - keywords=["Swagger", "AutoRestUrlMutliCollectionFormatTestService"], - install_requires=REQUIRES, + keywords="azure, azure sdk", packages=find_packages(), include_package_data=True, + install_requires=[ + "msrest>=0.6.21", + "azure-core<2.0.0,>=1.20.1", + ], long_description="""\ Test Infrastructure for AutoRest. """, diff --git a/test/vanilla/low-level/Expected/AcceptanceTests/ValidationLowLevel/setup.py b/test/vanilla/low-level/Expected/AcceptanceTests/ValidationLowLevel/setup.py index 1ec830f56e0..2801e49bc6c 100644 --- a/test/vanilla/low-level/Expected/AcceptanceTests/ValidationLowLevel/setup.py +++ b/test/vanilla/low-level/Expected/AcceptanceTests/ValidationLowLevel/setup.py @@ -6,31 +6,24 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- # coding: utf-8 - from setuptools import setup, find_packages -NAME = "autorestvalidationtest" -VERSION = "0.1.0" - -# To install the library, run the following -# -# python setup.py install -# -# prerequisite: setuptools -# http://pypi.python.org/pypi/setuptools - -REQUIRES = ["msrest>=0.6.21", "azure-core<2.0.0,>=1.20.1"] +PACKAGE_NAME = "autorestvalidationtest" +version = "0.1.0" setup( - name=NAME, - version=VERSION, + name=PACKAGE_NAME, + version=version, description="AutoRestValidationTest", author_email="", url="", - keywords=["Swagger", "AutoRestValidationTest"], - install_requires=REQUIRES, + keywords="azure, azure sdk", packages=find_packages(), include_package_data=True, + install_requires=[ + "msrest>=0.6.21", + "azure-core<2.0.0,>=1.20.1", + ], long_description="""\ Test Infrastructure for AutoRest. No server backend exists for these tests. """, diff --git a/test/vanilla/low-level/Expected/AcceptanceTests/XmlLowLevel/setup.py b/test/vanilla/low-level/Expected/AcceptanceTests/XmlLowLevel/setup.py index 08f2e587366..7238c01d719 100644 --- a/test/vanilla/low-level/Expected/AcceptanceTests/XmlLowLevel/setup.py +++ b/test/vanilla/low-level/Expected/AcceptanceTests/XmlLowLevel/setup.py @@ -6,31 +6,24 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- # coding: utf-8 - from setuptools import setup, find_packages -NAME = "autorestswaggerbatxmlservice" -VERSION = "0.1.0" - -# To install the library, run the following -# -# python setup.py install -# -# prerequisite: setuptools -# http://pypi.python.org/pypi/setuptools - -REQUIRES = ["msrest>=0.6.21", "azure-core<2.0.0,>=1.20.1"] +PACKAGE_NAME = "autorestswaggerbatxmlservice" +version = "0.1.0" setup( - name=NAME, - version=VERSION, + name=PACKAGE_NAME, + version=version, description="AutoRestSwaggerBATXMLService", author_email="", url="", - keywords=["Swagger", "AutoRestSwaggerBATXMLService"], - install_requires=REQUIRES, + keywords="azure, azure sdk", packages=find_packages(), include_package_data=True, + install_requires=[ + "msrest>=0.6.21", + "azure-core<2.0.0,>=1.20.1", + ], long_description="""\ Test Infrastructure for AutoRest Swagger BAT. """, diff --git a/test/vanilla/low-level/Expected/AcceptanceTests/XmsErrorResponseLowLevel/setup.py b/test/vanilla/low-level/Expected/AcceptanceTests/XmsErrorResponseLowLevel/setup.py index ffc32bf4893..55bf2961b26 100644 --- a/test/vanilla/low-level/Expected/AcceptanceTests/XmsErrorResponseLowLevel/setup.py +++ b/test/vanilla/low-level/Expected/AcceptanceTests/XmsErrorResponseLowLevel/setup.py @@ -6,31 +6,24 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- # coding: utf-8 - from setuptools import setup, find_packages -NAME = "xmserrorresponseextensions" -VERSION = "0.1.0" - -# To install the library, run the following -# -# python setup.py install -# -# prerequisite: setuptools -# http://pypi.python.org/pypi/setuptools - -REQUIRES = ["msrest>=0.6.21", "azure-core<2.0.0,>=1.20.1"] +PACKAGE_NAME = "xmserrorresponseextensions" +version = "0.1.0" setup( - name=NAME, - version=VERSION, + name=PACKAGE_NAME, + version=version, description="XMSErrorResponseExtensions", author_email="", url="", - keywords=["Swagger", "XMSErrorResponseExtensions"], - install_requires=REQUIRES, + keywords="azure, azure sdk", packages=find_packages(), include_package_data=True, + install_requires=[ + "msrest>=0.6.21", + "azure-core<2.0.0,>=1.20.1", + ], long_description="""\ XMS Error Response Extensions. """, diff --git a/test/vanilla/version-tolerant/Expected/AcceptanceTests/AdditionalPropertiesVersionTolerant/setup.py b/test/vanilla/version-tolerant/Expected/AcceptanceTests/AdditionalPropertiesVersionTolerant/setup.py index afc03668fe3..6c18a93049f 100644 --- a/test/vanilla/version-tolerant/Expected/AcceptanceTests/AdditionalPropertiesVersionTolerant/setup.py +++ b/test/vanilla/version-tolerant/Expected/AcceptanceTests/AdditionalPropertiesVersionTolerant/setup.py @@ -6,31 +6,24 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- # coding: utf-8 - from setuptools import setup, find_packages -NAME = "additionalpropertiesclient" -VERSION = "0.1.0" - -# To install the library, run the following -# -# python setup.py install -# -# prerequisite: setuptools -# http://pypi.python.org/pypi/setuptools - -REQUIRES = ["msrest>=0.6.21", "azure-core<2.0.0,>=1.20.1"] +PACKAGE_NAME = "additionalpropertiesclient" +version = "0.1.0" setup( - name=NAME, - version=VERSION, + name=PACKAGE_NAME, + version=version, description="AdditionalPropertiesClient", author_email="", url="", - keywords=["Swagger", "AdditionalPropertiesClient"], - install_requires=REQUIRES, + keywords="azure, azure sdk", packages=find_packages(), include_package_data=True, + install_requires=[ + "msrest>=0.6.21", + "azure-core<2.0.0,>=1.20.1", + ], long_description="""\ Test Infrastructure for AutoRest. """, diff --git a/test/vanilla/version-tolerant/Expected/AcceptanceTests/AnythingVersionTolerant/setup.py b/test/vanilla/version-tolerant/Expected/AcceptanceTests/AnythingVersionTolerant/setup.py index 5983ebe0fb1..49bbca492ca 100644 --- a/test/vanilla/version-tolerant/Expected/AcceptanceTests/AnythingVersionTolerant/setup.py +++ b/test/vanilla/version-tolerant/Expected/AcceptanceTests/AnythingVersionTolerant/setup.py @@ -6,31 +6,24 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- # coding: utf-8 - from setuptools import setup, find_packages -NAME = "anythingclient" -VERSION = "0.1.0" - -# To install the library, run the following -# -# python setup.py install -# -# prerequisite: setuptools -# http://pypi.python.org/pypi/setuptools - -REQUIRES = ["msrest>=0.6.21", "azure-core<2.0.0,>=1.20.1"] +PACKAGE_NAME = "anythingclient" +version = "0.1.0" setup( - name=NAME, - version=VERSION, + name=PACKAGE_NAME, + version=version, description="AnythingClient", author_email="", url="", - keywords=["Swagger", "AnythingClient"], - install_requires=REQUIRES, + keywords="azure, azure sdk", packages=find_packages(), include_package_data=True, + install_requires=[ + "msrest>=0.6.21", + "azure-core<2.0.0,>=1.20.1", + ], long_description="""\ Service client for testing basic anything types. Those schemas without types can be anything: primitive, object, array. """, diff --git a/test/vanilla/version-tolerant/Expected/AcceptanceTests/BodyArrayVersionTolerant/setup.py b/test/vanilla/version-tolerant/Expected/AcceptanceTests/BodyArrayVersionTolerant/setup.py index 877b4dde4a8..b4496bedec9 100644 --- a/test/vanilla/version-tolerant/Expected/AcceptanceTests/BodyArrayVersionTolerant/setup.py +++ b/test/vanilla/version-tolerant/Expected/AcceptanceTests/BodyArrayVersionTolerant/setup.py @@ -6,31 +6,24 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- # coding: utf-8 - from setuptools import setup, find_packages -NAME = "autorestswaggerbatarrayservice" -VERSION = "0.1.0" - -# To install the library, run the following -# -# python setup.py install -# -# prerequisite: setuptools -# http://pypi.python.org/pypi/setuptools - -REQUIRES = ["msrest>=0.6.21", "azure-core<2.0.0,>=1.20.1"] +PACKAGE_NAME = "autorestswaggerbatarrayservice" +version = "0.1.0" setup( - name=NAME, - version=VERSION, + name=PACKAGE_NAME, + version=version, description="AutoRestSwaggerBATArrayService", author_email="", url="", - keywords=["Swagger", "AutoRestSwaggerBATArrayService"], - install_requires=REQUIRES, + keywords="azure, azure sdk", packages=find_packages(), include_package_data=True, + install_requires=[ + "msrest>=0.6.21", + "azure-core<2.0.0,>=1.20.1", + ], long_description="""\ Test Infrastructure for AutoRest Swagger BAT. """, diff --git a/test/vanilla/version-tolerant/Expected/AcceptanceTests/BodyBinaryVersionTolerant/setup.py b/test/vanilla/version-tolerant/Expected/AcceptanceTests/BodyBinaryVersionTolerant/setup.py index 772307d83f9..b6f3411b4bb 100644 --- a/test/vanilla/version-tolerant/Expected/AcceptanceTests/BodyBinaryVersionTolerant/setup.py +++ b/test/vanilla/version-tolerant/Expected/AcceptanceTests/BodyBinaryVersionTolerant/setup.py @@ -6,31 +6,24 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- # coding: utf-8 - from setuptools import setup, find_packages -NAME = "binarywithcontenttypeapplicationjson" -VERSION = "0.1.0" - -# To install the library, run the following -# -# python setup.py install -# -# prerequisite: setuptools -# http://pypi.python.org/pypi/setuptools - -REQUIRES = ["msrest>=0.6.21", "azure-core<2.0.0,>=1.20.1"] +PACKAGE_NAME = "binarywithcontenttypeapplicationjson" +version = "0.1.0" setup( - name=NAME, - version=VERSION, + name=PACKAGE_NAME, + version=version, description="BinaryWithContentTypeApplicationJson", author_email="", url="", - keywords=["Swagger", "BinaryWithContentTypeApplicationJson"], - install_requires=REQUIRES, + keywords="azure, azure sdk", packages=find_packages(), include_package_data=True, + install_requires=[ + "msrest>=0.6.21", + "azure-core<2.0.0,>=1.20.1", + ], long_description="""\ Sample for file with json and binary content type. """, diff --git a/test/vanilla/version-tolerant/Expected/AcceptanceTests/BodyBooleanVersionTolerant/setup.py b/test/vanilla/version-tolerant/Expected/AcceptanceTests/BodyBooleanVersionTolerant/setup.py index 374eaef7983..c202e9c623a 100644 --- a/test/vanilla/version-tolerant/Expected/AcceptanceTests/BodyBooleanVersionTolerant/setup.py +++ b/test/vanilla/version-tolerant/Expected/AcceptanceTests/BodyBooleanVersionTolerant/setup.py @@ -6,31 +6,24 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- # coding: utf-8 - from setuptools import setup, find_packages -NAME = "autorestbooltestservice" -VERSION = "0.1.0" - -# To install the library, run the following -# -# python setup.py install -# -# prerequisite: setuptools -# http://pypi.python.org/pypi/setuptools - -REQUIRES = ["msrest>=0.6.21", "azure-core<2.0.0,>=1.20.1"] +PACKAGE_NAME = "autorestbooltestservice" +version = "0.1.0" setup( - name=NAME, - version=VERSION, + name=PACKAGE_NAME, + version=version, description="AutoRestBoolTestService", author_email="", url="", - keywords=["Swagger", "AutoRestBoolTestService"], - install_requires=REQUIRES, + keywords="azure, azure sdk", packages=find_packages(), include_package_data=True, + install_requires=[ + "msrest>=0.6.21", + "azure-core<2.0.0,>=1.20.1", + ], long_description="""\ Test Infrastructure for AutoRest. """, diff --git a/test/vanilla/version-tolerant/Expected/AcceptanceTests/BodyByteVersionTolerant/setup.py b/test/vanilla/version-tolerant/Expected/AcceptanceTests/BodyByteVersionTolerant/setup.py index 158f73d896a..d1f5e471d62 100644 --- a/test/vanilla/version-tolerant/Expected/AcceptanceTests/BodyByteVersionTolerant/setup.py +++ b/test/vanilla/version-tolerant/Expected/AcceptanceTests/BodyByteVersionTolerant/setup.py @@ -6,31 +6,24 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- # coding: utf-8 - from setuptools import setup, find_packages -NAME = "autorestswaggerbatbyteservice" -VERSION = "0.1.0" - -# To install the library, run the following -# -# python setup.py install -# -# prerequisite: setuptools -# http://pypi.python.org/pypi/setuptools - -REQUIRES = ["msrest>=0.6.21", "azure-core<2.0.0,>=1.20.1"] +PACKAGE_NAME = "autorestswaggerbatbyteservice" +version = "0.1.0" setup( - name=NAME, - version=VERSION, + name=PACKAGE_NAME, + version=version, description="AutoRestSwaggerBATByteService", author_email="", url="", - keywords=["Swagger", "AutoRestSwaggerBATByteService"], - install_requires=REQUIRES, + keywords="azure, azure sdk", packages=find_packages(), include_package_data=True, + install_requires=[ + "msrest>=0.6.21", + "azure-core<2.0.0,>=1.20.1", + ], long_description="""\ Test Infrastructure for AutoRest Swagger BAT. """, diff --git a/test/vanilla/version-tolerant/Expected/AcceptanceTests/BodyComplexPythonThreeOnlyVersionTolerant/setup.py b/test/vanilla/version-tolerant/Expected/AcceptanceTests/BodyComplexPythonThreeOnlyVersionTolerant/setup.py index a7ccffb7a49..8792e543b11 100644 --- a/test/vanilla/version-tolerant/Expected/AcceptanceTests/BodyComplexPythonThreeOnlyVersionTolerant/setup.py +++ b/test/vanilla/version-tolerant/Expected/AcceptanceTests/BodyComplexPythonThreeOnlyVersionTolerant/setup.py @@ -6,31 +6,24 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- # coding: utf-8 - from setuptools import setup, find_packages -NAME = "bodycomplexpython3only" -VERSION = "0.1.0" - -# To install the library, run the following -# -# python setup.py install -# -# prerequisite: setuptools -# http://pypi.python.org/pypi/setuptools - -REQUIRES = ["msrest>=0.6.21", "azure-core<2.0.0,>=1.20.1"] +PACKAGE_NAME = "bodycomplexpython3only" +version = "0.1.0" setup( - name=NAME, - version=VERSION, + name=PACKAGE_NAME, + version=version, description="bodycomplexpython3only", author_email="", url="", - keywords=["Swagger", "AutoRestComplexTestService"], - install_requires=REQUIRES, + keywords="azure, azure sdk", packages=find_packages(), include_package_data=True, + install_requires=[ + "msrest>=0.6.21", + "azure-core<2.0.0,>=1.20.1", + ], long_description="""\ Test Infrastructure for AutoRest. """, diff --git a/test/vanilla/version-tolerant/Expected/AcceptanceTests/BodyComplexVersionTolerant/setup.py b/test/vanilla/version-tolerant/Expected/AcceptanceTests/BodyComplexVersionTolerant/setup.py index ea77baa0fb5..9d4ebd2b05f 100644 --- a/test/vanilla/version-tolerant/Expected/AcceptanceTests/BodyComplexVersionTolerant/setup.py +++ b/test/vanilla/version-tolerant/Expected/AcceptanceTests/BodyComplexVersionTolerant/setup.py @@ -6,31 +6,24 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- # coding: utf-8 - from setuptools import setup, find_packages -NAME = "autorestcomplextestservice" -VERSION = "0.1.0" - -# To install the library, run the following -# -# python setup.py install -# -# prerequisite: setuptools -# http://pypi.python.org/pypi/setuptools - -REQUIRES = ["msrest>=0.6.21", "azure-core<2.0.0,>=1.20.1"] +PACKAGE_NAME = "autorestcomplextestservice" +version = "0.1.0" setup( - name=NAME, - version=VERSION, + name=PACKAGE_NAME, + version=version, description="AutoRestComplexTestService", author_email="", url="", - keywords=["Swagger", "AutoRestComplexTestService"], - install_requires=REQUIRES, + keywords="azure, azure sdk", packages=find_packages(), include_package_data=True, + install_requires=[ + "msrest>=0.6.21", + "azure-core<2.0.0,>=1.20.1", + ], long_description="""\ Test Infrastructure for AutoRest. """, diff --git a/test/vanilla/version-tolerant/Expected/AcceptanceTests/BodyDateTimeRfc1123VersionTolerant/setup.py b/test/vanilla/version-tolerant/Expected/AcceptanceTests/BodyDateTimeRfc1123VersionTolerant/setup.py index 8c0de0f8c73..85bb56c5ead 100644 --- a/test/vanilla/version-tolerant/Expected/AcceptanceTests/BodyDateTimeRfc1123VersionTolerant/setup.py +++ b/test/vanilla/version-tolerant/Expected/AcceptanceTests/BodyDateTimeRfc1123VersionTolerant/setup.py @@ -6,31 +6,24 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- # coding: utf-8 - from setuptools import setup, find_packages -NAME = "autorestrfc1123datetimetestservice" -VERSION = "0.1.0" - -# To install the library, run the following -# -# python setup.py install -# -# prerequisite: setuptools -# http://pypi.python.org/pypi/setuptools - -REQUIRES = ["msrest>=0.6.21", "azure-core<2.0.0,>=1.20.1"] +PACKAGE_NAME = "autorestrfc1123datetimetestservice" +version = "0.1.0" setup( - name=NAME, - version=VERSION, + name=PACKAGE_NAME, + version=version, description="AutoRestRFC1123DateTimeTestService", author_email="", url="", - keywords=["Swagger", "AutoRestRFC1123DateTimeTestService"], - install_requires=REQUIRES, + keywords="azure, azure sdk", packages=find_packages(), include_package_data=True, + install_requires=[ + "msrest>=0.6.21", + "azure-core<2.0.0,>=1.20.1", + ], long_description="""\ Test Infrastructure for AutoRest. """, diff --git a/test/vanilla/version-tolerant/Expected/AcceptanceTests/BodyDateTimeVersionTolerant/setup.py b/test/vanilla/version-tolerant/Expected/AcceptanceTests/BodyDateTimeVersionTolerant/setup.py index e3def2be286..c43819edbde 100644 --- a/test/vanilla/version-tolerant/Expected/AcceptanceTests/BodyDateTimeVersionTolerant/setup.py +++ b/test/vanilla/version-tolerant/Expected/AcceptanceTests/BodyDateTimeVersionTolerant/setup.py @@ -6,31 +6,24 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- # coding: utf-8 - from setuptools import setup, find_packages -NAME = "autorestdatetimetestservice" -VERSION = "0.1.0" - -# To install the library, run the following -# -# python setup.py install -# -# prerequisite: setuptools -# http://pypi.python.org/pypi/setuptools - -REQUIRES = ["msrest>=0.6.21", "azure-core<2.0.0,>=1.20.1"] +PACKAGE_NAME = "autorestdatetimetestservice" +version = "0.1.0" setup( - name=NAME, - version=VERSION, + name=PACKAGE_NAME, + version=version, description="AutoRestDateTimeTestService", author_email="", url="", - keywords=["Swagger", "AutoRestDateTimeTestService"], - install_requires=REQUIRES, + keywords="azure, azure sdk", packages=find_packages(), include_package_data=True, + install_requires=[ + "msrest>=0.6.21", + "azure-core<2.0.0,>=1.20.1", + ], long_description="""\ Test Infrastructure for AutoRest. """, diff --git a/test/vanilla/version-tolerant/Expected/AcceptanceTests/BodyDateVersionTolerant/setup.py b/test/vanilla/version-tolerant/Expected/AcceptanceTests/BodyDateVersionTolerant/setup.py index 1b7756a102f..46a4f0de64f 100644 --- a/test/vanilla/version-tolerant/Expected/AcceptanceTests/BodyDateVersionTolerant/setup.py +++ b/test/vanilla/version-tolerant/Expected/AcceptanceTests/BodyDateVersionTolerant/setup.py @@ -6,31 +6,24 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- # coding: utf-8 - from setuptools import setup, find_packages -NAME = "autorestdatetestservice" -VERSION = "0.1.0" - -# To install the library, run the following -# -# python setup.py install -# -# prerequisite: setuptools -# http://pypi.python.org/pypi/setuptools - -REQUIRES = ["msrest>=0.6.21", "azure-core<2.0.0,>=1.20.1"] +PACKAGE_NAME = "autorestdatetestservice" +version = "0.1.0" setup( - name=NAME, - version=VERSION, + name=PACKAGE_NAME, + version=version, description="AutoRestDateTestService", author_email="", url="", - keywords=["Swagger", "AutoRestDateTestService"], - install_requires=REQUIRES, + keywords="azure, azure sdk", packages=find_packages(), include_package_data=True, + install_requires=[ + "msrest>=0.6.21", + "azure-core<2.0.0,>=1.20.1", + ], long_description="""\ Test Infrastructure for AutoRest. """, diff --git a/test/vanilla/version-tolerant/Expected/AcceptanceTests/BodyDictionaryVersionTolerant/setup.py b/test/vanilla/version-tolerant/Expected/AcceptanceTests/BodyDictionaryVersionTolerant/setup.py index 17faa081a7f..33c4b91e927 100644 --- a/test/vanilla/version-tolerant/Expected/AcceptanceTests/BodyDictionaryVersionTolerant/setup.py +++ b/test/vanilla/version-tolerant/Expected/AcceptanceTests/BodyDictionaryVersionTolerant/setup.py @@ -6,31 +6,24 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- # coding: utf-8 - from setuptools import setup, find_packages -NAME = "autorestswaggerbatdictionaryservice" -VERSION = "0.1.0" - -# To install the library, run the following -# -# python setup.py install -# -# prerequisite: setuptools -# http://pypi.python.org/pypi/setuptools - -REQUIRES = ["msrest>=0.6.21", "azure-core<2.0.0,>=1.20.1"] +PACKAGE_NAME = "autorestswaggerbatdictionaryservice" +version = "0.1.0" setup( - name=NAME, - version=VERSION, + name=PACKAGE_NAME, + version=version, description="AutoRestSwaggerBATDictionaryService", author_email="", url="", - keywords=["Swagger", "AutoRestSwaggerBATDictionaryService"], - install_requires=REQUIRES, + keywords="azure, azure sdk", packages=find_packages(), include_package_data=True, + install_requires=[ + "msrest>=0.6.21", + "azure-core<2.0.0,>=1.20.1", + ], long_description="""\ Test Infrastructure for AutoRest Swagger BAT. """, diff --git a/test/vanilla/version-tolerant/Expected/AcceptanceTests/BodyDurationVersionTolerant/setup.py b/test/vanilla/version-tolerant/Expected/AcceptanceTests/BodyDurationVersionTolerant/setup.py index 385afe6573c..6ecee859197 100644 --- a/test/vanilla/version-tolerant/Expected/AcceptanceTests/BodyDurationVersionTolerant/setup.py +++ b/test/vanilla/version-tolerant/Expected/AcceptanceTests/BodyDurationVersionTolerant/setup.py @@ -6,31 +6,24 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- # coding: utf-8 - from setuptools import setup, find_packages -NAME = "autorestdurationtestservice" -VERSION = "0.1.0" - -# To install the library, run the following -# -# python setup.py install -# -# prerequisite: setuptools -# http://pypi.python.org/pypi/setuptools - -REQUIRES = ["msrest>=0.6.21", "azure-core<2.0.0,>=1.20.1"] +PACKAGE_NAME = "autorestdurationtestservice" +version = "0.1.0" setup( - name=NAME, - version=VERSION, + name=PACKAGE_NAME, + version=version, description="AutoRestDurationTestService", author_email="", url="", - keywords=["Swagger", "AutoRestDurationTestService"], - install_requires=REQUIRES, + keywords="azure, azure sdk", packages=find_packages(), include_package_data=True, + install_requires=[ + "msrest>=0.6.21", + "azure-core<2.0.0,>=1.20.1", + ], long_description="""\ Test Infrastructure for AutoRest. """, diff --git a/test/vanilla/version-tolerant/Expected/AcceptanceTests/BodyFileVersionTolerant/setup.py b/test/vanilla/version-tolerant/Expected/AcceptanceTests/BodyFileVersionTolerant/setup.py index da0628aad71..4bc17cee69e 100644 --- a/test/vanilla/version-tolerant/Expected/AcceptanceTests/BodyFileVersionTolerant/setup.py +++ b/test/vanilla/version-tolerant/Expected/AcceptanceTests/BodyFileVersionTolerant/setup.py @@ -6,31 +6,24 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- # coding: utf-8 - from setuptools import setup, find_packages -NAME = "autorestswaggerbatfileservice" -VERSION = "0.1.0" - -# To install the library, run the following -# -# python setup.py install -# -# prerequisite: setuptools -# http://pypi.python.org/pypi/setuptools - -REQUIRES = ["msrest>=0.6.21", "azure-core<2.0.0,>=1.20.1"] +PACKAGE_NAME = "autorestswaggerbatfileservice" +version = "0.1.0" setup( - name=NAME, - version=VERSION, + name=PACKAGE_NAME, + version=version, description="AutoRestSwaggerBATFileService", author_email="", url="", - keywords=["Swagger", "AutoRestSwaggerBATFileService"], - install_requires=REQUIRES, + keywords="azure, azure sdk", packages=find_packages(), include_package_data=True, + install_requires=[ + "msrest>=0.6.21", + "azure-core<2.0.0,>=1.20.1", + ], long_description="""\ Test Infrastructure for AutoRest Swagger BAT. """, diff --git a/test/vanilla/version-tolerant/Expected/AcceptanceTests/BodyFormDataVersionTolerant/setup.py b/test/vanilla/version-tolerant/Expected/AcceptanceTests/BodyFormDataVersionTolerant/setup.py index b9c8a22987e..9631b836c87 100644 --- a/test/vanilla/version-tolerant/Expected/AcceptanceTests/BodyFormDataVersionTolerant/setup.py +++ b/test/vanilla/version-tolerant/Expected/AcceptanceTests/BodyFormDataVersionTolerant/setup.py @@ -6,31 +6,24 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- # coding: utf-8 - from setuptools import setup, find_packages -NAME = "autorestswaggerbatformdataservice" -VERSION = "0.1.0" - -# To install the library, run the following -# -# python setup.py install -# -# prerequisite: setuptools -# http://pypi.python.org/pypi/setuptools - -REQUIRES = ["msrest>=0.6.21", "azure-core<2.0.0,>=1.20.1"] +PACKAGE_NAME = "autorestswaggerbatformdataservice" +version = "0.1.0" setup( - name=NAME, - version=VERSION, + name=PACKAGE_NAME, + version=version, description="AutoRestSwaggerBATFormDataService", author_email="", url="", - keywords=["Swagger", "AutoRestSwaggerBATFormDataService"], - install_requires=REQUIRES, + keywords="azure, azure sdk", packages=find_packages(), include_package_data=True, + install_requires=[ + "msrest>=0.6.21", + "azure-core<2.0.0,>=1.20.1", + ], long_description="""\ Test Infrastructure for AutoRest Swagger BAT. """, diff --git a/test/vanilla/version-tolerant/Expected/AcceptanceTests/BodyFormUrlEncodedDataVersionTolerant/setup.py b/test/vanilla/version-tolerant/Expected/AcceptanceTests/BodyFormUrlEncodedDataVersionTolerant/setup.py index 865983fb584..d436bbb30c8 100644 --- a/test/vanilla/version-tolerant/Expected/AcceptanceTests/BodyFormUrlEncodedDataVersionTolerant/setup.py +++ b/test/vanilla/version-tolerant/Expected/AcceptanceTests/BodyFormUrlEncodedDataVersionTolerant/setup.py @@ -6,31 +6,24 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- # coding: utf-8 - from setuptools import setup, find_packages -NAME = "bodyformsdataurlencoded" -VERSION = "0.1.0" - -# To install the library, run the following -# -# python setup.py install -# -# prerequisite: setuptools -# http://pypi.python.org/pypi/setuptools - -REQUIRES = ["msrest>=0.6.21", "azure-core<2.0.0,>=1.20.1"] +PACKAGE_NAME = "bodyformsdataurlencoded" +version = "0.1.0" setup( - name=NAME, - version=VERSION, + name=PACKAGE_NAME, + version=version, description="BodyFormsDataURLEncoded", author_email="", url="", - keywords=["Swagger", "BodyFormsDataURLEncoded"], - install_requires=REQUIRES, + keywords="azure, azure sdk", packages=find_packages(), include_package_data=True, + install_requires=[ + "msrest>=0.6.21", + "azure-core<2.0.0,>=1.20.1", + ], long_description="""\ Test Infrastructure for AutoRest Swagger BAT. """, diff --git a/test/vanilla/version-tolerant/Expected/AcceptanceTests/BodyIntegerVersionTolerant/setup.py b/test/vanilla/version-tolerant/Expected/AcceptanceTests/BodyIntegerVersionTolerant/setup.py index bcd0dece55b..771458fa5a5 100644 --- a/test/vanilla/version-tolerant/Expected/AcceptanceTests/BodyIntegerVersionTolerant/setup.py +++ b/test/vanilla/version-tolerant/Expected/AcceptanceTests/BodyIntegerVersionTolerant/setup.py @@ -6,31 +6,24 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- # coding: utf-8 - from setuptools import setup, find_packages -NAME = "autorestintegertestservice" -VERSION = "0.1.0" - -# To install the library, run the following -# -# python setup.py install -# -# prerequisite: setuptools -# http://pypi.python.org/pypi/setuptools - -REQUIRES = ["msrest>=0.6.21", "azure-core<2.0.0,>=1.20.1"] +PACKAGE_NAME = "autorestintegertestservice" +version = "0.1.0" setup( - name=NAME, - version=VERSION, + name=PACKAGE_NAME, + version=version, description="AutoRestIntegerTestService", author_email="", url="", - keywords=["Swagger", "AutoRestIntegerTestService"], - install_requires=REQUIRES, + keywords="azure, azure sdk", packages=find_packages(), include_package_data=True, + install_requires=[ + "msrest>=0.6.21", + "azure-core<2.0.0,>=1.20.1", + ], long_description="""\ Test Infrastructure for AutoRest. """, diff --git a/test/vanilla/version-tolerant/Expected/AcceptanceTests/BodyNumberVersionTolerant/setup.py b/test/vanilla/version-tolerant/Expected/AcceptanceTests/BodyNumberVersionTolerant/setup.py index f2c282a12aa..8a60500f42f 100644 --- a/test/vanilla/version-tolerant/Expected/AcceptanceTests/BodyNumberVersionTolerant/setup.py +++ b/test/vanilla/version-tolerant/Expected/AcceptanceTests/BodyNumberVersionTolerant/setup.py @@ -6,31 +6,24 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- # coding: utf-8 - from setuptools import setup, find_packages -NAME = "autorestnumbertestservice" -VERSION = "0.1.0" - -# To install the library, run the following -# -# python setup.py install -# -# prerequisite: setuptools -# http://pypi.python.org/pypi/setuptools - -REQUIRES = ["msrest>=0.6.21", "azure-core<2.0.0,>=1.20.1"] +PACKAGE_NAME = "autorestnumbertestservice" +version = "0.1.0" setup( - name=NAME, - version=VERSION, + name=PACKAGE_NAME, + version=version, description="AutoRestNumberTestService", author_email="", url="", - keywords=["Swagger", "AutoRestNumberTestService"], - install_requires=REQUIRES, + keywords="azure, azure sdk", packages=find_packages(), include_package_data=True, + install_requires=[ + "msrest>=0.6.21", + "azure-core<2.0.0,>=1.20.1", + ], long_description="""\ Test Infrastructure for AutoRest. """, diff --git a/test/vanilla/version-tolerant/Expected/AcceptanceTests/BodyStringVersionTolerant/setup.py b/test/vanilla/version-tolerant/Expected/AcceptanceTests/BodyStringVersionTolerant/setup.py index f9bbe0b13fa..e64e4344057 100644 --- a/test/vanilla/version-tolerant/Expected/AcceptanceTests/BodyStringVersionTolerant/setup.py +++ b/test/vanilla/version-tolerant/Expected/AcceptanceTests/BodyStringVersionTolerant/setup.py @@ -6,31 +6,24 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- # coding: utf-8 - from setuptools import setup, find_packages -NAME = "autorestswaggerbatservice" -VERSION = "0.1.0" - -# To install the library, run the following -# -# python setup.py install -# -# prerequisite: setuptools -# http://pypi.python.org/pypi/setuptools - -REQUIRES = ["msrest>=0.6.21", "azure-core<2.0.0,>=1.20.1"] +PACKAGE_NAME = "autorestswaggerbatservice" +version = "0.1.0" setup( - name=NAME, - version=VERSION, + name=PACKAGE_NAME, + version=version, description="AutoRestSwaggerBATService", author_email="", url="", - keywords=["Swagger", "AutoRestSwaggerBATService"], - install_requires=REQUIRES, + keywords="azure, azure sdk", packages=find_packages(), include_package_data=True, + install_requires=[ + "msrest>=0.6.21", + "azure-core<2.0.0,>=1.20.1", + ], long_description="""\ Test Infrastructure for AutoRest Swagger BAT. """, diff --git a/test/vanilla/version-tolerant/Expected/AcceptanceTests/BodyTimeVersionTolerant/setup.py b/test/vanilla/version-tolerant/Expected/AcceptanceTests/BodyTimeVersionTolerant/setup.py index 4c61b19cc21..c9653994d04 100644 --- a/test/vanilla/version-tolerant/Expected/AcceptanceTests/BodyTimeVersionTolerant/setup.py +++ b/test/vanilla/version-tolerant/Expected/AcceptanceTests/BodyTimeVersionTolerant/setup.py @@ -6,31 +6,24 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- # coding: utf-8 - from setuptools import setup, find_packages -NAME = "autoresttimetestservice" -VERSION = "0.1.0" - -# To install the library, run the following -# -# python setup.py install -# -# prerequisite: setuptools -# http://pypi.python.org/pypi/setuptools - -REQUIRES = ["msrest>=0.6.21", "azure-core<2.0.0,>=1.20.1"] +PACKAGE_NAME = "autoresttimetestservice" +version = "0.1.0" setup( - name=NAME, - version=VERSION, + name=PACKAGE_NAME, + version=version, description="AutoRestTimeTestService", author_email="", url="", - keywords=["Swagger", "AutoRestTimeTestService"], - install_requires=REQUIRES, + keywords="azure, azure sdk", packages=find_packages(), include_package_data=True, + install_requires=[ + "msrest>=0.6.21", + "azure-core<2.0.0,>=1.20.1", + ], long_description="""\ Test Infrastructure for AutoRest. """, diff --git a/test/vanilla/version-tolerant/Expected/AcceptanceTests/ConstantsVersionTolerant/setup.py b/test/vanilla/version-tolerant/Expected/AcceptanceTests/ConstantsVersionTolerant/setup.py index 56088d4f1fe..5c3500f3542 100644 --- a/test/vanilla/version-tolerant/Expected/AcceptanceTests/ConstantsVersionTolerant/setup.py +++ b/test/vanilla/version-tolerant/Expected/AcceptanceTests/ConstantsVersionTolerant/setup.py @@ -6,31 +6,24 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- # coding: utf-8 - from setuptools import setup, find_packages -NAME = "autorestswaggerconstantservice" -VERSION = "0.1.0" - -# To install the library, run the following -# -# python setup.py install -# -# prerequisite: setuptools -# http://pypi.python.org/pypi/setuptools - -REQUIRES = ["msrest>=0.6.21", "azure-core<2.0.0,>=1.20.1"] +PACKAGE_NAME = "autorestswaggerconstantservice" +version = "0.1.0" setup( - name=NAME, - version=VERSION, + name=PACKAGE_NAME, + version=version, description="AutoRestSwaggerConstantService", author_email="", url="", - keywords=["Swagger", "AutoRestSwaggerConstantService"], - install_requires=REQUIRES, + keywords="azure, azure sdk", packages=find_packages(), include_package_data=True, + install_requires=[ + "msrest>=0.6.21", + "azure-core<2.0.0,>=1.20.1", + ], long_description="""\ Test Infrastructure for AutoRest Swagger Constant. """, diff --git a/test/vanilla/version-tolerant/Expected/AcceptanceTests/CustomBaseUriMoreOptionsVersionTolerant/setup.py b/test/vanilla/version-tolerant/Expected/AcceptanceTests/CustomBaseUriMoreOptionsVersionTolerant/setup.py index d2c84ca63b8..528516a4fe7 100644 --- a/test/vanilla/version-tolerant/Expected/AcceptanceTests/CustomBaseUriMoreOptionsVersionTolerant/setup.py +++ b/test/vanilla/version-tolerant/Expected/AcceptanceTests/CustomBaseUriMoreOptionsVersionTolerant/setup.py @@ -6,31 +6,24 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- # coding: utf-8 - from setuptools import setup, find_packages -NAME = "autorestparameterizedcustomhosttestclient" -VERSION = "0.1.0" - -# To install the library, run the following -# -# python setup.py install -# -# prerequisite: setuptools -# http://pypi.python.org/pypi/setuptools - -REQUIRES = ["msrest>=0.6.21", "azure-core<2.0.0,>=1.20.1"] +PACKAGE_NAME = "autorestparameterizedcustomhosttestclient" +version = "0.1.0" setup( - name=NAME, - version=VERSION, + name=PACKAGE_NAME, + version=version, description="AutoRestParameterizedCustomHostTestClient", author_email="", url="", - keywords=["Swagger", "AutoRestParameterizedCustomHostTestClient"], - install_requires=REQUIRES, + keywords="azure, azure sdk", packages=find_packages(), include_package_data=True, + install_requires=[ + "msrest>=0.6.21", + "azure-core<2.0.0,>=1.20.1", + ], long_description="""\ Test Infrastructure for AutoRest. """, diff --git a/test/vanilla/version-tolerant/Expected/AcceptanceTests/CustomBaseUriVersionTolerant/setup.py b/test/vanilla/version-tolerant/Expected/AcceptanceTests/CustomBaseUriVersionTolerant/setup.py index c250c733c08..5771c01ab9f 100644 --- a/test/vanilla/version-tolerant/Expected/AcceptanceTests/CustomBaseUriVersionTolerant/setup.py +++ b/test/vanilla/version-tolerant/Expected/AcceptanceTests/CustomBaseUriVersionTolerant/setup.py @@ -6,31 +6,24 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- # coding: utf-8 - from setuptools import setup, find_packages -NAME = "autorestparameterizedhosttestclient" -VERSION = "0.1.0" - -# To install the library, run the following -# -# python setup.py install -# -# prerequisite: setuptools -# http://pypi.python.org/pypi/setuptools - -REQUIRES = ["msrest>=0.6.21", "azure-core<2.0.0,>=1.20.1"] +PACKAGE_NAME = "autorestparameterizedhosttestclient" +version = "0.1.0" setup( - name=NAME, - version=VERSION, + name=PACKAGE_NAME, + version=version, description="AutoRestParameterizedHostTestClient", author_email="", url="", - keywords=["Swagger", "AutoRestParameterizedHostTestClient"], - install_requires=REQUIRES, + keywords="azure, azure sdk", packages=find_packages(), include_package_data=True, + install_requires=[ + "msrest>=0.6.21", + "azure-core<2.0.0,>=1.20.1", + ], long_description="""\ Test Infrastructure for AutoRest. """, diff --git a/test/vanilla/version-tolerant/Expected/AcceptanceTests/ErrorWithSecretsVersionTolerant/setup.py b/test/vanilla/version-tolerant/Expected/AcceptanceTests/ErrorWithSecretsVersionTolerant/setup.py index ed786ed0573..2af73e163b1 100644 --- a/test/vanilla/version-tolerant/Expected/AcceptanceTests/ErrorWithSecretsVersionTolerant/setup.py +++ b/test/vanilla/version-tolerant/Expected/AcceptanceTests/ErrorWithSecretsVersionTolerant/setup.py @@ -6,31 +6,24 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- # coding: utf-8 - from setuptools import setup, find_packages -NAME = "errorwithsecrets" -VERSION = "0.1.0" - -# To install the library, run the following -# -# python setup.py install -# -# prerequisite: setuptools -# http://pypi.python.org/pypi/setuptools - -REQUIRES = ["msrest>=0.6.21", "azure-core<2.0.0,>=1.20.1"] +PACKAGE_NAME = "errorwithsecrets" +version = "0.1.0" setup( - name=NAME, - version=VERSION, + name=PACKAGE_NAME, + version=version, description="ErrorWithSecrets", author_email="", url="", - keywords=["Swagger", "ErrorWithSecrets"], - install_requires=REQUIRES, + keywords="azure, azure sdk", packages=find_packages(), include_package_data=True, + install_requires=[ + "msrest>=0.6.21", + "azure-core<2.0.0,>=1.20.1", + ], long_description="""\ Tests whether loggers/tracers redact secrets and PII within error responses. """, diff --git a/test/vanilla/version-tolerant/Expected/AcceptanceTests/ExtensibleEnumsVersionTolerant/setup.py b/test/vanilla/version-tolerant/Expected/AcceptanceTests/ExtensibleEnumsVersionTolerant/setup.py index a7ea89c9d01..f16ec2cbf70 100644 --- a/test/vanilla/version-tolerant/Expected/AcceptanceTests/ExtensibleEnumsVersionTolerant/setup.py +++ b/test/vanilla/version-tolerant/Expected/AcceptanceTests/ExtensibleEnumsVersionTolerant/setup.py @@ -6,31 +6,24 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- # coding: utf-8 - from setuptools import setup, find_packages -NAME = "petstoreinc" -VERSION = "0.1.0" - -# To install the library, run the following -# -# python setup.py install -# -# prerequisite: setuptools -# http://pypi.python.org/pypi/setuptools - -REQUIRES = ["msrest>=0.6.21", "azure-core<2.0.0,>=1.20.1"] +PACKAGE_NAME = "petstoreinc" +version = "0.1.0" setup( - name=NAME, - version=VERSION, + name=PACKAGE_NAME, + version=version, description="PetStoreInc", author_email="", url="", - keywords=["Swagger", "PetStoreInc"], - install_requires=REQUIRES, + keywords="azure, azure sdk", packages=find_packages(), include_package_data=True, + install_requires=[ + "msrest>=0.6.21", + "azure-core<2.0.0,>=1.20.1", + ], long_description="""\ PetStore. """, diff --git a/test/vanilla/version-tolerant/Expected/AcceptanceTests/HeaderVersionTolerant/setup.py b/test/vanilla/version-tolerant/Expected/AcceptanceTests/HeaderVersionTolerant/setup.py index 8749e54d402..12460ccdd91 100644 --- a/test/vanilla/version-tolerant/Expected/AcceptanceTests/HeaderVersionTolerant/setup.py +++ b/test/vanilla/version-tolerant/Expected/AcceptanceTests/HeaderVersionTolerant/setup.py @@ -6,31 +6,24 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- # coding: utf-8 - from setuptools import setup, find_packages -NAME = "autorestswaggerbatheaderservice" -VERSION = "0.1.0" - -# To install the library, run the following -# -# python setup.py install -# -# prerequisite: setuptools -# http://pypi.python.org/pypi/setuptools - -REQUIRES = ["msrest>=0.6.21", "azure-core<2.0.0,>=1.20.1"] +PACKAGE_NAME = "autorestswaggerbatheaderservice" +version = "0.1.0" setup( - name=NAME, - version=VERSION, + name=PACKAGE_NAME, + version=version, description="AutoRestSwaggerBATHeaderService", author_email="", url="", - keywords=["Swagger", "AutoRestSwaggerBATHeaderService"], - install_requires=REQUIRES, + keywords="azure, azure sdk", packages=find_packages(), include_package_data=True, + install_requires=[ + "msrest>=0.6.21", + "azure-core<2.0.0,>=1.20.1", + ], long_description="""\ Test Infrastructure for AutoRest. """, diff --git a/test/vanilla/version-tolerant/Expected/AcceptanceTests/HttpVersionTolerant/setup.py b/test/vanilla/version-tolerant/Expected/AcceptanceTests/HttpVersionTolerant/setup.py index 69f380ec95e..1da4747d61e 100644 --- a/test/vanilla/version-tolerant/Expected/AcceptanceTests/HttpVersionTolerant/setup.py +++ b/test/vanilla/version-tolerant/Expected/AcceptanceTests/HttpVersionTolerant/setup.py @@ -6,31 +6,24 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- # coding: utf-8 - from setuptools import setup, find_packages -NAME = "autoresthttpinfrastructuretestservice" -VERSION = "0.1.0" - -# To install the library, run the following -# -# python setup.py install -# -# prerequisite: setuptools -# http://pypi.python.org/pypi/setuptools - -REQUIRES = ["msrest>=0.6.21", "azure-core<2.0.0,>=1.20.1"] +PACKAGE_NAME = "autoresthttpinfrastructuretestservice" +version = "0.1.0" setup( - name=NAME, - version=VERSION, + name=PACKAGE_NAME, + version=version, description="AutoRestHttpInfrastructureTestService", author_email="", url="", - keywords=["Swagger", "AutoRestHttpInfrastructureTestService"], - install_requires=REQUIRES, + keywords="azure, azure sdk", packages=find_packages(), include_package_data=True, + install_requires=[ + "msrest>=0.6.21", + "azure-core<2.0.0,>=1.20.1", + ], long_description="""\ Test Infrastructure for AutoRest. """, diff --git a/test/vanilla/version-tolerant/Expected/AcceptanceTests/IncorrectErrorResponseVersionTolerant/setup.py b/test/vanilla/version-tolerant/Expected/AcceptanceTests/IncorrectErrorResponseVersionTolerant/setup.py index 883660291b0..a205df4f873 100644 --- a/test/vanilla/version-tolerant/Expected/AcceptanceTests/IncorrectErrorResponseVersionTolerant/setup.py +++ b/test/vanilla/version-tolerant/Expected/AcceptanceTests/IncorrectErrorResponseVersionTolerant/setup.py @@ -6,31 +6,24 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- # coding: utf-8 - from setuptools import setup, find_packages -NAME = "incorrectreturnederrormodel" -VERSION = "0.1.0" - -# To install the library, run the following -# -# python setup.py install -# -# prerequisite: setuptools -# http://pypi.python.org/pypi/setuptools - -REQUIRES = ["msrest>=0.6.21", "azure-core<2.0.0,>=1.20.1"] +PACKAGE_NAME = "incorrectreturnederrormodel" +version = "0.1.0" setup( - name=NAME, - version=VERSION, + name=PACKAGE_NAME, + version=version, description="IncorrectReturnedErrorModel", author_email="", url="", - keywords=["Swagger", "IncorrectReturnedErrorModel"], - install_requires=REQUIRES, + keywords="azure, azure sdk", packages=find_packages(), include_package_data=True, + install_requires=[ + "msrest>=0.6.21", + "azure-core<2.0.0,>=1.20.1", + ], long_description="""\ Test to see when throwing an HttpResponseError whether we swallow error model deserialization errors. """, diff --git a/test/vanilla/version-tolerant/Expected/AcceptanceTests/MediaTypesVersionTolerant/setup.py b/test/vanilla/version-tolerant/Expected/AcceptanceTests/MediaTypesVersionTolerant/setup.py index 5c8489e8153..dd0d3c27d99 100644 --- a/test/vanilla/version-tolerant/Expected/AcceptanceTests/MediaTypesVersionTolerant/setup.py +++ b/test/vanilla/version-tolerant/Expected/AcceptanceTests/MediaTypesVersionTolerant/setup.py @@ -6,31 +6,24 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- # coding: utf-8 - from setuptools import setup, find_packages -NAME = "mediatypesclient" -VERSION = "0.1.0" - -# To install the library, run the following -# -# python setup.py install -# -# prerequisite: setuptools -# http://pypi.python.org/pypi/setuptools - -REQUIRES = ["msrest>=0.6.21", "azure-core<2.0.0,>=1.20.1"] +PACKAGE_NAME = "mediatypesclient" +version = "0.1.0" setup( - name=NAME, - version=VERSION, + name=PACKAGE_NAME, + version=version, description="MediaTypesClient", author_email="", url="", - keywords=["Swagger", "MediaTypesClient"], - install_requires=REQUIRES, + keywords="azure, azure sdk", packages=find_packages(), include_package_data=True, + install_requires=[ + "msrest>=0.6.21", + "azure-core<2.0.0,>=1.20.1", + ], long_description="""\ Play with produces/consumes and media-types in general. """, diff --git a/test/vanilla/version-tolerant/Expected/AcceptanceTests/MergePatchJsonVersionTolerant/setup.py b/test/vanilla/version-tolerant/Expected/AcceptanceTests/MergePatchJsonVersionTolerant/setup.py index 4b34ab99a32..5f536deb0ed 100644 --- a/test/vanilla/version-tolerant/Expected/AcceptanceTests/MergePatchJsonVersionTolerant/setup.py +++ b/test/vanilla/version-tolerant/Expected/AcceptanceTests/MergePatchJsonVersionTolerant/setup.py @@ -6,31 +6,24 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- # coding: utf-8 - from setuptools import setup, find_packages -NAME = "mergepatchjsonclient" -VERSION = "0.1.0" - -# To install the library, run the following -# -# python setup.py install -# -# prerequisite: setuptools -# http://pypi.python.org/pypi/setuptools - -REQUIRES = ["msrest>=0.6.21", "azure-core<2.0.0,>=1.20.1"] +PACKAGE_NAME = "mergepatchjsonclient" +version = "0.1.0" setup( - name=NAME, - version=VERSION, + name=PACKAGE_NAME, + version=version, description="MergePatchJsonClient", author_email="", url="", - keywords=["Swagger", "MergePatchJsonClient"], - install_requires=REQUIRES, + keywords="azure, azure sdk", packages=find_packages(), include_package_data=True, + install_requires=[ + "msrest>=0.6.21", + "azure-core<2.0.0,>=1.20.1", + ], long_description="""\ Service client for testing merge patch json. """, diff --git a/test/vanilla/version-tolerant/Expected/AcceptanceTests/ModelFlatteningVersionTolerant/setup.py b/test/vanilla/version-tolerant/Expected/AcceptanceTests/ModelFlatteningVersionTolerant/setup.py index 8d1edff1db1..2ee0b516ad1 100644 --- a/test/vanilla/version-tolerant/Expected/AcceptanceTests/ModelFlatteningVersionTolerant/setup.py +++ b/test/vanilla/version-tolerant/Expected/AcceptanceTests/ModelFlatteningVersionTolerant/setup.py @@ -6,31 +6,24 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- # coding: utf-8 - from setuptools import setup, find_packages -NAME = "autorestresourceflatteningtestservice" -VERSION = "0.1.0" - -# To install the library, run the following -# -# python setup.py install -# -# prerequisite: setuptools -# http://pypi.python.org/pypi/setuptools - -REQUIRES = ["msrest>=0.6.21", "azure-core<2.0.0,>=1.20.1"] +PACKAGE_NAME = "autorestresourceflatteningtestservice" +version = "0.1.0" setup( - name=NAME, - version=VERSION, + name=PACKAGE_NAME, + version=version, description="AutoRestResourceFlatteningTestService", author_email="", url="", - keywords=["Swagger", "AutoRestResourceFlatteningTestService"], - install_requires=REQUIRES, + keywords="azure, azure sdk", packages=find_packages(), include_package_data=True, + install_requires=[ + "msrest>=0.6.21", + "azure-core<2.0.0,>=1.20.1", + ], long_description="""\ Resource Flattening for AutoRest. """, diff --git a/test/vanilla/version-tolerant/Expected/AcceptanceTests/MultipleInheritanceVersionTolerant/setup.py b/test/vanilla/version-tolerant/Expected/AcceptanceTests/MultipleInheritanceVersionTolerant/setup.py index 5d90113dd65..ae12d33c3d8 100644 --- a/test/vanilla/version-tolerant/Expected/AcceptanceTests/MultipleInheritanceVersionTolerant/setup.py +++ b/test/vanilla/version-tolerant/Expected/AcceptanceTests/MultipleInheritanceVersionTolerant/setup.py @@ -6,31 +6,24 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- # coding: utf-8 - from setuptools import setup, find_packages -NAME = "multipleinheritanceserviceclient" -VERSION = "0.1.0" - -# To install the library, run the following -# -# python setup.py install -# -# prerequisite: setuptools -# http://pypi.python.org/pypi/setuptools - -REQUIRES = ["msrest>=0.6.21", "azure-core<2.0.0,>=1.20.1"] +PACKAGE_NAME = "multipleinheritanceserviceclient" +version = "0.1.0" setup( - name=NAME, - version=VERSION, + name=PACKAGE_NAME, + version=version, description="MultipleInheritanceServiceClient", author_email="", url="", - keywords=["Swagger", "MultipleInheritanceServiceClient"], - install_requires=REQUIRES, + keywords="azure, azure sdk", packages=find_packages(), include_package_data=True, + install_requires=[ + "msrest>=0.6.21", + "azure-core<2.0.0,>=1.20.1", + ], long_description="""\ Service client for multiinheritance client testing. """, diff --git a/test/vanilla/version-tolerant/Expected/AcceptanceTests/NoOperationsVersionTolerant/setup.py b/test/vanilla/version-tolerant/Expected/AcceptanceTests/NoOperationsVersionTolerant/setup.py index 66ffc7560f0..a504a451092 100644 --- a/test/vanilla/version-tolerant/Expected/AcceptanceTests/NoOperationsVersionTolerant/setup.py +++ b/test/vanilla/version-tolerant/Expected/AcceptanceTests/NoOperationsVersionTolerant/setup.py @@ -6,31 +6,24 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- # coding: utf-8 - from setuptools import setup, find_packages -NAME = "nooperationsserviceclient" -VERSION = "0.1.0" - -# To install the library, run the following -# -# python setup.py install -# -# prerequisite: setuptools -# http://pypi.python.org/pypi/setuptools - -REQUIRES = ["msrest>=0.6.21", "azure-core<2.0.0,>=1.20.1"] +PACKAGE_NAME = "nooperationsserviceclient" +version = "0.1.0" setup( - name=NAME, - version=VERSION, + name=PACKAGE_NAME, + version=version, description="NoOperationsServiceClient", author_email="", url="", - keywords=["Swagger", "NoOperationsServiceClient"], - install_requires=REQUIRES, + keywords="azure, azure sdk", packages=find_packages(), include_package_data=True, + install_requires=[ + "msrest>=0.6.21", + "azure-core<2.0.0,>=1.20.1", + ], long_description="""\ Service client with no operations. """, diff --git a/test/vanilla/version-tolerant/Expected/AcceptanceTests/NonStringEnumsVersionTolerant/setup.py b/test/vanilla/version-tolerant/Expected/AcceptanceTests/NonStringEnumsVersionTolerant/setup.py index 67f8f2e27c2..70074f28998 100644 --- a/test/vanilla/version-tolerant/Expected/AcceptanceTests/NonStringEnumsVersionTolerant/setup.py +++ b/test/vanilla/version-tolerant/Expected/AcceptanceTests/NonStringEnumsVersionTolerant/setup.py @@ -6,31 +6,24 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- # coding: utf-8 - from setuptools import setup, find_packages -NAME = "nonstringenumsclient" -VERSION = "0.1.0" - -# To install the library, run the following -# -# python setup.py install -# -# prerequisite: setuptools -# http://pypi.python.org/pypi/setuptools - -REQUIRES = ["msrest>=0.6.21", "azure-core<2.0.0,>=1.20.1"] +PACKAGE_NAME = "nonstringenumsclient" +version = "0.1.0" setup( - name=NAME, - version=VERSION, + name=PACKAGE_NAME, + version=version, description="NonStringEnumsClient", author_email="", url="", - keywords=["Swagger", "NonStringEnumsClient"], - install_requires=REQUIRES, + keywords="azure, azure sdk", packages=find_packages(), include_package_data=True, + install_requires=[ + "msrest>=0.6.21", + "azure-core<2.0.0,>=1.20.1", + ], long_description="""\ Testing non-string enums. """, diff --git a/test/vanilla/version-tolerant/Expected/AcceptanceTests/ObjectTypeVersionTolerant/setup.py b/test/vanilla/version-tolerant/Expected/AcceptanceTests/ObjectTypeVersionTolerant/setup.py index fae955ee4ad..117f87cfb34 100644 --- a/test/vanilla/version-tolerant/Expected/AcceptanceTests/ObjectTypeVersionTolerant/setup.py +++ b/test/vanilla/version-tolerant/Expected/AcceptanceTests/ObjectTypeVersionTolerant/setup.py @@ -6,31 +6,24 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- # coding: utf-8 - from setuptools import setup, find_packages -NAME = "objecttypeclient" -VERSION = "0.1.0" - -# To install the library, run the following -# -# python setup.py install -# -# prerequisite: setuptools -# http://pypi.python.org/pypi/setuptools - -REQUIRES = ["msrest>=0.6.21", "azure-core<2.0.0,>=1.20.1"] +PACKAGE_NAME = "objecttypeclient" +version = "0.1.0" setup( - name=NAME, - version=VERSION, + name=PACKAGE_NAME, + version=version, description="ObjectTypeClient", author_email="", url="", - keywords=["Swagger", "ObjectTypeClient"], - install_requires=REQUIRES, + keywords="azure, azure sdk", packages=find_packages(), include_package_data=True, + install_requires=[ + "msrest>=0.6.21", + "azure-core<2.0.0,>=1.20.1", + ], long_description="""\ Service client for testing basic type: object swaggers. """, diff --git a/test/vanilla/version-tolerant/Expected/AcceptanceTests/ParameterFlatteningVersionTolerant/setup.py b/test/vanilla/version-tolerant/Expected/AcceptanceTests/ParameterFlatteningVersionTolerant/setup.py index 5deb8606bc4..0613a67f61c 100644 --- a/test/vanilla/version-tolerant/Expected/AcceptanceTests/ParameterFlatteningVersionTolerant/setup.py +++ b/test/vanilla/version-tolerant/Expected/AcceptanceTests/ParameterFlatteningVersionTolerant/setup.py @@ -6,31 +6,24 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- # coding: utf-8 - from setuptools import setup, find_packages -NAME = "autorestparameterflattening" -VERSION = "0.1.0" - -# To install the library, run the following -# -# python setup.py install -# -# prerequisite: setuptools -# http://pypi.python.org/pypi/setuptools - -REQUIRES = ["msrest>=0.6.21", "azure-core<2.0.0,>=1.20.1"] +PACKAGE_NAME = "autorestparameterflattening" +version = "0.1.0" setup( - name=NAME, - version=VERSION, + name=PACKAGE_NAME, + version=version, description="AutoRestParameterFlattening", author_email="", url="", - keywords=["Swagger", "AutoRestParameterFlattening"], - install_requires=REQUIRES, + keywords="azure, azure sdk", packages=find_packages(), include_package_data=True, + install_requires=[ + "msrest>=0.6.21", + "azure-core<2.0.0,>=1.20.1", + ], long_description="""\ Resource Flattening for AutoRest. """, diff --git a/test/vanilla/version-tolerant/Expected/AcceptanceTests/ParameterizedEndpointVersionTolerant/setup.py b/test/vanilla/version-tolerant/Expected/AcceptanceTests/ParameterizedEndpointVersionTolerant/setup.py index b4cd6534537..e2721f41200 100644 --- a/test/vanilla/version-tolerant/Expected/AcceptanceTests/ParameterizedEndpointVersionTolerant/setup.py +++ b/test/vanilla/version-tolerant/Expected/AcceptanceTests/ParameterizedEndpointVersionTolerant/setup.py @@ -6,31 +6,24 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- # coding: utf-8 - from setuptools import setup, find_packages -NAME = "parmaterizedendpointclient" -VERSION = "0.1.0" - -# To install the library, run the following -# -# python setup.py install -# -# prerequisite: setuptools -# http://pypi.python.org/pypi/setuptools - -REQUIRES = ["msrest>=0.6.21", "azure-core<2.0.0,>=1.20.1"] +PACKAGE_NAME = "parmaterizedendpointclient" +version = "0.1.0" setup( - name=NAME, - version=VERSION, + name=PACKAGE_NAME, + version=version, description="ParmaterizedEndpointClient", author_email="", url="", - keywords=["Swagger", "ParmaterizedEndpointClient"], - install_requires=REQUIRES, + keywords="azure, azure sdk", packages=find_packages(), include_package_data=True, + install_requires=[ + "msrest>=0.6.21", + "azure-core<2.0.0,>=1.20.1", + ], long_description="""\ Service client for testing parameterized hosts with the name 'endpoint'. """, diff --git a/test/vanilla/version-tolerant/Expected/AcceptanceTests/ReportVersionTolerant/setup.py b/test/vanilla/version-tolerant/Expected/AcceptanceTests/ReportVersionTolerant/setup.py index 2f4459980ef..7f4cac78c72 100644 --- a/test/vanilla/version-tolerant/Expected/AcceptanceTests/ReportVersionTolerant/setup.py +++ b/test/vanilla/version-tolerant/Expected/AcceptanceTests/ReportVersionTolerant/setup.py @@ -6,31 +6,24 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- # coding: utf-8 - from setuptools import setup, find_packages -NAME = "autorestreportservice" -VERSION = "0.1.0" - -# To install the library, run the following -# -# python setup.py install -# -# prerequisite: setuptools -# http://pypi.python.org/pypi/setuptools - -REQUIRES = ["msrest>=0.6.21", "azure-core<2.0.0,>=1.20.1"] +PACKAGE_NAME = "autorestreportservice" +version = "0.1.0" setup( - name=NAME, - version=VERSION, + name=PACKAGE_NAME, + version=version, description="AutoRestReportService", author_email="", url="", - keywords=["Swagger", "AutoRestReportService"], - install_requires=REQUIRES, + keywords="azure, azure sdk", packages=find_packages(), include_package_data=True, + install_requires=[ + "msrest>=0.6.21", + "azure-core<2.0.0,>=1.20.1", + ], long_description="""\ Test Infrastructure for AutoRest. """, diff --git a/test/vanilla/version-tolerant/Expected/AcceptanceTests/RequiredOptionalVersionTolerant/setup.py b/test/vanilla/version-tolerant/Expected/AcceptanceTests/RequiredOptionalVersionTolerant/setup.py index b6d2db16006..d52335449db 100644 --- a/test/vanilla/version-tolerant/Expected/AcceptanceTests/RequiredOptionalVersionTolerant/setup.py +++ b/test/vanilla/version-tolerant/Expected/AcceptanceTests/RequiredOptionalVersionTolerant/setup.py @@ -6,31 +6,24 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- # coding: utf-8 - from setuptools import setup, find_packages -NAME = "autorestrequiredoptionaltestservice" -VERSION = "0.1.0" - -# To install the library, run the following -# -# python setup.py install -# -# prerequisite: setuptools -# http://pypi.python.org/pypi/setuptools - -REQUIRES = ["msrest>=0.6.21", "azure-core<2.0.0,>=1.20.1"] +PACKAGE_NAME = "autorestrequiredoptionaltestservice" +version = "0.1.0" setup( - name=NAME, - version=VERSION, + name=PACKAGE_NAME, + version=version, description="AutoRestRequiredOptionalTestService", author_email="", url="", - keywords=["Swagger", "AutoRestRequiredOptionalTestService"], - install_requires=REQUIRES, + keywords="azure, azure sdk", packages=find_packages(), include_package_data=True, + install_requires=[ + "msrest>=0.6.21", + "azure-core<2.0.0,>=1.20.1", + ], long_description="""\ Test Infrastructure for AutoRest. """, diff --git a/test/vanilla/version-tolerant/Expected/AcceptanceTests/ReservedWordsVersionTolerant/setup.py b/test/vanilla/version-tolerant/Expected/AcceptanceTests/ReservedWordsVersionTolerant/setup.py index 938b1069b30..d0c5fc4d616 100644 --- a/test/vanilla/version-tolerant/Expected/AcceptanceTests/ReservedWordsVersionTolerant/setup.py +++ b/test/vanilla/version-tolerant/Expected/AcceptanceTests/ReservedWordsVersionTolerant/setup.py @@ -6,31 +6,24 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- # coding: utf-8 - from setuptools import setup, find_packages -NAME = "reservedwordsclient" -VERSION = "0.1.0" - -# To install the library, run the following -# -# python setup.py install -# -# prerequisite: setuptools -# http://pypi.python.org/pypi/setuptools - -REQUIRES = ["msrest>=0.6.21", "azure-core<2.0.0,>=1.20.1"] +PACKAGE_NAME = "reservedwordsclient" +version = "0.1.0" setup( - name=NAME, - version=VERSION, + name=PACKAGE_NAME, + version=version, description="ReservedWordsClient", author_email="", url="", - keywords=["Swagger", "ReservedWordsClient"], - install_requires=REQUIRES, + keywords="azure, azure sdk", packages=find_packages(), include_package_data=True, + install_requires=[ + "msrest>=0.6.21", + "azure-core<2.0.0,>=1.20.1", + ], long_description="""\ Swagger that has operation groups etc. with reserved words. """, diff --git a/test/vanilla/version-tolerant/Expected/AcceptanceTests/UrlMultiCollectionFormatVersionTolerant/setup.py b/test/vanilla/version-tolerant/Expected/AcceptanceTests/UrlMultiCollectionFormatVersionTolerant/setup.py index 8c5a64d2402..9c792e881c7 100644 --- a/test/vanilla/version-tolerant/Expected/AcceptanceTests/UrlMultiCollectionFormatVersionTolerant/setup.py +++ b/test/vanilla/version-tolerant/Expected/AcceptanceTests/UrlMultiCollectionFormatVersionTolerant/setup.py @@ -6,31 +6,24 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- # coding: utf-8 - from setuptools import setup, find_packages -NAME = "autoresturlmutlicollectionformattestservice" -VERSION = "0.1.0" - -# To install the library, run the following -# -# python setup.py install -# -# prerequisite: setuptools -# http://pypi.python.org/pypi/setuptools - -REQUIRES = ["msrest>=0.6.21", "azure-core<2.0.0,>=1.20.1"] +PACKAGE_NAME = "autoresturlmutlicollectionformattestservice" +version = "0.1.0" setup( - name=NAME, - version=VERSION, + name=PACKAGE_NAME, + version=version, description="AutoRestUrlMutliCollectionFormatTestService", author_email="", url="", - keywords=["Swagger", "AutoRestUrlMutliCollectionFormatTestService"], - install_requires=REQUIRES, + keywords="azure, azure sdk", packages=find_packages(), include_package_data=True, + install_requires=[ + "msrest>=0.6.21", + "azure-core<2.0.0,>=1.20.1", + ], long_description="""\ Test Infrastructure for AutoRest. """, diff --git a/test/vanilla/version-tolerant/Expected/AcceptanceTests/UrlVersionTolerant/setup.py b/test/vanilla/version-tolerant/Expected/AcceptanceTests/UrlVersionTolerant/setup.py index 3eeeb1be90b..17c1895f399 100644 --- a/test/vanilla/version-tolerant/Expected/AcceptanceTests/UrlVersionTolerant/setup.py +++ b/test/vanilla/version-tolerant/Expected/AcceptanceTests/UrlVersionTolerant/setup.py @@ -6,31 +6,24 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- # coding: utf-8 - from setuptools import setup, find_packages -NAME = "autoresturltestservice" -VERSION = "0.1.0" - -# To install the library, run the following -# -# python setup.py install -# -# prerequisite: setuptools -# http://pypi.python.org/pypi/setuptools - -REQUIRES = ["msrest>=0.6.21", "azure-core<2.0.0,>=1.20.1"] +PACKAGE_NAME = "autoresturltestservice" +version = "0.1.0" setup( - name=NAME, - version=VERSION, + name=PACKAGE_NAME, + version=version, description="AutoRestUrlTestService", author_email="", url="", - keywords=["Swagger", "AutoRestUrlTestService"], - install_requires=REQUIRES, + keywords="azure, azure sdk", packages=find_packages(), include_package_data=True, + install_requires=[ + "msrest>=0.6.21", + "azure-core<2.0.0,>=1.20.1", + ], long_description="""\ Test Infrastructure for AutoRest. """, diff --git a/test/vanilla/version-tolerant/Expected/AcceptanceTests/ValidationVersionTolerant/setup.py b/test/vanilla/version-tolerant/Expected/AcceptanceTests/ValidationVersionTolerant/setup.py index 1ec830f56e0..2801e49bc6c 100644 --- a/test/vanilla/version-tolerant/Expected/AcceptanceTests/ValidationVersionTolerant/setup.py +++ b/test/vanilla/version-tolerant/Expected/AcceptanceTests/ValidationVersionTolerant/setup.py @@ -6,31 +6,24 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- # coding: utf-8 - from setuptools import setup, find_packages -NAME = "autorestvalidationtest" -VERSION = "0.1.0" - -# To install the library, run the following -# -# python setup.py install -# -# prerequisite: setuptools -# http://pypi.python.org/pypi/setuptools - -REQUIRES = ["msrest>=0.6.21", "azure-core<2.0.0,>=1.20.1"] +PACKAGE_NAME = "autorestvalidationtest" +version = "0.1.0" setup( - name=NAME, - version=VERSION, + name=PACKAGE_NAME, + version=version, description="AutoRestValidationTest", author_email="", url="", - keywords=["Swagger", "AutoRestValidationTest"], - install_requires=REQUIRES, + keywords="azure, azure sdk", packages=find_packages(), include_package_data=True, + install_requires=[ + "msrest>=0.6.21", + "azure-core<2.0.0,>=1.20.1", + ], long_description="""\ Test Infrastructure for AutoRest. No server backend exists for these tests. """, diff --git a/test/vanilla/version-tolerant/Expected/AcceptanceTests/XmlVersionTolerant/setup.py b/test/vanilla/version-tolerant/Expected/AcceptanceTests/XmlVersionTolerant/setup.py index 08f2e587366..7238c01d719 100644 --- a/test/vanilla/version-tolerant/Expected/AcceptanceTests/XmlVersionTolerant/setup.py +++ b/test/vanilla/version-tolerant/Expected/AcceptanceTests/XmlVersionTolerant/setup.py @@ -6,31 +6,24 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- # coding: utf-8 - from setuptools import setup, find_packages -NAME = "autorestswaggerbatxmlservice" -VERSION = "0.1.0" - -# To install the library, run the following -# -# python setup.py install -# -# prerequisite: setuptools -# http://pypi.python.org/pypi/setuptools - -REQUIRES = ["msrest>=0.6.21", "azure-core<2.0.0,>=1.20.1"] +PACKAGE_NAME = "autorestswaggerbatxmlservice" +version = "0.1.0" setup( - name=NAME, - version=VERSION, + name=PACKAGE_NAME, + version=version, description="AutoRestSwaggerBATXMLService", author_email="", url="", - keywords=["Swagger", "AutoRestSwaggerBATXMLService"], - install_requires=REQUIRES, + keywords="azure, azure sdk", packages=find_packages(), include_package_data=True, + install_requires=[ + "msrest>=0.6.21", + "azure-core<2.0.0,>=1.20.1", + ], long_description="""\ Test Infrastructure for AutoRest Swagger BAT. """, diff --git a/test/vanilla/version-tolerant/Expected/AcceptanceTests/XmsErrorResponseVersionTolerant/setup.py b/test/vanilla/version-tolerant/Expected/AcceptanceTests/XmsErrorResponseVersionTolerant/setup.py index ffc32bf4893..55bf2961b26 100644 --- a/test/vanilla/version-tolerant/Expected/AcceptanceTests/XmsErrorResponseVersionTolerant/setup.py +++ b/test/vanilla/version-tolerant/Expected/AcceptanceTests/XmsErrorResponseVersionTolerant/setup.py @@ -6,31 +6,24 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- # coding: utf-8 - from setuptools import setup, find_packages -NAME = "xmserrorresponseextensions" -VERSION = "0.1.0" - -# To install the library, run the following -# -# python setup.py install -# -# prerequisite: setuptools -# http://pypi.python.org/pypi/setuptools - -REQUIRES = ["msrest>=0.6.21", "azure-core<2.0.0,>=1.20.1"] +PACKAGE_NAME = "xmserrorresponseextensions" +version = "0.1.0" setup( - name=NAME, - version=VERSION, + name=PACKAGE_NAME, + version=version, description="XMSErrorResponseExtensions", author_email="", url="", - keywords=["Swagger", "XMSErrorResponseExtensions"], - install_requires=REQUIRES, + keywords="azure, azure sdk", packages=find_packages(), include_package_data=True, + install_requires=[ + "msrest>=0.6.21", + "azure-core<2.0.0,>=1.20.1", + ], long_description="""\ XMS Error Response Extensions. """,