Move high-level functionality from bin/swift into importable/testable library

Registered by Joel Wright

The bin/swift script currently contains a great deal of logic that would be very useful as an importable and testable library.

I propose moving the logic contained in bin/swift/st_delete, bin/swift/st_download, bin/swift/st_upload etc... into an importable library, e.g. swiftclient/service.py and providing a new high-level, multithreaded API in addition to the low-level client API already provided.

This service could be imported into the /bin/swift script, simplifying the bin/swift script to mostly command line, option parsing and output, and would allow the high level functionality to be used by 3rd party scripts and more thoroughly tested.

An implementation of the proposal can be found in the "swift-service" branch here: https://github.com/sohonetlabs/python-swiftclient

A short design document with detailing the proposed change is here http://joel-wright.github.io/swift/openstack/2014/08/02/Swift-Service-API/

Blueprint information

Status:
Not started
Approver:
None
Priority:
Undefined
Drafter:
None
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/bin-swift-logic-as-importable-library,n,z

Addressed by: https://review.openstack.org/85453
    Add importable SwiftService incorporating shell.py logic

Addressed by: https://review.openstack.org/116120
    add some autodoc on swiftclient.service

(?)

Work Items

This blueprint contains Public information 
Everyone can see this information.