Skip to content

async_driver

scrapli_community.nokia.sros.async_driver

classic_default_async_on_open(conn: AsyncNetworkDriver) -> None async

nokia_sros classic on_open callable

Parameters:

Name Type Description Default
conn AsyncNetworkDriver

AsyncNetworkDriver object

required

Returns:

Type Description
None

None

Source code in nokia/sros/async_driver.py
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
async def classic_default_async_on_open(conn: AsyncNetworkDriver) -> None:
    """
    nokia_sros classic on_open callable

    Args:
        conn: AsyncNetworkDriver object

    Returns:
        None

    Raises:
        N/A
    """
    await conn.acquire_priv(desired_priv=conn.default_desired_privilege_level)
    await conn.send_command(command="environment no more")

default_async_on_close(conn: AsyncNetworkDriver) -> None async

nokia_sros default on_close callable

Parameters:

Name Type Description Default
conn AsyncNetworkDriver

AsyncNetworkDriver object

required

Returns:

Type Description
None

None

Source code in nokia/sros/async_driver.py
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
async def default_async_on_close(conn: AsyncNetworkDriver) -> None:
    """
    nokia_sros default on_close callable

    Args:
        conn: AsyncNetworkDriver object

    Returns:
        None

    Raises:
        N/A

    """
    await conn.acquire_priv(desired_priv=conn.default_desired_privilege_level)
    conn.channel.write(channel_input="logout")
    conn.channel.send_return()

default_async_on_open(conn: AsyncNetworkDriver) -> None async

nokia_sros on_open callable

Parameters:

Name Type Description Default
conn AsyncNetworkDriver

AsyncNetworkDriver object

required

Returns:

Type Description
None

None

Source code in nokia/sros/async_driver.py
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
async def default_async_on_open(conn: AsyncNetworkDriver) -> None:
    """
    nokia_sros on_open callable

    Args:
        conn: AsyncNetworkDriver object

    Returns:
        None

    Raises:
        N/A
    """
    await conn.acquire_priv(desired_priv=conn.default_desired_privilege_level)
    await conn.send_command(command="environment command-completion space false")
    await conn.send_command(command="environment console width 512")
    await conn.send_command(command="environment more false")
    await conn.send_command(command="//environment no more")