summaryrefslogtreecommitdiff
path: root/glance_store/driver.py
diff options
context:
space:
mode:
authorGorka Eguileor <geguileo@redhat.com>2015-02-19 13:18:53 +0100
committerGorka Eguileor <geguileo@redhat.com>2015-03-09 19:53:14 +0100
commit886f7f84191c40e3e2c34d6528502a7e57846fca (patch)
treecd5140c127917dbd7926ca0ab5d1fdecbfaa786b /glance_store/driver.py
parentc1e8697f124006ea9096c9a29613ac03a92fbc1b (diff)
downloadglance_store-886f7f84191c40e3e2c34d6528502a7e57846fca.tar.gz
Use oslo_utils.units where appropriate
Use units from oslo_utils where appropriate instead of using magic numbers. Changes from patch Ib08b8d8843b72966e2cf87f741b1cc0eea0672e5 are also included. Co-Authored-By: Gorka Eguileor <geguileo@redhat.com> Co-Authored-By: James Page <james.page@canonical.com> Change-Id: I082ea91cb06e49659495cae9072b263eccda76a1
Diffstat (limited to 'glance_store/driver.py')
-rw-r--r--glance_store/driver.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/glance_store/driver.py b/glance_store/driver.py
index c7cf3a5..cf98d1c 100644
--- a/glance_store/driver.py
+++ b/glance_store/driver.py
@@ -20,6 +20,7 @@ import logging
from oslo.config import cfg
from oslo.utils import importutils
+from oslo_utils import units
from glance_store import capabilities
from glance_store.common import utils
@@ -33,7 +34,7 @@ LOG = logging.getLogger(__name__)
class Store(capabilities.StoreCapability):
OPTIONS = None
- READ_CHUNKSIZE = 16 * (1024 * 1024) # 16M
+ READ_CHUNKSIZE = 16 * units.Mi # 16M
WRITE_CHUNKSIZE = READ_CHUNKSIZE
def __init__(self, conf):