Java 类com.vmware.vim25.InvalidState 实例源码

项目:jcloud-vsphere    文件:MasterToVirtualMachineCloneSpec.java   
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();
}
项目:contrail-vcenter-plugin    文件:VCenterNotify.java   
private EventHistoryCollector createEventHistoryCollector(ManagedObject mo,
        String[] events) throws InvalidState, RuntimeFault, RemoteException
{
    if (eventManager == null) {
        s_logger.error("Cannot create EventHistoryCollector, eventManager is null");
        return null;
    }
    EventFilterSpec eventFilterSpec = new EventFilterSpec();
    eventFilterSpec.setType(events);

    // Create an Entity Event Filter Spec to
    // specify the MoRef of the MO to be get events filtered for
    EventFilterSpecByEntity entitySpec = new EventFilterSpecByEntity();
    entitySpec.setEntity(mo.getMOR());
    entitySpec.setRecursion(EventFilterSpecRecursionOption.children);
    // set the entity spec in the EventFilter
    eventFilterSpec.setEntity(entitySpec);

    if (vcenterConnectedTime != null) {
        EventFilterSpecByTime timeSpec = new EventFilterSpecByTime();
        timeSpec.setBeginTime(vcenterConnectedTime);
        // set the time spec in the EventFilter
        eventFilterSpec.setTime(timeSpec);
    }

    // create the EventHistoryCollector to monitor events for a VM
    // and get the ManagedObjectReference of the EventHistoryCollector
    // returned

    EventHistoryCollector collector = eventManager.createCollectorForEvents(eventFilterSpec);
    collector.setCollectorPageSize(1000);
    collectors.add(collector);

    return collector;
}
项目:vijava    文件:VirtualMachineDeviceManager.java   
/**
 * 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); 
}
项目:vijava    文件:VirtualMachineProvisioningChecker.java   
public Task checkMigrate_Task(VirtualMachine vm, HostSystem host, ResourcePool pool, VirtualMachinePowerState state, String[] testType) throws NoActiveHostInCluster, InvalidState, RuntimeFault, RemoteException
{
    ManagedObjectReference taskMor = getVimService().checkMigrate_Task(getMOR(), 
            vm.getMOR(), 
            host==null?null : host.getMOR(), 
            pool==null?null : pool.getMOR(), state, testType);
    return new Task(getServerConnection(), taskMor);
}
项目:vijava    文件:VirtualMachineCompatibilityChecker.java   
public Task checkCompatibility_Task(VirtualMachine vm, HostSystem host, ResourcePool pool, String[] testType) throws NoActiveHostInCluster, InvalidState, RuntimeFault, RemoteException
{
    ManagedObjectReference taskMor = getVimService().checkCompatibility_Task(getMOR(), 
        vm==null?null:vm.getMOR(), host==null?null:host.getMOR(), 
        pool==null?null:pool.getMOR(), testType);
    return new Task(getServerConnection(), taskMor);
}
项目:photon-model    文件:ObjectFactory.java   
/**
 * Create an instance of {@link JAXBElement }{@code <}{@link InvalidState }{@code >}}
 * 
 */
@XmlElementDecl(namespace = "urn:pbm", name = "InvalidStateFault")
public JAXBElement<InvalidState> createInvalidStateFault(InvalidState value) {
    return new JAXBElement<InvalidState>(_InvalidStateFault_QNAME, InvalidState.class, null, value);
}
项目:vijava    文件:VirtualMachineDeviceManager.java   
/**
 * @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);
}
项目:vijava    文件:VirtualMachineDeviceManager.java   
/**
 * @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);
}
项目:vijava    文件:VirtualMachineDeviceManager.java   
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);
}
项目:vijava    文件:HostProfileManager.java   
public Task applyHostConfig_Task(HostSystem host, HostConfigSpec configSpec) throws HostConfigFailed, InvalidState, RuntimeFault, RemoteException
{
    return applyHostConfig_Task(host, configSpec, null);
}
项目:vijava    文件:HostProfileManager.java   
public Task applyHostConfig_Task(HostSystem host, HostConfigSpec configSpec, ProfileDeferredPolicyOptionParameter[] userInputs) throws HostConfigFailed, InvalidState, RuntimeFault, RemoteException
{
  ManagedObjectReference taskMor = getVimService().applyHostConfig_Task(getMOR(), host.getMOR(), configSpec, userInputs);
  return new Task(getServerConnection(), taskMor);
}
项目:vijava    文件:GuestFileManager.java   
public void changeFileAttributesInGuest(GuestAuthentication auth, String guestFilePath, GuestFileAttributes fileAttributes) throws GuestOperationsFault, InvalidState, TaskInProgress, FileFault, RuntimeFault, RemoteException
{
  getVimService().changeFileAttributesInGuest(getMOR(), vm.getMOR(), auth, guestFilePath, fileAttributes);
}
项目:vijava    文件:GuestFileManager.java   
public String createTemporaryDirectoryInGuest(GuestAuthentication auth, String prefix, String suffix, String directoryPath) throws GuestOperationsFault, InvalidState, TaskInProgress, FileFault, RuntimeFault, RemoteException
{
  return getVimService().createTemporaryDirectoryInGuest(getMOR(), vm.getMOR(), auth, prefix, suffix, directoryPath);
}
项目:vijava    文件:GuestFileManager.java   
public String createTemporaryFileInGuest(GuestAuthentication auth, String prefix, String suffix, String directoryPath) throws GuestOperationsFault, InvalidState, TaskInProgress, FileFault, RuntimeFault, RemoteException
{
  return getVimService().createTemporaryFileInGuest(getMOR(), vm.getMOR(), auth, prefix, suffix, directoryPath);
}
项目:vijava    文件:GuestFileManager.java   
public void deleteDirectoryInGuest(GuestAuthentication auth, String directoryPath, boolean recursive) throws GuestOperationsFault, InvalidState, TaskInProgress, FileFault, RuntimeFault, RemoteException
{
  getVimService().deleteDirectoryInGuest(getMOR(), vm.getMOR(), auth, directoryPath, recursive);
}
项目:vijava    文件:GuestFileManager.java   
public void deleteFileInGuest(GuestAuthentication auth, String filePath) throws GuestOperationsFault, InvalidState, TaskInProgress, FileFault, RuntimeFault, RemoteException
{
  getVimService().deleteFileInGuest(getMOR(), vm.getMOR(), auth, filePath);
}
项目:vijava    文件:GuestFileManager.java   
public FileTransferInformation initiateFileTransferFromGuest(GuestAuthentication auth, String guestFilePath) throws GuestOperationsFault, InvalidState, TaskInProgress, FileFault, RuntimeFault, RemoteException
{
  return getVimService().initiateFileTransferFromGuest(getMOR(), vm.getMOR(), auth, guestFilePath);  
}
项目:vijava    文件:GuestFileManager.java   
public String initiateFileTransferToGuest(GuestAuthentication auth, String guestFilePath, GuestFileAttributes fileAttributes, long fileSize, boolean overwrite) throws GuestOperationsFault, InvalidState, TaskInProgress, FileFault, RuntimeFault, RemoteException
{
  return getVimService().initiateFileTransferToGuest(getMOR(), vm.getMOR(), auth, guestFilePath, fileAttributes, fileSize, overwrite);
}
项目:vijava    文件:GuestFileManager.java   
public GuestListFileInfo listFilesInGuest(GuestAuthentication auth, String filePath, int index, int maxResults, String matchPattern) throws GuestOperationsFault, InvalidState, TaskInProgress, FileFault, RuntimeFault, RemoteException
{
  return getVimService().listFilesInGuest(getMOR(), vm.getMOR(), auth, filePath, index, maxResults, matchPattern);
}
项目:vijava    文件:GuestFileManager.java   
public void makeDirectoryInGuest(GuestAuthentication auth, String directoryPath, boolean createParentDirectories) throws GuestOperationsFault, InvalidState, TaskInProgress, FileFault, RuntimeFault, RemoteException
{
  getVimService().makeDirectoryInGuest(getMOR(), vm.getMOR(), auth, directoryPath, createParentDirectories);
}
项目:vijava    文件:GuestFileManager.java   
public void moveDirectoryInGuest(GuestAuthentication auth, String srcDirectoryPath, String dstDirectoryPath) throws GuestOperationsFault, InvalidState, TaskInProgress, FileFault, RuntimeFault, RemoteException
{ 
  getVimService().moveDirectoryInGuest(getMOR(), vm.getMOR(), auth, srcDirectoryPath, dstDirectoryPath);
}
项目:vijava    文件:GuestFileManager.java   
public void moveFileInGuest(GuestAuthentication auth, String srcFilePath, String dstFilePath, boolean overwrite) throws GuestOperationsFault, InvalidState, TaskInProgress, FileFault, RuntimeFault, RemoteException
{
  getVimService().moveFileInGuest(getMOR(), vm.getMOR(), auth, srcFilePath, dstFilePath, overwrite);
}
项目:vijava    文件:HttpNfcLease.java   
public void httpNfcLeaseAbort(LocalizedMethodFault fault) throws Timedout, InvalidState, RuntimeFault, RemoteException
{
    getVimService().httpNfcLeaseAbort(getMOR(), fault);
}
项目:vijava    文件:HttpNfcLease.java   
public void httpNfcLeaseComplete() throws Timedout, InvalidState, RuntimeFault, RemoteException
{
    getVimService().httpNfcLeaseComplete(getMOR());
}
项目:vijava    文件:HttpNfcLease.java   
/** @since SDK4.1 */
public HttpNfcLeaseManifestEntry[] httpNfcLeaseGetManifest() throws Timedout, InvalidState, RuntimeFault, RemoteException
{
   return getVimService().httpNfcLeaseGetManifest(getMOR());
}
项目:vijava    文件:OvfManager.java   
public OvfCreateDescriptorResult createDescriptor(ManagedEntity obj, OvfCreateDescriptorParams cdp) throws TaskInProgress, VmConfigFault, ConcurrentAccess, FileFault, InvalidState, RuntimeFault, RemoteException
{
    return getVimService().createDescriptor(getMOR(), obj.getMOR(), cdp);
}
项目:vijava    文件:OvfManager.java   
public OvfCreateImportSpecResult createImportSpec(String ovfDescriptor, ResourcePool resourcePool, Datastore datastore, OvfCreateImportSpecParams cisp) throws TaskInProgress, VmConfigFault, ConcurrentAccess, FileFault, InvalidState, InvalidDatastore, RuntimeFault, RemoteException
{
    return getVimService().createImportSpec(getMOR(), ovfDescriptor, resourcePool.getMOR(), datastore.getMOR(), cisp);
}
项目:vijava    文件:OvfManager.java   
public OvfParseDescriptorResult parseDescriptor(String ovfDescriptor, OvfParseDescriptorParams pdp) throws TaskInProgress, VmConfigFault, ConcurrentAccess, FileFault, InvalidState, RuntimeFault, RemoteException
{
    return getVimService().parseDescriptor(getMOR(), ovfDescriptor, pdp);
}
项目:vijava    文件:OvfManager.java   
public OvfValidateHostResult validateHost(String ovfDescriptor, HostSystem host, OvfValidateHostParams vhp) throws TaskInProgress, ConcurrentAccess, FileFault, InvalidState, RuntimeFault, RemoteException
{
    return getVimService().validateHost(getMOR(), ovfDescriptor, host.getMOR(), vhp);
}
项目:vijava    文件:Task.java   
public void setTaskState(TaskInfoState tis, Object result, LocalizedMethodFault fault) throws InvalidState, RuntimeFault, RemoteException 
{
    getVimService().setTaskState(getMOR(), tis, result, fault);
}
项目:vijava    文件:Task.java   
public void updateProgress(int percentDone) throws InvalidState, OutOfBounds, RuntimeFault, RemoteException 
{
    getVimService().updateProgress(getMOR(), percentDone);
}
项目:vijava    文件:DistributedVirtualSwitch.java   
public Task performDvsProductSpecOperation_Task(String operation, DistributedVirtualSwitchProductSpec productSpec) throws TaskInProgress, InvalidState, DvsFault, RuntimeFault, RemoteException
{
    ManagedObjectReference taskMor = getVimService().performDvsProductSpecOperation_Task(getMOR(), operation, productSpec);
    return new Task(getServerConnection(), taskMor);
}
项目:vijava    文件:DistributedVirtualSwitch.java   
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);
}
项目:vijava    文件:VirtualApp.java   
public Task cloneVApp_Task(String name, ManagedObjectReference target, VAppCloneSpec spec) throws InvalidState, InvalidDatastore, TaskInProgress, VmConfigFault, FileFault, MigrationFault, InsufficientResourcesFault, RuntimeFault, RemoteException
{
    ManagedObjectReference taskMor = getVimService().cloneVApp_Task(getMOR(), name, target, spec);
    return new Task(getServerConnection(), taskMor);
}
项目:vijava    文件:VirtualApp.java   
public HttpNfcLease exportVApp() throws InvalidPowerState, TaskInProgress, InvalidState, FileFault, RuntimeFault, RemoteException
{
    ManagedObjectReference mor = getVimService().exportVApp(getMOR());
    return new HttpNfcLease(getServerConnection(), mor);
}
项目:vijava    文件:VirtualApp.java   
public Task powerOffVApp_Task(boolean force) throws TaskInProgress, InvalidState, VAppConfigFault, RuntimeFault, RemoteException
{
    ManagedObjectReference taskMor = getVimService().powerOffVApp_Task(getMOR(), force);
    return new Task(getServerConnection(), taskMor);
}
项目:vijava    文件:VirtualApp.java   
/** @since SDK4.1 */
public Task suspendVApp_Task() throws TaskInProgress, InvalidState, VAppConfigFault, RuntimeFault, RemoteException
{
  ManagedObjectReference taskMor = getVimService().suspendVApp_Task(getMOR());
  return new Task(getServerConnection(), taskMor);
}
项目:vijava    文件:VirtualApp.java   
public Task powerOnVApp_Task() throws TaskInProgress, InvalidState, InsufficientResourcesFault, VmConfigFault, VAppConfigFault, FileFault, RuntimeFault, RemoteException
{
    ManagedObjectReference taskMor = getVimService().powerOnVApp_Task(getMOR());
    return new Task(getServerConnection(), taskMor);
}
项目:vijava    文件:VirtualApp.java   
public Task unregisterVApp_Task() throws ConcurrentAccess, InvalidState, RuntimeFault, RemoteException
{
    ManagedObjectReference taskMor = getVimService().unregisterVApp_Task(getMOR());
    return new Task(getServerConnection(), taskMor);
}
项目:vijava    文件:VirtualApp.java   
public void updateVAppConfig(VAppConfigSpec spec) throws TaskInProgress, VmConfigFault, ConcurrentAccess, FileFault, InvalidName, DuplicateName, InvalidState, InsufficientResourcesFault, InvalidDatastore, RuntimeFault, RemoteException
{
    getVimService().updateVAppConfig(getMOR(), spec);
}