{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: |
mmyyrroonn
left a comment
There was a problem hiding this comment.
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.
want to confirm. Is resource_group_name mandatory?
There was a problem hiding this comment.
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.
should it be arg_group='V1 Endpoint'?
There was a problem hiding this comment.
I re-group them,
V1 Endpoint Arguemnt incldues: --source-xxxx, --dest-xxx, --do-not-start, --monitoring-interval
V2 Argument includes only: --notes
| 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.
Is this used both in V1 and V2?
There was a problem hiding this comment.
No. It is used to create V2 only. What do you suggest?
There was a problem hiding this comment.
I re-group them,
V1 Endpoint Arguemnt incldues: --source-xxxx, --dest-xxx, --do-not-start, --monitoring-interval
V2 Argument includes only: --notes
| 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.
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.
Could you be more specifically?
| 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.
Hello. Is this by purpose. should it success?
There was a problem hiding this comment.
As talked at Teams, believe it could be some transient issue of conflict error with ARM/LA.
There was a problem hiding this comment.
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 azdevrequired)python scripts/ci/test_index.py -qlocally?For new extensions: