Skip to content

[AutoPR azure-mgmt-computefleet] Testing mixed mode sdk generation #7781

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions sdk/computefleet/azure-mgmt-computefleet/_meta.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"commit": "c1cea38fb7e5cec9afe223a2ed15cbe2fbeecbdb",
"repository_url": "https://github.com/Azure/azure-rest-api-specs",
"commit": "536b844b64c9dbf1afde72233ba9ebba39825c0e",
"repository_url": "https://github.com/test-repo-billy/azure-rest-api-specs",
"typespec_src": "specification/azurefleet/AzureFleet.Management",
"@azure-tools/typespec-python": "0.26.0"
"@azure-tools/typespec-python": "0.27.0"
}
Original file line number Diff line number Diff line change
Expand Up @@ -563,6 +563,7 @@ def as_dict(self, *, exclude_readonly: bool = False) -> typing.Dict[str, typing.
"""

result = {}
readonly_props = []
if exclude_readonly:
readonly_props = [p._rest_name for p in self._attr_to_rest_field.values() if _is_readonly(p)]
for k, v in self.items():
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -741,13 +741,10 @@ async def _create_or_update_initial(
raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat)

response_headers = {}
if response.status_code == 200:
deserialized = response.iter_bytes()

if response.status_code == 201:
response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After"))

deserialized = response.iter_bytes()
deserialized = response.iter_bytes()

if cls:
return cls(pipeline_response, deserialized, response_headers) # type: ignore
Expand Down Expand Up @@ -3546,14 +3543,11 @@ async def _update_initial(
raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat)

response_headers = {}
if response.status_code == 200:
deserialized = response.iter_bytes()

if response.status_code == 202:
response_headers["Location"] = self._deserialize("str", response.headers.get("Location"))
response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After"))

deserialized = response.iter_bytes()
deserialized = response.iter_bytes()

if cls:
return cls(pipeline_response, deserialized, response_headers) # type: ignore
Expand Down Expand Up @@ -6310,10 +6304,7 @@ async def _delete_initial(self, resource_group_name: str, fleet_name: str, **kwa
response_headers["Location"] = self._deserialize("str", response.headers.get("Location"))
response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After"))

deserialized = response.iter_bytes()

if response.status_code == 204:
deserialized = response.iter_bytes()
deserialized = response.iter_bytes()

if cls:
return cls(pipeline_response, deserialized, response_headers) # type: ignore
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -467,7 +467,6 @@ def __init__(self, *args: Any, **kwargs: Any) -> None: # pylint: disable=useles
class ComputeProfile(_model_base.Model):
"""Compute Profile to use for running user's workloads.

All required parameters must be populated in order to send to server.

:ivar base_virtual_machine_profile: Base Virtual Machine Profile Properties to be specified
according to
Expand Down Expand Up @@ -784,7 +783,6 @@ class TrackedResource(Resource):

Readonly variables are only populated by the server, and will be ignored when sending a request.

All required parameters must be populated in order to send to server.

:ivar id: Fully qualified resource ID for the resource. Ex -
/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. # pylint: disable=line-too-long
Expand Down Expand Up @@ -832,7 +830,6 @@ class Fleet(TrackedResource):

Readonly variables are only populated by the server, and will be ignored when sending a request.

All required parameters must be populated in order to send to server.

:ivar id: Fully qualified resource ID for the resource. Ex -
/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. # pylint: disable=line-too-long
Expand Down Expand Up @@ -896,7 +893,6 @@ class FleetProperties(_model_base.Model):

Readonly variables are only populated by the server, and will be ignored when sending a request.

All required parameters must be populated in order to send to server.

:ivar provisioning_state: The status of the last operation. Known values are: "Succeeded",
"Failed", "Canceled", "Creating", "Updating", "Deleting", and "Migrating".
Expand Down Expand Up @@ -1131,7 +1127,6 @@ def __init__(self, *args: Any, **kwargs: Any) -> None: # pylint: disable=useles
class KeyVaultSecretReference(_model_base.Model):
"""Describes a reference to Key Vault Secret.

All required parameters must be populated in order to send to server.

:ivar secret_url: The URL referencing a secret in a Key Vault. Required.
:vartype secret_url: str
Expand Down Expand Up @@ -1343,7 +1338,6 @@ class ManagedServiceIdentity(_model_base.Model):

Readonly variables are only populated by the server, and will be ignored when sending a request.

All required parameters must be populated in order to send to server.

:ivar principal_id: The service principal ID of the system assigned identity. This property
will only be provided for a system assigned identity.
Expand Down Expand Up @@ -1654,7 +1648,6 @@ def __init__(self, *args: Any, **kwargs: Any) -> None: # pylint: disable=useles
class Plan(_model_base.Model):
"""Plan for the resource.

All required parameters must be populated in order to send to server.

:ivar name: A user defined name of the 3rd Party Artifact that is being procured. Required.
:vartype name: str
Expand Down Expand Up @@ -2545,7 +2538,6 @@ class VirtualMachineScaleSet(_model_base.Model):

Readonly variables are only populated by the server, and will be ignored when sending a request.

All required parameters must be populated in order to send to server.

:ivar id: The compute RP resource id of the virtualMachineScaleSet
"subscriptions/{subId}/resourceGroups/{rgName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmssName}".
Expand Down Expand Up @@ -2578,7 +2570,6 @@ class VirtualMachineScaleSet(_model_base.Model):
class VirtualMachineScaleSetDataDisk(_model_base.Model):
"""Describes a virtual machine scale set data disk.

All required parameters must be populated in order to send to server.

:ivar name: The disk name.
:vartype name: str
Expand Down Expand Up @@ -2929,7 +2920,6 @@ def __init__(self, *args: Any, **kwargs: Any) -> None: # pylint: disable=useles
class VirtualMachineScaleSetIPConfiguration(_model_base.Model):
"""Describes a virtual machine scale set network profile's IP configuration.

All required parameters must be populated in order to send to server.

:ivar name: The IP configuration name. Required.
:vartype name: str
Expand Down Expand Up @@ -3147,7 +3137,6 @@ def __init__(self, *args: Any, **kwargs: Any) -> None: # pylint: disable=useles
class VirtualMachineScaleSetNetworkConfiguration(_model_base.Model): # pylint: disable=name-too-long
"""Describes a virtual machine scale set network profile's network configurations.

All required parameters must be populated in order to send to server.

:ivar name: The network configuration name. Required.
:vartype name: str
Expand Down Expand Up @@ -3213,7 +3202,6 @@ class VirtualMachineScaleSetNetworkConfigurationProperties(
): # pylint: disable=too-many-instance-attributes,name-too-long
"""Describes a virtual machine scale set network profile's IP configuration.

All required parameters must be populated in order to send to server.

:ivar primary: Specifies the primary network interface in case the virtual machine has more
than 1 network interface.
Expand Down Expand Up @@ -3357,7 +3345,6 @@ def __init__(self, *args: Any, **kwargs: Any) -> None: # pylint: disable=useles
class VirtualMachineScaleSetOSDisk(_model_base.Model): # pylint: disable=too-many-instance-attributes
"""Describes a virtual machine scale set operating system disk.

All required parameters must be populated in order to send to server.

:ivar name: The disk name.
:vartype name: str
Expand Down Expand Up @@ -3641,7 +3628,6 @@ class VirtualMachineScaleSetPublicIPAddressConfiguration(_model_base.Model): #
"""Describes a virtual machines scale set IP Configuration's PublicIPAddress
configuration.

All required parameters must be populated in order to send to server.

:ivar name: The publicIP address configuration name. Required.
:vartype name: str
Expand Down Expand Up @@ -3686,7 +3672,6 @@ def __init__(self, *args: Any, **kwargs: Any) -> None: # pylint: disable=useles
class VirtualMachineScaleSetPublicIPAddressConfigurationDnsSettings(_model_base.Model): # pylint: disable=name-too-long
"""Describes a virtual machines scale sets network configuration's DNS settings.

All required parameters must be populated in order to send to server.

:ivar domain_name_label: The Domain name label.The concatenation of the domain name label and
vm index
Expand Down Expand Up @@ -3920,7 +3905,6 @@ class VMGalleryApplication(_model_base.Model):
"""Specifies the required information to reference a compute gallery application
version.

All required parameters must be populated in order to send to server.

:ivar tags: Optional, Specifies a passthrough value for more generic context.
:vartype tags: str
Expand Down Expand Up @@ -3989,7 +3973,6 @@ class VmSizeProfile(_model_base.Model):
"""Specifications about a VM Size. This will also contain the corresponding rank and weight in
future.

All required parameters must be populated in order to send to server.

:ivar name: The Sku name (e.g. 'Standard_DS1_v2'). Required.
:vartype name: str
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -938,13 +938,10 @@ def _create_or_update_initial(
raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat)

response_headers = {}
if response.status_code == 200:
deserialized = response.iter_bytes()

if response.status_code == 201:
response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After"))

deserialized = response.iter_bytes()
deserialized = response.iter_bytes()

if cls:
return cls(pipeline_response, deserialized, response_headers) # type: ignore
Expand Down Expand Up @@ -3743,14 +3740,11 @@ def _update_initial(
raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat)

response_headers = {}
if response.status_code == 200:
deserialized = response.iter_bytes()

if response.status_code == 202:
response_headers["Location"] = self._deserialize("str", response.headers.get("Location"))
response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After"))

deserialized = response.iter_bytes()
deserialized = response.iter_bytes()

if cls:
return cls(pipeline_response, deserialized, response_headers) # type: ignore
Expand Down Expand Up @@ -6507,10 +6501,7 @@ def _delete_initial(self, resource_group_name: str, fleet_name: str, **kwargs: A
response_headers["Location"] = self._deserialize("str", response.headers.get("Location"))
response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After"))

deserialized = response.iter_bytes()

if response.status_code == 204:
deserialized = response.iter_bytes()
deserialized = response.iter_bytes()

if cls:
return cls(pipeline_response, deserialized, response_headers) # type: ignore
Expand Down
6 changes: 3 additions & 3 deletions sdk/computefleet/azure-mgmt-computefleet/tsp-location.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
directory: specification/azurefleet/AzureFleet.Management
commit: c1cea38fb7e5cec9afe223a2ed15cbe2fbeecbdb
repo: Azure/azure-rest-api-specs
additionalDirectories:
commit: 536b844b64c9dbf1afde72233ba9ebba39825c0e
repo: test-repo-billy/azure-rest-api-specs
additionalDirectories: