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;
}
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;
}
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);
}
}
Aggregations