summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* update version to 2.1.fb39v2.1.fb39Andy Grover2015-01-131-1/+1
| | | | Signed-off-by: Andy Grover <agrover@redhat.com>
* Merge pull request #49 from cvubrugier/document-parametersAndy Grover2015-01-123-4/+110
|\ | | | | Document target parameters and attributes
| * Document target parameters and attributesChristophe Vu-Brugier2015-01-123-4/+87
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Parameters read from the config file system have the same generic description that does not provide much information: > get parameter MaxBurstLength=262144 --------------------- The MaxBurstLength parameter. This patch provides a description for parameters and attributes by adding 'ui_desc_parameters' and 'ui_desc_attributes' class members to the UITPG, UINodeACL and UIStorageObject classes. The description is read when the parameter is registered with define_config_group_param(). It is displayed when the user invokes `get parameter` or `get attribute`: > get parameter MaxBurstLength=262144 --------------------- Maximum SCSI data payload in bytes in a Data-In or a solicited Data-Out iSCSI sequence. This patch also declares the types of parameters. Thus, targetcli can more efficiently check the parameters when they are set. Signed-off-by: Christophe Vu-Brugier <cvubrugier@fastmail.fm>
| * Add UI parameter type helper for "Yes" and "No" boolean valuesChristophe Vu-Brugier2015-01-091-0/+23
|/ | | | | | | | | The iSCSI RFC defines boolean values as "Yes" and "No" and the LIO iSCSI target follows this convention to store boolean iSCSI session parameters (e.g. ImmediateData=Yes). So it makes sense to have a dedicated helper to validate them in targetcli. Signed-off-by: Christophe Vu-Brugier <cvubrugier@fastmail.fm>
* Add a global pref for adding default portalAndy Grover2014-12-173-4/+13
| | | | | | | | Expand info messages to mention this pref as well Fixes #46 Signed-off-by: Andy Grover <agrover@redhat.com>
* Catch exception if an invalid tag is given when creating a tpgAndy Grover2014-12-171-3/+13
| | | | | | | | | Also, allow e.g "tpg6" as well as "6" for the tpg tag. This matches what we do for lun creation. Fixes #47 Signed-off-by: Andy Grover <agrover@redhat.com>
* Autocomplete for restoreconfig and clearconfigAndy Grover2014-12-171-1/+14
| | | | | | Use complete_path from ui_backstore. Signed-off-by: Andy Grover <agrover@redhat.com>
* Change targetcli to use new package import namesAndy Grover2014-12-025-17/+17
| | | | | | | | | Since rtslib-fb and configshell-fb have different APIs from the original rtslib and configshell, we're trying to move off those package names since it can cause user confusion. Change our version of targetcli to indicate it requires the -fb versions. Signed-off-by: Andy Grover <agrover@redhat.com>
* version 2.1.fb38v2.1.fb38Andy Grover2014-12-021-1/+1
| | | | Signed-off-by: Andy Grover <agrover@redhat.com>
* Move UIRoot creation inside try blockAndy Grover2014-12-021-2/+1
| | | | | | | If not invoked as root, we can't load modules and UIRoot() will raise an exception. Signed-off-by: Andy Grover <agrover@redhat.com>
* Merge pull request #45 from agrover/fix-dir-del-issueAndy Grover2014-11-141-1/+0
|\ | | | | Fix configuration tree inconsistency
| * Fix configuration tree inconsistencyfix-dir-del-issueAndy Grover2014-11-111-1/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Deleting a storage object refreshes the root. This causes the root to release its references to its children and regenerate them. However if we are cd'd to a node such as /backstores/ramdisk, then the objects we are using are the old ones, not the new ones connected to the root node, and creating a new storage object will update our tree but not root's since we've become disconnected. Fix this by no longer refreshing the root -- it should not require refreshing anyways. Reported-by: Eric Murphy <emurphy@lessorsinc.com> Reported-by: Leeman Strout <me@mooluv.com> Signed-off-by: Andy Grover <agrover@redhat.com>
* | Use any() for seeing if fm.wwns generates anythingAndy Grover2014-11-131-1/+1
|/ | | | | | Slightly more efficient. Signed-off-by: Andy Grover <agrover@redhat.com>
* Fix issue with sessions detail commandAndy Grover2014-11-041-1/+1
| | | | | | | | Do not reference the backstore, access the plugin field off the so directly. This is a regression introduced with the backstore removal changes a while back. Signed-off-by: Andy Grover <agrover@redhat.com>
* Merge pull request #44 from cvubrugier/masterAndy Grover2014-10-202-1/+2
|\ | | | | Fix issue #42 "targetcli manpage not installed by Debian package"
| * debian: install targetcli manpageChristophe Vu-Brugier2014-10-191-0/+1
| | | | | | | | | | | | Fixes #42 Signed-off-by: Christophe Vu-Brugier <cvubrugier@fastmail.fm>
| * debian: remove rtslib and configshell from the build dependenciesChristophe Vu-Brugier2014-10-191-1/+1
|/ | | | Signed-off-by: Christophe Vu-Brugier <cvubrugier@fastmail.fm>
* Support for user-backed storage objectsAndy Grover2014-10-011-1/+61
| | | | | | Add support for defining user-backed storage objects. Signed-off-by: Andy Grover <agrover@redhat.com>
* update versionv2.1.fb37Andy Grover2014-09-241-1/+1
| | | | Signed-off-by: Andy Grover <agrover@redhat.com>
* Update manpage for automatic portal creation changeAndy Grover2014-09-241-8/+13
| | | | | | | We now create a default 0.0.0.0:3260 portal when creating a target. Change docs to reflect and explain this behavior. Signed-off-by: Andy Grover <agrover@redhat.com>
* Merge pull request #43 from agrover/add-usageAndy Grover2014-09-241-0/+21
|\ | | | | Add --version and --help support to targetcli
| * Add --version and --help support to targetcliadd-usageAndy Grover2014-09-231-0/+21
|/ | | | | | | I don't envision targetcli taking a lot of cmdline options, so just implement by looking at sys.argv[1] instead of using getopt or ArgParse. Signed-off-by: Andy Grover <agrover@redhat.com>
* update versionv2.1.fb36Andy Grover2014-08-281-1/+1
| | | | Signed-off-by: Andy Grover <agrover@redhat.com>
* Add message if auto-creating a network portalAndy Grover2014-07-291-1/+4
| | | | | | | | | | Add message that clarifies we're auto-creating the portal, and also helps to explain what 0.0.0.0 means. Also, move TPG creation message before, since portal creation depends on TPG creation. Signed-off-by: Andy Grover <agrover@redhat.com>
* Remove write_back param from block backstore create cmdAndy Grover2014-05-051-3/+2
| | | | | | | | | | This used to translate to setting emulate_write_cache, but this is no longer supported by the kernel (a good thing). targetcli commands are not an API, so we can change this whenever it is appropriate. Signed-off-by: Andy Grover <agrover@redhat.com>
* update version to 2.1.fb35v2.1.fb35Andy Grover2014-03-141-1/+1
| | | | Signed-off-by: Andy Grover <agrover@redhat.com>
* Allow creation of MappedLUN or LUN to also create storage objectAndy Grover2014-03-041-7/+30
| | | | | | | | | | | | If argument is not a valid storageobject path (or lun, for nodeacl), also check to see if it's a file or block device, and attempt to create a new storage object backed by it, and proceed from there. Enable path autocompletion to go along with this. This allows mapping a block device to an existing NodeACL in one command. Signed-off-by: Andy Grover <agrover@redhat.com>
* Auto-create a portal for new TPGs that support themAndy Grover2014-03-042-2/+3
| | | | | | | | Makes things a little easier. Update manpage quickstart to no longer require this step. Signed-off-by: Andy Grover <agrover@redhat.com>
* Remove "set attribute authentication=0" from manpage quickstartAndy Grover2014-03-041-2/+0
| | | | | | It's already set that way by default. Signed-off-by: Andy Grover <agrover@redhat.com>
* Fix NodeACL spacing if tags are being usedAndy Grover2014-03-041-2/+2
| | | | Signed-off-by: Andy Grover <agrover@redhat.com>
* Change targetcli for configshell exception changeAndy Grover2014-03-035-44/+33
| | | | | | | | | | | | If run_cmdline raises an exception, return 1 as exit code and print exception text to stderr. Keep running shell.run_interactive until shell._exit is set, logging error messages. Overriding execute_command in UINode no longer needed, remove. Signed-off-by: Andy Grover <agrover@redhat.com>
* update version to 2.1.fb34v2.1.fb34Andy Grover2014-02-241-1/+1
| | | | Signed-off-by: Andy Grover <agrover@redhat.com>
* Add a quickstart section to manpageAndy Grover2014-02-241-0/+24
| | | | | | | This stuff is still a pain to get started using. Add a quickstart section as a band-aid. Signed-off-by: Andy Grover <agrover@redhat.com>
* Print a warning if creating a HW-based target for absent WWNAndy Grover2014-01-081-0/+3
| | | | | | | | | | It is possible to create targets for hardware-based targets using WWNs that are not in the fabric's WWN list. However, if the user is creating one of these, print a warning, because if the user doesn't expect this (e.g. made a typo from an existing hw WWN) then things won't work and it may not be clear why. Signed-off-by: Andy Grover <agrover@redhat.com>
* update version to 2.1.fb33v2.1.fb33Andy Grover2013-12-031-1/+1
| | | | Signed-off-by: Andy Grover <agrover@redhat.com>
* Merge pull request #37 from cvubrugier/masterAndy Grover2013-12-021-7/+16
|\ | | | | Fix issue #23: use fallocate() to create fileio backstores
| * Fix issue #23: use fallocate() to create fileio backstoresChristophe Vu-Brugier2013-12-021-7/+16
|/ | | | | | | | | | | | | | Python 3.3 provides the fallocate() system call which is better for allocating disk space than ftruncate(). ftruncate() sets the file size to the requested size but does not reserve the blocks in the file system. Unlike ftruncate(), fallocate() fails if there is not enough free space. Moreover, this patch improves error handling when the file cannot be opened or when the requested size is too large to be converted to a long int. Signed-off-by: Christophe Vu-Brugier <cvubrugier@yahoo.fr>
* Merge pull request #35 from cvubrugier/masterAndy Grover2013-11-241-0/+34
|\ | | | | Add path completion to block and fileio backstores
| * Add path completion to block and fileio backstoresChristophe Vu-Brugier2013-11-241-0/+34
|/ | | | Signed-off-by: Christophe Vu-Brugier <cvubrugier@yahoo.fr>
* Use new rtslib restore_from_file and save_to_file APIsAndy Grover2013-11-201-15/+6
| | | | | | | | | As a result it's now better for saveconfig to save/cull backups before saving the current state, hopefully not a big deal. Resolves #34 Signed-off-by: Andy Grover <agrover@redhat.com>
* Save RTSRoot to a member variableAndy Grover2013-11-201-7/+7
| | | | | | | Get the RTSRoot object on init, and then use it when needed in other methods. Signed-off-by: Andy Grover <agrover@redhat.com>
* update version to 2.1.fb32v2.1.fb32Andy Grover2013-11-071-1/+1
| | | | Signed-off-by: Andy Grover <agrover@redhat.com>
* Merge pull request #32 from JonnyJD/no_rcAndy Grover2013-11-013-61/+0
|\ | | | | debian: remove rc script
| * debian: remove rc scriptJohannes Dewender2013-11-023-61/+0
|/ | | | | | This is now in python3-rtslib-fb. Signed-off-by: Johannes Dewender <github@JonnyJD.net>
* update version to 2.1.fb31v2.1.fb31Andy Grover2013-10-301-1/+1
| | | | Signed-off-by: Andy Grover <agrover@redhat.com>
* Merge pull request #31 from JonnyJD/python3_anyAndy Grover2013-10-301-1/+1
|\ | | | | Problem with detecting Python3 on Debian
| * debian: don't use :any in python3 dependencyJohannes Dewender2013-10-301-1/+1
|/ | | | | | python3:any only works in very recent Debian systems (unstable) Signed-off-by: Johannes Dewender <github@JonnyJD.net>
* Merge pull request #30 from JonnyJD/make_debAndy Grover2013-10-2614-124/+118
|\ | | | | update debian packaging
| * debian: switch to using Python 3Johannes Dewender2013-10-263-7/+16
| | | | | | | | Signed-off-by: Johannes Dewender <github@JonnyJD.net>
| * debian: add init scriptJohannes Dewender2013-10-264-1/+62
| | | | | | | | Signed-off-by: Johannes Dewender <github@JonnyJD.net>