troveclient.compat.common 模块¶
- 异常 troveclient.compat.common.ArgumentRequired(param)¶
基础:
Exception
- 异常 troveclient.compat.common.ArgumentsRequired(*params)¶
基类:
ArgumentRequired
- 类 troveclient.compat.common.Auth(parser)¶
基类:
CommandsBase使用您的用户名和 api 密钥进行身份验证。
- login()¶
登录以检索用于其他 api 调用的身份验证令牌。
- params = ['apikey', 'auth_strategy', 'auth_type', 'auth_url', 'options', 'region', 'service_name', 'service_type', 'service_url', 'tenant_id', 'username']¶
- 类 troveclient.compat.common.AuthedCommandsBase(parser)¶
基类:
CommandsBase仅使用经过身份验证的客户端才能使用的命令。
- 类 troveclient.compat.common.CliOptions(**kwargs)¶
基类:
object包含用户、apikey 和 token 的 token 对象,该对象可以被 pickle 化。
- APITOKEN = '/home/zuul/.apitoken'¶
- DEFAULT_VALUES = {'apikey': None, 'auth_type': 'keystone', 'auth_url': None, 'debug': False, 'insecure': False, 'region': 'RegionOne', 'service_name': '', 'service_type': 'database', 'service_url': None, 'tenant_id': None, 'token': None, 'username': None, 'verbose': False}¶
- 类方法 create_optparser(load_file)¶
- 类方法 default()¶
- 类方法 load_from_file()¶
- 类方法 save_from_instance_fields(instance)¶
- 类 troveclient.compat.common.Paginated(items=None, next_marker=None, links=None)¶
基类:
object如果您对其进行迭代,它会假装是一个列表,但它还会保留一个 next 属性,您可以使用它来获取下一页数据。
- troveclient.compat.common.check_for_exceptions(resp, body)¶
- troveclient.compat.common.limit_url(url, limit=None, marker=None)¶
- troveclient.compat.common.methods_of(obj)¶
获取对象的所有可调用方法,这些方法不以下划线开头,返回形式为 (method_name, method) 的元组列表。
- troveclient.compat.common.print_actions(cmd, actions)¶
使用选项列表和描述打印命令的帮助信息。
- troveclient.compat.common.print_commands(commands)¶
打印可用命令和描述的列表。
- troveclient.compat.common.quote_user_host(user, host)¶