summaryrefslogtreecommitdiffstats
path: root/openstack/common/fileutils.py
Commit message (Collapse)AuthorAgeFilesLines
* Added common code into fileutils and strutils.Ghe Rivero2013-06-061-0/+12
| | | | | | | | | | | | | This methods are present in nova, cinder and also needed by ironic package. openstack.common.strutils => nova.utils <=> cinder.utils to_bytes(text, default=0) openstack.common.fileutils => nova.utils <=> cinder.utils <=> nova/virt/libvirt/utils.py file_open(*args, **kwargs) Change-Id: Ia65499b77eb551c0ffb6d48767b899435469bfb6 Implements: blueprint image-tools
* Add common code for fileutils.Ghe Rivero2013-06-061-0/+31
| | | | | | | | | | | | | This code is present in nova, cinder and also needed by ironic package. * delete_if_exists * remove_path_on_error Also added some tests. openstack/common/fileutils.py => nova.common.utils <=> cinder.common.utils Change-Id: Id5001db161bb8e7dfb20d1b2cc2033e886cda32f Implements: blueprint image-tools
* Reduce duplicated code related to policiesFlaper Fesp2013-05-211-0/+32
| | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch adds some logic that is currently duplicated throughout Openstack. As part of this de-duplication, the patch also modifies current implementation. Major Changes: * check, set_rules, reset, init are now part of the Enforcer class * check was renamed into enforce * init was renamed into load_rules * It is now possible to load multiple files and have per instance rules instead of global rules. * There's a global instance of the Enforcer class that can be used as main enforcer. from openstack.common import policy ENFORCER = policy.ENFORCER ENFORCER.enforce(rule, target, creds) Minor Changes: * Added do_raise to the enforce method * Enforcer instance is now passed to the Check call. NOTE: If / once this patch gets in, I'll update other projects and port them to the latest version. Change-Id: Ife909bdf3277ef33c2fb1eae16ae261fa6374c63
* Fix Copyright Headers - Rename LLC to FoundationDavanum Srinivas2013-03-111-1/+1
| | | | | | One code change, rest are in headers Change-Id: I73f59681358629e1ad74e49d3d3ca13fcb5c2eb1
* Move nova's util.synchronized decorator to openstack common.Michael Still2012-10-181-0/+35
In the end I needed to port utils.ensure_tree as well. Resolves bug 1063230. Change-Id: I6e6fa8201de2cac3f17e6c60d7b16f7df7c64116