Use classes for fabric modules

specs suck. Make subclasses for each type of fabric.

Move class FabricModule to fabric.py.

Delete data-based spec info in fabrics.py.

Fix generate_wwn to return a valid NAA address, and to support eui.

Replace is_valid_wwn() with normalize_wwn(), which converts it to
normalized format and throws an exception if it's invalid.

Fixup target.py code for changes.

Signed-off-by: Andy Grover <agrover@redhat.com>
Fix is_fresh for FabricModules

self._fresh should exist before _configure is called.

Signed-off-by: Andy Grover <agrover@redhat.com>
Rearrange target.py class order

Put Target first, and order contained classes based on their nesting.

Signed-off-by: Andy Grover <agrover@redhat.com>
Add reprs to objects

Signed-off-by: Andy Grover <agrover@redhat.com>
Simplify _gen_attached_luns a little

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>
Change canonical wwn representation to <wwn_type>.<wwn>

Basically use what iSCSI rfc defines. Other fabrics vary in whether they
put colons in, or have '0x' at front, or whatever. Change their fabric
objects to convert to/from our internal format.

Add Target.wwn_type field.

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

Remove extraneous override of _create_in_cfs_ine()

Do not check if storage object passed into LUN._configure() is a
StorageObject. If it acts like a storageobject we're fine.

Shorten an exception message.

Signed-off-by: Andy Grover <agrover@redhat.com>
More fixes in fabric.py from the recent changes

Fix imports

Rename BaseFabricModule to _BaseFabricModule to emphasize it is abstract
and not part of the API.

Move some variables out of class scope to module scope.

Changes for canonical WWN format changing from "XX:XX:XX" to
"wwn_type.XXXXXX". Code gets simpler for iscsi and loopback, and
more complex for everybody else.

Signed-off-by: Andy Grover <agrover@redhat.com>
More fabric doc edits

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