From b2f94c1cbd3b3138c852bf92c0e9b2e6a1559302 Mon Sep 17 00:00:00 2001 From: Bogdan Dobrelya Date: Wed, 22 Jul 2015 15:21:54 +0200 Subject: [PATCH] Add compostion layer for c-volume puppet Signed-off-by: Bogdan Dobrelya --- example-puppet.py | 8 +++++++- resources/cinder_volume_puppet/actions/run.pp | 6 +++--- resources/cinder_volume_puppet/test.py | 2 +- 3 files changed, 11 insertions(+), 5 deletions(-) diff --git a/example-puppet.py b/example-puppet.py index c96c16fe..5db6765e 100644 --- a/example-puppet.py +++ b/example-puppet.py @@ -272,6 +272,11 @@ def deploy(): cinder_scheduler_puppet = vr.create('cinder_scheduler_puppet', 'resources/cinder_scheduler_puppet', {})[0] signals.connect(node1, cinder_scheduler_puppet) signals.connect(cinder_puppet, cinder_scheduler_puppet) + + # CINDER VOLUME + cinder_volume_puppet = vr.create('cinder_volume_puppet', 'resources/cinder_volume_puppet', {})[0] + signals.connect(node1, cinder_volume_puppet) + signals.connect(cinder_puppet, cinder_volume_puppet) # NOVA # #nova_network_puppet = vr.create('nova_network_puppet', GitProvider(GIT_PUPPET_LIBS_URL, 'nova_network'), {'rabbitmq_user': 'guest', 'rabbitmq_password': 'guest'})[0] @@ -344,7 +349,7 @@ def deploy(): actions.resource_action(cinder_keystone_service_endpoint, 'run') actions.resource_action(cinder_api_puppet, 'run') actions.resource_action(cinder_scheduler_puppet, 'run') - + actions.resource_action(cinder_volume_puppet, 'run') # actions.resource_action(nova_keystone_user, 'run') # actions.resource_action(nova_keystone_role, 'run') @@ -359,6 +364,7 @@ def undeploy(): db = get_db() to_remove = [ + 'cinder_volume_puppet', 'cinder_scheduler_puppet', 'cinder_api_puppet', 'cinder_keystone_service_endpoint', diff --git a/resources/cinder_volume_puppet/actions/run.pp b/resources/cinder_volume_puppet/actions/run.pp index db63ebd8..4f66e2e8 100644 --- a/resources/cinder_volume_puppet/actions/run.pp +++ b/resources/cinder_volume_puppet/actions/run.pp @@ -10,7 +10,7 @@ package { 'cinder': } -> class {'cinder::volume': -package_ensure => $package_ensure, -enabled => true, -manage_service => true, + package_ensure => $package_ensure, + enabled => true, + manage_service => true, } diff --git a/resources/cinder_volume_puppet/test.py b/resources/cinder_volume_puppet/test.py index 8c090e24..59bfe819 100644 --- a/resources/cinder_volume_puppet/test.py +++ b/resources/cinder_volume_puppet/test.py @@ -9,4 +9,4 @@ def test(resource): # '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 - ) +# )