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 = timeutils.utcnow()
 else:
  audit_start = begin
  audit_end = end
 extra_usage_info = dict(audit_period_beginning=str(audit_start), audit_period_ending=str(audit_end))
 notify_about_volume_usage(context, volume_ref, 'exists', extra_usage_info=extra_usage_info)

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 = timeutils . utcnow ( ) else : audit_start = begin audit_end = end extra_usage_info = dict ( audit_period_beginning = str ( audit_start ) , audit_period_ending = str ( audit_end ) ) notify_about_volume_usage ( context , volume_ref , 'exists' , extra_usage_info = extra_usage_info )
generates exists notification for an instance for usage auditing purposes .