主要维护者¶
- 主要维护者
Steve Martinelli (stevemar)
蓝图: https://blueprints.launchpad.net/oslo-incubator/+spec/graduate-oslo-io
概要: 将 fileutils 代码(以及相关的测试)移动到 oslo.utils
oslo.utils 和 oslo.policy
openstack/common/fileutils.py
tests/unit/test_fileutils.py
keystone
fileutils.py 只有 7 个函数和 1 个全局变量。它们的使用情况和毕业计划如下。
ensure_tree()
被 nova/cinder/ironic 使用
将被添加到 oslo.utils
delete_if_exists()
在 nova 和 cinder 中被广泛使用,neutron 中也有少量使用
将被添加到 oslo.utils
remove_path_on_error()
被 nova/cinder/ironic 使用
将被添加到 oslo.utils
write_to_tempfile()
在 keystone 和 ceilometer 中使用较少(仅在测试中)
考虑弃用
file_open
在 cinder 中被广泛使用
可以用一个 open() 调用来代替
考虑弃用
read_cached_file()
仅被 nova 的策略引擎和 oslo.policy 使用
可以将这两个都推送到 oslo.policy 中,并且当/如果 nova 切换到 oslo.policy 时,它们将不再需要这些函数。
delete_cached_file()
与上述相同。
DEFAULT_MODE
未被引用,可以标记为私有。
Steve Martinelli (stevemar)
Steve Martinelli (stevemar)
Doug Hellmann (doug-hellmann)
Liberty-1
当前导入的项目
from openstack.common import fileutils
需要切换到导入
from oslo_utils import fileutils
如果使用
fileutils.file_open()
切换到
open()
如果使用
fileutils.read_cached_file()
切换到
oslo_policy
无
注意
本作品采用知识共享署名 3.0 非移植许可协议授权。 http://creativecommons.org/licenses/by/3.0/legalcode
除非另有说明,此文档根据 知识共享署名 3.0 许可 授权。请参阅所有 OpenStack 法律文件。