-
Notifications
You must be signed in to change notification settings - Fork 3.1k
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] Traffic manager command improvements #1511
Conversation
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.
Some comments for clarifications, and some suggestions
register_cli_argument('network traffic-manager endpoint', 'endpoint_monitor_status', help='The monitoring status of the endpoint.') | ||
register_cli_argument('network traffic-manager endpoint', 'endpoint_status', help="The status of the endpoint. If enabled the endpoint is probed for endpoint health and included in the traffic routing method.") | ||
register_cli_argument('network traffic-manager endpoint', 'min_child_endpoints', help="The minimum number of endpoints that must be available in the child profile for the parent profile to be considered available. Only applicable to an endpoint of type 'NestedEndpoints'.") | ||
register_cli_argument('network traffic-manager endpoint', 'priority', help="Priority of the endpoint when using the 'Priority' traffic routing method. Values range from 1 to 1000, with lower values representing higher priority.") |
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.
any reason you don't define the type of int
, and the weight
below?
all_options = \ | ||
['target_resource_id', 'target', 'min_child_endpoints', 'priority', 'weight', \ | ||
'endpoint_location'] | ||
props_to_options = { |
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.
Up to you, but you can populate this mapping through '--' + option.replace('_', '-')
to save some mappings
if tags is not None: | ||
instance.tags = tags | ||
if profile_status is not None: | ||
instance.profile_status = profile_status # TODO: Needs choice list Enabled/Disabled |
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.
do you still need this comment? I saw you had the choices_list defined
instance.dns_config.ttl = ttl | ||
|
||
monitor_params = [monitor_protocol, monitor_port, monitor_path] | ||
if any([x for x in monitor_params if x is not 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.
Suggest get rid of this if
, this list comprehension might cost more cycles than the 3 individual if conditions before
Hi @tjprescott, I'm your friendly neighborhood Azure Pull Request Bot (You can call me AZPRBOT). Thanks for your contribution! TTYL, AZPRBOT; |
profile/endpoint update
commands for parity with Xplat ([Network] Update Commands not at parity with Xplat #818)endpoint create
.