def remove_tenant(self, tenant_id):
assert isinstance(tenant_id, basestring)
try:
LOG.debug("remove tenants {0} from flavor {1}".format(tenant_id,
str(self)))
for tenant in reversed(self.flavor_tenants):
if tenant.tenant_id == tenant_id:
self.flavor_tenants.remove(tenant)
except Exception as exception:
LOG.log_exception(
"Failed to remove tenant {0} from flavor {1}".format(
tenant_id, str(self)), exception)
raise
评论列表
文章目录