mirror of
https://github.com/freedombox/FreedomBox.git
synced 2026-06-03 10:50:20 +00:00
networks: Minor styling and comments update
- Add comment about PPP peers possibly not responding to echo requests.
This commit is contained in:
parent
f93de11c6a
commit
ef156dab91
@ -74,7 +74,7 @@ available over this interfaces. Select Internal only for trusted networks.'),
|
||||
|
||||
|
||||
class AddPPPoEForm(forms.Form):
|
||||
"""Form to create a new pppoe connection."""
|
||||
"""Form to create a new PPPoE connection."""
|
||||
name = forms.CharField(label=_('Connection Name'))
|
||||
interface = forms.ChoiceField(
|
||||
label=_('Physical Interface'),
|
||||
@ -100,7 +100,7 @@ available over this interfaces. Select Internal only for trusted networks.'),
|
||||
|
||||
|
||||
class AddWifiForm(forms.Form):
|
||||
"""Form to create a new wifi connection."""
|
||||
"""Form to create a new Wi-Fi connection."""
|
||||
name = forms.CharField(label=_('Connection Name'))
|
||||
interface = forms.ChoiceField(
|
||||
label=_('Physical interface'),
|
||||
|
||||
@ -22,8 +22,8 @@ from django.template.response import TemplateResponse
|
||||
from gettext import gettext as _
|
||||
from logging import Logger
|
||||
|
||||
from .forms import ConnectionTypeSelectForm, AddEthernetForm, AddWifiForm
|
||||
from .forms import AddPPPoEForm
|
||||
from .forms import (ConnectionTypeSelectForm, AddEthernetForm, AddPPPoEForm,
|
||||
AddWifiForm)
|
||||
from plinth import cfg
|
||||
from plinth import network
|
||||
from plinth import package
|
||||
|
||||
@ -192,13 +192,13 @@ def _update_ethernet_settings(connection, connection_uuid, name, interface,
|
||||
|
||||
def _update_pppoe_settings(connection, connection_uuid, name, interface, zone,
|
||||
username, password):
|
||||
"""Create/edit ethernet settings for network manager connections."""
|
||||
"""Create/edit PPPoE settings for network manager connections."""
|
||||
type_ = 'pppoe'
|
||||
|
||||
connection = _update_common_settings(connection, connection_uuid, name,
|
||||
type_, interface, zone)
|
||||
|
||||
#pppoe
|
||||
# PPPoE
|
||||
settings = connection.get_setting_pppoe()
|
||||
if not settings:
|
||||
settings = nm.SettingPppoe.new()
|
||||
@ -212,8 +212,8 @@ def _update_pppoe_settings(connection, connection_uuid, name, interface, zone,
|
||||
settings = nm.SettingPpp.new()
|
||||
connection.add_setting(settings)
|
||||
|
||||
#ToDo: make this configurable?
|
||||
#ToDo: apt-get install ppp pppoe
|
||||
# TODO: make this configurable? Some PPP peers don't respond to
|
||||
# echo requests according to NetworkManager documentation.
|
||||
settings.set_property(nm.SETTING_PPP_LCP_ECHO_FAILURE, 5)
|
||||
settings.set_property(nm.SETTING_PPP_LCP_ECHO_INTERVAL, 30)
|
||||
|
||||
@ -221,7 +221,7 @@ def _update_pppoe_settings(connection, connection_uuid, name, interface, zone,
|
||||
|
||||
|
||||
def add_pppoe_connection(name, interface, zone, username, password):
|
||||
"""Add an automatic pppoe connection in network manager.
|
||||
"""Add an automatic PPPoE connection in network manager.
|
||||
|
||||
Return the UUID for the connection.
|
||||
"""
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user