fix regression of cmdline.py

 * Fix regression: remove default value of member_id, member_count and
   member_type which make other command failed as extra option found.
   Example:
   ====
   lsmcli --create-access-group=gris_test --id=0000000000000099 --type=WWPN
   --system "CLARiiON+APM00114104374"
   lsmcli: error: expected options = (id,type,system) actual =
   (id,member_ids,system,type)
   ====

Signed-off-by: Gris Ge <fge@redhat.com>
smis.py: filter the output of access_groups_granted_to_volume()

 * Filter out those CIM_SCSIProtocolController who is not initiator access
   group.
 * Restricting CIM query byt ResultClass='CIM_SCSIProtocolController'.

Signed-off-by: Gris Ge <fge@redhat.com>
Trivial: limit job->volume or job->pool query by CIM_AffectedJobElement

 * Restrict CIM query by AssocClass='CIM_AffectedJobElement'.

Signed-off-by: Gris Ge <fge@redhat.com>
Trivial: smis.py: PEP8 clean up

 * Just clean up the remaining PEP8 issue of SMIS plugin.

Signed-off-by: Gris Ge <fge@redhat.com>
allow optional data retrieval of disks() call

 * Comments update for DISK.RETRIEVE_FULL_INFO flags of disks().

Signed-off-by: Gris Ge <fge@redhat.com>
clean up Disk class

 * Removed 'health' property from mandatory property list. It's duplicate
   info as 'status' property could report the health of disk.
 * Hide internal use variables.
 * Removed LSI only optional properties 'predictive_fail_count' and
   'media_err_count'. The 'status' property should be enough.
 * Added new disk type Disk.DISK_TYPE_SCSI which is widely used.
 * Move dmtf_disk_type_2_lsm_disk_type() and its constants to SMIS plugin.

Signed-off-by: Gris Ge <fge@redhat.com>
allows lsmcli -l DISKS support -o switch

 * Add support of '-o' switch in 'lsmcli -l DISKS' command.
 * Manpage updated for this switch.

Signed-off-by: Gris Ge <fge@redhat.com>
ontap.py: update disks() to support data.Disk.RETRIEVE_FULL_INFO flag

 * Support data.Disk.RETRIEVE_FULL_INFO flag in disks() call.
 * Use Disk.DISK_TYPE_SCSI new disk type.
 * Correct the disk name from 'vendor-id' to 'name'.
 * Treat 'is-prefailed' as Disk.STATUS_PREDICTIVE_FAILURE.

Signed-off-by: Gris Ge <fge@redhat.com>
smis.py: update disks() to support data.Disk.RETRIEVE_FULL_INFO flag

 * Support data.Disk.RETRIEVE_FULL_INFO flag.
 * Moved dmtf_disk_type_2_lsm_disk_type from data.py to smis.py.
 * Improved performance by clean up duplicate before call _new_disk().
 * Restrict LSI specified disk type checking by classname == LSIESG_DiskDrive

Signed-off-by: Gris Ge <fge@redhat.com>
smis.py: Fixup flag parameters

Some methods were setting the flag default to False but then
passing an integer.  Setting defaults to zero instead as to
maintain the the type of integer.

Signed-off-by: Tony Asleson <tasleson@redhat.com>
smis.py: Fixup flag parameters

Missed one, see previous commit msg.

Signed-off-by: Tony Asleson <tasleson@redhat.com>
targetd.py: Fix exportfs to return correct type

Call is suppose to return an object, not a string.

Signed-off-by: Tony Asleson <tasleson@redhat.com>
cmdline.py: Require at least 1 RO/RW host for nfs export

Change the requirement to require at least 1 RO/RW
host when creating a new nfs export.

Signed-off-by: Tony Asleson <tasleson@redhat.com>
cmdtest.py: Add option for different FS pool

Some arrays need separate pools for creating Volumes vs.
File systems.

Signed-off-by: Tony Asleson <tasleson@redhat.com>
ontap.py: enable Pool optional data support

 * Enable optional data support of Pool class.
 * Treat NetApp ONTAP volume as LSM pool.
 * User can create LSM volume in both ONTAP volume also.

Signed-off-by: Gris Ge <fge@redhat.com>
Fixed DEVPATH parsing in scan-scsi-target

On some systems the "/host..." component of the uevent DEVPATH
is not immediately followed by the "/target..." component.
Adjusted the parsing to handle any arbitrary DEVPATH.

Reported-by: Ajit Mote <amote@redhat.com>
Signed-off-by: Ewan D. Milne <emilne@redhat.com>
data.py: clean up Pool and Disk class

 * Removed STATUS and ENABLE_STATUS from IData.
   Using shared status constants like DMTF is a bad idea.
 * Removed IData.status_dmtf_to_lsm_type(). Its function has been moved
   into smis.py.
 * Put more precise definition on every Pool.status and Disk.status.
 * Introduced Pool.status_info holding error information and other
   non-OK information.
 * Renamed Disk.error_info to Disk.status_info.
 * Removed Disk.enable_status. It has been merged into Disk.status.
 * Raise LsmError(ErrorNumber.INVALID_ARGUMENT, ...) if status not found in
   status_to_str

Signed-off-by: Gris Ge <fge@redhat.com>
ontap.py: update pool and disk status

 * Use more maintainable way to translate ONTAP status to LSM status.

Signed-off-by: Gris Ge <fge@redhat.com>
smis.py: update pool and disk status

 * Use more maintainable way to convert DMTF status to LSM status.
 * Introduce new Pool.member_ids query way.
   Performance improved by:
        1. No extra Remaining StorageExtent query.
        2. No ISA query.
   The new way has a clear work flow:
        StoragePool -> CompositeExtent -> StorageExtent -> DiskDrive

Signed-off-by: Gris Ge <fge@redhat.com>
Make "list" cmd use _c()

For consistency with other commands.

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