库使用oneview为讽刺提供节点
python-oneviewclient的Python项目详细描述
库使用hpe oneview为讽刺提供节点
这个库在ironic和oneview和 在适当的位置提取oneview的版本。
- 免费软件:apache许可证
- 文档:http://docs.openstack.org/developer/python-oneviewclient
- 来源:http://git.openstack.org/cgit/openstack/python-oneviewclient
- 错误:http://bugs.launchpad.net/python-oneviewclient
功能
审核日志记录
python-oneviewclient能够将方法调用记录到 审计。当前,有关请求计时和方法名称、参数和 返回值,可以记录下来,以便在审核过程中发现 更好地理解热点、瓶颈和衡量用户代码 和OneView集成执行。
启用审核日志
要启用审核日志记录,用户代码必须在 客户端对象的构造函数。即:audit_enabled,audit_map_file 和audit_output_file。audit_map_file和audit_output_file必须是 填充到审核映射文件和审核输出文件的绝对路径。
审核映射文件
审核映射文件由两部分组成,audit和cases。在 audit部分应该有一个case选项,其中一个,并且只有一个 需要指定审核日志cases。cases部分需要 为一个案例填充一个名字,后面跟着用户想要的方法 审核日志记录。允许审计日志记录的方法是 由@auditing.audit在python-oneviewclient中修饰。
查看审核映射文件的示例:
[audit] # Case to be audit logged from those declared in cases section. case = case_number_one [cases] # Possible auditable case name followed by the audit loggable # methods' names. case_number_one = first_method,second_method,third_method case_number_two = first_method,third_method,fifth_method
审计输出文件
审核日志记录过程的结果是一个json格式的文件,可以是 供审计员、操作员和工程师使用,以获取有关 使用python-oneviewclient访问oneview对性能的影响, 更好地了解集成过程中可能出现的热点和瓶颈 用户代码和OneView。
查看审核输出文件的示例:
{ "method": "get_node_power_state", "client_instance_id": 140396067361488, "initial_time": "2016-08-29T17:32:01.403420", "end_time": "2016-08-29T17:32:01.439126", "is_ironic_request": true, "is_oneview_request": false, "ret": "Off" }