Convert all exceptions in set_parameter/attribute to RTSLibError

Also remove unneeded conversions.

Signed-off-by: Andy Grover <agrover@redhat.com>
Change set_parameters/attributes to take an err_func

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>
fix typo

Fixed a small typo in node's set_parameter().
Merge pull request #49 from fielder/master

fix typo
Fix missing err_func parameter to set_attributes

Closes #50

Reported-by: Chris Fielder <shambler.qc@gmail.com>
Signed-off-by: Andy Grover <agrover@redhat.com>
'!' allowed character in block and partition names

See https://bugzilla.redhat.com/show_bug.cgi?id=1082208

Signed-off-by: Andy Grover <agrover@redhat.com>
Do not set emulate_write_cache based on write_back param for block

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>
Don't add to cache if cfs create fails

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>
Update version to 2.1.fb48

Signed-off-by: Andy Grover <agrover@redhat.com>
Consolidate two mapping dicts into one

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>
Don't lower-case return values from _parse_info functions

Shouldn't be necessary.

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

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

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