Description of problem: Can not delete read_only affinity label Version-Release number of selected component (if applicable): ovirt-engine-restapi-4.0.0.4-0.1.el7ev.noarch How reproducible: Always Steps to Reproduce: 1. Create read_only affinity label <affinity_labe> <name>test</name> <read_only>true</read_only> </affinity_label> 2. Try to delete afinity label 3. Actual results: <fault> <detail>[Cannot change read only affinity label.]</detail> <reason>Operation Failed</reason> </fault> Expected results: I believe we need to restrict only update of such affinity label, but not deletion Additional info:
I believe that this rule is part of the backend, not of the API. If a BLL.SLA component existed I would have moved the bug there.
We should actually restrict creation. Read only labels are meant to be used for internal labeling.
we should allow CRUD only for internal commands isInternalExecution()
Verified on ovirt-engine-restapi-4.0.4-0.1.el7ev.noarch POST: <affinity_label> <name>test1</name> <read_only>true</read_only> </affinity_label> Response: <fault> <detail>[Cannot change read only affinity label.]</detail> <reason>Operation Failed</reason> </fault>