-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
[amg] Azure managed grafana options for notification channels #5033
Merged
kairu-ms
merged 15 commits into
Azure:main
from
michelletaal-shell:feature/amg-notification-channel
Jul 26, 2022
Merged
Changes from 5 commits
Commits
Show all changes
15 commits
Select commit
Hold shift + click to select a range
9097bf8
added notification feature to azure amg
michelletaal-shell 59fca2a
change version setup
michelletaal-shell 77fa3f8
azdev style edits and update readme
michelletaal-shell ee468a5
added help for new options and azdev lint edits
michelletaal-shell c699f9b
fixed spelling plural to singular
michelletaal-shell 23a2635
[REV1] merge list command with short argument
michelletaal-shell 3c03487
[REV2] Validate json string or file (+ int type)
michelletaal-shell 40c8f99
[REV2] Remove in-function json validation
michelletaal-shell 842ab62
Merge branch 'feature/amg-notification-channel' into main
michelletaal-shell dbdedca
Pull from main
michelletaal-shell 75f70f0
added end-to-end testing
michelletaal-shell 335d486
Merge branch 'feature/amg-notification-channel' of https://github.com…
michelletaal-shell 6cb91ce
update e2e testing w/ pass
michelletaal-shell d2fd7e6
update header; delete test output
michelletaal-shell f4e0d92
set tests to live and base commands
michelletaal-shell File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -32,6 +32,15 @@ def load_command_table(self, _): | |
g.custom_command('query', 'query_data_source') | ||
g.custom_command('update', 'update_data_source') | ||
|
||
with self.command_group('grafana notification-channel') as g: | ||
g.custom_command('list', 'list_notification_channels') | ||
g.custom_command('list-short', 'list_notification_channels_short') | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I suggest we merge this with There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Valid suggestion. Applied in commit [REV1] |
||
g.custom_show_command('show', 'show_notification_channel') | ||
g.custom_command('create', 'create_notification_channel') | ||
g.custom_command('update', 'update_notification_channel') | ||
g.custom_command('delete', 'delete_notification_channel') | ||
g.custom_command('test', 'test_notification_channel') | ||
|
||
with self.command_group('grafana folder') as g: | ||
g.custom_command('create', 'create_folder') | ||
g.custom_command('list', 'list_folders') | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
You can use
type=validate_file_or_dict
for json string or json file.azure-cli-extensions/src/datafactory/azext_datafactory/generated/_params.py
Lines 395 to 400 in 81dd55b
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.
Currently, none of the arguments have type validation in place. Would you like me to expand my scope slightly and add type validation to all pre-existing commands as well?
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.
Yes, please. BTW, we usually don't need to specify
type
for most simple 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.
Applied in commits [REV2]
Type validation of the argument was added, leading to improved error messaging but also to conflict with the _try_load_file_content function currently executing type validation. This function was therefore omitted for all cli arguments except 'az grafana dashboard import' as this command takes int, str and json objects.