From 380903a686e10f46f9beeabbaa2f4ecb86f57e94 Mon Sep 17 00:00:00 2001 From: Davanum Srinivas Date: Mon, 14 Jul 2014 08:40:34 -0400 Subject: [PATCH] Move units into oslo.utils bp graduate-oslo-utils Change-Id: I022dd51c9c9a59462ad94380c6ea7fbc0d145613 --- openstack-common.conf | 1 - oslo/utils/{openstack/common => }/units.py | 4 ++-- tests/test_strutils.py | 2 +- 3 files changed, 3 insertions(+), 4 deletions(-) rename oslo/utils/{openstack/common => }/units.py (94%) diff --git a/openstack-common.conf b/openstack-common.conf index 80ba3769..237d3873 100644 --- a/openstack-common.conf +++ b/openstack-common.conf @@ -7,4 +7,3 @@ script = tools/run_cross_tests.sh base=oslo.utils module=gettextutils -module=units diff --git a/oslo/utils/openstack/common/units.py b/oslo/utils/units.py similarity index 94% rename from oslo/utils/openstack/common/units.py rename to oslo/utils/units.py index 84b518ca..4817da50 100644 --- a/oslo/utils/openstack/common/units.py +++ b/oslo/utils/units.py @@ -17,7 +17,7 @@ Unit constants """ -#Binary unit constants. +# Binary unit constants. Ki = 1024 Mi = 1024 ** 2 Gi = 1024 ** 3 @@ -27,7 +27,7 @@ Ei = 1024 ** 6 Zi = 1024 ** 7 Yi = 1024 ** 8 -#Decimal unit constants. +# Decimal unit constants. k = 1000 M = 1000 ** 2 G = 1000 ** 3 diff --git a/tests/test_strutils.py b/tests/test_strutils.py index 4b37b21e..c6bd6c89 100644 --- a/tests/test_strutils.py +++ b/tests/test_strutils.py @@ -22,8 +22,8 @@ from oslotest import base as test_base import six import testscenarios -from oslo.utils.openstack.common import units from oslo.utils import strutils +from oslo.utils import units load_tests = testscenarios.load_tests_apply_scenarios