Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.

Bug 988082

Summary: [ExternalTasks] Cannot add sub-step under existing (parent) step
Product: [Retired] oVirt Reporter: Vojtech Szocs <vszocs>
Component: ovirt-engine-coreAssignee: Eli Mesika <emesika>
Status: CLOSED CURRENTRELEASE QA Contact:
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 3.3CC: acathrow, emesika, iheim, yzaslavs
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard: infra
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2013-09-23 07:28:05 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Vojtech Szocs 2013-07-24 17:10:46 UTC
Assume JOB_ID is ID of existing job.
Assume STEP_ID is ID of existing step that belongs to above mentioned job.

When adding new sub-step, parent step ID should be specified by the client.

(1) POST /api/jobs/JOB_ID/steps/
<step>
  <parent_step id="STEP_ID" />
  <description>Test Sub-Step</description>
  <type>EXECUTING</type>
  <status>
    <state>STARTED</state>
  </status>
</step>

(1) POST response = fault
<fault>
    <reason>Incomplete parameters</reason>
    <detail>Step [step.parentStep.id] required for add</detail>
</fault>

(2) POST /api/jobs/JOB_ID/steps/
<step>
  <parentStep id="STEP_ID" />
  <description>Test Sub-Step</description>
  <type>EXECUTING</type>
  <status>
    <state>STARTED</state>
  </status>
</step>

(2) POST response = step created but doesn't mention parent step ID so it's not really a sub-step
<step href="/api/jobs/JOB_ID/steps/NEW_STEP_ID" id="NEW_STEP_ID">
    <actions>
        <link href="/api/jobs/JOB_ID/steps/NEW_STEP_ID/end" rel="end"/>
    </actions>
    <description>Test Sub-Step</description>
    <job href="/api/jobs/JOB_ID" id="JOB_ID"/>
    <type>executing</type>
    <number>0</number>
    <status>
        <state>STARTED</state>
    </status>
    <start_time>2013-07-24T16:42:00.636+02:00</start_time>
    <external>true</external>
</step>

(3) POST /api/jobs/JOB_ID/steps/
<step>
  <parentStep>
    <id>STEP_ID</id>
  </parentStep>
  <description>Test Sub-Step</description>
  <type>EXECUTING</type>
  <status>
    <state>STARTED</state>
  </status>
</step>

(3) POST response = same as (2)

Please advise on what is the proper way to add new sub-step under existing step, as I'm not sure if this is implementation or API issue.

Comment 1 Eli Mesika 2013-07-30 14:00:41 UTC
Coorect format is 

<parent_step id="STEP_ID" />

Comment 2 Eli Mesika 2013-08-04 15:18:14 UTC
fixed in commit : 35a3ef3

Comment 3 Itamar Heim 2013-08-21 16:43:21 UTC
as RC is built, moving to ON_QA (hopefully did not catch incorrect bugs when doing this)

Comment 4 Itamar Heim 2013-09-23 07:28:05 UTC
closing as this should be in 3.3 (doing so in bulk, so may be incorrect)