Class List Method List File List

# Class: Com::Vmware::Vcenter::VM::PlacementSpec

Inherits:
  VAPI::Bindings::VapiStruct
  - Object
  - VAPI::Bindings::VapiStruct
  - Com::Vmware::Vcenter::VM::PlacementSpec
  show all
Defined in:
  /build/mts/release/bora-4571906/build/sdk/aggregated-bindings/ruby/com/vmware/vcenter.rb

## Overview

The ``Com::Vmware::Vcenter::VM::PlacementSpec`` class contains information used to place a virtual machine onto resources within the vCenter inventory.

## Instance Attribute Summary (collapse)

- - (String?) cluster

  Cluster onto which the virtual machine should be placed.

- - (String?) datastore

  Datastore on which the virtual machine’s configuration state should be stored.

- - (String?) folder

  Virtual machine folder into which the virtual machine should be placed.

- - (String?) host

  Host onto which the virtual machine should be placed.

- - (String?) resource_pool

  Resource pool into which the virtual machine should be placed.

## Class Method Summary (collapse)

- + (VAPI::Bindings::StructType) binding_type

  Holds (gets or creates) the binding type metadata for this structure type.

## Instance Method Summary (collapse)

- - (PlacementSpec) initialize(ruby_values = nil, struct_value = nil) constructor

  Constructs a new instance.

## Constructor Details

### - (`PlacementSpec`) initialize(ruby_values = nil, struct_value = nil)

Constructs a new instance.

Parameters:

- ruby_values (`Hash`) (defaults to: `nil`) —

  a map of initial property values (optional)

- struct_value (`VAPI::Data::StructValue`) (defaults to: `nil`) —

  a raw StructValue from the wire (optional)

    2664
    2665
    2666
    # File '/build/mts/release/bora-4571906/build/sdk/aggregated-bindings/ruby/com/vmware/vcenter.rb', line 2664

    def initialize(ruby_values=nil, struct_value=nil)
        super(self.class.binding_type, ruby_values, struct_value)
    end

## Instance Attribute Details

### - (`String`?) cluster

Cluster onto which the virtual machine should be placed.

     If  ``cluster``  and  ``resourcePool``  are both specified,  ``resourcePool``  must belong to  ``cluster`` .

     If  ``cluster``  and  ``host``  are both specified,  ``host``  must be a member of  ``cluster`` .

If ``resourcePool`` or ``host`` is specified, it is recommended that this field be nil .

Returns:

- (`String`, `nil`)

    2633
    2634
    2635
    2636
    2637
    2638
    2639
    2640
    2641
    2642
    2643
    2644
    2645
    2646
    2647
    2648
    2649
    2650
    2651
    2652
    2653
    2654
    2655
    2656
    2657
    2658
    2659
    2660
    2661
    2662
    2663
    2664
    2665
    2666
    2667
    # File '/build/mts/release/bora-4571906/build/sdk/aggregated-bindings/ruby/com/vmware/vcenter.rb', line 2633

    class PlacementSpec < VAPI::Bindings::VapiStruct

        class << self
            # Holds (gets or creates) the binding type metadata for this structure type.
            # @scope class
            # @return [VAPI::Bindings::StructType] the binding type
            def binding_type
                @binding_type ||= VAPI::Bindings::StructType.new(
                    'com.vmware.vcenter.VM.placement_spec',
                    {
                        'folder' => VAPI::Bindings::OptionalType.new(VAPI::Bindings::IdType.new),
                        'resource_pool' => VAPI::Bindings::OptionalType.new(VAPI::Bindings::IdType.new),
                        'host' => VAPI::Bindings::OptionalType.new(VAPI::Bindings::IdType.new),
                        'cluster' => VAPI::Bindings::OptionalType.new(VAPI::Bindings::IdType.new),
                        'datastore' => VAPI::Bindings::OptionalType.new(VAPI::Bindings::IdType.new),
                    },
                    PlacementSpec,
                    false,
                    nil)
            end
        end

        attr_accessor :folder,
                      :resource_pool,
                      :host,
                      :cluster,
                      :datastore

        # Constructs a new instance.
        # @param ruby_values [Hash] a map of initial property values (optional)
        # @param struct_value [VAPI::Data::StructValue] a raw StructValue from the wire (optional)
        def initialize(ruby_values=nil, struct_value=nil)
            super(self.class.binding_type, ruby_values, struct_value)
        end
    end

### - (`String`?) datastore

Datastore on which the virtual machine’s configuration state should be stored. This datastore will also be used for any virtual disks that are created as part of the virtual machine creation operation. This field is currently required. In the future, if this field is nil , the system will attempt to choose suitable storage for the virtual machine; if storage cannot be chosen, the virtual machine creation operation will fail.

Returns:

