Create Operator API

Registered by Brandon Logan

We need some kind of front end to talk to Octavia. Whether this is a REST API or some other front end is up to the community. That discussion and what the operator API is responsible for doing should be had.

Blueprint information

Status:
Complete
Approver:
None
Priority:
Essential
Drafter:
Brandon Logan
Direction:
Approved
Assignee:
Brandon Logan
Definition:
Approved
Series goal:
None
Implementation:
Implemented
Milestone target:
None
Started by
Brandon Logan
Completed by
Brandon Logan

Related branches

Sprints

Whiteboard

I'm probably just going to do a simple operator API first, just so something can be run. It'll probably just allow CRUD operations on entities and DB manipulation and do some simple validation.

I'll use pecan for the framework and WSME for validation, serialization, and deserialization.

Initial resources will look like:
GET /loadbalancers?tenant_id
   tenant_id is optional query parameter
POST /loadbalancers
GET /loadbalancers/{lb_id}
PUT /loadbalancers/{lb_id}
DELETE /loadbalancers/{lb_id}

GET /loadbalancers/{lb_id}/listeners
POST /loadbalancers/{lb_id}/listeners
GET /loadbalancers/{lb_id}/listeners/{listener_id}
PUT /loadbalancers/{lb_id}/listeners/{listener_id}
DELETE /loadbalancers/{lb_id}/listeners/{listener_id}

GET /loadbalancers/{lb_id}/listeners/{listener_id}/pools
POST /loadbalancers/{lb_id}/listeners/{listener_id}/pools
GET /loadbalancers/{lb_id}/listeners/{listener_id}/pools/{pool_id}
PUT /loadbalancers/{lb_id}/listeners/{listener_id}/pools/{pool_id}
DELETE /loadbalancers/{lb_id}/listeners/{listener_id}/pools/{pool_id}

GET /loadbalancers/{lb_id}/listeners/{listener_id}/pools/{pool_id}/healthmonitor
POST /loadbalancers/{lb_id}/listeners/{listener_id}/pools/{pool_id}/healthmonitor
PUT /loadbalancers/{lb_id}/listeners/{listener_id}/pools/{pool_id}/healthmonitor

GET /loadbalancers/{lb_id}/listeners/{listener_id}/pools/{pool_id}/members
POST /loadbalancers/{lb_id}/listeners/{listener_id}/pools/{pool_id}/members
GET /loadbalancers/{lb_id}/listeners/{listener_id}/pools/{pool_id}/members/{member_id}
PUT /loadbalancers/{lb_id}/listeners/{listener_id}/pools/{pool_id}/members/{member_id}
DELETE /loadbalancers/{lb_id}/listeners/{listener_id}/pools/{pool_id}/members/{member_id}

All GETs will just retrieve data from the database and return back to the user.

A layer between the API and controller will be added so that the API and controller are not tightly coupled. All POSTs, PUTs, and DELETEs will first update the database and then send to this middle layer.

Gerrit topic: https://review.openstack.org/#q,topic:bp/operator-api,n,z

Addressed by: https://review.openstack.org/121233
    Implementing simple operator API

Addressed by: https://review.openstack.org/136499
    Creation of Octavia API Documentation

(?)

Work Items

Work items:
Define WSME types for the validation, serialization, and deserialization: INPROGRESS
Define Pecan Controllers and REST methods, exposing what WSME types will be returned and received: INPROGRESS
Define middle layer interface and implement a straight to controller version of this interface: TODO
Call database methods in each controller's REST methods and handling exceptions appropriately: TODO
Call middle layer methods: TODO
Convert data models to WSME types and return: TODO
Setup paste deploy: TODO

Dependency tree

* Blueprints in grey have been implemented.

This blueprint contains Public information 
Everyone can see this information.