Search in sources :

Example 11 with RuntimeFault

use of com.vmware.vim25.RuntimeFault in project coprhd-controller by CoprHD.

the class HostStorageAPI method detachScsiLun.

/**
 * Detaches the lun.
 */
public void detachScsiLun(HostScsiDisk disk) {
    try {
        HostStorageSystem storageSystem = getStorageSystem();
        storageSystem.detachScsiLun(disk.getUuid());
    } catch (HostConfigFault e) {
        throw new VMWareException(e);
    } catch (RuntimeFault e) {
        throw new VMWareException(e);
    } catch (RemoteException e) {
        throw new VMWareException(e);
    }
}
Also used : HostStorageSystem(com.vmware.vim25.mo.HostStorageSystem) RuntimeFault(com.vmware.vim25.RuntimeFault) RemoteException(java.rmi.RemoteException) HostConfigFault(com.vmware.vim25.HostConfigFault)

Example 12 with RuntimeFault

use of com.vmware.vim25.RuntimeFault in project coprhd-controller by CoprHD.

the class TestVcenter method main.

public static void main(String[] args) throws MalformedURLException, InvalidProperty, RuntimeFault, RemoteException {
    VCenterAPI vcenterAPI = getVcenterApi("lglw1045.lss.emc.com", "root", "vmware");
    try {
        Datastore ds = vcenterAPI.findDatastore("DC-Simulator-1", "ds-1");
        DatastoreInfo dsInfo = ds.getInfo();
        if (dsInfo != null) {
            return;
        }
    } catch (Exception ex) {
        ex.printStackTrace();
    }
}
Also used : VCenterAPI(com.iwave.ext.vmware.VCenterAPI) DatastoreInfo(com.vmware.vim25.DatastoreInfo) Datastore(com.vmware.vim25.mo.Datastore) MalformedURLException(java.net.MalformedURLException) RemoteException(java.rmi.RemoteException)

Aggregations

RemoteException (java.rmi.RemoteException)10 RuntimeFault (com.vmware.vim25.RuntimeFault)9 HostConfigFault (com.vmware.vim25.HostConfigFault)6 HostStorageSystem (com.vmware.vim25.mo.HostStorageSystem)6 InventoryNavigator (com.vmware.vim25.mo.InventoryNavigator)3 InvalidProperty (com.vmware.vim25.InvalidProperty)2 Datastore (com.vmware.vim25.mo.Datastore)2 ManagedEntity (com.vmware.vim25.mo.ManagedEntity)2 CloudException (com.cloud.exception.CloudException)1 InternalErrorException (com.cloud.exception.InternalErrorException)1 VmwareContext (com.cloud.hypervisor.vmware.util.VmwareContext)1 CloudRuntimeException (com.cloud.utils.exception.CloudRuntimeException)1 HostStorageAPI (com.iwave.ext.vmware.HostStorageAPI)1 VCenterAPI (com.iwave.ext.vmware.VCenterAPI)1 DatastoreInfo (com.vmware.vim25.DatastoreInfo)1 HostMultipathInfoLogicalUnitPolicy (com.vmware.vim25.HostMultipathInfoLogicalUnitPolicy)1 HostScsiDisk (com.vmware.vim25.HostScsiDisk)1 NotFound (com.vmware.vim25.NotFound)1 RuntimeFaultFaultMsg (com.vmware.vim25.RuntimeFaultFaultMsg)1 VmfsDatastoreInfo (com.vmware.vim25.VmfsDatastoreInfo)1