Merge "Modify temp folder for certs"
authorDan Timoney <dtimoney@att.com>
Wed, 1 Apr 2020 13:56:51 +0000 (13:56 +0000)
committerGerrit Code Review <gerrit@onap.org>
Wed, 1 Apr 2020 13:56:51 +0000 (13:56 +0000)
Former-commit-id: 3615a14d37ba316006827dea2f41f9cb9b2a61e9

1  2 
installation/sdnc/src/main/scripts/installCerts.py

@@@ -28,15 -28,11 +28,15 @@@ import shuti
  import subprocess
  import logging
  
 +
  log_file = '/opt/opendaylight/data/log/installCerts.log'
 +with open(os.path.join('/opt/opendaylight/data/log', 'installCerts.log'), 'w') as fp:
 +    pass
 +
  log_format = "%(asctime)s - %(name)s - %(levelname)s - %(message)s"
  logging.basicConfig(filename=log_file,level=logging.DEBUG,filemode='w',format=log_format)
  
- Path = os.environ['ODL_CERT_DIR']
+ Path = "/tmp"
  
  zipFileList = []
  
@@@ -230,10 -226,10 +230,10 @@@ def get_pass(file_name)
  
  
  def cleanup():
-     for file in os.listdir(Path):
-         if os.path.isfile(Path + '/' + file):
-             logging.debug("Cleaning up the file %s", Path + '/'+ file)
-             os.remove(Path + '/'+ file)
+     for file in jks_files:
+         if os.path.isfile(file):
+             logging.debug("Cleaning up the file %s", file)
+             os.remove(file)
  
  
  def jks_to_p12(file, password):