----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/12720/#review23611 -----------------------------------------------------------
server/src/com/cloud/vm/UserVmManagerImpl.java <https://reviews.apache.org/r/12720/#comment47516> Why not return a Long, that we, we don't need to do a -1 check. server/src/com/cloud/vm/UserVmManagerImpl.java <https://reviews.apache.org/r/12720/#comment47517> Same comment as above server/src/com/cloud/vm/UserVmManagerImpl.java <https://reviews.apache.org/r/12720/#comment47518> We are calling checkIfHostIsDedicated on src and destination multiple time. It'll be better to call it once and save the information and to do all the checks. server/src/com/cloud/vm/UserVmManagerImpl.java <https://reviews.apache.org/r/12720/#comment47519> If the destination has vm in strict mode for this account, then we shouldn't be raising an alert. This is happening now. server/src/com/cloud/vm/UserVmManagerImpl.java <https://reviews.apache.org/r/12720/#comment47520> Why not just check if the given destination host is dedicated. We shouldn't be required to list all dedicated hosts and parse through them to check if destination is dedicated. - Devdeep Singh On July 19, 2013, 11:52 a.m., Saksham Srivastava wrote: > > ----------------------------------------------------------- > This is an automatically generated e-mail. To reply, visit: > https://reviews.apache.org/r/12720/ > ----------------------------------------------------------- > > (Updated July 19, 2013, 11:52 a.m.) > > > Review request for cloudstack and Devdeep Singh. > > > Bugs: 3382 > > > Repository: cloudstack-git > > > Description > ------- > > Allow root admin to migrate VMs across dedicated hosts. > Generate alerts for each migration performed between dedicated hosts. > Alerts are generated for VM migration between: > 1) Source host is dedicated and destination host is not. > 2) Source host is not dedicated and destination host is dedicated. > 3) Both hosts are dedicated. > Alerts are now generated for both explicit and implicit dedication. > > > Diffs > ----- > > server/src/com/cloud/deploy/dao/PlannerHostReservationDao.java 69118f1 > server/src/com/cloud/deploy/dao/PlannerHostReservationDaoImpl.java 41e0964 > server/src/com/cloud/vm/UserVmManagerImpl.java 9968690 > > Diff: https://reviews.apache.org/r/12720/diff/ > > > Testing > ------- > > Migrated VMs across explicitly dedicated hosts and alerts are generated. > Migrated VMs across implicitly dedicated hosts and alerts are generated. > > > > Thanks, > > Saksham Srivastava > >