Class: Occi::Core::Warehouse

Inherits:
Object
  • Object
show all
Includes:
Yell::Loggable
Defined in:
lib/occi/core/warehouse.rb

Overview

Base loader for static categories defined in the OCCI Core Standard published by OGF's OCCI WG. This warehouse is meant to be used as a quick bootstrap tools for `Occi::Core::Model` instances.

Author:

Direct Known Subclasses

Infrastructure::Warehouse

Constant Summary collapse

BASE =

YAML DIR constants

'warehouse'.freeze
KINDS =
'kinds'.freeze
ACTIONS =
'actions'.freeze
MIXINS =
'mixins'.freeze
ATTRIBS =
'attributes'.freeze
FILE_SUFFIX =

YAML file pattern

'.yml'.freeze
YAML_GLOB =
"*#{FILE_SUFFIX}".freeze

Class Method Summary collapse

Class Method Details

.bootstrap!(model) ⇒ Object

Bootstraps the given model instance with pre-defined category instances.

Examples:

model = Occi::Core::Model.new
Occi::Core::Warehouse.bootstrap! model

Parameters:


31
32
33
34
35
36
37
# File 'lib/occi/core/warehouse.rb', line 31

def bootstrap!(model)
  logger.debug "Bootstrapping#{model.empty? ? ' empty' : ''} model"
  actions! model
  kinds! model
  mixins! model
  nil # TODO: return something sensible
end