Class: Occi::Infrastructure::Model
- Inherits:
-
Core::Model
- Object
- Core::Model
- Occi::Infrastructure::Model
- Defined in:
- lib/occi/infrastructure/model.rb
Overview
See ‘Occi::Core::Model` for details.
Direct Known Subclasses
Constant Summary
Constants included from Core::Helpers::Renderable
Core::Helpers::Renderable::RENDERER_FACTORY_CLASS
Instance Attribute Summary
Attributes inherited from Core::Model
Instance Method Summary collapse
-
#find_os_tpls ⇒ Set
Returns all mixins dependent on the base ‘os_tpl` mixin defined by OGF.
-
#find_resource_tpls ⇒ Set
Returns all mixins dependent on the base ‘resource_tpl` mixin defined by OGF.
-
#instance_builder ⇒ Occi::Infrastructure::InstanceBuilder
Returns an instance of ‘Occi::Infrastructure::InstanceBuilder` associated with this model.
-
#load_infrastructure! ⇒ Object
Loads OGF’s OCCI Infrastructure Standard from ‘Occi::Infrastructure::Warehouse`.
Methods inherited from Core::Model
#<<, #actions, #all, #associated_actions, #depended_on_mixins, #empty?, #find_by_identifier, #find_by_identifier!, #find_by_location, #find_by_schema, #find_by_term, #find_dependent, #find_related, #initialize, #kinds, #load_core!, #mixins, #parent_kinds, #remove, #valid!, #valid?
Methods included from Core::Helpers::Renderable
extended, included, #render, #renderer_factory, renderer_factory, renderer_factory_class, #renderer_for
Constructor Details
This class inherits a constructor from Occi::Core::Model
Instance Method Details
#find_os_tpls ⇒ Set
Returns all mixins dependent on the base ‘os_tpl` mixin defined by OGF.
30 31 32 |
# File 'lib/occi/infrastructure/model.rb', line 30 def find_os_tpls find_dependent Occi::Infrastructure::Mixins::OsTpl.new end |
#find_resource_tpls ⇒ Set
Returns all mixins dependent on the base ‘resource_tpl` mixin defined by OGF.
37 38 39 |
# File 'lib/occi/infrastructure/model.rb', line 37 def find_resource_tpls find_dependent Occi::Infrastructure::Mixins::ResourceTpl.new end |
#instance_builder ⇒ Occi::Infrastructure::InstanceBuilder
Returns an instance of ‘Occi::Infrastructure::InstanceBuilder` associated with this model.
23 24 25 |
# File 'lib/occi/infrastructure/model.rb', line 23 def instance_builder Occi::Infrastructure::InstanceBuilder.new(model: self) end |
#load_infrastructure! ⇒ Object
Loads OGF’s OCCI Infrastructure Standard from ‘Occi::Infrastructure::Warehouse`.
12 13 14 15 16 17 18 |
# File 'lib/occi/infrastructure/model.rb', line 12 def load_infrastructure! logger.debug 'Loading Infrastructure from Infrastructure::Warehouse' Occi::Infrastructure::Warehouse.bootstrap! self self << Occi::Infrastructure::Mixins::OsTpl.new self << Occi::Infrastructure::Mixins::ResourceTpl.new nil end |