Skip to content

async_driver

scrapli_community.dlink.os.async_driver

default_async_on_close(conn: AsyncNetworkDriver) -> None async

Async dlink_os default on_close callable

Parameters:

Name Type Description Default
conn AsyncNetworkDriver

AsyncNetworkDriver object

required

Returns:

Type Description
None

N/A

Source code in dlink/os/async_driver.py
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
async def default_async_on_close(conn: AsyncNetworkDriver) -> None:
    """
    Async dlink_os default on_close callable

    Args:
        conn: AsyncNetworkDriver object

    Returns:
        N/A

    Raises:
        N/A

    """
    # write exit directly to the transport as channel would fail to find the prompt after sending
    # the exit command!
    await conn.acquire_priv(desired_priv=conn.default_desired_privilege_level)
    await conn.send_command(command="enable clipaging")
    conn.channel.write(channel_input="exit")
    conn.channel.send_return()

default_async_on_open(conn: AsyncNetworkDriver) -> None async

Async dlink_os default on_open callable

Parameters:

Name Type Description Default
conn AsyncNetworkDriver

AsyncNetworkDriver object

required

Returns:

Type Description
None

N/A

Source code in dlink/os/async_driver.py
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
async def default_async_on_open(conn: AsyncNetworkDriver) -> None:
    """
    Async dlink_os default on_open callable

    Args:
        conn: AsyncNetworkDriver object

    Returns:
        N/A

    Raises:
        N/A

    """
    await conn.acquire_priv(desired_priv=conn.default_desired_privilege_level)
    await conn.send_command(command="disable clipaging")