Fix ip pools release validation #612

Closed
wants to merge 5 commits into
from

Projects

None yet

5 participants

@hansode
Member
hansode commented Jun 10, 2015

The detail is #610.

Additional feature

  • add a comment for ip_pools/accuire with network_id
  • add a comment for ip_pools/requires with ip_handle_id
hansode added some commits Jun 10, 2015
@hansode hansode #610: add a comment for ip_handle_id. 9da4ed1
@hansode hansode #610: add a validation for ip_handle_id. 4914ae9
@hansode hansode remove trailing whitespace. 8c49a3d
@hansode hansode add a comment for network_id.
b669f01
@hansode hansode self-assigned this Jun 10, 2015
@axsh-bot
Member

b669f01 success - wakame-ci/rspec

@Metallion
Member

can you add a test case for this? I think this kind of API only small tests are best done in rspec. https://github.com/axsh/wakame-vdc/tree/master/dcmgr/spec/dcmgr/endpoints/12.03

@axsh-bot
Member

b669f01 success - wakame-ci/rpmbuild

@axsh-bot
Member

b669f01 success - wakame-ci/to-s3

@axsh-bot
Member

b669f01 failure - wakame-ci/kvm.smoke

@axsh-bot
Member

b669f01 failure - wakame-ci/lxc.smoke.allowed-failure

@axsh-bot
Member

b669f01 success - wakame-ci/dummy.smoke

@unakatsuo unakatsuo and 1 other commented on an outdated diff Jun 10, 2015
dcmgr/lib/dcmgr/endpoints/12.03/ip_pools.rb
ip_pool = find_by_uuid(M::IpPool, params[:id])
raise E::UnknownIpPool, params[:id] if ip_pool.nil?
+
+ if params[:ip_handle_id]
+ ip_handle = M::IpHandle[params[:ip_handle_id]] || raise(UnknownIpHandle, params[:ip_handle_id])
@unakatsuo
unakatsuo Jun 10, 2015 Member
|| raise(UnknownIpHandle, params[:ip_handle_id])

can be removed since same check happens at L120.

@hansode
hansode Jun 11, 2015 Member

fixed with dcfc15e

@axsh-bot
Member

b669f01 success - wakame-ci/kvm.smoke.allowed-failure

@axsh-bot
Member

b669f01 success - wakame-ci/vz.smoke

@hansode
Member
hansode commented Jun 10, 2015

can you add a test case for this? I think this kind of API only small tests are best done in rspec. https://github.com/axsh/wakame-vdc/tree/master/dcmgr/spec/dcmgr/endpoints/12.03

OK. I'll try it.

@YamazakiYasuhiro
Member

OK. I'll try it.

Great!

@Metallion
Member

Making a new pull request to develop instead of master.

@Metallion Metallion closed this Jun 15, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment