def device_type(self,show_ver,*deftype):
if "Cisco IOS" in show_ver: return "ios"
if "NX-OS" in show_ver: return "nx-os"
if len(deftype) > 0: return deftype[0]
raise TemplateError("Unknown device type - did you pass me show version?")
评论列表
文章目录