1 import gr.grnet.aquarium.charging.{ContinuousChargingBehavior, OnOffChargingBehavior, DiscreteChargingBehavior}
2 import gr.grnet.aquarium.policy.{EffectiveUnitPrice, EffectivePriceTable, FullPriceTable, ResourceType, StdPolicy}
3 import gr.grnet.aquarium.Timespan
5 // Definition of our standard policy in plain Scala
6 // This will be dynamically interpreted during Aquarium startup
11 validityTimespan = Timespan(0),
13 ResourceType("bandwidth", "MB/Hr", DiscreteChargingBehavior),
14 ResourceType("vmtime", "Hr", OnOffChargingBehavior),
15 ResourceType("diskspace", "MB/Hr", ContinuousChargingBehavior)
17 chargingBehaviorClasses = Set(
18 DiscreteChargingBehavior.getClass.getName,
19 OnOffChargingBehavior.getClass.getName,
20 ContinuousChargingBehavior.getClass.getName
23 "default" -> FullPriceTable(Map(
24 "bandwidth" -> EffectivePriceTable(EffectiveUnitPrice(0.01, Nil) :: Nil),
25 "vmtime" -> EffectivePriceTable(EffectiveUnitPrice(0.01, Nil) :: Nil),
26 "diskspace" -> EffectivePriceTable(EffectiveUnitPrice(0.01, Nil) :: Nil)