浏览代码

Ignore Not Found when deleting Keystone role assignment

If the project has already been deleted, don't let that prevent role
assignments on it from being deleted.

Change-Id: I56aede8209e425ee6c2d762a44db8cda5416e69b
Task: 30955
tags/13.0.0.0rc1
Zane Bitter 11 个月前
父节点
当前提交
8c67437378
共有 1 个文件被更改,包括 4 次插入2 次删除
  1. +4
    -2
      heat/engine/resources/openstack/keystone/role_assignments.py

+ 4
- 2
heat/engine/resources/openstack/keystone/role_assignments.py 查看文件

@@ -397,7 +397,8 @@ class KeystoneUserRoleAssignment(resource.Resource,
self.update_assignment(user_id=self.user_id, prop_diff=prop_diff)

def handle_delete(self):
self.delete_assignment(user_id=self.user_id)
with self.client_plugin().ignore_not_found:
self.delete_assignment(user_id=self.user_id)

def validate(self):
super(KeystoneUserRoleAssignment, self).validate()
@@ -455,7 +456,8 @@ class KeystoneGroupRoleAssignment(resource.Resource,
self.update_assignment(group_id=self.group_id, prop_diff=prop_diff)

def handle_delete(self):
self.delete_assignment(group_id=self.group_id)
with self.client_plugin().ignore_not_found:
self.delete_assignment(group_id=self.group_id)

def validate(self):
super(KeystoneGroupRoleAssignment, self).validate()


正在加载...
取消
保存