Project

General

Profile

Bug #29377

Provide API endpoint for `directoryservice_clearcache`

Added by Vaibhav Chauhan over 1 year ago. Updated over 1 year ago.

Status:
Done
Priority:
Expected
Assignee:
William Grzybowski
Category:
Middleware
Target version:
Severity:
Reason for Closing:
Reason for Blocked:
Needs QA:
No
Needs Doc:
No
Needs Merging:
No
Needs Automation:
No
Support Suite Ticket:
n/a
Hardware Configuration:
ChangeLog Required:
No

Description

def directoryservice_clearcache(request):
    error = False
    errmsg = ''

    os.system(
        "(/usr/local/bin/python " 
        "/usr/local/www/freenasUI/tools/cachetool.py expire >/dev/null 2>&1 &&" 
        " /usr/local/bin/python /usr/local/www/freenasUI/tools/cachetool.py " 
        "fill >/dev/null 2>&1) &")

    return HttpResponse(json.dumps({
        'error': error,
        'errmsg': errmsg,
    }))

Related issues

Blocks FreeNAS - Bug #29157: No Rebuild Directory Service Cache button in new UIDone2018-03-06

Associated revisions

Revision fed78f1a (diff)
Added by William Grzybowski over 1 year ago

feat(middlewared/notifier): add `notifier.ds_clearcache`

Ticket: #29377

Revision 113f2382 (diff)
Added by William Grzybowski over 1 year ago

feat(gui): use middleware to run ds clear cache

Ticket: #29377

Revision e5f2d3b9 (diff)
Added by William Grzybowski over 1 year ago

fix(gui): unused import

Ticket: #29377

Revision fafd35ec (diff)
Added by William Grzybowski over 1 year ago

feat(middlewared/notifier): add `notifier.ds_clearcache`

Ticket: #29377

Revision 68e20017 (diff)
Added by William Grzybowski over 1 year ago

feat(gui): use middleware to run ds clear cache

Ticket: #29377

Revision d70dc5aa (diff)
Added by William Grzybowski over 1 year ago

fix(gui): unused import

Ticket: #29377

History

#1 Updated by Vaibhav Chauhan over 1 year ago

  • Blocks Bug #29157: No Rebuild Directory Service Cache button in new UI added

#2 Updated by John Hixson over 1 year ago

I'll check this out tomorrow, it should be easy ;-)

#3 Updated by Erin Clark over 1 year ago

  • Target version changed from 11.2-RC2 to 11.2-BETA1
  • Seen in changed from 11.2-BETA1 to Master - FreeNAS Nightlies

#4 Updated by William Grzybowski over 1 year ago

  • Assignee changed from John Hixson to William Grzybowski

#5 Updated by William Grzybowski over 1 year ago

  • Status changed from Not Started to In Progress
  • Needs QA changed from Yes to No
  • Needs Doc changed from Yes to No
  • Needs Merging changed from Yes to No

#6 Updated by William Grzybowski over 1 year ago

  • Status changed from In Progress to Done

#7 Updated by Dru Lavigne over 1 year ago

  • Subject changed from please provide api endpoint for `directoryservice_clearcache` to Provide API endpoint for `directoryservice_clearcache`

Also available in: Atom PDF