From 87924dfe80462c6d886d5caa4822ef2828207420 Mon Sep 17 00:00:00 2001 From: Craig Dunn Date: Tue, 2 Aug 2016 17:19:26 +0200 Subject: [PATCH] remove redundant if block, dvswitch will never be nil when referenced from the create method --- lib/puppet/provider/vc_dvswitch/default.rb | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/lib/puppet/provider/vc_dvswitch/default.rb b/lib/puppet/provider/vc_dvswitch/default.rb index 310288c2..aef56940 100644 --- a/lib/puppet/provider/vc_dvswitch/default.rb +++ b/lib/puppet/provider/vc_dvswitch/default.rb @@ -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)