
From: ShaoHe Feng <shaohef@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/ticket/ \ -X PUT -d '{"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/ticket/ Signed-off-by: ShaoHe Feng <shaohef@linux.vnet.ibm.com> --- docs/API.md | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/docs/API.md b/docs/API.md index 1a228df..5256f26 100644 --- a/docs/API.md +++ b/docs/API.md @@ -247,6 +247,26 @@ A interface represents available network interface on VM. *No actions defined* +### Sub-Resource: Virtual Machine Ticket + +**URI:** /vms/*:name*/ticket + +A ticket represents credentials to access VM. + +**Methods:** + +* **GET**: get the ticket of a VM + * password: the password of the ticket. One with the password can access a VM. + +* **PUT**: update the parameters of a VM ticket. + * password *(optional)*: the password of a ticket. + * expire *(optional)*: lifetime of a ticket. + +**Actions (POST):** + +*No actions defined* + + ### Resource: Template **URI:** /templates/*:name* -- 1.9.3