| from django.db.models import F, Q |
| from planetstack.config import Config |
| from observer.openstacksyncstep import OpenStackSyncStep |
| from core.models.user import User |
| from core.models.controllerusers import ControllerUser |
| from observer.steps.sync_controller_users import SyncControllerUser |
| class SyncUsers(OpenStackSyncStep): |
| def sync_record(self, user): |
| for controller_user in ControllerUser.objects.filter(user=user): |
| # bump the 'updated' field so user account are updated across |
| def delete_record(self, user): |
| controller_user_deleter = SyncControllerUser().delete_record |
| for controller_user in ControllerUser.objects.filter(user=user): |
| controller_user_deleter(controller_user) |