-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathPROTOCOL
More file actions
78 lines (59 loc) · 3.18 KB
/
Copy pathPROTOCOL
File metadata and controls
78 lines (59 loc) · 3.18 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
THIS FILE IS A WORK IN PROGRESS.
In this file, we will try to formalise the protocol (over JSON) used to make
PHP and JavaScript communicate (for now only from PHP to JS).
The root element is an object which (may) has the following entries.
Always:
=======
- error_code: Used to indicate if and what error occured. Possible values:
- 0: no error
- 1: unknown error
- error_message: If error_code is different from 0, this value contains a
message describing the error which can be display to the user.
"login" or "logout":
====================
- user: When the current user changes, this entry is present and contains the
name of the new current user. When the user is not logged in, the current user
is "guest".
"dom0s":
========
- dom0s: An array containing all the Dom0s the user is able to see.
- dom0s[i]: An object describing a Dom0.
- id: A unique identifier for this Dom0.
- address: The full address of this Dom0 (name/IP ':' port).
- ro: A boolean which indicates if this dom0 whether read-only (the user cannot
migrate a vm to it.
- domUs: An array containing all the DomUs belonging to this Dom0 the user is
able to see.
- dom0s[i].domUs[j]: An object describing a DomU.
- cpus: An array containing the utilisation level in percentage of the CPUs.
- id: Unique identifier of the DomU.
- name: The name of the DomU.
- ro: A boolean which indicates whether this domU is read-only.
- state: The current power state (Running, Halted, Paused).
"domU":
=======
- domU: An object describing the requested DomU.
- cpus: An array containing the utilisation level in percentage of the CPUs.
- weight: A domain with a weight of 512 will get twice as much CPU as a domain with a weight
of 256 on a contended host. Legal weights range from 1 to 65535 and the default is 256
- cap: The cap optionally fixes the maximum amount of CPU a domain will be able to consume,
even if the host system has idle CPU cycles. The cap is expressed in percentage of one
physical CPU: 100 is 1 physical CPU, 50 is half a CPU, 400 is 4 CPUs, etc.
The default, 0, means there is no upper cap.
- d_min_ram: Dynamic Minimum RAM : how many min RAM the system can have while running
- d_max_ram: Dynamic Max RAM : how many max RAM the system can have while running
- s_min_ram: Static Min RAM : how many min RAM the system can have at startup
- s_max_ram: Static Max RAM : how many max RAM the system can have at startup
- dom0_id: The identifier of the Dom0 this DomU belongs to.
- id: Unique identifier of the DomU.
- kernel: The path to the kernel.
- name: The name of the DomU.
- on_crash: Action to do after the DomU crashes.
- on_reboot: Action to do after the DomU reboots.
- on_shutdown: Action to do after the DomU shutdowns.
- ro: A boolean which indicates whether this domU is read-only.
- state: The current power state (Running, Halted, Paused).
- start_time: Timestamp which indicates when the DomU started.
- on_reboot: behavior of a DomU after a reboot (can be destroy/restart/preserve)
- on_shutdown: behavior of a DomU after a shutdown (can be destroy/restart/preserve)
- on_crash: behavior of a DomU after a crash (can be destroy/restart/preserve)