• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

Python ko.KickstartObject类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了Python中pykickstart.ko.KickstartObject的典型用法代码示例。如果您正苦于以下问题:Python KickstartObject类的具体用法?Python KickstartObject怎么用?Python KickstartObject使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



在下文中一共展示了KickstartObject类的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Python代码示例。

示例1: __init__

    def __init__(self, *args, **kwargs):
        """Create a new KickstartHandler instance.

           Instance attributes:

           commands -- A mapping from a string command to a KickstartCommand
                       subclass object that handles it.  Multiple strings can
                       map to the same object, but only one instance of the
                       command object should ever exist.  Most users should
                       never have to deal with this directly, as it is
                       manipulated internally and called through dispatcher.
           currentLine -- The current unprocessed line from the input file
                          that caused this handler to be run.
        """
        KickstartObject.__init__(self, *args, **kwargs)

        # These will be set by the dispatcher.
        self.commands = {}
        self.currentLine = ""

        # A dict keyed by an integer priority number, with each value being a
        # list of KickstartCommand subclasses.  This dict is maintained by
        # registerCommand and used in __str__.  No one else should be touching
        # it.
        self._writeOrder = {}
开发者ID:atodorov,项目名称:pykickstart,代码行数:25,代码来源:base.py


示例2: __init__

    def __init__(self, script, *args , **kwargs):
        """Create a new Script instance.  Instance attributes:

           :keyword errorOnFail: If execution of the script fails, should anaconda
                                 stop, display an error, and then reboot without
                                 running any other scripts?

           :keyword inChroot: Does the script execute in anaconda's chroot
                              environment or not?

           :keyword interp: The program that should be used to interpret this
                            script.

           :keyword lineno: The line number this script starts on.

           :keyword logfile: Where all messages from the script should be logged.

           :keyword script: A string containing all the lines of the script.

           :keyword type: The type of the script, which can be KS_SCRIPT_* from
                          :mod:`pykickstart.constants`.
        """
        KickstartObject.__init__(self, *args, **kwargs)
        self.script = "".join(script)

        self.interp = kwargs.get("interp", "/bin/sh")
        self.inChroot = kwargs.get("inChroot", False)
        self.lineno = kwargs.get("lineno", None)
        self.logfile = kwargs.get("logfile", None)
        self.errorOnFail = kwargs.get("errorOnFail", False)
        self.type = kwargs.get("type", constants.KS_SCRIPT_PRE)
开发者ID:M4rtinK,项目名称:pykickstart,代码行数:31,代码来源:parser.py


示例3: __init__

    def __init__(self, *args, **kwargs):
        """Create a new Packages instance.  Instance attributes:

           addBase       -- Should the Base group be installed even if it is
                            not specified?
           nocore        -- Should the Core group be skipped?  This results in
                            a %packages section that basically only installs the
                            packages you list, and may not be a usable system.
           default       -- Should the default package set be selected?
           environment   -- What base environment should be selected?  Only one
                            may be chosen at a time.
           excludedList  -- A list of all the packages marked for exclusion in
                            the %packages section, without the leading minus
                            symbol.
           excludeDocs   -- Should documentation in each package be excluded?
           groupList     -- A list of Group objects representing all the groups
                            specified in the %packages section.  Names will be
                            stripped of the leading @ symbol.
           excludedGroupList -- A list of Group objects representing all the
                                groups specified for removal in the %packages
                                section.  Names will be stripped of the leading
                                [email protected] symbols.
           handleMissing -- If unknown packages are specified in the %packages
                            section, should it be ignored or not?  Values can
                            be KS_MISSING_* from pykickstart.constants.
           packageList   -- A list of all the packages specified in the
                            %packages section.
           instLangs     -- A list of languages to install.
           multiLib      -- Whether to use yum's "all" multilib policy.
           excludeWeakdeps -- Whether to exclude weak dependencies.
           timeout       -- Number of seconds to wait for a connection before
                            yum's or dnf's timing out or None.
           retries       -- Number of times yum's or dnf's attempt to retrieve
                            a file should retry before returning an error.
           seen          -- If %packages was ever used in the kickstart file,
                            this attribute will be set to True.

        """
        KickstartObject.__init__(self, *args, **kwargs)

        self.addBase = True
        self.nocore = False
        self.default = False
        self.environment = None
        self.excludedList = []
        self.excludedGroupList = []
        self.excludeDocs = False
        self.groupList = []
        self.handleMissing = constants.KS_MISSING_PROMPT
        self.packageList = []
        self.instLangs = None
        self.multiLib = False
        self.excludeWeakdeps = False
        self.timeout = None
        self.retries = None
        self.seen = False
