class OvirtSDK4::StepsService
Constants
- ADD
- LIST
Public Instance Methods
Add an external step to an existing job or to an existing step.
For example, to add a step to `job` with identifier `123` send the following request:
- source
POST /ovirt-engine/api/jobs/123/steps
With the following request body:
- source,xml
<step>
<description>Validating</description> <start_time>2016-12-12T23:07:26.605+02:00</start_time> <status>started</status> <type>validating</type>
</step>
The response should look like:
- source,xml
<step href=“/ovirt-engine/api/jobs/123/steps/456” id=“456”>
<actions> <link href="/ovirt-engine/api/jobs/123/steps/456/end" rel="end"/> </actions> <description>Validating</description> <link href="/ovirt-engine/api/jobs/123/steps/456/statistics" rel="statistics"/> <external>true</external> <number>2</number> <start_time>2016-12-13T01:06:15.380+02:00</start_time> <status>started</status> <type>validating</type> <job href="/ovirt-engine/api/jobs/123" id="123"/>
</step>
@param step [Step]
Step
that will be added.@param opts [Hash] Additional options.
@option opts [Hash] :headers ({}) Additional HTTP headers.
@option opts [Hash] :query ({}) Additional URL query parameters.
@option opts [Integer] :timeout (nil) The timeout for this request, in seconds. If no value is explicitly
given then the timeout set globally for the connection will be used.
@option opts [Boolean] :wait (true) If `true` wait for the response.
@return [Step]
# File lib/ovirtsdk4/services.rb, line 22118 def add(step, opts = {}) internal_add(step, Step, ADD, opts) end
Retrieves the representation of the steps.
- source
GET /ovirt-engine/api/job/123/steps
You will receive response in XML like this one:
- source,xml
<steps>
<step href="/ovirt-engine/api/jobs/123/steps/456" id="456"> <actions> <link href="/ovirt-engine/api/jobs/123/steps/456/end" rel="end"/> </actions> <description>Validating</description> <link href="/ovirt-engine/api/jobs/123/steps/456/statistics" rel="statistics"/> <external>true</external> <number>2</number> <start_time>2016-12-13T01:06:15.380+02:00</start_time> <status>started</status> <type>validating</type> <job href="/ovirt-engine/api/jobs/123" id="123"/> </step> ...
</steps>
The order of the returned list of steps isn't guaranteed.
@param opts [Hash] Additional options.
@option opts [String] :follow Indicates which inner links should be followed. The objects referenced by these links will be fetched as part
of the current request. See <<documents/003_common_concepts/follow, here>> for details.
@option opts [Integer] :max Sets the maximum number of steps to return. If not specified all the steps are returned.
@option opts [Hash] :headers ({}) Additional HTTP headers.
@option opts [Hash] :query ({}) Additional URL query parameters.
@option opts [Integer] :timeout (nil) The timeout for this request, in seconds. If no value is explicitly
given then the timeout set globally for the connection will be used.
@option opts [Boolean] :wait (true) If `true` wait for the response.
@return [Array<Step>]
# File lib/ovirtsdk4/services.rb, line 22179 def list(opts = {}) internal_get(LIST, opts) end
Locates the service corresponding to the given path.
@param path [String] The path of the service.
@return [Service] A reference to the service.
# File lib/ovirtsdk4/services.rb, line 22201 def service(path) if path.nil? || path == '' return self end index = path.index('/') if index.nil? return step_service(path) end return step_service(path[0..(index - 1)]).service(path[(index + 1)..-1]) end
Reference to the step service.
@param id [String] The identifier of the `step`.
@return [StepService] A reference to the `step` service.
# File lib/ovirtsdk4/services.rb, line 22190 def step_service(id) StepService.new(self, id) end