def read_web_xml(p_pyhouse_obj): """ PyHouse.Computer.Web. Logins WebPort @param p_pyhouse_xml: is the entire PyHouse Object """ l_obj = WebData() l_obj.Logins = {} l_obj.WebPort = 8580 l_obj.SecurePort = 8588 l_count = 0 try: l_xml = p_pyhouse_obj.Xml.XmlRoot.find('ComputerDivision') if l_xml != None: l_xml = l_xml.find('WebSection') if l_xml != None: l_obj.Logins, l_count = Xml._read_all_logins(l_xml) l_obj.WebPort = Xml._read_port(l_xml) except Exception as e_err: LOG.error('ERROR reading web : {}'.format(e_err)) p_pyhouse_obj.Computer.Web = l_obj LOG.info('Loaded {} logins.'.format(l_count)) return l_obj
def saveWebData(self, p_json): """A new/changed web is returned. Process it and update the internal data via ???.py """ l_json = web_utils.JsonUnicode().decode_json(p_json) l_obj = WebData() l_obj.Port = l_json['Port'] self.m_pyhouse_obj.APIs.Computer.WebAPI.SaveXml(l_obj)