Skip to content

Commit

Permalink
Merge pull request #396 from shermdog/394
Browse files Browse the repository at this point in the history
Check the inherited config for the domain-name
  • Loading branch information
shermdog committed Jun 29, 2015
2 parents f82a905 + c6c72e8 commit ded5e73
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion lib/jnpr/junos/facts/domain.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
from jnpr.junos.utils.fs import FS
from jnpr.junos.exception import RpcError
from jnpr.junos.jxml import INHERIT
from lxml.builder import E


Expand All @@ -15,7 +16,7 @@ def facts_domain(junos, facts):

try:
domain_filter_xml = E('configuration', E('system', E('domain-name')))
domain = junos.rpc.get_config(domain_filter_xml)
domain = junos.rpc.get_config(filter_xml=domain_filter_xml, options=INHERIT)
domain_name = domain.xpath('.//domain-name')
if len(domain_name) > 0:
facts['domain'] = domain_name[0].text
Expand Down

0 comments on commit ded5e73

Please sign in to comment.