Skip to content
Snippets Groups Projects
Commit d3445122 authored by Nikos Skalkotos's avatar Nikos Skalkotos
Browse files

In kamaki.register convert all metadata to strings

Otherwise the registration may fail.
parent 825fe2a6
No related branches found
No related tags found
No related merge requests found
......@@ -83,7 +83,12 @@ class Kamaki(object):
def register(self, name, location, metadata):
"""Register an image to ~okeanos"""
# Convert all metadata to strings
str_metadata = {}
for (key, value) in metadata.iteritems():
str_metadata[str(key)]=str(value)
params = {'is_public': 'true', 'disk_format': 'diskdump'}
self.image_client.register(name, location, params, metadata)
self.image_client.register(name, location, params, str_metadata)
# vim: set sta sts=4 shiftwidth=4 sw=4 et ai :
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment