> On July 24, 2013, 10:56 p.m., Alena Prokharchyk wrote: > > 1) Bharat, can you please check if your API allows you to set the vnet > > range with the multiple ranges. The command syntax should be like this - > > vnets should be specified and separated by comma: > > > > http://localhost:8096/?command=updatePhysicalNetwork&id=200&vlan=2001-2010,2012-2013 > > > > 2) Also I find it very confusing that you are continuing to store the vnet > > field in physical_network table. Once the ranges were introduced, you > > should have moved them to the separate data structure as its very hard to > > update/validate the String representation as every single time you have to > > > > * split the ranges > > * validate each range against the new range you pass in
Alena, Yes that code was confusing earlier. Now with set operations it is much cleaner. - Abhinandan ----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/12905/#review23793 ----------------------------------------------------------- On July 26, 2013, 4:17 a.m., bharat kumar wrote: > > ----------------------------------------------------------- > This is an automatically generated e-mail. To reply, visit: > https://reviews.apache.org/r/12905/ > ----------------------------------------------------------- > > (Updated July 26, 2013, 4:17 a.m.) > > > Review request for cloudstack, Alena Prokharchyk and Sheng Yang. > > > Bugs: Cloudstack-3753 > > > Repository: cloudstack-git > > > Description > ------- > > https://issues.apache.org/jira/browse/CLOUDSTACK-3753 > Multiple VLAN range API need to accept a list rather than "add" or "remove" > per command > > > Diffs > ----- > > api/src/com/cloud/network/NetworkService.java 59ccdbf > > api/src/org/apache/cloudstack/api/command/admin/network/UpdatePhysicalNetworkCmd.java > 333564e > engine/schema/src/com/cloud/dc/dao/DataCenterVnetDao.java e2e6b79 > engine/schema/src/com/cloud/dc/dao/DataCenterVnetDaoImpl.java ced2982 > server/src/com/cloud/network/NetworkServiceImpl.java f1f71ca > server/test/com/cloud/network/MockNetworkManagerImpl.java 4577d0a > server/test/com/cloud/network/UpdatePhysicalNetworkTest.java e3fc36a > server/test/com/cloud/vpc/MockNetworkManagerImpl.java fd61bc6 > > Diff: https://reviews.apache.org/r/12905/diff/ > > > Testing > ------- > > Tested on master. > removed the removevlan parameter. > vlan parameter can be used for both addition and removal of valns. > instead of passing only a vlan range. user has to pass all the vlan ranges > that he wants to keep. > the vlan ranges missing in the input and present in the db (not allocated) > will be removed. > > > Thanks, > > bharat kumar > >