Skip to content

Commit 1e395e7

Browse files
author
SDKAuto
committed
CodeGen from PR 30568 in Azure/azure-rest-api-specs
Merge 988b3fea50832f3c3631d798481ef47a7484db98 into 67713ccbb1ec783278523d55d030fa558ba34b19
1 parent c0a7188 commit 1e395e7

27 files changed

+3526
-13360
lines changed
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
2-
"commit": "c1cea38fb7e5cec9afe223a2ed15cbe2fbeecbdb",
2+
"commit": "f7b24fd29049a522e1fd5bca95fd80a73b70bb76",
33
"repository_url": "https://github.com/Azure/azure-rest-api-specs",
44
"typespec_src": "specification/azurefleet/AzureFleet.Management",
5-
"@azure-tools/typespec-python": "0.26.0"
5+
"@azure-tools/typespec-python": "0.33.0"
66
}

sdk/computefleet/azure-mgmt-computefleet/azure/mgmt/computefleet/_client.py

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -37,9 +37,8 @@ class ComputeFleetMgmtClient: # pylint: disable=client-accepts-api-version-keyw
3737
:type subscription_id: str
3838
:param base_url: Service host. Default value is "https://management.azure.com".
3939
:type base_url: str
40-
:keyword api_version: The API version to use for this operation. Default value is
41-
"2024-05-01-preview". Note that overriding this default value may result in unsupported
42-
behavior.
40+
:keyword api_version: The API version to use for this operation. Default value is "2024-11-01".
41+
Note that overriding this default value may result in unsupported behavior.
4342
:paramtype api_version: str
4443
:keyword int polling_interval: Default waiting time between two polls for LRO operations if no
4544
Retry-After header is present.
@@ -52,8 +51,9 @@ def __init__(
5251
base_url: str = "https://management.azure.com",
5352
**kwargs: Any
5453
) -> None:
54+
_endpoint = "{endpoint}"
5555
self._config = ComputeFleetMgmtClientConfiguration(
56-
credential=credential, subscription_id=subscription_id, **kwargs
56+
credential=credential, subscription_id=subscription_id, base_url=base_url, **kwargs
5757
)
5858
_policies = kwargs.pop("policies", None)
5959
if _policies is None:
@@ -73,7 +73,7 @@ def __init__(
7373
policies.SensitiveHeaderCleanupPolicy(**kwargs) if self._config.redirect_policy else None,
7474
self._config.http_logging_policy,
7575
]
76-
self._client: ARMPipelineClient = ARMPipelineClient(base_url=base_url, policies=_policies, **kwargs)
76+
self._client: ARMPipelineClient = ARMPipelineClient(base_url=_endpoint, policies=_policies, **kwargs)
7777

7878
self._serialize = Serializer()
7979
self._deserialize = Deserializer()
@@ -100,7 +100,11 @@ def send_request(self, request: HttpRequest, *, stream: bool = False, **kwargs:
100100
"""
101101

102102
request_copy = deepcopy(request)
103-
request_copy.url = self._client.format_url(request_copy.url)
103+
path_format_arguments = {
104+
"endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True),
105+
}
106+
107+
request_copy.url = self._client.format_url(request_copy.url, **path_format_arguments)
104108
return self._client.send_request(request_copy, stream=stream, **kwargs) # type: ignore
105109

106110
def close(self) -> None:

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

Lines changed: 13 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -28,14 +28,21 @@ class ComputeFleetMgmtClientConfiguration: # pylint: disable=too-many-instance-
2828
:type credential: ~azure.core.credentials.TokenCredential
2929
:param subscription_id: The ID of the target subscription. The value must be an UUID. Required.
3030
:type subscription_id: str
31-
:keyword api_version: The API version to use for this operation. Default value is
32-
"2024-05-01-preview". Note that overriding this default value may result in unsupported
33-
behavior.
31+
:param base_url: Service host. Default value is "https://management.azure.com".
32+
:type base_url: str
33+
:keyword api_version: The API version to use for this operation. Default value is "2024-11-01".
34+
Note that overriding this default value may result in unsupported behavior.
3435
:paramtype api_version: str
3536
"""
3637

37-
def __init__(self, credential: "TokenCredential", subscription_id: str, **kwargs: Any) -> None:
38-
api_version: str = kwargs.pop("api_version", "2024-05-01-preview")
38+
def __init__(
39+
self,
40+
credential: "TokenCredential",
41+
subscription_id: str,
42+
base_url: str = "https://management.azure.com",
43+
**kwargs: Any
44+
) -> None:
45+
api_version: str = kwargs.pop("api_version", "2024-11-01")
3946

4047
if credential is None:
4148
raise ValueError("Parameter 'credential' must not be None.")
@@ -44,6 +51,7 @@ def __init__(self, credential: "TokenCredential", subscription_id: str, **kwargs
4451

4552
self.credential = credential
4653
self.subscription_id = subscription_id
54+
self.base_url = base_url
4755
self.api_version = api_version
4856
self.credential_scopes = kwargs.pop("credential_scopes", ["https://management.azure.com/.default"])
4957
kwargs.setdefault("sdk_moniker", "mgmt-computefleet/{}".format(VERSION))

0 commit comments

Comments
 (0)