'Purge deleted rows older than a given age from cinder tables.'

@args('age_in_days', type=int, help='Purge    deleted    rows    older    than    age    in    days')
def purge(self, age_in_days):

    age_in_days = int(age_in_days)
    if (age_in_days <= 0):
        print(_('Must    supply    a    positive,    non-zero    value    for    age'))
        sys.exit(1)
    if (age_in_days >= (int(time.time()) / 86400)):
        print(_('Maximum    age    is    count    of    days    since    epoch.'))
        sys.exit(1)
    ctxt = context.get_admin_context()
    try:
        db.purge_deleted_rows(ctxt, age_in_days)
    except db_exc.DBReferenceError:
        print(_('Purge    command    failed,    check    cinder-manage    logs    for    more    details.'))
        sys.exit(1)
