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
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
6 changes: 3 additions & 3 deletions sdk/containerservice/azure-mgmt-containerservice/_meta.json
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
{
"commit": "288939a1c67efd5f129124ea0912ca17ff7b9d90",
"commit": "2e2202b46476cc19424d804faad709fff4cd1696",
"repository_url": "https://github.com/Azure/azure-rest-api-specs",
"autorest": "3.9.2",
"use": [
"@autorest/python@6.4.12",
"@autorest/python@6.6.0",
"@autorest/modelerfour@4.24.3"
],
"autorest_command": "autorest specification/containerservice/resource-manager/Microsoft.ContainerService/aks/readme.md --generate-sample=True --include-x-ms-examples-original-file=True --python --python-sdks-folder=/home/vsts/work/1/azure-sdk-for-python/sdk --use=@autorest/python@6.4.12 --use=@autorest/modelerfour@4.24.3 --version=3.9.2 --version-tolerant=False",
"autorest_command": "autorest specification/containerservice/resource-manager/Microsoft.ContainerService/aks/readme.md --generate-sample=True --include-x-ms-examples-original-file=True --python --python-sdks-folder=/mnt/vss/_work/1/s/azure-sdk-for-python/sdk --use=@autorest/python@6.6.0 --use=@autorest/modelerfour@4.24.3 --version=3.9.2 --version-tolerant=False",
"readme": "specification/containerservice/resource-manager/Microsoft.ContainerService/aks/readme.md"
}

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,4 @@
# license information.
# --------------------------------------------------------------------------

