Skip to content

Commit

Permalink
Bug fixes:
Browse files Browse the repository at this point in the history
* Add a comment to YAML scalar value example
* Check for presence of IP address in VIRL-2-Ansible script
  to detect unmanaged switches
  • Loading branch information
ipspace committed Nov 20, 2016
1 parent 45f2c98 commit f26ad82
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion VIRL2Inventory/VIRL2Inventory.py
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,8 @@ def readXMLFile(f):

def printInventory(nodeList,osVar):
for node in nodeList:
print "{name:<10} {osvar}={ip:<18} os={os}".format(osvar=osVar,**node)
if 'ip' in node and node['ip']:
print "{name:<10} {osvar}={ip:<18} os={os}".format(osvar=osVar,**node)

def getOptions():
try:
Expand Down

0 comments on commit f26ad82

Please sign in to comment.