diff options
author | Brant Knudson <bknudson@us.ibm.com> | 2015-06-07 11:20:44 -0500 |
---|---|---|
committer | Brant Knudson <bknudson@us.ibm.com> | 2015-06-30 12:58:55 -0500 |
commit | 97c2c690d8983fd1d929a4eae3b0d62bbcb2cf6a (patch) | |
tree | 1d21dbde7b1e77c839c749e3a658d461332385d7 /keystoneclient/fixture | |
parent | aa9e413a6def86c58b19495ac6ac439e61d04a8b (diff) | |
download | python-keystoneclient-97c2c690d8983fd1d929a4eae3b0d62bbcb2cf6a.tar.gz |
Switch from deprecated isotime
oslo_utils.timeutils.isotime() is deprecated as of 1.6 so we need
to stop using it.
The deprecation message says to use datetime.datetime.isoformat()
instead, but the format of the string generated by isoformat isn't
the same as the format of the string generated by isotime. The string
is used in tokens and other public APIs and we can't change it
without potentially breaking clients.
So the workaround is to copy the current implementation from
oslo_utils.timeutils.isotime() to keystone.common.utils.isotime().
Change-Id: I34b12b96de3ea21beaf935ed8a9f6bae2fe0d0bc
Closes-Bug: 1461251
Diffstat (limited to 'keystoneclient/fixture')
-rw-r--r-- | keystoneclient/fixture/discovery.py | 2 | ||||
-rw-r--r-- | keystoneclient/fixture/v2.py | 5 | ||||
-rw-r--r-- | keystoneclient/fixture/v3.py | 5 |
3 files changed, 7 insertions, 5 deletions
diff --git a/keystoneclient/fixture/discovery.py b/keystoneclient/fixture/discovery.py index eae0bcd..50a6bce 100644 --- a/keystoneclient/fixture/discovery.py +++ b/keystoneclient/fixture/discovery.py @@ -77,7 +77,7 @@ class DiscoveryBase(dict): @updated.setter def updated(self, value): - self.updated_str = timeutils.isotime(value) + self.updated_str = utils.isotime(value) @utils.positional() def add_link(self, href, rel='self', type=None): diff --git a/keystoneclient/fixture/v2.py b/keystoneclient/fixture/v2.py index 3022f2c..da60b9b 100644 --- a/keystoneclient/fixture/v2.py +++ b/keystoneclient/fixture/v2.py @@ -16,6 +16,7 @@ import uuid from oslo_utils import timeutils from keystoneclient.fixture import exception +from keystoneclient import utils class _Service(dict): @@ -112,7 +113,7 @@ class Token(dict): @expires.setter def expires(self, value): - self.expires_str = timeutils.isotime(value) + self.expires_str = utils.isotime(value) @property def issued_str(self): @@ -128,7 +129,7 @@ class Token(dict): @issued.setter def issued(self, value): - self.issued_str = timeutils.isotime(value) + self.issued_str = utils.isotime(value) @property def _user(self): diff --git a/keystoneclient/fixture/v3.py b/keystoneclient/fixture/v3.py index a1781dd..bda5e19 100644 --- a/keystoneclient/fixture/v3.py +++ b/keystoneclient/fixture/v3.py @@ -16,6 +16,7 @@ import uuid from oslo_utils import timeutils from keystoneclient.fixture import exception +from keystoneclient import utils class _Service(dict): @@ -136,7 +137,7 @@ class Token(dict): @expires.setter def expires(self, value): - self.expires_str = timeutils.isotime(value, subsecond=True) + self.expires_str = utils.isotime(value, subsecond=True) @property def issued_str(self): @@ -152,7 +153,7 @@ class Token(dict): @issued.setter def issued(self, value): - self.issued_str = timeutils.isotime(value, subsecond=True) + self.issued_str = utils.isotime(value, subsecond=True) @property def _user(self): |