Search in sources :

Example 11 with HostStorageSystem

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

the class HostStorageAPI method refreshStorage.

/**
 * Refreshes the storage on the host.
 */
public void refreshStorage() {
    try {
        HostStorageSystem storageSystem = getStorageSystem();
        storageSystem.rescanAllHba();
        storageSystem.rescanVmfs();
    } 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 HostStorageSystem

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

the class HostStorageAPI method attachScsiLun.

/**
 * Attaches the lun.
 */
public void attachScsiLun(HostScsiDisk disk) {
    try {
        HostStorageSystem storageSystem = getStorageSystem();
        storageSystem.attachScsiLun(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 13 with HostStorageSystem

use of com.vmware.vim25.mo.HostStorageSystem 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)

Aggregations

RemoteException (java.rmi.RemoteException)10 HostStorageSystem (com.vmware.vim25.mo.HostStorageSystem)8 HostConfigFault (com.vmware.vim25.HostConfigFault)7 RuntimeFault (com.vmware.vim25.RuntimeFault)6 HostMO (com.cloud.hypervisor.vmware.mo.HostMO)5 HostStorageSystemMO (com.cloud.hypervisor.vmware.mo.HostStorageSystemMO)5 CloudRuntimeException (com.cloud.utils.exception.CloudRuntimeException)4 HostHostBusAdapter (com.vmware.vim25.HostHostBusAdapter)4 HostInternetScsiHba (com.vmware.vim25.HostInternetScsiHba)4 UnsupportedEncodingException (java.io.UnsupportedEncodingException)4 ArrayList (java.util.ArrayList)4 HostScsiDisk (com.vmware.vim25.HostScsiDisk)3 ManagedObjectReference (com.vmware.vim25.ManagedObjectReference)3 ClusterMO (com.cloud.hypervisor.vmware.mo.ClusterMO)2 VmwareHypervisorHost (com.cloud.hypervisor.vmware.mo.VmwareHypervisorHost)2 Pair (com.cloud.utils.Pair)2 VcenterObjectConnectionException (com.emc.storageos.vcentercontroller.exceptions.VcenterObjectConnectionException)2 VcenterObjectNotFoundException (com.emc.storageos.vcentercontroller.exceptions.VcenterObjectNotFoundException)2 VcenterServerConnectionException (com.emc.storageos.vcentercontroller.exceptions.VcenterServerConnectionException)2 VcenterSystemException (com.emc.storageos.vcentercontroller.exceptions.VcenterSystemException)2