From 8fec5add95fa8b406ff8d7fbf1466a0c29697856 Mon Sep 17 00:00:00 2001 From: Andy Ning Date: Wed, 17 Oct 2018 11:32:18 -0400 Subject: [PATCH] Fix role synchronization in distributed cloud There is a typo error in role deletion that prevents deleting the role in subcloud during role synchronization. This update fixed this typo error and made role synchronization work. Closes-Bug: 1797960 Change-Id: Iff78ceffdd95b2676854d986126c6c2d001866de Signed-off-by: Andy Ning --- dcorch/engine/sync_services/identity.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/dcorch/engine/sync_services/identity.py b/dcorch/engine/sync_services/identity.py index e4a6ff850..6658b7eb7 100644 --- a/dcorch/engine/sync_services/identity.py +++ b/dcorch/engine/sync_services/identity.py @@ -479,10 +479,10 @@ class IdentitySyncThread(SyncThread): original_role_ref = RoleReferenceWrapper(id=role_id) # Delete the role in the subcloud - self.sc_ks_client.projects.delete(original_role_ref) + self.sc_ks_client.roles.delete(original_role_ref) # Master Resource can be deleted only when all subcloud resources # are deleted along with corresponding orch_job and orch_requests. - LOG.info("Keystone project {}:{} [{}] deleted" + LOG.info("Keystone role {}:{} [{}] deleted" .format(rsrc.id, role_subcloud_rsrc.id, role_subcloud_rsrc.subcloud_resource_id), extra=self.log_extra)