Update license to "Apache 2.0" in setup.py

Also remove unused imports and improve spacing in setup().

Signed-off-by: Christophe Vu-Brugier <cvubrugier@yahoo.fr>
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.

Signed-off-by: Christophe Vu-Brugier <cvubrugier@yahoo.fr>
Merge pull request #28 from cvubrugier/for-agrover

Pull request for my for-agrover branch
Ensure the first char of the version is a digit
Merge pull request #30 from josephglanville/master

Ensure the first char of the version is a digit
Handle weird disk names in get_blockdev_size

We need to allow for numbers in the disk name, and also that if
the last character is a digit, the partition name will include a 'p'
between the disk name and the partition number.

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

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

Signed-off-by: Andy Grover <agrover@redhat.com>
Fix _path used by tcm_fc

tcm_fc has a different name than the configfs dir it uses. When converting
to classes, we kept setting self.configfs_group but stopped overriding it
for tcm_fc, causing things to break.

Change docs to tell subclasses to override self._path, and fix fcoe class
to match.

Reported-by: Chris Leech <cleech@redhat.com>
Signed-off-by: Andy Grover <agrover@redhat.com>
update version to 2.1.39

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

Introduced in c37a00b93bff4d89b28992e7c4e6d1fa98351b74,
which is in fb38 and fb39.

The reported error was
NameError: global name 'MappedLun' is not defined.

Signed-off-by: Johannes Dewender <github@JonnyJD.net>
Merge pull request #31 from JonnyJD/MappedLun_typo

fix MappedLun typo
update version to 2.1.40

Signed-off-by: Andy Grover <agrover@redhat.com>
sbp_target wants euis without leading 0x on them

Signed-Off-By: Jay Fenlason <fenlason@redhat.com>
Signed-off-by: Andy Grover <agrover@redhat.com>
on restore, don't enable a target until its luns, etc are set up

sbp objects if you attempt to enable a target before its luns have
been configured.  This causes restoreconfig to fail.  Fix by setting
up luns first.

Signed-off-by: Jay Fenlason <fenlason@redhat.com>
Signed-off-by: Andy Grover <agrover@redhat.com>
use 2to3 in setup
mention that this is Python 3 compatible
Merge pull request #32 from JonnyJD/2to3

run 2to3 on setup
Fix get_blockdev_size for non-512 logical block sizes

/sys/block/x/size returns sectors, not logical blocks. We need to scale
this result to return the right answer.

Signed-off-by: Andy Grover <agrover@redhat.com>
Comply with PEP 3310 "Catching Exceptions in Python 3000"

Generated with `2to3 -f except`.

Signed-off-by: Christophe Vu-Brugier <cvubrugier@yahoo.fr>
Use set literals to better comply with Python 3

Generated with `2to3 -f set_literal`.

Signed-off-by: Christophe Vu-Brugier <cvubrugier@yahoo.fr>