Refactoring for integration with Glance, Cinder and Nova / roxy