lib/chef/knife/cloud/vcenter_service.rb
def datacenter_exists?(name)
          dc_api = VSphereAutomation::VCenter::DatacenterApi.new(api_client)
          dcs = dc_api.list({ filter_names: name }).value

          raise format("Unable to find data center: %s", name) if dcs.empty?
        end
# Checks to see if the datacenter exists in the vCenter
#
# @param [String] name is the name of the datacenter
Checks to see if the datacenter exists in the vCenter
Checks to see if the datacenter exists in the vCenter
def datacenter_exists?(name)
          dc_api = VSphereAutomation::VCenter::DatacenterApi.new(api_client)
          dcs = dc_api.list({ filter_names: name }).value
          raise format("Unable to find data center: %s", name) if dcs.empty?
        end
def datacenter_exists? ( name ) dc_api = VSphereAutomation :: VCenter :: DatacenterApi . new ( api_client ) dcs = dc_api . list ( { filter_names : name } ) . value raise format ( "Unable to find data center: %s" , name ) if dcs . empty? end
Checks to see if the datacenter exists in the vCenter
Checks to see if the datacenter exists in the vCenter
name
name is the name of the datacenter
name is the name of the datacenter