summaryrefslogtreecommitdiff
path: root/troveclient/utils.py
diff options
context:
space:
mode:
authorChristian Berendt <berendt@b1-systems.de>2014-05-27 23:54:03 +0200
committerMasaki Matsushita <glass.saga@gmail.com>2016-09-06 10:17:51 +0900
commitb592b42aa1a8a9683af40fa1c011c7cd1665b45a (patch)
tree5b0e357b1aa54a52e939578316bb47229d8d339b /troveclient/utils.py
parent599171ade4475709ddd8544e7dfd7ee4ba4ba2a2 (diff)
downloadpython-troveclient-b592b42aa1a8a9683af40fa1c011c7cd1665b45a.tar.gz
Use strutils.to_slug() instead of utils.slugify()
Oslo provides a function, to_slug() in strutils that is substantially similar to slugify() provided in utils by python-troveclient. Remove slugify() and use to_slug() instead. Change-Id: I97bc7cfc2c0e7d14e7617037bff431cdc1eee50f Closes-Bug: #1266127 Author: Christian Berendt <berendt@b1-systems.de>
Diffstat (limited to 'troveclient/utils.py')
-rw-r--r--troveclient/utils.py16
1 files changed, 0 insertions, 16 deletions
diff --git a/troveclient/utils.py b/troveclient/utils.py
index b5b0504..65accef 100644
--- a/troveclient/utils.py
+++ b/troveclient/utils.py
@@ -26,7 +26,6 @@ import prettytable
import six
from oslo_utils import encodeutils
-from oslo_utils import strutils
from troveclient.openstack.common.apiclient import exceptions
@@ -278,21 +277,6 @@ def safe_issubclass(*args):
return False
-# http://code.activestate.com/recipes/
-# 577257-slugify-make-a-string-usable-in-a-url-or-filename/
-def slugify(value):
- """Converts a string usable in a url or filename.
-
- Normalizes string, converts to lowercase, removes non-alpha characters,
- and converts spaces to hyphens.
-
- From Django's "django/template/defaultfilters.py".
-
- Make use strutils.to_slug from openstack common
- """
- return strutils.to_slug(value, incoming=None, errors="strict")
-
-
def is_uuid_like(val):
"""Returns validation of a value as a UUID.