# File lib/deltacloud/models/instance_profile.rb, line 27 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 36 def name id end
# File lib/deltacloud/models/instance_profile.rb, line 44 def override?(property) overrides.find { |p, v| p == property } end
# File lib/deltacloud/models/instance_profile.rb, line 48 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 40 def to_s name end