Skip to content
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

[AutoPR track2_azure-mgmt-containerservicefleet] [Fleet][Dev] API 0615 changes #4167

Closed
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
16 changes: 10 additions & 6 deletions sdk/containerservice/azure-mgmt-containerservicefleet/_meta.json
Original file line number Diff line number Diff line change
@@ -1,11 +1,15 @@
{
"commit": "1fea23ac36b111293dc3efc30f725e9ebb790f7f",
"commit": "6acfe0c7323bd9b487416de7d3368e1470df25b2",
"repository_url": "https://github.com/Azure/azure-rest-api-specs",
"autorest": "3.9.2",
"autorest": "3.9.6",
"use": [
"@autorest/python@6.4.12",
"@autorest/modelerfour@4.24.3"
"@autorest/python@6.6.0",
"@autorest/modelerfour@4.26.2"
],
"autorest_command": "autorest specification/containerservice/resource-manager/Microsoft.ContainerService/fleet/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/[email protected] --use=@autorest/[email protected] --version=3.9.2 --version-tolerant=False",
"readme": "specification/containerservice/resource-manager/Microsoft.ContainerService/fleet/readme.md"
"autorest_command": "autorest specification/containerservice/resource-manager/Microsoft.ContainerService/fleet/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/[email protected] --use=@autorest/[email protected] --version=3.9.6 --version-tolerant=False",
"readme": "specification/containerservice/resource-manager/Microsoft.ContainerService/fleet/readme.md",
"package-2023-03-preview": "2023-07-26 17:10:43 -0700 438d2db3745d0427a7405f8c48a5b8135ea1a570 preview/2023-03-15-preview/fleets.json",
"package-2022-09-preview": "2023-07-26 17:07:03 -0700 eef0e9097a290db596eb688805f05597bef63f33 preview/2022-09-02-preview/fleets.json",
"package-2022-07-preview": "2023-02-15 15:17:59 +0800 67527326606bd3c71700e2b96ff3c9ce9e655e29 preview/2022-07-02-preview/fleets.json",
"package-2022-06-preview": "2023-02-15 15:17:59 +0800 67527326606bd3c71700e2b96ff3c9ce9e655e29 preview/2022-06-02-preview/fleets.json"
}
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,8 @@ def __init__(
profile: KnownProfiles=KnownProfiles.default,
**kwargs: Any
):
if api_version:
kwargs.setdefault('api_version', api_version)
self._config = ContainerServiceFleetMgmtClientConfiguration(credential, subscription_id, **kwargs)
self._client = ARMPipelineClient(base_url=base_url, config=self._config, **kwargs)
super(ContainerServiceFleetMgmtClient, self).__init__(
Expand Down Expand Up @@ -126,7 +128,7 @@ def fleet_members(self):
else:
raise ValueError("API version {} does not have operation group 'fleet_members'".format(api_version))
self._config.api_version = api_version
return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version)))
return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version)), api_version)

@property
def fleets(self):
Expand All @@ -149,7 +151,7 @@ def fleets(self):
else:
raise ValueError("API version {} does not have operation group 'fleets'".format(api_version))
self._config.api_version = api_version
return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version)))
return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version)), api_version)

@property
def operations(self):
Expand All @@ -166,7 +168,7 @@ def operations(self):
else:
raise ValueError("API version {} does not have operation group 'operations'".format(api_version))
self._config.api_version = api_version
return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version)))
return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version)), api_version)

@property
def update_runs(self):
Expand All @@ -180,7 +182,7 @@ def update_runs(self):
else:
raise ValueError("API version {} does not have operation group 'update_runs'".format(api_version))
self._config.api_version = api_version
return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version)))
return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version)), api_version)

def close(self):
self._client.close()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,8 @@ def __init__(
profile: KnownProfiles = KnownProfiles.default,
**kwargs: Any
) -> None:
if api_version:
kwargs.setdefault('api_version', api_version)
self._config = ContainerServiceFleetMgmtClientConfiguration(credential, subscription_id, **kwargs)
self._client = AsyncARMPipelineClient(base_url=base_url, config=self._config, **kwargs)
super(ContainerServiceFleetMgmtClient, self).__init__(
Expand Down Expand Up @@ -126,7 +128,7 @@ def fleet_members(self):
else:
raise ValueError("API version {} does not have operation group 'fleet_members'".format(api_version))
self._config.api_version = api_version
return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version)))
return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version)), api_version)

@property
def fleets(self):
Expand All @@ -149,7 +151,7 @@ def fleets(self):
else:
raise ValueError("API version {} does not have operation group 'fleets'".format(api_version))
self._config.api_version = api_version
return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version)))
return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version)), api_version)

