当前位置: 首页>>代码示例>>Python>>正文


Python BaseData.__str__方法代码示例

本文整理汇总了Python中pykickstart.base.BaseData.__str__方法的典型用法代码示例。如果您正苦于以下问题:Python BaseData.__str__方法的具体用法?Python BaseData.__str__怎么用?Python BaseData.__str__使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在pykickstart.base.BaseData的用法示例。


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

示例1: __str__

# 需要导入模块: from pykickstart.base import BaseData [as 别名]
# 或者: from pykickstart.base.BaseData import __str__ [as 别名]
    def __str__(self):
        retval = BaseData.__str__(self)

        retval += "sshkey"
        retval += self._getArgsAsStr() + '\n'

        return retval
开发者ID:rhinstaller,项目名称:pykickstart,代码行数:9,代码来源:sshkey.py

示例2: __str__

# 需要导入模块: from pykickstart.base import BaseData [as 别名]
# 或者: from pykickstart.base.BaseData import __str__ [as 别名]
    def __str__(self):
        retval = BaseData.__str__(self)

        for path in self.paths:
            retval += "multipath --name=%s%s\n" % (self.name, path.__str__())

        return retval
开发者ID:M4rtinK,项目名称:pykickstart,代码行数:9,代码来源:multipath.py

示例3: __str__

# 需要导入模块: from pykickstart.base import BaseData [as 别名]
# 或者: from pykickstart.base.BaseData import __str__ [as 别名]
    def __str__(self):
        retval = BaseData.__str__(self)

        args = self._getArgsAsStr()
        if args:
            retval += "user%s\n" % args

        return retval
开发者ID:dustymabe,项目名称:pykickstart,代码行数:10,代码来源:user.py

示例4: __str__

# 需要导入模块: from pykickstart.base import BaseData [as 别名]
# 或者: from pykickstart.base.BaseData import __str__ [as 别名]
    def __str__(self):
        retval = BaseData.__str__(self)
        retval += "dmraid --name=%s" % self.name

        for dev in self.devices:
            retval += " --dev=\"%s\"" % dev

        return retval + "\n"
开发者ID:KevinMGranger,项目名称:pykickstart,代码行数:10,代码来源:dmraid.py

示例5: __str__

# 需要导入模块: from pykickstart.base import BaseData [as 别名]
# 或者: from pykickstart.base.BaseData import __str__ [as 别名]
    def __str__(self):
        retval = BaseData.__str__(self)

        if self.name != "":
            retval += "pwpolicy"
            retval += self._getArgsAsStr() + "\n"

        return retval
开发者ID:Jakuje,项目名称:anaconda,代码行数:10,代码来源:pwpolicy.py

示例6: __str__

# 需要导入模块: from pykickstart.base import BaseData [as 别名]
# 或者: from pykickstart.base.BaseData import __str__ [as 别名]
    def __str__(self):
        retval = BaseData.__str__(self)

        if self.uid != "":
            retval += "user"
            retval += self._getArgsAsStr() + "\n"

        return retval
开发者ID:KevinMGranger,项目名称:pykickstart,代码行数:10,代码来源:user.py

示例7: __str__

# 需要导入模块: from pykickstart.base import BaseData [as 别名]
# 或者: from pykickstart.base.BaseData import __str__ [as 别名]
    def __str__(self):
        retval = BaseData.__str__(self)

        args = self._getArgsAsStr()
        args += " --name=%s" % self.name
        args += " --vgname=%s" % self.vgname

        retval += "logvol %s%s\n" % (self.mountpoint, args)
        return retval
开发者ID:atodorov,项目名称:pykickstart,代码行数:11,代码来源:logvol.py

示例8: __str__

# 需要导入模块: from pykickstart.base import BaseData [as 别名]
# 或者: from pykickstart.base.BaseData import __str__ [as 别名]
    def __str__(self):
        retval = BaseData.__str__(self)
        retval += "raid %s%s" % (self.mountpoint, self._getArgsAsStr())

        # Do not output the members list if --preexist was passed in.
        # This would be invalid input according to the parse method.
        if not self.preexist:
            retval += " " + " ".join(self.members)

        return retval.strip() + "\n"
