summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTodd Willey <todd@ansolabs.com>2011-03-24 04:14:36 +0000
committerTarmac <>2011-03-24 04:14:36 +0000
commite9d02084b69e4eb5be1c88b014a59f63ef4a9046 (patch)
tree25d4c59298ceb8ff91f31ae1fa8d0d65bcfbcdf6
parentaf22892a2b1dc413f7d11c2f6efe2f820e3257ed (diff)
parent3796b5a8fc2baa9a35ebbc721735f22e952e6aa3 (diff)
Fix issues with certificate updating & whitespace removal
-rw-r--r--nova/crypto.py3
-rw-r--r--nova/db/api.py2
2 files changed, 3 insertions, 2 deletions
diff --git a/nova/crypto.py b/nova/crypto.py
index 2a8d4abca..b112e5b92 100644
--- a/nova/crypto.py
+++ b/nova/crypto.py
@@ -26,6 +26,7 @@ import gettext
import hashlib
import os
import shutil
+import string
import struct
import tempfile
import time
@@ -267,7 +268,7 @@ def _sign_csr(csr_text, ca_folder):
'./openssl.cnf', '-infiles', inbound)
out, _err = utils.execute('openssl', 'x509', '-in', outbound,
'-serial', '-noout')
- serial = out.rpartition("=")[2]
+ serial = string.strip(out.rpartition("=")[2])
os.chdir(start)
with open(outbound, "r") as crtfile:
return (serial, crtfile.read())
diff --git a/nova/db/api.py b/nova/db/api.py
index add5bd83e..afc1bff2f 100644
--- a/nova/db/api.py
+++ b/nova/db/api.py
@@ -214,7 +214,7 @@ def certificate_update(context, certificate_id, values):
Raises NotFound if service does not exist.
"""
- return IMPL.service_update(context, certificate_id, values)
+ return IMPL.certificate_update(context, certificate_id, values)
###################