Remove v7k plugin

This plugin is being removed for the following reasons:

1. No hardware to test it on
2. Plugin is not feature complete
3. SMI-S plugin at this point should offer a better experience
   for the user

We can certainly bring it back if needed.

Signed-off-by: Tony Asleson <tasleson@redhat.com>
rpm spec: fix for OBS build

 Enable OBS build:
  1. Workaround for OBS bug 864323 by using one-line macro.
  2. Move BuildRequires:python-argparse of libstoragemgmt-python to top
     package. Required by OBS.
  3. Show check log - test-suite.log if failed. Important when facing OBS
     build failure. Thanks to libvirt:
        http://www.redhat.com/archives/libvir-list/2013-July/msg01834.html

Signed-off-by: Gris Ge <fge@redhat.com>
test: allowing runtest to show log of lsmd

 1. Plush STDOUT on every logger call of lsmd daemon.
 2. Change lsmd to systemd mode and save output to a tmp log file.
    Useful to deubg daemon error and plugin error in OBS build where no way
    to check syslog.
 3. Fix a trivial typo:
        export CK_export CK_FORK=no
 4. Removed the 'tab' from runtest.sh which is mixing 'tab' and 'space'

Signed-off-by: Gris Ge <fge@redhat.com>
cmdline.py: Check before reference

If we aren't doing the comand 'list', then self.args.type
is not present and we will throw an exception.  Check
before use.

This was found when trying to run plugin-info without a uri
set.

Signed-off-by: Tony Asleson <tasleson@redhat.com>
C API V2: Simplify lsm_capability_set_n

More than once the call to lsm_capability_set_n has been done incorrectly
when adding or removing capabilities.  Christophe offered this good suggestion:

"From a quick look at the code, it seems that instead of expecting the
API user to explicitly give the number of vararg items, you can remove
the 'uint32_t number' argument, and instead expect a list of
capabilities terminated by '-1' or some kind of sentinel value. This
removes the need for counting the args more or less manually"

This patch does just that, thanks Christophe!

V2 by Gris:
I just rebase this patch to master tree by change 43 back to 44 before
applying.

Signed-off-by: Tony Asleson <tasleson@redhat.com>
Signed-off-by: Gris Ge <fge@redhat.com>
test: empty expected_absent capabilities check

The 'simc://' and 'sim://' plugins are not sharing the same list of
UNSUPPORTED capabilities.

Before sync the behaviour of these two plugins, I would like to make test pass
by empty expected_absent capabilities check

Signed-off-by: Gris Ge <fge@redhat.com>
lsmcli: use python-ordereddict for python <= 2.6

OrderedDict is only available in python 2.7.[1]
We use it from python-ordereddict package which is a backport version.

Tested on RHEL 6.2 which does not port OrderedDict from 2.7 yet.

Signed-off-by: Gris Ge <fge@redhat.com>
Remove INIT_TYPE_WWNN and etc unused initiator type

* Removed these initiator types as no plugin is using them:
    INIT_TYPE_WWNN                      (Python)
    INIT_TYPE_HOSTNAME                  (Python)
    INIT_TYPE_SAS                       (Python)
    LSM_ACCESS_GROUP_INIT_TYPE_WWNN     (C)
    LSM_ACCESS_GROUP_INIT_TYPE_HOSTNAME (C)
    LSM_ACCESS_GROUP_INIT_TYPE_SAS      (C)

* Update plugins for above changes.

* Renamed this type in C API:
    INIT_TYPE_ISCSI_WWPN_MIXED to LSM_ACCESS_GROUP_INIT_TYPE_ISCSI_WWPN_MIXED

* Removed old initiator class in C API:
    1. Renamed lsm_initiator_type to lsm_access_group_init_type
    2. Removed lsm_plug_initiator_grant() method
    3. Removed _lsm_initiator class.

* Fix incorrect parameter of lsm_iscsi_chap_auth:
    initiator -> init_id

* Enabled iscsi_chap_auth test.

Signed-off-by: Gris Ge <fge@redhat.com>
Python API: standardize the WWPN

 1. Forcing user to input WWPN in this format:
        10:00:00:00:c9:95:2f:de

 2. Add methods to lsm.AccessGroup:
    AccessGroup.init_id_validate()
    AccessGroup.wwpn_to_lsm_type()

 3. Rename INVALID_IQN to INVALID_INIT

Signed-off-by: Gris Ge <fge@redhat.com>
C API: Rename LSM_ERR_INVALID_IQN to LSM_ERR_INVALID_INIT

* Remove old LSM_ERR_INVALID_INIT which is not cleaned up by last initiator
  class removal.

* Rename LSM_ERR_INVALID_IQN to LSM_ERR_INVALID_INIT.

Signed-off-by: Gris Ge <fge@redhat.com>
lsmcli: Remove --init-type argument

 * Remove '--init-type' by auto detecting user input.
 * Manpage updated.
 * cmdtest.py updated.

Signed-off-by: Gris Ge <fge@redhat.com>
ontap plugin: Rename INVALID_IQN to INVALID_INIT

Rename ErrorNumber.INVALID_IQN to ErrorNumber.INVALID_INIT.

Signed-off-by: Gris Ge <fge@redhat.com>
SMI-S plugin: standardize the WWPN

 * Convert SNIA format WWPN to LSM format before saving in AccessGroup.
 * Convert LSM WWPN to SNIA format before sending to WBEM.

Signed-off-by: Gris Ge <fge@redhat.com>
SMI-S plugin: Fix access group bugs

 * Fix these problems:
    1. _cim_init_check_or_create() incorrect return CIMInstanceName when
       creation needed.
       # Now, method renamed to _cim_init_path_check_or_create().
       # will return CIMInstanceName always.

    2. The confliction error will be raise as CIMError in InvokeMethod()
       command, not in _wait_invoke() method.
       # Now, we do confliction check when error happened.
       # Not check pre-excute, which can save some time for most legal use.

Signed-off-by: Gris Ge <fge@redhat.com>