Skip to content
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

Merged
merged 5 commits into from
Dec 8, 2016
Merged

[Network] Traffic manager command improvements #1511

merged 5 commits into from
Dec 8, 2016

Conversation

tjprescott
Copy link
Member

Copy link
Contributor

@yugangw-msft yugangw-msft left a 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.")
Copy link
Contributor

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 = {
Copy link
Contributor

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
Copy link
Contributor

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]):
Copy link
Contributor

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

@tjprescott tjprescott closed this Dec 8, 2016
@tjprescott tjprescott reopened this Dec 8, 2016
@azurecla
Copy link

azurecla commented Dec 8, 2016

Hi @tjprescott, I'm your friendly neighborhood Azure Pull Request Bot (You can call me AZPRBOT). Thanks for your contribution!

In order for us to evaluate and accept your PR, we ask that you sign a contribution license agreement. It's all electronic and will take just minutes. I promise there's no faxing. https://cla.azure.com.

TTYL, AZPRBOT;

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants