Пример #1
0
    def connect(self, ssid, password):
        if nm.get_connection_by_ssid(ssid):
            nm.del_connection_by_ssid(ssid)

        nm.make_connection_for(ssid, password)

        states.set_state('CONNECTING', [ssid, ssid])
Пример #2
0
        def to_fn(ssid, password):
            if nm.get_connection_by_ssid(ssid):
                nm.del_connection_by_ssid(ssid)

            nm.make_connection_for(ssid, password)

            states.set_state('CONNECTING', [ssid, ssid])
            return False
Пример #3
0
        def to_fn(ssid, password):
            if nm.get_connection_by_ssid(ssid):
                nm.del_connection_by_ssid(ssid)

            nm.make_connection_for(
                ssid, password, link_local=conf.getboolean("ipv6_link_local")
            )

            states.set_state("CONNECTING", [ssid, ssid])
            return False
Пример #4
0
def test_no_conn(no_connections_fxt):
    assert nm.get_connection_by_ssid('ssid') is None
Пример #5
0
def test_get_connection_by_ssid(connections_fxt):
    assert nm.get_connection_by_ssid("myssid")
    assert not nm.get_connection_by_ssid("bogusssid")
Пример #6
0
def assure_hotspot(ssid: str, device: NetworkManager.Device,
                   password: str) -> None:
    nm.del_connection_by_ssid(ssid)
    if not nm.get_connection_by_ssid(ssid):
        nm.make_hotspot(ssid, device, password)
Пример #7
0
def assure_hotspot(ssid, device):
    log.debug("states: Calling nm.get_connection_by_ssid()")
    if not nm.get_connection_by_ssid(ssid):
        nm.make_hotspot(ssid, device)
Пример #8
0
def test_get_connection_by_ssid(connections_fxt):
    assert nm.get_connection_by_ssid("myssid")
    assert not nm.get_connection_by_ssid("bogusssid")
Пример #9
0
def test_no_conn(no_connections_fxt):
    assert nm.get_connection_by_ssid('ssid') is None