|
6 | 6 | import copy |
7 | 7 | import json |
8 | 8 | import warnings |
| 9 | +import deepdiff |
9 | 10 | from enum import Enum, auto |
10 | 11 | from typing import Any, Dict, List, Tuple, Union |
11 | 12 | from dataclasses import asdict |
12 | 13 |
|
13 | 14 | from azext_confcom.lib.aci_policy_spec import AciFragmentSpec |
14 | 15 | from azext_confcom.lib.arm_to_aci_policy_spec import arm_to_aci_policy_spec |
15 | | -import deepdiff |
16 | | -from azext_confcom import config, os_util |
| 16 | +from azext_confcom import (config, os_util) |
17 | 17 | from azext_confcom.container import ContainerImage, UserContainerImage |
18 | 18 | from azext_confcom.errors import eprint |
19 | 19 | from azext_confcom.fragment_util import sanitize_fragment_fields |
20 | | -from azext_confcom.oras_proxy import create_list_of_standalone_imports |
21 | 20 | from azext_confcom.rootfs_proxy import SecurityPolicyProxy |
22 | 21 | from azext_confcom.template_util import (case_insensitive_dict_get, |
23 | 22 | compare_env_vars, |
24 | 23 | convert_config_v0_to_v1, |
25 | 24 | convert_to_pod_spec, |
26 | 25 | decompose_confidential_properties, |
27 | 26 | detect_old_format, |
28 | | - extract_confidential_properties, |
29 | 27 | extract_lifecycle_hook, extract_probe, |
30 | | - extract_standalone_fragments, |
31 | 28 | filter_non_pod_resources, |
32 | 29 | get_container_diff, get_diff_size, |
33 | 30 | get_image_info, |
34 | 31 | get_tar_location_from_mapping, |
35 | | - get_values_for_params, |
36 | 32 | get_volume_claim_templates, |
37 | 33 | is_sidecar, pretty_print_func, |
38 | 34 | print_func, process_configmap, |
39 | 35 | process_env_vars_from_config, |
40 | | - process_env_vars_from_template, |
41 | 36 | process_env_vars_from_yaml, |
42 | 37 | process_fragment_imports, |
43 | | - process_mounts, |
44 | 38 | process_mounts_from_config, |
45 | 39 | readable_diff) |
46 | 40 | from knack.log import get_logger |
@@ -643,7 +637,8 @@ def load_policy_from_arm_template_str( |
643 | 637 |
|
644 | 638 | aci_policies = [] |
645 | 639 |
|
646 | | - fragments = sorted([ |
| 640 | + fragments = sorted( |
| 641 | + [ |
647 | 642 | AciFragmentSpec( |
648 | 643 | feed=fragment["feed"], |
649 | 644 | issuer=fragment["issuer"], |
@@ -676,6 +671,7 @@ def load_policy_from_arm_template_str( |
676 | 671 | # Fragments are already parsed |
677 | 672 | True, |
678 | 673 | )) |
| 674 | + # Catch broad exception since we don't want to assume what errors might occur pylint: disable=W0718 |
679 | 675 | except Exception as e: |
680 | 676 | eprint(f"Error processing ARM template: {e}") |
681 | 677 |
|
|
0 commit comments