summaryrefslogtreecommitdiffstats
path: root/tests/unit/test_fileutils.py
Commit message (Collapse)AuthorAgeFilesLines
* Added common code into fileutils and strutils.Ghe Rivero2013-06-061-0/+13
| | | | | | | | | | | | | 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/+50
| | | | | | | | | | | | | 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/+48
| | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* Replace direct use of testtools BaseTestCase.Monty Taylor2013-01-241-3/+2
| | | | | | | | | Using the BaseTestCase across the tests in the tree lets us put in log fixtures and consistently handle mox and stubout. Part of blueprint grizzly-testtools. Change-Id: Iba7eb2c63b0c514009b2c28e5930b27726a147b0
* Use testtools as test base class.Monty Taylor2013-01-241-2/+2
| | | | | | | | | | | | | On the path to testr migration, we need to replace the unittest base classes with testtools. Replace tearDown with addCleanup, addCleanup is more resilient than tearDown. The fixtures library has excellent support for managing and cleaning tempfiles. Use it. Replace skip_ with testtools.skipTest Part of blueprint grizzly-testtools. Change-Id: I45e11bbb1ff9b31f3278d3b016737dcb7850cd98
* Move nova's util.synchronized decorator to openstack common.Michael Still2012-10-181-0/+37
In the end I needed to port utils.ensure_tree as well. Resolves bug 1063230. Change-Id: I6e6fa8201de2cac3f17e6c60d7b16f7df7c64116