@property
def operations(self):
Expand All @@ -166,7 +168,7 @@ def operations(self):
else:
raise ValueError("API version {} does not have operation group 'operations'".format(api_version))
self._config.api_version = api_version
return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version)))
return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version)), api_version)

@property
def update_runs(self):
Expand All @@ -180,7 +182,7 @@ def update_runs(self):
else:
raise ValueError("API version {} does not have operation group 'update_runs'".format(api_version))
self._config.api_version = api_version
return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version)))
return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version)), api_version)

async def close(self):
await self._client.close()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -62,9 +62,15 @@ def __init__(
self._serialize = Serializer(client_models)
self._deserialize = Deserializer(client_models)
self._serialize.client_side_validation = False
self.operations = Operations(self._client, self._config, self._serialize, self._deserialize)
self.fleets = FleetsOperations(self._client, self._config, self._serialize, self._deserialize)
self.fleet_members = FleetMembersOperations(self._client, self._config, self._serialize, self._deserialize)
self.operations = Operations(
self._client, self._config, self._serialize, self._deserialize, "2022-09-02-preview"
)
self.fleets = FleetsOperations(
self._client, self._config, self._serialize, self._deserialize, "2022-09-02-preview"
)
self.fleet_members = FleetMembersOperations(
self._client, self._config, self._serialize, self._deserialize, "2022-09-02-preview"
)

def _send_request(self, request: HttpRequest, **kwargs: Any) -> HttpResponse:
"""Runs the network request through the client's chained policies.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -63,9 +63,15 @@ def __init__(
self._serialize = Serializer(client_models)
self._deserialize = Deserializer(client_models)
self._serialize.client_side_validation = False
self.operations = Operations(self._client, self._config, self._serialize, self._deserialize)
self.fleets = FleetsOperations(self._client, self._config, self._serialize, self._deserialize)
self.fleet_members = FleetMembersOperations(self._client, self._config, self._serialize, self._deserialize)
self.operations = Operations(
self._client, self._config, self._serialize, self._deserialize, "2022-09-02-preview"
)
self.fleets = FleetsOperations(
self._client, self._config, self._serialize, self._deserialize, "2022-09-02-preview"
)
self.fleet_members = FleetMembersOperations(
self._client, self._config, self._serialize, self._deserialize, "2022-09-02-preview"
)

def _send_request(self, request: HttpRequest, **kwargs: Any) -> Awaitable[AsyncHttpResponse]:
"""Runs the network request through the client's chained policies.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,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_by_fleet(
Expand All @@ -81,7 +82,9 @@ def list_by_fleet(
_headers = kwargs.pop("headers", {}) or {}
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})

api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-09-02-preview"))
api_version: str = kwargs.pop(
"api_version", _params.pop("api-version", self._api_version or "2022-09-02-preview")
)
cls: ClsType[_models.FleetMemberListResult] = kwargs.pop("cls", None)

error_map = {
Expand Down Expand Up @@ -183,7 +186,9 @@ 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", "2022-09-02-preview"))
api_version: str = kwargs.pop(
"api_version", _params.pop("api-version", self._api_version or "2022-09-02-preview")
)
cls: ClsType[_models.FleetMember] = kwargs.pop("cls", None)

request = build_get_request(
Expand Down Expand Up @@ -243,7 +248,9 @@ async def _create_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", "2022-09-02-preview"))
api_version: str = kwargs.pop(
"api_version", _params.pop("api-version", self._api_version or "2022-09-02-preview")
)
content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None))
cls: ClsType[_models.FleetMember] = kwargs.pop("cls", None)

Expand Down Expand Up @@ -448,7 +455,9 @@ async def begin_create(
_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", "2022-09-02-preview"))
api_version: str = kwargs.pop(
"api_version", _params.pop("api-version", self._api_version or "2022-09-02-preview")
)
content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None))
cls: ClsType[_models.FleetMember] = kwargs.pop("cls", None)
polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True)
Expand Down Expand Up @@ -518,7 +527,9 @@ 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", "2022-09-02-preview"))
api_version: str = kwargs.pop(
"api_version", _params.pop("api-version", self._api_version or "2022-09-02-preview")
)
cls: ClsType[None] = kwargs.pop("cls", None)

request = build_delete_request(
Expand Down Expand Up @@ -595,7 +606,9 @@ 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", "2022-09-02-preview"))
api_version: str = kwargs.pop(
"api_version", _params.pop("api-version", self._api_version or "2022-09-02-preview")
)
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
Loading