instantiate sycn steps with openstack driver. Implement garbage collector and deleters
diff --git a/planetstack/observer/steps/sync_users.py b/planetstack/observer/steps/sync_users.py
index 3f509ef..aa665be 100644
--- a/planetstack/observer/steps/sync_users.py
+++ b/planetstack/observer/steps/sync_users.py
@@ -28,8 +28,9 @@
self.driver.delete_user_role(user.kuser_id, user.site.tenant_id, 'admin')
if user.public_key:
- self.init_caller(user, user.site.login_base)
- self.save_key(user.public_key, user.keyname)
- self.init_admin()
+ driver = self.driver.client_driver(caller=user, tenant=user.site.login_base)
+ key_fields = {'name': user.keyname,
+ 'public_key': user.public_key}
+ driver.create_keypair(**key_fields)
user.save()