-
Notifications
You must be signed in to change notification settings - Fork 280
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
Add more az cli wrappers for VM #19402
Conversation
Add more functions to manage VM.
08551bc
to
e5cf670
Compare
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.
LGTM
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.
LGTM
@@ -134,6 +134,11 @@ sub az_network_vnet_create { | |||
croak("Argument < $_ > missing") unless $args{$_}; } | |||
$args{address_prefixes} //= '192.168.0.0/16'; | |||
$args{subnet_prefixes} //= '192.168.0.0/24'; | |||
foreach (qw(address_prefixes subnet_prefixes)) { | |||
croak "Invalid IP range $args{$_} in $_" | |||
unless ($args{$_} =~ /^[1-9]{1}[0-9]{0,2}\.(0|[1-9]{1,3})\.(0|[1-9]{1,3})\.(0|[1-9]{1,3})\/[0-9]+$/); |
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's is something that @lpalovsky is using in SDAF modules to check IP addresses format which could help here:
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.
Thanks, I'll give it a try in a next PR
Add more functions to manage VM.
Add more functions to manage VM.
Verification run: