Capitalize all image metadata keys
authorNikos Skalkotos <skalkoto@grnet.gr>
Sat, 24 Mar 2012 08:40:21 +0000 (10:40 +0200)
committerNikos Skalkotos <skalkoto@grnet.gr>
Sat, 24 Mar 2012 08:40:21 +0000 (10:40 +0200)
image_creator/main.py
image_creator/os_type/__init__.py
image_creator/os_type/ubuntu.py

index 97b558c..bc4a47d 100755 (executable)
@@ -142,7 +142,7 @@ def image_creator():
         dev.umount()
 
         size = options.shrink and dev.shrink() or dev.size()
-        metadata['size'] = str(size // 2 ** 20)
+        metadata['SIZE'] = str(size // 2 ** 20)
 
         if options.outfile is not None:
             f = open('%s.%s' % (options.outfile, 'meta'), 'w')
index 4f0ec36..b9fd4e0 100644 (file)
@@ -106,7 +106,7 @@ class OSBase(object):
         meta['ROOT_PARTITION'] = "%d" % self.g.part_to_partnum(self.root)
         meta['OSFAMILY'] = self.g.inspect_get_type(self.root)
         meta['OS'] = self.g.inspect_get_distro(self.root)
-        meta['description'] = self.g.inspect_get_product_name(self.root)
+        meta['DESCRIPTION'] = self.g.inspect_get_product_name(self.root)
 
         return meta
 
index 7f3c046..77d80ff 100644 (file)
@@ -41,8 +41,8 @@ class Ubuntu(Linux):
         for app in apps:
             if app['app_name'] == 'kubuntu-desktop':
                 meta['OS'] = 'kubuntu'
-                meta['description'] = \
-                            meta['description'].replace('Ubuntu', 'Kubuntu')
+                meta['DESCRIPTION'] = \
+                            meta['DESCRIPTION'].replace('Ubuntu', 'Kubuntu')
                 break
         return meta