BaseModel
Model to store the hardware profile applied to an instance together with any instance-specific overrides
# File lib/deltacloud/models/instance_profile.rb, line 26 def initialize(hwp_name, args = {}) opts = args.inject({ :id => hwp_name.to_s }) do |m, e| k, v = e m[$1] = v if k.to_s =~ /^hwp_(.*)$/ m end super(opts) end
# File lib/deltacloud/models/instance_profile.rb, line 35 def name id end
# File lib/deltacloud/models/instance_profile.rb, line 43 def overrides [:memory, :storage, :architecture, :cpu].inject({}) do |h, p| if v = instance_variable_get("@#{p}") h[p] = v end h end end
# File lib/deltacloud/models/instance_profile.rb, line 39 def to_s name end
[Validate]
Generated with the Darkfish Rdoc Generator 2.