Skip to content

Commit a6fee8f

Browse files
author
SDKAuto
committed
CodeGen from PR 15939 in Azure/azure-rest-api-specs
Merge cc7b1b960ad03f757329179eec5d48c78d588a4c into cbb456b
1 parent 3fdbaa7 commit a6fee8f

38 files changed

+8495
-10094
lines changed
Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,11 @@
11
{
2-
"autorest": "3.0.6369",
3-
"use": "@autorest/[email protected]",
4-
"commit": "90167a86aca9eed5d51c299b262212738e233e2a",
2+
"autorest": "3.4.5",
3+
"use": [
4+
"@autorest/[email protected]",
5+
"@autorest/[email protected]"
6+
],
7+
"commit": "a99d393c26684bbb9b4d66531ed1eb9ba9d11e23",
58
"repository_url": "https://github.com/Azure/azure-rest-api-specs",
6-
"autorest_command": "autorest specification/labservices/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.2 --version=3.0.6369",
9+
"autorest_command": "autorest specification/labservices/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.8.4 --use=@autorest/[email protected].2 --version=3.4.5",
710
"readme": "specification/labservices/resource-manager/readme.md"
811
}

sdk/labservices/azure-mgmt-labservices/azure/mgmt/labservices/__init__.py

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

9-
from ._managed_labs_client import ManagedLabsClient
9+
from ._lab_services_client import LabServicesClient
1010
from ._version import VERSION
1111

1212
__version__ = VERSION
13-
__all__ = ['ManagedLabsClient']
13+
__all__ = ['LabServicesClient']
1414

1515
try:
1616
from ._patch import patch_sdk # type: ignore

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

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -21,15 +21,15 @@
2121
from azure.core.credentials import TokenCredential
2222

2323

