@@ -19,13 +19,15 @@ def options(self):
1919 """returns options from self"""
2020 return self .out
2121
22+
2223 def add (self , key , value ):
2324 """allows method bound addition of options"""
2425 if key not in VALID_RESOURCE_CONFIG_KEYS :
2526 raise DataError (f"attemped to add invalid config key: { key } " )
2627
2728 self .out [key ] = value
2829
30+
2931 def from_json (self , data : dict ):
3032 """generates options from dict"""
3133 self .out = data
@@ -42,7 +44,7 @@ def __init__(
4244 opts : dict ,
4345 validate : bool ,
4446 logger : Logger ,
45- exclude_ids : list [int ] = []
47+ exclude_ids : list [int ] | None = None
4648 ):
4749
4850 self .opts = opts
@@ -72,7 +74,7 @@ def apply(self, data: dict):
7274
7375 data = options_master [o ](data )
7476
75- self .lg .info (f"{ o } set for { self .resource_type } " )
77+ self .lg .debug (f"{ o } set for { self .resource_type } " )
7678
7779 if self .exclude_ids :
7880 data = self ._exclude_ids (data )
@@ -86,15 +88,15 @@ def apply(self, data: dict):
8688 def _validation (self , data ):
8789 """_validation is a parent func for running data validation functions"""
8890
89- self .lg .debug ("validating data..." )
91+ self .lg .info ("validating data..." )
9092
9193 self ._check_illegal_chars (data )
9294 self ._check_duplicates (data )
9395
9496
9597 def _exclude_ids (self , data : dict ) -> dict :
9698 """removes any IDs from the data which have been specifid to be excluded"""
97- self .lg .debug ("excluding ids... %s" , self .exclude_ids )
99+ self .lg .info ("excluding ids... %s" , self .exclude_ids )
98100
99101 to_delete = []
100102 for i in data :
@@ -119,7 +121,7 @@ def _exclude_ids(self, data: dict) -> dict:
119121
120122 def _use_resource_type_as_name (self , data : dict ) -> dict :
121123 """change the names of all resources held in data to resource_name.XX"""
122- self .lg .debug ("amending resource names..." )
124+ self .lg .info ("amending resource names..." )
123125
124126 counter = 0
125127 for i in data :
@@ -131,7 +133,7 @@ def _use_resource_type_as_name(self, data: dict) -> dict:
131133
132134 def _check_illegal_chars (self , data : dict ):
133135 """sweeps resource names for chars invalid in HCL"""
134- self .lg .debug (f"checking for illegal chars: { ILLEGAL_NAME_CHARS } " )
136+ self .lg .info (f"checking for illegal chars: { ILLEGAL_NAME_CHARS } " )
135137
136138 for i in data .values ():
137139 for c in i ["name" ]:
@@ -141,7 +143,7 @@ def _check_illegal_chars(self, data: dict):
141143
142144 def _check_duplicates (self , data : dict ):
143145 """iterates through all resource names ensuring no duplicates"""
144- self .lg .debug ("checking for duplicates" )
146+ self .lg .info ("checking for duplicates" )
145147
146148
147149 keys = {}
0 commit comments