Sha256: 096fd5a993ce291be34d144a9f4d72a5ea6f01597a9862fcaefa495e42dd56e0

Contents?: true

Size: 1.02 KB

Versions: 11

Compression:

Stored size: 1.02 KB

Contents

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

11 entries across 11 versions & 1 rubygems

Version Path
chef-provisioning-vsphere-0.8.3.dev.2 spec/unit_tests/support/vsphere_helper_stub.rb
chef-provisioning-vsphere-0.8.3.dev spec/unit_tests/support/vsphere_helper_stub.rb
chef-provisioning-vsphere-0.8.1 spec/unit_tests/support/vsphere_helper_stub.rb
chef-provisioning-vsphere-0.8.0 spec/unit_tests/support/vsphere_helper_stub.rb
chef-provisioning-vsphere-0.7.2 spec/unit_tests/support/vsphere_helper_stub.rb
chef-provisioning-vsphere-0.7.1 spec/unit_tests/support/vsphere_helper_stub.rb
chef-provisioning-vsphere-0.7.0 spec/unit_tests/support/vsphere_helper_stub.rb
chef-provisioning-vsphere-0.6.0 spec/unit_tests/support/vsphere_helper_stub.rb
chef-provisioning-vsphere-0.6.0.dev.1 spec/unit_tests/support/vsphere_helper_stub.rb
chef-provisioning-vsphere-0.5.8 spec/unit_tests/support/vsphere_helper_stub.rb
chef-provisioning-vsphere-0.5.7.dev6 spec/unit_tests/support/vsphere_helper_stub.rb