From: ShaoHe Feng <shaohef(a)linux.vnet.ibm.com>
A ticket is the credential to access VM.
Only who get the ticket can access a VM.
test this patch set:
set the ticket
$ sudo curl -k -u <user>:<password> -H "Content-Type:
application/json" -H \
"Accept: application/json"
https://localhost:8001/vms/test-vm-8/ \
-X PUT -d '{"ticket": {"passwd": "abcd"}}'
get the ticket
$ sudo curl -k -u <user>:<password> -H "Content-Type:
application/json" -H \
"Accept: application/json"
https://localhost:8001/vms/test-vm-8/
Signed-off-by: ShaoHe Feng <shaohef(a)linux.vnet.ibm.com>
---
docs/API.md | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/docs/API.md b/docs/API.md
index 1a228df..aebf563 100644
--- a/docs/API.md
+++ b/docs/API.md
@@ -94,6 +94,9 @@ the following general conventions:
* port: The real port number of the graphics, vnc or spice. Users
can use this port to connect to the vm with general vnc/spice
clients.
+ * ticket: A ticket represents credentials to access VM.
+ * password: the password of a ticket.
+ * expire: lifetime of a ticket.
* users: A list of system users who have permission to access the VM.
Default is: empty (i.e. only root-users may access).
* groups: A list of system groups whose users have permission to access
@@ -107,6 +110,10 @@ the following general conventions:
will take effect in next reboot)
* memory: New amount of memory (MB) for this VM (if VM is running, new
value will take effect in next reboot)
+ * ticket: A ticket represents credentials to access VM.
+ * password *(optional)*: the password of a ticket.
+ * expire *(optional)*: lifetime of a ticket.
+
* **POST**: *See Virtual Machine Actions*
**Actions (POST):**
--
1.9.3