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 azure-mgmt-compute] [test] Test new compute #1830

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from
Draft
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
54 changes: 50 additions & 4 deletions sdk/compute/azure-mgmt-compute/_meta.json
Original file line number Diff line number Diff line change
@@ -1,11 +1,57 @@
{
"commit": "07f6af5ba991088995d774e80e3d94b364611baf",
"repository_url": "https://github.com/Azure/azure-rest-api-specs",
"commit": "adec94a7eece4f91ca08c4a42b3ccddbccd87eaa",
"repository_url": "https://github.com/test-repo-billy/azure-rest-api-specs",
"autorest": "3.9.7",
"use": [
"@autorest/[email protected]",
"@autorest/[email protected]"
],
"autorest_command": "autorest specification/compute/resource-manager/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.7 --version-tolerant=False",
"readme": "specification/compute/resource-manager/readme.md"
"autorest_command": "autorest specification/compute/resource-manager/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.7 --version-tolerant=False",
"readme": "specification/compute/resource-manager/readme.md",
"package-2024-03-01-only": "2024-03-21 12:47:45 -0400 5312cc6da7d6c051e0e96902f3718a9fb3e9e021 Microsoft.Compute/ComputeRP/stable/2024-03-01/virtualMachineScaleSet.json",
"package-2023-10-02-only": "2023-12-19 03:18:52 -0500 4a4e7c0083937d49061641e857bc876043bb1f5b Microsoft.Compute/DiskRP/stable/2023-10-02/snapshot.json",
"package-2023-09-01-only": "2023-12-05 16:05:55 -0500 378977e71101fdf224414b86e9f7d8c776cd07ec Microsoft.Compute/ComputeRP/stable/2023-09-01/virtualMachineScaleSet.json",
"package-2023-07-03-only": "2024-02-08 13:16:01 -0500 f715b7fee5e648d06b17467b08473f6cbeee84e0 Microsoft.Compute/GalleryRP/stable/2023-07-03/sharedGallery.json",
"package-2023-07-01-only": "2023-08-10 16:21:40 -0400 1a925d1afe288a5f20d078bbc89214a36a0e4287 Microsoft.Compute/ComputeRP/stable/2023-07-01/virtualMachineScaleSet.json",
"package-2023-04-02-only": "2023-08-07 20:58:57 -0400 b9403296f0b0e112b0d8222ad05fd1d79ee10e03 Microsoft.Compute/DiskRP/stable/2023-04-02/diskRestorePoint.json",
"package-2023-03-01-only": "2023-04-17 22:42:05 -0400 b06a6f45e472dd07c2e0dab06b1e52dfe2684c88 Microsoft.Compute/ComputeRP/stable/2023-03-01/virtualMachineScaleSet.json",
"package-2023-01-02-only": "2023-06-28 00:48:15 -0400 b1d41f8dc643415d4dc6ee82bdb2fef04ef45bc9 Microsoft.Compute/DiskRP/stable/2023-01-02/snapshot.json",
"package-2022-11-01-only": "2023-03-01 02:28:46 -0500 03261080b3083a9e8cb0b61d840cc8291c596590 Microsoft.Compute/common-types/v1/common.json",
"package-2022-09-04-only": "2023-03-01 02:28:46 -0500 03261080b3083a9e8cb0b61d840cc8291c596590 Microsoft.Compute/common-types/v1/common.json",
"package-2022-08-03-only": "2023-11-28 14:37:35 -0500 a4d77e0bd0f00b66d42940a9be143fdb38534b1e Microsoft.Compute/GalleryRP/stable/2022-08-03/sharedGallery.json",
"package-2022-08-01-only": "2023-07-25 07:16:18 +0530 324d833f80ccd86dfd5b8035625ea17b537edf51 Microsoft.Compute/ComputeRP/stable/2022-08-01/computeRPCommon.json",
"package-2022-07-02-only": "2023-03-01 02:28:46 -0500 03261080b3083a9e8cb0b61d840cc8291c596590 Microsoft.Compute/common-types/v1/common.json",
"package-2022-04-04-only": "2022-08-04 22:48:19 -0400 a31c376ede1e91abc3ab476ae8e8d316e80541c0 Microsoft.Compute/CloudserviceRP/stable/2022-04-04/cloudService.json",
"package-2022-03-03-only": "2023-05-16 23:00:04 -0400 a2140e7ff0a6c28df501b16c51fe85b762a386fc Microsoft.Compute/GalleryRP/stable/2022-03-03/communityGallery.json",
"package-2022-03-02-only": "2022-08-04 22:48:19 -0400 a31c376ede1e91abc3ab476ae8e8d316e80541c0 Microsoft.Compute/DiskRP/stable/2022-03-02/snapshot.json",
"package-2022-03-01-only": "2022-10-13 19:55:58 -0700 ab898cdcc6e69ae41cb27ceee6abbe4e505e4a73 Microsoft.Compute/ComputeRP/stable/2022-03-01/virtualMachineScaleSet.json",
"package-2022-01-03-only": "2023-02-02 02:56:58 -0600 5920340193de5e6cbfdc514218bd76a602c22b4b Microsoft.Compute/GalleryRP/stable/2022-01-03/gallery.json",
"package-2021-12-01-only": "2022-07-31 21:47:43 -0400 2dcad6d6e9a96882eb6d317e7500a94be007a9c6 Microsoft.Compute/DiskRP/stable/2021-12-01/disk.json",
"package-2021-11-01-only": "2022-07-31 21:47:43 -0400 2dcad6d6e9a96882eb6d317e7500a94be007a9c6 Microsoft.Compute/ComputeRP/stable/2021-11-01/runCommands.json",
"package-2021-10-01-only": "2023-02-02 02:56:58 -0600 5920340193de5e6cbfdc514218bd76a602c22b4b Microsoft.Compute/GalleryRP/stable/2021-10-01/gallery.json",
"package-2021-08-01-only": "2022-07-31 21:47:43 -0400 2dcad6d6e9a96882eb6d317e7500a94be007a9c6 Microsoft.Compute/DiskRP/stable/2021-08-01/disk.json",
"package-2021-07-01-only": "2022-07-31 21:47:43 -0400 2dcad6d6e9a96882eb6d317e7500a94be007a9c6 Microsoft.Compute/Skus/stable/2021-07-01/skus.json",
"package-2021-04-01-only": "2022-07-31 21:47:43 -0400 2dcad6d6e9a96882eb6d317e7500a94be007a9c6 Microsoft.Compute/DiskRP/stable/2021-04-01/disk.json",
"package-2021-03-01-only": "2022-07-31 21:47:43 -0400 2dcad6d6e9a96882eb6d317e7500a94be007a9c6 Microsoft.Compute/ComputeRP/stable/2021-03-01/runCommands.json",
"package-2020-12-01-only": "2022-07-31 21:47:43 -0400 2dcad6d6e9a96882eb6d317e7500a94be007a9c6 Microsoft.Compute/DiskRP/stable/2020-12-01/disk.json",
"package-2020-10-01-preview-only": "2022-07-31 21:47:43 -0400 2dcad6d6e9a96882eb6d317e7500a94be007a9c6 Microsoft.Compute/CloudserviceRP/preview/2020-10-01-preview/cloudService.json",
"package-2020-09-30-only": "2022-07-31 21:47:43 -0400 2dcad6d6e9a96882eb6d317e7500a94be007a9c6 Microsoft.Compute/GalleryRP/preview/2020-09-30/sharedGallery.json",
"package-2020-06-30-only": "2022-07-31 21:47:43 -0400 2dcad6d6e9a96882eb6d317e7500a94be007a9c6 Microsoft.Compute/DiskRP/stable/2020-06-30/disk.json",
"package-2020-06-01-only": "2022-07-31 21:47:43 -0400 2dcad6d6e9a96882eb6d317e7500a94be007a9c6 Microsoft.Compute/ComputeRP/stable/2020-06-01/runCommands.json",
"package-2020-05-01-only": "2022-07-31 21:47:43 -0400 2dcad6d6e9a96882eb6d317e7500a94be007a9c6 Microsoft.Compute/DiskRP/stable/2020-05-01/disk.json",
"package-2019-12-01-only": "2022-07-31 21:47:43 -0400 2dcad6d6e9a96882eb6d317e7500a94be007a9c6 Microsoft.Compute/GalleryRP/stable/2019-12-01/gallery.json",
"package-2019-11-01-only": "2022-07-31 21:47:43 -0400 2dcad6d6e9a96882eb6d317e7500a94be007a9c6 Microsoft.Compute/DiskRP/stable/2019-11-01/disk.json",
"package-2019-07-01-only": "2022-07-31 21:47:43 -0400 2dcad6d6e9a96882eb6d317e7500a94be007a9c6 Microsoft.Compute/GalleryRP/stable/2019-07-01/gallery.json",
"package-2019-04-01-only": "2022-07-31 21:47:43 -0400 2dcad6d6e9a96882eb6d317e7500a94be007a9c6 Microsoft.Compute/Skus/stable/2019-04-01/skus.json",
"package-2019-03-01-only": "2022-07-31 21:47:43 -0400 2dcad6d6e9a96882eb6d317e7500a94be007a9c6 Microsoft.Compute/GalleryRP/stable/2019-03-01/gallery.json",
"package-2018-10-01-only": "2022-07-31 21:47:43 -0400 2dcad6d6e9a96882eb6d317e7500a94be007a9c6 Microsoft.Compute/ComputeRP/stable/2018-10-01/runCommands.json",
"package-2018-09-30-only": "2022-07-31 21:47:43 -0400 2dcad6d6e9a96882eb6d317e7500a94be007a9c6 Microsoft.Compute/DiskRP/stable/2018-09-30/disk.json",
"package-compute-only-2018-06": "2022-07-31 21:47:43 -0400 2dcad6d6e9a96882eb6d317e7500a94be007a9c6 Microsoft.Compute/GalleryRP/stable/2018-06-01/gallery.json",
"package-compute-2018-04": "2022-07-31 21:47:43 -0400 2dcad6d6e9a96882eb6d317e7500a94be007a9c6 Microsoft.Compute/DiskRP/stable/2018-04-01/disk.json",
"package-compute-only-2017-12": "2022-07-31 21:47:43 -0400 2dcad6d6e9a96882eb6d317e7500a94be007a9c6 Microsoft.Compute/ComputeRP/stable/2017-12-01/runCommands.json",
"package-skus-2017-09": "2022-07-31 21:47:43 -0400 2dcad6d6e9a96882eb6d317e7500a94be007a9c6 Microsoft.Compute/Skus/stable/2017-09-01/skus.json",
"package-compute-2017-03": "2022-07-31 21:47:43 -0400 2dcad6d6e9a96882eb6d317e7500a94be007a9c6 Microsoft.Compute/DiskRP/stable/2017-03-30/disk.json",
"package-compute-2016-04-preview": "2023-12-25 16:40:38 +0800 862e338466eccd19028eceb689b3a23f625a6f0c Microsoft.Compute/ComputeRP/preview/2016-04-30-preview/compute.json",
"package-compute-2016-03": "2022-07-31 21:47:43 -0400 2dcad6d6e9a96882eb6d317e7500a94be007a9c6 Microsoft.Compute/ComputeRP/stable/2016-03-30/compute.json",
"package-compute-2015-06": "2022-07-31 21:47:43 -0400 2dcad6d6e9a96882eb6d317e7500a94be007a9c6 Microsoft.Compute/ComputeRP/stable/2015-06-15/compute.json"
}
Original file line number Diff line number Diff line change
Expand Up @@ -1756,7 +1756,6 @@ def snapshots(self):
* 2022-03-02: :class:`SnapshotsOperations<azure.mgmt.compute.v2022_03_02.operations.SnapshotsOperations>`
* 2022-07-02: :class:`SnapshotsOperations<azure.mgmt.compute.v2022_07_02.operations.SnapshotsOperations>`
* 2023-01-02: :class:`SnapshotsOperations<azure.mgmt.compute.v2023_01_02.operations.SnapshotsOperations>`
* 2023-04-02: :class:`SnapshotsOperations<azure.mgmt.compute.v2023_04_02.operations.SnapshotsOperations>`
* 2023-10-02: :class:`SnapshotsOperations<azure.mgmt.compute.v2023_10_02.operations.SnapshotsOperations>`
"""
api_version = self._get_api_version('snapshots')
Expand Down Expand Up @@ -1796,8 +1795,6 @@ def snapshots(self):
from .v2022_07_02.operations import SnapshotsOperations as OperationClass
elif api_version == '2023-01-02':
from .v2023_01_02.operations import SnapshotsOperations as OperationClass
elif api_version == '2023-04-02':
from .v2023_04_02.operations import SnapshotsOperations as OperationClass
elif api_version == '2023-10-02':
from .v2023_10_02.operations import SnapshotsOperations as OperationClass
else:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1756,7 +1756,6 @@ def snapshots(self):
* 2022-03-02: :class:`SnapshotsOperations<azure.mgmt.compute.v2022_03_02.aio.operations.SnapshotsOperations>`
* 2022-07-02: :class:`SnapshotsOperations<azure.mgmt.compute.v2022_07_02.aio.operations.SnapshotsOperations>`
* 2023-01-02: :class:`SnapshotsOperations<azure.mgmt.compute.v2023_01_02.aio.operations.SnapshotsOperations>`
* 2023-04-02: :class:`SnapshotsOperations<azure.mgmt.compute.v2023_04_02.aio.operations.SnapshotsOperations>`
* 2023-10-02: :class:`SnapshotsOperations<azure.mgmt.compute.v2023_10_02.aio.operations.SnapshotsOperations>`
"""
api_version = self._get_api_version('snapshots')
Expand Down Expand Up @@ -1796,8 +1795,6 @@ def snapshots(self):
from ..v2022_07_02.aio.operations import SnapshotsOperations as OperationClass
elif api_version == '2023-01-02':
from ..v2023_01_02.aio.operations import SnapshotsOperations as OperationClass
elif api_version == '2023-04-02':
from ..v2023_04_02.aio.operations import SnapshotsOperations as OperationClass
elif api_version == '2023-10-02':
from ..v2023_10_02.aio.operations import SnapshotsOperations as OperationClass
else:
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 = "31.0.0"
VERSION = "1.0.0b1"
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 = "31.0.0"
VERSION = "1.0.0b1"
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 = "31.0.0"
VERSION = "1.0.0b1"
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,6 @@
build_images_delete_request,
build_images_get_request,
build_images_list_by_resource_group_request,
build_images_list_request,
build_snapshots_create_or_update_request,
build_snapshots_delete_request,
build_snapshots_get_request,
Expand Down Expand Up @@ -4153,86 +4152,6 @@ async def get_next(next_link=None):

