Class: Miasma::Models::Orchestration

Inherits:
Types::Api show all
Defined in:
lib/miasma/models/orchestration.rb,
lib/miasma/models/orchestration/event.rb,
lib/miasma/models/orchestration/stack.rb,
lib/miasma/models/orchestration/stacks.rb,
lib/miasma/models/orchestration/events.rb,
lib/miasma/models/orchestration/resource.rb,
lib/miasma/models/orchestration/resources.rb

Overview

Abstract orchestration API

Defined Under Namespace

Classes: Stack, Stacks

Constant Summary

RESOURCE_MAPPING =

Returns mapping of remote type to internal type

Returns:

  • (Smash)

    mapping of remote type to internal type

Smash.new
VALID_RESOURCE_STATES =

Returns valid resource states

Returns:

  • (Array<Symbol>)

    valid resource states

[:create_complete, :create_in_progress, :create_failed,
  :delete_complete, :delete_in_progress, :delete_failed,
  :rollback_complete, :rollback_in_progress, :rollback_failed,
  :update_complete, :update_in_progress, :update_failed,
  :update_rollback_complete, :update_rollback_in_progress, :update_rollback_failed
]

Instance Method Summary (collapse)

Constructor Details

This class inherits a constructor from Miasma::Types::Api

Instance Method Details

- (Array<Models::Orchestration::Stack::Event>) event_all(stack)

Return all events for stack

Parameters:

Returns:

Raises:

  • (NotImplementedError)


105
106
107
# File 'lib/miasma/models/orchestration.rb', line 105

def event_all(stack)
  raise NotImplementedError
end

- (Array<Models::Orchestration::Stack::Event>) event_all_new(events)

Return all new events for event collection

Parameters:

Returns:

Raises:

  • (NotImplementedError)


113
114
115
# File 'lib/miasma/models/orchestration.rb', line 113

def event_all_new(events)
  raise NotImplementedError
end

- (Models::Orchestration::Event) event_reload(event)

Reload the stack event data from the API

Parameters:

Returns:

  • (Models::Orchestration::Event)

Raises:

  • (NotImplementedError)


121
122
123
# File 'lib/miasma/models/orchestration.rb', line 121

def event_reload(event)
  raise NotImplementedError
end

- (Array<Models::Orchestration::Stack::Resource>) resource_all(stack)

Return all resources for stack

Parameters:

Returns:

Raises:

  • (NotImplementedError)


89
90
91
# File 'lib/miasma/models/orchestration.rb', line 89

def resource_all(stack)
  raise NotImplementedError
end

- (Models::Orchestration::Resource) resource_reload(resource)

Reload the stack resource data from the API

Parameters:

Returns:

  • (Models::Orchestration::Resource)

Raises:

  • (NotImplementedError)


97
98
99
# File 'lib/miasma/models/orchestration.rb', line 97

def resource_reload(resource)
  raise NotImplementedError
end

- (Array<Models::Orchestration::Stack>) stack_all(options = {})

Return all stacks

Parameters:

  • options (Hash) (defaults to: {})

    filter

Returns:

Raises:

  • (NotImplementedError)


65
66
67
# File 'lib/miasma/models/orchestration.rb', line 65

def stack_all(options={})
  raise NotImplementedError
end

- (TrueClass, FalseClass) stack_destroy(stack)

Delete the stack

Parameters:

Returns:

  • (TrueClass, FalseClass)

Raises:

  • (NotImplementedError)


57
58
59
# File 'lib/miasma/models/orchestration.rb', line 57

def stack_destroy(stack)
  raise NotImplementedError
end

- (Models::Orchestration::Stack) stack_reload(stack)

Reload the stack data from the API

Parameters:

Returns:

Raises:

  • (NotImplementedError)


49
50
51
# File 'lib/miasma/models/orchestration.rb', line 49

def stack_reload(stack)
  raise NotImplementedError
end

- (Models::Orchestration::Stack) stack_save(stack)

Save the stack

Parameters:

Returns:

Raises:

  • (NotImplementedError)


41
42
43
# File 'lib/miasma/models/orchestration.rb', line 41

def stack_save(stack)
  raise NotImplementedError
end

- (Smash) stack_template_load(stack)

Fetch stack template

Parameters:

Returns:

  • (Smash)

    stack template

Raises:

  • (NotImplementedError)


73
74
75
# File 'lib/miasma/models/orchestration.rb', line 73

def stack_template_load(stack)
  raise NotImplementedError
end

- (NilClass, String) stack_template_validate(stack)

Validate stack template

Parameters:

Returns:

  • (NilClass, String)

    nil if valid, string error message if invalid

Raises:

  • (NotImplementedError)


81
82
83
# File 'lib/miasma/models/orchestration.rb', line 81

def stack_template_validate(stack)
  raise NotImplementedError
end

- (Types::Collection<Models::Orchestration::Stack>) stacks(args = {})

Orchestration stacks

Parameters:

  • filter (Hash)

    filtering options

Returns:



31
32
33
34
35
# File 'lib/miasma/models/orchestration.rb', line 31

def stacks(args={})
  memoize(:stacks) do
    Stacks.new(self)
  end
end