Publish services using WS-Discovery
(scope, typename, address, port, loglevel, capture, unicast_num,
multicast_num)
| 100 | @click.option('--multicast-num', '-mn', type=int, default=MULTICAST_UDP_REPEAT, |
| 101 | show_default=True, help='Number of Multicast messages to send') |
| 102 | def publish(scope, typename, address, port, loglevel, capture, unicast_num, |
| 103 | multicast_num): |
| 104 | "Publish services using WS-Discovery" |
| 105 | |
| 106 | logger = setup_logger("ws-publishing", loglevel) |
| 107 | |
| 108 | with publishing(capture) as wsp: |
| 109 | scopes = [Scope(scope)] if scope else [] |
| 110 | |
| 111 | try: |
| 112 | proto, ns, name = typename.split(':') |
| 113 | except: |
| 114 | types = [] |
| 115 | else: |
| 116 | ns = ns[2:] |
| 117 | types = [QName(proto, ns)] |
| 118 | |
| 119 | xAddrs = ["%s:%i" % (address, port)] if address else ['127.0.0.1'] |
| 120 | svc = wsp.publishService(types, scopes, xAddrs) |
nothing calls this directly
no test coverage detected