Mercurial > libervia-backend
comparison src/plugins/plugin_misc_ip.py @ 2145:33c8c4973743
core (plugins): added missing contants + use of new constants in PLUGIN_INFO
author | Goffi <goffi@goffi.org> |
---|---|
date | Sun, 12 Feb 2017 18:59:10 +0100 |
parents | 1d3f73e065e1 |
children | a543eda2c923 |
comparison
equal
deleted
inserted
replaced
2144:1d3f73e065e1 | 2145:33c8c4973743 |
---|---|
40 log.warning(u"netifaces is not available, it help discovering IPs, you can install it on https://pypi.python.org/pypi/netifaces") | 40 log.warning(u"netifaces is not available, it help discovering IPs, you can install it on https://pypi.python.org/pypi/netifaces") |
41 netifaces = None | 41 netifaces = None |
42 | 42 |
43 | 43 |
44 PLUGIN_INFO = { | 44 PLUGIN_INFO = { |
45 "name": "IP discovery", | 45 C.PI_NAME: "IP discovery", |
46 "import_name": "IP", | 46 C.PI_IMPORT_NAME: "IP", |
47 "type": C.PLUG_TYPE_MISC, | 47 C.PI_TYPE: C.PLUG_TYPE_MISC, |
48 "protocols": ["XEP-0279"], | 48 C.PI_PROTOCOLS: ["XEP-0279"], |
49 "recommendations": ["NAT-PORT"], | 49 C.PI_RECOMMENDATIONS: ["NAT-PORT"], |
50 "main": "IPPlugin", | 50 C.PI_MAIN: "IPPlugin", |
51 "handler": "yes", | 51 C.PI_HANDLER: "yes", |
52 "description": _("""This plugin help to discover our external IP address.""") | 52 C.PI_DESCRIPTION: _("""This plugin help to discover our external IP address.""") |
53 } | 53 } |
54 | 54 |
55 # TODO: GET_IP_PAGE should be configurable in sat.conf | 55 # TODO: GET_IP_PAGE should be configurable in sat.conf |
56 GET_IP_PAGE = "http://salut-a-toi.org/whereami/" # This page must only return external IP of the requester | 56 GET_IP_PAGE = "http://salut-a-toi.org/whereami/" # This page must only return external IP of the requester |
57 GET_IP_LABEL = D_(u"Allow external get IP") | 57 GET_IP_LABEL = D_(u"Allow external get IP") |