Skip to content

Commit d9e38e0

Browse files
Azure CLI BotSDKAutoRAY-316
authored
[AutoRelease] t2-peering-2021-04-25-24239(wave4) (Azure#18284)
* CodeGen from PR 14106 in Azure/azure-rest-api-specs peering readme t2 config (Azure#14106) * version,CHANGELOG * test * peering changelog config Co-authored-by: SDKAuto <sdkautomation@microsoft.com> Co-authored-by: PythonSdkPipelines <PythonSdkPipelines> Co-authored-by: Zed <601306339@qq.com>
1 parent d1ad6d8 commit d9e38e0

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

48 files changed

+645
-3859
lines changed

sdk/peering/azure-mgmt-peering/CHANGELOG.md

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,36 @@
11
# Release History
22

3+
## 1.0.0 (2021-04-25)
4+
5+
**Features**
6+
7+
- Model PeerAsn has a new parameter peer_contact_info
8+
- Added operation group PeeringServicePrefixesOperations
9+
10+
**Breaking changes**
11+
12+
- Operation PrefixesOperations.list_by_peering_service has a new signature
13+
- Operation PeeringServiceLocationsOperations.list has a new signature
14+
- Operation LegacyPeeringsOperations.list has a new signature
15+
- Model DirectConnection no longer has parameter error_message
16+
- Model DirectConnection no longer has parameter microsoft_tracking_id
17+
- Model PeeringServicePrefix no longer has parameter events
18+
- Model PeeringServicePrefix no longer has parameter error_message
19+
- Model PeeringServicePrefix no longer has parameter peering_service_prefix_key
20+
- Model ExchangeConnection no longer has parameter error_message
21+
- Model PeerAsn no longer has parameter error_message
22+
- Model PeerAsn no longer has parameter peer_contact_detail
23+
- Model PeeringService no longer has parameter sku
24+
- Model ErrorResponse has a new signature
25+
- Removed operation PrefixesOperations.delete
26+
- Removed operation PrefixesOperations.create_or_update
27+
- Removed operation PrefixesOperations.get
28+
- Removed operation group CdnPeeringPrefixesOperations
29+
- Removed operation group ReceivedRoutesOperations
30+
- Removed operation group RegisteredAsnsOperations
31+
- Removed operation group PeeringServiceCountriesOperations
32+
- Removed operation group RegisteredPrefixesOperations
33+
334
## 1.0.0b1 (2020-12-07)
435

536
This is beta preview version.

sdk/peering/azure-mgmt-peering/MANIFEST.in

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
include _meta.json
12
recursive-include tests *.py *.yaml
23
include *.md
34
include azure/__init__.py
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
{
2+
"autorest": "3.3.0",
3+
"use": "@autorest/python@5.6.6",
4+
"commit": "e304f0d89247ec7d983167f5cfa6ed975a5e8a12",
5+
"repository_url": "https://github.com/Azure/azure-rest-api-specs",
6+
"autorest_command": "autorest specification/peering/resource-manager/readme.md --multiapi --python --python-mode=update --python-sdks-folder=/home/vsts/work/1/s/azure-sdk-for-python/sdk --track2 --use=@autorest/python@5.6.6 --version=3.3.0",
7+
"readme": "specification/peering/resource-manager/readme.md"
8+
}

sdk/peering/azure-mgmt-peering/azure/mgmt/peering/_configuration.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ def __init__(
4848

4949
self.credential = credential
5050
self.subscription_id = subscription_id
51-
self.api_version = "2020-10-01"
51+
self.api_version = "2019-08-01-preview"
5252
self.credential_scopes = kwargs.pop('credential_scopes', ['https://management.azure.com/.default'])
5353
kwargs.setdefault('sdk_moniker', 'mgmt-peering/{}'.format(VERSION))
5454
self._configure(**kwargs)
Lines changed: 130 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,130 @@
1+
{
2+
"chosen_version": "2019-08-01-preview",
3+
"total_api_version_list": ["2019-08-01-preview"],
4+
"client": {
5+
"name": "PeeringManagementClient",
6+
"filename": "_peering_management_client",
7+
"description": "Peering Client.",
8+
"base_url": "\u0027https://management.azure.com\u0027",
9+
"custom_base_url": null,
10+
"azure_arm": true,
11+
"has_lro_operations": false,
12+
"client_side_validation": false,
13+
"sync_imports": "{\"typing\": {\"azurecore\": {\"azure.core.credentials\": [\"TokenCredential\"]}}, \"regular\": {\"azurecore\": {\"azure.profiles\": [\"KnownProfiles\", \"ProfileDefinition\"], \"azure.profiles.multiapiclient\": [\"MultiApiClientMixin\"], \"msrest\": [\"Deserializer\", \"Serializer\"], \"azure.mgmt.core\": [\"ARMPipelineClient\"]}, \"local\": {\"._configuration\": [\"PeeringManagementClientConfiguration\"], \"._operations_mixin\": [\"PeeringManagementClientOperationsMixin\"]}}, \"conditional\": {\"stdlib\": {\"typing\": [\"Any\", \"Optional\"]}, \"azurecore\": {\"azure.core.pipeline.transport\": [\"HttpRequest\", \"HttpResponse\"]}}}",
14+
"async_imports": "{\"typing\": {\"azurecore\": {\"azure.core.credentials_async\": [\"AsyncTokenCredential\"]}}, \"regular\": {\"azurecore\": {\"azure.profiles\": [\"KnownProfiles\", \"ProfileDefinition\"], \"azure.profiles.multiapiclient\": [\"MultiApiClientMixin\"], \"msrest\": [\"Deserializer\", \"Serializer\"], \"azure.mgmt.core\": [\"AsyncARMPipelineClient\"]}, \"local\": {\"._configuration\": [\"PeeringManagementClientConfiguration\"], \"._operations_mixin\": [\"PeeringManagementClientOperationsMixin\"]}}, \"conditional\": {\"stdlib\": {\"typing\": [\"Any\", \"Optional\"]}, \"azurecore\": {\"azure.core.pipeline.transport\": [\"AsyncHttpResponse\", \"HttpRequest\"]}}}"
15+
},
16+
"global_parameters": {
17+
"sync": {
18+
"credential": {
19+
"signature": "credential, # type: \"TokenCredential\"",
20+
"description": "Credential needed for the client to connect to Azure.",
21+
"docstring_type": "~azure.core.credentials.TokenCredential",
22+
"required": true
23+
},
24+
"subscription_id": {
25+
"signature": "subscription_id, # type: str",
26+
"description": "The Azure subscription ID.",
27+
"docstring_type": "str",
28+
"required": true
29+
}
30+
},
31+
"async": {
32+
"credential": {
33+
"signature": "credential: \"AsyncTokenCredential\",",
34+
"description": "Credential needed for the client to connect to Azure.",
35+
"docstring_type": "~azure.core.credentials_async.AsyncTokenCredential",
36+
"required": true
37+
},
38+
"subscription_id": {
39+
"signature": "subscription_id: str,",
40+
"description": "The Azure subscription ID.",
41+
"docstring_type": "str",
42+
"required": true
43+
}
44+
},
45+
"constant": {
46+
},
47+
"call": "credential, subscription_id",
48+
"service_client_specific": {
49+
"sync": {
50+
"api_version": {
51+
"signature": "api_version=None, # type: Optional[str]",
52+
"description": "API version to use if no profile is provided, or if missing in profile.",
53+
"docstring_type": "str",
54+
"required": false
55+
},
56+
"base_url": {
57+
"signature": "base_url=None, # type: Optional[str]",
58+
"description": "Service URL",
59+
"docstring_type": "str",
60+
"required": false
61+
},
62+
"profile": {
63+
"signature": "profile=KnownProfiles.default, # type: KnownProfiles",
64+
"description": "A profile definition, from KnownProfiles to dict.",
65+
"docstring_type": "azure.profiles.KnownProfiles",
66+
"required": false
67+
}
68+
},
69+
"async": {
70+
"api_version": {
71+
"signature": "api_version: Optional[str] = None,",
72+
"description": "API version to use if no profile is provided, or if missing in profile.",
73+
"docstring_type": "str",
74+
"required": false
75+
},
76+
"base_url": {
77+
"signature": "base_url: Optional[str] = None,",
78+
"description": "Service URL",
79+
"docstring_type": "str",
80+
"required": false
81+
},
82+
"profile": {
83+
"signature": "profile: KnownProfiles = KnownProfiles.default,",
84+
"description": "A profile definition, from KnownProfiles to dict.",
85+
"docstring_type": "azure.profiles.KnownProfiles",
86+
"required": false
87+
}
88+
}
89+
}
90+
},
91+
"config": {
92+
"credential": true,
93+
"credential_scopes": ["https://management.azure.com/.default"],
94+
"credential_default_policy_type": "BearerTokenCredentialPolicy",
95+
"credential_default_policy_type_has_async_version": true,
96+
"credential_key_header_name": null,
97+
"sync_imports": "{\"regular\": {\"azurecore\": {\"azure.core.configuration\": [\"Configuration\"], \"azure.core.pipeline\": [\"policies\"], \"azure.mgmt.core.policies\": [\"ARMHttpLoggingPolicy\"]}, \"local\": {\"._version\": [\"VERSION\"]}}, \"conditional\": {\"stdlib\": {\"typing\": [\"Any\"]}}, \"typing\": {\"azurecore\": {\"azure.core.credentials\": [\"TokenCredential\"]}}}",
98+
"async_imports": "{\"regular\": {\"azurecore\": {\"azure.core.configuration\": [\"Configuration\"], \"azure.core.pipeline\": [\"policies\"], \"azure.mgmt.core.policies\": [\"ARMHttpLoggingPolicy\"]}, \"local\": {\".._version\": [\"VERSION\"]}}, \"conditional\": {\"stdlib\": {\"typing\": [\"Any\"]}}, \"typing\": {\"azurecore\": {\"azure.core.credentials_async\": [\"AsyncTokenCredential\"]}}}"
99+
},
100+
"operation_groups": {
101+
"legacy_peerings": "LegacyPeeringsOperations",
102+
"operations": "Operations",
103+
"peer_asns": "PeerAsnsOperations",
104+
"peering_locations": "PeeringLocationsOperations",
105+
"peerings": "PeeringsOperations",
106+
"peering_service_locations": "PeeringServiceLocationsOperations",
107+
"peering_service_prefixes": "PeeringServicePrefixesOperations",
108+
"prefixes": "PrefixesOperations",
109+
"peering_service_providers": "PeeringServiceProvidersOperations",
110+
"peering_services": "PeeringServicesOperations"
111+
},
112+
"operation_mixins": {
113+
"sync_imports": "{\"regular\": {\"azurecore\": {\"azure.core.exceptions\": [\"ClientAuthenticationError\", \"HttpResponseError\", \"ResourceExistsError\", \"ResourceNotFoundError\", \"map_error\"], \"azure.mgmt.core.exceptions\": [\"ARMErrorFormat\"], \"azure.core.pipeline\": [\"PipelineResponse\"], \"azure.core.pipeline.transport\": [\"HttpRequest\", \"HttpResponse\"]}, \"stdlib\": {\"warnings\": [null]}}, \"conditional\": {\"stdlib\": {\"typing\": [\"Any\", \"Callable\", \"Dict\", \"Generic\", \"Optional\", \"TypeVar\", \"Union\"]}}}",
114+
"async_imports": "{\"regular\": {\"azurecore\": {\"azure.core.exceptions\": [\"ClientAuthenticationError\", \"HttpResponseError\", \"ResourceExistsError\", \"ResourceNotFoundError\", \"map_error\"], \"azure.mgmt.core.exceptions\": [\"ARMErrorFormat\"], \"azure.core.pipeline\": [\"PipelineResponse\"], \"azure.core.pipeline.transport\": [\"AsyncHttpResponse\", \"HttpRequest\"]}, \"stdlib\": {\"warnings\": [null]}}, \"conditional\": {\"stdlib\": {\"typing\": [\"Any\", \"Callable\", \"Dict\", \"Generic\", \"Optional\", \"TypeVar\", \"Union\"]}}}",
115+
"operations": {
116+
"check_service_provider_availability" : {
117+
"sync": {
118+
"signature": "def check_service_provider_availability(\n self,\n check_service_provider_availability_input, # type: \"_models.CheckServiceProviderAvailabilityInput\"\n **kwargs # type: Any\n):\n",
119+
"doc": "\"\"\"Checks if the peering service provider is present within 1000 miles of customer\u0027s location.\n\n:param check_service_provider_availability_input: The CheckServiceProviderAvailabilityInput\n indicating customer location and service provider.\n:type check_service_provider_availability_input: ~azure.mgmt.peering.models.CheckServiceProviderAvailabilityInput\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: Enum0, or the result of cls(response)\n:rtype: str or ~azure.mgmt.peering.models.Enum0\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\""
120+
},
121+
"async": {
122+
"coroutine": true,
123+
"signature": "async def check_service_provider_availability(\n self,\n check_service_provider_availability_input: \"_models.CheckServiceProviderAvailabilityInput\",\n **kwargs\n) -\u003e Union[str, \"_models.Enum0\"]:\n",
124+
"doc": "\"\"\"Checks if the peering service provider is present within 1000 miles of customer\u0027s location.\n\n:param check_service_provider_availability_input: The CheckServiceProviderAvailabilityInput\n indicating customer location and service provider.\n:type check_service_provider_availability_input: ~azure.mgmt.peering.models.CheckServiceProviderAvailabilityInput\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: Enum0, or the result of cls(response)\n:rtype: str or ~azure.mgmt.peering.models.Enum0\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\""
125+
},
126+
"call": "check_service_provider_availability_input"
127+
}
128+
}
129+
}
130+
}

sdk/peering/azure-mgmt-peering/azure/mgmt/peering/_peering_management_client.py

Lines changed: 24 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -16,20 +16,17 @@
1616
from typing import Any, Optional
1717

1818
from azure.core.credentials import TokenCredential
19+
from azure.core.pipeline.transport import HttpRequest, HttpResponse
1920

2021
from ._configuration import PeeringManagementClientConfiguration
21-
from .operations import CdnPeeringPrefixesOperations
2222
from .operations import PeeringManagementClientOperationsMixin
2323
from .operations import LegacyPeeringsOperations
2424
from .operations import Operations
2525
from .operations import PeerAsnsOperations
2626
from .operations import PeeringLocationsOperations
27-
from .operations import RegisteredAsnsOperations
28-
from .operations import RegisteredPrefixesOperations
2927
from .operations import PeeringsOperations
30-
from .operations import ReceivedRoutesOperations
31-
from .operations import PeeringServiceCountriesOperations
3228
from .operations import PeeringServiceLocationsOperations
29+
from .operations import PeeringServicePrefixesOperations
3330
from .operations import PrefixesOperations
3431
from .operations import PeeringServiceProvidersOperations
3532
from .operations import PeeringServicesOperations
@@ -39,8 +36,6 @@
3936
class PeeringManagementClient(PeeringManagementClientOperationsMixin):
4037
"""Peering Client.
4138
42-
:ivar cdn_peering_prefixes: CdnPeeringPrefixesOperations operations
43-
:vartype cdn_peering_prefixes: azure.mgmt.peering.operations.CdnPeeringPrefixesOperations
4439
:ivar legacy_peerings: LegacyPeeringsOperations operations
4540
:vartype legacy_peerings: azure.mgmt.peering.operations.LegacyPeeringsOperations
4641
:ivar operations: Operations operations
@@ -49,18 +44,12 @@ class PeeringManagementClient(PeeringManagementClientOperationsMixin):
4944
:vartype peer_asns: azure.mgmt.peering.operations.PeerAsnsOperations
5045
:ivar peering_locations: PeeringLocationsOperations operations
5146
:vartype peering_locations: azure.mgmt.peering.operations.PeeringLocationsOperations
52-
:ivar registered_asns: RegisteredAsnsOperations operations
53-
:vartype registered_asns: azure.mgmt.peering.operations.RegisteredAsnsOperations
54-
:ivar registered_prefixes: RegisteredPrefixesOperations operations
55-
:vartype registered_prefixes: azure.mgmt.peering.operations.RegisteredPrefixesOperations
5647
:ivar peerings: PeeringsOperations operations
5748
:vartype peerings: azure.mgmt.peering.operations.PeeringsOperations
58-
:ivar received_routes: ReceivedRoutesOperations operations
59-
:vartype received_routes: azure.mgmt.peering.operations.ReceivedRoutesOperations
60-
:ivar peering_service_countries: PeeringServiceCountriesOperations operations
61-
:vartype peering_service_countries: azure.mgmt.peering.operations.PeeringServiceCountriesOperations
6249
:ivar peering_service_locations: PeeringServiceLocationsOperations operations
6350
:vartype peering_service_locations: azure.mgmt.peering.operations.PeeringServiceLocationsOperations
51+
:ivar peering_service_prefixes: PeeringServicePrefixesOperations operations
52+
:vartype peering_service_prefixes: azure.mgmt.peering.operations.PeeringServicePrefixesOperations
6453
:ivar prefixes: PrefixesOperations operations
6554
:vartype prefixes: azure.mgmt.peering.operations.PrefixesOperations
6655
:ivar peering_service_providers: PeeringServiceProvidersOperations operations
@@ -92,8 +81,6 @@ def __init__(
9281
self._serialize.client_side_validation = False
9382
self._deserialize = Deserializer(client_models)
9483

95-
self.cdn_peering_prefixes = CdnPeeringPrefixesOperations(
96-
self._client, self._config, self._serialize, self._deserialize)
9784
self.legacy_peerings = LegacyPeeringsOperations(
9885
self._client, self._config, self._serialize, self._deserialize)
9986
self.operations = Operations(
@@ -102,25 +89,37 @@ def __init__(
10289
self._client, self._config, self._serialize, self._deserialize)
10390
self.peering_locations = PeeringLocationsOperations(
10491
self._client, self._config, self._serialize, self._deserialize)
105-
self.registered_asns = RegisteredAsnsOperations(
106-
self._client, self._config, self._serialize, self._deserialize)
107-
self.registered_prefixes = RegisteredPrefixesOperations(
108-
self._client, self._config, self._serialize, self._deserialize)
10992
self.peerings = PeeringsOperations(
11093
self._client, self._config, self._serialize, self._deserialize)
111-
self.received_routes = ReceivedRoutesOperations(
112-
self._client, self._config, self._serialize, self._deserialize)
113-
self.peering_service_countries = PeeringServiceCountriesOperations(
114-
self._client, self._config, self._serialize, self._deserialize)
11594
self.peering_service_locations = PeeringServiceLocationsOperations(
11695
self._client, self._config, self._serialize, self._deserialize)
96+
self.peering_service_prefixes = PeeringServicePrefixesOperations(
97+
self._client, self._config, self._serialize, self._deserialize)
11798
self.prefixes = PrefixesOperations(
11899
self._client, self._config, self._serialize, self._deserialize)
119100
self.peering_service_providers = PeeringServiceProvidersOperations(
120101
self._client, self._config, self._serialize, self._deserialize)
121102
self.peering_services = PeeringServicesOperations(
122103
self._client, self._config, self._serialize, self._deserialize)
123104

105+
def _send_request(self, http_request, **kwargs):
106+
# type: (HttpRequest, Any) -> HttpResponse
107+
"""Runs the network request through the client's chained policies.
108+
109+
:param http_request: The network request you want to make. Required.
110+
:type http_request: ~azure.core.pipeline.transport.HttpRequest
111+
:keyword bool stream: Whether the response payload will be streamed. Defaults to True.
112+
:return: The response of your network call. Does not do error handling on your response.
113+
:rtype: ~azure.core.pipeline.transport.HttpResponse
114+
"""
115+
path_format_arguments = {
116+
'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'),
117+
}
118+
http_request.url = self._client.format_url(http_request.url, **path_format_arguments)
119+
stream = kwargs.pop("stream", True)
120+
pipeline_response = self._client._pipeline.run(http_request, stream=stream, **kwargs)
121+
return pipeline_response.http_response
122+
124123
def close(self):
125124
# type: () -> None
126125
self._client.close()

sdk/peering/azure-mgmt-peering/azure/mgmt/peering/_version.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,5 +6,4 @@
66
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
77
# --------------------------------------------------------------------------
88

9-
VERSION = "1.0.0b1"
10-
9+
VERSION = "1.0.0"

sdk/peering/azure-mgmt-peering/azure/mgmt/peering/aio/_configuration.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ def __init__(
4545

4646
self.credential = credential
4747
self.subscription_id = subscription_id
48-
self.api_version = "2020-10-01"
48+
self.api_version = "2019-08-01-preview"
4949
self.credential_scopes = kwargs.pop('credential_scopes', ['https://management.azure.com/.default'])
5050
kwargs.setdefault('sdk_moniker', 'mgmt-peering/{}'.format(VERSION))
5151
self._configure(**kwargs)

0 commit comments

Comments
 (0)