blob: 425d4e49b12058857f702250738fc95ceecb4d6b [file] [log] [blame]
Scott Bakerb63ea792016-08-11 10:24:48 -07001import os
2import base64
3import datetime
Scott Bakerb63ea792016-08-11 10:24:48 -07004from xos.config import Config
Scott Baker8b75e852016-08-16 15:04:59 -07005from synchronizers.openstack.openstacksyncstep import OpenStackSyncStep
Scott Bakerb63ea792016-08-11 10:24:48 -07006from xos.logger import observer_logger as logger
Scott Bakeraf599eb2017-03-21 12:43:26 -07007from synchronizers.new_base.modelaccessor import *
Scott Bakerb63ea792016-08-11 10:24:48 -07008
9#class SyncRoles(OpenStackSyncStep):
10# provides=[User]
11# requested_interval=0
12# observes=User
13#
14# def fetch_pending(self, deleted):
15# if (deleted):
16# # users marked as deleted
17# return User.deleted_objects.all()
18# else:
19# # disabled users that haven't been updated in over a week
20# one_week_ago = datetime.datetime.now() - datetime.timedelta(days=7)
21# return User.objects.filter(is_active=False, updated__gt=one_week_ago)
22#
23# def sync_record(self, user):
24# user.delete()