-
Notifications
You must be signed in to change notification settings - Fork 3.4k
{Compute} Clean up code #32792
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
base: dev
Are you sure you want to change the base?
{Compute} Clean up code #32792
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -196,16 +196,7 @@ def _output(self, *args, **kwargs): | |
| if has_value(resource.type): | ||
| resource.type = AAZUndefined | ||
|
|
||
| result = self.deserialize_output(self.ctx.vars.instance, client_flatten=True) | ||
|
|
||
| identity = result.get('identity') | ||
| if not identity: | ||
| return result | ||
|
|
||
| if not identity.get('userAssignedIdentities'): | ||
| identity['userAssignedIdentities'] = None | ||
|
|
||
| return result | ||
| return self.deserialize_output(self.ctx.vars.instance, client_flatten=True) | ||
|
|
||
|
Comment on lines
196
to
200
|
||
| class VirtualMachinesUpdate(_VMPatch.VirtualMachinesUpdate): | ||
| # Override to solve key conflict of _schema_on_200.resources.Element.properties.type when deserializing | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
show_vm_identityno longer normalizes the identity payload: it can now return an empty dict (instead ofNone) when the VM has no identity, and it can omit/leave an emptyuserAssignedIdentitiesinstead of returningnull. This is observable inaz vm identity showand breaks existing test expectations (e.g., checks foruserAssignedIdentities == Noneandis_empty()for no identity). Please restore the previous output shape: returnNonewhen identity is missing/empty, and when identity exists but has no user-assigned identities, ensureuserAssignedIdentitiesis present and set toNone.