'Upload openstack image failed
I tried to upload an openstack image with ansible. The task failed with
Failed validating 'type' in schema['properties']['tags']:: 400 Bad Request: On instance['tags']:: u"['testtag']": 'items': {'maxLength': 255, 'type': 'string'},: 'type': 'array'}: Provided object does not match schema 'image': u"['testtag']" is not of type 'array': {'description': u'List of strings related to the image',",
Here is my ansible task:
- os_image:
name: test_image
auth: "{{os_auth}}"
container_format: bare
disk_format: raw
tags: [testtag]
state: present
filename: /var/lib/test_image.raw
I have changed it to - testtag1 with new indent line however the error message its showing the quote:
u"['testtag1']" is not of type 'array': Failed validating 'type' in schema['properties']['tags']:: 400 Bad Request: On instance['tags']:: 'items': {'maxLength': 255, 'type': 'string'},: 'type': 'array'}: u"['testtag1']": {'description': u'List of strings related to the image',",
Solution 1:[1]
my error is like this.
{"changed": false, "extra_data": {"data": null, "details": "400 Bad Request: Failed validating 'type' in schema['properties']['protected']:: 'False': Provided object does not match schema 'image': 'False' is not of type 'boolean': 'type': 'boolean'}: {'description': 'If true, image will not be deletable.',: On instance['protected']:", "response": "<html>\n <head>\n <title>400 Bad Request</title>\n </head>\n <body>\n <h1>400 Bad Request</h1>\n Provided object does not match schema 'image': 'False' is not of type 'boolean'\n\nFailed validating 'type' in schema['properties']['protected']:\n {'description': 'If true, image will not be deletable.',\n 'type': 'boolean'}\n\nOn instance['protected']:\n 'False'<br /><br />\n\n\n\n </body>\n</html>"}, "msg": "BadRequestException: 400: Client Error for url: http://192.168.1.9:9292/v2/images, 400 Bad Request: Failed validating 'type' in schema['properties']['protected']:: 'False': Provided object does not match schema 'image': 'False' is not of type 'boolean': 'type': 'boolean'}: {'description': 'If true, image will not be deletable.',: On instance['protected']:"}
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 | Aref |
