[Kimchi-devel] [PATCH V3 0/5] vm ticket in backend
Aline Manera
alinefm at linux.vnet.ibm.com
Tue Jul 22 17:05:38 UTC 2014
The tests are failing:
======================================================================
ERROR: test_vm_info (test_model.ModelTests)
----------------------------------------------------------------------
Traceback (most recent call last):
File "/home/alinefm/kimchi/tests/test_model.py", line 72, in test_vm_info
info = inst.vm_lookup('test')
File "/home/alinefm/kimchi/src/kimchi/model/vms.py", line 464, in lookup
'ticket': self._get_ticket(dom),
File "/home/alinefm/kimchi/src/kimchi/model/vms.py", line 405, in
_get_ticket
passwd = graphic.attrib.get('passwd')
AttributeError: 'NoneType' object has no attribute 'attrib'
======================================================================
FAIL: test_vm_info (test_mockmodel.MockModelTests)
----------------------------------------------------------------------
Traceback (most recent call last):
File "/home/alinefm/kimchi/tests/test_mockmodel.py", line 149, in
test_vm_info
self.assertEquals(keys, set(info.keys()))
AssertionError: Items in the second set but not the first:
'ticket'
----------------------------------------------------------------------
Ran 159 tests in 266.996s
On 07/21/2014 12:51 PM, shaohef at linux.vnet.ibm.com wrote:
> From: ShaoHe Feng <shaohef at linux.vnet.ibm.com>
>
> V2 -> V3:
> do not make ticket as sub-resource of a VM
>
> V1 -> V2:
> make ticket as sub-resource of a VM
>
> 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/
>
> 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 | 7 +++++
> src/kimchi/API.json | 16 +++++++++++
> src/kimchi/control/vms.py | 3 ++-
> src/kimchi/i18n.py | 2 ++
> src/kimchi/mockmodel.py | 14 ++++++++++
> src/kimchi/model/vms.py | 68 +++++++++++++++++++++++++++++++++++++++++++++++
> tests/test_model.py | 15 +++++++++++
> tests/test_rest.py | 12 +++++++++
> 8 files changed, 136 insertions(+), 1 deletion(-)
>
More information about the Kimchi-devel
mailing list