Class: OvirtSDK4::MoveableService
- Inherits:
-
Service
- Object
- Service
- OvirtSDK4::MoveableService
- Defined in:
- lib/ovirtsdk4/services.rb,
lib/ovirtsdk4/services.rb
Instance Method Summary (collapse)
-
- (Object) move(opts = {})
Executes the
move
method. -
- (Service) service(path)
Locates the service corresponding to the given path.
-
- (String) to_s
Returns an string representation of this service.
Instance Method Details
- (Object) move(opts = {})
Executes the move
method.
12282 12283 12284 12285 12286 12287 12288 12289 12290 12291 12292 12293 12294 12295 12296 12297 12298 12299 12300 |
# File 'lib/ovirtsdk4/services.rb', line 12282 def move(opts = {}) action = Action.new(opts) writer = XmlWriter.new(nil, true) ActionWriter.write_one(action, writer) body = writer.string writer.close request = Request.new({ :method => :POST, :path => "#{@path}/move", :body => body, }) response = @connection.send(request) case response.code when 200 action = check_action(response) else check_fault(response) end end |
- (Service) service(path)
Locates the service corresponding to the given path.
12309 12310 12311 12312 12313 12314 |
# File 'lib/ovirtsdk4/services.rb', line 12309 def service(path) if path.nil? || path == '' return self end raise Error.new("The path \"#{path}\" doesn't correspond to any service") end |
- (String) to_s
Returns an string representation of this service.
12321 12322 12323 |
# File 'lib/ovirtsdk4/services.rb', line 12321 def to_s return "#<#{MoveableService}:#{@path}>" end |