开发者ID:rhinstaller,项目名称:pykickstart,代码行数:56,代码来源:parser.py


示例4: __init__

    def __init__(self, *args, **kwargs):
        """Create a new BaseData instance.

           lineno -- Line number in the ks-file where this object was defined
        """

        # We don't want people using this class by itself.
        if self.__class__ is BaseData:
            raise TypeError("BaseData is an abstract class.")

        KickstartObject.__init__(self, *args, **kwargs)
        self.lineno = 0
开发者ID:M4rtinK,项目名称:pykickstart,代码行数:12,代码来源:base.py


示例5: __init__

    def __init__(self, *args, **kwargs):    # type: (Packages, *Any, **Any) -> None
        """Create a new Packages instance.  Instance attributes:

           addBase       -- Should the Base group be installed even if it is
                            not specified?
           nocore        -- Should the Core group be skipped?  This results in
                            a %packages section that basically only installs the
                            packages you list, and may not be a usable system.
           default       -- Should the default package set be selected?
           environment   -- What base environment should be selected?  Only one
                            may be chosen at a time.
           excludedList  -- A list of all the packages marked for exclusion in
                            the %packages section, without the leading minus
                            symbol.
           excludeDocs   -- Should documentation in each package be excluded?
           groupList     -- A list of Group objects representing all the groups
                            specified in the %packages section.  Names will be
                            stripped of the leading @ symbol.
           excludedGroupList -- A list of Group objects representing all the
                                groups specified for removal in the %packages
                                section.  Names will be stripped of the leading
                                [email protected] symbols.
           handleMissing -- If unknown packages are specified in the %packages
                            section, should it be ignored or not?  Values can
                            be KS_MISSING_* from pykickstart.constants.
           packageList   -- A list of all the packages specified in the
                            %packages section.
           instLangs     -- A list of languages to install.
           multiLib      -- Whether to use yum's "all" multilib policy.
           seen          -- If %packages was ever used in the kickstart file,
                            this attribute will be set to True.

        """
        KickstartObject.__init__(self, *args, **kwargs)

        self.addBase = True # type: bool
        self.nocore = False # type: bool
        self.default = False    # type: bool
        self.environment = None # type: Union[None, str]
        self.excludedList = []  # type: List[str]
        self.excludedGroupList = [] # type: List[Group]
        self.excludeDocs = False    # type: bool
        self.groupList = [] # type: List[Group]
        self.handleMissing = constants.KS_MISSING_PROMPT    # type: int
        self.packageList = []   # type: List[str]
        self.instLangs = None   # type: Union[None, List[str]]
        self.multiLib = False   # type: bool
        self.seen = False   # type: bool
开发者ID:puiterwijk,项目名称:pykickstart,代码行数:48,代码来源:parser.py


示例6: __str__

 def __str__(self):
     """Return a string formatted for output to a kickstart file.  This
        method must be provided by all subclasses.
     """
     return KickstartObject.__str__(self)
开发者ID:M4rtinK,项目名称:pykickstart,代码行数:5,代码来源:base.py



注:本文中的pykickstart.ko.KickstartObject类示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
Python load.load_to_str函数代码示例发布时间:2022-05-25
下一篇:
Python i18n._函数代码示例发布时间:2022-05-25
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap