Skip to content

Commit 5137da5

Browse files
author
SDKAuto
committed
CodeGen from PR 23901 in Azure/azure-rest-api-specs
[Hub Generated] Publish private branch 'vaibmishra/onboardStorageResource' (Azure#23901) * onboarding storage resource * addressing failures from automated checks * onboarding as a new resource provider instead of resoruce type * addressing the checks * addressign check fails x2 * addressing check fails x3 * resource onboarding in the same rp * checks fail x1 * prettier fix * swagger model validation check * fix the pattern change * support put, list, patch, delete api calls * address checks x1 * put and delete api with 2xx code * addressing check and restructure abmsi * fixing checks again * checks againnnn * fixing PAYG and adding 201 for put * try to fix lintdiff check * check fails * missed this file * fixing the error response * fixing the error response for bmi
1 parent 7b8d114 commit 5137da5

34 files changed

+2483
-303
lines changed
Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
{
2-
"commit": "7d6c14d986a67dca3451d7d92d8f6b9416d61fbf",
2+
"commit": "99dad1e94c408d931172e35eef941e76837a6d76",
33
"repository_url": "https://github.com/Azure/azure-rest-api-specs",
44
"autorest": "3.9.2",
55
"use": [
6-
"@autorest/python@6.2.1",
6+
"@autorest/python@6.4.8",
77
"@autorest/[email protected]"
88
],
9-
"autorest_command": "autorest specification/baremetalinfrastructure/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/python@6.2.1 --use=@autorest/[email protected] --version=3.9.2 --version-tolerant=False",
9+
"autorest_command": "autorest specification/baremetalinfrastructure/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/python@6.4.8 --use=@autorest/[email protected] --version=3.9.2 --version-tolerant=False",
1010
"readme": "specification/baremetalinfrastructure/resource-manager/readme.md"
1111
}

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313

1414
try:
1515
from ._patch import __all__ as _patch_all
16-
from ._patch import * # type: ignore # pylint: disable=unused-wildcard-import
16+
from ._patch import * # pylint: disable=unused-wildcard-import
1717
except ImportError:
1818
_patch_all = []
1919
from ._patch import patch_sdk as _patch_sdk

sdk/baremetalinfrastructure/azure-mgmt-baremetalinfrastructure/azure/mgmt/baremetalinfrastructure/_bare_metal_infrastructure_client.py

Lines changed: 14 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,10 @@
1212
from azure.core.rest import HttpRequest, HttpResponse
1313
from azure.mgmt.core import ARMPipelineClient
1414

15-
from . import models
15+
from . import models as _models
1616
from ._configuration import BareMetalInfrastructureClientConfiguration
1717
from ._serialization import Deserializer, Serializer
18-
from .operations import AzureBareMetalInstancesOperations, Operations
18+
from .operations import AzureBareMetalInstancesOperations, AzureBareMetalStorageInstancesOperations, Operations
1919

2020
if TYPE_CHECKING:
2121
# pylint: disable=unused-import,ungrouped-imports
@@ -30,13 +30,16 @@ class BareMetalInfrastructureClient: # pylint: disable=client-accepts-api-versi
3030
azure.mgmt.baremetalinfrastructure.operations.AzureBareMetalInstancesOperations
3131
:ivar operations: Operations operations
3232
:vartype operations: azure.mgmt.baremetalinfrastructure.operations.Operations
33+
:ivar azure_bare_metal_storage_instances: AzureBareMetalStorageInstancesOperations operations
34+
:vartype azure_bare_metal_storage_instances:
35+
azure.mgmt.baremetalinfrastructure.operations.AzureBareMetalStorageInstancesOperations
3336
:param credential: Credential needed for the client to connect to Azure. Required.
3437
:type credential: ~azure.core.credentials.TokenCredential
3538
:param subscription_id: The ID of the target subscription. Required.
3639
:type subscription_id: str
3740
:param base_url: Service URL. Default value is "https://management.azure.com".
3841
:type base_url: str
39-
:keyword api_version: Api Version. Default value is "2021-08-09". Note that overriding this
42+
:keyword api_version: Api Version. Default value is "2023-04-06". Note that overriding this
4043
default value may result in unsupported behavior.
4144
:paramtype api_version: str
4245
"""
@@ -51,16 +54,19 @@ def __init__(
5154
self._config = BareMetalInfrastructureClientConfiguration(
5255
credential=credential, subscription_id=subscription_id, **kwargs
5356
)
54-
self._client = ARMPipelineClient(base_url=base_url, config=self._config, **kwargs)
57+
self._client: ARMPipelineClient = ARMPipelineClient(base_url=base_url, config=self._config, **kwargs)
5558

56-
client_models = {k: v for k, v in models.__dict__.items() if isinstance(v, type)}
59+
client_models = {k: v for k, v in _models.__dict__.items() if isinstance(v, type)}
5760
self._serialize = Serializer(client_models)
5861
self._deserialize = Deserializer(client_models)
5962
self._serialize.client_side_validation = False
6063
self.azure_bare_metal_instances = AzureBareMetalInstancesOperations(
6164
self._client, self._config, self._serialize, self._deserialize
6265
)
6366
self.operations = Operations(self._client, self._config, self._serialize, self._deserialize)
67+
self.azure_bare_metal_storage_instances = AzureBareMetalStorageInstancesOperations(
68+
self._client, self._config, self._serialize, self._deserialize
69+
)
6470

6571
def _send_request(self, request: HttpRequest, **kwargs: Any) -> HttpResponse:
6672
"""Runs the network request through the client's chained policies.
@@ -84,15 +90,12 @@ def _send_request(self, request: HttpRequest, **kwargs: Any) -> HttpResponse:
8490
request_copy.url = self._client.format_url(request_copy.url)
8591
return self._client.send_request(request_copy, **kwargs)
8692

87-
def close(self):
88-
# type: () -> None
93+
def close(self) -> None:
8994
self._client.close()
9095

91-
def __enter__(self):
92-
# type: () -> BareMetalInfrastructureClient
96+
def __enter__(self) -> "BareMetalInfrastructureClient":
9397
self._client.__enter__()
9498
return self
9599

96-
def __exit__(self, *exc_details):
97-
# type: (Any) -> None
100+
def __exit__(self, *exc_details: Any) -> None:
98101
self._client.__exit__(*exc_details)

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

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

9-
import sys
109
from typing import Any, TYPE_CHECKING
1110

1211
from azure.core.configuration import Configuration
@@ -15,11 +14,6 @@
1514

1615
from ._version import VERSION
1716

18-
if sys.version_info >= (3, 8):
19-
from typing import Literal # pylint: disable=no-name-in-module, ungrouped-imports
20-
else:
21-
from typing_extensions import Literal # type: ignore # pylint: disable=ungrouped-imports
22-
2317
if TYPE_CHECKING:
2418
# pylint: disable=unused-import,ungrouped-imports
2519
from azure.core.credentials import TokenCredential
@@ -35,14 +29,14 @@ class BareMetalInfrastructureClientConfiguration(Configuration): # pylint: disa
3529
:type credential: ~azure.core.credentials.TokenCredential
3630
:param subscription_id: The ID of the target subscription. Required.
3731
:type subscription_id: str
38-
:keyword api_version: Api Version. Default value is "2021-08-09". Note that overriding this
32+
:keyword api_version: Api Version. Default value is "2023-04-06". Note that overriding this
3933
default value may result in unsupported behavior.
4034
:paramtype api_version: str
4135
"""
4236

4337
def __init__(self, credential: "TokenCredential", subscription_id: str, **kwargs: Any) -> None:
4438
super(BareMetalInfrastructureClientConfiguration, self).__init__(**kwargs)
45-
api_version = kwargs.pop("api_version", "2021-08-09") # type: Literal["2021-08-09"]
39+
api_version: str = kwargs.pop("api_version", "2023-04-06")
4640

4741
if credential is None:
4842
raise ValueError("Parameter 'credential' must not be None.")
@@ -56,10 +50,7 @@ def __init__(self, credential: "TokenCredential", subscription_id: str, **kwargs
5650
kwargs.setdefault("sdk_moniker", "mgmt-baremetalinfrastructure/{}".format(VERSION))
5751
self._configure(**kwargs)
5852

59-
def _configure(
60-
self, **kwargs # type: Any
61-
):
62-
# type: (...) -> None
53+
def _configure(self, **kwargs: Any) -> None:
6354
self.user_agent_policy = kwargs.get("user_agent_policy") or policies.UserAgentPolicy(**kwargs)
6455
self.headers_policy = kwargs.get("headers_policy") or policies.HeadersPolicy(**kwargs)
6556
self.proxy_policy = kwargs.get("proxy_policy") or policies.ProxyPolicy(**kwargs)

0 commit comments

Comments
 (0)