catalystwan 0.41.2.dev2__py3-none-any.whl → 0.41.2.dev3__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.
- catalystwan/utils/feature_template/find_template_values.py +5 -5
- {catalystwan-0.41.2.dev2.dist-info → catalystwan-0.41.2.dev3.dist-info}/METADATA +1 -1
- {catalystwan-0.41.2.dev2.dist-info → catalystwan-0.41.2.dev3.dist-info}/RECORD +5 -5
- {catalystwan-0.41.2.dev2.dist-info → catalystwan-0.41.2.dev3.dist-info}/LICENSE +0 -0
- {catalystwan-0.41.2.dev2.dist-info → catalystwan-0.41.2.dev3.dist-info}/WHEEL +0 -0
|
@@ -11,7 +11,7 @@ def find_template_values(
|
|
|
11
11
|
template_definition: dict,
|
|
12
12
|
templated_values: Optional[dict] = None,
|
|
13
13
|
target_key: str = "vipType",
|
|
14
|
-
|
|
14
|
+
target_key_default_values: List[str] = ["ignore", "notIgnore"],
|
|
15
15
|
target_key_for_template_value: str = "vipValue",
|
|
16
16
|
path: Optional[List[str]] = None,
|
|
17
17
|
) -> Dict[str, Union[str, list, dict]]:
|
|
@@ -22,8 +22,8 @@ def find_template_values(
|
|
|
22
22
|
templated_values: dictionary, empty at the beginning and filed out with names of fields as keys
|
|
23
23
|
and values of those fields as values
|
|
24
24
|
target_key: name of the key specifying if field is used in template, defaults to 'vipType'
|
|
25
|
-
|
|
26
|
-
that field is not used in template, defaults to 'ignore'
|
|
25
|
+
target_key_default_values: list of values of the target key indicating
|
|
26
|
+
that a field is not used in template, defaults to ['ignore', 'notIgnore']
|
|
27
27
|
target_key_for_template_value: name of the key specifying value of field used in template,
|
|
28
28
|
defaults to 'vipValue'
|
|
29
29
|
path: a list of keys indicating current path, defaults to None
|
|
@@ -36,7 +36,7 @@ def find_template_values(
|
|
|
36
36
|
templated_values = {}
|
|
37
37
|
# if value object is reached, try to extract the value
|
|
38
38
|
if target_key in template_definition:
|
|
39
|
-
if template_definition[target_key]
|
|
39
|
+
if template_definition[target_key] in target_key_default_values:
|
|
40
40
|
return templated_values
|
|
41
41
|
|
|
42
42
|
value = template_definition[target_key] # vipType
|
|
@@ -88,7 +88,7 @@ def find_template_values(
|
|
|
88
88
|
|
|
89
89
|
# iterate the dict to extract values and assign them to their fields
|
|
90
90
|
for key, value in template_definition.items():
|
|
91
|
-
if isinstance(value, dict) and value
|
|
91
|
+
if isinstance(value, dict) and value not in target_key_default_values:
|
|
92
92
|
find_template_values(value, templated_values, path=path + [key])
|
|
93
93
|
return templated_values
|
|
94
94
|
|
|
@@ -614,7 +614,7 @@ catalystwan/utils/dashboard.py,sha256=5DBDdnFuNEebo9R8UpXDETrYJsfZp-vv9OCr9ahU6V
|
|
|
614
614
|
catalystwan/utils/device_model.py,sha256=IPEQD7yYyhCH91Uw9P-dF34TcIEimYEnImYVaaQOjRY,15996
|
|
615
615
|
catalystwan/utils/dict.py,sha256=1IC4pcPFQ7yS39-ZWSFwyCvQKYzfZoxsz3YtJ-S6l7w,2110
|
|
616
616
|
catalystwan/utils/feature_template/choose_model.py,sha256=JoQ7l_TF2PTH8bciOSVAFavevo35n2F4DbusIIvapM8,953
|
|
617
|
-
catalystwan/utils/feature_template/find_template_values.py,sha256=
|
|
617
|
+
catalystwan/utils/feature_template/find_template_values.py,sha256=nEi-hFmOaX5cHeS4VBSJmhxIl3jOn42o6mNSkS9Htak,5405
|
|
618
618
|
catalystwan/utils/model.py,sha256=UCqpk2kpgT8YYRp4prv9kmR4ciBNvQDCl3ZB8Ln941k,1506
|
|
619
619
|
catalystwan/utils/operation_status.py,sha256=SeT34c_x8F98mwl9x0-klvGTMKbrKSTY_w0zaKyuds8,584
|
|
620
620
|
catalystwan/utils/persona.py,sha256=fZEMM2wgvvSuNaGwsLk-qWJUuZzkhYm1C3YUnRGOqRw,147
|
|
@@ -630,7 +630,7 @@ catalystwan/version.py,sha256=X5yIMPIrWPbdoF9eJfwxfjcvWr7JMfWQF98hQhlGB5I,3032
|
|
|
630
630
|
catalystwan/vmanage_auth.py,sha256=UZ57lTihsLsXw4AdU7Vn8XuY1jo3732Vc9WuFoHSiiQ,10780
|
|
631
631
|
catalystwan/workflows/backup_restore_device_templates.py,sha256=BoR2KlRbpCI6RxIWG7j7tucaLpw5w3ESN20dLhsrZFY,19796
|
|
632
632
|
catalystwan/workflows/tenant_migration.py,sha256=4KLbqUwH4gEegE92PCGfRd226eZd_crCUpaYUWoGXDI,9790
|
|
633
|
-
catalystwan-0.41.2.
|
|
634
|
-
catalystwan-0.41.2.
|
|
635
|
-
catalystwan-0.41.2.
|
|
636
|
-
catalystwan-0.41.2.
|
|
633
|
+
catalystwan-0.41.2.dev3.dist-info/LICENSE,sha256=97ROi91Vxrj_Jio2v8FI9E8-y6x2uYdQRaFlrEbVjkc,11375
|
|
634
|
+
catalystwan-0.41.2.dev3.dist-info/METADATA,sha256=iybP_OPjLu0oQTJ85SRS2jI36eJNhnmgGpeuCGEDJMw,21275
|
|
635
|
+
catalystwan-0.41.2.dev3.dist-info/WHEEL,sha256=b4K_helf-jlQoXBBETfwnf4B04YC67LOev0jo4fX5m8,88
|
|
636
|
+
catalystwan-0.41.2.dev3.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|