
I wasn't able to update a VM description: [danielhb@arthas kimchi]$ curl -u root -H "Content-Type: application/json" -H "Accept: application/json" -k http://localhost:8010/plugins/kimchi/vms/winxp -X PUT -d '{"title": "windowsXP", "description": "thisisawindowsXPmachine"}' Enter host password for user 'root': { "reason":"The server encountered an unexpected condition which prevented it from fulfilling the request.", "code":"500 Internal Server Error", "call_stack":"Traceback (most recent call last):\n File \"/usr/lib/python2.7/site-packages/cherrypy/_cprequest.py\", line 670, in respond\n response.body = self.handler()\n File \"/usr/lib/python2.7/site-packages/cherrypy/lib/encoding.py\", line 217, in __call__\n self.body = self.oldhandler(*args, **kwargs)\n File \"/usr/lib/python2.7/site-packages/cherrypy/_cpdispatch.py\", line 61, in __call__\n return self.callable(*self.args, **self.kwargs)\n File \"/home/danielhb/kimchi/wok_all_plugins/src/wok/control/base.py\", line 209, in index\n 'PUT': self.update}[method](*args, **kargs)\n File \"/home/danielhb/kimchi/wok_all_plugins/src/wok/control/base.py\", line 262, in update\n ident = update(*args)\n File \"/home/danielhb/kimchi/wok_all_plugins/src/wok/plugins/kimchi/model/vms.py\", line 301, in update\n vm_name, dom = self._static_vm_update(name, dom, params)\n File \"/home/danielhb/kimchi/wok_all_plugins/src/wok/plugins/kimchi/model/vms.py\", line 799, in _static_vm_update\n None)\n File \"/home/danielhb/kimchi/wok_all_plugins/src/wok/xmlutils/utils.py\", line 52, in xml_item_update\n item.text = value\nAttributeError: 'NoneType' object has no attribute 'text'\n" }[danielhb@arthas kimchi]$ This is the error on WoK console: "" "curl/7.43.0" WOKOBJST0001E: Unable to find de1fa348-1356-44b5-9b06-f70aa34a79ef in datastore [16/Aug/2016:15:58:24] HTTP Request Headers: AUTHORIZATION: Basic cm9vdDpnMDBkY29kMw== Content-Length: 64 HOST: localhost:8010 Remote-Addr: 127.0.0.1 ACCEPT: application/json USER-AGENT: curl/7.43.0 Content-Type: application/json [16/Aug/2016:15:58:24] HTTP Traceback (most recent call last): File "/usr/lib/python2.7/site-packages/cherrypy/_cprequest.py", line 670, in respond response.body = self.handler() File "/usr/lib/python2.7/site-packages/cherrypy/lib/encoding.py", line 217, in __call__ self.body = self.oldhandler(*args, **kwargs) File "/usr/lib/python2.7/site-packages/cherrypy/_cpdispatch.py", line 61, in __call__ return self.callable(*self.args, **self.kwargs) File "/home/danielhb/kimchi/wok_all_plugins/src/wok/control/base.py", line 209, in index 'PUT': self.update}[method](*args, **kargs) File "/home/danielhb/kimchi/wok_all_plugins/src/wok/control/base.py", line 262, in update ident = update(*args) File "/home/danielhb/kimchi/wok_all_plugins/src/wok/plugins/kimchi/model/vms.py", line 301, in update vm_name, dom = self._static_vm_update(name, dom, params) File "/home/danielhb/kimchi/wok_all_plugins/src/wok/plugins/kimchi/model/vms.py", line 799, in _static_vm_update None) File "/home/danielhb/kimchi/wok_all_plugins/src/wok/xmlutils/utils.py", line 52, in xml_item_update item.text = value AttributeError: 'NoneType' object has no attribute 'text' On 08/16/2016 01:23 PM, Ramon Medeiros wrote:
Ramon Medeiros (3): Issue #857: Support VM description Update tests Update docs
API.json | 20 ++++++++++++++++++++ docs/API.md | 6 ++++++ i18n.py | 2 ++ model/vms.py | 24 +++++++++++++++++++++--- tests/test_mockmodel.py | 3 ++- tests/test_model.py | 3 ++- vmtemplate.py | 5 ++++- 7 files changed, 57 insertions(+), 6 deletions(-)