return AsyncItemPaged(get_next, extract_data)

@distributed_trace
def list(self, **kwargs: Any) -> AsyncIterable["_models.Image"]:
"""Gets the list of Images in the subscription. Use nextLink property in the response to get the
next page of Images. Do this till nextLink is null to fetch all the Images.

:return: An iterator like instance of either Image or the result of cls(response)
:rtype:
~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.compute.v2016_04_30_preview.models.Image]
:raises ~azure.core.exceptions.HttpResponseError:
"""
_headers = kwargs.pop("headers", {}) or {}
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})

api_version: str = kwargs.pop(
"api_version", _params.pop("api-version", self._api_version or "2016-04-30-preview")
)
cls: ClsType[_models.ImageListResult] = kwargs.pop("cls", None)

error_map = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
304: ResourceNotModifiedError,
}
error_map.update(kwargs.pop("error_map", {}) or {})

def prepare_request(next_link=None):
if not next_link:

_request = build_images_list_request(
subscription_id=self._config.subscription_id,
api_version=api_version,
headers=_headers,
params=_params,
)
_request = _convert_request(_request)
_request.url = self._client.format_url(_request.url)

else:
# 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._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"
return _request

async def extract_data(pipeline_response):
deserialized = self._deserialize("ImageListResult", pipeline_response)
list_of_elem = deserialized.value
if cls:
list_of_elem = cls(list_of_elem) # type: ignore
return deserialized.next_link or None, AsyncList(list_of_elem)

async def get_next(next_link=None):
_request = prepare_request(next_link)

_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)

return pipeline_response

return AsyncItemPaged(get_next, extract_data)


class VirtualMachineScaleSetsOperations: # pylint: disable=too-many-public-methods
"""
Expand Down
Loading