13 Capability.__init__(self, protocol)
20 service_name = message[
"service"]
22 if UnadvertiseService.services_glob
is not None and UnadvertiseService.services_glob:
23 self.
protocol.log(
"debug",
"Service security glob enabled, checking service: " + service_name)
25 for glob
in UnadvertiseService.services_glob:
26 if (fnmatch.fnmatch(service_name, glob)):
27 self.
protocol.log(
"debug",
"Found match with glob " + glob +
", continuing service unadvertisement...")
31 self.
protocol.log(
"warn",
"No match found for service, cancelling service unadvertisement for: " + service_name)
34 self.
protocol.log(
"debug",
"No service security glob, not checking service unadvertisement...")
37 if service_name
in self.
protocol.external_service_list.keys():
38 self.
protocol.external_service_list[service_name].graceful_shutdown(timeout=1.0)
39 self.
protocol.external_service_list[service_name].service_handle.shutdown(
"Unadvertise request.")
40 del self.
protocol.external_service_list[service_name]
41 self.
protocol.log(
"info",
"Unadvertised service %s." % service_name)
43 self.
protocol.log(
"error",
"Service %s has not been advertised via rosbridge, can't unadvertise." % service_name)
def unadvertise_service(self, message)
def __init__(self, protocol)