Should not delete host of another segment
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
masakari |
Fix Released
|
Undecided
|
Dinesh Bhor |
Bug Description
Description
===========
When i delete one host which not belongs to the segment in the url,
the operation was successful. The host was deleted.
Steps to reproduce
==================
* Create two segments
POST /v1/segments
{
"segments": [
{
"uuid": "968632d6-
...
},
{
"uuid": "02481858-
...
}
]
}
* Create one host '6219e981-
POST /v1/segments/
* Delete host '6219e981-
DELETE /v1/segments/
Expected result
===============
The host can not be deleted.
Actual result
=============
The host was deleted.
Environment
===========
# ENV
devstack
# version
- devstack:
git log
commit 9234316794403e6
Merge: 1ca22d5 bb436d3
Author: Jenkins <email address hidden>
Date: Fri Jun 9 01:55:36 2017 +0000
Merge "Make use of Ubuntu Cloud Archive switchable"
- masakari:
$ git log
commit 00969f0bf21e5d3
Merge: 1e5fab1 171b4d2
Author: Jenkins <email address hidden>
Date: Tue Jun 6 05:08:01 2017 +0000
Merge "Revert "Fix os_privileged_
At line https:/ /github. com/openstack/ masakari/ blob/master/ masakari/ ha/api. py#L201, it does not limit by segment uuid.