예제 #1
0
  def __init__(self, dft, project):
    """Default constructor
    """

    # Initialize ancestor
    CliCommand.__init__(self, dft, project)

    # Initialize a dictionnary to hold the list of installed packages
    self.installed_packages = {}

    # By default the check is successfull since not rules were checked
    # This boolean will be set to False (meaning check failed) as soon as a
    # rule verification will fail
    self.is_check_successfull = True

    # This variable is used to store the result of a single rule check
    # The variable value is reset for each loop, while the scope of the
    # previous one is the whole execution
    self.is_rule_check_successfull = True

    # Rule counter used to display the total number of checked rules
    self.rule_counter = 0

    # Counter used to display the number of successful rules
    self.rule_successfull_counter = 0

    # Counter used to display the number of failed rules
    self.rule_failed_counter = 0

    # Counter used to display the number of rules matching expected result
    # either failed of successfull, but as expected (handy for unit tests)
    self.rule_as_expected_counter = 0

    # Size of block used to read files when computing hashes
    self.block_size = 65536
예제 #2
0
    def __init__(self, dft, project):
        """Default constructor
    """

        # Initialize ancestor
        CliCommand.__init__(self, dft, project)

        # Initialize a dictionnary to hold the list of installed packages
        self.installed_packages = {}

        # By default the check is successfull since not rules were checked
        # This boolean will be set to False (meaning check failed) as soon as a
        # rule verification will fail
        self.is_check_successfull = True

        # This variable is used to store the result of a single rule check
        # The variable value is reset for each loop, while the scope of the
        # previous one is the whole execution
        self.is_rule_check_successfull = True

        # Rule counter used to display the total number of checked rules
        self.rule_counter = 0

        # Counter used to display the number of successful rules
        self.rule_successfull_counter = 0

        # Counter used to display the number of failed rules
        self.rule_failed_counter = 0

        # Counter used to display the number of rules matching expected result
        # either failed of successfull, but as expected (handy for unit tests)
        self.rule_as_expected_counter = 0

        # Size of block used to read files when computing hashes
        self.block_size = 65536
예제 #3
0
    def __init__(self, dft, project):
        """Default constructor
    """

        # Initialize ancestor
        CliCommand.__init__(self, dft, project)

        # Create the output writer object
        self.output_writer = ContentOutputWriter(self.project.list_content)
예제 #4
0
  def __init__(self, dft, project):
    """Default constructor
    """

    # Initialize ancestor
    CliCommand.__init__(self, dft, project)

    # Initialize a dictionnary to hold the list of installed packages
    self.installed_packages = {}

    # Flag to used to keep track of the need to uninstall APT in case wehad to install it
    self.need_to_strip_apt = False
예제 #5
0
  def __init__(self, dft, project):
    """Default constructor
    """

    # Initialize ancestor
    CliCommand.__init__(self, dft, project)

    # Initialize a dictionnary to hold the list of installed packages
    self.installed_packages = {}

    # Flag to used to keep track of the need to uninstall APT in case wehad to install it
    self.need_to_strip_apt = False
예제 #6
0
  def __init__(self, dft, project):
    """Default constructor
    """

    # Initialize ancestor
    CliCommand.__init__(self, dft, project)

    # Path to the ansible roles under dft_base
    self.ansible_dir = project.get_dft_base()  + "/ansible"

    # Set the log level from the configuration
    print("setting logs " + project.dft.log_level)
    logging.basicConfig(level=project.dft.log_level)
예제 #7
0
  def __init__(self, dft, project):
    """Default constructor
    """

    # Initialize ancestor
    CliCommand.__init__(self, dft, project)

    # Defines dft base directory in the initramfs file system.
    # Should always be /dft
    self.dft_root = "/dft"

    # Defines stack mount point in the iniarmfs file system.
    # Should alwaays be /root
    self.stack_root = "/root"
예제 #8
0
    def __init__(self, dft, project):
        """Default constructor
    """

        # Initialize ancestor
        CliCommand.__init__(self, dft, project)
예제 #9
0
  def __init__(self, dft, project):
    """Default constructor
    """

    # Initialize ancestor
    CliCommand.__init__(self, dft, project)