From cd34faf227318f8167124190ebd02fc2d5d7e933 Mon Sep 17 00:00:00 2001
From: Michael Hanselmann <hansmi@google.com>
Date: Fri, 16 Oct 2009 16:21:26 +0200
Subject: [PATCH] Make bootstrap._GenerateSelfSignedSslCert public

Signed-off-by: Michael Hanselmann <hansmi@google.com>
Reviewed-by: Iustin Pop <iustin@google.com>
---
 lib/bootstrap.py | 6 +++---
 lib/config.py    | 2 +-
 tools/cfgupgrade | 2 +-
 3 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/lib/bootstrap.py b/lib/bootstrap.py
index b22843328..ae0fae773 100644
--- a/lib/bootstrap.py
+++ b/lib/bootstrap.py
@@ -66,7 +66,7 @@ def _InitSSHSetup():
   utils.AddAuthorizedKey(auth_keys, utils.ReadFile(pub_key))
 
 
-def _GenerateSelfSignedSslCert(file_name, validity=(365 * 5)):
+def GenerateSelfSignedSslCert(file_name, validity=(365 * 5)):
   """Generates a self-signed SSL certificate.
 
   @type file_name: str
@@ -107,11 +107,11 @@ def _InitGanetiServerSetup():
   the cluster and also generates the SSL certificate.
 
   """
-  _GenerateSelfSignedSslCert(constants.SSL_CERT_FILE)
+  GenerateSelfSignedSslCert(constants.SSL_CERT_FILE)
 
   # Don't overwrite existing file
   if not os.path.exists(constants.RAPI_CERT_FILE):
-    _GenerateSelfSignedSslCert(constants.RAPI_CERT_FILE)
+    GenerateSelfSignedSslCert(constants.RAPI_CERT_FILE)
 
   if not os.path.exists(constants.HMAC_CLUSTER_KEY):
     utils.WriteFile(constants.HMAC_CLUSTER_KEY,
diff --git a/lib/config.py b/lib/config.py
index 1905aa8be..a70a71bed 100644
--- a/lib/config.py
+++ b/lib/config.py
@@ -1211,7 +1211,7 @@ class ConfigWriter:
     # Write ssconf files on all nodes (including locally)
     if self._last_cluster_serial < self._config_data.cluster.serial_no:
       if not self._offline:
-        result = rpc.RpcRunner.call_write_ssconf_files(\
+        result = rpc.RpcRunner.call_write_ssconf_files(
           self._UnlockedGetNodeList(),
           self._UnlockedGetSsconfValues())
         for nname, nresu in result.items():
diff --git a/tools/cfgupgrade b/tools/cfgupgrade
index 7ff09e51c..9c6b225d7 100755
--- a/tools/cfgupgrade
+++ b/tools/cfgupgrade
@@ -170,7 +170,7 @@ def main():
     if not options.dry_run:
       if not os.path.exists(options.RAPI_CERT_FILE):
         logging.debug("Writing RAPI certificate to %s", options.RAPI_CERT_FILE)
-        bootstrap._GenerateSelfSignedSslCert(options.RAPI_CERT_FILE)
+        bootstrap.GenerateSelfSignedSslCert(options.RAPI_CERT_FILE)
 
   except:
     logging.critical("Writing configuration failed. It is probably in an"
-- 
GitLab