Skip to content

Commit 2b319a8

Browse files
author
SDKAuto
committed
CodeGen from PR 3512 in test-repo-billy/azure-rest-api-specs
Merge ebceec76145d194c964938918bd28860cd8a6dc3 into 8df52d62be2e13ba064fd9c0c7874dd6751c8f4f
1 parent b2b0c35 commit 2b319a8

File tree

16 files changed

+903
-13339
lines changed

16 files changed

+903
-13339
lines changed
Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
2-
"commit": "c1cea38fb7e5cec9afe223a2ed15cbe2fbeecbdb",
3-
"repository_url": "https://github.com/Azure/azure-rest-api-specs",
2+
"commit": "9e35bd472e0aca04a5ec037f3cfe60c875b6fde7",
3+
"repository_url": "https://github.com/test-repo-billy/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.31.1"
66
}

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

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -52,8 +52,9 @@ def __init__(
5252
base_url: str = "https://management.azure.com",
5353
**kwargs: Any
5454
) -> None:
55+
_endpoint = "{endpoint}"
5556
self._config = ComputeFleetMgmtClientConfiguration(
56-
credential=credential, subscription_id=subscription_id, **kwargs
57+
credential=credential, subscription_id=subscription_id, base_url=base_url, **kwargs
5758
)
5859
_policies = kwargs.pop("policies", None)
5960
if _policies is None:
@@ -73,7 +74,7 @@ def __init__(
7374
policies.SensitiveHeaderCleanupPolicy(**kwargs) if self._config.redirect_policy else None,
7475
self._config.http_logging_policy,
7576
]
76-
self._client: ARMPipelineClient = ARMPipelineClient(base_url=base_url, policies=_policies, **kwargs)
77+
self._client: ARMPipelineClient = ARMPipelineClient(base_url=_endpoint, policies=_policies, **kwargs)
7778

7879
self._serialize = Serializer()
7980
self._deserialize = Deserializer()
@@ -100,7 +101,11 @@ def send_request(self, request: HttpRequest, *, stream: bool = False, **kwargs:
100101
"""
101102

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

106111
def close(self) -> None:

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

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,13 +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+
:param base_url: Service host. Default value is "https://management.azure.com".
32+
:type base_url: str
3133
:keyword api_version: The API version to use for this operation. Default value is
3234
"2024-05-01-preview". Note that overriding this default value may result in unsupported
3335
behavior.
3436
:paramtype api_version: str
3537
"""
3638

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

4048
if credential is None:
@@ -44,6 +52,7 @@ def __init__(self, credential: "TokenCredential", subscription_id: str, **kwargs
4452

4553
self.credential = credential
4654
self.subscription_id = subscription_id
55+
self.base_url = base_url
4756
self.api_version = api_version
4857
self.credential_scopes = kwargs.pop("credential_scopes", ["https://management.azure.com/.default"])
4958
kwargs.setdefault("sdk_moniker", "mgmt-computefleet/{}".format(VERSION))

0 commit comments

Comments
 (0)