Better reaction when using PUT for an existing queue/pool/flavor

Registered by Feilong Wang

This proposal is related to these two bugs: bug/1508434 and bug/1503997. For now, Zaqar is using PUT to create queue, pool and flavor. It's OK based on current openstack API policy. However, it may confuse the end user since when user use PUT for an existing resource, it will be updated and return 201 still.

So to avoid this kind of confusion, we would like to improve this from different ways:
1) return 204 for an existing name
2) support HEAD for those resources, like queue/pool/flavor
3) on zaqar client side, do a HEAD first in create method. If it already exists, raise an error
4) on zaqar client side, do a HEAD first in update method. If it *does not* exist already, raise an error.

Blueprint information

Status:
Not started
Approver:
None
Priority:
Undefined
Drafter:
Feilong Wang
Direction:
Needs approval
Assignee:
None
Definition:
New
Series goal:
None
Implementation:
Unknown
Milestone target:
None

Related branches

Sprints

Whiteboard

Gerrit topic: https://review.openstack.org/#q,topic:bp/http-put-improvement,n,z

Addressed by: https://review.openstack.org/246147
    HTTP put improvement for existing resource

Addressed by: https://review.openstack.org/238006
    Create api should throw PoolNameConflict exception for duplicate pool name

Gerrit topic: https://review.openstack.org/#q,topic:bug/1508434_1,n,z

Addressed by: https://review.openstack.org/238396
    PUT improvement for flavor create

(?)

Work Items

This blueprint contains Public information 
Everyone can see this information.