nornir-collection 0.0.6__py3-none-any.whl → 0.0.8__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -7,7 +7,6 @@ The functions are ordered as followed:
7
7
  """
8
8
 
9
9
  import time
10
- import sys
11
10
  from nornir.core import Nornir, Task
12
11
  from nornir_collection.utils import (
13
12
  print_task_title,
@@ -94,8 +93,8 @@ def _nc_commit_confirm_testing(nr: Task) -> bool:
94
93
  print(task_name(text=task_text))
95
94
  print(task_result(text=task_text, changed=False, level_name="INFO"))
96
95
  print(f"'{task_text}' -> PythonResponse <Success: True>")
97
- print("-> Sleep 15s seconds before run the Nornir TestsProcessor ...")
98
- sys.sleep(15)
96
+ print("-> Sleep 60s seconds before run the Nornir TestsProcessor ...")
97
+ time.sleep(60)
99
98
 
100
99
  # Run Nornir TestsProcessor for Unit, Integration, and System tests. All tests files with the inventory
101
100
  # key starting with the prefix "cfgtp_{name}_" and are loaded from the inventory.
@@ -227,10 +226,8 @@ def nc_cfg_iosxe_netconf_config(
227
226
  ########################################### WORKAROUND ##################################################
228
227
  # If its a commit-confirm and the cfg_status is True
229
228
  if not disable_commit_confirm and cfg_status:
230
- # Calculate the revert-timer in minutes from the confirm-timeout in seconds
231
- revert_timer = confirm_timeout // 60
232
229
  # Replace the config with a revert-timer right before the commit
233
- cfg_status = rc_replace_config(nr=nr, rebuild=rebuild, verbose=verbose, revert_timer=revert_timer)
230
+ cfg_status = rc_replace_config(nr=nr, rebuild=rebuild, verbose=verbose, revert_timer=confirm_timeout)
234
231
  #########################################################################################################
235
232
 
236
233
  # Start a timer to check how long the commit takes.
@@ -37,6 +37,8 @@ def rc_replace_config(
37
37
 
38
38
  # Set rollback_config to day0-config if rebuild is True, else set it to golden-config
39
39
  rollback_config = "day0-config" if rebuild else "golden-config"
40
+ # Calculate the revert-timer in minutes from the input revert-timer in seconds
41
+ revert_timer = revert_timer // 60 if revert_timer else None
40
42
 
41
43
  # Print the task title if revert_timer is not set
42
44
  if not revert_timer:
@@ -356,8 +356,8 @@ def init_args_for_netconf_cm() -> argparse.Namespace:
356
356
  "--confirm-timeout",
357
357
  type=int,
358
358
  metavar="<INT>",
359
- default=60,
360
- help="set NETCONF commit-confirm timeout in seconds (default: 60s)",
359
+ default=120,
360
+ help="set NETCONF commit-confirm timeout in seconds (default: 120s)",
361
361
  )
362
362
 
363
363
  # Add the optional rebuild argument
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.2
2
2
  Name: nornir-collection
3
- Version: 0.0.6
3
+ Version: 0.0.8
4
4
  Summary: Nornir-Collection contains network automation functions and complete IaC workflows with Nornir and other python libraries. It contains Nornir tasks and general functions in Nornir style.
5
5
  Author: Willi Kubny
6
6
  Author-email: willi.kubny@gmail.ch
@@ -8,19 +8,19 @@ nornir_collection/cisco/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG
8
8
  nornir_collection/cisco/configuration_management/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
9
9
  nornir_collection/cisco/configuration_management/processor.py,sha256=KjhilyyDDiYL7wFemGEWSP16OLeM4dENmrtb20LRssY,6443
10
10
  nornir_collection/cisco/configuration_management/pyats.py,sha256=j9XzG3ttURR0wtu2Se9QQEpG5o2kq9mqDkReNCdWKpk,8932
11
- nornir_collection/cisco/configuration_management/utils.py,sha256=oLrl-sjB7Uvfmo1vxSkL_Z_DZTS2I5WbQfrGGLZeP2k,18639
11
+ nornir_collection/cisco/configuration_management/utils.py,sha256=0o1ZktYNIrmBpQDJ9o7f2j4sYmK__LDBb0JC4cR5iJo,18641
12
12
  nornir_collection/cisco/configuration_management/cli/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
13
13
  nornir_collection/cisco/configuration_management/cli/config_tasks.py,sha256=mWXysgUm6ymNLQjomB1T05QT9A-fdV1aEKFzzDrfCUw,22147
14
14
  nornir_collection/cisco/configuration_management/cli/config_workflow.py,sha256=GIka5SPLZ7M2zCFv8Jadl73QC-InnGopzI8xQt36MfM,3459
15
15
  nornir_collection/cisco/configuration_management/cli/show_tasks.py,sha256=w9p2Iks33-pE4-YztH6vj-eI0MuPI7YD6gZhRcpQF7M,27971
16
16
  nornir_collection/cisco/configuration_management/netconf/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
17
17
  nornir_collection/cisco/configuration_management/netconf/config_tasks.py,sha256=Sig1FNmjcXXWK0zIUp_-sCxZzYjnYjR_HuYguLlIlsA,22120
18
- nornir_collection/cisco/configuration_management/netconf/config_workflow.py,sha256=uVgVTvNhhvPVlZj9IqM5ePTl4QPq5R-fHDO1bq5y8zE,14693
18
+ nornir_collection/cisco/configuration_management/netconf/config_workflow.py,sha256=qxB4DolQL2WJO9JRATzANhIwYPNuKyuN0hI9-ABzJq8,14557
19
19
  nornir_collection/cisco/configuration_management/netconf/nr_cfg_iosxe_netconf.py,sha256=ciG2TkOC1qEtxOIKX0CjAOV3aAt3JOR7VaDvstDDy_s,8614
20
20
  nornir_collection/cisco/configuration_management/netconf/ops_tasks.py,sha256=cj7cpJNvY2bytv9VOqwg_7qOekL-cIL0EjML2KT4TQM,10659
21
21
  nornir_collection/cisco/configuration_management/restconf/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
22
22
  nornir_collection/cisco/configuration_management/restconf/cisco_rpc.py,sha256=tIccCcWegIuTRREz9wd47is4vP0bvvjH2ljB4GaOUKY,18569
23
- nornir_collection/cisco/configuration_management/restconf/config_workflow.py,sha256=Q0xoOqyjyWkHWzVX62wOYOvn4CRIW8Bc16atXJo-qVU,3362
23
+ nornir_collection/cisco/configuration_management/restconf/config_workflow.py,sha256=4UV85L8Cnb62_IJwx5w0NNB7Ohfk-LoR-D-FfEuSEJA,3509
24
24
  nornir_collection/cisco/configuration_management/restconf/tasks.py,sha256=2x5ecw8PE4CZ2lf2q7NZlEQGYRjLJxYzC2udhNmqnGA,12221
25
25
  nornir_collection/cisco/software_upgrade/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
26
26
  nornir_collection/cisco/software_upgrade/cisco_software_upgrade.py,sha256=KX9PKTPsEVAf4DLSDCm4gP_hDUnIxlxXgG5925CYPSo,13138
@@ -52,8 +52,8 @@ nornir_collection/nornir_plugins/inventory/staggered_yaml.py,sha256=nBvUFq7U5zVT
52
52
  nornir_collection/nornir_plugins/inventory/utils.py,sha256=mxIlKK-4PHqCnFKn7Oozu1RW_JB5z1TgEYc-ave70nE,11822
53
53
  nornir_collection/purestorage/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
54
54
  nornir_collection/purestorage/utils.py,sha256=TqU2sKz0ENnmSDEBcSvXPnVkI1DVHOogI68D7l32g7I,1730
55
- nornir_collection-0.0.6.dist-info/LICENSE,sha256=bOPVh1OVNwz2tCjkLaChWT6AoXdtqye3aua5l0tgYJo,1068
56
- nornir_collection-0.0.6.dist-info/METADATA,sha256=dUUN9CQyT4fkU7RxhTJTBt7jVJ1KVqqM8EaeLd4fchY,7137
57
- nornir_collection-0.0.6.dist-info/WHEEL,sha256=In9FTNxeP60KnTkGw7wk6mJPYd_dQSjEZmXdBdMCI-8,91
58
- nornir_collection-0.0.6.dist-info/top_level.txt,sha256=OyCzPWABf-D0AOHm9ihrwdk5eq200BnKna6gIDspwsE,18
59
- nornir_collection-0.0.6.dist-info/RECORD,,
55
+ nornir_collection-0.0.8.dist-info/LICENSE,sha256=bOPVh1OVNwz2tCjkLaChWT6AoXdtqye3aua5l0tgYJo,1068
56
+ nornir_collection-0.0.8.dist-info/METADATA,sha256=b_P_dabmpJcZqTFhSZXGdP7m863rb-t4rxY0Ik_GWfM,7137
57
+ nornir_collection-0.0.8.dist-info/WHEEL,sha256=In9FTNxeP60KnTkGw7wk6mJPYd_dQSjEZmXdBdMCI-8,91
58
+ nornir_collection-0.0.8.dist-info/top_level.txt,sha256=OyCzPWABf-D0AOHm9ihrwdk5eq200BnKna6gIDspwsE,18
59
+ nornir_collection-0.0.8.dist-info/RECORD,,