Re: [Pki-devel] [PATCH] 743 Fixed install-only message in external CA case.

2016-05-12 Thread Endi Sukma Dewata

On 5/11/2016 9:04 PM, Matthew Harmsen wrote:

ACK


Thanks! Pushed to master.

--
Endi S. Dewata

___
Pki-devel mailing list
Pki-devel@redhat.com
https://www.redhat.com/mailman/listinfo/pki-devel


Re: [Pki-devel] [PATCH] 743 Fixed install-only message in external CA case.

2016-05-11 Thread Matthew Harmsen

On 05/11/2016 02:01 PM, Endi Sukma Dewata wrote:

Previously, in external CA case if pkispawn was executed with
pki_skip_configuration=True, it would stop the execution before
the step 1 was fully completed (i.e. generating CSR), but it would
incorrectly show a message indicating the CSR has been generated.

The code that displays the installation summary has been fixed to
check for pki_skip_configuration first before checking for external
CA case to ensure that it displays the appropriate message for each
step.

The code that generates the Tomcat instance systemd service link
was moved into instance_layout.py to avoid redundant executions.

The pkispawn and pkidestroy have also be modified to remove
redundant log of deployment parameters in master dictionary.



___
Pki-devel mailing list
Pki-devel@redhat.com
https://www.redhat.com/mailman/listinfo/pki-devel

ACK
___
Pki-devel mailing list
Pki-devel@redhat.com
https://www.redhat.com/mailman/listinfo/pki-devel

[Pki-devel] [PATCH] 743 Fixed install-only message in external CA case.

2016-05-11 Thread Endi Sukma Dewata

Previously, in external CA case if pkispawn was executed with
pki_skip_configuration=True, it would stop the execution before
the step 1 was fully completed (i.e. generating CSR), but it would
incorrectly show a message indicating the CSR has been generated.

The code that displays the installation summary has been fixed to
check for pki_skip_configuration first before checking for external
CA case to ensure that it displays the appropriate message for each
step.

The code that generates the Tomcat instance systemd service link
was moved into instance_layout.py to avoid redundant executions.

The pkispawn and pkidestroy have also be modified to remove
redundant log of deployment parameters in master dictionary.

--
Endi S. Dewata
>From c7ae690180e274472c78710fa2a6d09f9604d9e2 Mon Sep 17 00:00:00 2001
From: "Endi S. Dewata" 
Date: Wed, 11 May 2016 19:35:07 +0200
Subject: [PATCH] Fixed install-only message in external CA case.

Previously, in external CA case if pkispawn was executed with
pki_skip_configuration=True, it would stop the execution before
the step 1 was fully completed (i.e. generating CSR), but it would
incorrectly show a message indicating the CSR has been generated.

The code that displays the installation summary has been fixed to
check for pki_skip_configuration first before checking for external
CA case to ensure that it displays the appropriate message for each
step.

The code that generates the Tomcat instance systemd service link
was moved into instance_layout.py to avoid redundant executions.

The pkispawn and pkidestroy have also be modified to remove
redundant log of deployment parameters in master dictionary.
---
 .../pki/server/deployment/scriptlets/configuration.py   |  7 ---
 .../pki/server/deployment/scriptlets/instance_layout.py |  8 
 base/server/sbin/pkidestroy |  5 -
 base/server/sbin/pkispawn   | 13 -
 4 files changed, 12 insertions(+), 21 deletions(-)

diff --git a/base/server/python/pki/server/deployment/scriptlets/configuration.py b/base/server/python/pki/server/deployment/scriptlets/configuration.py
index fc5dc84c4bbcde0c8972705ab64ebdcada20fc4d..373b58ef45cf84fd5aa0be1856cff5ee23b13aba 100644
--- a/base/server/python/pki/server/deployment/scriptlets/configuration.py
+++ b/base/server/python/pki/server/deployment/scriptlets/configuration.py
@@ -40,12 +40,6 @@ class PkiScriptlet(pkiscriptlet.AbstractBasePkiScriptlet):
 
 def spawn(self, deployer):
 
-# ALWAYS establish the following Tomcat instance symbolic link since
-# this link is required by both automatic pkispawn instance
-# configuration as well as manual browser GUI instance configuration
-deployer.symlink.create(deployer.mdict['pki_systemd_service'],
-deployer.mdict['pki_systemd_service_link'])
-
 if config.str2bool(deployer.mdict['pki_skip_configuration']):
 config.pki_log.info(log.SKIP_CONFIGURATION_SPAWN_1, __name__,
 extra=config.PKI_INDENTATION_LEVEL_1)
@@ -354,4 +348,3 @@ class PkiScriptlet(pkiscriptlet.AbstractBasePkiScriptlet):
 if len(deployer.instance.tomcat_instance_subsystems()) == 1:
 if deployer.directory.exists(deployer.mdict['pki_client_dir']):
 deployer.directory.delete(deployer.mdict['pki_client_dir'])
-deployer.symlink.delete(deployer.mdict['pki_systemd_service_link'])
diff --git a/base/server/python/pki/server/deployment/scriptlets/instance_layout.py b/base/server/python/pki/server/deployment/scriptlets/instance_layout.py
index 2af86bfeb246cf10d297af8ca8d8b8391c55f15a..98d82ff98d9cb40e1ee2116250b8271b04be868f 100644
--- a/base/server/python/pki/server/deployment/scriptlets/instance_layout.py
+++ b/base/server/python/pki/server/deployment/scriptlets/instance_layout.py
@@ -293,12 +293,20 @@ class PkiScriptlet(pkiscriptlet.AbstractBasePkiScriptlet):
 deployer.mdict['pki_symkey_jar'],
 deployer.mdict['pki_symkey_jar_link'])
 
+# create Tomcat instance systemd service link
+deployer.symlink.create(deployer.mdict['pki_systemd_service'],
+deployer.mdict['pki_systemd_service_link'])
+
 def destroy(self, deployer):
 
 config.pki_log.info(log.INSTANCE_DESTROY_1, __name__,
 extra=config.PKI_INDENTATION_LEVEL_1)
 
 if len(deployer.instance.tomcat_instance_subsystems()) == 0:
+
+# remove Tomcat instance systemd service link
+deployer.symlink.delete(deployer.mdict['pki_systemd_service_link'])
+
 # remove Tomcat instance base
 deployer.directory.delete(deployer.mdict['pki_instance_path'])
 # remove Tomcat instance logs
diff --git a/base/server/sbin/pkidestroy b/base/server/sbin/pkidestroy
index