def load_from_environ(self): data = {} for field in self._all_fields.values(): field.load_from_environ() data[field.key] = field.value kix.info("Loading Infrastructure Model from Environment", data)
def create_contact_api(request: CreateContactApiRequest): kix.info("Creating Contact API") # Return the instructions to CFN. service_model: InfrastructureServiceModel = InfrastructureServiceModel() service_model.project_name.set(request.project_name) service_model.forwarding_email.set(request.forwarding_email) service_model.create_contact_api.set(True) return service_model
def copy_util_files(path: str): kix.info(f"Copying util files into {path}") target_dir = os.path.join(path, "util_src") # Clear out the directory if it already exists. if os.path.exists(target_dir): shutil.rmtree(target_dir) # Create it again. os.mkdir(target_dir) # Use shell to copy all the files in. os.system(f"cp -r ./util_src/* {target_dir}")