github.com/makyo/juju@v0.0.0-20160425123129-2608902037e9/provider/openstack/init.go (about) 1 // Copyright 2015 Canonical Ltd. 2 // Licensed under the AGPLv3, see LICENCE file for details. 3 4 package openstack 5 6 import ( 7 "github.com/juju/juju/environs" 8 "github.com/juju/juju/environs/tools" 9 "github.com/juju/juju/storage/provider/registry" 10 ) 11 12 const ( 13 providerType = "openstack" 14 ) 15 16 func init() { 17 environs.RegisterProvider(providerType, providerInstance) 18 19 environs.RegisterImageDataSourceFunc("keystone catalog", getKeystoneImageSource) 20 tools.RegisterToolsDataSourceFunc("keystone catalog", getKeystoneToolsSource) 21 22 // Register the Openstack specific providers. 23 registry.RegisterProvider( 24 CinderProviderType, 25 &cinderProvider{newOpenstackStorageAdapter}, 26 ) 27 28 // Register the Cinder provider with the Openstack provider. 29 registry.RegisterEnvironStorageProviders(providerType, CinderProviderType) 30 }