Skip to content
This repository has been archived by the owner on Aug 21, 2020. It is now read-only.

Commit

Permalink
remove redundant if block, dvswitch will never be nil when referenced…
Browse files Browse the repository at this point in the history
… from the create method
  • Loading branch information
crayfishx committed Aug 2, 2016
1 parent 55401d8 commit 87924df
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions lib/puppet/provider/vc_dvswitch/default.rb
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,7 @@ def create
create_spec = RbVmomi::VIM::DVSCreateSpec.new
create_spec.configSpec = RbVmomi::VIM::DVSConfigSpec.new
create_spec.configSpec.name = basename
if @dvswitch.nil? && resource[:vds_version]
create_spec.productInfo = RbVmomi::VIM::DistributedVirtualSwitchProductSpec.new
create_spec.productInfo.version = resource[:vds_version]
end

# find the network folder and invoke the task
dc = vim.serviceInstance.find_datacenter(parent)
task_create_dvs = dc.networkFolder.CreateDVS_Task(:spec => create_spec)
Expand Down

0 comments on commit 87924df

Please sign in to comment.