1 import gr.grnet.aquarium.charging.{OnceChargingBehavior, 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
12 validityTimespan = Timespan(0),
15 ResourceType("bandwidth", "MB/Hr", DiscreteChargingBehavior),
16 ResourceType("vmtime", "Hr", OnOffChargingBehavior),
17 ResourceType("diskspace", "MB/Hr", ContinuousChargingBehavior)
20 chargingBehaviorClasses = Set(
21 DiscreteChargingBehavior.getClass.getName,
22 OnOffChargingBehavior.getClass.getName,
23 ContinuousChargingBehavior.getClass.getName,
24 OnceChargingBehavior.getClass.getName
28 "default" -> FullPriceTable(Map(
29 "bandwidth" -> EffectivePriceTable(EffectiveUnitPrice(0.01, None) :: Nil),
30 "vmtime" -> EffectivePriceTable(EffectiveUnitPrice(0.01, None) :: Nil),
31 "diskspace" -> EffectivePriceTable(EffectiveUnitPrice(0.01, None) :: Nil)