本文整理汇总了Python中Shine.Configuration.ModelFile.ModelFile.__init__方法的典型用法代码示例。如果您正苦于以下问题:Python ModelFile.__init__方法的具体用法?Python ModelFile.__init__怎么用?Python ModelFile.__init__使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Shine.Configuration.ModelFile.ModelFile
的用法示例。
在下文中一共展示了ModelFile.__init__方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: __init__
# 需要导入模块: from Shine.Configuration.ModelFile import ModelFile [as 别名]
# 或者: from Shine.Configuration.ModelFile.ModelFile import __init__ [as 别名]
def __init__(self, sep='=', linesep=' '):
ModelFile.__init__(self, sep, linesep)
self.add_element('dev', check='path')
self.add_element('index', check='digit')
self.add_element('jdev', check='path')
self.add_element('mode', check='enum', default='managed',
values=['managed', 'external'])
示例2: __init__
# 需要导入模块: from Shine.Configuration.ModelFile import ModelFile [as 别名]
# 或者: from Shine.Configuration.ModelFile.ModelFile import __init__ [as 别名]
def __init__(self, sep='=', linesep=' '):
ModelFile.__init__(self, sep, linesep)
self.add_element('tag', check='string')
self.add_element('node', check='string')
self.add_element('ha_node', check='string', multiple=True)
self.add_element('dev', check='path')
self.add_element('size', check='digit')
self.add_element('jdev', check='path')
self.add_element('jsize', check='digit')
示例3: __init__
# 需要导入模块: from Shine.Configuration.ModelFile import ModelFile [as 别名]
# 或者: from Shine.Configuration.ModelFile.ModelFile import __init__ [as 别名]
def __init__(self, sep='=', linesep=' '):
ModelFile.__init__(self, sep, linesep)
self.add_element('node', check='string')
self.add_element('ha_node', check='string', multiple=True)
self.add_element('dev', check='path')
self.add_element('jdev', check='path')
self.add_element('index', check='digit')
self.add_element('group', check='string')
self.add_element('mode', check='enum',
default='managed', values=['managed', 'external'])
self.add_element('network', check='string')
self.add_element('tag', check='string')
示例4: __init__
# 需要导入模块: from Shine.Configuration.ModelFile import ModelFile [as 别名]
# 或者: from Shine.Configuration.ModelFile.ModelFile import __init__ [as 别名]
def __init__(self, sep=":", linesep="\n"):
ModelFile.__init__(self, sep, linesep)
# General
self.add_custom('fs_name', FSName())
self.add_element('description', check='string')
# Stripping
self.add_element('stripe_size', check='digit', default=1048576)
self.add_element('stripe_count', check='digit', default=1)
# Common target options
for tgt in ['mgt', 'mdt', 'ost' ]:
self.add_element(tgt + "_mkfs_options", check='string')
self.add_element(tgt + "_mount_options", check='string')
self.add_element(tgt + "_format_params", check='string')
self.add_element("mgt_mount_path", check='string',
default='/mnt/$fs_name/mgt')
self.add_element("mdt_mount_path", check='string',
default='/mnt/$fs_name/mdt/$index')
self.add_element("ost_mount_path", check='string',
default='/mnt/$fs_name/ost/$index')
# Common client options
self.add_element('mount_options', check='string')
self.add_element('mount_path', check='path')
# Quota
self.add_element('quota', check='boolean')
self.add_element('quota_type', check='string', default='ug')
self.add_element('quota_bunit', check='digit')
self.add_element('quota_iunit', check='digit')
self.add_element('quota_btune', check='digit')
self.add_element('quota_itune', check='digit')
# NidMapping
self.add_custom('nid_map', NidMaps())
# Targets
self.add_custom('mgt', Target(), multiple=True)
self.add_custom('mdt', Target(), multiple=True)
self.add_custom('ost', Target(), multiple=True)
# Client
self.add_custom('client', Client(), multiple=True)
# Router
self.add_custom('router', Router(), multiple=True)
示例5: __init__
# 需要导入模块: from Shine.Configuration.ModelFile import ModelFile [as 别名]
# 或者: from Shine.Configuration.ModelFile.ModelFile import __init__ [as 别名]
def __init__(self, sep="=", linesep="\n"):
ModelFile.__init__(self, sep, linesep)
# Backend stuff
self.add_element('backend', check='enum',
default='None', values=['ClusterDB', 'File', 'None'])
self.add_element('storage_file', check='path',
default='/etc/shine/storage.conf')
self.add_element('status_dir', check='path',
default='/var/cache/shine/status')
# Config dirs
self.add_element('conf_dir', check='path',
default='/var/cache/shine/conf')
self.add_element('lmf_dir', check='path',
default='/etc/shine/models')
self.add_element('tuning_file', check='path')
# Timeouts
self.add_element('ssh_connect_timeout', check='digit',
default=30)
self.add_element('ssh_fanout', check='digit',
default=0)
self.add_element('default_timeout', check='digit',
default=30)
# Commands
self.add_element('command_path', check='path',
default='/usr/lib/lustre')
# Lustre version
self.add_element('lustre_version', check='string')
# CLI
self.add_element('color', check='enum',
default='auto', values=['never', 'always', 'auto'])
# TO BE IMPLEMENTED
self.add_element('start_timeout', check='digit')
self.add_element('mount_timeout', check='digit')
self.add_element('stop_timeout', check='digit')
self.add_element('status_timeout', check='digit')
self.add_element('log_file', check='path')
self.add_element('log_level', check='string')