summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorVishvananda Ishaya <vishvananda@gmail.com>2010-12-14 19:14:10 +0000
committerTarmac <>2010-12-14 19:14:10 +0000
commit87265fd2de6b73a32bd327553ce542ee5ec125b3 (patch)
tree2e9067844638d71062fa2edb9a44634a1debbda8
parent911f11139926a772a5d90b8ec65cc4cb7ad850e9 (diff)
parent72b18d065669a01d8d083aa3edcc726be9be6547 (diff)
Includes architecture on register. Additionally removes a couple lines of cruft.
-rw-r--r--nova/objectstore/image.py9
1 files changed, 6 insertions, 3 deletions
diff --git a/nova/objectstore/image.py b/nova/objectstore/image.py
index 7292dbab8..34a90b0a2 100644
--- a/nova/objectstore/image.py
+++ b/nova/objectstore/image.py
@@ -21,7 +21,6 @@ Take uploaded bucket contents and register them as disk images (AMIs).
Requires decryption using keys in the manifest.
"""
-# TODO(jesse): Got these from Euca2ools, will need to revisit them
import binascii
import glob
@@ -29,7 +28,6 @@ import json
import os
import shutil
import tarfile
-import tempfile
from xml.etree import ElementTree
from nova import exception
@@ -199,12 +197,17 @@ class Image(object):
except:
ramdisk_id = None
+ try:
+ arch = manifest.find("machine_configuration/architecture").text
+ except:
+ arch = 'x86_64'
+
info = {
'imageId': image_id,
'imageLocation': image_location,
'imageOwnerId': context.project_id,
'isPublic': False, # FIXME: grab public from manifest
- 'architecture': 'x86_64', # FIXME: grab architecture from manifest
+ 'architecture': arch,
'imageType': image_type}
if kernel_id: