Bug 5443 - Campaign: Add accounting reader and writer
: Campaign: Add accounting reader and writer
Status: RESOLVED FIXED
: Nimbus
Campaign
: TP1.2.4
: PC Linux
: P3 enhancement
: ---
Assigned To:
:
:
:
:
  Show dependency treegraph
 
Reported: 2007-07-16 18:27 by
Modified: 2007-10-10 15:20 (History)


Attachments


Note

You need to log in before you can comment on or make changes to this bug.


Description From 2007-07-16 18:27:25
Campaign: Add accounting reader and writer

Campaign Leader: Tim Freeman

Technologies: VWS

Objective:
Add accounting support to VWS, logically separating the reading and writing
activities to allow for alternative plugins for one or both.

Benefits:
This allows clients and administrators to get usage information as well as
allows for the authorization callout to inspect previous usage when making a
decision.

Implementation details/tasks:
1) Add reader and writer plugins
2) Add default database backed implementation of each
3) Call writer at appropriate places (create/destroy)
4) Add event logging to the default implimentation, output to a file that logs
all create and destroy events with workspace ID, DN of caller, and the
requested/used duration (as appropriate)
5) Add "current reservations" logging to a file that provides a view of the
current deployments to the administrator without needing to go the DB
6) Reader plugin cannot exist without writer
7) Include charge granularity, for backends that implement reservations/pricing
by blocks of minutes rather than minute by minute (for example a certain
backend we use treats 1 to 60 minutes as 60)
------- Comment #1 From 2007-07-16 20:21:38 -------
DB table for default impl:

uuid CHAR(36) NOT NULL PRIMARY KEY,
workspaceid INT NOT NULL,
creator_dn VARCHAR(512) NOT NULL,
creation_time FLOAT NOT NULL,
requested_duration INT NOT NULL,
active SMALLINT NOT NULL,
elapsed_minutes FLOAT
------- Comment #2 From 2007-07-17 13:17:12 -------
8) if elapsed+reserved information is available, push this information to
authorization callout
------- Comment #3 From 2007-10-10 15:20:53 -------
Committed to workspace_tp_1_3_0_branch