Remove duplicate plugin property

One "feature" of Python is that it lets you redeclare functions in
the same scope. Pretty sure this was unintentional, here.

Signed-off-by: Andy Grover <agrover@redhat.com>
Properties return generators instead of lists

Remove flattern_nested_list() and gen_list_item()

The things that needed flatten_nested_list are more suited to using
generators directly, rather than indirectly via gen_list_item. There are
a few instances where the code really *does* want a list instead of an
iterator, so some callsite changes were also needed.

Signed-off-by: Andy Grover <agrover@redhat.com>

Conflicts:
	rtslib/root.py
Return "rtslib" instead of "rtsadmin" from RTSRoot.__str__

I have no idea if this is used anywhere, but it seems like the right
thing to do.

Signed-off-by: Andy Grover <agrover@redhat.com>
Fix doc typo

Signed-off-by: Andy Grover <agrover@redhat.com>
example.spec: spell fix

Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
Signed-off-by: Andy Grover <agrover@redhat.com>
gitignore: remove *.spec it

it blacklists basically everything in spec/

Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
Signed-off-by: Andy Grover <agrover@redhat.com>
Add spec for the usb_gadget

* Original author is Sebastian Andrzej Siewior <bigeasy@linutronix.de>, just
  made a version without lenghtly copyright header in the specfile to match the
  other ones.
Comment typos/grammar

Signed-off-by: Andy Grover <agrover@redhat.com>
Fix discovery auth disable

We're being passed a '0' or '1', need to convert to int before testing
to see which way we should set it.

Signed-off-by: Andy Grover <agrover@redhat.com>
Fixed comment in ib_srpt.spec
Raise RTSLibError if trying to create invalid entry in configfs

rtslib is designed to only throw RTSLib-defined exceptions. Since
the mkdir can fail, wrap it in a try block and convert any errors to
rtsliberrors.

This should fix https://bugzilla.redhat.com/show_bug.cgi?id=830672

Signed-off-by: Andy Grover <agrover@redhat.com>

Conflicts:
	rtslib/node.py
Centralize .spec handling in target.py

Move spec_dir to target.py from node.py:CFSNode

Add an all() classmethod to return all FabricModules

Signed-off-by: Andy Grover <agrover@redhat.com>
Merge-and-fix: Jerome Martin <tramjoe.merin@gmail.com>

Conflicts:
	rtslib/node.py
	rtslib/target.py
Convert exception to RTSLibError if fwrite in _set_enable fails

Also, have _get_enable return True/False rather than 1/0

Signed-off-by: Andy Grover <agrover@redhat.com>
Remove print from fileio._configure

Now sure how that got in there.

Signed-off-by: Andy Grover <agrover@redhat.com>
Fix typo in utils.py docstring
Fix doc grammar for CFSNode _create_in_cfs_ine
Clean up LUN.delete()

Typo and make iteration more idiomatic.

Signed-off-by: Andy Grover <agrover@redhat.com>
 Simplify MappedLUN._get_write_protect

* Based on fb tree e7babd1b61ed9d2c8eebfa49ea743bd5d25e4798
  by Andy Grover <agrover@redhat.com>
Don't import doctest globally; just import it in _test()

This improves load time because doctest is a large module. On my
machine, removing the global import of doctest decreases load time
from 60 ms to 30 ms.

Original author: Christophe Vu-Brugier <cvubrugier@yahoo.fr>
Ensure the first char of the version is a digit