[Kimchi-devel] [PATCH V2 0/5] vm ticket in backend
Royce Lv
lvroyce at linux.vnet.ibm.com
Thu Jul 17 10:27:59 UTC 2014
On 2014?07?17? 12:24, Sheldon wrote:
> On 07/17/2014 08:54 AM, Aline Manera wrote:
>>
>> On 07/16/2014 09:35 PM, Aline Manera wrote:
>>>
>>> On 07/15/2014 12:45 PM, shaohef at linux.vnet.ibm.com wrote:
>>>> From: ShaoHe Feng <shaohef at linux.vnet.ibm.com>
>>>>
>>>> V1 -> V2:
>>>> make ticket as sub-resource of a VM
>>>
>>> Do we need a new sub-resource?
>>> Why not use PUT /vms/<my-vm> {passwd:...} ?
> How do we get the passwd?
> GET /vms/<my-vm>
> {
>
> "name": my-vm,
> "cpu": 1,
> "memory": 512,
> "passwd": "abcd"
>
> }
I think this make some sense to me when considering this from 2
perspectives:
1. if we put passwd in vm info, we need to parse passwd every time
list_vms. If make it a subresource, we just manipulate it when connect vnc.
2. If we are controlled API level, we need to control vm_edit API for
passwd set. But we may want to control set passwd for special user.
What do you think?
>>
>> Using the PUT /vms/<my-vm> also can make the UI logic simpler as the
>> console password will be changed on VM Edit dialog
> at VM Edit dialog, the disks and ifaces are all sub-collection.
> PUT /vms/<my-vm>/ifaces/iface1
>> (which already uses this PUT method)
>>
>>>
>>>>
>>>> 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/
>>>>
>>>>
>>>> ShaoHe Feng (5):
>>>> vm ticket in backend: update API.md
>>>> vm ticket in backend: update controller and API.json
>>>> vm ticket in backend: update model
>>>> vm ticket in backend: update mockmodel
>>>> vm ticket in backend: update test case
>>>>
>>>> docs/API.md | 20 +++++++++++++++
>>>> src/kimchi/API.json | 14 ++++++++++
>>>> src/kimchi/control/vms.py | 13 ++++++++++
>>>> src/kimchi/i18n.py | 1 +
>>>> src/kimchi/mockmodel.py | 18 +++++++++++++
>>>> src/kimchi/model/vms.py | 65
>>>> +++++++++++++++++++++++++++++++++++++++++++++++
>>>> tests/test_model.py | 31 ++++++++++++++++++++++
>>>> tests/test_rest.py | 36 ++++++++++++++++++++++++++
>>>> 8 files changed, 198 insertions(+)
>>>>
>>>
>>> _______________________________________________
>>> Kimchi-devel mailing list
>>> Kimchi-devel at ovirt.org
>>> http://lists.ovirt.org/mailman/listinfo/kimchi-devel
>>>
>>
>>
>>
>
>
> --
> Thanks and best regards!
>
> Sheldon Feng(???)<shaohef at linux.vnet.ibm.com>
> IBM Linux Technology Center
>
>
> _______________________________________________
> Kimchi-devel mailing list
> Kimchi-devel at ovirt.org
> http://lists.ovirt.org/mailman/listinfo/kimchi-devel
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.ovirt.org/pipermail/kimchi-devel/attachments/20140717/a32b794d/attachment.html>
More information about the Kimchi-devel
mailing list