-
Notifications
You must be signed in to change notification settings - Fork 3.2k
Adding SIP routing functionality to PhoneNumbers SDK #22805
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
annatisch
merged 77 commits into
Azure:main
from
jiriburant:implementing-inputs-from-api-review
Jun 23, 2022
Merged
Changes from all commits
Commits
Show all changes
77 commits
Select commit
Hold shift + click to select a range
c54d87e
Initial commit
jiriburant c6bb58b
Copied shared files
jiriburant c6bdc1f
Added basic functionality to the sip client.
jiriburant 33f5133
Copied shared folder to get the utilities. Implemented sample files. …
jiriburant 8a5b5e3
Modified function comments and added class comment for _sip_routing_c…
jiriburant a929c00
Fixed kwargs propagation
jiriburant 2d724f4
Changed sample file to pull parameteres from environment variables.
jiriburant 4abde59
Changed get SIP configuration sample to be a class to align with the …
jiriburant 9957f8e
Implemented basic tests for the SIP client
jiriburant 91a5e1d
Removed unused import
jiriburant 74a552c
Fixed comment.
jiriburant c72a481
Renamed variables dut_client to test_client.
jiriburant 3a362d8
Added samples and tests of functionality.
jiriburant 854cde6
Merge branch 'Azure:master' into feature/communication-sip-configuration
jiriburant 0a97142
Merge from original repo
jiriburant 76df991
Feature/communication sip configuration dev/basic client functionalit…
jiriburant 95df4df
Updated from original (#4)
jiriburant a3b20fd
Merge branch 'Azure:master' into master
jiriburant 6c6654b
Updated from upstream.
jiriburant 5c6a037
Fixing pylint
jiriburant d1328d7
Changed value error to be compatible with python 2.
jiriburant 00422ea
Reverted changes for pylint.
jiriburant f5263ba
Fixed dev requirements and MANIFEST
jiriburant f703cd9
Fixing async tests. Fixing comments.
jiriburant 3e09e24
Removed async mock to be compatible with the builds.
jiriburant cf9256f
Fixing test failures for Ubuntu and Mac
jiriburant ffda58d
Changed versions for python. Fixed pylint issue in version.
jiriburant ff9c526
Modified _version file to prevent path errors.
jiriburant 591bcdd
Added newline.
jiriburant 03f5064
Downgraded six version to match the frozen requirements.
jiriburant 14a48f5
Fixed async test errors by excluding asynchronous tests for python 2.7.
jiriburant 5f8fc23
Regenerated by autorest
jiriburant 216208f
Updated swagger definition.
jiriburant f73900e
Squashed commit of the following:
jiriburant 026649b
Fixed readme links and formatting. Added sdk_moniker for client
jiriburant 1e51336
Refactored authentication files. AAdded response sanitization.
jiriburant 6a2fc1a
Fixed linting issues.
jiriburant e8b9322
Modified version to beta.
jiriburant 9336ab1
Regenerated swagger with latest definitions, implemented missing asyn…
jiriburant 3dbbb5e
Fixing lint issues.
jiriburant 81c6f3f
Fixed pylint disable comment.
jiriburant 46ab396
Renamed sip routing client to match the conventions and updated tests.
jiriburant d8922b8
Removed -Patch from public namespace.
jiriburant 1e4f62c
Addressing comments from api review
jiriburant bee5c36
Removed older files in separate package
jiriburant 5dd3f4c
Updated version for azure.core to support newly generated code.
jiriburant 9d17a46
Implemented swagger definition for SIP routing
jiriburant ce00bad
Implemented SIP routing logic
jiriburant f1413f0
Implemented siprouting changes
jiriburant 34807f2
Added new types to public package
jiriburant cf958ea
Changed phone numbers test to work with package structure
jiriburant 1846f92
prepared recordings for sip routing
jiriburant 0eb018e
Added internal and public version of SipTrunk to accomodate for fqdn …
jiriburant dec049a
Fixing formatting.
jiriburant d38c191
Changed public interface.
jiriburant b4678f5
Recordings of e2e tests.
jiriburant 2349f1a
Addressing comments from second internal review.
jiriburant dc74c1e
Minor changes in cleaning up code. Added a few sample calls.
jiriburant 012ad16
Merge branch 'Azure:main' into master
jiriburant 29b148f
Added test for token auth
jiriburant e4e1d60
Merge branch 'Azure:main' into master
jiriburant 9176da9
Implemented inputs from api review
jiriburant eaf4682
Merged from master
jiriburant 5d3fd57
Fixed linting issues and credential issues.
jiriburant 0a422f2
Fixed test recordings.
jiriburant d157a4f
Removed test credentials.
jiriburant ed60fe9
Moved siprouting tests to common namespace and removed packaging on t…
jiriburant 0b176d7
Changed token authorization test to work in recorded mode.
jiriburant ec0b2ec
Restored setup.py file to avoid package clashes.
jiriburant 8252f24
Regenerated code with lower version of autorest to pass build validat…
jiriburant 79d9fc6
Renamed replace_trunks and replace_routes to set_trunks, set_routes
jiriburant 0aaab75
Renamed recordings of tests.
jiriburant d1ad44a
Added more tests for managed identity. Updated README and Changelog.
jiriburant 9736c52
Updated version.
jiriburant e44036d
Addressing comments from review.
jiriburant a68fbb8
Removing forgotten credential.
jiriburant daf47c8
Addressing comments from review
jiriburant File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
5 changes: 5 additions & 0 deletions
5
sdk/communication/azure-communication-phonenumbers/CHANGELOG.md
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
16 changes: 16 additions & 0 deletions
16
.../azure-communication-phonenumbers/azure/communication/phonenumbers/siprouting/__init__.py
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -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. | ||
| # -------------------------------------------------------------------------- | ||
|
|
||
|
|
||
| from ._sip_routing_client import SipRoutingClient | ||
| from ._generated.models import SipTrunkRoute | ||
| from ._models import SipTrunk | ||
|
|
||
| __all__ = [ | ||
| 'SipRoutingClient', | ||
| 'SipTrunk', | ||
| 'SipTrunkRoute' | ||
| ] |
15 changes: 15 additions & 0 deletions
15
...unication-phonenumbers/azure/communication/phonenumbers/siprouting/_generated/__init__.py
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,15 @@ | ||
| # 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 ._sip_routing_service import SIPRoutingService | ||
| __all__ = ['SIPRoutingService'] | ||
|
|
||
| # `._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() |
64 changes: 64 additions & 0 deletions
64
...ion-phonenumbers/azure/communication/phonenumbers/siprouting/_generated/_configuration.py
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -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. | ||
| # -------------------------------------------------------------------------- | ||
|
|
||
| from typing import TYPE_CHECKING | ||
|
|
||
| from azure.core.configuration import Configuration | ||
| from azure.core.pipeline import policies | ||
|
|
||
| if TYPE_CHECKING: | ||
| # pylint: disable=unused-import,ungrouped-imports | ||
| from typing import Any | ||
|
|
||
| VERSION = "unknown" | ||
|
|
||
| class SIPRoutingServiceConfiguration(Configuration): # pylint: disable=too-many-instance-attributes | ||
| """Configuration for SIPRoutingService. | ||
|
|
||
| Note that all parameters used to create this instance are saved as instance | ||
| attributes. | ||
|
|
||
| :param endpoint: The communication resource, for example | ||
| https://resourcename.communication.azure.com. | ||
| :type endpoint: str | ||
| :keyword api_version: Api Version. Default value is "2021-05-01-preview". Note that overriding | ||
| this default value may result in unsupported behavior. | ||
| :paramtype api_version: str | ||
| """ | ||
|
|
||
| def __init__( | ||
| self, | ||
| endpoint, # type: str | ||
| **kwargs # type: Any | ||
| ): | ||
| # type: (...) -> None | ||
| super(SIPRoutingServiceConfiguration, self).__init__(**kwargs) | ||
| api_version = kwargs.pop('api_version', "2021-05-01-preview") # type: str | ||
|
|
||
| if endpoint is None: | ||
| raise ValueError("Parameter 'endpoint' must not be None.") | ||
|
|
||
| self.endpoint = endpoint | ||
| self.api_version = api_version | ||
| kwargs.setdefault('sdk_moniker', 'siproutingservice/{}'.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') |
31 changes: 31 additions & 0 deletions
31
...mmunication-phonenumbers/azure/communication/phonenumbers/siprouting/_generated/_patch.py
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -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 |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.