コード例 #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
ファイル: base.py プロジェクト: yagosys/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'))