Skip to content

Commit

Permalink
Merge pull request CenturyLinkCloud#81 from jzinn/ipv6
Browse files Browse the repository at this point in the history
Handle IPv6 address returned by VM
  • Loading branch information
JJ Asghar authored Mar 2, 2018
2 parents 883ccfd + c11d30e commit 0be338e
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 4 deletions.
2 changes: 1 addition & 1 deletion .rubocop_todo.yml
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ Metrics/BlockNesting:
# Offense count: 3
# Configuration parameters: CountComments.
Metrics/ClassLength:
Max: 638
Max: 643

# Offense count: 11
Metrics/CyclomaticComplexity:
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ A vCenter and valid login credentials.

### VM Template

A VM template capable of installing Chef 11.8 or newer. This can be either windows or linux flavored.
A VM template capable of installing Chef 11.8 or newer. This can be either windows or linux flavored. Both IPv4 and IPv6 are supported.

### A provisioning node (can be local)

Expand Down
9 changes: 7 additions & 2 deletions lib/chef/provisioning/vsphere_driver/driver.rb
Original file line number Diff line number Diff line change
Expand Up @@ -847,8 +847,13 @@ def create_winrm_transport(host, options)
else
winrm_options.merge!(options[:winrm_opts])
end
endpoint = "http#{winrm_transport == :ssl ? 's' : ''}://"\
"#{host}:#{port}/wsman"
scheme = winrm_transport == :ssl ? 'https' : 'http'
endpoint = URI::Generic.build(
scheme: scheme,
host: host,
port: port,
path: '/wsman'
).to_s

Chef::Provisioning::Transport::WinRM.new(
endpoint,
Expand Down

0 comments on commit 0be338e

Please sign in to comment.