Skip to content

Conversation

@jsntcy
Copy link

@jsntcy jsntcy commented Apr 22, 2021

Description

Changes I made:

  • Remove wrong begin_ prefix from record-set command, only long running operation need this prefix, create_or_update and delete are not LRO for record-set, you can check if we need add begin_ prefix in SDK source code.
  • Remove unnecessary subitem for operations_tmpl='azure.mgmt.privatedns.operations#PrivateZonesOperations.{}'
  • Revert from begin_create_or_update to begin_update from some update commands as previously we use update.

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.


network_privatedns_zone_sdk = CliCommandType(
operations_tmpl='azure.mgmt.privatedns.operations.private_zones_operations#PrivateZonesOperations.{}',
operations_tmpl='azure.mgmt.privatedns.operations#PrivateZonesOperations.{}',
Copy link
Author

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)
Copy link
Author

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)
Copy link
Author

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)
Copy link
Author

@jsntcy jsntcy Apr 22, 2021

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.

@rajitaaa rajitaaa merged commit 6e5d193 into rajitaaa:raghosal Apr 22, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants