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

Add az acs kubernetes browse and also open a web browser. #1327

Merged
merged 2 commits into from
Nov 17, 2016

Conversation

brendandburns
Copy link
Member

@lostintangent
Copy link
Member

This will be an awesome helper command. Thanks for the quick response!

"""
Wrapper on the 'kubectl proxy' command, for consistency with 'az dcos brows'
"""
logger.info('Proxy running on 127.0.0.1:8001/ui')
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 logger.warning I believe.
logger.info will only be should to the user if they add the --verbose or --debug flags.

Copy link
Member Author

Choose a reason for hiding this comment

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

done.


def k8s_browse(disable_browser=False):
"""
Wrapper on the 'kubectl proxy' command, for consistency with 'az dcos brows'
Copy link
Member

Choose a reason for hiding this comment

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

Typo: browse

Copy link
Member Author

Choose a reason for hiding this comment

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

done.

t.daemon = True
t.start()

def k8s_browse(disable_browser=False):
Copy link
Member

Choose a reason for hiding this comment

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

Should add help for the disable_browser param.

You can modify _params.py. Could add something like this:

register_cli_argument('acs', 'disable_browser', help='Do not open browser after command execution')

Copy link
Member

Choose a reason for hiding this comment

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

By passing in the first argument as 'acs', it'll add help for the DCOS browse command below as well.

Copy link
Member Author

Choose a reason for hiding this comment

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

done.

@@ -61,6 +87,8 @@ def dcos_browse(name, resource_group_name):
proxy.set_http_proxy('127.0.0.1', local_port)
logger.info('Proxy running on 127.0.0.1:%s', local_port)
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 warning instead of info also.

Copy link
Member Author

Choose a reason for hiding this comment

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

done.

Copy link
Member

@derekbekoe derekbekoe left a comment

Choose a reason for hiding this comment

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

LGTM!

@derekbekoe derekbekoe merged commit e643e23 into Azure:master Nov 17, 2016
thegalah pushed a commit to thegalah/azure-cli that referenced this pull request Nov 17, 2016
* Azure/master:
  Add `az acs kubernetes browse` and also open a web browser. (Azure#1327)
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.

5 participants