Skip to content

Instantly share code, notes, and snippets.

@standaloneSA
Created April 29, 2014 16:20
Show Gist options
  • Save standaloneSA/11405151 to your computer and use it in GitHub Desktop.
Save standaloneSA/11405151 to your computer and use it in GitHub Desktop.
vlanXML = CLI("sh vlan id " + vlan + " | xml", 0)
vlanDOM = parseString(''.join(vlanXML.get_raw_output())[:-6])
vlanElement = vlanDOM.getElementsByTagName("vlanshowinfo-vlanid")[0]
vlanID = vlanElement.firstChild.nodeValue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment