本文整理汇总了Python中troveclient.i18n._函数的典型用法代码示例。如果您正苦于以下问题:Python _函数的具体用法?Python _怎么用?Python _使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了_函数的9个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Python代码示例。
示例1: get_parser
def get_parser(self, prog_name):
parser = super(CreateDatabaseUser, self).get_parser(prog_name)
parser.add_argument(
'instance',
metavar='<instance>',
help=_('ID or name of the instance.')
)
parser.add_argument(
'name',
metavar='<name>',
help=_('Name of user.')
)
parser.add_argument(
'password',
metavar='<password>',
help=_('Password of user.')
)
parser.add_argument(
'--host',
metavar='<host>',
help=_('Optional host of user.')
)
parser.add_argument(
'--databases',
metavar='<databases>',
nargs='+',
default=[],
help=_('Optional list of databases.')
)
return parser
开发者ID:openstack,项目名称:python-troveclient,代码行数:30,代码来源:database_users.py
示例2: get_parser
def get_parser(self, prog_name):
parser = super(ListDatabaseInstances, self).get_parser(prog_name)
parser.add_argument(
'--limit',
dest='limit',
metavar='<limit>',
default=None,
help=_('Limit the number of results displayed.')
)
parser.add_argument(
'--marker',
dest='marker',
metavar='<ID>',
type=str,
default=None,
help=_('Begin displaying the results for IDs greater than the'
'specified marker. When used with :option:`--limit,` set'
'this to the last ID displayed in the previous run.')
)
parser.add_argument(
'--include_clustered', '--include-clustered',
dest='include_clustered',
action="store_true",
default=False,
help=_("Include instances that are part of a cluster "
"(default %(default)s). --include-clustered may be "
"deprecated in the future, retaining just "
"--include_clustered.")
)
return parser
开发者ID:openstack,项目名称:python-troveclient,代码行数:30,代码来源:database_instances.py
示例3: get_parser
def get_parser(self, prog_name):
parser = super(CreateDatabaseBackup, self).get_parser(prog_name)
parser.add_argument(
'instance',
metavar='<instance>',
help=_('ID or name of the instance.')
)
parser.add_argument(
'name',
metavar='<name>',
help=_('Name of the backup.')
)
parser.add_argument(
'--description',
metavar='<description>',
default=None,
help=_('An optional description for the backup.')
)
parser.add_argument(
'--parent',
metavar='<parent>',
default=None,
help=_('Optional ID of the parent backup to perform an'
' incremental backup from.')
)
parser.add_argument(
'--incremental',
action='store_true',
default=False,
help=_('Create an incremental backup based on the last'
' full or incremental backup. It will create a'
' full backup if no existing backup found.')
)
return parser
开发者ID:openstack,项目名称:python-troveclient,代码行数:34,代码来源:database_backups.py
示例4: get_parser
def get_parser(self, prog_name):
parser = super(UpgradeDatabaseCluster, self).get_parser(prog_name)
parser.add_argument(
'cluster',
metavar='<cluster>',
help=_('ID or name of the cluster.'),
)
parser.add_argument(
'datastore_version',
metavar='<datastore_version>',
help=_('A datastore version name or ID.'),
)
return parser
开发者ID:openstack,项目名称:python-troveclient,代码行数:13,代码来源:database_clusters.py
示例5: get_parser
def get_parser(self, prog_name):
parser = super(DeleteDatabase, self).get_parser(prog_name)
parser.add_argument(
dest='instance',
metavar='<instance>',
help=_('ID or name of the instance.')
)
parser.add_argument(
dest='database',
metavar='<database>',
help=_('Name of the database.')
)
return parser
开发者ID:openstack,项目名称:python-troveclient,代码行数:13,代码来源:databases.py
示例6: get_parser
def get_parser(self, prog_name):
parser = super(EnableDatabaseRoot, self).get_parser(prog_name)
parser.add_argument(
'instance_or_cluster',
metavar='<instance_or_cluster>',
help=_('ID or name of the instance or cluster.'),
)
parser.add_argument(
'--root_password',
metavar='<root_password>',
default=None,
help=_('Root password to set.'))
return parser
开发者ID:openstack,项目名称:python-troveclient,代码行数:14,代码来源:database_root.py
示例7: get_parser
def get_parser(self, prog_name):
parser = super(ListDatabaseFlavors, self).get_parser(prog_name)
parser.add_argument(
'--datastore-type',
dest='datastore_type',
metavar='<datastore-type>',
help=_('Type of the datastore. For eg: mysql.')
)
parser.add_argument(
'--datastore-version-id',
dest='datastore_version_id',
metavar='<datastore-version-id>',
help=_('ID of the datastore version.')
)
return parser
开发者ID:openstack,项目名称:python-troveclient,代码行数:15,代码来源:database_flavors.py
示例8: get_parser
def get_parser(self, prog_name):
parser = super(ShowDatastoreVersion, self).get_parser(prog_name)
parser.add_argument(
'datastore_version',
metavar='<datastore_version>',
help=_('ID or name of the datastore version.'),
)
parser.add_argument(
'--datastore',
metavar='<datastore>',
default=None,
help=_('ID or name of the datastore. Optional if the ID of'
'the datastore_version is provided.'),
)
return parser
开发者ID:openstack,项目名称:python-troveclient,代码行数:15,代码来源:datastores.py
示例9: main
def main():
try:
if sys.version_info >= (3, 0):
OpenStackTroveShell().main(sys.argv[1:])
else:
OpenStackTroveShell().main(map(encodeutils.safe_decode,
sys.argv[1:]))
except KeyboardInterrupt:
print(_("... terminating trove client"), file=sys.stderr)
sys.exit(130)
except Exception as e:
logger.debug(e, exc_info=1)
message = six.text_type(e)
if not isinstance(message, six.string_types):
message = str(message)
print(_("ERROR: %s") % encodeutils.safe_encode(message),
file=sys.stderr)
sys.exit(1)
开发者ID:Tesora,项目名称:tesora-python-troveclient,代码行数:18,代码来源:shell.py
注:本文中的troveclient.i18n._函数示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论