summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* update version to 2.1.fb52v2.1.fb52Andy Grover2015-01-131-1/+1
| | | | Signed-off-by: Andy Grover <agrover@redhat.com>
* Merge pull request #56 from agrover/dev-groupsAndy Grover2014-12-162-2/+342
|\ | | | | Initiator groups
| * Add support for NodeACLGroupdev-groupsAndy Grover2014-12-122-0/+338
| | | | | | | | | | | | | | | | | | | | | | | | | | NodeACLGroup allows clients to pretend that LIO supports initiator groups. It logically groups all NodeACLs with the same tag into a NodeACLGroup. NodeACLGroup's interface is similar but not identical to NodeACL. NodeACLGroup's interface just uses WWNs (strings) and MappedLUNGroup, so it should be possible to use these without any use of NodeACL or MappedLUN. Significant testing and developmental feedback from Gris Ge <fge@redhat.com>. Signed-off-by: Andy Grover <agrover@redhat.com>
| * Revert "Increase MAX_LUN to 16383"Andy Grover2014-12-121-1/+1
| | | | | | | | | | | | | | | | | | This reverts commit 67eb46d88d3d6ccdcde4e8f7d55c959d49878a5a. This change was premature. We need to wait to increase this until upstream implements support for more LUNs. Signed-off-by: Andy Grover <agrover@redhat.com>
| * Improve repr for MappedLUNAndy Grover2014-12-121-1/+3
|/ | | | | | | Give a little more info so mappedluns for nodeacls within a given TPG are different. Signed-off-by: Andy Grover <agrover@redhat.com>
* Alias cleanupAndy Grover2014-12-121-28/+13
| | | | | | | | | | Add alias property to MappedLUN, and use it. Simplify control flow in _get_alias() Eliminate code in LUN._get_storage_object by using self.alias Signed-off-by: Andy Grover <agrover@redhat.com>
* Mention default save/restore file in docstringsAndy Grover2014-12-031-0/+2
| | | | | | | | Mention default file used in save_to_file and restore_from_file docstrings. I tried to use the value of default_save_file instead of the explicit filename but string interpolation didn't seem to work for the docstring. Signed-off-by: Andy Grover <agrover@redhat.com>
* Create symlink from rtslib_fb to rtslibAndy Grover2014-12-022-1/+1
| | | | | | | | | This will make development using PYTHONPATH easier, since rtslib_fb will exist in the development tree. No longer need package_dir in setup.py, remove it. Signed-off-by: Andy Grover <agrover@redhat.com>
* Change to exporting under 'rtslib' and 'rtslib_fb" pkg namesAndy Grover2014-12-023-2/+8
| | | | | | | | | We should move off of 'rtslib' because we are incompatible with the original package using this name. Export as 'rtslib_fb', and add a warning to switch to importing by the new package name if using the old import name. Signed-off-by: Andy Grover <agrover@redhat.com>
* version 2.1.fb51v2.1.fb51Andy Grover2014-12-021-1/+1
| | | | Signed-off-by: Andy Grover <agrover@redhat.com>
* Improve some exception messagesAndy Grover2014-11-262-3/+3
| | | | Signed-off-by: Andy Grover <agrover@redhat.com>
* Add equality operators for CFSNodeAndy Grover2014-11-201-0/+6
| | | | | | | | | | | Two rtslib objects can point to the same underlying configfs directory yet be different Python objects. We should consider these equal. Implement __eq__(). Also implement __ne__() because Python does not assume this is the inverse of __eq__(). Signed-off-by: Andy Grover <agrover@redhat.com>
* Define list of auth properties one timeAndy Grover2014-11-201-2/+4
| | | | | | Instead of defining for both TPG and NodeACL use, just define once. Signed-off-by: Andy Grover <agrover@redhat.com>
* Use any() when testing for if an iterable is not emptyAndy Grover2014-11-131-1/+1
| | | | | | | This prevents the effort of generating a full list of storage objects or targets just to see if 1 or more exists. Signed-off-by: Andy Grover <agrover@redhat.com>
* Remove some help text from an exception messageAndy Grover2014-11-131-2/+3
| | | | | | It is better placed in the docstring. Signed-off-by: Andy Grover <agrover@redhat.com>
* Standardize on no periods in exception messagesAndy Grover2014-11-135-48/+45
| | | | | | | | | | Do not terminate our exception messages with a period. This follows how they are used in the Python stdlib. Also remove some str() conversions where the "%s" in the format string should already be doing the conversion. Signed-off-by: Andy Grover <agrover@redhat.com>
* Improve catching of exceptions when creating storage objectsAndy Grover2014-11-131-2/+2
| | | | | | Catch all exceptions, and include their message in err_func. Signed-off-by: Andy Grover <agrover@redhat.com>
* Merge pull request #55 from cvubrugier/masterAndy Grover2014-10-204-1/+5
|\ | | | | Various fixes for Debian packaging
| * debian: install manpagesChristophe Vu-Brugier2014-10-192-0/+4
| | | | | | | | Signed-off-by: Christophe Vu-Brugier <cvubrugier@fastmail.fm>
| * debian: add binaries to Python 2 installed filesChristophe Vu-Brugier2014-10-191-0/+1
| | | | | | | | Signed-off-by: Christophe Vu-Brugier <cvubrugier@fastmail.fm>
| * Do not remove doc/ during `make clean`: it contains the manpagesChristophe Vu-Brugier2014-10-191-1/+0
|/ | | | Signed-off-by: Christophe Vu-Brugier <cvubrugier@fastmail.fm>
* Support tcm-userAndy Grover2014-10-012-1/+89
| | | | | | Support defining user-backed storage objects. Signed-off-by: Andy Grover <agrover@redhat.com>
* update versionv2.1.fb50Andy Grover2014-09-241-1/+1
| | | | Signed-off-by: Andy Grover <agrover@redhat.com>
* Fix delete regressionAndy Grover2014-09-191-1/+1
| | | | | | | | | Introduced in 608f1c4. _parse_info no longer lowercases, so _get_status must. Fixes #53 Signed-off-by: Andy Grover <agrover@redhat.com>
* Merge pull request #54 from afamilyman/patch-1Andy Grover2014-09-191-1/+1
|\ | | | | Update utils.py
| * Update utils.pyafamilyman2014-09-191-1/+1
|/ | | Need to add backslash to escape the '-' character in regular expression
* Use uuid.hex property instead of get_hex()Andy Grover2014-09-181-2/+2
| | | | | | | | | To work in python3. fixes #52 Reported-by: Arthur Lutz Signed-off-by: Andy Grover <agrover@redhat.com>
* update versionv2.1.fb49Andy Grover2014-08-281-1/+1
| | | | Signed-off-by: Andy Grover <agrover@redhat.com>
* Update copyrightsAndy Grover2014-07-037-2/+7
| | | | Signed-off-by: Andy Grover <agrover@redhat.com>
* Don't lower-case return values from _parse_info functionsAndy Grover2014-06-231-2/+2
| | | | | | Shouldn't be necessary. Signed-off-by: Andy Grover <agrover@redhat.com>
* Consolidate two mapping dicts into oneAndy Grover2014-06-232-17/+15
| | | | | | | | | | | The storageobjects and "mapping" dict in so_from_path are almost the same, except for name/path divergences due to alt_dirprefix. Consolidate these into one list, which works with a few duplicate entries. Put the new so_mapping dict next to bs_params dict, so the places to touch for new backstores are a little more centralized. Signed-off-by: Andy Grover <agrover@redhat.com>
* Update version to 2.1.fb48v2.1.fb48Andy Grover2014-06-201-1/+1
| | | | Signed-off-by: Andy Grover <agrover@redhat.com>
* Don't add to cache if cfs create failsAndy Grover2014-05-201-1/+5
| | | | | | | If there's an error, then future attempts would report the backstore already exists, instead of whatever the actual error is. Signed-off-by: Andy Grover <agrover@redhat.com>
* Do not set emulate_write_cache based on write_back param for blockAndy Grover2014-05-051-5/+2
| | | | | | | | | | | Since the kernel's d0c8b259f (in 3.9+), setting emulate_write_cache for block backstores has not done anything -- the kernel now actually uses the queue's REQ_FLUSH flag. No longer set this attribute, but keep the parameter for backwards compatibility. Signed-off-by: Andy Grover <agrover@redhat.com>
* '!' allowed character in block and partition namesAndy Grover2014-05-051-1/+1
| | | | | | See https://bugzilla.redhat.com/show_bug.cgi?id=1082208 Signed-off-by: Andy Grover <agrover@redhat.com>
* Fix missing err_func parameter to set_attributesAndy Grover2014-05-031-1/+1
| | | | | | | Closes #50 Reported-by: Chris Fielder <shambler.qc@gmail.com> Signed-off-by: Andy Grover <agrover@redhat.com>
* Merge pull request #49 from fielder/masterAndy Grover2014-04-291-1/+1
|\ | | | | fix typo
| * fix typoChris Fielder2014-04-291-1/+1
|/ | | Fixed a small typo in node's set_parameter().
* Change set_parameters/attributes to take an err_funcAndy Grover2014-04-153-12/+16
| | | | | | | | | | | | We don't want to silently hide errors when setting things, but we also don't want to stop. Since these are both called from setup() functions, we can just pass an err_func to them and they can call it if there's a problem, but keep going. When calling set_attribute for the storageobject, use a custom err_func that also includes the name and plugin in the message. Signed-off-by: Andy Grover <agrover@redhat.com>
* Convert all exceptions in set_parameter/attribute to RTSLibErrorAndy Grover2014-04-151-8/+4
| | | | | | Also remove unneeded conversions. Signed-off-by: Andy Grover <agrover@redhat.com>
* update to 2.1.fb47v2.1.fb47Andy Grover2014-03-141-1/+1
| | | | Signed-off-by: Andy Grover <agrover@redhat.com>
* Add StorageObjectFactoryAndy Grover2014-03-042-0/+21
| | | | | | | Give it a path and it figures out what kind of storage object to instantiate. Signed-off-by: Andy Grover <agrover@redhat.com>
* update version to 2.1.fb46v2.1.fb46Andy Grover2014-02-181-1/+1
| | | | Signed-off-by: Andy Grover <agrover@redhat.com>
* Add a message if no configfile is foundAndy Grover2014-02-181-1/+2
| | | | | | | | | Add a print (to stdout, not stderr) if no config file is found, but try not to make it too scary, since this is perfectly fine. Fix typo in comment. Signed-off-by: Andy Grover <agrover@redhat.com>
* targetctl: A missing restore file is not an errorAndy Grover2014-02-131-5/+10
| | | | | | Also, fix whitespace. Signed-off-by: Andy Grover <agrover@redhat.com>
* Improve error message when NetworkPortal restore failsAndy Grover2014-02-131-3/+3
| | | | | | Also print the original exception message. Signed-off-by: Andy Grover <agrover@redhat.com>
* update version to 2.1.fb45v2.1.fb45Andy Grover2014-01-151-1/+1
| | | | Signed-off-by: Andy Grover <agrover@redhat.com>
* Use to_normalized_wwn in _set_nexusAndy Grover2014-01-081-9/+5
| | | | | | | We can now use to_normalized_wwn, since it no longer checks against wwn_list. Signed-off-by: Andy Grover <agrover@redhat.com>
* Remove 3rd argument to normalize_wwnAndy Grover2014-01-082-2/+2
| | | | | | possible_wwns is no longer used by any callers. Signed-off-by: Andy Grover <agrover@redhat.com>
* Do not check WWN is present in normalize_wwnAndy Grover2014-01-081-3/+0
| | | | | | | | | | | | For tcm_fc and maybe others, it should be possible to configure a target for a hw-based WWN before the WWN shows up in the list of WWNs. The kernel code allows and handles this case. The only downside is that a user might have a typo in entering a hw wwn by hand, and experience confusion when it is allowed but things don't work right. Clients may wish to warn the user if so. Signed-off-by: Andy Grover <agrover@redhat.com>