use of org.ovirt.engine.core.common.action.DiskProfileParameters in project ovirt-engine by oVirt.
the class StorageDomainCommandBase method createDefaultDiskProfile.
/**
* Creates default disk profile for existing storage domain.
*/
protected void createDefaultDiskProfile() {
executeInNewTransaction(() -> {
final DiskProfile diskProfile = diskProfileHelper.createDiskProfile(getStorageDomain().getId(), getStorageDomainName());
DiskProfileParameters diskProfileParameters = new DiskProfileParameters(diskProfile, true);
runInternalActionWithTasksContext(ActionType.AddDiskProfile, diskProfileParameters);
getCompensationContext().snapshotNewEntity(diskProfile);
getCompensationContext().stateChanged();
return null;
});
}
use of org.ovirt.engine.core.common.action.DiskProfileParameters in project ovirt-engine by oVirt.
the class AbstractBackendDiskProfileResource method remove.
public Response remove() {
get();
org.ovirt.engine.core.common.businessentities.profiles.DiskProfile diskProfile = getDiskProfile(id);
return performAction(ActionType.RemoveDiskProfile, new DiskProfileParameters(diskProfile));
}
use of org.ovirt.engine.core.common.action.DiskProfileParameters in project ovirt-engine by oVirt.
the class AbstractBackendDiskProfilesResource method add.
protected Response add(DiskProfile diskProfile) {
validateParameters(diskProfile);
org.ovirt.engine.core.common.businessentities.profiles.DiskProfile map = map(diskProfile);
DiskProfileParameters parameters = new DiskProfileParameters(map);
return performCreate(ActionType.AddDiskProfile, parameters, new QueryIdResolver<Guid>(QueryType.GetDiskProfileById, IdQueryParameters.class));
}
Aggregations