From d33070988dadc02d1243cd61cea7227e7ed2f6f4 Mon Sep 17 00:00:00 2001 From: Corey Bryant Date: Mon, 13 Apr 2015 13:49:53 +0000 Subject: [PATCH] Move deploy from source template files to templates/git --- hooks/cinder_utils.py | 8 ++++---- templates/{ => git}/cinder_sudoers | 0 templates/{ => git}/cinder_tgt.conf | 0 templates/{ => git}/logging.conf | 0 unit_tests/test_cinder_utils.py | 8 ++++---- 5 files changed, 8 insertions(+), 8 deletions(-) rename templates/{ => git}/cinder_sudoers (100%) rename templates/{ => git}/cinder_tgt.conf (100%) rename templates/{ => git}/logging.conf (100%) diff --git a/hooks/cinder_utils.py b/hooks/cinder_utils.py index d5787390..84a9c90c 100644 --- a/hooks/cinder_utils.py +++ b/hooks/cinder_utils.py @@ -603,13 +603,13 @@ def git_post_install(projects_yaml): os.chown('/etc/cinder/api-paste.ini', uid, gid) os.chown('/etc/cinder/policy.json', uid, gid) - render('cinder_tgt.conf', '/etc/tgt/conf.d', {}, owner='cinder', - group='cinder', perms=0o644) render('cinder.conf', '/etc/cinder/cinder.conf', {}, owner='cinder', group='cinder', perms=0o644) - render('logging.conf', '/etc/cinder/logging.conf', {}, owner='cinder', + render('git/cinder_tgt.conf', '/etc/tgt/conf.d', {}, owner='cinder', group='cinder', perms=0o644) - render('cinder_sudoers', '/etc/sudoers.d/cinder_sudoers', {}, + render('git/logging.conf', '/etc/cinder/logging.conf', {}, owner='cinder', + group='cinder', perms=0o644) + render('git/cinder_sudoers', '/etc/sudoers.d/cinder_sudoers', {}, owner='root', group='root', perms=0o440) os.chmod('/etc/sudoers.d', 0o750) diff --git a/templates/cinder_sudoers b/templates/git/cinder_sudoers similarity index 100% rename from templates/cinder_sudoers rename to templates/git/cinder_sudoers diff --git a/templates/cinder_tgt.conf b/templates/git/cinder_tgt.conf similarity index 100% rename from templates/cinder_tgt.conf rename to templates/git/cinder_tgt.conf diff --git a/templates/logging.conf b/templates/git/logging.conf similarity index 100% rename from templates/logging.conf rename to templates/git/logging.conf diff --git a/unit_tests/test_cinder_utils.py b/unit_tests/test_cinder_utils.py index 2cac047b..e7a13851 100644 --- a/unit_tests/test_cinder_utils.py +++ b/unit_tests/test_cinder_utils.py @@ -638,13 +638,13 @@ class TestCinderUtils(CharmTestCase): 'log_file': '/var/log/cinder/cinder-volume.log', } expected = [ - call('cinder_tgt.conf', '/etc/tgt/conf.d', {}, owner='cinder', - group='cinder', perms=0o644), call('cinder.conf', '/etc/cinder/cinder.conf', {}, owner='cinder', group='cinder', perms=0o644), - call('logging.conf', '/etc/cinder/logging.conf', {}, + call('git/cinder_tgt.conf', '/etc/tgt/conf.d', {}, owner='cinder', + group='cinder', perms=0o644), + call('git/logging.conf', '/etc/cinder/logging.conf', {}, owner='cinder', group='cinder', perms=0o644), - call('cinder_sudoers', '/etc/sudoers.d/cinder_sudoers', {}, + call('git/cinder_sudoers', '/etc/sudoers.d/cinder_sudoers', {}, owner='root', group='root', perms=0o440), call('git.upstart', '/etc/init/cinder-api.conf', cinder_api_context, perms=0o644,