src/r53/r53.py
def merge_config(cfg_chunks):
  """Merge a set of fetched Route 53 config Etrees into a canonical form.

  Args: cfg_chunks: [ lxml.etree.ETree ]
  Returns: lxml.etree.Element"""
  root = lxml.etree.XML('<ResourceRecordSets xmlns="%s"></ResourceRecordSets>' % R53_XMLNS, parser=XML_PARSER)
  for chunk in cfg_chunks:
    for rrset in chunk.iterfind('.//{%s}ResourceRecordSet' % R53_XMLNS):
      root.append(rrset)
  return root
def merge_config(cfg_chunks):
  root = lxml.etree.XML('<ResourceRecordSets xmlns="%s"></ResourceRecordSets>' % R53_XMLNS, parser=XML_PARSER)
  for chunk in cfg_chunks:
    for rrset in chunk.iterfind('.//{%s}ResourceRecordSet' % R53_XMLNS):
      root.append(rrset)
  return root
def merge_config ( cfg_chunks ) : root = lxml . etree . XML ( '<ResourceRecordSets xmlns="%s"></ResourceRecordSets>' % R53_XMLNS , parser = XML_PARSER ) for chunk in cfg_chunks : for rrset in chunk . iterfind ( './/{%s}ResourceRecordSet' % R53_XMLNS ) : root . append ( rrset ) return root
Merge a set of fetched Route 53 config Etrees into a canonical form.

  Args: cfg_chunks: [ lxml.etree.ETree ]
  Returns: lxml.etree.Element
Merge a set of fetched Route 53 config Etrees into a canonical form .