[pkg-eucalyptus-commits] [SCM] managing cloud instances for Eucalyptus branch, master, updated. 3.0.0-alpha3-257-g1da8e3a
Garrett Holmstrom
gholms at fedoraproject.org
Sun Jun 16 02:31:02 UTC 2013
The following commit has been merged in the master branch:
commit 9517f9e945f4bfeb861de777d268dbb9d1c29757
Author: Garrett Holmstrom <gholms at fedoraproject.org>
Date: Mon Apr 15 11:21:29 2013 -0700
Fix bundle-image incompatibility with lxml 2.2
diff --git a/euca2ools/commands/bundle/bundleimage.py b/euca2ools/commands/bundle/bundleimage.py
index caaab4c..1824ba2 100644
--- a/euca2ools/commands/bundle/bundleimage.py
+++ b/euca2ools/commands/bundle/bundleimage.py
@@ -315,11 +315,12 @@ class BundleImage(BaseCommand):
manifest.image.parts = None
manifest.image.parts.set('count', str(len(bundle.parts)))
for index, part in enumerate(bundle.parts):
- part_elem = lxml.objectify.SubElement(manifest.image.parts, 'part')
+ part_elem = lxml.objectify.Element('part')
part_elem.set('index', str(index))
part_elem.filename = os.path.basename(part['path'])
part_elem.digest = part['digest']
part_elem.digest.set('algorithm', bundle.digest_algorithm)
+ manifest.image.parts.append(part_elem)
# Parent image IDs
if (self.args['image_type'] == 'machine' and
@@ -333,16 +334,16 @@ class BundleImage(BaseCommand):
manifest.image.ancestry.append(ancestor_elem)
manifest.image.ancestry.ancestor_ami_id[-1] = ancestor_image_id
- lxml.objectify.deannotate(manifest, xsi_nil=True,
- cleanup_namespaces=True)
+ lxml.objectify.deannotate(manifest, xsi_nil=True)
+ lxml.etree.cleanup_namespaces(manifest)
to_sign = (lxml.etree.tostring(manifest.machine_configuration) +
lxml.etree.tostring(manifest.image))
self.log.debug('string to sign: %s', repr(to_sign))
signature = rsa_sha1_sign(to_sign, self.args['privatekey'])
manifest.signature = signature
self.log.debug('hex-encoded signature: %s', signature)
- lxml.objectify.deannotate(manifest, xsi_nil=True,
- cleanup_namespaces=True)
+ lxml.objectify.deannotate(manifest, xsi_nil=True)
+ lxml.etree.cleanup_namespaces(manifest)
self.log.debug('-- manifest content --\n', extra={'append': True})
pretty_manifest = lxml.etree.tostring(manifest,
pretty_print=True).strip()
--
managing cloud instances for Eucalyptus
More information about the pkg-eucalyptus-commits
mailing list