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).\
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
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