Publish a service with the given TYPES, SCOPES and XAddrs (service addresses) if xAddrs contains item, which includes {ip} pattern, one item per IP address will be sent
(self, types, scopes, xAddrs)
| 42 | |
| 43 | |
| 44 | def publishService(self, types, scopes, xAddrs): |
| 45 | """Publish a service with the given TYPES, SCOPES and XAddrs (service addresses) |
| 46 | |
| 47 | if xAddrs contains item, which includes {ip} pattern, one item per IP address will be sent |
| 48 | """ |
| 49 | |
| 50 | if not self._serverStarted: |
| 51 | raise Exception("Server not started") |
| 52 | |
| 53 | instanceId = _generateInstanceId() |
| 54 | |
| 55 | service = Service(types, scopes, xAddrs, self.uuid, instanceId) |
| 56 | self._localServices[self.uuid] = service |
| 57 | self._sendHello(service) |
| 58 | |
| 59 | |
| 60 | def clearLocalServices(self): |
no test coverage detected