开发者ID:autotune,项目名称:pykickstart,代码行数:12,代码来源:raid.py

示例9: __str__

# 需要导入模块: from pykickstart.base import BaseData [as 别名]
# 或者: from pykickstart.base.BaseData import __str__ [as 别名]
    def __str__(self):
        retval = BaseData.__str__(self)

        if self.moduleName != "":
            retval += "device %s" % self.moduleName

            if self.moduleOpts != "":
                retval += " --opts=\"%s\"" % self.moduleOpts

        return retval + "\n"
开发者ID:tradej,项目名称:pykickstart-old,代码行数:12,代码来源:device.py

示例10: __str__

# 需要导入模块: from pykickstart.base import BaseData [as 别名]
# 或者: from pykickstart.base.BaseData import __str__ [as 别名]
    def __str__(self):
        retval = BaseData.__str__(self)
        retval += "group"

        if self.name:
            retval += " --name=%s" % self.name
        if self.gid:
            retval += " --gid=%s" % self.gid

        return retval + "\n"
开发者ID:dustymabe,项目名称:pykickstart,代码行数:12,代码来源:group.py

示例11: __str__

# 需要导入模块: from pykickstart.base import BaseData [as 别名]
# 或者: from pykickstart.base.BaseData import __str__ [as 别名]
    def __str__(self):
        retval = BaseData.__str__(self)
        retval += "volgroup %s" % self.vgname
        retval += self._getArgsAsStr()

        # Do not output the physical volumes list if --preexist was passed in.
        # This would be invalid input according to the parse method.
        if not self.preexist:
            retval += " " + " ".join(self.physvols)

        return retval.strip() + "\n"
开发者ID:piyush1911,项目名称:pykickstart,代码行数:13,代码来源:volgroup.py

示例12: __str__

# 需要导入模块: from pykickstart.base import BaseData [as 别名]
# 或者: from pykickstart.base.BaseData import __str__ [as 别名]
    def __str__(self):
        retval = BaseData.__str__(self)
        retval += "zfcp"

        if self.devnum != "":
            retval += " --devnum=%s" % self.devnum
        if self.wwpn != "":
            retval += " --wwpn=%s" % self.wwpn
        if self.fcplun != "":
            retval += " --fcplun=%s" % self.fcplun
        if hasattr(self, "scsiid") and self.scsiid != "":
            retval += " --scsiid=%s" % self.scsiid
        if hasattr(self, "scsilun") and self.scsilun != "":
            retval += " --scsilun=%s" % self.scsilun

        return retval + "\n"
开发者ID:autotune,项目名称:pykickstart,代码行数:18,代码来源:zfcp.py

示例13: __str__

# 需要导入模块: from pykickstart.base import BaseData [as 别名]
# 或者: from pykickstart.base.BaseData import __str__ [as 别名]
 def __str__(self):
     retval = BaseData.__str__(self)
     retval += ("snapshot %s --name=%s %s" % (self.origin, self.name, self._getArgsAsStr()))
     return retval.strip() + "\n"
开发者ID:dustymabe,项目名称:pykickstart,代码行数:6,代码来源:snapshot.py

示例14: __str__

# 需要导入模块: from pykickstart.base import BaseData [as 别名]
# 或者: from pykickstart.base.BaseData import __str__ [as 别名]
 def __str__(self):
     retval = BaseData.__str__(self)
     retval += "nvdimm %s" % self._getArgsAsStr()
     return retval.strip() + "\n"
开发者ID:atodorov,项目名称:pykickstart,代码行数:6,代码来源:nvdimm.py

示例15: __str__

# 需要导入模块: from pykickstart.base import BaseData [as 别名]
# 或者: from pykickstart.base.BaseData import __str__ [as 别名]
 def __str__(self):
     retval = BaseData.__str__(self)
     retval += "module --name=%s --stream=%s" % (self.name, self.stream)
     return retval.strip() + "\n"
开发者ID:atodorov,项目名称:pykickstart,代码行数:6,代码来源:module.py


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