public class ImageStub extends com.vmware.vapi.internal.bindings.Stub implements Image
Image
API service.
WARNING: Internal class, subject to change in future versions.
Constructor and Description |
---|
ImageStub(ApiProvider apiProvider,
StubConfigurationBase config) |
ImageStub(ApiProvider apiProvider,
com.vmware.vapi.internal.bindings.TypeConverter typeConverter,
StubConfigurationBase config) |
Modifier and Type | Method and Description |
---|---|
java.lang.String |
mount(java.lang.String libraryItem,
java.lang.String vm)
Mounts an ISO image from a content library on a virtual machine.
|
void |
mount(java.lang.String libraryItem,
java.lang.String vm,
AsyncCallback<java.lang.String> asyncCallback)
Mounts an ISO image from a content library on a virtual machine.
|
void |
mount(java.lang.String libraryItem,
java.lang.String vm,
AsyncCallback<java.lang.String> asyncCallback,
InvocationConfig invocationConfig)
Mounts an ISO image from a content library on a virtual machine.
|
java.lang.String |
mount(java.lang.String libraryItem,
java.lang.String vm,
InvocationConfig invocationConfig)
Mounts an ISO image from a content library on a virtual machine.
|
void |
unmount(java.lang.String vm,
java.lang.String cdrom)
Unmounts a previously mounted CD-ROM using an ISO image as a backing.
|
void |
unmount(java.lang.String vm,
java.lang.String cdrom,
AsyncCallback<java.lang.Void> asyncCallback)
Unmounts a previously mounted CD-ROM using an ISO image as a backing.
|
void |
unmount(java.lang.String vm,
java.lang.String cdrom,
AsyncCallback<java.lang.Void> asyncCallback,
InvocationConfig invocationConfig)
Unmounts a previously mounted CD-ROM using an ISO image as a backing.
|
void |
unmount(java.lang.String vm,
java.lang.String cdrom,
InvocationConfig invocationConfig)
Unmounts a previously mounted CD-ROM using an ISO image as a backing.
|
public ImageStub(ApiProvider apiProvider, com.vmware.vapi.internal.bindings.TypeConverter typeConverter, StubConfigurationBase config)
public ImageStub(ApiProvider apiProvider, StubConfigurationBase config)
public java.lang.String mount(java.lang.String libraryItem, java.lang.String vm)
Image
Synchronous method overload. Result of the invocation will be reported as a method return value.
mount
in interface Image
libraryItem
- The identifier of the library item having the ISO image to mount on the virtual
machine.
The parameter must be an identifier for the resource type: com.vmware.content.library.Item
.vm
- The identifier of the virtual machine where the specified ISO image will be
mounted.
The parameter must be an identifier for the resource type: VirtualMachine
.com.vmware.vcenter.vm.hardware.Cdrom
.public java.lang.String mount(java.lang.String libraryItem, java.lang.String vm, InvocationConfig invocationConfig)
Image
Synchronous method overload. Result of the invocation will be
reported as a method return value.
Use invocationConfig
to specify configuration for this particular invocation.
mount
in interface Image
libraryItem
- The identifier of the library item having the ISO image to mount on the virtual
machine.
The parameter must be an identifier for the resource type: com.vmware.content.library.Item
.vm
- The identifier of the virtual machine where the specified ISO image will be
mounted.
The parameter must be an identifier for the resource type: VirtualMachine
.invocationConfig
- Configuration for the method invocation.com.vmware.vcenter.vm.hardware.Cdrom
.public void mount(java.lang.String libraryItem, java.lang.String vm, AsyncCallback<java.lang.String> asyncCallback)
Image
Asynchronous method overload. Result of the invocation will be
reported via the specified asyncCallback
.
Operation Result:
The identifier of the newly created virtual CD-ROM backed by the specified ISO
image.
The return value will be an identifier for the resource type: com.vmware.vcenter.vm.hardware.Cdrom
.
Operation Errors:
NotFound
- If either vm
or the libraryItem
is not found.
InvalidArgument
- If no .iso file is present on the library item.
NotAllowedInCurrentState
- When the operation is not allowed on the virtual machine in its current state.
Unauthorized
- if you do not have all of the privileges described as follows:
System.Read
. VirtualMachine
referenced by the parameter vm
requires VirtualMachine.Config.AddRemoveDevice
. com.vmware.content.library.Item
referenced by the parameter libraryItem
requires ContentLibrary.DownloadSession
. mount
in interface Image
libraryItem
- The identifier of the library item having the ISO image to mount on the virtual
machine.
The parameter must be an identifier for the resource type: com.vmware.content.library.Item
.vm
- The identifier of the virtual machine where the specified ISO image will be
mounted.
The parameter must be an identifier for the resource type: VirtualMachine
.asyncCallback
- Receives the status (progress, result or error) of the operation invocation.public void mount(java.lang.String libraryItem, java.lang.String vm, AsyncCallback<java.lang.String> asyncCallback, InvocationConfig invocationConfig)
Image
Asynchronous method overload. Result of the invocation will be
reported via the specified asyncCallback
.
Use invocationConfig
to specify configuration for this particular invocation.
Operation Result:
The identifier of the newly created virtual CD-ROM backed by the specified ISO
image.
The return value will be an identifier for the resource type: com.vmware.vcenter.vm.hardware.Cdrom
.
Operation Errors:
NotFound
- If either vm
or the libraryItem
is not found.
InvalidArgument
- If no .iso file is present on the library item.
NotAllowedInCurrentState
- When the operation is not allowed on the virtual machine in its current state.
Unauthorized
- if you do not have all of the privileges described as follows:
System.Read
. VirtualMachine
referenced by the parameter vm
requires VirtualMachine.Config.AddRemoveDevice
. com.vmware.content.library.Item
referenced by the parameter libraryItem
requires ContentLibrary.DownloadSession
. mount
in interface Image
libraryItem
- The identifier of the library item having the ISO image to mount on the virtual
machine.
The parameter must be an identifier for the resource type: com.vmware.content.library.Item
.vm
- The identifier of the virtual machine where the specified ISO image will be
mounted.
The parameter must be an identifier for the resource type: VirtualMachine
.asyncCallback
- Receives the status (progress, result or error) of the operation invocation.invocationConfig
- Configuration for the method invocation.public void unmount(java.lang.String vm, java.lang.String cdrom)
Image
Synchronous method overload. Result of the invocation will be reported as a method return value.
unmount
in interface Image
vm
- The identifier of the virtual machine from which to unmount the virtual CD-ROM.
The parameter must be an identifier for the resource type: VirtualMachine
.cdrom
- The device identifier of the CD-ROM.
The parameter must be an identifier for the resource type: com.vmware.vcenter.vm.hardware.Cdrom
.public void unmount(java.lang.String vm, java.lang.String cdrom, InvocationConfig invocationConfig)
Image
Synchronous method overload. Result of the invocation will be
reported as a method return value.
Use invocationConfig
to specify configuration for this particular invocation.
unmount
in interface Image
vm
- The identifier of the virtual machine from which to unmount the virtual CD-ROM.
The parameter must be an identifier for the resource type: VirtualMachine
.cdrom
- The device identifier of the CD-ROM.
The parameter must be an identifier for the resource type: com.vmware.vcenter.vm.hardware.Cdrom
.invocationConfig
- Configuration for the method invocation.public void unmount(java.lang.String vm, java.lang.String cdrom, AsyncCallback<java.lang.Void> asyncCallback)
Image
Asynchronous method overload. Result of the invocation will be
reported via the specified asyncCallback
.
Operation Errors:
NotFound
- If the virtual machine identified by vm
is not found or the cdrom
does not identify a virtual CD-ROM in the virtual machine.
NotAllowedInCurrentState
- When the operation is not allowed on the virtual machine in its current state.
Unauthorized
- if you do not have all of the privileges described as follows:
System.Read
. VirtualMachine
referenced by the parameter vm
requires VirtualMachine.Config.AddRemoveDevice
. com.vmware.vcenter.vm.hardware.Cdrom
referenced by the parameter cdrom
requires System.Read
. unmount
in interface Image
vm
- The identifier of the virtual machine from which to unmount the virtual CD-ROM.
The parameter must be an identifier for the resource type: VirtualMachine
.cdrom
- The device identifier of the CD-ROM.
The parameter must be an identifier for the resource type: com.vmware.vcenter.vm.hardware.Cdrom
.asyncCallback
- Receives the status (progress, result or error) of the operation invocation.public void unmount(java.lang.String vm, java.lang.String cdrom, AsyncCallback<java.lang.Void> asyncCallback, InvocationConfig invocationConfig)
Image
Asynchronous method overload. Result of the invocation will be
reported via the specified asyncCallback
.
Use invocationConfig
to specify configuration for this particular invocation.
Operation Errors:
NotFound
- If the virtual machine identified by vm
is not found or the cdrom
does not identify a virtual CD-ROM in the virtual machine.
NotAllowedInCurrentState
- When the operation is not allowed on the virtual machine in its current state.
Unauthorized
- if you do not have all of the privileges described as follows:
System.Read
. VirtualMachine
referenced by the parameter vm
requires VirtualMachine.Config.AddRemoveDevice
. com.vmware.vcenter.vm.hardware.Cdrom
referenced by the parameter cdrom
requires System.Read
. unmount
in interface Image
vm
- The identifier of the virtual machine from which to unmount the virtual CD-ROM.
The parameter must be an identifier for the resource type: VirtualMachine
.cdrom
- The device identifier of the CD-ROM.
The parameter must be an identifier for the resource type: com.vmware.vcenter.vm.hardware.Cdrom
.asyncCallback
- Receives the status (progress, result or error) of the operation invocation.invocationConfig
- Configuration for the method invocation.