Class: OvirtSDK4::QossService
- Defined in:
- lib/ovirtsdk4/services.rb,
lib/ovirtsdk4/services.rb
Instance Method Summary collapse
-
#add(qos, opts = {}) ⇒ Qos
Add a new QoS to the dataCenter.
-
#list(opts = {}) ⇒ Array<Qos>
Returns the list of quality of service configurations available in the data center.
-
#qos_service(id) ⇒ QosService
A reference to a service managing a specific QoS.
-
#service(path) ⇒ Service
Locates the service corresponding to the given path.
Methods inherited from Service
Instance Method Details
#add(qos, opts = {}) ⇒ Qos
Add a new QoS to the dataCenter.
POST /ovirt-engine/api/datacenters/123/qoss
The response will look as follows:
<qos href="/ovirt-engine/api/datacenters/123/qoss/123" id="123">
<name>123</name>
<description>123</description>
<max_iops>10</max_iops>
<type>storage</type>
<data_center href="/ovirt-engine/api/datacenters/123" id="123"/>
</qos>
19363 19364 19365 |
# File 'lib/ovirtsdk4/services.rb', line 19363 def add(qos, opts = {}) internal_add(qos, Qos, ADD, opts) end |
#list(opts = {}) ⇒ Array<Qos>
Returns the list of quality of service configurations available in the data center.
GET /ovirt-engine/api/datacenter/123/qoss
You will get response which will look like this:
<qoss>
<qos href="/ovirt-engine/api/datacenters/123/qoss/1" id="1">...</qos>
<qos href="/ovirt-engine/api/datacenters/123/qoss/2" id="2">...</qos>
<qos href="/ovirt-engine/api/datacenters/123/qoss/3" id="3">...</qos>
</qoss>
The returned list of quality of service configurations isn’t guaranteed.
19413 19414 19415 |
# File 'lib/ovirtsdk4/services.rb', line 19413 def list(opts = {}) internal_get(LIST, opts) end |
#qos_service(id) ⇒ QosService
A reference to a service managing a specific QoS.
19424 19425 19426 |
# File 'lib/ovirtsdk4/services.rb', line 19424 def qos_service(id) QosService.new(self, id) end |
#service(path) ⇒ Service
Locates the service corresponding to the given path.
19435 19436 19437 19438 19439 19440 19441 19442 19443 19444 |
# File 'lib/ovirtsdk4/services.rb', line 19435 def service(path) if path.nil? || path == '' return self end index = path.index('/') if index.nil? return qos_service(path) end return qos_service(path[0..(index - 1)]).service(path[(index + 1)..-1]) end |