Fix 'host delete' delete's host of another segment
Currently masakari delete's the host which doesn't belong to the
segment requested in the 'host delete' API's request URL because
host was not getting filtered on the basis of failover_segment_id.
Filtered the host based on 'failover_segment_id'. Added a new
exception 'HostNotFoundUnderFailoverSegment' which will be raised
from db API 'host_get_by_uuid' if the host is not found under the
requested failover_segment. This exception is not caught at API
controller layer as it is a subclass of 'HostNotFound' which is
already caught in controller.
Reviewed: https:/ /review. openstack. org/481515 /git.openstack. org/cgit/ openstack/ masakari/ commit/ ?id=a1bbcd4d985 439aa94cc95fcb1 9c08e30a584d30
Committed: https:/
Submitter: Jenkins
Branch: master
commit a1bbcd4d985439a a94cc95fcb19c08 e30a584d30
Author: Dinesh Bhor <email address hidden>
Date: Wed Jul 5 17:05:55 2017 +0530
Fix 'host delete' delete's host of another segment
Currently masakari delete's the host which doesn't belong to the segment_ id.
segment requested in the 'host delete' API's request URL because
host was not getting filtered on the basis of failover_
Filtered the host based on 'failover_ segment_ id'. Added a new derFailoverSegm ent' which will be raised
exception 'HostNotFoundUn
from db API 'host_get_by_uuid' if the host is not found under the
requested failover_segment. This exception is not caught at API
controller layer as it is a subclass of 'HostNotFound' which is
already caught in controller.
Closes-Bug: #1697629 443ccd13b1db61f da55bc07a0d
Change-Id: I3d3e8cffa2f8ea