-
Notifications
You must be signed in to change notification settings - Fork 0
{PrivateDNS} Fix linter error #1
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
{PrivateDNS} Fix linter error #1
Conversation
|
|
||
| network_privatedns_zone_sdk = CliCommandType( | ||
| operations_tmpl='azure.mgmt.privatedns.operations.private_zones_operations#PrivateZonesOperations.{}', | ||
| operations_tmpl='azure.mgmt.privatedns.operations#PrivateZonesOperations.{}', |
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.
Now the file name is changed from private_zones_operations to _private_zones_operations, so remove this unnecessary subitem in module path. You can find the name in SDK source code.
| g.custom_command('export', 'export_zone') | ||
| g.custom_command('create', 'create_privatedns_zone', client_factory=cf_privatedns_mgmt_zones, supports_no_wait=True) | ||
| g.generic_update_command('update', setter_name='begin_create_or_update', custom_func_name='update_privatedns_zone', supports_no_wait=True) | ||
| g.generic_update_command('update', setter_name='begin_update', custom_func_name='update_privatedns_zone', supports_no_wait=True) |
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.
We use update before, so should use begin_update now.
| g.command('list', 'list', table_transformer=transform_privatedns_link_table_output) | ||
| g.custom_command('create', 'create_privatedns_link', client_factory=cf_privatedns_mgmt_virtual_network_links, supports_no_wait=True) | ||
| g.generic_update_command('update', setter_name='begin_create_or_update', custom_func_name='update_privatedns_link', setter_type=network_privatedns_custom, supports_no_wait=True) | ||
| g.generic_update_command('update', setter_name='update_privatedns_link', setter_type=network_privatedns_custom, supports_no_wait=True) |
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.
No custom_func_name before for this generic_update_command()
| with self.command_group('network private-dns record-set {}'.format(record), network_privatedns_record_set_sdk) as g: | ||
| g.show_command('show', 'get', transform=transform_privatedns_record_set_output, table_transformer=transform_privatedns_record_set_table_output) | ||
| g.command('delete', 'begin_delete', confirmation=True) | ||
| g.command('delete', 'delete', confirmation=True) |
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.
Should not add begin_ prefix as delete and create_or_update commands for record-set are not long running operations. You can find the method name in SDK source code.
Remove other unnecessary begin_ prefixes as well.
Description
Changes I made:
begin_prefix fromrecord-setcommand, only long running operation need this prefix,create_or_updateanddeleteare not LRO forrecord-set, you can check if we need addbegin_prefix in SDK source code.operations_tmpl='azure.mgmt.privatedns.operations#PrivateZonesOperations.{}'begin_create_or_updatetobegin_updatefrom someupdatecommands as previously we useupdate.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.
The PR title and description has followed the guideline in Submitting Pull Requests.
I adhere to the Command Guidelines.
I adhere to the Error Handling Guidelines.