-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
{Network} Connection monitor V2 preview #1238
{Network} Connection monitor V2 preview #1238
Conversation
If this PR is for a new extension or change to an existing extension, use the following to try out the changes in this PR:
|
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.
Good job! LGTM in general. Could we move one more test from CLI core in here. There is a test called test_network_watcher_connection_monitor
in main CLI. I saw several tests about V2 cm which is awesome. Better to test some cross situations so that we won't bring breaking change for current users.
src/connection-monitor-preview/azext_connection_monitor_preview/commands.py
Outdated
Show resolved
Hide resolved
connection_monitor_name, | ||
watcher_rg, | ||
watcher_name, | ||
resource_group_name=None, |
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.
want to confirm. Is resource_group_name
mandatory?
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, This is a weird parameter...Even though it was set in function signature through process_nw_cm_create_namespace(cmd, namesapce)
in _validators.py, but eventually it's useless, it uses watcher_rg finally in create_nw_connection_monitor.
So I am also get confused by the old code.
src/connection-monitor-preview/azext_connection_monitor_preview/custom.py
Show resolved
Hide resolved
src/connection-monitor-preview/azext_connection_monitor_preview/_params.py
Show resolved
Hide resolved
src/connection-monitor-preview/azext_connection_monitor_preview/commands.py
Outdated
Show resolved
Hide resolved
src/connection-monitor-preview/azext_connection_monitor_preview/commands.py
Outdated
Show resolved
Hide resolved
c.extra('location', get_location_type(self.cli_ctx), required=True) | ||
c.argument('resource_group_name', arg_type=ignore_type, validator=nw_validator) | ||
|
||
with self.argument_context('network watcher connection-monitor create', arg_group='V1') as c: |
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 it be arg_group='V1 Endpoint'
?
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.
I re-group them,
V1 Endpoint Arguemnt incldues: --source-xxxx
, --dest-xxx
, --do-not-start
, --monitoring-interval
V2 Argument includes only: --notes
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.
help='Create the connection monitor but do not start it immediately.') | ||
# c.ignore('location') | ||
|
||
with self.argument_context('network watcher connection-monitor', min_api='2019-11-01') as c: |
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.
Is this used both in V1 and V2?
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. It is used to create V2 only. What do you suggest?
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.
arg group maybe?
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.
I re-group them,
V1 Endpoint Arguemnt incldues: --source-xxxx
, --dest-xxx
, --do-not-start
, --monitoring-interval
V2 Argument includes only: --notes
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.
nw_connection_monitor_sdk, | ||
client_factory=cf_nw_connection_monitor, | ||
min_api='2018-01-01') as g: | ||
g.custom_command('create', 'create_nw_connection_monitor', validator=process_nw_cm_create_namespace) |
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.
could we add more help information in _help.py
for this command? like what we need to create a V2 cm. I mean in long summary part.
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.
Could you be more specifically?
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.
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.
Other part is ok. If we meet more issues, we can fix them in our main CLI
src_resource_name=source_name, | ||
src_resource_id=source_resource_id) | ||
|
||
# connection monitor V2 is in preview stage |
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.
Hello. Is this by purpose. should it success?
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.
As talked at Teams, believe it could be some transient issue of conflict error with ARM/LA.
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.
Change default location to eastus in test
add to S165. |
Temporary hotfix Azure/azure-cli#9432
This checklist is used to make sure that common guidelines for a pull request are followed.
General Guidelines
azdev style <YOUR_EXT>
locally? (pip install azdev
required)python scripts/ci/test_index.py -q
locally?For new extensions: