# -*- coding: utf-8 -*-

import folder_overlay_sync

from ppms.migration import BasePacket, PacketCategory

__all__ = ['CreateFolderPacket']


class CreateFolderPacket(BasePacket):
    """Create the full Venus folder structure based on a planta_de folder.

    1) Walk down /py/planta_de and create the corresponding
       planta_ch/customer/system folders.
    2) Walk down /py/customer and generate wrappers inside /py/system for
       customer-only files
    """
    wi_number = 10294
    version = 1
    done_after_success = False
    run_on_startup = True
    category = PacketCategory.CATEGORY_HELPER
    special_snowflake = True

    def fix(self, runner):
        self.log('Currently disabled')

        """
        try:
            self.create_folder_structure()
            self.create_customer_wrappers_in_system()
            self.create_customer_wrappers_in_system()
        except OSError as err:
            return self.fail(err)
        """

        return self.success()

    """
    def create_folder_structure(self):
        folder_overlay_sync.create_folder_structure(self.log, self.log_heading)

    def create_customer_wrappers_in_system(self):
        folder_overlay_sync.create_customer_wrappers_in_system(self.log, self.log_heading)
    """