Implement zones resource and image replication

Registered by Jay Pipes

**Note that this blueprint is meant for the 1.x API series**

Glance should have the concept of multiple service "zones", each of which may have images replicated to/from within a system.

For instance, consider an example company that has 4 zones:

north
south
east
west

Customers would like to be able to add an image to a Glance server and then, at some later time, replicate that image to other zones, each of which have their own Glance servers.

The flow of calls might look like this:

1) Register a new image

POST /images --> returns an new image identifier

2) Customer uploads image -- they do NOT specify a zone during upload, as they are communicating with their (zone-local) Glance API server, which has a "current zone" set to the North zone.

PUT /images/<IMAGE_ID>

3) Local Glance API server stores the image in its backend storage (e.g. Swift cluster local to the North zone that the Glance API server has sec credentials for)

4) Customer now wants to replicate this image to zones South and West.

POST /images/<IMAGE_ID>/locations

[
{
  'zone': 'South',
  'replicate': true,
},
{
  'zone': 'West',
  'replicate': true
}

5) Glance replicates the image to those zones asyncronously

6) Customer check on replication status using:

GET /images/<IMAGE_ID>/locations/<ZONE_ID>

Which would return something like:

{
  'zone': 'South',
  'status': 'replicating'
}

Blueprint information

Status:
Complete
Approver:
None
Priority:
Medium
Drafter:
Jay Pipes
Direction:
Needs approval
Assignee:
None
Definition:
Obsolete
Series goal:
None
Implementation:
Not started
Milestone target:
None
Completed by
Brian Waldon

Related branches

Sprints

Whiteboard

(?)

Work Items

This blueprint contains Public information 
Everyone can see this information.