Skip to content

Also allow --hostname in az ssh config#4230

Open
jacquerie-meritis wants to merge 1 commit into
Azure:mainfrom
jacquerie-meritis:also-allow-hostname-argument
Open

Also allow --hostname in az ssh config#4230
jacquerie-meritis wants to merge 1 commit into
Azure:mainfrom
jacquerie-meritis:also-allow-hostname-argument

Conversation

@jacquerie-meritis
Copy link
Copy Markdown

@jacquerie-meritis jacquerie-meritis commented Dec 15, 2021

Similarly to az ssh vm, az ssh config should also accept using the --hostname form of the argument as well as --ip. See:

c.argument('ssh_ip', options_list=['--ip', '--hostname'],
help='The public (or reachable private) IP address (or hostname) of the VM')

And:
c.argument('ssh_ip', options_list=['--ip'], help='The public IP address (or hostname) of the VM')


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

General Guidelines

  • Have you run azdev style <YOUR_EXT> locally? (pip install azdev required)
  • Have you run python scripts/ci/test_index.py -q locally?

For new extensions:

About Extension Publish

There is a pipeline to automatically build, upload and publish extension wheels.
Once your PR is merged into master branch, a new PR will be created to update src/index.json automatically.
The precondition is to put your code inside this repo and upgrade the version in the PR but do not modify src/index.json.

@ghost ghost added the customer-reported Issues that are reported by GitHub users external to the Azure organization. label Dec 15, 2021
@ghost
Copy link
Copy Markdown

ghost commented Dec 15, 2021

Thank you for your contribution jacquerie-meritis! We will review the pull request and get back to you soon.

@jacquerie-meritis
Copy link
Copy Markdown
Author

For completeness, I can also report that this crashes:

$ azdev style ssh
Traceback (most recent call last):
  File "/home/jacquerie/.local/bin/azdev", line 8, in <module>
    sys.exit(main())
  File "/home/jacquerie/.local/lib/python3.8/site-packages/azdev/__main__.py", line 39, in main
    config_dir=get_azdev_config_dir())
  File "/home/jacquerie/.local/lib/python3.8/site-packages/azdev/utilities/config.py", line 24, in get_azdev_config_dir
    _, env_name = os.path.splitdrive(get_env_path())
  File "/usr/lib/python3.8/posixpath.py", line 134, in splitdrive
    p = os.fspath(p)
TypeError: expected str, bytes or os.PathLike object, not NoneType

I didn't investigate further because I doubt such a small change can really be violating the style guide anyway...

@yonzhan yonzhan requested a review from jiasli December 21, 2021 13:55
@yonzhan yonzhan added this to the Jan 2022 (2022-02-01) milestone Dec 21, 2021
@yonzhan
Copy link
Copy Markdown
Collaborator

yonzhan commented Dec 21, 2021

ssh

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

Labels

customer-reported Issues that are reported by GitHub users external to the Azure organization.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants