Replace 10 ** 9 with a constant units.G
TrivialFix Change-Id: Ice8acb65d57166dd4e72c7faddbbdec04c94bf7f
This commit is contained in:
parent
5c40bf9225
commit
7cfb0133d5
@ -20,6 +20,7 @@ import time
|
||||
|
||||
from lxml import etree
|
||||
from oslo_log import log as logging
|
||||
from oslo_utils import units
|
||||
import requests
|
||||
import six
|
||||
|
||||
@ -161,7 +162,7 @@ class DotHillClient(object):
|
||||
return False
|
||||
|
||||
def _get_size(self, size):
|
||||
return int(math.ceil(float(size) * 512 / (10 ** 9)))
|
||||
return int(math.ceil(float(size) * 512 / (units.G)))
|
||||
|
||||
def backend_stats(self, backend_name, backend_type):
|
||||
stats = {'free_capacity_gb': 0,
|
||||
|
Loading…
Reference in New Issue
Block a user