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

Fixes bug with adding hostname to web app. #1985

Merged
merged 3 commits into from Feb 6, 2017

Conversation

twitchax
Copy link
Contributor

@twitchax twitchax commented Feb 5, 2017

Fixes #1984.

@twitchax twitchax added the Web Apps az webapp label Feb 5, 2017
@twitchax twitchax added this to the Sprint 12 milestone Feb 5, 2017
@twitchax
Copy link
Contributor Author

twitchax commented Feb 6, 2017

@johanste, do you think we can get this in soon? :)

My Azure CLI blog post works better if this bug did not exist, haha.

Copy link
Member

@tjprescott tjprescott left a comment

Choose a reason for hiding this comment

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

LGTM--but please fix the parameter casing.

@@ -173,28 +173,27 @@ def show_container_settings(resource_group_name, name, slot=None):
def _filter_for_container_settings(settings):
return {x: settings[x] for x in settings if x in CONTAINER_APPSETTING_NAMES}

def add_hostname(resource_group_name, webapp, name, slot=None):
def add_hostname(resource_group_name, webappName, name, slot=None):
Copy link
Member

Choose a reason for hiding this comment

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

This should be Python casing (i.e. webapp_name).

webapp = client.sites.get_site(resource_group_name, webapp)
binding = HostNameBinding(webapp.location, host_name_binding_name=name, site_name=webapp)
webapp = client.sites.get_site(resource_group_name, webappName)
binding = HostNameBinding(webapp.location, host_name_binding_name=name, site_name=webapp.name)
Copy link
Member

Choose a reason for hiding this comment

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

So the problem was the parameter was redefined (webapp as a string in the method signature redefined to webapp the object). You could also use 'webapp_name' here too.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Good, good, will do. I know the other methods were unaffected, but I wanted to keep them consistent. I will update today.

Copy link
Member

@johanste johanste left a comment

Choose a reason for hiding this comment

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

Looks good.

@tjprescott tjprescott merged commit 7cea31e into Azure:master Feb 6, 2017
@twitchax
Copy link
Contributor Author

twitchax commented Feb 6, 2017

Thanks all!

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

Successfully merging this pull request may close these issues.

None yet

5 participants