catocli 2.0.0__py3-none-any.whl → 2.0.1__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.
Potentially problematic release.
This version of catocli might be problematic. Click here for more details.
- catocli/__init__.py +1 -1
- catocli/parsers/custom/import_rules_to_tf/import_rules_to_tf.py +4 -4
- {catocli-2.0.0.dist-info → catocli-2.0.1.dist-info}/METADATA +1 -1
- {catocli-2.0.0.dist-info → catocli-2.0.1.dist-info}/RECORD +8 -8
- {catocli-2.0.0.dist-info → catocli-2.0.1.dist-info}/LICENSE +0 -0
- {catocli-2.0.0.dist-info → catocli-2.0.1.dist-info}/WHEEL +0 -0
- {catocli-2.0.0.dist-info → catocli-2.0.1.dist-info}/entry_points.txt +0 -0
- {catocli-2.0.0.dist-info → catocli-2.0.1.dist-info}/top_level.txt +0 -0
catocli/__init__.py
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
__version__ = "2.0.
|
|
1
|
+
__version__ = "2.0.1"
|
|
2
2
|
__cato_host__ = "https://api.catonetworks.com/api/v1/graphql2"
|
|
@@ -135,7 +135,7 @@ def import_sections(sections, module_name, verbose=False,
|
|
|
135
135
|
section_id = section['section_id']
|
|
136
136
|
section_name = section['section_name']
|
|
137
137
|
section_index = section['section_index']
|
|
138
|
-
resource_address = f'{module_name}.{resource_type}.{resource_name}["{str(
|
|
138
|
+
resource_address = f'{module_name}.{resource_type}.{resource_name}["{str(section_name)}"]'
|
|
139
139
|
print(f"\n[{i+1}/{total_sections}] Section: {section_name} (index: {section_index})")
|
|
140
140
|
|
|
141
141
|
# For sections, we use the section name as the ID since that's how Cato identifies them
|
|
@@ -166,7 +166,7 @@ def import_rules(rules, module_name, verbose=False,
|
|
|
166
166
|
terraform_key = sanitize_name_for_terraform(rule_name)
|
|
167
167
|
|
|
168
168
|
# Use array index syntax instead of rule ID
|
|
169
|
-
resource_address = f'{module_name}.{resource_type}.{resource_name}["{str(
|
|
169
|
+
resource_address = f'{module_name}.{resource_type}.{resource_name}["{str(rule_name)}"]'
|
|
170
170
|
print(f"\n[{i+1}/{total_rules}] Rule: {rule_name} (index: {rule_index})")
|
|
171
171
|
|
|
172
172
|
success, stdout, stderr = run_terraform_import(resource_address, rule_id, verbose=verbose)
|
|
@@ -439,7 +439,7 @@ def import_wf_sections(sections, module_name, verbose=False,
|
|
|
439
439
|
section_id = section['section_id']
|
|
440
440
|
section_name = section['section_name']
|
|
441
441
|
section_index = section['section_index']
|
|
442
|
-
resource_address = f'{module_name}.{resource_type}.{resource_name}["{str(
|
|
442
|
+
resource_address = f'{module_name}.{resource_type}.{resource_name}["{str(section_name)}"]'
|
|
443
443
|
print(f"\n[{i+1}/{total_sections}] Section: {section_name} (index: {section_index})")
|
|
444
444
|
|
|
445
445
|
# For sections, we use the section name as the ID since that's how Cato identifies them
|
|
@@ -470,7 +470,7 @@ def import_wf_rules(rules, module_name, verbose=False,
|
|
|
470
470
|
terraform_key = sanitize_name_for_terraform(rule_name)
|
|
471
471
|
|
|
472
472
|
# Use array index syntax instead of rule ID
|
|
473
|
-
resource_address = f'{module_name}.{resource_type}.{resource_name}["{str(
|
|
473
|
+
resource_address = f'{module_name}.{resource_type}.{resource_name}["{str(rule_name)}"]'
|
|
474
474
|
print(f"\n[{i+1}/{total_rules}] Rule: {rule_name} (index: {rule_index})")
|
|
475
475
|
|
|
476
476
|
success, stdout, stderr = run_terraform_import(resource_address, rule_id, verbose=verbose)
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
catocli/__init__.py,sha256=
|
|
1
|
+
catocli/__init__.py,sha256=YFTvdILKssU1ok-1GIEs3MUEPli_sg0xTPrGqkTCi2o,85
|
|
2
2
|
catocli/__main__.py,sha256=6Z0ns_k_kUcz1Qtrn1u7UyUnqB-3e85jM_nppOwFsv4,217
|
|
3
3
|
catocli/Utils/clidriver.py,sha256=RAz_O0tHgXHOFluWNqufO1dsH4sXeoN60FGMHR9D9rU,11215
|
|
4
4
|
catocli/Utils/profile_manager.py,sha256=Stch-cU2rLA7r07hETIRsvG_JxpQx3Q42QwpfD7Qd2I,6379
|
|
@@ -12,7 +12,7 @@ catocli/parsers/custom/customLib.py,sha256=G8-GOekHU39PwocNEZFks5wemnJy2sT5S_M0R
|
|
|
12
12
|
catocli/parsers/custom/export_rules/__init__.py,sha256=2oC-gw4EA1ijuNv8F6ovvYDYEU3OMo4JUqRhDjmRzCc,2075
|
|
13
13
|
catocli/parsers/custom/export_rules/export_rules.py,sha256=8SX_3AV74x7i8cjX1dvBx7Rz2gEtZOHrqBx6c0RnOeA,21767
|
|
14
14
|
catocli/parsers/custom/import_rules_to_tf/__init__.py,sha256=5uVZuPfzCX3a6ZA-jK8oNi226dURyFFjGGCb5sHtv44,3673
|
|
15
|
-
catocli/parsers/custom/import_rules_to_tf/import_rules_to_tf.py,sha256=
|
|
15
|
+
catocli/parsers/custom/import_rules_to_tf/import_rules_to_tf.py,sha256=Joc-abqkr7NS4hhldMfWknlATC4eUEj6TsLi0CNQpt4,23402
|
|
16
16
|
catocli/parsers/mutation/README.md,sha256=mdOfOY0sOVGnf9q-GVgtGc7mtxFKigD9q0ILJAw8l0I,32
|
|
17
17
|
catocli/parsers/mutation_accountManagement/README.md,sha256=8ipbdTU8FAAfiH3IYlTZkTbLpPtO0fMblra7Zi8vwAI,249
|
|
18
18
|
catocli/parsers/mutation_accountManagement/__init__.py,sha256=aXfaRv2DHprS8rZztqSVwYF4xS4Izc02npAB7-jIR3E,3560
|
|
@@ -473,9 +473,9 @@ vendor/urllib3/util/timeout.py,sha256=4eT1FVeZZU7h7mYD1Jq2OXNe4fxekdNvhoWUkZusRp
|
|
|
473
473
|
vendor/urllib3/util/url.py,sha256=wHORhp80RAXyTlAIkTqLFzSrkU7J34ZDxX-tN65MBZk,15213
|
|
474
474
|
vendor/urllib3/util/util.py,sha256=j3lbZK1jPyiwD34T8IgJzdWEZVT-4E-0vYIJi9UjeNA,1146
|
|
475
475
|
vendor/urllib3/util/wait.py,sha256=_ph8IrUR3sqPqi0OopQgJUlH4wzkGeM5CiyA7XGGtmI,4423
|
|
476
|
-
catocli-2.0.
|
|
477
|
-
catocli-2.0.
|
|
478
|
-
catocli-2.0.
|
|
479
|
-
catocli-2.0.
|
|
480
|
-
catocli-2.0.
|
|
481
|
-
catocli-2.0.
|
|
476
|
+
catocli-2.0.1.dist-info/LICENSE,sha256=xx0jnfkXJvxRnG63LTGOxlggYnIysveWIZ6H3PNdCrQ,11357
|
|
477
|
+
catocli-2.0.1.dist-info/METADATA,sha256=Ko59qOStL4p1GUL_DJJQU0BtqkkNkwDmNotxKpO8sRI,1264
|
|
478
|
+
catocli-2.0.1.dist-info/WHEEL,sha256=In9FTNxeP60KnTkGw7wk6mJPYd_dQSjEZmXdBdMCI-8,91
|
|
479
|
+
catocli-2.0.1.dist-info/entry_points.txt,sha256=p4k9Orre6aWcqVrNmBbckmCs39h-1naMxRo2AjWmWZ4,50
|
|
480
|
+
catocli-2.0.1.dist-info/top_level.txt,sha256=uiIWEVkizgM3Fo8b4cWwGhXaLi-mGzETdeLd4-yNOdE,66
|
|
481
|
+
catocli-2.0.1.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|