[pebbles] Refactoring for integration with Glance, Cinder and Nova