- (`String`, `nil`)

    2633
    2634
    2635
    2636
    2637
    2638
    2639
    2640
    2641
    2642
    2643
    2644
    2645
    2646
    2647
    2648
    2649
    2650
    2651
    2652
    2653
    2654
    2655
    2656
    2657
    2658
    2659
    2660
    2661
    2662
    2663
    2664
    2665
    2666
    2667
    # File '/build/mts/release/bora-4571906/build/sdk/aggregated-bindings/ruby/com/vmware/vcenter.rb', line 2633

    class PlacementSpec < VAPI::Bindings::VapiStruct

        class << self
            # Holds (gets or creates) the binding type metadata for this structure type.
            # @scope class
            # @return [VAPI::Bindings::StructType] the binding type
            def binding_type
                @binding_type ||= VAPI::Bindings::StructType.new(
                    'com.vmware.vcenter.VM.placement_spec',
                    {
                        'folder' => VAPI::Bindings::OptionalType.new(VAPI::Bindings::IdType.new),
                        'resource_pool' => VAPI::Bindings::OptionalType.new(VAPI::Bindings::IdType.new),
                        'host' => VAPI::Bindings::OptionalType.new(VAPI::Bindings::IdType.new),
                        'cluster' => VAPI::Bindings::OptionalType.new(VAPI::Bindings::IdType.new),
                        'datastore' => VAPI::Bindings::OptionalType.new(VAPI::Bindings::IdType.new),
                    },
                    PlacementSpec,
                    false,
                    nil)
            end
        end

        attr_accessor :folder,
                      :resource_pool,
                      :host,
                      :cluster,
                      :datastore

        # Constructs a new instance.
        # @param ruby_values [Hash] a map of initial property values (optional)
        # @param struct_value [VAPI::Data::StructValue] a raw StructValue from the wire (optional)
        def initialize(ruby_values=nil, struct_value=nil)
            super(self.class.binding_type, ruby_values, struct_value)
        end
    end

### - (`String`?) folder

Virtual machine folder into which the virtual machine should be placed. This field is currently required. In the future, if this field is nil , the system will attempt to choose a suitable folder for the virtual machine; if a folder cannot be chosen, the virtual machine creation operation will fail.

Returns:

- (`String`, `nil`)

    2633
    2634
    2635
    2636
    2637
    2638
    2639
    2640
    2641
    2642
    2643
    2644
    2645
    2646
    2647
    2648
    2649
    2650
    2651
    2652
    2653
    2654
    2655
    2656
    2657
    2658
    2659
    2660
    2661
    2662
    2663
    2664
    2665
    2666
    2667
    # File '/build/mts/release/bora-4571906/build/sdk/aggregated-bindings/ruby/com/vmware/vcenter.rb', line 2633

    class PlacementSpec < VAPI::Bindings::VapiStruct

        class << self
            # Holds (gets or creates) the binding type metadata for this structure type.
            # @scope class
            # @return [VAPI::Bindings::StructType] the binding type
            def binding_type
                @binding_type ||= VAPI::Bindings::StructType.new(
                    'com.vmware.vcenter.VM.placement_spec',
                    {
                        'folder' => VAPI::Bindings::OptionalType.new(VAPI::Bindings::IdType.new),
                        'resource_pool' => VAPI::Bindings::OptionalType.new(VAPI::Bindings::IdType.new),
                        'host' => VAPI::Bindings::OptionalType.new(VAPI::Bindings::IdType.new),
                        'cluster' => VAPI::Bindings::OptionalType.new(VAPI::Bindings::IdType.new),
                        'datastore' => VAPI::Bindings::OptionalType.new(VAPI::Bindings::IdType.new),
                    },
                    PlacementSpec,
                    false,
                    nil)
            end
        end

        attr_accessor :folder,
                      :resource_pool,
                      :host,
                      :cluster,
                      :datastore

        # Constructs a new instance.
        # @param ruby_values [Hash] a map of initial property values (optional)
        # @param struct_value [VAPI::Data::StructValue] a raw StructValue from the wire (optional)
        def initialize(ruby_values=nil, struct_value=nil)
            super(self.class.binding_type, ruby_values, struct_value)
        end
    end

### - (`String`?) host

Host onto which the virtual machine should be placed.

     If  ``host``  and  ``resourcePool``  are both specified,  ``resourcePool``  must belong to  ``host`` .

     If  ``host``  and  ``cluster``  are both specified,  ``host``  must be a member of  ``cluster`` .

This field may be nil if ``resourcePool`` or ``cluster`` is specified. If nil , the system will attempt to choose a suitable host for the virtual machine; if a host cannot be chosen, the virtual machine creation operation will fail.

Returns:

