private VirtualMachineSnapshot getCurrentSnapshotOrCreate(String snapshotName, String snapshotDescription, VirtualMachine master) throws InvalidName, VmConfigFault, SnapshotFault, TaskInProgress, FileFault, InvalidState, RuntimeFault, RemoteException { if (master.getSnapshot() == null) { Task task = master.createSnapshot_Task(snapshotName, snapshotDescription, false, false); try { if (task.waitForTask().equals(Task.SUCCESS)) { logger.debug(String.format("snapshot taken for '%s'", master.getName())); } } catch (Exception e) { logger.debug(String.format("Can't take snapshot for '%s'", master.getName()), e); throw propagate(e); } } else logger.debug(String.format("snapshot already available for '%s'", master.getName())); return master.getCurrentSnapShot(); }
/** * Remove the device. Make sure the VM is powered off before calling this method. * If destroyDeviceBacking is true, it deletes backings for example files in datastore. BE CAREFUL! */ public Task removeDevice(VirtualDevice device, boolean destroyDeviceBacking) throws InvalidName, VmConfigFault, DuplicateName, TaskInProgress, FileFault, InvalidState, ConcurrentAccess, InvalidDatastore, InsufficientResourcesFault, RuntimeFault, RemoteException { ArrayList<VirtualDevice> deviceList = new ArrayList<VirtualDevice>(); deviceList.add(device); return removeDevices(deviceList, destroyDeviceBacking); }
/** * Create an instance of {@link JAXBElement }{@code <}{@link InvalidName }{@code >}} * */ @XmlElementDecl(namespace = "urn:pbm", name = "InvalidNameFault") public JAXBElement<InvalidName> createInvalidNameFault(InvalidName value) { return new JAXBElement<InvalidName>(_InvalidNameFault_QNAME, InvalidName.class, null, value); }
/** * @param floppyImagePath - i.e. "[storage1] myVM/myFloppy.flp" Note: there is a space after ]. */ public Task addFloppyDriveFromISO(String floppyImagePath, boolean startConnected) throws InvalidName, VmConfigFault, DuplicateName, TaskInProgress, FileFault, InvalidState, ConcurrentAccess, InvalidDatastore, InsufficientResourcesFault, RuntimeFault, RemoteException { return addFloppyDrive(floppyImagePath, null, null, startConnected); }
/** * @param hostDevice - i.e. "/dev/fd0" */ public Task addFloppyDriveFromHost(String hostDevice, boolean startConnected) throws InvalidName, VmConfigFault, DuplicateName, TaskInProgress, FileFault, InvalidState, ConcurrentAccess, InvalidDatastore, InsufficientResourcesFault, RuntimeFault, RemoteException { return addFloppyDrive(null, null, hostDevice, startConnected); }
public Task createFloppyDrive(String floppyImagePath, boolean startConnected) throws InvalidName, VmConfigFault, DuplicateName, TaskInProgress, FileFault, InvalidState, ConcurrentAccess, InvalidDatastore, InsufficientResourcesFault, RuntimeFault, RemoteException { return addFloppyDrive(null, floppyImagePath, null, startConnected); }
public Task reconfigureDVPortgroup_Task(DVPortgroupConfigSpec spec) throws DvsFault, ConcurrentAccess, DuplicateName, InvalidName, RuntimeFault, RemoteException { ManagedObjectReference mor = getVimService().reconfigureDVPortgroup_Task(getMOR(), spec); return new Task(getServerConnection(), mor); }
public Task addDVPortgroup_Task(DVPortgroupConfigSpec[] spec) throws DvsFault, DuplicateName, InvalidName, RuntimeFault, RemoteException { ManagedObjectReference taskMor = getVimService().addDVPortgroup_Task(getMOR(), spec); return new Task(getServerConnection(), taskMor); }
/** @since SDK5.1 */ public Task createDVPortgroup_Task(DVPortgroupConfigSpec spec) throws DvsFault, DuplicateName, InvalidName, RuntimeFault, RemoteException { ManagedObjectReference taskMor = getVimService().createDVPortgroup_Task(getMOR(), spec); return new Task(getServerConnection(), taskMor); }
/** * @since SDK5.0 */ public void addNetworkResourcePool(DVSNetworkResourcePoolConfigSpec[] configSpec) throws DvsFault, InvalidName, RuntimeFault, RemoteException { getVimService().addNetworkResourcePool(getMOR(), configSpec); }
public Task reconfigureDvs_Task(DVSConfigSpec spec) throws DvsNotAuthorized, DvsFault, ConcurrentAccess, DuplicateName, InvalidState, InvalidName, NotFound, AlreadyExists, LimitExceeded, ResourceInUse, ResourceNotAvailable, RuntimeFault, RemoteException { ManagedObjectReference taskMor = getVimService().reconfigureDvs_Task(getMOR(), spec); return new Task(getServerConnection(), taskMor); }
/** * @since SDK5.0 */ public void removeNetworkResourcePool(String[] key) throws DvsFault, NotFound, InvalidName, ResourceInUse, RuntimeFault, RemoteException { getVimService().removeNetworkResourcePool(getMOR(), key); }
/** @since SDK4.1 */ public void updateNetworkResourcePool(DVSNetworkResourcePoolConfigSpec[] configSpec) throws DvsFault, NotFound, InvalidName, RuntimeFault, RemoteException { getVimService().updateNetworkResourcePool(getMOR(), configSpec); }
public void updateVAppConfig(VAppConfigSpec spec) throws TaskInProgress, VmConfigFault, ConcurrentAccess, FileFault, InvalidName, DuplicateName, InvalidState, InsufficientResourcesFault, InvalidDatastore, RuntimeFault, RemoteException { getVimService().updateVAppConfig(getMOR(), spec); }
public Task rename_Task(String name) throws InvalidName, DuplicateName, RuntimeFault, RemoteException { ManagedObjectReference taskMor = getVimService().rename_Task(getMOR(), name); return new Task(getServerConnection(), taskMor); }
/** * @since SDK4.0 */ ScheduledTask createObjectScheduledTask(ManagedObject obj, ScheduledTaskSpec spec) throws InvalidName, DuplicateName, RuntimeFault, RemoteException;
Alarm createAlarm(ManagedEntity me, AlarmSpec as) throws InvalidName, DuplicateName, RuntimeFault, RemoteException;
ScheduledTask createScheduledTask(ManagedEntity entity, ScheduledTaskSpec spec) throws InvalidName, DuplicateName, RuntimeFault, RemoteException;
List<OptionValue> queryOptions(String name) throws InvalidName, RuntimeFault, RemoteException;
void updateOptions(List<OptionValue> changedValue) throws InvalidName, RuntimeFault, RemoteException;
int addAuthorizationRole(String name, List<String> privIds) throws InvalidName, AlreadyExists, RuntimeFault, RemoteException;
void updateAuthorizationRole(int roleId, String newName, List<String> privIds) throws InvalidName, AlreadyExists, NotFound, RuntimeFault, RemoteException;