/** * Add disk if it does not exist to a given vm * * @param disk the disk to add * @param vmId the ID of the vm to add to if the disk does not exist for this VM */ public static void addDiskToVmIfNotExists(BaseDisk disk, Guid vmId) { if (!DbFacade.getInstance().getBaseDiskDao().exists(disk.getId())) { addDiskToVm(disk, vmId); } }