Merge "Add support for multihash"

This commit is contained in:
Zuul
2018-07-24 21:34:18 +00:00
committed by Gerrit Code Review
3 changed files with 95 additions and 3 deletions
+13
View File
@@ -191,6 +191,19 @@ _BASE_SCHEMA = {
"description": "md5 hash of image contents.",
"maxLength": 32
},
"os_hash_algo": {
"readOnly": True,
"type": ["null", "string"],
"description": "Algorithm to calculate os_hash_value",
"maxLength": 32
},
"os_hash_value": {
"readOnly": True,
"type": ["null", "string"],
"description": "Hexdigest of the image contents using the "
"algorithm specified by the os_hash_algo",
"maxLength": 32
},
"created_at": {
"readOnly": True,
"type": "string",
+6 -3
View File
@@ -49,7 +49,8 @@ def get_image_schema():
@utils.schema_args(get_image_schema, omit=['created_at', 'updated_at', 'file',
'checksum', 'virtual_size', 'size',
'status', 'schema', 'direct_url',
'locations', 'self'])
'locations', 'self',
'os_hash_value', 'os_hash_algo'])
@utils.arg('--property', metavar="<key=value>", action='append',
default=[], help=_('Arbitrary property to associate with image.'
' May be used multiple times.'))
@@ -92,7 +93,8 @@ def do_image_create(gc, args):
@utils.schema_args(get_image_schema, omit=['created_at', 'updated_at', 'file',
'checksum', 'virtual_size', 'size',
'status', 'schema', 'direct_url',
'locations', 'self'])
'locations', 'self',
'os_hash_value', 'os_hash_algo'])
@utils.arg('--property', metavar="<key=value>", action='append',
default=[], help=_('Arbitrary property to associate with image.'
' May be used multiple times.'))
@@ -206,7 +208,8 @@ def do_image_create_via_import(gc, args):
'updated_at', 'file', 'checksum',
'virtual_size', 'size', 'status',
'schema', 'direct_url', 'tags',
'self'])
'self', 'os_hash_value',
'os_hash_algo'])
@utils.arg('--property', metavar="<key=value>", action='append',
default=[], help=_('Arbitrary property to associate with image.'
' May be used multiple times.'))