Method: Hyperkit::Client::Operations#cancel_operation

Defined in:
lib/hyperkit/client/operations.rb

#cancel_operation(uuid) ⇒ Sawyer::Resource

Cancel a running operation

Calling this will change the state of the operation to cancelling. Note that the operation must be cancelable, which can be ascertained by calling #operation and checking the may_cancel property.

Examples:

Cancel an operation

Hyperkit.cancel_operation("8b3dd0c2-9dad-4964-b00d-e21481a47fb8") => {}

Parameters:

  • uuid (String)

    UUID of the operation

Returns:

  • (Sawyer::Resource)


67
68
69
# File 'lib/hyperkit/client/operations.rb', line 67

def cancel_operation(uuid)
  delete(operation_path(uuid)).
end