本文整理汇总了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
示例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
示例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
示例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"
示例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
示例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
示例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
示例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"
示例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"
示例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"
示例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"
示例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"
示例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"
示例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"
示例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"