-
Notifications
You must be signed in to change notification settings - Fork 1.5k
[Communication] add chat and identity command groups #5208
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
Conversation
… add identity remove-access-tokens
- create-user - delete-user - get-token-for-teams-user
|
Communication |
… communication commands
kairu-ms
left a comment
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.
Please follow this guideline for command naming
| helps['communication identity create-user'] = """ | ||
| type: command | ||
| short-summary: "Craetes a new ACS identity." | ||
| examples: | ||
| - name: create-user | ||
| text: |- | ||
| az communication identity create-user | ||
| """ |
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.
Please rename communication identity create-user by communication identity user create
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.
Done.
| az communication identity create-user | ||
| """ | ||
|
|
||
| helps['communication identity delete-user'] = """ |
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.
Please rename communication identity delete-user by communication identity user delete
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.
Done
| helps['communication chat list-threads'] = """ | ||
| type: command | ||
| short-summary: "Gets the list of chat threads of a user." | ||
| examples: | ||
| - name: chat list-threads | ||
| text: |- | ||
| az communication chat list-threads | ||
| """ |
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.
Please rename communication chat list-threads by communication chat thread list
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.
Done
| helps['communication chat create-thread'] = """ | ||
| type: command | ||
| short-summary: "Creates a chat thread." | ||
| examples: | ||
| - name: chat create-thread | ||
| text: |- | ||
| az communication chat create-thread --topic "chat-topic" | ||
| """ |
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.
Rename communication chat create-thread by communication chat thread create
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.
Done.
| az communication chat delete-thread --thread-id "19:a-bcd=xyz" | ||
| """ | ||
|
|
||
| helps['communication chat list-participants'] = """ |
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.
Same advice for renaming
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.
Done.
| c.argument('thread_id', options_list=['--thread-id', '-t'], | ||
| type=str, help='Thread id') | ||
| c.argument('message_id', options_list=['--message-id', '-i'], |
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.
Why you always add -* for all arguments? It's not recommended. Those short argument alias may conflicted with the global arguments. Please add them only when needed.
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.
Removed short arguments for most commands.
| with self.command_group('communication phonenumbers', client_factory=cf_communication_phonenumbers, is_preview=True) as g: | ||
| g.communication_custom_command('list-phonenumbers', 'communication_list_phonenumbers', phonenumber_arguments) | ||
| g.communication_custom_command('show-phonenumber', 'communication_show_phonenumber', phonenumber_arguments) |
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.
Why this command group changed form GA to Preview again?
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.
Changed back to GA.
| g.communication_custom_command('send-sms', 'communication_send_sms') | ||
| sms_arguments = ['connection_string'] | ||
| with self.command_group('communication sms', client_factory=cf_communication_sms, is_preview=True) as g: | ||
| g.communication_custom_command('send-sms', 'communication_send_sms', sms_arguments) |
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 use send instead of send-sms
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.
This was already released. Added 'sms send' and marked this as deprecated.
| g.communication_custom_command('show-phonenumber', 'communication_show_phonenumber') | ||
| phonenumber_arguments = ['connection_string'] | ||
| with self.command_group('communication phonenumbers', client_factory=cf_communication_phonenumbers, is_preview=True) as g: | ||
| g.communication_custom_command('list-phonenumbers', 'communication_list_phonenumbers', phonenumber_arguments) |
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 use list instead of list-phonenumbers
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.
However as this command already release, you can keep them. But they are availed the naming guideline of azure-cli
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.
Marked as deprecated as well.
| c.argument('userid', options_list=['--userid', '-u'], type=str, help='ACS identifier') | ||
| c.argument('scopes', options_list=[ | ||
| '--scope', '-s'], nargs='+', help='list of scopes for an access token ex: chat/voip') | ||
| c.argument('user_id', options_list=['--user-id', '-u'], type=str, help='ACS identifier') |
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.
It's a breaking change to change option names from '--userid', '-u' to '--user-id', '-u'
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.
Rolled back this renaming.
|
[Release] Update index.json for extension [ communication ] : https://dev.azure.com/azure-sdk/internal/_build/results?buildId=1785968&view=results |
This checklist is used to make sure that common guidelines for a pull request are followed.
Related command
General Guidelines
azdev style <YOUR_EXT>locally? (pip install azdevrequired)python scripts/ci/test_index.py -qlocally?For new extensions:
About Extension Publish
There is a pipeline to automatically build, upload and publish extension wheels.
Once your pull request is merged into main branch, a new pull request will be created to update
src/index.jsonautomatically.The precondition is to put your code inside this repository and upgrade the version in the pull request but do not modify
src/index.json.