summaryrefslogtreecommitdiff
path: root/nova/crypto.py
diff options
context:
space:
mode:
authorGábor Antal <antal@inf.u-szeged.hu>2015-11-03 13:10:47 +0100
committerGábor Antal <antal@inf.u-szeged.hu>2015-11-18 17:45:29 +0100
commit630aad025e2d7010d60a2b2257959692e35bbb3f (patch)
tree887f6bebcb8c2731cced383c5d411f79a69f61f8 /nova/crypto.py
parent3be51f19ae409a2633251e9bf5c5bdfcda8346a5 (diff)
downloadnova-630aad025e2d7010d60a2b2257959692e35bbb3f.tar.gz
Replaced deprecated timeutils methods
Since oslo 1.6.0 timeutils.isotime() and timeutils.strtime() methods are deprecated. DeprecationWarning: Using function/method 'oslo_utils.timeutils.strtime()' is deprecated in version '1.6' and will be removed in a future version: use either datetime.datetime.isoformat() or datetime.datetime.strftime() instead Change-Id: If69bd8a6bee052556ba8853afef3941bcd1e7b13 Closes-Bug: 1479056 Co-Authored-By: Diana Clarke <diana.joan.clarke@gmail.com>
Diffstat (limited to 'nova/crypto.py')
-rw-r--r--nova/crypto.py5
1 files changed, 2 insertions, 3 deletions
diff --git a/nova/crypto.py b/nova/crypto.py
index 0f1f58ed41..db7816233e 100644
--- a/nova/crypto.py
+++ b/nova/crypto.py
@@ -37,7 +37,6 @@ from oslo_config import cfg
from oslo_log import log as logging
from oslo_utils import excutils
from oslo_utils import fileutils
-from oslo_utils import timeutils
import paramiko
import six
@@ -253,12 +252,12 @@ def revoke_certs_by_user_and_project(user_id, project_id):
def _project_cert_subject(project_id):
"""Helper to generate user cert subject."""
- return CONF.project_cert_subject % (project_id, timeutils.isotime())
+ return CONF.project_cert_subject % (project_id, utils.isotime())
def _user_cert_subject(user_id, project_id):
"""Helper to generate user cert subject."""
- return CONF.user_cert_subject % (project_id, user_id, timeutils.isotime())
+ return CONF.user_cert_subject % (project_id, user_id, utils.isotime())
def generate_x509_cert(user_id, project_id, bits=2048):