Remove backend class
The backend class has been removed and the related backend config service has been coupled with the file and swift classes. This is to reduce the code complexity.
This commit is contained in:
@@ -1,15 +0,0 @@
|
||||
#
|
||||
# used to model the line in the file
|
||||
# that configures which storage backend
|
||||
# to use
|
||||
#
|
||||
class glance::backend(
|
||||
$default_store
|
||||
) {
|
||||
glance::api::config { 'backend':
|
||||
config => {
|
||||
'default_store' => $default_store
|
||||
},
|
||||
order => '02',
|
||||
}
|
||||
}
|
@@ -8,9 +8,15 @@ class glance::backend::file(
|
||||
$filesystem_store_datadir = '/var/lib/glance/images/'
|
||||
) inherits glance::api {
|
||||
|
||||
# set file as default store
|
||||
class { 'glance::backend':
|
||||
default_store => 'file',
|
||||
#
|
||||
# modeled as its own config define so that any attempts to
|
||||
# define multiple backends will fail
|
||||
#
|
||||
glance::api::config { 'backend':
|
||||
config => {
|
||||
'default_store' => 'file',
|
||||
},
|
||||
order => '04',
|
||||
}
|
||||
|
||||
# configure directory where files should be stored
|
||||
|
@@ -19,9 +19,15 @@ class glance::backend::swift(
|
||||
$swift_store_create_container_on_put = 'False',
|
||||
) inherits glance::api {
|
||||
|
||||
# specify swift as backend
|
||||
class { 'glance::backend':
|
||||
default_store => 'swift',
|
||||
#
|
||||
# modeled as its own config define so that any attempts to
|
||||
# define multiple backends will fail
|
||||
#
|
||||
glance::api::config { 'backend':
|
||||
config => {
|
||||
'default_store' => 'swift',
|
||||
},
|
||||
order => '04',
|
||||
}
|
||||
|
||||
glance::api::config { 'swift':
|
||||
|
@@ -6,6 +6,7 @@
|
||||
class glance::notify(
|
||||
$notifier_strategy
|
||||
) {
|
||||
|
||||
glance::api::config { 'notify':
|
||||
config => {
|
||||
'notifier_strategy' => $notifier_strategy,
|
||||
|
Reference in New Issue
Block a user