use of com.emc.sa.service.vmware.block.tasks.CreateVmfsDatastore in project coprhd-controller by CoprHD.
the class VMwareSupport method createVmfsDatastore.
/**
* Creates a VMFS datastore.
*
* @param host
* the host to which the volume is assigned.
* @param cluster
* the cluster to which the volume is associated (may be null if the storage is exclusive to the host)
* @param volume
* the volume to create the datastore on.
* @param datastoreName
* the name of the datastore to create.
* @return datastore
*/
public Datastore createVmfsDatastore(HostSystem host, ClusterComputeResource cluster, URI hostOrClusterId, BlockObjectRestRep volume, String datastoreName) {
HostScsiDisk disk = findScsiDisk(host, cluster, volume, true);
Datastore datastore = execute(new CreateVmfsDatastore(host, disk, datastoreName));
addAffectedResource(volume);
addVmfsDatastoreTag(volume, hostOrClusterId, datastoreName);
ExecutionUtils.clearRollback();
return datastore;
}
Aggregations