From 4dbfd63c6d41493b71d5ce991a802d45ad535b31 Mon Sep 17 00:00:00 2001 From: Bogdan Dobrelya Date: Mon, 24 Aug 2015 14:20:44 +0200 Subject: [PATCH] Fix nova_generic_service resource Signed-off-by: Bogdan Dobrelya --- example-puppet.py | 2 +- resources/nova_conductor_puppet/README.md | 17 +++-------------- .../README.md | 0 .../actions/remove.pp | 4 ++-- .../actions/run.pp | 4 ++-- .../meta.yaml | 0 6 files changed, 8 insertions(+), 19 deletions(-) rename resources/{nova_generic_service => nova_generic_service_puppet}/README.md (100%) rename resources/{nova_generic_service => nova_generic_service_puppet}/actions/remove.pp (81%) rename resources/{nova_generic_service => nova_generic_service_puppet}/actions/run.pp (85%) rename resources/{nova_generic_service => nova_generic_service_puppet}/meta.yaml (100%) diff --git a/example-puppet.py b/example-puppet.py index 00686f72..8bdaf645 100755 --- a/example-puppet.py +++ b/example-puppet.py @@ -453,7 +453,7 @@ def setup_resources(): # come from https://github.com/openstack/puppet-nova/blob/5.1.0/manifests/params.pp nova_scheduler_puppet = vr.create('nova_scheduler_puppet', 'resources/nova_generic_service_puppet', { 'title' : 'scheduler', 'package_name': 'nova-scheduler', 'service_name': 'nova-scheduler', - }[0] + })[0] signals.connect(node1, nova_scheduler_puppet) # NOVA COMPUTE diff --git a/resources/nova_conductor_puppet/README.md b/resources/nova_conductor_puppet/README.md index 26a94d35..144d580a 100644 --- a/resources/nova_conductor_puppet/README.md +++ b/resources/nova_conductor_puppet/README.md @@ -1,16 +1,5 @@ -# Nova conductor resource for puppet handler +# Nova generic service resource for puppet handler -Setup and configure the Nova conductor service. -Note, it [should not](http://docs.openstack.org/juno/config-reference/content/section_conductor.html) be deployed on compute nodes. +Setup and configure the Nova generic services. -# Parameters - -source https://github.com/openstack/puppet-nova_conductor/blob/5.1.0/manifests/conductor.pp - - ``ensure_package`` - (optional) The state of the nova conductor package - Defaults to 'present' - - ``workers`` - (optional) Number of workers for OpenStack Conductor service - Defaults to undef (i.e. parameter will not be present) \ No newline at end of file +source https://github.com/openstack/puppet-nova/blob/5.1.0/manifests/generic_service.pp \ No newline at end of file diff --git a/resources/nova_generic_service/README.md b/resources/nova_generic_service_puppet/README.md similarity index 100% rename from resources/nova_generic_service/README.md rename to resources/nova_generic_service_puppet/README.md diff --git a/resources/nova_generic_service/actions/remove.pp b/resources/nova_generic_service_puppet/actions/remove.pp similarity index 81% rename from resources/nova_generic_service/actions/remove.pp rename to resources/nova_generic_service_puppet/actions/remove.pp index 688fdd18..964f79c9 100644 --- a/resources/nova_generic_service/actions/remove.pp +++ b/resources/nova_generic_service_puppet/actions/remove.pp @@ -1,4 +1,4 @@ -$title = $resource['input']['title']['value'] +$service_title = $resource['input']['title']['value'] $package_name = $resource['input']['package_name']['value'] $service_name = $resource['input']['service_name']['value'] @@ -6,7 +6,7 @@ exec { 'post-nova_config': command => '/bin/echo "Nova config has changed"', } -nova::generic_service { $title: +nova::generic_service { $service_title: ensure_package => 'absent', enabled => false, package_name => $package_name, diff --git a/resources/nova_generic_service/actions/run.pp b/resources/nova_generic_service_puppet/actions/run.pp similarity index 85% rename from resources/nova_generic_service/actions/run.pp rename to resources/nova_generic_service_puppet/actions/run.pp index afc0a423..9e696f4d 100644 --- a/resources/nova_generic_service/actions/run.pp +++ b/resources/nova_generic_service_puppet/actions/run.pp @@ -1,6 +1,6 @@ $resource = hiera($::resource_name) -$title = $resource['input']['title']['value'] +$service_title = $resource['input']['title']['value'] $package_name = $resource['input']['package_name']['value'] $service_name = $resource['input']['service_name']['value'] $ensure_package = $resource['input']['ensure_package']['value'] @@ -16,7 +16,7 @@ package { 'nova-common': ensure => $ensure_package, } -nova::generic_service { $title: +nova::generic_service { $service_title: enabled => true, manage_service => true, package_name => $package_name, diff --git a/resources/nova_generic_service/meta.yaml b/resources/nova_generic_service_puppet/meta.yaml similarity index 100% rename from resources/nova_generic_service/meta.yaml rename to resources/nova_generic_service_puppet/meta.yaml