puppet lint, updated test plan and LICENS

This commit is contained in:
Funs 2016-05-04 13:44:35 +02:00
parent 662ad31b55
commit 4f9156849b
4 changed files with 25 additions and 32 deletions

View File

@ -186,7 +186,7 @@ Apache License
same "printed page" as the copyright notice for easier
identification within third-party archives.
Copyright {yyyy} {name of copyright owner}
Copyright 2016 Funs Kessen
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
@ -199,4 +199,3 @@ Apache License
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.

View File

@ -1,18 +1,6 @@
# Copyright 2016 Datera, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
# Configure the Datera driver in cinder
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
# License for the specific language governing permissions and limitations
# under the License.
#
class cinder_datera_config::cinder (
$backend_name = 'datera',
$backends = ''
@ -32,18 +20,18 @@ class cinder_datera_config::cinder (
if $plugin_settings['multibackend'] {
$section = $backend_name
cinder_config {
"DEFAULT/enabled_backends": value => "${backend_name},${backends}";
'DEFAULT/enabled_backends': value => "${backend_name},${backends}";
}
} else {
$section = 'DEFAULT'
}
cinder_datera_config::backend::datera{ $section :
san_ip => $plugin_settings['datera_mvip'],
san_login => $plugin_settings['datera_admin_login'],
san_password => $plugin_settings['datera_admin_password'],
datera_num_replicas => $plugin_settings['datera_num_replicas'],
extra_options => {}
san_ip => $plugin_settings['datera_mvip'],
san_login => $plugin_settings['datera_admin_login'],
san_password => $plugin_settings['datera_admin_password'],
datera_num_replicas => $plugin_settings['datera_num_replicas'],
extra_options => {}
}
Cinder_config<||>~> Service[cinder_volume]

View File

@ -1,26 +1,32 @@
notice('PLUGIN: cinder_datera_driver::cinder: cinder.pp')
#
# Installs the Datera cinder driver
#
class cinder_datera_driver::cinder {
$version = hiera('fuel_version')
$file = '/usr/lib/python2.7/dist-packages/cinder/volume/drivers/datera.py'
# install the driver, only required on cinder nodes
notice("PLUGIN: cinder_datera_driver::cinder: trying to install Fuel $version plugin.")
notice("PLUGIN: cinder_datera_driver::cinder: trying to install Fuel \
${version} plugin.")
if($version == '7.0') {
file { "/usr/lib/python2.7/dist-packages/cinder/volume/drivers/datera.py":
mode => "0644",
owner => 'root',
group => 'root',
file { $file:
mode => '0644',
owner => 'root',
group => 'root',
source => 'puppet:///modules/cinder_datera_driver/7.0/datera.py',
}
} elsif ($version == '8.0') {
file { "/usr/lib/python2.7/dist-packages/cinder/volume/drivers/datera.py":
mode => "0644",
owner => 'root',
group => 'root',
file { $file:
mode => '0644',
owner => 'root',
group => 'root',
source => 'puppet:///modules/cinder_datera_driver/8.0/datera.py',
}
} else {
notice("PLUGIN: cinder_datera_driver::cinder: $version is not supported by us.")
notice("PLUGIN: cinder_datera_driver::cinder: ${version} is not \
supported by us.")
}
}
class { 'cinder_datera_driver::cinder': }