summaryrefslogtreecommitdiff
path: root/targetcli
Commit message (Collapse)AuthorAgeFilesLines
* Update version for proper pkg versioningv2.1.fb22Andy Grover2013-04-101-1/+1
| | | | | | | | | | | | | | Unfortunately I made a mistake, and did not handle version with 'rc' in it as specified here: http://fedoraproject.org/wiki/Packaging:NamingGuidelines#Pre-Release_packages I'm incrementing the version to 2.1.<fb-ver> to get version sequencing right. It's a little uncool for me to be mixing my developer and packager roles here, but I think I can rationalize a version bump, given the tag and WWN improvements recently. Signed-off-by: Andy Grover <agrover@redhat.com>
* Updating version string format and numberv2.0.fb22Andy Grover2013-04-091-1/+1
| | | | | | | | Packaging tools tend to miscalculate which version is higher when "fb" is in the version. Switch to omitting "fb" from $EXTRAVERSION. git tags will continue to have "fb". Signed-off-by: Andy Grover <agrover@redhat.com>
* Remove accidentally left-in printAndy Grover2013-04-011-1/+0
| | | | | | From tag implementation. Signed-off-by: Andy Grover <agrover@redhat.com>
* Remove execute_command in UIRTSLibNodeAndy Grover2013-03-281-16/+0
| | | | | | extraneous. Signed-off-by: Andy Grover <agrover@redhat.com>
* Fix params to UITarget.summary()Andy Grover2013-03-281-1/+1
| | | | | | self passed implicitly. Signed-off-by: Andy Grover <agrover@redhat.com>
* Next version is fb21v2.0.fb21Andy Grover2013-03-041-1/+1
| | | | Signed-off-by: Andy Grover <agrover@redhat.com>
* Add error checking for tag()Andy Grover2013-03-041-1/+6
| | | | | | Report an error if source wwn_or_tag is empty. Signed-off-by: Andy Grover <agrover@redhat.com>
* Fix UINodeACL creationAndy Grover2013-03-041-1/+1
| | | | | | | | UINodeACL expects the NodeACL wwn name, not the NodeACL itself. Closes #18 Signed-off-by: Andy Grover <agrover@redhat.com>
* Next version is 2.0.fb20v2.0.fb20Andy Grover2013-02-261-1/+1
| | | | | | Let's ditch the rc1 bit, it has no use. Signed-off-by: Andy Grover <agrover@redhat.com>
* Better fileio checking for existing backstore.Andy Grover2013-02-261-2/+4
| | | | | | See https://bugzilla.redhat.com/show_bug.cgi?id=915664 Signed-off-by: Andy Grover <agrover@redhat.com>
* Simplify tag()Andy Grover2013-02-261-5/+1
| | | | | | tag() always takes a new_tag. Signed-off-by: Andy Grover <agrover@redhat.com>
* Add tag supportAndy Grover2013-02-251-58/+201
| | | | | | | | | | Tags allow initiator WWNs to be given shorter names, as well as multiple WWNs to be managed as one unit. get() operations just get values from Simplify auth- and discovery_auth-setting code. Signed-off-by: Andy Grover <agrover@redhat.com>
* Use super() to call base class methodsAndy Grover2013-02-251-11/+11
| | | | | | Such as __init__() and summary(). Signed-off-by: Andy Grover <agrover@redhat.com>
* Save N backups of config fileAndy Grover2013-02-121-9/+23
| | | | | | | | | We save so much, they can get smooshed when something goes wrong but you're just checking it out with targetcli. Save 10. Only save backups when saving to default location. Signed-off-by: Andy Grover <agrover@redhat.com>
* model alias follow-upAndy Grover2013-02-072-17/+11
| | | | | | | | | | | | | | | Don't raise an exception if we can't set emulate_model_alias, just print a diagnostic. Rename ui_set_model_alias to setup_model_alias. 'setup' seems a little more accurate since we don't always set model alias, it depends on the preference. Rename export_backstore_as_model pref to export_backstore_name_as_model. Add a configshell default for export_backstore_name_as_model, set to True. Signed-off-by: Andy Grover <agrover@redhat.com>
* Add some comments to document some classes as ABCsAndy Grover2013-02-071-0/+2
| | | | Signed-off-by: Andy Grover <agrover@redhat.com>
* Add feature support for emulate_model_aliasTregaron Bayly2013-02-072-3/+19
| | | | | | | | | New method ui_set_model_alias in UIBackstore class is invoked in the ui_command_create method of each subclass. The method either sets the attribute successfully or raises an informational error. The storage object is created either way. Signed-off-by: Tregaron Bayly <tbayly@bluehost.com>
* Change summary formats to "<thing>s: X" and handle rtslib changesAndy Grover2013-02-063-66/+25
| | | | | | | | | This lets us not bother with different text to have good grammar if the number of objects is 0, 1, or more. Update for rtslib changes. Signed-off-by: Andy Grover <agrover@redhat.com>
* Lower log level of a message in block create()Andy Grover2013-01-251-1/+1
| | | | Signed-off-by: Andy Grover <agrover@redhat.com>
* Better human_to_bytes parsingAndy Grover2013-01-251-5/+7
| | | | | | | | | | | | see https://bugzilla.redhat.com/show_bug.cgi?id=903909 Allow "GiB" as well as "GB" and "G" for units Use translate() instead of multiple replace() calls import missing RTSLiBError Signed-off-by: Andy Grover <agrover@redhat.com>
* next version is fb20Andy Grover2013-01-251-1/+1
| | | | Signed-off-by: Andy Grover <agrover@redhat.com>
* next version is fb19v2.0rc1.fb19Andy Grover2013-01-071-1/+1
| | | | Signed-off-by: Andy Grover <agrover@redhat.com>
* Use new restore functionality to provide better restoreconfig errorsAndy Grover2013-01-071-1/+3
| | | | | | | rtslib.root.restore() now returns a list of the specific errors that occurred. Print this list. Signed-off-by: Andy Grover <agrover@redhat.com>
* Handle localhost and ipv6 addresses in portal create and deletev2.0rc1.fb18Andy Grover2012-12-191-19/+49
| | | | | | | | | | | | | | | | | | | Implement ip autocomplete using ethtool, instead of using rtslib's list_eth_ips(). List 0.0.0.0 and ::0 (INADDR_ANY and IN6ADDR_ANY) in create autocomplete possibilities. Do not filter possible IPs -- if they're not valid (e.g. link-local) then the configfs create will fail, no problem. Handle ipv6 address bracketing. rtslib wants bracketed addresses, but configshell doesn't like doing completions with brackets. Present w/o brackets there, and then add them to ipv6 addrs for rtslib calls. Improve portal create help text. Signed-off-by: Andy Grover <agrover@redhat.com>
* Use SO equivalence support to simplify TPG LUN creation codeAndy Grover2012-12-031-3/+1
| | | | | | rtslib fb25 or later needed. Signed-off-by: Andy Grover <agrover@redhat.com>
* Allow a backstore path when creating a NodeACL MappedLUNAndy Grover2012-12-031-6/+60
| | | | | | | | | | Instead of a TPG LUN. This will create the TPG LUN if it doesn't already exist, and reuse it if it does. This change needs the new storage object equivalence code, so rtslib fb25 is needed. Signed-off-by: Andy Grover <agrover@redhat.com>
* check that a lun hasn't already been added to a tpg when addingAndy Grover2012-11-301-2/+8
| | | | | | | Change name of StorageObject to 'so' so the storage_object parameter doesn't get overwritten. Signed-off-by: Andy Grover <agrover@redhat.com>
* next version is fb18Andy Grover2012-11-121-1/+1
| | | | Signed-off-by: Andy Grover <agrover@redhat.com>
* disable authentication by defaultv2.0rc1.fb17Andy Grover2012-11-051-0/+4
| | | | | | | | See rhbz #873230 Make initially created TPGs not use authentication. Signed-off-by: Andy Grover <agrover@redhat.com>
* use os.ftruncate() for sparse file extensionAndy Grover2012-08-081-2/+1
| | | | | | Seems slightly nicer! Signed-off-by: Andy Grover <agrover@redhat.com>
* next version is fb17Andy Grover2012-08-071-1/+1
| | | | Signed-off-by: Andy Grover <agrover@redhat.com>
* Catch TPG enable errorsv2.0rc1.fb16Andy Grover2012-08-071-2/+5
| | | | | | | Some targets (e.g. sbp with no LUNs defined) may fail enabling. Catch this. Signed-off-by: Andy Grover <agrover@redhat.com>
* Safer savefile writingAndy Grover2012-08-071-1/+4
| | | | | | | | Would erase savefile if exception occurred during dump fsync() for correctness too. Signed-off-by: Andy Grover <agrover@redhat.com>
* Include readonly in summaryAndy Grover2012-08-071-2/+6
| | | | Signed-off-by: Andy Grover <agrover@redhat.com>
* Make write_back an optional parameter for block backstoresAndy Grover2012-08-071-2/+3
| | | | Signed-off-by: Andy Grover <agrover@redhat.com>
* Return human sizes in 2^10 units (gibi, mebi etc)Andy Grover2012-08-061-3/+11
| | | | | | | | Label them as such. Return more info for Block storage objects too. Signed-off-by: Andy Grover <agrover@redhat.com>
* fileio: modify based on rtslib changesAndy Grover2012-08-061-20/+20
| | | | | | buffered -> write-back Signed-off-by: Andy Grover <agrover@redhat.com>
* remove UIBackstore.prm_buffered()Andy Grover2012-08-031-12/+5
| | | | | | | | | | | Only used in fileiobackstore. We don't need to print "using buffered mode" any more since summary shows it. Fix default to buffer, like docs say. Signed-off-by: Andy Grover <agrover@redhat.com>
* log.error only takes strings, not objectsAndy Grover2012-08-031-1/+1
| | | | Signed-off-by: Andy Grover <agrover@redhat.com>
* Only show fabrics present in the systemAndy Grover2012-08-012-8/+5
| | | | | | | | | Don't show fabrics that need physical WWNs unless they are present. Showing them is just clutter. Simplify target summary. Signed-off-by: Andy Grover <agrover@redhat.com>
* next version is fb16Andy Grover2012-07-311-1/+1
| | | | Signed-off-by: Andy Grover <agrover@redhat.com>
* Add workaround for sbpv2.0rc1.fb15Andy Grover2012-07-301-1/+2
| | | | | | | SBP (1394) does not let a tpg be enabled until there is at least one LUN defined for it. Signed-off-by: Andy Grover <agrover@redhat.com>
* Print a warning if defining a mappedLun that already exists in the nodeaclAndy Grover2012-07-111-0/+4
| | | | Signed-off-by: Andy Grover <agrover@redhat.com>
* Add support for readonly parameter for block backstoresAndy Grover2012-07-111-2/+4
| | | | Signed-off-by: Andy Grover <agrover@redhat.com>
* Don't need conditional in bytes_to_humanAndy Grover2012-07-101-2/+0
| | | | Signed-off-by: Andy Grover <agrover@redhat.com>
* Refactor for different storageobject summariesAndy Grover2012-07-101-20/+33
| | | | | | | | | Subclass UIStorageObject. Override summary(). Having Storageobject be used for all so types was getting too ugly. Also, clean up hackery in bytes_to_human. Signed-off-by: Andy Grover <agrover@redhat.com>
* Don't allow creation of storageobjects if already existsAndy Grover2012-07-101-0/+5
| | | | | | | Old strategy of trying to open with O_EXCL doesn't work on files. We could use flock/fcntl but won't they be dropped when targetcli exits? Signed-off-by: Andy Grover <agrover@redhat.com>
* next version is fb15Andy Grover2012-06-271-1/+1
| | | | Signed-off-by: Andy Grover <agrover@redhat.com>
* Fix backstore delete cmd, it no longer needs to delete storage objectsv2.0rc1.fb14Andy Grover2012-06-251-3/+0
| | | | Signed-off-by: Andy Grover <agrover@redhat.com>
* next version is fb14Andy Grover2012-06-121-1/+1
| | | | Signed-off-by: Andy Grover <agrover@redhat.com>