Sha256: c68af9860eadfba730d925105dc43196efb584402635d93f7454e81b1cc797ed

Contents?: true

Size: 1.05 KB

Versions: 18

Compression:

Stored size: 1.05 KB

Contents

# frozen_string_literal: true
module ChefProvisioningVsphereStubs
  class VsphereHelperStub < ChefProvisioningVsphere::VsphereHelper
    def initialize; end

    def network_device_changes(_action_handler, _vm_template, _options)
      [
        [RbVmomi::VIM::VirtualDeviceConfigSpec.new],
        [RbVmomi::VIM::VirtualDeviceConfigSpec.new]
      ]
    end

    def find_host(_host_name)
      RbVmomi::VIM::HostSystem.new
    end

    def find_pool(_pool_name)
      RbVmomi::VIM::ResourcePool.new(nil, nil)
    end

    def find_datastore(_datastore_name)
      RbVmomi::VIM::Datastore.new
    end

    def find_customization_spec(_options)
      RbVmomi::VIM::CustomizationSpec.new
    end

    def create_delta_disk(vm_template); end
  end
end

module RbVmomi
  class VIM::HostSystem
    attr_reader :parent

    def parent
      @parent ||= RbVmomi::VIM::ComputeResource.new
    end
  end
end

module RbVmomi
  class VIM::ComputeResource
    attr_reader :resourcePool

    def resourcePool
      @resourcePool ||= RbVmomi::VIM::ResourcePool.new(nil, nil)
    end
  end
end

Version data entries

18 entries across 18 versions & 1 rubygems

Version Path
chef-provisioning-vsphere-2.2.2 spec/unit_tests/support/vsphere_helper_stub.rb
chef-provisioning-vsphere-2.2.1 spec/unit_tests/support/vsphere_helper_stub.rb
chef-provisioning-vsphere-2.2.0 spec/unit_tests/support/vsphere_helper_stub.rb
chef-provisioning-vsphere-2.1.0 spec/unit_tests/support/vsphere_helper_stub.rb
chef-provisioning-vsphere-2.0.10 spec/unit_tests/support/vsphere_helper_stub.rb
chef-provisioning-vsphere-2.0.9 spec/unit_tests/support/vsphere_helper_stub.rb
chef-provisioning-vsphere-2.0.8 spec/unit_tests/support/vsphere_helper_stub.rb
chef-provisioning-vsphere-2.0.7 spec/unit_tests/support/vsphere_helper_stub.rb
chef-provisioning-vsphere-2.0.6 spec/unit_tests/support/vsphere_helper_stub.rb
chef-provisioning-vsphere-2.0.5 spec/unit_tests/support/vsphere_helper_stub.rb
chef-provisioning-vsphere-2.0.4 spec/unit_tests/support/vsphere_helper_stub.rb
chef-provisioning-vsphere-2.0.3 spec/unit_tests/support/vsphere_helper_stub.rb
chef-provisioning-vsphere-2.0.2 spec/unit_tests/support/vsphere_helper_stub.rb
chef-provisioning-vsphere-2.0.0 spec/unit_tests/support/vsphere_helper_stub.rb
chef-provisioning-vsphere-1.1.2 spec/unit_tests/support/vsphere_helper_stub.rb
chef-provisioning-vsphere-1.1.1 spec/unit_tests/support/vsphere_helper_stub.rb
chef-provisioning-vsphere-1.1.0 spec/unit_tests/support/vsphere_helper_stub.rb
chef-provisioning-vsphere-1.0.0 spec/unit_tests/support/vsphere_helper_stub.rb