Python glance-client image-create validation error
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Glance Client |
Confirmed
|
Undecided
|
Feilong Wang |
Bug Description
When using the python-glance client to create an image the schema validator fails when validating the locations object.
Basing from the format provided on the image schema:
{
"properties": {
}
},
"type": "array",
},
}
}
The locations attribute is an array of objects containing two attributes, url and metadata, eg;
locations: [
{
url: 'image.url',
metadata: {}
}
]
However, when trying to set an image location the following validation error is raised:
glance --debug --os-image-
Failed validating 'type' in schema[
{'properties': {'metadata': {'type': 'object'},
'required': ['url', 'metadata'],
'type': 'object'}
On instance[
'https:/
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/Library/
setattr(image, key, value)
File "/Library/
self.
File "/Library/
raise exceptions.
warlock.
Failed validating 'type' in schema[
{'properties': {'metadata': {'type': 'object'},
'required': ['url', 'metadata'],
'type': 'object'}
On instance[
'https:/
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/Library/
args.
File "/Library/
image = gc.images.
File "/Library/
raise TypeError(
TypeError: Unable to set 'locations' to '['https:/
Failed validating 'type' in schema[
{'properties': {'metadata': {'type': 'object'},
'required': ['url', 'metadata'],
'type': 'object'}
On instance[
'https:/
Unable to set 'locations' to '['https:/
Failed validating 'type' in schema[
{'properties': {'metadata': {'type': 'object'},
'required': ['url', 'metadata'],
'type': 'object'}
On instance[
'https:/
Changed in glance: | |
assignee: | nobody → Fei Long Wang (flwang) |
affects: | glance → python-glanceclient |
Changed in python-glanceclient: | |
status: | New → Confirmed |