Skip to content

Commit 6d6f68b

Browse files
msyycSDKAutoRAY-316
authored
[AutoRelease] t2-hybridcompute-2021-04-15-18223 (Azure#18062)
* CodeGen from PR 13910 in Azure/azure-rest-api-specs hybridcompute readme t2 config (Azure#13910) * readme t2 config * hybridcompute t2 readme config * version,CHANGELOG * test * hybridcompute changelog config Co-authored-by: SDKAuto <sdkautomation@microsoft.com> Co-authored-by: PythonSdkPipelines <PythonSdkPipelines> Co-authored-by: Zed <601306339@qq.com> Co-authored-by: Zed Lei <59104634+RAY-316@users.noreply.github.com>
1 parent f4c8a8c commit 6d6f68b

35 files changed

+4574
-2470
lines changed

sdk/hybridcompute/azure-mgmt-hybridcompute/CHANGELOG.md

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,30 @@
11
# Release History
22

3+
## 7.0.0 (2021-04-15)
4+
5+
**Features**
6+
7+
- Model MachineUpdateProperties has a new parameter private_link_scope_resource_id
8+
- Model MachineUpdateProperties has a new parameter parent_cluster_resource_id
9+
- Model MachineProperties has a new parameter private_link_scope_resource_id
10+
- Model MachineProperties has a new parameter parent_cluster_resource_id
11+
- Model MachineProperties has a new parameter detected_properties
12+
- Added operation group PrivateLinkResourcesOperations
13+
- Added operation group PrivateEndpointConnectionsOperations
14+
- Added operation group PrivateLinkScopesOperations
15+
16+
**Breaking changes**
17+
18+
- Operation MachinesOperations.delete has a new signature
19+
- Operation MachinesOperations.get has a new signature
20+
- Model ErrorDetail has a new signature
21+
- Model OperationValue has a new signature
22+
- Model Machine has a new signature
23+
- Model MachineExtension has a new signature
24+
- Model MachineExtensionInstanceViewStatus has a new signature
25+
- Model MachineUpdate has a new signature
26+
- Model MachineExtensionUpdate has a new signature
27+
328
## 7.0.0b1 (2020-12-07)
429

530
This is beta preview version.

sdk/hybridcompute/azure-mgmt-hybridcompute/MANIFEST.in

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
include _meta.json
12
recursive-include tests *.py *.yaml
23
include *.md
34
include azure/__init__.py
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
{
2+
"autorest": "3.3.0",
3+
"use": "@autorest/python@5.6.6",
4+
"commit": "a3a99cb1a7fac19acb046b4920fce6945dc7e8a2",
5+
"repository_url": "https://github.com/Azure/azure-rest-api-specs",
6+
"autorest_command": "autorest specification/hybridcompute/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.6 --version=3.3.0",
7+
"readme": "specification/hybridcompute/resource-manager/readme.md"
8+
}

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

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,9 @@
77
# --------------------------------------------------------------------------
88

99
from ._hybrid_compute_management_client import HybridComputeManagementClient
10+
from ._version import VERSION
11+
12+
__version__ = VERSION
1013
__all__ = ['HybridComputeManagementClient']
1114

1215
try:

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

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,13 +12,14 @@
1212
from azure.core.pipeline import policies
1313
from azure.mgmt.core.policies import ARMHttpLoggingPolicy
1414

15+
from ._version import VERSION
16+
1517
if TYPE_CHECKING:
1618
# pylint: disable=unused-import,ungrouped-imports
1719
from typing import Any
1820

1921
from azure.core.credentials import TokenCredential
2022

21-
VERSION = "unknown"
2223

2324
class HybridComputeManagementClientConfiguration(Configuration):
2425
"""Configuration for HybridComputeManagementClient.
@@ -28,7 +29,7 @@ class HybridComputeManagementClientConfiguration(Configuration):
2829
2930
:param credential: Credential needed for the client to connect to Azure.
3031
:type credential: ~azure.core.credentials.TokenCredential
31-
:param subscription_id: Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call.
32+
:param subscription_id: The ID of the target subscription.
3233
:type subscription_id: str
3334
"""
3435

@@ -47,7 +48,7 @@ def __init__(
4748

4849
self.credential = credential
4950
self.subscription_id = subscription_id
50-
self.api_version = "2020-08-02"
51+
self.api_version = "2021-03-25-preview"
5152
self.credential_scopes = kwargs.pop('credential_scopes', ['https://management.azure.com/.default'])
5253
kwargs.setdefault('sdk_moniker', 'mgmt-hybridcompute/{}'.format(VERSION))
5354
self._configure(**kwargs)

sdk/hybridcompute/azure-mgmt-hybridcompute/azure/mgmt/hybridcompute/_hybrid_compute_management_client.py

Lines changed: 35 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,11 +16,15 @@
1616
from typing import Any, Optional
1717

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

2021
from ._configuration import HybridComputeManagementClientConfiguration
2122
from .operations import MachinesOperations
2223
from .operations import MachineExtensionsOperations
2324
from .operations import Operations
25+
from .operations import PrivateLinkScopesOperations
26+
from .operations import PrivateLinkResourcesOperations
27+
from .operations import PrivateEndpointConnectionsOperations
2428
from . import models
2529

2630

@@ -33,9 +37,15 @@ class HybridComputeManagementClient(object):
3337
:vartype machine_extensions: azure.mgmt.hybridcompute.operations.MachineExtensionsOperations
3438
:ivar operations: Operations operations
3539
:vartype operations: azure.mgmt.hybridcompute.operations.Operations
40+
:ivar private_link_scopes: PrivateLinkScopesOperations operations
41+
:vartype private_link_scopes: azure.mgmt.hybridcompute.operations.PrivateLinkScopesOperations
42+
:ivar private_link_resources: PrivateLinkResourcesOperations operations
43+
:vartype private_link_resources: azure.mgmt.hybridcompute.operations.PrivateLinkResourcesOperations
44+
:ivar private_endpoint_connections: PrivateEndpointConnectionsOperations operations
45+
:vartype private_endpoint_connections: azure.mgmt.hybridcompute.operations.PrivateEndpointConnectionsOperations
3646
:param credential: Credential needed for the client to connect to Azure.
3747
:type credential: ~azure.core.credentials.TokenCredential
38-
:param subscription_id: Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call.
48+
:param subscription_id: The ID of the target subscription.
3949
:type subscription_id: str
4050
:param str base_url: Service URL
4151
:keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present.
@@ -65,6 +75,30 @@ def __init__(
6575
self._client, self._config, self._serialize, self._deserialize)
6676
self.operations = Operations(
6777
self._client, self._config, self._serialize, self._deserialize)
78+
self.private_link_scopes = PrivateLinkScopesOperations(
79+
self._client, self._config, self._serialize, self._deserialize)
80+
self.private_link_resources = PrivateLinkResourcesOperations(
81+
self._client, self._config, self._serialize, self._deserialize)
82+
self.private_endpoint_connections = PrivateEndpointConnectionsOperations(
83+
self._client, self._config, self._serialize, self._deserialize)
84+
85+
def _send_request(self, http_request, **kwargs):
86+
# type: (HttpRequest, Any) -> HttpResponse
87+
"""Runs the network request through the client's chained policies.
88+
89+
:param http_request: The network request you want to make. Required.
90+
:type http_request: ~azure.core.pipeline.transport.HttpRequest
91+
:keyword bool stream: Whether the response payload will be streamed. Defaults to True.
92+
:return: The response of your network call. Does not do error handling on your response.
93+
:rtype: ~azure.core.pipeline.transport.HttpResponse
94+
"""
95+
path_format_arguments = {
96+
'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1),
97+
}
98+
http_request.url = self._client.format_url(http_request.url, **path_format_arguments)
99+
stream = kwargs.pop("stream", True)
100+
pipeline_response = self._client._pipeline.run(http_request, stream=stream, **kwargs)
101+
return pipeline_response.http_response
68102

69103
def close(self):
70104
# type: () -> None
Lines changed: 108 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,108 @@
1+
{
2+
"chosen_version": "2021-03-25-preview",
3+
"total_api_version_list": ["2021-03-25-preview"],
4+
"client": {
5+
"name": "HybridComputeManagementClient",
6+
"filename": "_hybrid_compute_management_client",
7+
"description": "The Hybrid Compute Management Client.",
8+
"base_url": "\u0027https://management.azure.com\u0027",
9+
"custom_base_url": null,
10+
"azure_arm": true,
11+
"has_lro_operations": true,
12+
"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\": [\"HybridComputeManagementClientConfiguration\"]}}, \"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\": [\"HybridComputeManagementClientConfiguration\"]}}, \"conditional\": {\"stdlib\": {\"typing\": [\"Any\", \"Optional\"]}, \"azurecore\": {\"azure.core.pipeline.transport\": [\"AsyncHttpResponse\", \"HttpRequest\"]}}}"
15+
},
16+
"global_parameters": {
17+
"sync": {
18+
"credential": {
19+
"signature": "credential, # type: \"TokenCredential\"",
20+
"description": "Credential needed for the client to connect to Azure.",
21+
"docstring_type": "~azure.core.credentials.TokenCredential",
22+
"required": true
23+
},
24+
"subscription_id": {
25+
"signature": "subscription_id, # type: str",
26+
"description": "The ID of the target subscription.",
27+
"docstring_type": "str",
28+
"required": true
29+
}
30+
},
31+
"async": {
32+
"credential": {
33+
"signature": "credential: \"AsyncTokenCredential\",",
34+
"description": "Credential needed for the client to connect to Azure.",
35+
"docstring_type": "~azure.core.credentials_async.AsyncTokenCredential",
36+
"required": true
37+
},
38+
"subscription_id": {
39+
"signature": "subscription_id: str,",
40+
"description": "The ID of the target subscription.",
41+
"docstring_type": "str",
42+
"required": true
43+
}
44+
},
45+
"constant": {
46+
},
47+
"call": "credential, subscription_id",
48+
"service_client_specific": {
49+
"sync": {
50+
"api_version": {
51+
"signature": "api_version=None, # type: Optional[str]",
52+
"description": "API version to use if no profile is provided, or if missing in profile.",
53+
"docstring_type": "str",
54+
"required": false
55+
},
56+
"base_url": {
57+
"signature": "base_url=None, # type: Optional[str]",
58+
"description": "Service URL",
59+
"docstring_type": "str",
60+
"required": false
61+
},
62+
"profile": {
63+
"signature": "profile=KnownProfiles.default, # type: KnownProfiles",
64+
"description": "A profile definition, from KnownProfiles to dict.",
65+
"docstring_type": "azure.profiles.KnownProfiles",
66+
"required": false
67+
}
68+
},
69+
"async": {
70+
"api_version": {
71+
"signature": "api_version: Optional[str] = None,",
72+
"description": "API version to use if no profile is provided, or if missing in profile.",
73+
"docstring_type": "str",
74+
"required": false
75+
},
76+
"base_url": {
77+
"signature": "base_url: Optional[str] = None,",
78+
"description": "Service URL",
79+
"docstring_type": "str",
80+
"required": false
81+
},
82+
"profile": {
83+
"signature": "profile: KnownProfiles = KnownProfiles.default,",
84+
"description": "A profile definition, from KnownProfiles to dict.",
85+
"docstring_type": "azure.profiles.KnownProfiles",
86+
"required": false
87+
}
88+
}
89+
}
90+
},
91+
"config": {
92+
"credential": true,
93+
"credential_scopes": ["https://management.azure.com/.default"],
94+
"credential_default_policy_type": "BearerTokenCredentialPolicy",
95+
"credential_default_policy_type_has_async_version": true,
96+
"credential_key_header_name": null,
97+
"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\"]}}}",
98+
"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\"]}}}"
99+
},
100+
"operation_groups": {
101+
"machines": "MachinesOperations",
102+
"machine_extensions": "MachineExtensionsOperations",
103+
"operations": "Operations",
104+
"private_link_scopes": "PrivateLinkScopesOperations",
105+
"private_link_resources": "PrivateLinkResourcesOperations",
106+
"private_endpoint_connections": "PrivateEndpointConnectionsOperations"
107+
}
108+
}

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

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

9-
VERSION = "7.0.0b1"
10-
9+
VERSION = "7.0.0"

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

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,11 +12,12 @@
1212
from azure.core.pipeline import policies
1313
from azure.mgmt.core.policies import ARMHttpLoggingPolicy
1414

15+
from .._version import VERSION
16+
1517
if TYPE_CHECKING:
1618
# pylint: disable=unused-import,ungrouped-imports
1719
from azure.core.credentials_async import AsyncTokenCredential
1820

19-
VERSION = "unknown"
2021

2122
class HybridComputeManagementClientConfiguration(Configuration):
2223
"""Configuration for HybridComputeManagementClient.
@@ -26,7 +27,7 @@ class HybridComputeManagementClientConfiguration(Configuration):
2627
2728
:param credential: Credential needed for the client to connect to Azure.
2829
:type credential: ~azure.core.credentials_async.AsyncTokenCredential
29-
:param subscription_id: Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call.
30+
:param subscription_id: The ID of the target subscription.
3031
:type subscription_id: str
3132
"""
3233

@@ -44,7 +45,7 @@ def __init__(
4445

4546
self.credential = credential
4647
self.subscription_id = subscription_id
47-
self.api_version = "2020-08-02"
48+
self.api_version = "2021-03-25-preview"
4849
self.credential_scopes = kwargs.pop('credential_scopes', ['https://management.azure.com/.default'])
4950
kwargs.setdefault('sdk_moniker', 'mgmt-hybridcompute/{}'.format(VERSION))
5051
self._configure(**kwargs)

sdk/hybridcompute/azure-mgmt-hybridcompute/azure/mgmt/hybridcompute/aio/_hybrid_compute_management_client.py

Lines changed: 34 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88

99
from typing import Any, Optional, TYPE_CHECKING
1010

11+
from azure.core.pipeline.transport import AsyncHttpResponse, HttpRequest
1112
from azure.mgmt.core import AsyncARMPipelineClient
1213
from msrest import Deserializer, Serializer
1314

@@ -19,6 +20,9 @@
1920
from .operations import MachinesOperations
2021
from .operations import MachineExtensionsOperations
2122
from .operations import Operations
23+
from .operations import PrivateLinkScopesOperations
24+
from .operations import PrivateLinkResourcesOperations
25+
from .operations import PrivateEndpointConnectionsOperations
2226
from .. import models
2327

2428

@@ -31,9 +35,15 @@ class HybridComputeManagementClient(object):
3135
:vartype machine_extensions: azure.mgmt.hybridcompute.aio.operations.MachineExtensionsOperations
3236
:ivar operations: Operations operations
3337
:vartype operations: azure.mgmt.hybridcompute.aio.operations.Operations
38+
:ivar private_link_scopes: PrivateLinkScopesOperations operations
39+
:vartype private_link_scopes: azure.mgmt.hybridcompute.aio.operations.PrivateLinkScopesOperations
40+
:ivar private_link_resources: PrivateLinkResourcesOperations operations
41+
:vartype private_link_resources: azure.mgmt.hybridcompute.aio.operations.PrivateLinkResourcesOperations
42+
:ivar private_endpoint_connections: PrivateEndpointConnectionsOperations operations
43+
:vartype private_endpoint_connections: azure.mgmt.hybridcompute.aio.operations.PrivateEndpointConnectionsOperations
3444
:param credential: Credential needed for the client to connect to Azure.
3545
:type credential: ~azure.core.credentials_async.AsyncTokenCredential
36-
:param subscription_id: Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call.
46+
:param subscription_id: The ID of the target subscription.
3747
:type subscription_id: str
3848
:param str base_url: Service URL
3949
:keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present.
@@ -62,6 +72,29 @@ def __init__(
6272
self._client, self._config, self._serialize, self._deserialize)
6373
self.operations = Operations(
6474
self._client, self._config, self._serialize, self._deserialize)
75+
self.private_link_scopes = PrivateLinkScopesOperations(
76+
self._client, self._config, self._serialize, self._deserialize)
77+
self.private_link_resources = PrivateLinkResourcesOperations(
78+
self._client, self._config, self._serialize, self._deserialize)
79+
self.private_endpoint_connections = PrivateEndpointConnectionsOperations(
80+
self._client, self._config, self._serialize, self._deserialize)
81+
82+
async def _send_request(self, http_request: HttpRequest, **kwargs: Any) -> AsyncHttpResponse:
83+
"""Runs the network request through the client's chained policies.
84+
85+
:param http_request: The network request you want to make. Required.
86+
:type http_request: ~azure.core.pipeline.transport.HttpRequest
87+
:keyword bool stream: Whether the response payload will be streamed. Defaults to True.
88+
:return: The response of your network call. Does not do error handling on your response.
89+
:rtype: ~azure.core.pipeline.transport.AsyncHttpResponse
90+
"""
91+
path_format_arguments = {
92+
'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1),
93+
}
94+
http_request.url = self._client.format_url(http_request.url, **path_format_arguments)
95+
stream = kwargs.pop("stream", True)
96+
pipeline_response = await self._client._pipeline.run(http_request, stream=stream, **kwargs)
97+
return pipeline_response.http_response
6598

6699
async def close(self) -> None:
67100
await self._client.close()

0 commit comments

Comments
 (0)