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