Class: OvirtSDK4::StepService
- Inherits:
-
MeasurableService
- Object
- Service
- MeasurableService
- OvirtSDK4::StepService
- Defined in:
- lib/ovirtsdk4/services.rb,
lib/ovirtsdk4/services.rb
Instance Method Summary collapse
-
#end_(opts = {}) ⇒ Object
Marks an external step execution as ended.
-
#get(opts = {}) ⇒ Step
Retrieves a step.
-
#service(path) ⇒ Service
Locates the service corresponding to the given path.
-
#statistics_service ⇒ StatisticsService
Locates the
statisticsservice.
Methods inherited from Service
Instance Method Details
#end_(opts = {}) ⇒ Object
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:
POST /ovirt-engine/api/jobs/123/steps/456/end HTTP/1.1
With the following request body:
<action>
<force>true</force>
<succeeded>true</succeeded>
</action>
```xml
21673 21674 21675 |
# File 'lib/ovirtsdk4/services.rb', line 21673 def end_(opts = {}) internal_action(:end, nil, END_, opts) end |
#get(opts = {}) ⇒ Step
Retrieves a step.
GET /ovirt-engine/api/jobs/123/steps/456 HTTP/1.1
You will receive response in XML like this one:
<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>
21724 21725 21726 |
# File 'lib/ovirtsdk4/services.rb', line 21724 def get(opts = {}) internal_get(GET, opts) end |
#service(path) ⇒ Service
Locates the service corresponding to the given path.
21744 21745 21746 21747 21748 21749 21750 21751 21752 21753 21754 21755 |
# File 'lib/ovirtsdk4/services.rb', line 21744 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 ⇒ StatisticsService
Locates the statistics service.
21733 21734 21735 |
# File 'lib/ovirtsdk4/services.rb', line 21733 def statistics_service @statistics_service ||= StatisticsService.new(self, 'statistics') end |