Package prlsdkapi :: Class VmBaseDev
[hide private]
[frames] | no frames]

Class VmBaseDev

  object --+            
           |            
 prlsdk.Base --+        
               |        
prlsdk.BaseAsync --+    
                   |    
prlsdk.OwnerRefAsync --+
                       |
                      VmBaseDev
Known Subclasses:

VmBaseDev is a base class that provides methods for managing virtual devices.

Instance Methods [hide private]
 
create(self)
Create a new instance of the same class as this object.
 
connect(self)
Connect the device.
 
disconnect(self)
Disconnect the device.
 
create_image(self, allow_recreate=False, non_interactive_mode=False)
Create a virtual device image on the host.
 
remove(self)
Remove this object from the virtual machine device list.
 
set_default_stack_index(self)
Generate and automatically assign a stack index to the storage device.

Inherited from prlsdk.OwnerRefAsync: __init__, __new__

Inherited from prlsdk.BaseAsync: __cmp__, __repr__, cancel, wait

Inherited from object: __delattr__, __getattribute__, __hash__, __reduce__, __reduce_ex__, __setattr__, __str__

Class Variables [hide private]
  __prefix__ = ''
  __int_prefix__ = 'vmdev'
Properties [hide private]
  type
The type of the device.
  index
A numeric index identifying a device.
  connected
Indicates whether the device is connected.
  enabled
Indicates whether the device is enabled.
  remote
Indicates whether this is a remote device.
  emulated_type
The device emulation type.
  sys_name
The device system name.
  friendly_name
The user-friendly name of the device.

Inherited from prlsdk.OwnerRefAsync: __owner__

Inherited from prlsdk.BaseAsync: __expected_h_type__, __job__, finished, handle_type

Inherited from prlsdk.Base: __handle__

Inherited from object: __class__

Method Details [hide private]

create(self)

 

Create a new instance of the same class as this object.

Returns:
A new class instance.

connect(self)

 

Connect the device. This operation can be performed on a running virtual machine. This is an asyncronous method.

Returns:
A Job object.

disconnect(self)

 

Disconnect the device. This operation can be performed on a running virtual machine. This is an asyncronous method.

Returns:
A Job object.

create_image(self, allow_recreate=False, non_interactive_mode=False)

 

Create a virtual device image on the host. This is an asynchronous method.

Parameters:
  • allow_recreate - Specifies whether the existing image should be replaced. True - replace the image; False - abort the operation if image exists.
  • non_interactive_mode - Specifies whether interactive mode should be used. True - use interactive mode; False - non-interactive mode.
Returns:
A Job object.

remove(self)

 

Remove this object from the virtual machine device list. The method only removes the object from memory. It does not delete the device from the existing virtual machine configuration.

set_default_stack_index(self)

 

Generate and automatically assign a stack index to the storage device. A corresponding device interface (IDE or SCSI) has to be set in advance. This method applies only to VmHddDev and VmOpticalDev.


Property Details [hide private]

type

The type of the device. See consts.PDE_xxx for available types.

Get Method:
unreachable.vmdev__get_type(vmdev, VmDev) - Gets device type, see prlsdk.consts.PDE_xxx

index

A numeric index identifying a device.

Get Method:
unreachable.vmdev__get_index(vmdev, VmDev) - Gets VM device index.
Set Method:
unreachable.vmdev__set_index(vmdev, VmDev, index) - Sets VM device index.

connected

Indicates whether the device is connected. True - connected; False - disconnected.

Get Method:
unreachable.vmdev__get_connected(vmdev, VmDev) - Checks whether VM device connected.
Set Method:
unreachable.vmdev__set_connected(vmdev, VmDev, connected) - Sets VM device connected sign.

enabled

Indicates whether the device is enabled. True - enabled; False - disabled.

Get Method:
unreachable.vmdev__get_enabled(vmdev, VmDev) - Checks whether VM device enabled.
Set Method:
unreachable.vmdev__set_enabled(vmdev, VmDev, enabled) - Sets VM device enabled sign.

remote

Indicates whether this is a remote device. True - remote; False - local.

Get Method:
unreachable.vmdev__get_remote(vmdev, VmDev) - Checks whether VM device remote device.
Set Method:
unreachable.vmdev__set_remote(vmdev, VmDev, remote) - Sets VM device remote sign.

emulated_type

The device emulation type.

Get Method:
unreachable.vmdev__get_emulated_type(vmdev, VmDev) - Gets VM device emulated type.
Set Method:
unreachable.vmdev__set_emulated_type(vmdev, VmDev, emulated_type) - Sets VM device emulated type.

sys_name

The device system name.

Get Method:
unreachable.vmdev__get_sys_name(vmdev, VmDev) - Returns VM device system name.
Set Method:
unreachable.vmdev__set_sys_name(vmdev, VmDev, new_sys_name) - Sets VM device system name.

friendly_name

The user-friendly name of the device.

Get Method:
unreachable.vmdev__get_friendly_name(vmdev, VmDev) - Returns VM device user friendly name.
Set Method:
unreachable.vmdev__set_friendly_name(vmdev, VmDev, new_friendly_name) - Sets VM device user friendly name.