- (`String`, `nil`)

    2633
    2634
    2635
    2636
    2637
    2638
    2639
    2640
    2641
    2642
    2643
    2644
    2645
    2646
    2647
    2648
    2649
    2650
    2651
    2652
    2653
    2654
    2655
    2656
    2657
    2658
    2659
    2660
    2661
    2662
    2663
    2664
    2665
    2666
    2667
    # File '/build/mts/release/bora-4571906/build/sdk/aggregated-bindings/ruby/com/vmware/vcenter.rb', line 2633

    class PlacementSpec < VAPI::Bindings::VapiStruct

        class << self
            # Holds (gets or creates) the binding type metadata for this structure type.
            # @scope class
            # @return [VAPI::Bindings::StructType] the binding type
            def binding_type
                @binding_type ||= VAPI::Bindings::StructType.new(
                    'com.vmware.vcenter.VM.placement_spec',
                    {
                        'folder' => VAPI::Bindings::OptionalType.new(VAPI::Bindings::IdType.new),
                        'resource_pool' => VAPI::Bindings::OptionalType.new(VAPI::Bindings::IdType.new),
                        'host' => VAPI::Bindings::OptionalType.new(VAPI::Bindings::IdType.new),
                        'cluster' => VAPI::Bindings::OptionalType.new(VAPI::Bindings::IdType.new),
                        'datastore' => VAPI::Bindings::OptionalType.new(VAPI::Bindings::IdType.new),
                    },
                    PlacementSpec,
                    false,
                    nil)
            end
        end

        attr_accessor :folder,
                      :resource_pool,
                      :host,
                      :cluster,
                      :datastore

        # Constructs a new instance.
        # @param ruby_values [Hash] a map of initial property values (optional)
        # @param struct_value [VAPI::Data::StructValue] a raw StructValue from the wire (optional)
        def initialize(ruby_values=nil, struct_value=nil)
            super(self.class.binding_type, ruby_values, struct_value)
        end
    end

### - (`String`?) resource_pool

Resource pool into which the virtual machine should be placed. This field is currently required if both ``host`` and ``cluster`` are nil . In the future, if this field is nil , the system will attempt to choose a suitable resource pool for the virtual machine; if a resource pool cannot be chosen, the virtual machine creation operation will fail.

Returns:

- (`String`, `nil`)

    2633
    2634
    2635
    2636
    2637
    2638
    2639
    2640
    2641
    2642
    2643
    2644
    2645
    2646
    2647
    2648
    2649
    2650
    2651
    2652
    2653
    2654
    2655
    2656
    2657
    2658
    2659
    2660
    2661
    2662
    2663
    2664
    2665
    2666
    2667
    # File '/build/mts/release/bora-4571906/build/sdk/aggregated-bindings/ruby/com/vmware/vcenter.rb', line 2633

    class PlacementSpec < VAPI::Bindings::VapiStruct

        class << self
            # Holds (gets or creates) the binding type metadata for this structure type.
            # @scope class
            # @return [VAPI::Bindings::StructType] the binding type
            def binding_type
                @binding_type ||= VAPI::Bindings::StructType.new(
                    'com.vmware.vcenter.VM.placement_spec',
                    {
                        'folder' => VAPI::Bindings::OptionalType.new(VAPI::Bindings::IdType.new),
                        'resource_pool' => VAPI::Bindings::OptionalType.new(VAPI::Bindings::IdType.new),
                        'host' => VAPI::Bindings::OptionalType.new(VAPI::Bindings::IdType.new),
                        'cluster' => VAPI::Bindings::OptionalType.new(VAPI::Bindings::IdType.new),
                        'datastore' => VAPI::Bindings::OptionalType.new(VAPI::Bindings::IdType.new),
                    },
                    PlacementSpec,
                    false,
                    nil)
            end
        end

        attr_accessor :folder,
                      :resource_pool,
                      :host,
                      :cluster,
                      :datastore

        # Constructs a new instance.
        # @param ruby_values [Hash] a map of initial property values (optional)
        # @param struct_value [VAPI::Data::StructValue] a raw StructValue from the wire (optional)
        def initialize(ruby_values=nil, struct_value=nil)
            super(self.class.binding_type, ruby_values, struct_value)
        end
    end

## Class Method Details

### + (`VAPI::Bindings::StructType`) binding_type

Holds (gets or creates) the binding type metadata for this structure type.

Returns:

- (`VAPI::Bindings::StructType`) —

  the binding type

    2639
    2640
    2641
    2642
    2643
    2644
    2645
    2646
    2647
    2648
    2649
    2650
    2651
    2652
    # File '/build/mts/release/bora-4571906/build/sdk/aggregated-bindings/ruby/com/vmware/vcenter.rb', line 2639

    def binding_type
        @binding_type ||= VAPI::Bindings::StructType.new(
            'com.vmware.vcenter.VM.placement_spec',
            {
                'folder' => VAPI::Bindings::OptionalType.new(VAPI::Bindings::IdType.new),
                'resource_pool' => VAPI::Bindings::OptionalType.new(VAPI::Bindings::IdType.new),
                'host' => VAPI::Bindings::OptionalType.new(VAPI::Bindings::IdType.new),
                'cluster' => VAPI::Bindings::OptionalType.new(VAPI::Bindings::IdType.new),
                'datastore' => VAPI::Bindings::OptionalType.new(VAPI::Bindings::IdType.new),
            },
            PlacementSpec,
            false,
            nil)
    end