Handle custom port for remote libvirt (#1296)

Extract the port number from the parsed URI as part of finalizing the
uri and associated options. Don't expose this as a separate item to be
set as it can be passed in as part of the host entry.

Closes: #789
This commit is contained in:
Darragh Bailey
2021-05-27 17:28:25 +01:00
committed by GitHub
parent 3ff5795528
commit daa8f8af55
2 changed files with 8 additions and 0 deletions

View File

@@ -358,6 +358,10 @@ describe VagrantPlugins::ProviderLibvirt::Config do
{:connect_via_ssh => true, :host => 'remote', :username => 'myuser'},
"ssh 'remote' -l 'myuser' -W %h:%p",
],
[ # remote contains port
{:connect_via_ssh => true, :host => 'remote:2222'},
"ssh 'remote' -p 2222 -W %h:%p",
],
[ # include user and default ssh key exists
{:connect_via_ssh => true, :host => 'remote', :username => 'myuser'},
"ssh 'remote' -l 'myuser' -i '/home/tests/.ssh/id_rsa' -W %h:%p",