class Occi::InfrastructureExt::Model

See `Occi::Infrastructure::Model` for details.

@author Boris Parak <parak@cesnet.cz>

Public Instance Methods

find_availability_zones() click to toggle source

Returns all mixins dependent on the base `availability_zone` mixin defined by OGF.

@return [Set] set of mixins dependent on `availability_zone`

# File lib/occi/infrastructure_ext/model.rb, line 31
def find_availability_zones
  find_dependent Occi::InfrastructureExt::Mixins::AvailabilityZone.new
end
find_floatingippools() click to toggle source

Returns all mixins dependent on the base `floatingippool` mixin defined by OGF.

@return [Set] set of mixins dependent on `floatingippool`

# File lib/occi/infrastructure_ext/model.rb, line 45
def find_floatingippools
  find_dependent Occi::InfrastructureExt::Mixins::Floatingippool.new
end
find_regions() click to toggle source

Returns all mixins dependent on the base `region` mixin defined by OGF.

@return [Set] set of mixins dependent on `region`

# File lib/occi/infrastructure_ext/model.rb, line 38
def find_regions
  find_dependent Occi::InfrastructureExt::Mixins::Region.new
end
instance_builder() click to toggle source

Returns an instance of `Occi::InfrastructureExt::InstanceBuilder` associated with this model.

@return [Occi::InfrastructureExt::InstanceBuilder] instance of IB

# File lib/occi/infrastructure_ext/model.rb, line 24
def instance_builder
  Occi::InfrastructureExt::InstanceBuilder.new(model: self)
end
load_infrastructure_ext!() click to toggle source

Loads OGF's OCCI Infrastructure Ext Standard from `Occi::InfrastructureExt::Warehouse`.

@example

model = Occi::InfrastructureExt::Model.new
model.load_infrastructure_ext!
# File lib/occi/infrastructure_ext/model.rb, line 12
def load_infrastructure_ext!
  logger.debug 'Loading InfrastructureExt from InfrastructureExt::Warehouse'
  Occi::InfrastructureExt::Warehouse.bootstrap! self
  self << Occi::InfrastructureExt::Mixins::AvailabilityZone.new
  self << Occi::InfrastructureExt::Mixins::Region.new
  self << Occi::InfrastructureExt::Mixins::Floatingippool.new
  nil
end