Add bandwidth simulator
Merge branch '1852_billing_period_calc'
Inline a couple of utility methods
Ignoring non-billable events
Fix and augment logger
Special data structure for implicit OFF events
Cleanup resource event
Add map-related utility methods
Oh, I like contextual loggers.
Really handy when debugging.
Fix a bug in date fortmatting
Termination condition for billing month calculation
Augment date calculator
Rework data snapshots. Add one more to user state
Start the real deal
Just reload policies from the store, instead of attempting to reconstruct state
New method for retrieving a policy by its id
Support for setting a custom configurator for unit testing
Absolute before/after methods
Read configuration values from the cmd-line
Switch to using Long.MaxValue to denote open timeframes
Don't use -1 in the to field to denote open timeframesas it requires special treatment in various places andis semantically ambiguous.
Pruning stuff from user state
Factoring out common code
Construct and return a policy entry
Conform to the specification, return results sorted
Add some debugging beautification
Make UID generators for simulations more flexible
Better implement one query on resource event store
Add minute calculations to date calculator
Add time calculation helper to resource event
Minor api addition to date calc (+scaladocs)
Use copy() for mutable date calcs
Better names for mutable date calc methods
Fix a bug with mutable state.
Although DateCalculator is mutable, I was using it as an immutable.
Shut up a few compiler warnings
Enriching the test case
Add support for custom date formats in DateCalculator
Augment and use resources map functionality
Introduce a handy map of resources
Use basic rc context for policy loading.
Also try to refactor a bit in order to handle a few bugs (wip).
Factor out basic resource context
Add more simulation methods and enrich the test case
Cannot load the policy file from the test env though...
Retrieve a beautiful resource event value representation
Add a simulations package
This will be handy when creating test cases for the new billing code.
MemStore is a provider of itself
For simplicity, obviously.
Merge branch 'master' into 1852_billing_period_calc
Rename the mem store
Override configurator's store provider
It is better to use this new method before asking for anything from theconfigurator.
E.g.
val mc = Configurator.MasterConfigurator.withStoreProviderClass(classOf[MemStoreProvider])
Conflicts: src/main/scala/gr/grnet/aquarium/user/UserDataSnapshot.scala src/main/scala/gr/grnet/aquarium/user/UserStateComputations.scala src/main/scala/gr/grnet/aquarium/user/actor/UserActor.scala
Implement mem-based resource event store
A few changes so that everything compiles
In memory store for tests, change property files search to /etc/aquarium
Implementation of the UserEventStore interface in the in memory store
Implement mem-based wallet store
Implementation of the policy store interface
Empty implementations for all store interefaces
Mostly atomic update of policies, Docs++
Fix code assuming that a list always has a tail
Calculating resource instance amounts
Update available policies when on configuration file update
Wrapper for stored DSLPolicy YAML dumps
License headers
Logic to load/store policies from Policy store
Conflicts: src/main/scala/gr/grnet/aquarium/user/UserDataSnapshot.scala
[Does not compile] Clearing up some misunderstanding with amounts
User agreement history in user store
API methods for policies
Implement custom Policy entry and policy storage ops
COntinue with billing code and start cleaning up user actor
Conflicts: src/main/scala/gr/grnet/aquarium/logic/accounting/dsl/DSL.scala src/main/scala/gr/grnet/aquarium/logic/accounting/dsl/DSLAgreement.scala src/main/scala/gr/grnet/aquarium/logic/accounting/dsl/DSLCostPolicy.scala...
Fix all serialization to YAML issues
Work in progress... Still in flux
toMap() method for remaining DSL classes.
Also, immutable map generation for all classes
Method to parse YAML from a String
One fact in one place commit
Basic support for serializing policies to YAML
Prune unused functionality.
Some new billing stuff.
Also using doubles everywhere instead of floats
Support policy retrieval for a date
Policy store operations
Json support
Stylistic change
Cleanup some code before the coming changes
Avoid a compilation warning (-deprecation)
Doc cleanup in user actor
Gather billing computations in one file
Use receivedMillis for queries
Since Aquarium is the billing master, a billing period is defined in billing time.So we use receivedMillis (aquarium time) and not occurredMillis (the event occurrence time).This way we can easily make bills for past events and do not care when they will actually arrive.
Use wallet-specific json field names
Do some effectful composition instead of try/catch
WIP #1852 Periodic billing calculation
Change equals to ==
Merge stuff from benchmark branch
Alternative way to calculate state, with entry points commented out
Query to retrieve all events that comprise the history of an event
Names for event store fields
Configurable number of users to init (up to 1000)