Class: OvirtSDK4::FenceAgentService
- Defined in:
- lib/ovirtsdk4/services.rb,
lib/ovirtsdk4/services.rb
Instance Method Summary collapse
-
#get(opts = {}) ⇒ Agent
Gets details of this fence agent.
-
#remove(opts = {}) ⇒ Object
Removes a fence agent for a specific host.
-
#service(path) ⇒ Service
Locates the service corresponding to the given path.
-
#update(agent, opts = {}) ⇒ Agent
Update a fencing-agent.
Methods inherited from Service
Instance Method Details
#get(opts = {}) ⇒ Agent
Gets details of this fence agent.
GET /ovirt-engine/api/hosts/123/fenceagents/0
And here is sample response:
<agent id="0">
<type>apc</type>
<order>1</order>
<ip>192.168.1.101</ip>
<user>user</user>
<password>xxx</password>
<port>9</port>
<options>name1=value1, name2=value2</options>
</agent>
10370 10371 10372 |
# File 'lib/ovirtsdk4/services.rb', line 10370 def get(opts = {}) internal_get(GET, opts) end |
#remove(opts = {}) ⇒ Object
Removes a fence agent for a specific host.
DELETE /ovirt-engine/api/hosts/123/fenceagents/0
10400 10401 10402 |
# File 'lib/ovirtsdk4/services.rb', line 10400 def remove(opts = {}) internal_remove(REMOVE, opts) end |
#service(path) ⇒ Service
Locates the service corresponding to the given path.
10440 10441 10442 10443 10444 10445 |
# File 'lib/ovirtsdk4/services.rb', line 10440 def service(path) if path.nil? || path == '' return self end raise Error.new("The path \"#{path}\" doesn't correspond to any service") end |
#update(agent, opts = {}) ⇒ Agent
Update a fencing-agent.
10429 10430 10431 |
# File 'lib/ovirtsdk4/services.rb', line 10429 def update(agent, opts = {}) internal_update(agent, Agent, UPDATE, opts) end |