Skip to content

Conversation

@zhoxing-ms
Copy link
Contributor

@zhoxing-ms zhoxing-ms commented Apr 8, 2022

Description

Discussion on #21220 (comment)

Add some comments to explain the function of JsonCTemplatePolicy and fix incorrect variable name template_as_bytes

Testing Guide

History Notes

[Component Name 1] BREAKING CHANGE: az command a: Make some customer-facing breaking change
[Component Name 2] az command b: Add some customer-facing feature


This checklist is used to make sure that common guidelines for a pull request are followed.

@ghost ghost added the Auto-Assign Auto assign by bot label Apr 8, 2022
@ghost ghost requested a review from yonzhan April 8, 2022 09:27
@ghost ghost assigned zhoxing-ms Apr 8, 2022
@ghost ghost added this to the Apr 2022 (2022-04-26) milestone Apr 8, 2022
@ghost ghost added the ARM az resource/group/lock/tag/deployment/policy/managementapp/account management-group label Apr 8, 2022
@yonzhan
Copy link
Collaborator

yonzhan commented Apr 8, 2022

ARM

@zhoxing-ms zhoxing-ms force-pushed the refine_jsonctemplate_policy branch from f675543 to d00873d Compare April 21, 2022 08:42
Comment on lines -392 to +393
def __init__(self, template_as_bytes):
self.template_as_bytes = template_as_bytes
def __init__(self, template_string):
self.template_string = template_string
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The template_as_bytes will be converted to bytes in the subsequent step of JsonCTemplatePolicy, but not in the step of JSONSerializer. So correct the variable name to avoid misleading

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

data is ambiguous. It can mean object or string. Let's call it template_str.

@zhoxing-ms zhoxing-ms merged commit 3b82a04 into Azure:dev Apr 21, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ARM az resource/group/lock/tag/deployment/policy/managementapp/account management-group Auto-Assign Auto assign by bot

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants