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>
Make "list" cmd use _c()

For consistency with other commands.

Signed-off-by: Andy Grover <agrover@redhat.com>
Start conversion to ArgParser

Use ArgumentParser instead of OptionParser. Their usage is rather similar,
but fix up issues like changing add_option to add_argument, and
add_argument_group instead of OptionGroup.

Signed-off-by: Andy Grover <agrover@redhat.com>
Metavar not used for store_true

Signed-off-by: Andy Grover <agrover@redhat.com>
Fix up ArgumentParser instantiation for version handling

Argparse treats version like an argument instead of a parameter to the
object, but then we set version= in the new argument.

Signed-off-by: Andy Grover <agrover@redhat.com>
Cmdline.cli() returns a single object, not two, now

Replace all usages of self.options with self.args.

Remove the one prior usage of self.args, (check for extras),
not longer applicable.

Signed-off-by: Andy Grover <agrover@redhat.com>
Fixup plugin-info argument

It's a command, so it should store instead of store_true

Set a metavar.

Signed-off-by: Andy Grover <agrover@redhat.com>
ArgParser doesn't need usage set

It generates the usage line from the parser's data.

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