sync_driver
scrapli_community.mikrotik.routeros.sync_driver
MikrotikRouterOSDriver
¶
Bases: GenericDriver
Source code in mikrotik/routeros/sync_driver.py
26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 |
|
__init__(**kwargs: Any) -> None
¶
Mikrotik RouterOS platform class
Parameters:
Name | Type | Description | Default |
---|---|---|---|
kwargs |
keyword args |
required |
Returns:
Type | Description |
---|---|
None
|
N/A |
Source code in mikrotik/routeros/sync_driver.py
27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 |
|
send_command(command: str, *, strip_prompt: bool = True, failed_when_contains: Optional[Union[str, List[str]]] = None, timeout_ops: Optional[float] = None) -> Response
¶
mikrotik_routeros send_command method
Parameters:
Name | Type | Description | Default |
---|---|---|---|
command |
str
|
string to send to device in privilege exec mode |
required |
strip_prompt |
bool
|
True/False strip prompt from returned output |
True
|
failed_when_contains |
Optional[Union[str, List[str]]]
|
string or list of strings indicating failure if found in response |
None
|
timeout_ops |
Optional[float]
|
timeout ops value for this operation; only sets the timeout_ops value for the duration of the operation, value is reset to initial value after operation is completed |
None
|
Returns:
Name | Type | Description |
---|---|---|
Response |
Response
|
Scrapli Response object |
Source code in mikrotik/routeros/sync_driver.py
48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 |
|
default_sync_on_close(conn: GenericDriver) -> None
¶
mikrotik_routeros default on_close callable
Parameters:
Name | Type | Description | Default |
---|---|---|---|
conn |
GenericDriver
|
GenericDriver object |
required |
Returns:
Type | Description |
---|---|
None
|
N/A |
Source code in mikrotik/routeros/sync_driver.py
8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 |
|