24-
class ManagedLabsClientConfiguration(Configuration):
25-
"""Configuration for ManagedLabsClient.
24+
class LabServicesClientConfiguration(Configuration):
25+
"""Configuration for LabServicesClient.
2626
2727
Note that all parameters used to create this instance are saved as instance
2828
attributes.
2929
3030
:param credential: Credential needed for the client to connect to Azure.
3131
:type credential: ~azure.core.credentials.TokenCredential
32-
:param subscription_id: The subscription ID.
32+
:param subscription_id: The ID of the target subscription.
3333
:type subscription_id: str
3434
"""
3535

@@ -44,11 +44,11 @@ def __init__(
4444
raise ValueError("Parameter 'credential' must not be None.")
4545
if subscription_id is None:
4646
raise ValueError("Parameter 'subscription_id' must not be None.")
47-
super(ManagedLabsClientConfiguration, self).__init__(**kwargs)
47+
super(LabServicesClientConfiguration, self).__init__(**kwargs)
4848

4949
self.credential = credential
5050
self.subscription_id = subscription_id
51-
self.api_version = "2018-10-15"
51+
self.api_version = "2021-10-01-preview"
5252
self.credential_scopes = kwargs.pop('credential_scopes', ['https://management.azure.com/.default'])
5353
kwargs.setdefault('sdk_moniker', 'mgmt-labservices/{}'.format(VERSION))
5454
self._configure(**kwargs)

sdk/labservices/azure-mgmt-labservices/azure/mgmt/labservices/_managed_labs_client.py renamed to sdk/labservices/azure-mgmt-labservices/azure/mgmt/labservices/_lab_services_client.py

Lines changed: 47 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -16,44 +16,42 @@
1616
from typing import Any, Optional
1717

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

20-
from ._configuration import ManagedLabsClientConfiguration
21-
from .operations import ProviderOperationsOperations
22-
from .operations import GlobalUsersOperations
23-
from .operations import LabAccountsOperations
21+
from ._configuration import LabServicesClientConfiguration
2422
from .operations import Operations
25-
from .operations import GalleryImagesOperations
23+
from .operations import OperationResultsOperations
24+
from .operations import LabPlansOperations
25+
from .operations import ImagesOperations
2626
from .operations import LabsOperations
27-
from .operations import EnvironmentSettingsOperations
28-
from .operations import EnvironmentsOperations
2927
from .operations import UsersOperations
28+
from .operations import VirtualMachinesOperations
29+
from .operations import SchedulesOperations
3030
from . import models
3131

3232

33-
class ManagedLabsClient(object):
34-
"""The Managed Labs Client.
33+
class LabServicesClient(object):
34+
"""Azure Lab Services REST API.
3535
36-
:ivar provider_operations: ProviderOperationsOperations operations
37-
:vartype provider_operations: azure.mgmt.labservices.operations.ProviderOperationsOperations
38-
:ivar global_users: GlobalUsersOperations operations
39-
:vartype global_users: azure.mgmt.labservices.operations.GlobalUsersOperations
40-
:ivar lab_accounts: LabAccountsOperations operations
41-
:vartype lab_accounts: azure.mgmt.labservices.operations.LabAccountsOperations
4236
:ivar operations: Operations operations
4337
:vartype operations: azure.mgmt.labservices.operations.Operations
44-
:ivar gallery_images: GalleryImagesOperations operations
45-
:vartype gallery_images: azure.mgmt.labservices.operations.GalleryImagesOperations
38+
:ivar operation_results: OperationResultsOperations operations
39+
:vartype operation_results: azure.mgmt.labservices.operations.OperationResultsOperations
40+
:ivar lab_plans: LabPlansOperations operations
41+
:vartype lab_plans: azure.mgmt.labservices.operations.LabPlansOperations
42+
:ivar images: ImagesOperations operations
43+
:vartype images: azure.mgmt.labservices.operations.ImagesOperations
4644
:ivar labs: LabsOperations operations
4745
:vartype labs: azure.mgmt.labservices.operations.LabsOperations
48-
:ivar environment_settings: EnvironmentSettingsOperations operations
49-
:vartype environment_settings: azure.mgmt.labservices.operations.EnvironmentSettingsOperations
50-
:ivar environments: EnvironmentsOperations operations
51-
:vartype environments: azure.mgmt.labservices.operations.EnvironmentsOperations
5246
:ivar users: UsersOperations operations
5347
:vartype users: azure.mgmt.labservices.operations.UsersOperations
48+
:ivar virtual_machines: VirtualMachinesOperations operations
49+
:vartype virtual_machines: azure.mgmt.labservices.operations.VirtualMachinesOperations
50+
:ivar schedules: SchedulesOperations operations
51+
:vartype schedules: azure.mgmt.labservices.operations.SchedulesOperations
5452
:param credential: Credential needed for the client to connect to Azure.
5553
:type credential: ~azure.core.credentials.TokenCredential
56-
:param subscription_id: The subscription ID.
54+
:param subscription_id: The ID of the target subscription.
5755
:type subscription_id: str
5856
:param str base_url: Service URL
5957
:keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present.
@@ -69,39 +67,55 @@ def __init__(
6967
# type: (...) -> None
7068
if not base_url:
7169
base_url = 'https://management.azure.com'
72-
self._config = ManagedLabsClientConfiguration(credential, subscription_id, **kwargs)
70+
self._config = LabServicesClientConfiguration(credential, subscription_id, **kwargs)
7371
self._client = ARMPipelineClient(base_url=base_url, config=self._config, **kwargs)
7472

7573
client_models = {k: v for k, v in models.__dict__.items() if isinstance(v, type)}
7674
self._serialize = Serializer(client_models)
7775
self._serialize.client_side_validation = False
7876
self._deserialize = Deserializer(client_models)
7977

80-
self.provider_operations = ProviderOperationsOperations(
81-
self._client, self._config, self._serialize, self._deserialize)
82-
self.global_users = GlobalUsersOperations(
78+
self.operations = Operations(
8379
self._client, self._config, self._serialize, self._deserialize)
84-
self.lab_accounts = LabAccountsOperations(
80+
self.operation_results = OperationResultsOperations(
8581
self._client, self._config, self._serialize, self._deserialize)
86-
self.operations = Operations(
82+
self.lab_plans = LabPlansOperations(
8783
self._client, self._config, self._serialize, self._deserialize)
88-
self.gallery_images = GalleryImagesOperations(
84+
self.images = ImagesOperations(
8985
self._client, self._config, self._serialize, self._deserialize)
9086
self.labs = LabsOperations(
9187
self._client, self._config, self._serialize, self._deserialize)
92-
self.environment_settings = EnvironmentSettingsOperations(
88+
self.users = UsersOperations(
9389
self._client, self._config, self._serialize, self._deserialize)
94-
self.environments = EnvironmentsOperations(
90+
self.virtual_machines = VirtualMachinesOperations(
9591
self._client, self._config, self._serialize, self._deserialize)
96-
self.users = UsersOperations(
92+
self.schedules = SchedulesOperations(
9793
self._client, self._config, self._serialize, self._deserialize)
9894

95+
def _send_request(self, http_request, **kwargs):
96+
# type: (HttpRequest, Any) -> HttpResponse
97+
"""Runs the network request through the client's chained policies.
98+
99+
:param http_request: The network request you want to make. Required.
100+
:type http_request: ~azure.core.pipeline.transport.HttpRequest
101+
:keyword bool stream: Whether the response payload will be streamed. Defaults to True.
102+
:return: The response of your network call. Does not do error handling on your response.
103+
:rtype: ~azure.core.pipeline.transport.HttpResponse
104+
"""
105+
path_format_arguments = {
106+
'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1),
107+
}
108+
http_request.url = self._client.format_url(http_request.url, **path_format_arguments)
109+
stream = kwargs.pop("stream", True)
110+
pipeline_response = self._client._pipeline.run(http_request, stream=stream, **kwargs)
111+
return pipeline_response.http_response
112+
99113
def close(self):
100114
# type: () -> None
101115
self._client.close()
102116

103117
def __enter__(self):
104-
# type: () -> ManagedLabsClient
118+
# type: () -> LabServicesClient
105119
self._client.__enter__()
106120
return self
107121

sdk/labservices/azure-mgmt-labservices/azure/mgmt/labservices/_metadata.json

Lines changed: 15 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,17 @@
11
{
2-
"chosen_version": "2018-10-15",
3-
"total_api_version_list": ["2018-10-15"],
2+
"chosen_version": "2021-10-01-preview",
3+
"total_api_version_list": ["2021-10-01-preview"],
44
"client": {
5-
"name": "ManagedLabsClient",
6-
"filename": "_managed_labs_client",
7-
"description": "The Managed Labs Client.",
5+
"name": "LabServicesClient",
6+
"filename": "_lab_services_client",
7+
"description": "Azure Lab Services REST API.",
88
"base_url": "\u0027https://management.azure.com\u0027",
99
"custom_base_url": null,
1010
"azure_arm": true,
1111
"has_lro_operations": true,
1212
"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\": [\"ManagedLabsClientConfiguration\"]}}, \"conditional\": {\"stdlib\": {\"typing\": [\"Any\", \"Optional\"]}}}",
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\": [\"ManagedLabsClientConfiguration\"]}}, \"conditional\": {\"stdlib\": {\"typing\": [\"Any\", \"Optional\"]}}}"
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\": [\"LabServicesClientConfiguration\"]}}, \"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\": [\"LabServicesClientConfiguration\"]}}, \"conditional\": {\"stdlib\": {\"typing\": [\"Any\", \"Optional\"]}, \"azurecore\": {\"azure.core.pipeline.transport\": [\"AsyncHttpResponse\", \"HttpRequest\"]}}}"
1515
},
1616
"global_parameters": {
1717
"sync": {
@@ -23,7 +23,7 @@
2323
},
2424
"subscription_id": {
2525
"signature": "subscription_id, # type: str",
26-
"description": "The subscription ID.",
26+
"description": "The ID of the target subscription.",
2727
"docstring_type": "str",
2828
"required": true
2929
}
@@ -37,7 +37,7 @@
3737
},
3838
"subscription_id": {
3939
"signature": "subscription_id: str,",
40-
"description": "The subscription ID.",
40+
"description": "The ID of the target subscription.",
4141
"docstring_type": "str",
4242
"required": true
4343
}
@@ -98,20 +98,13 @@
9898
"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\"]}}}"
9999
},
100100
"operation_groups": {
101-
"provider_operations": "ProviderOperationsOperations",
102-
"global_users": "GlobalUsersOperations",
103-
"lab_accounts": "LabAccountsOperations",
104101
"operations": "Operations",
105-
"gallery_images": "GalleryImagesOperations",
102+
"operation_results": "OperationResultsOperations",
103+
"lab_plans": "LabPlansOperations",
104+
"images": "ImagesOperations",
106105
"labs": "LabsOperations",
107-
"environment_settings": "EnvironmentSettingsOperations",
108-
"environments": "EnvironmentsOperations",
109-
"users": "UsersOperations"
110-
},
111-
"operation_mixins": {
112-
"sync_imports": "None",
113-
"async_imports": "None",
114-
"operations": {
115-
}
106+
"users": "UsersOperations",
107+
"virtual_machines": "VirtualMachinesOperations",
108+
"schedules": "SchedulesOperations"
116109
}
117110
}

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

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

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

sdk/labservices/azure-mgmt-labservices/azure/mgmt/labservices/aio/__init__.py

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

9-
from ._managed_labs_client import ManagedLabsClient
10-
__all__ = ['ManagedLabsClient']
9+
from ._lab_services_client import LabServicesClient
10+
__all__ = ['LabServicesClient']

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

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -19,15 +19,15 @@
1919
from azure.core.credentials_async import AsyncTokenCredential
2020

2121

22-
class ManagedLabsClientConfiguration(Configuration):
23-
"""Configuration for ManagedLabsClient.
22+
class LabServicesClientConfiguration(Configuration):
23+
"""Configuration for LabServicesClient.
2424
2525
Note that all parameters used to create this instance are saved as instance
2626
attributes.
2727
2828
:param credential: Credential needed for the client to connect to Azure.
2929
:type credential: ~azure.core.credentials_async.AsyncTokenCredential
30-
:param subscription_id: The subscription ID.
30+
:param subscription_id: The ID of the target subscription.
3131
:type subscription_id: str
3232
"""
3333

@@ -41,11 +41,11 @@ def __init__(
4141
raise ValueError("Parameter 'credential' must not be None.")
4242
if subscription_id is None:
4343
raise ValueError("Parameter 'subscription_id' must not be None.")
44-
super(ManagedLabsClientConfiguration, self).__init__(**kwargs)
44+
super(LabServicesClientConfiguration, self).__init__(**kwargs)
4545

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

0 commit comments

Comments
 (0)