Class: Nifty::Backend

Inherits:
Object
  • Object
show all
Defined in:
lib/nifty/backend.rb

Overview

Abstract class for all NIFTY backends

Author:

  • Michal Kimle

Direct Known Subclasses

Nifty::Backends::Opennebula

Class Method Summary collapse

Class Method Details

.backend?TrueClass, FalseClass

Helper method to recognize NIFTY backend

Returns:

  • (TrueClass, FalseClass)

    whether or not class is a NIFTY backend



9
10
11
# File 'lib/nifty/backend.rb', line 9

def backend?
  false
end

.create_event(event_class, appliance, transfer_method, parameters) ⇒ Nifty::Events::Event

This method is abstract.

Creates specific event for the backend

Parameters:

  • event_class (Nifty::Events::Event)

    class object representing event

  • appliance (Cloud::Appliance::Descriptor::Appliance)

    description

  • transfer_method (Nifty::TransferMethod)

    instance of transfer method used in the event

  • parameters (Hash)

    any additional parameters

Returns:



67
68
# File 'lib/nifty/backend.rb', line 67

def create_event(event_class, appliance, transfer_method, parameters)
end

.descriptionString?

This method is abstract.

Returns textual description of the backend Used in help messages.

Returns:

  • (String, nil)

    textual description of the backend



18
19
20
# File 'lib/nifty/backend.rb', line 18

def description
  nil
end

.migrate(parameters) ⇒ Object

Prepares backend for integration with NIFTY

Parameters:

  • parameters (Hash)

    to help the migration



56
57
# File 'lib/nifty/backend.rb', line 56

def migrate(parameters)
end

.migrate_optionsHash?

This method is abstract.

Returns hash from which new CLI command for backend is constructed

Returns:

  • (Hash, nil)

    hash from which new CLI command for backend is constructed



34
35
36
# File 'lib/nifty/backend.rb', line 34

def migrate_options
  nil
end

.optionsHash?

This method is abstract.

Returns hash from which new CLI command for backend is constructed

Returns:

  • (Hash, nil)

    hash from which new CLI command for backend is constructed



26
27
28
# File 'lib/nifty/backend.rb', line 26

def options
  nil
end

.post(parameters) ⇒ Object

This method is abstract.

Routine run after all the events are processed

Parameters:

  • parameters (Hash)

    to run post method with



49
50
# File 'lib/nifty/backend.rb', line 49

def post(parameters)
end

.pre(parameters) ⇒ Object

This method is abstract.

Routine run before any events are processed

Parameters:

  • parameters (Hash)

    to run pre method with



42
43
# File 'lib/nifty/backend.rb', line 42

def pre(parameters)
end