Skip to content

Conversation

@tjprescott
Copy link
Member

@tjprescott tjprescott commented Jan 8, 2019

Closes #7940.


This checklist is used to make sure that common guidelines for a pull request are followed.

  • The PR has modified HISTORY.rst describing any customer-facing, functional changes. Note that this does not include changes only to help content. (see Modifying change log).

  • I adhere to the Command Guidelines.

@tjprescott tjprescott added Network az network vnet/lb/nic/dns/etc... Feature labels Jan 8, 2019
@tjprescott tjprescott added this to the Sprint 52 milestone Jan 8, 2019
@tjprescott tjprescott requested a review from williexu January 8, 2019 00:36
@tjprescott tjprescott requested a review from marstr January 9, 2019 23:40
@tjprescott
Copy link
Member Author

ping @williexu @marstr this needs to make the current release.

Copy link
Member

@marstr marstr left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Few questions, but nothing that certainly requires changes.

for item in namespace.monitor_custom_headers:
try:
item_split = item.split('=', 1)
values.append({'name': item_split[0], 'value': item_split[1]})
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If values are allowed to have escaped equals signs, then we'll need a more robust split strategy here. If it's always a base64 encoded or similar, then we're okay.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is the same strategy used that has always been used with --tags and we've not had complaints. I believe it is because of the simpler constraints on the key. If there's an equal sign in the value (escaped or not) it shouldn't be an issue.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Err, so I may not need to worry about this. If the headers have already been correctly URL encoded, any equal sign should just show up as %3D. I imagine we're okay requiring properly encoded info here.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

(sorry, looks like there was a race condition, and I didn't see your message when I was typing mine.)

values = []
for item in namespace.status_code_ranges:
item_split = item.split('-', 1)
usage_error = CLIError('usage error: --status-code-ranges VAL | --status-code-ranges MIN-MAX')
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Are MIN and MAX inclusive or exclusive? As written, I assume inclusive.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The SDK is ambiguous on this, but yes I would assume inclusive. If you give a single value, it simply uses that value as both min and max.

values = []
for item in namespace.subnets:
try:
item_split = item.split('-', 1)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Unlike above, I think subnet strings are constrained enough that I don't think it's a problem to just use a split.

@tjprescott
Copy link
Member Author

@marstr replied to you comments. If you are happy with the responses, feel free to merge and proceed with the release. :)

@marstr marstr merged commit cfb9d22 into Azure:dev Jan 10, 2019
@tjprescott tjprescott deleted the TrafficManagerUpdates branch January 10, 2019 19:02
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.

Update azure traffic manager CLI commands to include the latest support features

3 participants