class OvirtSDK4::StepService

Constants

END_
GET

Public Instance Methods

end_(opts = {}) click to toggle source

Marks an external step execution as ended.

For example, to terminate a step with identifier `456` which belongs to a `job` with identifier `123` send the following request:

source

POST /ovirt-engine/api/jobs/123/steps/456/end


With the following request body:

source,xml

<action>

<force>true</force>
<succeeded>true</succeeded>

</action>


@param opts [Hash] Additional options.

@option opts [Boolean] :async Indicates if the action should be performed asynchronously.

@option opts [Boolean] :force Indicates if the step should be forcibly terminated.

@option opts [Boolean] :succeeded Indicates if the step should be marked as successfully finished or as failed.

This parameter is optional, and the default value is `true`.

@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.

# File lib/ovirtsdk4/services.rb, line 21966
def end_(opts = {})
  internal_action(:end, nil, END_, opts)
end
get(opts = {}) click to toggle source

Retrieves a step.

source

GET /ovirt-engine/api/jobs/123/steps/456


You will receive response in XML like this one:

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>
<end_time>2016-12-12T23:07:26.627+02:00</end_time>
<external>false</external>
<number>0</number>
<start_time>2016-12-12T23:07:26.605+02:00</start_time>
<status>finished</status>
<type>validating</type>
<job href="/ovirt-engine/api/jobs/123" id="123"/>

</step>


@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 [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 22019
def get(opts = {})
  internal_get(GET, opts)
end
service(path) click to toggle source

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 22039
def service(path)
  if path.nil? || path == ''
    return self
  end
  if path == 'statistics'
    return statistics_service
  end
  if path.start_with?('statistics/')
    return statistics_service.service(path[11..-1])
  end
  raise Error.new("The path \"#{path}\" doesn't correspond to any service")
end
statistics_service() click to toggle source

Locates the `statistics` service.

@return [StatisticsService] A reference to `statistics` service.

# File lib/ovirtsdk4/services.rb, line 22028
def statistics_service
  @statistics_service ||= StatisticsService.new(self, 'statistics')
end