From e455ddd81b3ef74e4b88ad34e7cd9e07e4c491b8 Mon Sep 17 00:00:00 2001 From: Endi Sukma Dewata Date: Tue, 28 Aug 2012 14:14:54 -0500 Subject: Added common theme webapp. A new theme webapp has been added to store the theme files for all PKI webapps. In the future the subsystem webapps can be modified to use the theme files provided by this common webapp instead of having to include duplicate files in each webapp. Ticket #89 --- base/deploy/src/scriptlets/instance_layout.py | 18 ++++++++++++++++++ base/deploy/src/scriptlets/pkiparser.py | 3 +++ 2 files changed, 21 insertions(+) diff --git a/base/deploy/src/scriptlets/instance_layout.py b/base/deploy/src/scriptlets/instance_layout.py index 8fd0396bc..72ccad16a 100644 --- a/base/deploy/src/scriptlets/instance_layout.py +++ b/base/deploy/src/scriptlets/instance_layout.py @@ -19,12 +19,17 @@ # All rights reserved. # +# System Imports +import os + + # PKI Deployment Imports import pkiconfig as config from pkiconfig import pki_master_dict as master import pkihelper as util import pkimessages as log import pkiscriptlet +import os # PKI Deployment Instance Layout Scriptlet @@ -50,6 +55,13 @@ class PkiScriptlet(pkiscriptlet.AbstractBasePkiScriptlet): util.file.copy(master['pki_source_webapps_root_web_xml'], master['pki_tomcat_webapps_root_webinf_web_xml'], overwrite_flag=True) + util.directory.create(master['pki_tomcat_webapps_common_path']) + util.directory.copy( + os.path.join( + config.PKI_DEPLOYMENT_SOURCE_ROOT, + "common-ui"), + master['pki_tomcat_webapps_common_path'], + overwrite_flag=True) util.directory.create(master['pki_tomcat_work_path']) util.directory.create(master['pki_tomcat_work_catalina_path']) util.directory.create(master['pki_tomcat_work_catalina_host_path']) @@ -150,6 +162,12 @@ class PkiScriptlet(pkiscriptlet.AbstractBasePkiScriptlet): util.directory.modify(master['pki_tomcat_common_path']) util.directory.modify(master['pki_tomcat_common_lib_path']) util.directory.modify(master['pki_tomcat_webapps_path']) + util.directory.copy( + os.path.join( + config.PKI_DEPLOYMENT_SOURCE_ROOT, + "common-ui"), + master['pki_tomcat_webapps_common_path'], + overwrite_flag=True) util.directory.modify(master['pki_tomcat_webapps_root_path']) util.directory.modify(master['pki_tomcat_webapps_root_webinf_path']) util.file.copy(master['pki_source_webapps_root_web_xml'], diff --git a/base/deploy/src/scriptlets/pkiparser.py b/base/deploy/src/scriptlets/pkiparser.py index b1daa3b21..64852f433 100644 --- a/base/deploy/src/scriptlets/pkiparser.py +++ b/base/deploy/src/scriptlets/pkiparser.py @@ -566,6 +566,9 @@ def compose_pki_master_dictionary(): config.pki_master_dict['pki_tomcat_webapps_root_path'] =\ os.path.join(config.pki_master_dict['pki_tomcat_webapps_path'], "ROOT") + config.pki_master_dict['pki_tomcat_webapps_common_path'] =\ + os.path.join(config.pki_master_dict['pki_tomcat_webapps_path'], + "pki") config.pki_master_dict['pki_tomcat_webapps_root_webinf_path'] =\ os.path.join( config.pki_master_dict['pki_tomcat_webapps_root_path'], -- cgit