Merge "Fixes potential bugs found by pylint"
This commit is contained in:
commit
e5a2cd8976
@ -1013,18 +1013,6 @@ def _volume_get_query(context, session=None, project_only=False):
|
||||
options(joinedload('volume_type'))
|
||||
|
||||
|
||||
@require_context
|
||||
def _ec2_volume_get_query(context, session=None, project_only=False):
|
||||
return model_query(context, models.VolumeIdMapping, session=session,
|
||||
project_only=project_only)
|
||||
|
||||
|
||||
@require_context
|
||||
def _ec2_snapshot_get_query(context, session=None, project_only=False):
|
||||
return model_query(context, models.SnapshotIdMapping, session=session,
|
||||
project_only=project_only)
|
||||
|
||||
|
||||
@require_context
|
||||
def volume_get(context, volume_id, session=None):
|
||||
result = _volume_get_query(context, session=session, project_only=True).\
|
||||
|
@ -20,6 +20,7 @@ from cinder import flags
|
||||
from cinder import utils
|
||||
from cinder.openstack.common.notifier import api as notifier_api
|
||||
from cinder.openstack.common import log as logging
|
||||
from cinder.openstack.common import timeutils
|
||||
|
||||
|
||||
FLAGS = flags.FLAGS
|
||||
@ -35,7 +36,7 @@ def notify_usage_exists(context, volume_ref, current_period=False):
|
||||
begin, end = utils.last_completed_audit_period()
|
||||
if current_period:
|
||||
audit_start = end
|
||||
audit_end = utils.utcnow()
|
||||
audit_end = timeutils.utcnow()
|
||||
else:
|
||||
audit_start = begin
|
||||
audit_end = end
|
||||
|
Loading…
x
Reference in New Issue
Block a user