Skip to content

Commit

Permalink
Merge "DM: DM should not add family tag if family is not present" int…
Browse files Browse the repository at this point in the history
…o R2.20
  • Loading branch information
Zuul authored and opencontrail-ci-admin committed Oct 22, 2015
2 parents 65b189d + 5c67f2e commit f9fa0b1
Showing 1 changed file with 4 additions and 1 deletion.
Expand Up @@ -558,8 +558,11 @@ def is_family_configured(self, params, family_name):
def _add_family_etree(self, parent, params):
if params.get('address_families') is None:
return
families = params['address_families'].get('family', [])
if not families:
return
family_etree = etree.SubElement(parent, "family")
for family in params['address_families'].get('family', []):
for family in families:
if family in self._FAMILY_MAP:
family_subtree = etree.fromstring(self._FAMILY_MAP[family])
family_etree.append(family_subtree)
Expand Down

0 comments on commit f9fa0b1

Please sign in to comment.