Search in sources :

Example 6 with VmfsDatastoreOption

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

the class HostStorageAPI method getVmfsDatastoreExtendSpec.

/**
 * Gets the first VMFS datastore extend spec.
 *
 * @param disk the disk.
 * @param datastore the datastore.
 * @return the VMFS datastore extend spec.
 */
public VmfsDatastoreExtendSpec getVmfsDatastoreExtendSpec(HostScsiDisk disk, Datastore datastore) {
    List<VmfsDatastoreOption> extendOptions = queryVmfsDatastoreExtendOptions(disk, datastore);
    VmfsDatastoreExtendSpec extendSpec = pickBestExtendSpec(extendOptions);
    if (extendSpec == null) {
        throw new VMWareException("No VMFS datastore extend spec");
    }
    return extendSpec;
}
Also used : VmfsDatastoreOption(com.vmware.vim25.VmfsDatastoreOption) VmfsDatastoreExtendSpec(com.vmware.vim25.VmfsDatastoreExtendSpec)

Example 7 with VmfsDatastoreOption

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

the class HostStorageAPI method getVmfsDatastoreExpandSpec.

/**
 * Gets the best VMFS datastore expand spec.
 *
 * @param datastore the datastore.
 * @return the VMFS datastore expand spec.
 */
public VmfsDatastoreExpandSpec getVmfsDatastoreExpandSpec(HostScsiDisk disk, Datastore datastore) {
    List<VmfsDatastoreOption> expandOptions = queryVmfsDatastoreExpandOptions(datastore);
    VmfsDatastoreExpandSpec extendSpec = pickBestExpandSpec(disk, expandOptions);
    if (extendSpec == null) {
        throw new VMWareException("No VMFS datastore expand spec");
    }
    return extendSpec;
}
Also used : VmfsDatastoreExpandSpec(com.vmware.vim25.VmfsDatastoreExpandSpec) VmfsDatastoreOption(com.vmware.vim25.VmfsDatastoreOption)

Example 8 with VmfsDatastoreOption

use of com.vmware.vim25.VmfsDatastoreOption in project cloudstack by apache.

the class VmwareStorageProcessor method expandDatastore.

public void expandDatastore(HostDatastoreSystemMO hostDatastoreSystem, DatastoreMO datastoreMO) throws Exception {
    List<VmfsDatastoreOption> vmfsDatastoreOptions = hostDatastoreSystem.queryVmfsDatastoreExpandOptions(datastoreMO);
    if (vmfsDatastoreOptions != null && vmfsDatastoreOptions.size() > 0) {
        VmfsDatastoreExpandSpec vmfsDatastoreExpandSpec = (VmfsDatastoreExpandSpec) vmfsDatastoreOptions.get(0).getSpec();
        hostDatastoreSystem.expandVmfsDatastore(datastoreMO, vmfsDatastoreExpandSpec);
    }
}
Also used : VmfsDatastoreExpandSpec(com.vmware.vim25.VmfsDatastoreExpandSpec) VmfsDatastoreOption(com.vmware.vim25.VmfsDatastoreOption)

Aggregations

VmfsDatastoreOption (com.vmware.vim25.VmfsDatastoreOption)8 VmfsDatastoreCreateSpec (com.vmware.vim25.VmfsDatastoreCreateSpec)4 VmfsDatastoreExpandSpec (com.vmware.vim25.VmfsDatastoreExpandSpec)3 VcenterObjectConnectionException (com.emc.storageos.vcentercontroller.exceptions.VcenterObjectConnectionException)1 VcenterObjectNotFoundException (com.emc.storageos.vcentercontroller.exceptions.VcenterObjectNotFoundException)1 VcenterServerConnectionException (com.emc.storageos.vcentercontroller.exceptions.VcenterServerConnectionException)1 VcenterSystemException (com.emc.storageos.vcentercontroller.exceptions.VcenterSystemException)1 HostConfigFault (com.vmware.vim25.HostConfigFault)1 HostScsiDisk (com.vmware.vim25.HostScsiDisk)1 HostStorageDeviceInfo (com.vmware.vim25.HostStorageDeviceInfo)1 ScsiLun (com.vmware.vim25.ScsiLun)1 VmfsDatastoreExtendSpec (com.vmware.vim25.VmfsDatastoreExtendSpec)1 VmfsDatastoreInfo (com.vmware.vim25.VmfsDatastoreInfo)1 Datastore (com.vmware.vim25.mo.Datastore)1 HostDatastoreSystem (com.vmware.vim25.mo.HostDatastoreSystem)1 HostStorageSystem (com.vmware.vim25.mo.HostStorageSystem)1 HostSystem (com.vmware.vim25.mo.HostSystem)1