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 <andy.ning@windriver.com>
This commit is contained in:
Andy Ning 2018-10-17 11:32:18 -04:00 committed by Andy
parent 30355b2cc4
commit 8fec5add95
1 changed files with 2 additions and 2 deletions

View File

@ -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)