mirror of
https://github.com/freedombox/FreedomBox.git
synced 2026-09-19 04:59:01 +00:00
*: Miscellaneous changes to work with reduce the use of term 'plinth'
Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org> Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
This commit is contained in:
parent
2782fba9bb
commit
80dceb12f4
@ -113,7 +113,7 @@ class ApacheApp(app_module.App):
|
|||||||
self.add(web_server_ports)
|
self.add(web_server_ports)
|
||||||
|
|
||||||
freedombox_ports = Firewall(
|
freedombox_ports = Firewall(
|
||||||
'firewall-plinth',
|
'firewall-freedombox',
|
||||||
format_lazy(_('{box_name} Web Interface (Plinth)'),
|
format_lazy(_('{box_name} Web Interface (Plinth)'),
|
||||||
box_name=_(cfg.box_name)), ports=['http', 'https'],
|
box_name=_(cfg.box_name)), ports=['http', 'https'],
|
||||||
is_external=True)
|
is_external=True)
|
||||||
|
|||||||
@ -9,7 +9,7 @@ from unittest.mock import Mock, patch
|
|||||||
|
|
||||||
import pytest
|
import pytest
|
||||||
|
|
||||||
from freedombox import __main__ as plinth_main
|
from freedombox import __main__ as freedombox_main
|
||||||
from freedombox import utils
|
from freedombox import utils
|
||||||
from freedombox.modules.apache import uws_directory_of_user, uws_url_of_user
|
from freedombox.modules.apache import uws_directory_of_user, uws_url_of_user
|
||||||
from freedombox.modules.config import (_home_page_scid2url, change_home_page,
|
from freedombox.modules.config import (_home_page_scid2url, change_home_page,
|
||||||
@ -131,6 +131,6 @@ def test_locale_path():
|
|||||||
Test that the 'locale' directory is in the same folder as __main__.py.
|
Test that the 'locale' directory is in the same folder as __main__.py.
|
||||||
This is required for detecting translated languages.
|
This is required for detecting translated languages.
|
||||||
"""
|
"""
|
||||||
plinth_dir = os.path.dirname(plinth_main.__file__)
|
freedombox_dir = os.path.dirname(freedombox_main.__file__)
|
||||||
locale_dir = os.path.join(plinth_dir, 'locale')
|
locale_dir = os.path.join(freedombox_dir, 'locale')
|
||||||
assert os.path.isdir(locale_dir)
|
assert os.path.isdir(locale_dir)
|
||||||
|
|||||||
@ -260,7 +260,7 @@ def _gitweb_git_command_is_successful(command, cwd):
|
|||||||
@contextlib.contextmanager
|
@contextlib.contextmanager
|
||||||
def _gitweb_temp_directory():
|
def _gitweb_temp_directory():
|
||||||
"""Create temporary directory"""
|
"""Create temporary directory"""
|
||||||
name = tempfile.mkdtemp(prefix='plinth_test_gitweb_')
|
name = tempfile.mkdtemp(prefix='fbx_test_gitweb_')
|
||||||
yield name
|
yield name
|
||||||
shutil.rmtree(name)
|
shutil.rmtree(name)
|
||||||
|
|
||||||
|
|||||||
@ -67,7 +67,7 @@ def _write_to_share(share_type, as_guest=False):
|
|||||||
share_name = '{0}_{1}'.format(disk_name, share_type)
|
share_name = '{0}_{1}'.format(disk_name, share_type)
|
||||||
hostname = urllib.parse.urlparse(default_url).hostname
|
hostname = urllib.parse.urlparse(default_url).hostname
|
||||||
servicename = '\\\\{0}\\{1}'.format(hostname, share_name)
|
servicename = '\\\\{0}\\{1}'.format(hostname, share_name)
|
||||||
directory = '_plinth-test_{0}'.format(''.join(
|
directory = '_freedombox-test_{0}'.format(''.join(
|
||||||
random.SystemRandom().choices(string.ascii_letters, k=8)))
|
random.SystemRandom().choices(string.ascii_letters, k=8)))
|
||||||
port = functional.config['DEFAULT']['samba_port']
|
port = functional.config['DEFAULT']['samba_port']
|
||||||
|
|
||||||
|
|||||||
@ -366,9 +366,9 @@ def test_validate_directory_writable(path, error):
|
|||||||
@pytest.mark.usefixtures('needs_not_root')
|
@pytest.mark.usefixtures('needs_not_root')
|
||||||
@pytest.mark.parametrize(
|
@pytest.mark.parametrize(
|
||||||
'path,error',
|
'path,error',
|
||||||
[('/var/lib/plinth_storage_test_not_exists', PermissionError('write')),
|
[('/var/lib/fbx_storage_test_not_exists', PermissionError('write')),
|
||||||
('/tmp/plint_storage_test_not_exists', None),
|
('/tmp/fbx_storage_test_not_exists', None),
|
||||||
('/var/../tmp/plint_storage_test_not_exists', None)])
|
('/var/../tmp/fbx_storage_test_not_exists', None)])
|
||||||
def test_validate_directory_creatable(path, error):
|
def test_validate_directory_creatable(path, error):
|
||||||
"""Test that directory creatable validation returns expected output."""
|
"""Test that directory creatable validation returns expected output."""
|
||||||
_assert_validate_directory(path, error, check_creatable=True)
|
_assert_validate_directory(path, error, check_creatable=True)
|
||||||
|
|||||||
@ -20,49 +20,49 @@ def systemd_set_default(target: str):
|
|||||||
@privileged
|
@privileged
|
||||||
def start(service: str):
|
def start(service: str):
|
||||||
"""Start a service."""
|
"""Start a service."""
|
||||||
_assert_service_is_managed_by_plinth(service)
|
_assert_service_is_managed_by_freedombox(service)
|
||||||
action_utils.service_start(service)
|
action_utils.service_start(service)
|
||||||
|
|
||||||
|
|
||||||
@privileged
|
@privileged
|
||||||
def stop(service: str):
|
def stop(service: str):
|
||||||
"""Stop a running service."""
|
"""Stop a running service."""
|
||||||
_assert_service_is_managed_by_plinth(service)
|
_assert_service_is_managed_by_freedombox(service)
|
||||||
action_utils.service_stop(service)
|
action_utils.service_stop(service)
|
||||||
|
|
||||||
|
|
||||||
@privileged
|
@privileged
|
||||||
def enable(service: str):
|
def enable(service: str):
|
||||||
"""Enable a service so that it start on system boot."""
|
"""Enable a service so that it start on system boot."""
|
||||||
_assert_service_is_managed_by_plinth(service)
|
_assert_service_is_managed_by_freedombox(service)
|
||||||
action_utils.service_enable(service)
|
action_utils.service_enable(service)
|
||||||
|
|
||||||
|
|
||||||
@privileged
|
@privileged
|
||||||
def disable(service: str):
|
def disable(service: str):
|
||||||
"""Disable a service so that it does not start on system boot."""
|
"""Disable a service so that it does not start on system boot."""
|
||||||
_assert_service_is_managed_by_plinth(service)
|
_assert_service_is_managed_by_freedombox(service)
|
||||||
action_utils.service_disable(service)
|
action_utils.service_disable(service)
|
||||||
|
|
||||||
|
|
||||||
@privileged
|
@privileged
|
||||||
def restart(service: str):
|
def restart(service: str):
|
||||||
"""Restart a service."""
|
"""Restart a service."""
|
||||||
_assert_service_is_managed_by_plinth(service)
|
_assert_service_is_managed_by_freedombox(service)
|
||||||
action_utils.service_restart(service)
|
action_utils.service_restart(service)
|
||||||
|
|
||||||
|
|
||||||
@privileged
|
@privileged
|
||||||
def try_restart(service: str):
|
def try_restart(service: str):
|
||||||
"""Restart a service if it is running."""
|
"""Restart a service if it is running."""
|
||||||
_assert_service_is_managed_by_plinth(service)
|
_assert_service_is_managed_by_freedombox(service)
|
||||||
action_utils.service_try_restart(service)
|
action_utils.service_try_restart(service)
|
||||||
|
|
||||||
|
|
||||||
@privileged
|
@privileged
|
||||||
def reload(service: str):
|
def reload(service: str):
|
||||||
"""Reload a service."""
|
"""Reload a service."""
|
||||||
_assert_service_is_managed_by_plinth(service)
|
_assert_service_is_managed_by_freedombox(service)
|
||||||
action_utils.service_reload(service)
|
action_utils.service_reload(service)
|
||||||
|
|
||||||
|
|
||||||
@ -72,41 +72,41 @@ def try_reload_or_restart(service: str):
|
|||||||
|
|
||||||
Do nothing if service is not running.
|
Do nothing if service is not running.
|
||||||
"""
|
"""
|
||||||
_assert_service_is_managed_by_plinth(service)
|
_assert_service_is_managed_by_freedombox(service)
|
||||||
action_utils.service_try_reload_or_restart(service)
|
action_utils.service_try_reload_or_restart(service)
|
||||||
|
|
||||||
|
|
||||||
@privileged
|
@privileged
|
||||||
def mask(service: str):
|
def mask(service: str):
|
||||||
"""Mask a service."""
|
"""Mask a service."""
|
||||||
_assert_service_is_managed_by_plinth(service)
|
_assert_service_is_managed_by_freedombox(service)
|
||||||
action_utils.service_mask(service)
|
action_utils.service_mask(service)
|
||||||
|
|
||||||
|
|
||||||
@privileged
|
@privileged
|
||||||
def unmask(service: str):
|
def unmask(service: str):
|
||||||
"""Unmask a service."""
|
"""Unmask a service."""
|
||||||
_assert_service_is_managed_by_plinth(service)
|
_assert_service_is_managed_by_freedombox(service)
|
||||||
action_utils.service_unmask(service)
|
action_utils.service_unmask(service)
|
||||||
|
|
||||||
|
|
||||||
@privileged
|
@privileged
|
||||||
def is_enabled(service: str) -> bool:
|
def is_enabled(service: str) -> bool:
|
||||||
"""Return whether a service is enabled."""
|
"""Return whether a service is enabled."""
|
||||||
_assert_service_is_managed_by_plinth(service)
|
_assert_service_is_managed_by_freedombox(service)
|
||||||
return action_utils.service_is_enabled(service)
|
return action_utils.service_is_enabled(service)
|
||||||
|
|
||||||
|
|
||||||
@privileged
|
@privileged
|
||||||
def is_running(service: str) -> bool:
|
def is_running(service: str) -> bool:
|
||||||
"""Return whether a service is running."""
|
"""Return whether a service is running."""
|
||||||
_assert_service_is_managed_by_plinth(service)
|
_assert_service_is_managed_by_freedombox(service)
|
||||||
return action_utils.service_is_running(service)
|
return action_utils.service_is_running(service)
|
||||||
|
|
||||||
|
|
||||||
@privileged
|
@privileged
|
||||||
def get_logs(service: str) -> dict[str, str]:
|
def get_logs(service: str) -> dict[str, str]:
|
||||||
_assert_service_is_managed_by_plinth(service)
|
_assert_service_is_managed_by_freedombox(service)
|
||||||
return {
|
return {
|
||||||
'unit': service,
|
'unit': service,
|
||||||
'description': action_utils.service_show(service)['Description'],
|
'description': action_utils.service_show(service)['Description'],
|
||||||
@ -139,7 +139,7 @@ def _get_managed_services():
|
|||||||
return services
|
return services
|
||||||
|
|
||||||
|
|
||||||
def _assert_service_is_managed_by_plinth(service_name):
|
def _assert_service_is_managed_by_freedombox(service_name):
|
||||||
managed_services = _get_managed_services()
|
managed_services = _get_managed_services()
|
||||||
if service_name not in managed_services:
|
if service_name not in managed_services:
|
||||||
msg = ("The service '%s' is not managed by FreedomBox. Access is only "
|
msg = ("The service '%s' is not managed by FreedomBox. Access is only "
|
||||||
|
|||||||
@ -12,7 +12,7 @@ backups_ssh_path = None
|
|||||||
# provide backups_ssh_path and either a password or a keyfile for ssh tests
|
# provide backups_ssh_path and either a password or a keyfile for ssh tests
|
||||||
backups_ssh_password = None
|
backups_ssh_password = None
|
||||||
backups_ssh_keyfile = None
|
backups_ssh_keyfile = None
|
||||||
backups_ssh_repo_uuid = 'plinth_test_sshfs' # will be mounted to /media/<uuid>
|
backups_ssh_repo_uuid = 'fbx_test_sshfs' # will be mounted to /media/<uuid>
|
||||||
|
|
||||||
# An existing admin account for privileged actions. If this admin account
|
# An existing admin account for privileged actions. If this admin account
|
||||||
# doesn't exist and no other admin accounts exist, a random admin account is
|
# doesn't exist and no other admin accounts exist, a random admin account is
|
||||||
|
|||||||
@ -345,7 +345,8 @@ def test_app_has_logs(app_with_components):
|
|||||||
assert not app.has_diagnostics()
|
assert not app.has_diagnostics()
|
||||||
|
|
||||||
|
|
||||||
@patch('freedombox.privileged.service._assert_service_is_managed_by_plinth')
|
@patch(
|
||||||
|
'freedombox.privileged.service._assert_service_is_managed_by_freedombox')
|
||||||
@patch('freedombox.action_utils.service_get_logs')
|
@patch('freedombox.action_utils.service_get_logs')
|
||||||
@patch('freedombox.action_utils.service_show')
|
@patch('freedombox.action_utils.service_show')
|
||||||
def test_app_get_logs(service_show, service_get_logs, _, app_with_components,
|
def test_app_get_logs(service_show, service_get_logs, _, app_with_components,
|
||||||
|
|||||||
@ -14,7 +14,7 @@ from freedombox.utils import import_from_gi
|
|||||||
ethernet_settings = {
|
ethernet_settings = {
|
||||||
'common': {
|
'common': {
|
||||||
'type': '802-3-ethernet',
|
'type': '802-3-ethernet',
|
||||||
'name': 'plinth_test_eth',
|
'name': 'fbx_test_eth',
|
||||||
'interface': 'eth0',
|
'interface': 'eth0',
|
||||||
'zone': 'internal',
|
'zone': 'internal',
|
||||||
'dns_over_tls': 'opportunistic',
|
'dns_over_tls': 'opportunistic',
|
||||||
@ -34,7 +34,7 @@ ethernet_settings = {
|
|||||||
wifi_settings = {
|
wifi_settings = {
|
||||||
'common': {
|
'common': {
|
||||||
'type': '802-11-wireless',
|
'type': '802-11-wireless',
|
||||||
'name': 'plinth_test_wifi',
|
'name': 'fbx_test_wifi',
|
||||||
'interface': 'wlan0',
|
'interface': 'wlan0',
|
||||||
'zone': 'external',
|
'zone': 'external',
|
||||||
'dns_over_tls': 'yes',
|
'dns_over_tls': 'yes',
|
||||||
@ -50,7 +50,7 @@ wifi_settings = {
|
|||||||
'second_dns': '',
|
'second_dns': '',
|
||||||
},
|
},
|
||||||
'wireless': {
|
'wireless': {
|
||||||
'ssid': 'plinthtestwifi',
|
'ssid': 'fbxtestwifi',
|
||||||
'mode': 'adhoc',
|
'mode': 'adhoc',
|
||||||
'auth_mode': 'open',
|
'auth_mode': 'open',
|
||||||
'band': 'a',
|
'band': 'a',
|
||||||
@ -62,7 +62,7 @@ wifi_settings = {
|
|||||||
pppoe_settings = {
|
pppoe_settings = {
|
||||||
'common': {
|
'common': {
|
||||||
'type': 'pppoe',
|
'type': 'pppoe',
|
||||||
'name': 'plinth_test_pppoe',
|
'name': 'fbx_test_pppoe',
|
||||||
'interface': 'eth1',
|
'interface': 'eth1',
|
||||||
'zone': 'internal',
|
'zone': 'internal',
|
||||||
},
|
},
|
||||||
@ -139,18 +139,18 @@ def test_get_connection_list(network):
|
|||||||
connections = network.get_connection_list()
|
connections = network.get_connection_list()
|
||||||
connection_names = [conn['name'] for conn in connections]
|
connection_names = [conn['name'] for conn in connections]
|
||||||
|
|
||||||
assert 'plinth_test_eth' in connection_names
|
assert 'fbx_test_eth' in connection_names
|
||||||
assert 'plinth_test_wifi' in connection_names
|
assert 'fbx_test_wifi' in connection_names
|
||||||
assert 'plinth_test_pppoe' in connection_names
|
assert 'fbx_test_pppoe' in connection_names
|
||||||
|
|
||||||
|
|
||||||
def test_get_connection(network, ethernet_uuid, wifi_uuid):
|
def test_get_connection(network, ethernet_uuid, wifi_uuid):
|
||||||
"""Check that we can get a connection by name."""
|
"""Check that we can get a connection by name."""
|
||||||
connection = network.get_connection(ethernet_uuid)
|
connection = network.get_connection(ethernet_uuid)
|
||||||
assert connection.get_id() == 'plinth_test_eth'
|
assert connection.get_id() == 'fbx_test_eth'
|
||||||
|
|
||||||
connection = network.get_connection(wifi_uuid)
|
connection = network.get_connection(wifi_uuid)
|
||||||
assert connection.get_id() == 'plinth_test_wifi'
|
assert connection.get_id() == 'fbx_test_wifi'
|
||||||
|
|
||||||
with pytest.raises(network.ConnectionNotFound):
|
with pytest.raises(network.ConnectionNotFound):
|
||||||
network.get_connection('x-invalid-network-id')
|
network.get_connection('x-invalid-network-id')
|
||||||
@ -160,7 +160,7 @@ def test_edit_ethernet_connection(network, ethernet_uuid):
|
|||||||
"""Check that we can update an ethernet connection."""
|
"""Check that we can update an ethernet connection."""
|
||||||
connection = network.get_connection(ethernet_uuid)
|
connection = network.get_connection(ethernet_uuid)
|
||||||
ethernet_settings2 = copy.deepcopy(ethernet_settings)
|
ethernet_settings2 = copy.deepcopy(ethernet_settings)
|
||||||
ethernet_settings2['common']['name'] = 'plinth_test_eth_new'
|
ethernet_settings2['common']['name'] = 'fbx_test_eth_new'
|
||||||
ethernet_settings2['common']['interface'] = 'eth1'
|
ethernet_settings2['common']['interface'] = 'eth1'
|
||||||
ethernet_settings2['common']['zone'] = 'external'
|
ethernet_settings2['common']['zone'] = 'external'
|
||||||
ethernet_settings2['common']['dns_over_tls'] = 'no'
|
ethernet_settings2['common']['dns_over_tls'] = 'no'
|
||||||
@ -169,7 +169,7 @@ def test_edit_ethernet_connection(network, ethernet_uuid):
|
|||||||
network.edit_connection(connection, ethernet_settings2)
|
network.edit_connection(connection, ethernet_settings2)
|
||||||
|
|
||||||
connection = network.get_connection(ethernet_uuid)
|
connection = network.get_connection(ethernet_uuid)
|
||||||
assert connection.get_id() == 'plinth_test_eth_new'
|
assert connection.get_id() == 'fbx_test_eth_new'
|
||||||
|
|
||||||
settings_connection = connection.get_setting_connection()
|
settings_connection = connection.get_setting_connection()
|
||||||
assert settings_connection.get_interface_name() == 'eth1'
|
assert settings_connection.get_interface_name() == 'eth1'
|
||||||
@ -185,7 +185,7 @@ def test_edit_pppoe_connection(network, pppoe_uuid):
|
|||||||
"""Check that we can update a PPPoE connection."""
|
"""Check that we can update a PPPoE connection."""
|
||||||
connection = network.get_connection(pppoe_uuid)
|
connection = network.get_connection(pppoe_uuid)
|
||||||
pppoe_settings2 = copy.deepcopy(pppoe_settings)
|
pppoe_settings2 = copy.deepcopy(pppoe_settings)
|
||||||
pppoe_settings2['common']['name'] = 'plinth_test_pppoe_new'
|
pppoe_settings2['common']['name'] = 'fbx_test_pppoe_new'
|
||||||
pppoe_settings2['common']['interface'] = 'eth2'
|
pppoe_settings2['common']['interface'] = 'eth2'
|
||||||
pppoe_settings2['common']['zone'] = 'external'
|
pppoe_settings2['common']['zone'] = 'external'
|
||||||
pppoe_settings2['common']['autoconnect'] = False
|
pppoe_settings2['common']['autoconnect'] = False
|
||||||
@ -194,7 +194,7 @@ def test_edit_pppoe_connection(network, pppoe_uuid):
|
|||||||
network.edit_connection(connection, pppoe_settings2)
|
network.edit_connection(connection, pppoe_settings2)
|
||||||
|
|
||||||
connection = network.get_connection(pppoe_uuid)
|
connection = network.get_connection(pppoe_uuid)
|
||||||
assert connection.get_id() == 'plinth_test_pppoe_new'
|
assert connection.get_id() == 'fbx_test_pppoe_new'
|
||||||
|
|
||||||
settings_connection = connection.get_setting_connection()
|
settings_connection = connection.get_setting_connection()
|
||||||
assert settings_connection.get_interface_name() == 'eth2'
|
assert settings_connection.get_interface_name() == 'eth2'
|
||||||
@ -215,13 +215,13 @@ def test_edit_wifi_connection(network, wifi_uuid):
|
|||||||
"""Check that we can update a wifi connection."""
|
"""Check that we can update a wifi connection."""
|
||||||
connection = network.get_connection(wifi_uuid)
|
connection = network.get_connection(wifi_uuid)
|
||||||
wifi_settings2 = copy.deepcopy(wifi_settings)
|
wifi_settings2 = copy.deepcopy(wifi_settings)
|
||||||
wifi_settings2['common']['name'] = 'plinth_test_wifi_new'
|
wifi_settings2['common']['name'] = 'fbx_test_wifi_new'
|
||||||
wifi_settings2['common']['interface'] = 'wlan1'
|
wifi_settings2['common']['interface'] = 'wlan1'
|
||||||
wifi_settings2['common']['zone'] = 'external'
|
wifi_settings2['common']['zone'] = 'external'
|
||||||
wifi_settings2['common']['dns_over_tls'] = 'opportunistic'
|
wifi_settings2['common']['dns_over_tls'] = 'opportunistic'
|
||||||
wifi_settings2['common']['autoconnect'] = False
|
wifi_settings2['common']['autoconnect'] = False
|
||||||
wifi_settings2['ipv4']['method'] = 'auto'
|
wifi_settings2['ipv4']['method'] = 'auto'
|
||||||
wifi_settings2['wireless']['ssid'] = 'plinthtestwifi2'
|
wifi_settings2['wireless']['ssid'] = 'fbxtestwifi2'
|
||||||
wifi_settings2['wireless']['mode'] = 'infrastructure'
|
wifi_settings2['wireless']['mode'] = 'infrastructure'
|
||||||
wifi_settings2['wireless']['auth_mode'] = 'wpa'
|
wifi_settings2['wireless']['auth_mode'] = 'wpa'
|
||||||
wifi_settings2['wireless']['passphrase'] = 'secretpassword'
|
wifi_settings2['wireless']['passphrase'] = 'secretpassword'
|
||||||
@ -229,7 +229,7 @@ def test_edit_wifi_connection(network, wifi_uuid):
|
|||||||
|
|
||||||
connection = network.get_connection(wifi_uuid)
|
connection = network.get_connection(wifi_uuid)
|
||||||
|
|
||||||
assert connection.get_id() == 'plinth_test_wifi_new'
|
assert connection.get_id() == 'fbx_test_wifi_new'
|
||||||
|
|
||||||
settings_connection = connection.get_setting_connection()
|
settings_connection = connection.get_setting_connection()
|
||||||
assert settings_connection.get_interface_name() == 'wlan1'
|
assert settings_connection.get_interface_name() == 'wlan1'
|
||||||
@ -238,9 +238,8 @@ def test_edit_wifi_connection(network, wifi_uuid):
|
|||||||
assert not settings_connection.get_autoconnect()
|
assert not settings_connection.get_autoconnect()
|
||||||
|
|
||||||
settings_wireless = connection.get_setting_wireless()
|
settings_wireless = connection.get_setting_wireless()
|
||||||
assert settings_wireless.get_ssid().get_data() == b'plinthtestwifi2'
|
assert settings_wireless.get_ssid().get_data() == b'fbxtestwifi2'
|
||||||
assert settings_wireless.get_ssid().get_data().decode(
|
assert settings_wireless.get_ssid().get_data().decode() == 'fbxtestwifi2'
|
||||||
) == 'plinthtestwifi2'
|
|
||||||
assert settings_wireless.get_mode() == 'infrastructure'
|
assert settings_wireless.get_mode() == 'infrastructure'
|
||||||
|
|
||||||
wifi_sec = connection.get_setting_wireless_security()
|
wifi_sec = connection.get_setting_wireless_security()
|
||||||
@ -310,7 +309,7 @@ def test_wifi_manual_ipv4_address(network, wifi_uuid):
|
|||||||
wifi_settings2['ipv4']['gateway'] = '169.254.0.254'
|
wifi_settings2['ipv4']['gateway'] = '169.254.0.254'
|
||||||
wifi_settings2['ipv4']['dns'] = '1.2.3.4'
|
wifi_settings2['ipv4']['dns'] = '1.2.3.4'
|
||||||
wifi_settings2['ipv4']['second_dns'] = '1.2.3.5'
|
wifi_settings2['ipv4']['second_dns'] = '1.2.3.5'
|
||||||
wifi_settings2['wireless']['ssid'] = 'plinthtestwifi'
|
wifi_settings2['wireless']['ssid'] = 'fbxtestwifi'
|
||||||
wifi_settings2['wireless']['mode'] = 'adhoc'
|
wifi_settings2['wireless']['mode'] = 'adhoc'
|
||||||
wifi_settings2['wireless']['auth_mode'] = 'open'
|
wifi_settings2['wireless']['auth_mode'] = 'open'
|
||||||
network.edit_connection(connection, wifi_settings2)
|
network.edit_connection(connection, wifi_settings2)
|
||||||
@ -338,7 +337,7 @@ def test_wifi_manual_ipv6_address(network, wifi_uuid):
|
|||||||
wifi_settings2['ipv6']['gateway'] = '::ffff:169.254.0.254'
|
wifi_settings2['ipv6']['gateway'] = '::ffff:169.254.0.254'
|
||||||
wifi_settings2['ipv6']['dns'] = '::ffff:1.2.3.4'
|
wifi_settings2['ipv6']['dns'] = '::ffff:1.2.3.4'
|
||||||
wifi_settings2['ipv6']['second_dns'] = '::ffff:1.2.3.5'
|
wifi_settings2['ipv6']['second_dns'] = '::ffff:1.2.3.5'
|
||||||
wifi_settings2['wireless']['ssid'] = 'plinthtestwifi'
|
wifi_settings2['wireless']['ssid'] = 'fbxtestwifi'
|
||||||
wifi_settings2['wireless']['mode'] = 'adhoc'
|
wifi_settings2['wireless']['mode'] = 'adhoc'
|
||||||
wifi_settings2['wireless']['auth_mode'] = 'open'
|
wifi_settings2['wireless']['auth_mode'] = 'open'
|
||||||
network.edit_connection(connection, wifi_settings2)
|
network.edit_connection(connection, wifi_settings2)
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user