MCPcopy Create free account
hub / github.com/andreikop/python-ws-discovery / getXAddrs

Method getXAddrs

wsdiscovery/service.py:35–49  ·  view source on GitHub ↗

get service network address

(self)

Source from the content-addressed store, hash-verified

33 self._scopes = scopes
34
35 def getXAddrs(self):
36 "get service network address"
37 ret = []
38 ipAddrs = None
39 for xAddr in self._xAddrs:
40 if '{ip}' in xAddr:
41 if ipAddrs is None:
42 ipAddrs = _getNetworkAddrs(socket.AF_INET)
43 ipAddrs.append(_getNetworkAddrs(socket.AF_INET6))
44 for ipAddr in ipAddrs:
45 if not ipAddr.is_loopback:
46 ret.append(xAddr.format(ip=str(ipAddr)))
47 else:
48 ret.append(xAddr)
49 return ret
50
51 def setXAddrs(self, xAddrs):
52 "set service network address"

Callers 5

discoverFunction · 0.45
_handle_probematchesMethod · 0.45
_handle_helloMethod · 0.45
test_probingFunction · 0.45

Calls 1

_getNetworkAddrsFunction · 0.85

Tested by 1

test_probingFunction · 0.36