Map index and doc type to a 'resource' name

Registered by Steve McLellan

After looking at Horizon's use case, and alongside the plugin config blueprint, Travis and I think it makes sense not to directly expose index name and doc type to users of the API. It'd be nicer instead for the SL api to accept resource names (maybe heat names? - OS::Image, and/or an agreed-upon friendly name) and internally map to index/type. Would need a corresponding change in plugin_info, to eg [{"OS::Image": {"name": "Glance image"}..]

Blueprint information

Status:
Complete
Approver:
Travis Tripp
Priority:
High
Drafter:
Steve McLellan
Direction:
Approved
Assignee:
Steve McLellan
Definition:
Approved
Series goal:
Accepted for liberty
Implementation:
Implemented
Milestone target:
milestone icon 0.1.0
Started by
Travis Tripp
Completed by
Travis Tripp

Related branches

Sprints

Whiteboard

My suggestion is that every plugin specify a resource type, which in some cases may be the openstack resource name (OS::Glance::Image). Wherever index-name and doc-type are currently exposed, this will replace it, so instead of {"index_name": "glance", "type": "image", "query": ..} we'd have {"resource_type": "OS::Glance::Image", "query": }

This would change query syntax but other than that have very little impact. Changing it later will be trickier. It will invalidate plugins in-flight (designate, nova) - the order in which the change happens is not decided.

One downside: resource types of that sort will need URL escaping.
Another: if OS resource types are used, for resources that don't have openstack names we'll have to make something up.
The index api becomes a little bit harder too, because we have what's essentially a pass-through API. I still don't think index name and doc type should be directly exposed, but there doesn't necessarily seem any harm doing so for the purposes of the indexing API? Or we translate each action?

Gerrit topic: https://review.openstack.org/#q,topic:bp/dont-expose-index-doctype,n,z

Addressed by: https://review.openstack.org/207672
    Add plugin 'resource_type'

(?)

Work Items

This blueprint contains Public information 
Everyone can see this information.

Subscribers

No subscribers.