Bug 1346250 - Can not delete read_only affinity label
Summary: Can not delete read_only affinity label
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: ovirt-engine
Classification: oVirt
Component: Backend.Core
Version: 4.0.0
Hardware: x86_64
OS: Linux
unspecified
high
Target Milestone: ovirt-4.0.4
: 4.0.4
Assignee: Andrej Krejcir
QA Contact: Artyom
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2016-06-14 11:15 UTC by Artyom
Modified: 2016-09-26 12:39 UTC (History)
8 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2016-09-26 12:39:18 UTC
oVirt Team: SLA
Embargoed:
rule-engine: ovirt-4.0.z+
rule-engine: ovirt-4.1+
mgoldboi: planning_ack+
rgolan: devel_ack+
mavital: testing_ack+


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
oVirt gerrit 59640 0 master MERGED core: Only internal commands can manipulate read-only labels 2016-08-18 08:23:51 UTC
oVirt gerrit 62725 0 ovirt-engine-4.0 MERGED core: Only internal commands can manipulate read-only labels 2016-08-23 17:18:22 UTC

Description Artyom 2016-06-14 11:15:22 UTC
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:

Comment 1 Juan Hernández 2016-06-14 16:02:14 UTC
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.

Comment 2 Martin Sivák 2016-06-15 07:52:35 UTC
We should actually restrict creation. Read only labels are meant to be used for internal labeling.

Comment 3 Roy Golan 2016-06-15 08:48:40 UTC
we should allow CRUD only for internal commands isInternalExecution()

Comment 4 Artyom 2016-09-05 12:30:58 UTC
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>


Note You need to log in before you can comment on or make changes to this bug.