Class: Com::Vmware::Vapi::Std::Errors::UnableToAllocateResource

Inherits:
Error
  • Object
show all
Defined in:
/build/mts/release/bora-4571906/build/sdk/aggregated-bindings/ruby/com/vmware/vapi/std/errors.rb

Overview

The ``Com::Vmware::Vapi::Std::Errors::UnableToAllocateResource`` error indicates that the method failed because it was unable to allocate or acquire a required resource.


 Examples:  

  * Trying to power on a virtual machine when there are not enough licenses to do so. 
   * Trying to power on a virtual machine that would violate a resource usage policy. 
  
   

 Counterexamples:  

  * Trying to power off a virtual machine that is in the process of being powered on. A   :class:`Com::Vmware::Vapi::Std::Errors::ResourceBusy`    error  would be used instead. 
   * Trying to remove a VMFS datastore when the is a virtual machine registered on any host attached to the datastore. The   :class:`Com::Vmware::Vapi::Std::Errors::ResourceInUse`    error  would be used instead. 
   * Trying to add a virtual switch if the physical network adapter being bridged is already in use. The   :class:`Com::Vmware::Vapi::Std::Errors::ResourceInUse`    error  would be used instead. 
   * Attempt to invoke some  method  on a virtual machine when the virtual machine's configuration file is not accessible (for example due to a storage APD condition). The   :class:`Com::Vmware::Vapi::Std::Errors::ResourceInaccessible`    error  would be used instead.

Instance Attribute Summary

Attributes inherited from Error

#data, #messages

Class Method Summary (collapse)

Instance Method Summary (collapse)

Constructor Details

- (UnableToAllocateResource) initialize(binding_type = self.class.binding_type, error_value = nil)

Constructs a new instance.

Parameters:

  • binding_type (VAPI::Bindings::BindingType) (defaults to: self.class.binding_type)

    the specific BindingType declaration for this concrete VapiError type

  • error_value (VAPI::Data::ErrorValue) (defaults to: nil)

    the error value (default nil)



394
395
396
# File '/build/mts/release/bora-4571906/build/sdk/aggregated-bindings/ruby/com/vmware/vapi/std/errors.rb', line 394

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

Class Method Details

+ (VAPI::Bindings::ErrorType) binding_type

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

Returns:

  • (VAPI::Bindings::ErrorType)

    the binding type



378
379
380
381
382
383
384
385
386
# File '/build/mts/release/bora-4571906/build/sdk/aggregated-bindings/ruby/com/vmware/vapi/std/errors.rb', line 378

def binding_type
    @binding_type ||= VAPI::Bindings::ErrorType.new(
        'com.vmware.vapi.std.errors.unable_to_allocate_resource',
        {
            'messages' => VAPI::Bindings::ListType.new(VAPI::Bindings::ReferenceType.new('Com::Vmware::Vapi::Std::LocalizableMessage')),
            'data' => VAPI::Bindings::OptionalType.new(VAPI::Bindings::DynamicStructType.new()),
        },
        UnableToAllocateResource)
end