コード例 #1
0
 def _check_method(self, method, kickstart):
     """Check the partitioning method of the given kickstart."""
     specification = StorageKickstartSpecification
     handler = KickstartSpecificationHandler(specification)
     parser = KickstartSpecificationParser(handler, specification)
     parser.readKickstartFromString(kickstart)
     self.assertEqual(method, PartitioningFactory.get_method_for_kickstart(handler))
コード例 #2
0
ファイル: storage.py プロジェクト: zhoupeng/anaconda
    def process_kickstart(self, data):
        """Process the kickstart data."""
        # Process the kickstart data in modules.
        for kickstart_module in self._modules:
            kickstart_module.process_kickstart(data)

        # Set the default filesystem type.
        if data.autopart.autopart and data.autopart.fstype:
            self.storage.set_default_fstype(data.autopart.fstype)

        # Create a new partitioning module.
        partitioning_method = PartitioningFactory.get_method_for_kickstart(data)

        if partitioning_method:
            partitioning_module = self.create_partitioning(partitioning_method)
            partitioning_module.process_kickstart(data)