(Click to open topic with navigation)
A fund is a container for a time-bounded reference currency called credits for which the usage is restricted by constraints that define how the credits must be used. Much like with a bank, a fund is a repository for these resource or service credits which are added through deposits and debited through withdrawals and charges. Each fund has a set of constraints designating which entities (such as Users, Accounts, Machines, Classes, Organizations, etc.) may access the encapsulated credits or for which aspects of usage the funds are intended (QualityOfService, GeographicalArea, etc.). Fund constraints may also be negated with an exclamation point leading the constraint value.
Funds may have a name which is not necessarily unique for the fund. Funds may also have a priority which will influence the order of fund selection when charging. A default deposit amount can be set for a fund which is used when the amount is not specified for a deposit. Derived properties such as Allocated, Amount, Available, Balance, Capacity, PercentRemaining, PercentUsed, and Used can be displayed via the glsfund or gbalance command (issue glsfund --man or gbalance --man for more details). Operations include creating, querying, modifying, deleting, and resetting funds as well as making deposits, withdrawals, transfers, and balance queries. By default, a standard user may only query and view the balance for funds which pertain to them.
Credits are added to a fund via a deposit. If no amount is specified for the deposit, the fund's default deposit value is used for the deposit amount. When credits are deposited into a fund, they are associated with a time period within which they are valid. These time-bounded pools of credits are known as allocations. The initial deposit into a fund will create a new allocation having the specified or default time boundaries. A fund may be reset, causing the currently active allocation to end and creating a new allocation. Alternatively, allocations with predesignated start and end times may be created ahead of time. By using one of these methods to implement periodic allocations, it is possible to establish an allocation cycle. See the Managing allocations chapter for more information on periodic allocations as well as credit limits and infinite allocations.
Funds may be nested. Hierarchically nested funds may be useful for the delegation of management roles and responsibilities. Deposit shares may be established that assist to automate a trickle-down effect for credits deposited at higher level funds. Additionally, an optional overflow feature allows charges against lower level funds to trickle up the hierarchy.
Some fund operations (Query, Deposit, Withdraw, and Refund) allow the specification of filter options which narrow down the funds that will be acted on for that operation. There are two fund filter types that can be employed: Exclusive and NonExclusive. If an exclusive filter type is used, the query will return only the funds for which the specified filters meet all constraints for usage. Another way to think of an exclusive filter is to ask if usage were to be posted given only the specified filter options as ACLs, which funds would be eligible for charging? For example, Fund Query FilterType:=Exclusive Filter:=User=scottmo would not return a fund with the sole constraint Machine=blue because Machine=blue was not included in the filters. Not only must the filters be a non-conflicting superset of the fund constraints, but all constraint dependencies must also be satisfied (for example, an appropriate user may need to be specified with the account). If a non-exclusive filter type is used, the query will return all funds for which the filters do not specifically exclude the constraints. The query assumes that if constraints are not specified within the filters, they can be assumed as a wildcard and will return all funds that are not specifically excluded by the filter. For example, Fund Query FilterType:=NonExclusive Filter:=User=scottmo would return a fund whose only constraint was Machine=blue (because it does not conflict) but would not return a fund with the constraint User=bob (because it does conflict).