Skip to content

Commit

Permalink
Take mac format in multiple formats and convert to what Vsphere expects
Browse files Browse the repository at this point in the history
  • Loading branch information
taliesins committed Nov 17, 2016
1 parent 589cf8a commit 0037407
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/vSphere/config.rb
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ def initialize(network_config)
@start_connected = network_config[:start_connected] if network_config.key?(:start_connected)
@vlan = network_config[:vlan] if network_config.key?(:vlan)
@address_type = network_config[:address_type] if network_config.key?(:address_type)
@mac_address = network_config[:mac_address] if network_config.key?(:mac_address)
@mac_address = network_config[:mac_address].tr(' |-', '').gsub(/(..)(..)(..)(..)(..)(..)/, '\1:\2:\3:\4:\5:\6') if network_config.key?(:mac_address)
@address_type = 'manual' if network_config.key?(:mac_address)
@ip_address = network_config[:ip_address] if network_config.key?(:ip_address)
@wake_on_lan_enabled = network_config[:wake_on_lan_enabled] if network_config.key?(:wake_on_lan_enabled)
Expand Down

0 comments on commit 0037407

Please sign in to comment.