Scott Baker | b63ea79 | 2016-08-11 10:24:48 -0700 | [diff] [blame] | 1 | import os |
| 2 | import base64 |
| 3 | import datetime |
Scott Baker | b63ea79 | 2016-08-11 10:24:48 -0700 | [diff] [blame] | 4 | from xos.config import Config |
Scott Baker | 8b75e85 | 2016-08-16 15:04:59 -0700 | [diff] [blame] | 5 | from synchronizers.openstack.openstacksyncstep import OpenStackSyncStep |
Scott Baker | b63ea79 | 2016-08-11 10:24:48 -0700 | [diff] [blame] | 6 | from xos.logger import observer_logger as logger |
Scott Baker | af599eb | 2017-03-21 12:43:26 -0700 | [diff] [blame] | 7 | from synchronizers.new_base.modelaccessor import * |
Scott Baker | b63ea79 | 2016-08-11 10:24:48 -0700 | [diff] [blame] | 8 | |
| 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() |