コード例 #1
0
    def info_from_entry(self, entry):
        """Return the most important info from a uPnP entry."""
        url = urlparse(entry.values['location'])

        device = entry.description['device']

        return url.hostname, device['serialNumber']
コード例 #2
0
ファイル: webos_tv.py プロジェクト: Hellowlol/netdisco
 def info_from_entry(self, entry):
     """ Returns the most important info from a uPnP entry. """
     return urlparse(entry.values['location']).hostname
コード例 #3
0
ファイル: sonos.py プロジェクト: prajoshpremdas/netdisco
 def info_from_entry(self, entry):
     """Returns the most important info from a uPnP entry."""
     return urlparse(entry.values['location']).hostname
コード例 #4
0
 def info_from_entry(self, entry):
     """Return the most important info from a uPnP entry."""
     parsed = urlparse(entry.values['location'])
     return '{}:{}'.format(parsed.hostname, parsed.port)
コード例 #5
0
ファイル: netgear_router.py プロジェクト: Hellowlol/netdisco
    def info_from_entry(self, entry):
        """Returns the most important info from a uPnP entry."""
        url = urlparse(entry.values['location'])

        return (entry.description['device']['modelNumber'], url.hostname)
コード例 #6
0
ファイル: roku.py プロジェクト: Mattlk13/homeassistant-config
 def info_from_entry(self, entry):
     """Return the most important info from a uPnP entry."""
     info = urlparse(entry.location)
     return info.hostname, info.port
コード例 #7
0
ファイル: roku.py プロジェクト: fabaff/netdisco
 def info_from_entry(self, entry):
     """Returns the most important info from a uPnP entry."""
     info = urlparse(entry.location)
     return info.hostname, info.port
コード例 #8
0
    def info_from_entry(self, entry):
        """Returns the most important info from a uPnP entry."""
        url = urlparse(entry.values['location'])

        return (entry.description['device']['modelNumber'], url.hostname)
コード例 #9
0
ファイル: panasonic_viera.py プロジェクト: Hellowlol/netdisco
 def info_from_entry(self, entry):
     """Returns the most important info from a uPnP entry."""
     parsed = urlparse(entry.values['location'])
     return '{}:{}'.format(parsed.hostname, parsed.port)