richleland/django-cumulus — pull request #112 by absoludity (2013-11-28 09:28:14+00:00)
Title: Enable cumulus with non-rackspace openstack (but using pyrax).

I'd like to use django-cumulus with my own openstack/swift/keystone infrastructure - and it seems that support for non-rackspace swift has eroded in django-cumulus. This is my attempt to start bringing it back in :-).

Note: I think there was some confusion when I commented on richleland/django-cumulus#101 - this branch doesn't enable connecting to openstack without pyrax - it enables connecting to a non-rackspace swift+keystone using pyrax. Getting the non-pyrax option working looked like a bigger job than I had time for (plus, I think there needs to be an architectural decision there before it is fixed - perhaps using composition to enable extra functionality like the rackspace cdn support).

So the the two main issues were:
* Extra settings required for pyrax.set_setting (tenant_id and auth_url) when using non-rackspace swift
* pyrax assuming cdn availability whenever pyrax is used (I've also created a pull-request to fix that upstream, at https://github.com/rackspace/pyrax/pull/254 but provided a work-around here).

With that, I'm able to use the storage and run the management commands, and with some effort, get the current integration tests passing (separately) with non-rackspace swift: https://gist.github.com/absoludity/7689297

I've also tried to rework the container commands to be more general, and only branch to pyrax-only code for cdn-related functionality.