예제 #1
0
파일: base.py 프로젝트: ARD92/py-junos-eznc
 def _xml_to_py(self, has_xml, has_py):
     # common to all subclasses
     Resource._r_has_xml_status(has_xml, has_py)
     has_py['admin'] = bool(has_xml.find('disable') is None)
     Resource.copyifexists(has_xml, 'description', has_py)
     Resource.copyifexists(has_xml, 'mtu', has_py)
     has_py['$unit_count'] = len(has_xml.findall('unit'))
예제 #2
0
파일: base.py 프로젝트: yggdr/py-junos-eznc
 def _xml_to_py(self, has_xml, has_py):
     # common to all subclasses
     Resource._r_has_xml_status(has_xml, has_py)
     has_py["admin"] = bool(has_xml.find("disable") is None)
     Resource.copyifexists(has_xml, "description", has_py)
     Resource.copyifexists(has_xml, "mtu", has_py)
     has_py["$unit_count"] = len(has_xml.findall("unit"))
예제 #3
0
 def _xml_to_py(self, has_xml, has_py):
     # common to all subclasses
     Resource._r_has_xml_status(has_xml, has_py)
     has_py['admin'] = bool(has_xml.find('disable') is None)
     Resource.copyifexists(has_xml, 'description', has_py)
     Resource.copyifexists(has_xml, 'mtu', has_py)
     has_py['$unit_count'] = len(has_xml.findall('unit'))