)]}'
{"/PATCHSET_LEVEL":[{"author":{"_account_id":5202,"name":"Erno Kuvaja","email":"jokke@usr.fi","username":"jokke"},"change_message_id":"5ba784ed6c6e35728e143e04821b8edcbb6d15d6","unresolved":true,"context_lines":[],"source_content_type":"","patch_set":2,"id":"889eb57f_bf20b7e7","updated":"2022-09-22 11:56:19.000000000","message":"Could you please present an example where the client accepts read-only properties?\n\nThere is warlock driven schema validation happening in https://github.com/openstack/python-glanceclient/blob/master/glanceclient/v2/images.py#L406-L411 \u0026 https://github.com/openstack/python-glanceclient/blob/master/glanceclient/v2/images.py#L441-L446 If that is broken, we should fix it rather than add CLI only validation for it. ","commit_id":"d1d98bf3e6927123c613ee0f159ef5f2e2d2ab98"},{"author":{"_account_id":8122,"name":"Cyril Roelandt","email":"cyril@redhat.com","username":"cyril.roelandt.enovance"},"change_message_id":"487f553e57d9e5ad4d0fd16229b5215cc83aeedc","unresolved":true,"context_lines":[],"source_content_type":"","patch_set":2,"id":"5abd5201_d3683b62","in_reply_to":"889eb57f_bf20b7e7","updated":"2022-11-14 16:58:39.000000000","message":"The linked bug (https://bugs.launchpad.net/python-glanceclient/+bug/1578596) has a perfect example:\n\n$ glance image-create --name fake-3g-data --disk-format qcow2 --container-format bare --property virtual_size\u003d33333 \u003c test-qcow500.imgUnable\n\nWhat happens is that the warlock validation fails because it is passed a string (\u002733333\u0027) rather than an integer (33333).\n\nIn devstack:\n\nFailed validating \u0027type\u0027 in schema[\u0027properties\u0027][\u0027virtual_size\u0027]:\n    {\u0027description\u0027: \u0027Virtual size of image in bytes\u0027,\n     \u0027readOnly\u0027: True,\n     \u0027type\u0027: [\u0027null\u0027, \u0027integer\u0027]}\n\nOn instance[\u0027virtual_size\u0027]:\n    \u0027333\u0027\nUnable to set \u0027virtual_size\u0027 to \u0027333\u0027. Reason: \u0027333\u0027 is not of type \u0027null\u0027, \u0027integer\u0027\n\n\nNow, if I modify the \"create\" method in glanceclient/v2/images.py, by doing something very dirty: if key \u003d\u003d \u0027virtual_size\u0027: value\u003dint(value), obviously the type error goes away. But warlock does not complain about the fact that this property is supposed to be read-only, and passes on the request to Glance, which returns a 403:\n\nHTTP 403 Forbidden: Attribute \u0026#x27;virtual_size\u0026#x27; is read-only.\n\n\nI\u0027m not sure if Warlock/jsonschema should be handling this automagically, or if we somehow forgot to say \"yeah, we want to check whether attributes are read-only\". Any idea?","commit_id":"d1d98bf3e6927123c613ee0f159ef5f2e2d2ab98"}]}
