-
Notifications
You must be signed in to change notification settings - Fork 3.3k
[Container] az container create: Remove default values for container group to support standby pool reuse scenario
#31824
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
Changes from 1 commit
ec2ffde
c86d7ee
0e7929c
4988405
fb5eff4
e95931d
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
|
|
@@ -142,9 +142,18 @@ def create_container(cmd, | |||||
|
|
||||||
| standby_pool_profile_reference = _create_standby_pool_profile_reference(standby_pool_profile_id=standby_pool_profile_id, fail_container_group_create_on_reuse_failure=fail_container_group_create_on_reuse_failure) | ||||||
|
|
||||||
| ports = ports or [80] | ||||||
| protocol = protocol or ContainerGroupNetworkProtocol.tcp | ||||||
|
|
||||||
| # No default values need to be set for the standbypool reuse scenario | ||||||
| if standby_pool_profile_id != None: | ||||||
| vnet_address_prefix = None | ||||||
| subnet_address_prefix = None | ||||||
|
|
||||||
| ports = ports | ||||||
|
||||||
| ports = ports |
Outdated
Copilot
AI
Jul 16, 2025
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 assignment is a no-op and should be removed to simplify the code.
| protocol = protocol |
Outdated
Copilot
AI
Jul 16, 2025
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.
Use is None when checking against None to align with Python best practices.
| if standby_pool_profile_id == None: | |
| if standby_pool_profile_id is 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.
Use
is not Nonewhen comparing toNonefor better readability and to follow PEP8 conventions.