package albatross
Install
dune-project
Dependency
Authors
Maintainers
Sources
sha256=fd235fedabdbc7b7523bfc3afab2b878dd862314b52fcc80604076a2cff9eb2b
sha512=86939f0e444f49ed52398efeef8d5382a66b8529d084c22b83cd5c2bc860b2df0d9827093f96ed9bde4d586694dd758d9fb0e6800aedcd761f244c55a6a549f3
doc/albatross/Vmm_resources/index.html
Module Vmm_resourcesSource
A tree data structure including policies and dynamic usage.
Considering delegation of resources to someone, and further delegation to others - using a process which is not controlled by the authority - requires runtime tracking of these delegations and the actual usage:
If Alice may create 2 virtual machines, and she delegates the same capability further to both Bob and Charlie, the authority must still enforce that Alice, Bob, and Charlie are able to run 2 virtual machines in total, rather than 2 each.
type t = private {policies : Vmm_core.Policy.t Vmm_trie.t;block_devices : (int * bool) Vmm_trie.t;unikernels : Vmm_core.Unikernel.t Vmm_trie.t;
}The type of the resource tree.
find_vm t id is either Some vm or None.
find_policy t Name.t is either Some policy or None.
find_block t Name.t is either Some (size, active) or None.
val check_vm :
t ->
Vmm_core.Name.t ->
Vmm_core.Unikernel.config ->
(unit, [> `Msg of string ]) resultcheck_vm t Name.t vm checks whether vm under Name.t in t would be allowed under the current policies.
insert_vm t Name.t vm inserts vm under Name.t in t, and returns the new t. The caller has to ensure (using check_vm) that a VM with the same name does not yet exist, and the block device is not in use.
val insert_policy :
t ->
Vmm_core.Name.t ->
Vmm_core.Policy.t ->
(t, [> `Msg of string ]) resultinsert_policy t Name.t policy inserts policy under Name.t in t, and returns the new t or an error.
check_block t Name.t size checks whether size under Name.t in t would be allowed under the current policies.
insert_block t Name.t size inserts size under Name.t in t, and returns the new t or an error.
remove_vm t Name.t removes vm Name.t from t.
remove_policy t Name.t removes policy Name.t from t.
remove_block t Name.t removes block Name.t from t.