Comment 2 for bug 1577821

Revision history for this message
Asad (sid-asad-siddiqui) wrote :

Below is the command:

glance image-create --name "cirros-0.3.4-x86_64-2" --file ~/images/cirros-0.3.4-x86_64-disk.img --disk-format qcow2 --container-format bare --visibility public --progress --property os-name=cirros-2 --property os_version=0.3.4 --property os_arch=x86_64 --property disk_size=32MB --property os_edition=server --id=cirros-034-x86-64-server

It fails with the following error:

Unable to set 'id' to 'cirros-034-x86-64-server'. Reason: u'cirros-034-x86-64-server' does not match u'^([0-9a-fA-F]){8}-([0-9a-fA-F]){4}-([0-9a-fA-F]){4}-([0-9a-fA-F]){4}-([0-9a-fA-F]){12}$'

Failed validating u'pattern' in schema[u'properties'][u'id']:
    {u'description': u'An identifier for the image',
     u'pattern': u'^([0-9a-fA-F]){8}-([0-9a-fA-F]){4}-([0-9a-fA-F]){4}-([0-9a-fA-F]){4}-([0-9a-fA-F]){12}$',
     u'type': u'string'}

On instance[u'id']:
    u'cirros-034-x86-64-server'

Note: It might be noted that the desired feature of being able to specify custom ID is available in nova flavors.
ID is a base properties for flavors also, but still users can specify custom values.