VERSION = "23.0.0"
VERSION = "0.1.0"

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
# Licensed under the MIT License. See License.txt in the project root for
# license information.
# --------------------------------------------------------------------------
from .v2017_07_01.models import *
from .v2019_04_01.models import *
from .v2019_04_30.models import *
from .v2022_09_02_preview.models import *
from .v2023_04_01.models import *
from .v2023_05_01.models import *
Original file line number Diff line number Diff line change
Expand Up @@ -30,17 +30,23 @@ class ContainerServiceClientConfiguration(Configuration): # pylint: disable=too
:param subscription_id: Subscription credentials which uniquely identify Microsoft Azure
subscription. The subscription ID forms part of the URI for every service call. Required.
:type subscription_id: str
:keyword api_version: Api Version. Default value is "2017-07-01". Note that overriding this
default value may result in unsupported behavior.
:paramtype api_version: str
"""

def __init__(self, credential: "TokenCredential", subscription_id: str, **kwargs: Any) -> None:
super(ContainerServiceClientConfiguration, self).__init__(**kwargs)
api_version: str = kwargs.pop("api_version", "2017-07-01")

if credential is None:
raise ValueError("Parameter 'credential' must not be None.")
if subscription_id is None:
raise ValueError("Parameter 'subscription_id' must not be None.")

self.credential = credential
self.subscription_id = subscription_id
self.api_version = api_version
self.credential_scopes = kwargs.pop("credential_scopes", ["https://management.azure.com/.default"])
kwargs.setdefault("sdk_moniker", "mgmt-containerservice/{}".format(VERSION))
self._configure(**kwargs)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,9 @@ class ContainerServiceClient: # pylint: disable=client-accepts-api-version-keyw
:type subscription_id: str
:param base_url: Service URL. Default value is "https://management.azure.com".
:type base_url: str
:keyword api_version: Api Version. Default value is "2017-07-01". Note that overriding this
default value may result in unsupported behavior.
:paramtype api_version: str
:keyword int polling_interval: Default waiting time between two polls for LRO operations if no
Retry-After header is present.
"""
Expand All @@ -56,7 +59,7 @@ def __init__(
self._deserialize = Deserializer(client_models)
self._serialize.client_side_validation = False
self.container_services = ContainerServicesOperations(
self._client, self._config, self._serialize, self._deserialize
self._client, self._config, self._serialize, self._deserialize, "2017-07-01"
)

def _send_request(self, request: HttpRequest, **kwargs: Any) -> HttpResponse:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"chosen_version": "2017-07-01",
"total_api_version_list": ["2017-07-01", "2019-04-01"],
"total_api_version_list": ["2017-07-01"],
"client": {
"name": "ContainerServiceClient",
"filename": "_container_service_client",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,4 @@
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
# --------------------------------------------------------------------------

VERSION = "23.0.0"
VERSION = "1.0.0b1"
Original file line number Diff line number Diff line change
Expand Up @@ -30,17 +30,23 @@ class ContainerServiceClientConfiguration(Configuration): # pylint: disable=too
:param subscription_id: Subscription credentials which uniquely identify Microsoft Azure
subscription. The subscription ID forms part of the URI for every service call. Required.
:type subscription_id: str
:keyword api_version: Api Version. Default value is "2017-07-01". Note that overriding this
default value may result in unsupported behavior.
:paramtype api_version: str
"""

def __init__(self, credential: "AsyncTokenCredential", subscription_id: str, **kwargs: Any) -> None:
super(ContainerServiceClientConfiguration, self).__init__(**kwargs)
api_version: str = kwargs.pop("api_version", "2017-07-01")

if credential is None:
raise ValueError("Parameter 'credential' must not be None.")
if subscription_id is None:
raise ValueError("Parameter 'subscription_id' must not be None.")

self.credential = credential
self.subscription_id = subscription_id
self.api_version = api_version
self.credential_scopes = kwargs.pop("credential_scopes", ["https://management.azure.com/.default"])
kwargs.setdefault("sdk_moniker", "mgmt-containerservice/{}".format(VERSION))
self._configure(**kwargs)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,9 @@ class ContainerServiceClient: # pylint: disable=client-accepts-api-version-keyw
:type subscription_id: str
:param base_url: Service URL. Default value is "https://management.azure.com".
:type base_url: str
:keyword api_version: Api Version. Default value is "2017-07-01". Note that overriding this
default value may result in unsupported behavior.
:paramtype api_version: str
:keyword int polling_interval: Default waiting time between two polls for LRO operations if no
Retry-After header is present.
"""
Expand All @@ -56,7 +59,7 @@ def __init__(
self._deserialize = Deserializer(client_models)
self._serialize.client_side_validation = False
self.container_services = ContainerServicesOperations(
self._client, self._config, self._serialize, self._deserialize
self._client, self._config, self._serialize, self._deserialize, "2017-07-01"
)

def _send_request(self, request: HttpRequest, **kwargs: Any) -> Awaitable[AsyncHttpResponse]:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
# --------------------------------------------------------------------------
from io import IOBase
from typing import Any, AsyncIterable, Callable, Dict, IO, Optional, TypeVar, Union, cast, overload
import urllib.parse

from azure.core.async_paging import AsyncItemPaged, AsyncList
from azure.core.exceptions import (
Expand Down Expand Up @@ -35,7 +36,6 @@
build_delete_request,
build_get_request,
build_list_by_resource_group_request,
build_list_orchestrators_request,
build_list_request,
)

Expand All @@ -61,6 +61,7 @@ def __init__(self, *args, **kwargs) -> None:
self._config = input_args.pop(0) if input_args else kwargs.pop("config")
self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer")
self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer")
self._api_version = input_args.pop(0) if input_args else kwargs.pop("api_version")

@distributed_trace
def list(self, **kwargs: Any) -> AsyncIterable["_models.ContainerService"]:
Expand All @@ -79,7 +80,7 @@ def list(self, **kwargs: Any) -> AsyncIterable["_models.ContainerService"]:
_headers = kwargs.pop("headers", {}) or {}
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})

api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2017-07-01"))
api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2017-07-01"))
cls: ClsType[_models.ContainerServiceListResult] = kwargs.pop("cls", None)

error_map = {
Expand All @@ -104,7 +105,18 @@ def prepare_request(next_link=None):
request.url = self._client.format_url(request.url)

else:
request = HttpRequest("GET", next_link)
# make call to next link with the client's api-version
_parsed_next_link = urllib.parse.urlparse(next_link)
_next_request_params = case_insensitive_dict(
{
key: [urllib.parse.quote(v) for v in value]
for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items()
}
)
_next_request_params["api-version"] = self._config.api_version
request = HttpRequest(
"GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params
)
request = _convert_request(request)
request.url = self._client.format_url(request.url)
request.method = "GET"
Expand Down Expand Up @@ -154,7 +166,7 @@ async def _create_or_update_initial(
_headers = case_insensitive_dict(kwargs.pop("headers", {}) or {})
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})

api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2017-07-01"))
api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2017-07-01"))
content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None))
cls: ClsType[_models.ContainerService] = kwargs.pop("cls", None)

Expand Down Expand Up @@ -333,7 +345,7 @@ async def begin_create_or_update(
_headers = case_insensitive_dict(kwargs.pop("headers", {}) or {})
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})

api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2017-07-01"))
api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2017-07-01"))
content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None))
cls: ClsType[_models.ContainerService] = kwargs.pop("cls", None)
polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True)
Expand Down Expand Up @@ -409,7 +421,7 @@ async def get(
_headers = kwargs.pop("headers", {}) or {}
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})

api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2017-07-01"))
api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2017-07-01"))
cls: ClsType[_models.ContainerService] = kwargs.pop("cls", None)

