Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions sdk/peering/azure-mgmt-peering/MANIFEST.in
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
include _meta.json
recursive-include tests *.py *.yaml
include *.md
include azure/__init__.py
Expand Down
8 changes: 8 additions & 0 deletions sdk/peering/azure-mgmt-peering/_meta.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"autorest": "3.3.0",
"use": "@autorest/[email protected]",
"commit": "e304f0d89247ec7d983167f5cfa6ed975a5e8a12",
"repository_url": "https://github.com/Azure/azure-rest-api-specs",
"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/[email protected] --version=3.3.0",
"readme": "specification/peering/resource-manager/readme.md"
}
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ def __init__(

self.credential = credential
self.subscription_id = subscription_id
self.api_version = "2020-10-01"
self.api_version = "2019-08-01-preview"
self.credential_scopes = kwargs.pop('credential_scopes', ['https://management.azure.com/.default'])
kwargs.setdefault('sdk_moniker', 'mgmt-peering/{}'.format(VERSION))
self._configure(**kwargs)
Expand Down
130 changes: 130 additions & 0 deletions sdk/peering/azure-mgmt-peering/azure/mgmt/peering/_metadata.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,130 @@
{
"chosen_version": "2019-08-01-preview",
"total_api_version_list": ["2019-08-01-preview"],
"client": {
"name": "PeeringManagementClient",
"filename": "_peering_management_client",
"description": "Peering Client.",
"base_url": "\u0027https://management.azure.com\u0027",
"custom_base_url": null,
"azure_arm": true,
"has_lro_operations": false,
"client_side_validation": false,
"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\"]}}}",
"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\"]}}}"
},
"global_parameters": {
"sync": {
"credential": {
"signature": "credential, # type: \"TokenCredential\"",
"description": "Credential needed for the client to connect to Azure.",
"docstring_type": "~azure.core.credentials.TokenCredential",
"required": true
},
"subscription_id": {
"signature": "subscription_id, # type: str",
"description": "The Azure subscription ID.",
"docstring_type": "str",
"required": true
}
},
"async": {
"credential": {
"signature": "credential: \"AsyncTokenCredential\",",
"description": "Credential needed for the client to connect to Azure.",
"docstring_type": "~azure.core.credentials_async.AsyncTokenCredential",
"required": true
},
"subscription_id": {
"signature": "subscription_id: str,",
"description": "The Azure subscription ID.",
"docstring_type": "str",
"required": true
}
},
"constant": {
},
"call": "credential, subscription_id",
"service_client_specific": {
"sync": {
"api_version": {
"signature": "api_version=None, # type: Optional[str]",
"description": "API version to use if no profile is provided, or if missing in profile.",
"docstring_type": "str",
"required": false
},
"base_url": {
"signature": "base_url=None, # type: Optional[str]",
"description": "Service URL",
"docstring_type": "str",
"required": false
},
"profile": {
"signature": "profile=KnownProfiles.default, # type: KnownProfiles",
"description": "A profile definition, from KnownProfiles to dict.",
"docstring_type": "azure.profiles.KnownProfiles",
"required": false
}
},
"async": {
"api_version": {
"signature": "api_version: Optional[str] = None,",
"description": "API version to use if no profile is provided, or if missing in profile.",
"docstring_type": "str",
"required": false
},
"base_url": {
"signature": "base_url: Optional[str] = None,",
"description": "Service URL",
"docstring_type": "str",
"required": false
},
"profile": {
"signature": "profile: KnownProfiles = KnownProfiles.default,",
"description": "A profile definition, from KnownProfiles to dict.",
"docstring_type": "azure.profiles.KnownProfiles",
"required": false
}
}
}
},
"config": {
"credential": true,
"credential_scopes": ["https://management.azure.com/.default"],
"credential_default_policy_type": "BearerTokenCredentialPolicy",
"credential_default_policy_type_has_async_version": true,
"credential_key_header_name": null,
"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\"]}}}",
"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\"]}}}"
},
"operation_groups": {
"legacy_peerings": "LegacyPeeringsOperations",
"operations": "Operations",
"peer_asns": "PeerAsnsOperations",
"peering_locations": "PeeringLocationsOperations",
"peerings": "PeeringsOperations",
"peering_service_locations": "PeeringServiceLocationsOperations",
"peering_service_prefixes": "PeeringServicePrefixesOperations",
"prefixes": "PrefixesOperations",
"peering_service_providers": "PeeringServiceProvidersOperations",
"peering_services": "PeeringServicesOperations"
},
"operation_mixins": {
"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\"]}}}",
"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\"]}}}",
"operations": {
"check_service_provider_availability" : {
"sync": {
"signature": "def check_service_provider_availability(\n self,\n check_service_provider_availability_input, # type: \"_models.CheckServiceProviderAvailabilityInput\"\n **kwargs # type: Any\n):\n",
"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\"\"\""
},
"async": {
"coroutine": true,
"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",
"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\"\"\""
},
"call": "check_service_provider_availability_input"
}
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -16,20 +16,17 @@
from typing import Any, Optional

from azure.core.credentials import TokenCredential
from azure.core.pipeline.transport import HttpRequest, HttpResponse

from ._configuration import PeeringManagementClientConfiguration
from .operations import CdnPeeringPrefixesOperations
from .operations import PeeringManagementClientOperationsMixin
from .operations import LegacyPeeringsOperations
from .operations import Operations
from .operations import PeerAsnsOperations
from .operations import PeeringLocationsOperations
from .operations import RegisteredAsnsOperations
from .operations import RegisteredPrefixesOperations
from .operations import PeeringsOperations
from .operations import ReceivedRoutesOperations
from .operations import PeeringServiceCountriesOperations
from .operations import PeeringServiceLocationsOperations
from .operations import PeeringServicePrefixesOperations
from .operations import PrefixesOperations
from .operations import PeeringServiceProvidersOperations
from .operations import PeeringServicesOperations
Expand All @@ -39,8 +36,6 @@
class PeeringManagementClient(PeeringManagementClientOperationsMixin):
"""Peering Client.

:ivar cdn_peering_prefixes: CdnPeeringPrefixesOperations operations
:vartype cdn_peering_prefixes: azure.mgmt.peering.operations.CdnPeeringPrefixesOperations
:ivar legacy_peerings: LegacyPeeringsOperations operations
:vartype legacy_peerings: azure.mgmt.peering.operations.LegacyPeeringsOperations
:ivar operations: Operations operations
Expand All @@ -49,18 +44,12 @@ class PeeringManagementClient(PeeringManagementClientOperationsMixin):
:vartype peer_asns: azure.mgmt.peering.operations.PeerAsnsOperations
:ivar peering_locations: PeeringLocationsOperations operations
:vartype peering_locations: azure.mgmt.peering.operations.PeeringLocationsOperations
:ivar registered_asns: RegisteredAsnsOperations operations
:vartype registered_asns: azure.mgmt.peering.operations.RegisteredAsnsOperations
:ivar registered_prefixes: RegisteredPrefixesOperations operations
:vartype registered_prefixes: azure.mgmt.peering.operations.RegisteredPrefixesOperations
:ivar peerings: PeeringsOperations operations
:vartype peerings: azure.mgmt.peering.operations.PeeringsOperations
:ivar received_routes: ReceivedRoutesOperations operations
:vartype received_routes: azure.mgmt.peering.operations.ReceivedRoutesOperations
:ivar peering_service_countries: PeeringServiceCountriesOperations operations
:vartype peering_service_countries: azure.mgmt.peering.operations.PeeringServiceCountriesOperations
:ivar peering_service_locations: PeeringServiceLocationsOperations operations
:vartype peering_service_locations: azure.mgmt.peering.operations.PeeringServiceLocationsOperations
:ivar peering_service_prefixes: PeeringServicePrefixesOperations operations
:vartype peering_service_prefixes: azure.mgmt.peering.operations.PeeringServicePrefixesOperations
:ivar prefixes: PrefixesOperations operations
:vartype prefixes: azure.mgmt.peering.operations.PrefixesOperations
:ivar peering_service_providers: PeeringServiceProvidersOperations operations
Expand Down Expand Up @@ -92,8 +81,6 @@ def __init__(
self._serialize.client_side_validation = False
self._deserialize = Deserializer(client_models)

self.cdn_peering_prefixes = CdnPeeringPrefixesOperations(
self._client, self._config, self._serialize, self._deserialize)
self.legacy_peerings = LegacyPeeringsOperations(
self._client, self._config, self._serialize, self._deserialize)
self.operations = Operations(
Expand All @@ -102,25 +89,37 @@ def __init__(
self._client, self._config, self._serialize, self._deserialize)
self.peering_locations = PeeringLocationsOperations(
self._client, self._config, self._serialize, self._deserialize)
self.registered_asns = RegisteredAsnsOperations(
self._client, self._config, self._serialize, self._deserialize)
self.registered_prefixes = RegisteredPrefixesOperations(
self._client, self._config, self._serialize, self._deserialize)
self.peerings = PeeringsOperations(
self._client, self._config, self._serialize, self._deserialize)
self.received_routes = ReceivedRoutesOperations(
self._client, self._config, self._serialize, self._deserialize)
self.peering_service_countries = PeeringServiceCountriesOperations(
self._client, self._config, self._serialize, self._deserialize)
self.peering_service_locations = PeeringServiceLocationsOperations(
self._client, self._config, self._serialize, self._deserialize)
self.peering_service_prefixes = PeeringServicePrefixesOperations(
self._client, self._config, self._serialize, self._deserialize)
self.prefixes = PrefixesOperations(
self._client, self._config, self._serialize, self._deserialize)
self.peering_service_providers = PeeringServiceProvidersOperations(
self._client, self._config, self._serialize, self._deserialize)
self.peering_services = PeeringServicesOperations(
self._client, self._config, self._serialize, self._deserialize)

def _send_request(self, http_request, **kwargs):
# type: (HttpRequest, Any) -> HttpResponse
"""Runs the network request through the client's chained policies.

:param http_request: The network request you want to make. Required.
:type http_request: ~azure.core.pipeline.transport.HttpRequest
:keyword bool stream: Whether the response payload will be streamed. Defaults to True.
:return: The response of your network call. Does not do error handling on your response.
:rtype: ~azure.core.pipeline.transport.HttpResponse
"""
path_format_arguments = {
'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'),
}
http_request.url = self._client.format_url(http_request.url, **path_format_arguments)
stream = kwargs.pop("stream", True)
pipeline_response = self._client._pipeline.run(http_request, stream=stream, **kwargs)
return pipeline_response.http_response

def close(self):
# type: () -> None
self._client.close()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,4 @@
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
# --------------------------------------------------------------------------

VERSION = "1.0.0b1"

VERSION = "0.2.0"
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ def __init__(

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