Add cinder volume puppet resource

Signed-off-by: Bogdan Dobrelya <bdobrelia@mirantis.com>
This commit is contained in:
Bogdan Dobrelya 2015-07-22 14:43:29 +02:00
parent db94a28229
commit a23ddc735d
5 changed files with 67 additions and 0 deletions

View File

@ -0,0 +1,3 @@
# Cinder Volume resource for puppet handler
Setup and configure the cinder volume service

View File

@ -0,0 +1,4 @@
class {'cinder::volume':
enabled => false,
package_ensure => 'absent',
}

View File

@ -0,0 +1,18 @@
$resource = hiera($::resource_name)
$package_ensure = $resource['input']['package_ensure']['value']
$enabled = $resource['input']['enabled']['value']
$manage_service = $resource['input']['manage_service']['value']
include cinder::params
package { 'cinder':
ensure => $package_ensure,
name => $::cinder::params::package_name,
} ->
class {'cinder::volume':
package_ensure => $package_ensure,
enabled => $enabled,
manage_service => $manage_service,
}

View File

@ -0,0 +1,30 @@
id: cinder_volume_puppet
handler: puppet
puppet_module: cinder_volume
version: 1.0.0
input:
package_ensure:
schema: str
value: 'present'
enabled:
schema: bool
value: true
manage_service:
schema: bool
value: true
git:
schema: {repository: str!, branch: str!}
value: {repository: 'https://github.com/openstack/puppet-cinder', branch: '5.1.0'}
ip:
schema: str!
value:
ssh_key:
schema: str!
value:
ssh_user:
schema: str!
value:
tags: [resource/cinder_volume_service, resources/cinder_volume, resources/cinder]

View File

@ -0,0 +1,12 @@
import requests
from solar.core.log import log
def test(resource):
log.debug('Testing cinder_volume_puppet')
# requests.get(
# 'http://%s:%s' % (resource.args['ip'].value, resource.args['port'].value)
# TODO(bogdando) figure out how to test this
# http://docs.openstack.org/developer/nova/devref/volume.html
)