
def __init__(self, args, scan=False): """ @@ -84,6 +77,14 @@ class VMTemplate(object): args['graphics'] = graphics
default_disk = self.info['disks'][0] + + # Complete memory args, because dict method update is not recursive + if 'memory' in args: + if 'current' not in args['memory']:
After apply your patch and execute a GET on templates, to list my current templates, I got the following error:
File "/home/pvital/Projects/tmp/wok_test/src/wok/plugins/kimchi/vmtemplate.py",
line 83, in __init__ if 'current' not in args['memory']: TypeError: argument of type 'int' is not iterable
the line executed was:
$ curl -k -u test -H "Content-Type: application/json" -H "Accept: application/json" 'https://localhost:8001/plugins/kimchi/templates' -X GET
So, what happens if I already have templates in the old model (the current one today) after I apply your patches? I don't have the new structure of memory.
Yes, templates must be updated. I will add a script to do this. Thanks
We also have to update the cpu struture as it was changed too.
Humm, I have not noticed any problem in Templates related to latest CPU changes. I have just sent V2 and did not included anything about this. However I think we need to take a deeper look and analyze if we need an update script to CPUs as well. Rodrigo Trujillo