request = build_get_request(
Expand Down Expand Up @@ -460,7 +472,7 @@ async def _delete_initial( # pylint: disable=inconsistent-return-statements
_headers = kwargs.pop("headers", {}) or {}
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})

api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2017-07-01"))
api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2017-07-01"))
cls: ClsType[None] = kwargs.pop("cls", None)

request = build_delete_request(
Expand Down Expand Up @@ -524,7 +536,7 @@ async def begin_delete(
_headers = kwargs.pop("headers", {}) or {}
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})

api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2017-07-01"))
api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2017-07-01"))
cls: ClsType[None] = kwargs.pop("cls", None)
polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True)
lro_delay = kwargs.pop("polling_interval", self._config.polling_interval)
Expand Down Expand Up @@ -585,7 +597,7 @@ def list_by_resource_group(
_headers = kwargs.pop("headers", {}) or {}
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})

api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2017-07-01"))
api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2017-07-01"))
cls: ClsType[_models.ContainerServiceListResult] = kwargs.pop("cls", None)

error_map = {
Expand All @@ -611,7 +623,18 @@ def prepare_request(next_link=None):
request.url = self._client.format_url(request.url)

else:
request = HttpRequest("GET", next_link)
# make call to next link with the client's api-version
_parsed_next_link = urllib.parse.urlparse(next_link)
_next_request_params = case_insensitive_dict(
{
key: [urllib.parse.quote(v) for v in value]
for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items()
}
)
_next_request_params["api-version"] = self._config.api_version
request = HttpRequest(
"GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params
)
request = _convert_request(request)
request.url = self._client.format_url(request.url)
request.method = "GET"
Expand Down Expand Up @@ -644,71 +667,3 @@ async def get_next(next_link=None):
list_by_resource_group.metadata = {
"url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/containerServices"
}

@distributed_trace_async
async def list_orchestrators(
self, location: str, resource_type: Optional[str] = None, **kwargs: Any
) -> _models.OrchestratorVersionProfileListResult:
"""Gets a list of supported orchestrators in the specified subscription.

Gets a list of supported orchestrators in the specified subscription. The operation returns
properties of each orchestrator including version, available upgrades and whether that version
or upgrades are in preview.

:param location: The name of a supported Azure region. Required.
:type location: str
:param resource_type: resource type for which the list of orchestrators needs to be returned.
Default value is None.
:type resource_type: str
:keyword callable cls: A custom type or function that will be passed the direct response
:return: OrchestratorVersionProfileListResult or the result of cls(response)
:rtype: ~azure.mgmt.containerservice.v2017_07_01.models.OrchestratorVersionProfileListResult
:raises ~azure.core.exceptions.HttpResponseError:
"""
error_map = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
304: ResourceNotModifiedError,
}
error_map.update(kwargs.pop("error_map", {}) or {})

_headers = kwargs.pop("headers", {}) or {}
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})

api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-04-01"))
cls: ClsType[_models.OrchestratorVersionProfileListResult] = kwargs.pop("cls", None)

request = build_list_orchestrators_request(
location=location,
subscription_id=self._config.subscription_id,
resource_type=resource_type,
api_version=api_version,
template_url=self.list_orchestrators.metadata["url"],
headers=_headers,
params=_params,
)
request = _convert_request(request)
request.url = self._client.format_url(request.url)

_stream = False
pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access
request, stream=_stream, **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, error_format=ARMErrorFormat)

deserialized = self._deserialize("OrchestratorVersionProfileListResult", pipeline_response)

if cls:
return cls(pipeline_response, deserialized, {})

return deserialized

list_orchestrators.metadata = {
"url": "/subscriptions/{subscriptionId}/providers/Microsoft.ContainerService/locations/{location}/orchestrators"
}
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,6 @@
from ._models_py3 import ContainerServiceVMDiagnostics
from ._models_py3 import ContainerServiceWindowsProfile
from ._models_py3 import KeyVaultSecretRef
from ._models_py3 import OrchestratorProfile
from ._models_py3 import OrchestratorVersionProfile
from ._models_py3 import OrchestratorVersionProfileListResult
from ._models_py3 import Resource

from ._container_service_client_enums import ContainerServiceOrchestratorTypes
Expand All @@ -49,9 +46,6 @@
"ContainerServiceVMDiagnostics",
"ContainerServiceWindowsProfile",
"KeyVaultSecretRef",
"OrchestratorProfile",
"OrchestratorVersionProfile",
"OrchestratorVersionProfileListResult",
"Resource",
"ContainerServiceOrchestratorTypes",
"ContainerServiceStorageProfileTypes",
Expand Down
Loading