Discussion:
[Libstoragemgmt-devel] [SCM] libstoragemgmt branch, master, updated. 1.0.0-26-g3ae7798
Tony Asleson
2014-10-16 21:15:36 UTC
Permalink
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "libstoragemgmt".

The branch, master has been updated
via 3ae77989c34bc649902d779b911645cf54139d6f (commit)
via 2139bfe6e69f46a721da0bc56c164b84a1b839cb (commit)
via f7008c17b8b7d5d407225bae6dd3c4109e6ccfd7 (commit)
via ba43de4f3227301a36e92c327f094416e9be974c (commit)
via 234b037a5b4002e34101d347e089ba9059994cb0 (commit)
via abe922cc01406a5c9c6c00eb0157ec4ead9508e3 (commit)
via 2ab33a36103d83fbc2cc33f978a02234fb99ef2d (commit)
via 4f17a159cc3c2fe9f991b8e8fa1a3fe12e902de1 (commit)
via b8c2992cc1a617110b4b6b6e02cd108076b868ed (commit)
via 036d9266b2cc2220fd857343e9d73c5b8c56356a (commit)
via a12827b77c39c2697522703312ec9cd6ca987ab9 (commit)
via cf43846c353ff279eed2bce6989e893e17983fd5 (commit)
via 4ded8c3f53f09cbabad09edd33c21d36de589230 (commit)
via 3089dff635faf2728a831730537ad406aac5a08f (commit)
via aa9a08da36ab1f03f7b8fd8b4794fbda6f696dc1 (commit)
via c73f53016e3dea101d9b5307b8c429caab6dbc34 (commit)
via 36a55bd920f03db167a06ca025e37bdcc827c30d (commit)
via 1ff995135ea4eb717142df9e72749c08776c0f12 (commit)
via 4ab67a5e0333e575bac55789500da666e5332966 (commit)
via d5832a47232db7b1661089cb74f60c8f0f526413 (commit)
via 678bfed7256b46e7815759a1e69c977006866b4c (commit)
via b4ff7817510d1bd08941ff2981d90c0459d4aeb6 (commit)
via a9352a009fba07e710fdcf7c4b7e21b7198acbe4 (commit)
via 32d8384e3a79518b119e365adbc138e0380d64a8 (commit)
from eb9ec7323c556101d4376710448637a38bebfe1e (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit 3ae77989c34bc649902d779b911645cf54139d6f
Author: Gris Ge <***@redhat.com>
Date: Wed Oct 15 22:31:37 2014 +0800

Nstor Plugin: Set VOLUME_THIN element type when querying pool.

* Existing volume_create() of Nstor plugin code indicate Nstor 3.x
support Thin Provisioning, hence show Pool.ELEMENT_TYPE_VOLUME_THIN
when querying pool.

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

commit 2139bfe6e69f46a721da0bc56c164b84a1b839cb
Author: Gris Ge <***@redhat.com>
Date: Wed Oct 15 22:31:36 2014 +0800

ONTAP Plugin: Add thin provisioning support.

* The pool query will got more element_type:
Pool.ELEMENT_TYPE_VOLUME_THIN
Pool.ELEMENT_TYPE_VOLUME_FULL
indicating the thin provisioning setting of certain pool.
* To have a thin and full pool:
NetApp volume has to set 'guarantee' option to 'file'
* To have a thin only pool:
NetApp volume with 'guarantee' option as 'none' or
NetApp volume with 'guarantee' option as 'volume' with
'fractional_reserve' option less than 100.
* To have a full only pool:
NetApp volume has to set 'guarantee' as 'volume' and
'fractional_reserve' option equal to 100.

* Allow these 'provision' parameter of volume_create:
Volume.PROVISION_DEFAULT
Volume.PROVISION_FULL
Volume.PROVISION_THIN

* As NetApp ONTAP LUN has its own allocation setting[1], we allow user
to create THIN LUN on FULL only pool or FULL LUN on THIN only pool.
So that user can change pool(NetApp volume) setting to achieve their
expectation.

* For Volume.PROVISION_DEFAULT, we create FULL LUN.

[1] LUN could be marked as FULL while pool is a thin only pool.
In ONTAP CLI, it said:
'Space Reservation: enabled (not honored by containing Aggregate)'

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

commit f7008c17b8b7d5d407225bae6dd3c4109e6ccfd7
Author: Gris Ge <***@redhat.com>
Date: Wed Oct 15 22:31:35 2014 +0800

SMI-S Plugin: Allow provision parameter of volume_create()

* Allow 'provision' parameter of volume_create() to be:
Volume.PROVISION_DEFAULT
Volume.PROVISION_FULL
Volume.PROVISION_THIN

* For Volume.PROVISION_DEFAULT, we create full allocated volume
unless only thin volume is supported. [1]

* For full allocated volume, we set 'ElementType' of
CreateOrModifyElementFromStoragePool() to dmtf.ELEMENT_THICK_VOLUME(2)

* For thin provisioning volume, we set 'ElementType' of
CreateOrModifyElementFromStoragePool() to dmtf.ELEMENT_THIN_VOLUME(5)

* This also fix a bug when running plugin_test.py against HDS AMS where
only dmtf.ELEMENT_THIN_VOLUME(5) is supported.

[1] HDS AMS Thin Pool only support ThinlyProvisionedStorageVolume.

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

commit ba43de4f3227301a36e92c327f094416e9be974c
Author: Gris Ge <***@redhat.com>
Date: Wed Oct 15 22:31:34 2014 +0800

SMI-S Plugin: Indicate pool thin provisioning status in pool querying.

* Add the ability to check whether cerntain pool can create
StorageVolume(3) or/and ThinlyProvisionedStorageVolume(5) via
CIM_StorageConfigurationCapabilities['SupportedStorageElementTypes']

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

commit 234b037a5b4002e34101d347e089ba9059994cb0
Author: Gris Ge <***@redhat.com>
Date: Wed Oct 15 22:31:33 2014 +0800

lsmcli: Add new element types of lsm.Pool.

* Add these new element types of lsm.Pool:
lsm.Pool.ELEMENT_TYPE_VOLUME_THIN
lsm.Pool.ELEMENT_TYPE_VOLUME_FULL

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

commit abe922cc01406a5c9c6c00eb0157ec4ead9508e3
Author: Gris Ge <***@redhat.com>
Date: Wed Oct 15 22:31:32 2014 +0800

Library: Add new element_type to pool for thin provisioning.

* Pool.ELEMENT_TYPE_VOLUME_THIN(Python) and
LSM_POOL_ELEMENT_TYPE_VOLUME_THIN(C) indicate current pool can
create thin provisioning volume via:

volume_create(provisioning=Volume.PROVISION_THIN)

* Pool.ELEMENT_TYPE_VOLUME_FULL(Python) and
LSM_POOL_ELEMENT_TYPE_VOLUME_FULL(C) indicate current pool can
create full allocated volume via:

volume_create(provisioning=Volume.PROVISION_FULL)

* To have back compatibility, Pool.ELEMENT_TYPE_VOLUME and
LSM_POOL_ELEMENT_TYPE_VOLUME indicate current pool can create
volume and allowing plugin or array to decide the provisioning type via:

volume_create(provisioning=Volume.PROVISION_DEFAULT)

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

commit 2ab33a36103d83fbc2cc33f978a02234fb99ef2d
Author: Gris Ge <***@redhat.com>
Date: Sun Oct 12 18:09:56 2014 +0800

lsmenv: Integrate with plugin_test.py

* Update plugin_test.py to read LSM_TEST_URI and LSM_TEST_PASSWORD
if command line arguments didn't provided URI and password.

* Update lsmenv to set LSM_TEST_URI and LSM_TEST_PASSWORD for given device
alias.

* Create a shortcut in lsmenv for plugin_test.py. Example:
lsmenv vnx plugin_test

* This patch just save my time of typing uri and password for plugin_test.

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

commit 4f17a159cc3c2fe9f991b8e8fa1a3fe12e902de1
Author: Gris Ge <***@redhat.com>
Date: Sun Oct 12 18:09:54 2014 +0800

lsmcli: new alias lt = lsmcli list --type target_ports

* Create new alias 'lsmcli lt' for this command:
lsmcli list --type target_ports

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

commit b8c2992cc1a617110b4b6b6e02cd108076b868ed
Author: Tony Asleson <***@redhat.com>
Date: Wed Oct 8 18:44:58 2014 -0500

rpm spec: udev files to /usr/lib dir instead of /lib

Later versions of Fedora and EL linux moved /lib to /usr/lib.

Signed-off-by: Tony Asleson <***@redhat.com>

commit 036d9266b2cc2220fd857343e9d73c5b8c56356a
Author: Tony Asleson <***@redhat.com>
Date: Wed Oct 8 16:51:21 2014 -0500

rpm spec: Move command line python files to python package

We cannot have files that have a py extension in packages that are
not in noarch rpm. This is to prevent a user from installing both
32bit and 64bit packages on the same system from having signature
conflicts for the compiled python files (pyc).

Signed-off-by: Tony Asleson <***@redhat.com>

commit a12827b77c39c2697522703312ec9cd6ca987ab9
Author: Tony Asleson <***@redhat.com>
Date: Wed Oct 8 16:49:53 2014 -0500

rpm spec: Use correct tmpfiles.d dir

Signed-off-by: Tony Asleson <***@redhat.com>

commit cf43846c353ff279eed2bce6989e893e17983fd5
Author: Tony Asleson <***@redhat.com>
Date: Wed Oct 8 15:08:19 2014 -0500

Fix mem leaks in lsm_daemon.c, simc_lsmplugin.c

Not likely to happen in normal operation.

Signed-off-by: Tony Asleson <***@redhat.com>

commit 4ded8c3f53f09cbabad09edd33c21d36de589230
Author: Tony Asleson <***@redhat.com>
Date: Wed Oct 1 17:00:55 2014 -0500

simarray.py: Lock state file

There is a possiblity of an older exiting simulator plugin writing
its state out while a new client is reading state from the file.
Ensure this cannot happen with a lock on the state file to ensure
that only one plugin can be mucking with the state file at one time.

This is only a theory as I'm unable to reproduce a failure I was
seeing while building packages, but it would be good to prevent
concurrent access to the state file regardless.

The file is opened and locked and kept open until the plugin is
closed.

Signed-off-by: Tony Asleson <***@redhat.com>

commit 3089dff635faf2728a831730537ad406aac5a08f
Author: Gris Ge <***@redhat.com>
Date: Tue Oct 14 18:08:21 2014 +0800

Plugin test: Fix incorrect NAME_CONFLICT check in test_volume_replication()

* If certain plugin didn't raise LsmError on NAME_CONFLICT for
volume_create(), plugin_test.py will incorrectly treat it as PASS.
This patch fixed it by using a error_num variable to checking
NAME_CONFLICT.

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

commit aa9a08da36ab1f03f7b8fd8b4794fbda6f696dc1
Author: Gris Ge <***@redhat.com>
Date: Tue Oct 14 18:08:20 2014 +0800

SMI-S Plugin: Check duplicate name in volume_replicate()

* Some (EMC VMAX, Dot hill) SMI-S Providers allow duplicated
ElementName when creating replication, we have to do a pre-check by
enumerating all CIM_StroageVolume with 'ElementName' property only.

* EMC VMAX passed the 'TestPlugin.test_volume_replication' test of
plugin_test.py.

V2:
- We don't need to check for duplicate volume name in the exception
handler if we already checked before trying to replicate
- Move quicker search code into method so it can be shared.
- rebased

Signed-off-by: Gris Ge <***@redhat.com>
Signed-off-by: Tony Asleson <***@redhat.com>

commit c73f53016e3dea101d9b5307b8c429caab6dbc34
Author: Gris Ge <***@redhat.com>
Date: Thu Oct 9 16:49:57 2014 +0800

SMI-S Plugin: Workaround for volume name duplication check after job creation.

Problem:
EMC VNX SMI-S provider will create a CIM_ConcreteJob when volume_create()
with exist volume name. It will mark CIM_ConcreteJob as failed for
volume confliction.

Root Cause:
Out SMI-S plugin only does error handling for duplicate volume name when
job creation for volume_create(), not after a job_creation.

Fix:
Run this duplication check in job_status() for volume_create:
self._check_for_dupe_vol(volume_name, sys.exc_info())

Detail Fix:
1. New constant SmisCommon.JOB_RETRIEVE_VOLUME_CREATE to indicate
a job is generated by volume_create().
2. Store method_data into job id:

self._job_id(cim_job, retrieve_data, method_data)
Smis._parse_job_id(job_id)
self._pi(msg, retrieve_data, method_data, rc, out)
# method_data could be used to store information(string) into job_id
# for error handling in job_status()
3. Run self._check_for_dupe_vol() in job_status() if cim_job failed.
4. Change self._check_for_dupe_vol() to allow setting original_exception
as None. In that case, it will not raise error when not NAME_CONFLICT.

Before fix:

$ lsmcli vc --name gris_test_10 \
--pool 'CLARiiON+FCN00122500421+U+Pool 0' --size 1B

PLUGIN_BUG(2): C:ERROR_CLASS_SOFTWARE F:ERROR_FAMILY_FAILED R:1000006 An
error from a sub-library call occurred : 2 : 20027 : "The specified LUN
name is already in use."

After fix:

$ lsmcli vc --name gris_test_10 \
--pool 'CLARiiON+FCN00122500421+U+Pool 0' --size 1B

NAME_CONFLICT(50): Volume with name 'gris_test_10' already exists!

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

commit 36a55bd920f03db167a06ca025e37bdcc827c30d
Author: Gris Ge <***@redhat.com>
Date: Tue Oct 14 18:06:22 2014 +0800

SMI-S Plugin: Refactor, remove smis_constants.py

* Move smis_constants.JS_XXX to dmtf.py:
smis_constants.JS_NEW -> dmtf.JOB_STATE_NEW
smis_constants.JS_STARTING -> dmtf.JOB_STATE_STARTING
smis_constants.JS_RUNNING -> dmtf.JOB_STATE_RUNNING
smis_constants.JS_COMPLETED -> dmtf.JOB_STATE_COMPLETED
* Removed unused smis_constants.JS_XXX constatns:
smis_constants.JS_SUSPENDED
smis_constants.JS_SHUTTING_DOWN
smis_constants.JS_TERMINATED
smis_constants.JS_KILLED
smis_constants.JS_EXCEPTION
* Replace these constants:
smis_constants.JOB_OK => dmtf.OP_STATUS_OK
smis_constants.JOB_COMPLETE => dmtf.OP_STATUS_COMPLETED
* Removed Unused constants:
smis_constants.JOB_ERROR
smis_constants.JOB_STOPPED
* Move these InvokeMethod() return code to SmisCommon:
smis_constants.INVOKE_OK => SmisCommon.SNIA_INVOKE_OK
smis_constants.INVOKE_ASYNC => SmisCommon.SNIA_INVOKE_ASYNC
smis_constants.INVOKE_NOT_SUPPORTED =>
SmisCommon.SNIA_INVOKE_NOT_SUPPORTED
smis_constants.INVOKE_FAILED => SmisCommon.SNIA_INVOKE_FAILED
* Removed these InvokeMethod() return code as unused:
smis_constants.INVOKE_TIMEOUT
smis_constants.INVOKE_FAILED
smis_constants.INVOKE_INVALID_PARAMETER
smis_constants.INVOKE_IN_USE
smis_constants.INVOKE_SIZE_NOT_SUPPORTED
* Replaced these constants used by CreateElementReplica():
smis_constants.SYNC_TYPE_MIRROR
-> dmtf.SYNC_TYPE_MIRROR
smis_constants.SYNC_TYPE_SNAPSHOT
-> dmtf.SYNC_TYPE_SNAPSHOT
smis_constants.SYNC_TYPE_CLONE
-> dmtf.SYNC_TYPE_CLONE
smis_constants.CREATE_ELEMENT_REPLICA_MODE_SYNC
-> dmtf.REPLICA_MODE_SYNC
smis_constants.CREATE_ELEMENT_REPLICA_MODE_ASYNC
-> dmtf.REPLICA_MODE_ASYNC
* Move these constants into dmtf.
VOL_NAME_FORMAT_OTHER
VOL_NAME_FORMAT_NNA
VOL_NAME_FORMAT_EUI64
VOL_NAME_FORMAT_T10VID

VOL_NAME_SPACE_OTHER
VOL_NAME_SPACE_VPD83_TYPE3
VOL_NAME_SPACE_VPD83_TYPE2
VOL_NAME_SPACE_VPD83_TYPE1
* Removed these unused constants:
VOL_NAME_FORMAT_VPD83_NNA6
VOL_NAME_FORMAT_VPD83_NNA5
VOL_NAME_FORMAT_VPD83_TYPE2
VOL_NAME_FORMAT_VPD83_TYPE1
VOL_NAME_FORMAT_VPD83_TYPE0
VOL_NAME_FORMAT_SNVM
VOL_NAME_FORMAT_NODE_WWN

VOL_NAME_SPACE_OTHER
VOL_NAME_SPACE_VPD80
VOL_NAME_SPACE_NODE_WWN
VOL_NAME_SPACE_SNVM
* Move these constants to SmisCommon:
smis_constants.JOB_RETRIEVE_NONE => SmisCommon.JOB_RETRIEVE_NONE
smis_constants.JOB_RETRIEVE_VOLUME => SmisCommon.JOB_RETRIEVE_VOLUME
# These two constants is just for plugin internal use, not a SNIA or DMTF
# constant.
* Move these constants into SmisCommon:
smis_constants.IAAN_WBEM_HTTP_PORT => SmisCommon.IAAN_WBEM_HTTP_PORT
smis_constants.IAAN_WBEM_HTTPS_PORT => SmisCommon.IAAN_WBEM_HTTPS_PORT
# These two constant is defined by IETF IAAN. Store in SmisCommon class
# which was supposed to hold non-dmtf constants.
* Previously:
incorrect use
CIM_ReplicationServiceCapabilities['SupportedReplicationTypes'] --
2(Synchronous Mirror Local) for Capabilities.VOLUME_REPLICATE
capability.
Now:
Use CIM_ReplicationServiceCapabilities['SupportedSynchronousActions'] and
['SupportedAsynchronousActions'] -- 2(CreateElementReplica) for
Capabilities.VOLUME_REPLICATE capability.
* Remove smis_constants.RepSvc.Action class.
* Add dmtf.REPLICA_CAP_ACTION_CREATE_ELEMENT for 2(CreateElementReplica)
in CIM_ReplicationServiceCapabilities['SupportedSynchronousActions'] and
['SupportedAsynchronousActions'].
* Replace smis_constants.RepSvc with these constants in dmtf.py:
RepSvc.RepTypes.SYNC_SNAPSHOT_LOCAL
-> dmtf.REPLICA_CAP_TYPE_SYNC_SNAPSHOT_LOCAL
RepSvc.RepTypes.ASYNC_SNAPSHOT_LOCAL
-> dmtf.REPLICA_CAP_TYPE_ASYNC_SNAPSHOT_LOCAL
RepSvc.RepTypes.SYNC_CLONE_LOCAL
-> dmtf.REPLICA_CAP_TYPE_SYNC_CLONE_LOCAL
RepSvc.RepTypes.ASYNC_CLONE_LOCAL
-> dmtf.REPLICA_CAP_TYPE_ASYNC_CLONE_LOCAL
RepSvc.RepTypes.SYNC_MIRROR_LOCAL
-> dmtf.REPLICA_CAP_TYPE_SYNC_MIRROR_LOCAL
RepSvc.RepTypes.ASYNC_MIRROR_LOCAL
-> dmtf.REPLICA_CAP_TYPE_ASYNC_MIRROR_LOCAL
* Removed these unused constants:
RepSvc.RepTypes.SYNC_MIRROR_REMOTE
RepSvc.RepTypes.ASYNC_MIRROR_REMOTE
RepSvc.RepTypes.SYNC_CLONE_REMOTE
RepSvc.RepTypes.ASYNC_CLONE_REMOTE
* Replace smis_constants.CopyStates with dmtf.py constants:
smis_constants.CopyStates.SYNCHRONIZED
-> dmtf.COPY_STATE_SYNC
* Removed smis_constants.CopyStates unused constants:
smis_constants.CopyStates.INITIALIZED
smis_constants.CopyStates.UNSYNCHRONIZED
smis_constants.CopyStates.INACTIVE
* Remove smis_constants.CopyStates class.
* Replaced smis_constants.CopyTypes by dmtf constants:
smis_constants.CopyTypes.ASYNC
-> dmtf.ST_CONF_CAP_COPY_TYPE_ASYNC
smis_constants.CopyTypes.SYNC
-> dmtf.ST_CONF_CAP_COPY_TYPE_SYNC
smis_constants.CopyTypes.UNSYNCASSOC
-> dmtf.ST_CONF_CAP_COPY_TYPE_UNSYNC_ASSOC
smis_constants.CopyTypes.UNSYNCUNASSOC
-> dmtf.ST_CONF_CAP_COPY_TYPE_UNSYNC_UNASSOC
* Removed smis_constants.CopyTypes as all its constants moved out.
* Replaced this constants by dmtf one:
smis_constants.Synchronized.SyncState.SYNCHRONIZED
-> dmtf.ST_SYNC_STATE_SYNCHRONIZED
* Removed unused constants in smis_constants.py:
smis_constants.Synchronized.SyncState.INITIALIZED
smis_constants.Synchronized.SyncState.PREPAREINPROGRESS
smis_constants.Synchronized.SyncState.PREPARED
smis_constants.Synchronized.SyncState.RESYNCINPROGRESS
smis_constants.Synchronized.SyncState.FRACTURE_IN_PROGRESS
smis_constants.Synchronized.SyncState.QUIESCEINPROGRESS
smis_constants.Synchronized.SyncState.QUIESCED
smis_constants.Synchronized.SyncState.RESTORE_IN_PROGRESSS
smis_constants.Synchronized.SyncState.IDLE
smis_constants.Synchronized.SyncState.BROKEN
smis_constants.Synchronized.SyncState.FRACTURED
smis_constants.Synchronized.SyncState.FROZEN
smis_constants.Synchronized.SyncState.COPY_IN_PROGRESS
* Remove smis_constants.Synchronized class as all its constants moved out.
* Removed these unused constants of smis_constants.py:
CREATE_ELEMENT_REPLICA_MODE_SYNC
CREATE_ELEMENT_REPLICA_MODE_ASYNC
VOL_OP_STATUS_OK
VOL_OP_STATUS_DEGRADED
VOL_OP_STATUS_ERR
VOL_OP_STATUS_STARTING
VOL_OP_STATUS_DORMANT
EXPOSE_PATHS_DA_READ_ONLY
* Replace smis_constants.EXPOSE_PATHS_DA_READ_WRITE with
dmtf.CTRL_CONF_SRV_DA_RW
* Remove empty smis_constants.py file.
* Makefile and rpm SPEC file updated

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

commit 1ff995135ea4eb717142df9e72749c08776c0f12
Author: Gris Ge <***@redhat.com>
Date: Fri Oct 3 14:29:26 2014 +0800

SMI-S Plugin: Refactor dmtf.py

* Move dmtf.DMTF.OP_STATUS_XXX to dmtf.DMTF_OP_STATUS_XXX.
* Move dmtf.DMTF.dmtf_op_status_list_conv() to
dmtf.dmtf_op_status_list_conv()
* Move dmtf.DMTF.dmtf_op_status_to_str() to
dmtf._dmtf_op_status_to_str()
* Removed all dmtf.DMTF_STATUS_XXX constants as no method is
using it.
* Please use dmtf.DMTF_OP_STATUS_XXX instead if needed.
* Remove DMTF class as no __init__() or methods any more.
* All DMTF constants moved to dmtf.py file level.

Changes in V2:

* Remove 'DMTF_' prefix of constants in dmtf.py.
* Changed 'from dmtf import *' to 'import dmtf' in smis_xxx.py files.
* Renamed dmtf.dmtf_op_status_list_conv() to dmtf.op_status_list_conv()

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

commit 4ab67a5e0333e575bac55789500da666e5332966
Author: Gris Ge <***@redhat.com>
Date: Tue Sep 30 17:22:06 2014 +0800

SMI-S Plugin: Refactor, add smis_disk.py file.

* Empty smis_disk.py with license file only.
* Makefile and RPM spec file updated.
* Remove as no method is using EMC_DISK_STATUS_REMOVED constants.
* Replace DMTF.cim_disk_status_of() with smis_disk.disk_status_of_cim_disk()
* Replace dmtf.dmtf_disk_type_2_lsm_disk_type() with
smis_disk.dmtf_disk_type_2_lsm_disk_type()
* Remove unused method Smis._cim_disk_of_pri_ext()
* Replace Smis._disk_id() with smis_disk.disk_id_of_cim_disk()
* Replace Smis._new_disk_cim_disk_pros() with
smis_disk.cim_disk_pros()
* Replace Smis._sys_id_child(cim_disk) with
smis_disk.sys_id_of_cim_disk(cim_disk)
* Replace Smis._new_disk() with smis_disk.cim_disk_to_lsm_disk()
* Moved Smis._pri_cim_ext_of_cim_disk() into smis_disk.
* Merged Smis._new_disk_cim_ext_pros() into smis_disk.cim_disk_to_lsm_disk()
as no need to has a method for storing a non-shared list.
* Combining these changes in one patch as they are internal actions for
smis_disk.cim_disk_to_lsm_disk().
* Hide these internal methods of smis_disk:
smis_disk.disk_id_of_cim_disk()
-> smis_disk._disk_id_of_cim_disk()
smis_disk.dmtf_disk_type_2_lsm_disk_type()
-> smis_disk._dmtf_disk_type_2_lsm_disk_type()
smis_disk.disk_status_of_cim_disk()
-> smis_disk._disk_status_of_cim_disk()

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

commit d5832a47232db7b1661089cb74f60c8f0f526413
Author: Gris Ge <***@redhat.com>
Date: Tue Sep 30 15:13:48 2014 +0800

SMI-S Plugin: Refactor, add smis_pool.py file

* Empty smis_pool.py with license only.
* Makefile and RPM spec file updated.
* Replace Smis._cim_pools_of() with smis_pool.cim_pools_of_cim_sys_path()
* Merge the pool filtering(remove spare pool and other unused pool) into
smis_pool.cim_pools_of_cim_sys_path().
With this, it save some WBEM calls[1] in volumes().
Performance changes for volumes()(lsmcli list --type volumes):
EMC VNX with 95 volumes:
Old: 13.37s
New: 8.97s

* Replace Smis._pool_id() with smis_pool.pool_id_of_cim_pool()
* Replace Smis._property_list_of_id(self, 'Pool') with
smis_pool.cim_pool_id_pros()
* Replaced Smis._new_pool_cim_pool_pros(self) with
smis_pool.cim_pool_pros()
* Remove smis_constants.JOB_RETRIEVE_POOL
* Remove Smis._new_pool_from_name() and Smis._new_pool_from_job()
* Move DMTF.cim_pool_status_of() to
smis_pool._pool_status_of_cim_pool().
# This method is for smis_pool internal use only now.
* Move Smis._pool_element_type() to
smis_pool._pool_element_type()
# This method is for smis_pool internal use only now.
* Removed Smis._sys_id_of_cim_pool() as no method require it.
* Add MegaRAID workaround for smis_pool._pool_element_type()
to improve performance by returning (Pool.ELEMENT_TYPE_VOLUME, 0)
directly. Tested on a remote MegaRAID card with two pools:
Old: 10.10s # With all pending patches but this one.
New: 4.61s
* Move Smis._new_pool() to smis_pool.cim_pool_to_lsm_pool()
* Including three changes in patch as _pool_status_of_cim_pool() and
_pool_element_type() are internal methods for
smis_pool.cim_pool_to_lsm_pool() now.
* Using json to save the CIMInstanceName of CIM_StoragePool into
lsm.Pool.plugin_data and convert it back when needed:
* Save:
Pool.plugin_data = json.dumps({
'classname': cim_path.classname,
'keybindings': dict(cim_path.keybindings),
'host': cim_path.host,
'namespace': cim_path.namespace,
})

* Load:
CIMInstanceName(**json.loads(Pool.plugin_data))

* Replace Smis._get_cim_instance_by_id(self, 'Pool', pool.id) with
smis_pool.lsm_pool_to_cim_pool_path(smis_common, pool)
* Replace Smis._get_pool_from_vol() with smis_pool.pool_id_of_cim_vol()

Changes in V2:
* Fix the error message formatter.
* Use json instead of cPickle for security concern[2].

[1] Old codes will try to find volumes on spare pool or other unused pool
which is waster of time.
[2] __reduce__() will be called by cPickle.loads() which might be
use to excute any command remoted.

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

commit 678bfed7256b46e7815759a1e69c977006866b4c
Author: Gris Ge <***@redhat.com>
Date: Thu Sep 25 20:58:26 2014 +0800

SMI-S Plugin: Refactor, add smis_sys.py

* Just empty smis_sys.py file with license only.
* Makefile and RPM spec file updated.
* Replace Smis._property_list_of_id(self, "System") with
smis_sys.cim_sys_id_pros()
* Replace Smis._sys_id(self, cim_sys) with
smis_sys.sys_id_of_cim_sys(cim_sys)
* Move Smis.system_list to SmisCommon.system_list to allow
other smis_sys.py to do system filtering.
* Replaced Smis._root_cim_syss(self) with smis_sys.root_cim_sys(smis_common)
* Replace Smis._cim_sys_pros(self) with smis_sys.cim_sys_pros()
* Make DMTF._dmtf_op_status_list_conv() public as
DMTF.dmtf_op_status_list_conv().
* Move DMTF.cim_sys_status_of() to smis_sys._sys_status_of_cim_sys().
# Only used in smis_sys internally, hence hide from public.
* Move Smis._cim_sys_to_lsm() to smis_sys.cim_sys_to_lsm_sys()
* Add DMTF.OP_STATUS_UNKNOWN -> System.STATUS_UNKNOWN map.
Found EMC SMI-S provider will use 0(Unknown) for outdated system.
* Including smis_sys._sys_status_of_cim_sys() and
smis_sys.cim_sys_to_lsm_sys() changes in one patch as
_sys_status_of_cim_sys() is only used by smis_sys.cim_sys_to_lsm_sys().
* Replace Smis._get_cim_instance_by_id("System") with
smis_sys.cim_sys_of_sys_id()
* Fix the bug when query filtered system.
Example:

URI: smispy://***@emc-smi?systems=CLARiiON+APM00041704073
CMD: lsmcli capabilities --sys CLARiiON+FCN00122500421

Expected result:
lsmcli should report system not found as URI already filter that
requested system out.

Actual result:
lsmcli got capabilities of filtered system.

Fix:
Replace EnumerateInstances("CIM_ComputerSystem") with
smis_sys.root_cim_sys() which implemented the system filter.

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

commit b4ff7817510d1bd08941ff2981d90c0459d4aeb6
Author: Tony Asleson <***@redhat.com>
Date: Tue Sep 23 11:55:52 2014 -0500

SMI-S plugin: Refactor, add smis_cap.py, smis_constants.py files

Moving handle_cim_error, hex_string_format to utils.py

Move smis class constants to smis_constants.py, move remaining
DMTF constants to dmtf.py file.

There is quite a bit of code which is used to determine
what capabilities an array supports. Move this into
a separate file of related functionality.

To make this work we needed to move:

- get_class_instance
- get_cim_service_path

To smis_common.py

I also moved the MASK_* constants to the new file too.

Updated:
- Rename file to smis_cap.py
- Change from class to functions instead

Signed-off-by: Tony Asleson <***@redhat.com>

commit a9352a009fba07e710fdcf7c4b7e21b7198acbe4
Author: Gris Ge <***@redhat.com>
Date: Tue Sep 23 17:52:22 2014 +0800

SMI-S plugin: Refactor, remove eseries.py, smisproxy.py files

* Remove fallback mode as no array really need them.
All SMI-S provider I have access support DMTF profile register and support
SMI-S 1.4 'Array' profile[1].
* New method: SmisCommon.is_netappe() for NetApp-E vendor code check.
* Simply move eseries.py codes into smis.py using SmisCommon.is_netappe()
check.
* Remove eseries.py file.
* Makefile and RPM spec file updated.
* SmisProxy is not needed any more after eseries.py got removed.
* Vendor specific code will be stored in smis.py or future sub
module/namespace of smis.py.
* Makefile and RPM spec file updated.

Changes in V2:

* Fixed a NetApp-E bug:
Old:
self._vendor_namespace = SmisCommon._PRODUCT_NETAPP_E

def is_netappe(self):
return self._vendor_product == SmisCommon._PRODUCT_MEGARAID

New:
self._vendor_product = SmisCommon._PRODUCT_NETAPP_E

def is_netappe(self):
return self._vendor_product == SmisCommon._PRODUCT_NETAPP_E

[1] LSI/Avago MegaRAID is using 1.2 and using vendor specific code in this
plugin.

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

commit 32d8384e3a79518b119e365adbc138e0380d64a8
Author: Gris Ge <***@redhat.com>
Date: Tue Sep 23 17:52:15 2014 +0800

SMI-S plugin: Refactor, add smis_common.py, utils.py, dmtf.py files

* The SMI-S provider of HP 3PAR and LSI/Avago MegaRAID is using
'root/PG_Interop' namespace for profile register. Adding
'root/PG_Interop' into check list for profile register namespace.
* Move _merge_list() to separate file utils.py
* Move smis._merge_list() to utils.merge_list().
* Makefile and rpm spec updated.
* Moving SNIA class constants into SmisCommon class.
* SmisCommon class will handle WBEM connection which need __init__(),
so we create a SmisCommon class instead of using smis_common namespace.
* Makefile and RPM spec file updated.
* Move these constants into DMTF as they are defined in DMTF DSP1033:
Smis.DMTF_INTEROP_NAMESPACES => DMTF.INTEROP_NAMESPACES
Smis.SMIS_DEFAULT_NAMESPACE => DMTF.DEFAULT_NAMESPACE
* Move WBEM connection to SmisCommon. This allow use to move to other
WBEM client library in the future(like lmiwbem) with limited changes.
* In Smis class, the 'self._c' was a object of pywbem.WBEMConnection, now
a object of SmisCommon.
* To limit the changes of Smis class, wrap used method of WBEMConnection
in SmisCommon:
EnumerateInstances()
EnumerateInstanceNames()
InvokeMethod()
GetInstance()
References()
DeleteInstance()
Associators()
AssociatorNames()
These method names is defined by DMTF DSP0200, so I keep these CaMel method
name.

* EnumerateInstances() and EnumerateInstanceNames() will enumerate in vendor
name space instead of interop namespace. The vendor namespace was checked
by SmisCommon._vendor_namespace(self) via CIM_ElementConformsToProfile
association.

* New profile register in SmisCommon.__init__():
1. Only store highest version of certain profile.
Support status will be stored as SmisCommon._profile_dict in this
format:
{
SmisCommon.SNIA_DISK_LITE_PROFILE: \
SmisCommon.SMIS_SPEC_VER_1_4,

}
The SmisCommon._profile_dict will be used by
SmisCommon.profile_check().
2. Store root CIM_RegisteredProfile as SmisCommon.root_blk_cim_rp.
It will be used by Smis._root_cim_syss() method. (In other patch)
3. New profile support status check SmisCommon.profile_check().
4. Skip MegaRAID profile register check as they only support 1.2 'Array'
profile.

* Replace Smis._profile_is_supported() with SmisCommon.profile_check().
* Smis.cim_root_profile_dict is not needed anymore as
Smis._profile_is_supported() is replaced.

* Replace Smis._enumerate() with SmisCommon.EnumerateInstances() as
SmisCommon will handle the vendor namespace issue now.

* Replace Smis._enumerate() in disk capability check with
EnumerateInstanceNames() to save some time.[1]

* New method SmisCommon.is_megaraid(). It could be used to determine
the vendor specific code.

* Update Smis._root_cim_syss() to use SmisCommon.root_blk_cim_rp for
CIM_ElementConformsToProfile association.

* LSI/Avago MegaRAID has vendor specific code as it skip the profile
check[2]. It just enumerate all CIM_ComputerSystem as MegaRAID does not
support 'Multiple Computer System' profile.

[1] EnumerateInstanceNames() only return CIMInstanceName which contains
less data than a CIMInstance. For capability check, we just want to
find whether CIM_DiskDrive is supported or not. CIMInstanceName is enough
for this.

[2] If profile check skiped, SmisCommon.root_blk_cim_rp will be None.

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

-----------------------------------------------------------------------

Summary of changes:
.../include/libstoragemgmt/libstoragemgmt_types.h | 2 +
daemon/lsm_daemon.c | 6 +-
doc/man/lsmcli.1.in | 2 +
packaging/libstoragemgmt.spec.in | 39 +-
plugin/Makefile.am | 10 +-
plugin/nstor/nstor.py | 4 +-
plugin/ontap/na.py | 6 +-
plugin/ontap/ontap.py | 57 +-
plugin/sim/simarray.py | 22 +-
plugin/simc/simc_lsmplugin.c | 3 +
plugin/smispy/dmtf.py | 403 ++--
plugin/smispy/eseries.py | 164 --
plugin/smispy/smis.py | 2174 ++++----------------
plugin/smispy/smis_cap.py | 384 ++++
plugin/smispy/smis_common.py | 374 ++++
plugin/smispy/smis_disk.py | 195 ++
plugin/smispy/smis_pool.py | 290 +++
plugin/smispy/smis_sys.py | 149 ++
plugin/smispy/smisproxy.py | 51 -
plugin/smispy/smispy_lsmplugin | 4 +-
plugin/smispy/utils.py | 68 +
python_binding/lsm/_data.py | 2 +
test/plugin_test.py | 17 +-
tools/lsmcli/cmdline.py | 1 +
tools/lsmcli/data_display.py | 2 +
tools/lsmenv | 40 +-
26 files changed, 2296 insertions(+), 2173 deletions(-)
delete mode 100644 plugin/smispy/eseries.py
create mode 100644 plugin/smispy/smis_cap.py
create mode 100644 plugin/smispy/smis_common.py
create mode 100644 plugin/smispy/smis_disk.py
create mode 100644 plugin/smispy/smis_pool.py
create mode 100644 plugin/smispy/smis_sys.py
delete mode 100644 plugin/smispy/smisproxy.py
create mode 100644 plugin/smispy/utils.py


hooks/post-receive
--
libstoragemgmt
Tony Asleson
2014-10-16 21:15:36 UTC
Permalink
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "libstoragemgmt".

The branch, master has been updated
via 3ae77989c34bc649902d779b911645cf54139d6f (commit)
via 2139bfe6e69f46a721da0bc56c164b84a1b839cb (commit)
via f7008c17b8b7d5d407225bae6dd3c4109e6ccfd7 (commit)
via ba43de4f3227301a36e92c327f094416e9be974c (commit)
via 234b037a5b4002e34101d347e089ba9059994cb0 (commit)
via abe922cc01406a5c9c6c00eb0157ec4ead9508e3 (commit)
via 2ab33a36103d83fbc2cc33f978a02234fb99ef2d (commit)
via 4f17a159cc3c2fe9f991b8e8fa1a3fe12e902de1 (commit)
via b8c2992cc1a617110b4b6b6e02cd108076b868ed (commit)
via 036d9266b2cc2220fd857343e9d73c5b8c56356a (commit)
via a12827b77c39c2697522703312ec9cd6ca987ab9 (commit)
via cf43846c353ff279eed2bce6989e893e17983fd5 (commit)
via 4ded8c3f53f09cbabad09edd33c21d36de589230 (commit)
via 3089dff635faf2728a831730537ad406aac5a08f (commit)
via aa9a08da36ab1f03f7b8fd8b4794fbda6f696dc1 (commit)
via c73f53016e3dea101d9b5307b8c429caab6dbc34 (commit)
via 36a55bd920f03db167a06ca025e37bdcc827c30d (commit)
via 1ff995135ea4eb717142df9e72749c08776c0f12 (commit)
via 4ab67a5e0333e575bac55789500da666e5332966 (commit)
via d5832a47232db7b1661089cb74f60c8f0f526413 (commit)
via 678bfed7256b46e7815759a1e69c977006866b4c (commit)
via b4ff7817510d1bd08941ff2981d90c0459d4aeb6 (commit)
via a9352a009fba07e710fdcf7c4b7e21b7198acbe4 (commit)
via 32d8384e3a79518b119e365adbc138e0380d64a8 (commit)
from eb9ec7323c556101d4376710448637a38bebfe1e (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit 3ae77989c34bc649902d779b911645cf54139d6f
Author: Gris Ge <***@redhat.com>
Date: Wed Oct 15 22:31:37 2014 +0800

Nstor Plugin: Set VOLUME_THIN element type when querying pool.

* Existing volume_create() of Nstor plugin code indicate Nstor 3.x
support Thin Provisioning, hence show Pool.ELEMENT_TYPE_VOLUME_THIN
when querying pool.

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

commit 2139bfe6e69f46a721da0bc56c164b84a1b839cb
Author: Gris Ge <***@redhat.com>
Date: Wed Oct 15 22:31:36 2014 +0800

ONTAP Plugin: Add thin provisioning support.

* The pool query will got more element_type:
Pool.ELEMENT_TYPE_VOLUME_THIN
Pool.ELEMENT_TYPE_VOLUME_FULL
indicating the thin provisioning setting of certain pool.
* To have a thin and full pool:
NetApp volume has to set 'guarantee' option to 'file'
* To have a thin only pool:
NetApp volume with 'guarantee' option as 'none' or
NetApp volume with 'guarantee' option as 'volume' with
'fractional_reserve' option less than 100.
* To have a full only pool:
NetApp volume has to set 'guarantee' as 'volume' and
'fractional_reserve' option equal to 100.

* Allow these 'provision' parameter of volume_create:
Volume.PROVISION_DEFAULT
Volume.PROVISION_FULL
Volume.PROVISION_THIN

* As NetApp ONTAP LUN has its own allocation setting[1], we allow user
to create THIN LUN on FULL only pool or FULL LUN on THIN only pool.
So that user can change pool(NetApp volume) setting to achieve their
expectation.

* For Volume.PROVISION_DEFAULT, we create FULL LUN.

[1] LUN could be marked as FULL while pool is a thin only pool.
In ONTAP CLI, it said:
'Space Reservation: enabled (not honored by containing Aggregate)'

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

commit f7008c17b8b7d5d407225bae6dd3c4109e6ccfd7
Author: Gris Ge <***@redhat.com>
Date: Wed Oct 15 22:31:35 2014 +0800

SMI-S Plugin: Allow provision parameter of volume_create()

* Allow 'provision' parameter of volume_create() to be:
Volume.PROVISION_DEFAULT
Volume.PROVISION_FULL
Volume.PROVISION_THIN

* For Volume.PROVISION_DEFAULT, we create full allocated volume
unless only thin volume is supported. [1]

* For full allocated volume, we set 'ElementType' of
CreateOrModifyElementFromStoragePool() to dmtf.ELEMENT_THICK_VOLUME(2)

* For thin provisioning volume, we set 'ElementType' of
CreateOrModifyElementFromStoragePool() to dmtf.ELEMENT_THIN_VOLUME(5)

* This also fix a bug when running plugin_test.py against HDS AMS where
only dmtf.ELEMENT_THIN_VOLUME(5) is supported.

[1] HDS AMS Thin Pool only support ThinlyProvisionedStorageVolume.

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

commit ba43de4f3227301a36e92c327f094416e9be974c
Author: Gris Ge <***@redhat.com>
Date: Wed Oct 15 22:31:34 2014 +0800

SMI-S Plugin: Indicate pool thin provisioning status in pool querying.

* Add the ability to check whether cerntain pool can create
StorageVolume(3) or/and ThinlyProvisionedStorageVolume(5) via
CIM_StorageConfigurationCapabilities['SupportedStorageElementTypes']

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

commit 234b037a5b4002e34101d347e089ba9059994cb0
Author: Gris Ge <***@redhat.com>
Date: Wed Oct 15 22:31:33 2014 +0800

lsmcli: Add new element types of lsm.Pool.

* Add these new element types of lsm.Pool:
lsm.Pool.ELEMENT_TYPE_VOLUME_THIN
lsm.Pool.ELEMENT_TYPE_VOLUME_FULL

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

commit abe922cc01406a5c9c6c00eb0157ec4ead9508e3
Author: Gris Ge <***@redhat.com>
Date: Wed Oct 15 22:31:32 2014 +0800

Library: Add new element_type to pool for thin provisioning.

* Pool.ELEMENT_TYPE_VOLUME_THIN(Python) and
LSM_POOL_ELEMENT_TYPE_VOLUME_THIN(C) indicate current pool can
create thin provisioning volume via:

volume_create(provisioning=Volume.PROVISION_THIN)

* Pool.ELEMENT_TYPE_VOLUME_FULL(Python) and
LSM_POOL_ELEMENT_TYPE_VOLUME_FULL(C) indicate current pool can
create full allocated volume via:

volume_create(provisioning=Volume.PROVISION_FULL)

* To have back compatibility, Pool.ELEMENT_TYPE_VOLUME and
LSM_POOL_ELEMENT_TYPE_VOLUME indicate current pool can create
volume and allowing plugin or array to decide the provisioning type via:

volume_create(provisioning=Volume.PROVISION_DEFAULT)

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

commit 2ab33a36103d83fbc2cc33f978a02234fb99ef2d
Author: Gris Ge <***@redhat.com>
Date: Sun Oct 12 18:09:56 2014 +0800

lsmenv: Integrate with plugin_test.py

* Update plugin_test.py to read LSM_TEST_URI and LSM_TEST_PASSWORD
if command line arguments didn't provided URI and password.

* Update lsmenv to set LSM_TEST_URI and LSM_TEST_PASSWORD for given device
alias.

* Create a shortcut in lsmenv for plugin_test.py. Example:
lsmenv vnx plugin_test

* This patch just save my time of typing uri and password for plugin_test.

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

commit 4f17a159cc3c2fe9f991b8e8fa1a3fe12e902de1
Author: Gris Ge <***@redhat.com>
Date: Sun Oct 12 18:09:54 2014 +0800

lsmcli: new alias lt = lsmcli list --type target_ports

* Create new alias 'lsmcli lt' for this command:
lsmcli list --type target_ports

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

commit b8c2992cc1a617110b4b6b6e02cd108076b868ed
Author: Tony Asleson <***@redhat.com>
Date: Wed Oct 8 18:44:58 2014 -0500

rpm spec: udev files to /usr/lib dir instead of /lib

Later versions of Fedora and EL linux moved /lib to /usr/lib.

Signed-off-by: Tony Asleson <***@redhat.com>

commit 036d9266b2cc2220fd857343e9d73c5b8c56356a
Author: Tony Asleson <***@redhat.com>
Date: Wed Oct 8 16:51:21 2014 -0500

rpm spec: Move command line python files to python package

We cannot have files that have a py extension in packages that are
not in noarch rpm. This is to prevent a user from installing both
32bit and 64bit packages on the same system from having signature
conflicts for the compiled python files (pyc).

Signed-off-by: Tony Asleson <***@redhat.com>

commit a12827b77c39c2697522703312ec9cd6ca987ab9
Author: Tony Asleson <***@redhat.com>
Date: Wed Oct 8 16:49:53 2014 -0500

rpm spec: Use correct tmpfiles.d dir

Signed-off-by: Tony Asleson <***@redhat.com>

commit cf43846c353ff279eed2bce6989e893e17983fd5
Author: Tony Asleson <***@redhat.com>
Date: Wed Oct 8 15:08:19 2014 -0500

Fix mem leaks in lsm_daemon.c, simc_lsmplugin.c

Not likely to happen in normal operation.

Signed-off-by: Tony Asleson <***@redhat.com>

commit 4ded8c3f53f09cbabad09edd33c21d36de589230
Author: Tony Asleson <***@redhat.com>
Date: Wed Oct 1 17:00:55 2014 -0500

simarray.py: Lock state file

There is a possiblity of an older exiting simulator plugin writing
its state out while a new client is reading state from the file.
Ensure this cannot happen with a lock on the state file to ensure
that only one plugin can be mucking with the state file at one time.

This is only a theory as I'm unable to reproduce a failure I was
seeing while building packages, but it would be good to prevent
concurrent access to the state file regardless.

The file is opened and locked and kept open until the plugin is
closed.

Signed-off-by: Tony Asleson <***@redhat.com>

commit 3089dff635faf2728a831730537ad406aac5a08f
Author: Gris Ge <***@redhat.com>
Date: Tue Oct 14 18:08:21 2014 +0800

Plugin test: Fix incorrect NAME_CONFLICT check in test_volume_replication()

* If certain plugin didn't raise LsmError on NAME_CONFLICT for
volume_create(), plugin_test.py will incorrectly treat it as PASS.
This patch fixed it by using a error_num variable to checking
NAME_CONFLICT.

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

commit aa9a08da36ab1f03f7b8fd8b4794fbda6f696dc1
Author: Gris Ge <***@redhat.com>
Date: Tue Oct 14 18:08:20 2014 +0800

SMI-S Plugin: Check duplicate name in volume_replicate()

* Some (EMC VMAX, Dot hill) SMI-S Providers allow duplicated
ElementName when creating replication, we have to do a pre-check by
enumerating all CIM_StroageVolume with 'ElementName' property only.

* EMC VMAX passed the 'TestPlugin.test_volume_replication' test of
plugin_test.py.

V2:
- We don't need to check for duplicate volume name in the exception
handler if we already checked before trying to replicate
- Move quicker search code into method so it can be shared.
- rebased

Signed-off-by: Gris Ge <***@redhat.com>
Signed-off-by: Tony Asleson <***@redhat.com>

commit c73f53016e3dea101d9b5307b8c429caab6dbc34
Author: Gris Ge <***@redhat.com>
Date: Thu Oct 9 16:49:57 2014 +0800

SMI-S Plugin: Workaround for volume name duplication check after job creation.

Problem:
EMC VNX SMI-S provider will create a CIM_ConcreteJob when volume_create()
with exist volume name. It will mark CIM_ConcreteJob as failed for
volume confliction.

Root Cause:
Out SMI-S plugin only does error handling for duplicate volume name when
job creation for volume_create(), not after a job_creation.

Fix:
Run this duplication check in job_status() for volume_create:
self._check_for_dupe_vol(volume_name, sys.exc_info())

Detail Fix:
1. New constant SmisCommon.JOB_RETRIEVE_VOLUME_CREATE to indicate
a job is generated by volume_create().
2. Store method_data into job id:

self._job_id(cim_job, retrieve_data, method_data)
Smis._parse_job_id(job_id)
self._pi(msg, retrieve_data, method_data, rc, out)
# method_data could be used to store information(string) into job_id
# for error handling in job_status()
3. Run self._check_for_dupe_vol() in job_status() if cim_job failed.
4. Change self._check_for_dupe_vol() to allow setting original_exception
as None. In that case, it will not raise error when not NAME_CONFLICT.

Before fix:

$ lsmcli vc --name gris_test_10 \
--pool 'CLARiiON+FCN00122500421+U+Pool 0' --size 1B

PLUGIN_BUG(2): C:ERROR_CLASS_SOFTWARE F:ERROR_FAMILY_FAILED R:1000006 An
error from a sub-library call occurred : 2 : 20027 : "The specified LUN
name is already in use."

After fix:

$ lsmcli vc --name gris_test_10 \
--pool 'CLARiiON+FCN00122500421+U+Pool 0' --size 1B

NAME_CONFLICT(50): Volume with name 'gris_test_10' already exists!

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

commit 36a55bd920f03db167a06ca025e37bdcc827c30d
Author: Gris Ge <***@redhat.com>
Date: Tue Oct 14 18:06:22 2014 +0800

SMI-S Plugin: Refactor, remove smis_constants.py

* Move smis_constants.JS_XXX to dmtf.py:
smis_constants.JS_NEW -> dmtf.JOB_STATE_NEW
smis_constants.JS_STARTING -> dmtf.JOB_STATE_STARTING
smis_constants.JS_RUNNING -> dmtf.JOB_STATE_RUNNING
smis_constants.JS_COMPLETED -> dmtf.JOB_STATE_COMPLETED
* Removed unused smis_constants.JS_XXX constatns:
smis_constants.JS_SUSPENDED
smis_constants.JS_SHUTTING_DOWN
smis_constants.JS_TERMINATED
smis_constants.JS_KILLED
smis_constants.JS_EXCEPTION
* Replace these constants:
smis_constants.JOB_OK => dmtf.OP_STATUS_OK
smis_constants.JOB_COMPLETE => dmtf.OP_STATUS_COMPLETED
* Removed Unused constants:
smis_constants.JOB_ERROR
smis_constants.JOB_STOPPED
* Move these InvokeMethod() return code to SmisCommon:
smis_constants.INVOKE_OK => SmisCommon.SNIA_INVOKE_OK
smis_constants.INVOKE_ASYNC => SmisCommon.SNIA_INVOKE_ASYNC
smis_constants.INVOKE_NOT_SUPPORTED =>
SmisCommon.SNIA_INVOKE_NOT_SUPPORTED
smis_constants.INVOKE_FAILED => SmisCommon.SNIA_INVOKE_FAILED
* Removed these InvokeMethod() return code as unused:
smis_constants.INVOKE_TIMEOUT
smis_constants.INVOKE_FAILED
smis_constants.INVOKE_INVALID_PARAMETER
smis_constants.INVOKE_IN_USE
smis_constants.INVOKE_SIZE_NOT_SUPPORTED
* Replaced these constants used by CreateElementReplica():
smis_constants.SYNC_TYPE_MIRROR
-> dmtf.SYNC_TYPE_MIRROR
smis_constants.SYNC_TYPE_SNAPSHOT
-> dmtf.SYNC_TYPE_SNAPSHOT
smis_constants.SYNC_TYPE_CLONE
-> dmtf.SYNC_TYPE_CLONE
smis_constants.CREATE_ELEMENT_REPLICA_MODE_SYNC
-> dmtf.REPLICA_MODE_SYNC
smis_constants.CREATE_ELEMENT_REPLICA_MODE_ASYNC
-> dmtf.REPLICA_MODE_ASYNC
* Move these constants into dmtf.
VOL_NAME_FORMAT_OTHER
VOL_NAME_FORMAT_NNA
VOL_NAME_FORMAT_EUI64
VOL_NAME_FORMAT_T10VID

VOL_NAME_SPACE_OTHER
VOL_NAME_SPACE_VPD83_TYPE3
VOL_NAME_SPACE_VPD83_TYPE2
VOL_NAME_SPACE_VPD83_TYPE1
* Removed these unused constants:
VOL_NAME_FORMAT_VPD83_NNA6
VOL_NAME_FORMAT_VPD83_NNA5
VOL_NAME_FORMAT_VPD83_TYPE2
VOL_NAME_FORMAT_VPD83_TYPE1
VOL_NAME_FORMAT_VPD83_TYPE0
VOL_NAME_FORMAT_SNVM
VOL_NAME_FORMAT_NODE_WWN

VOL_NAME_SPACE_OTHER
VOL_NAME_SPACE_VPD80
VOL_NAME_SPACE_NODE_WWN
VOL_NAME_SPACE_SNVM
* Move these constants to SmisCommon:
smis_constants.JOB_RETRIEVE_NONE => SmisCommon.JOB_RETRIEVE_NONE
smis_constants.JOB_RETRIEVE_VOLUME => SmisCommon.JOB_RETRIEVE_VOLUME
# These two constants is just for plugin internal use, not a SNIA or DMTF
# constant.
* Move these constants into SmisCommon:
smis_constants.IAAN_WBEM_HTTP_PORT => SmisCommon.IAAN_WBEM_HTTP_PORT
smis_constants.IAAN_WBEM_HTTPS_PORT => SmisCommon.IAAN_WBEM_HTTPS_PORT
# These two constant is defined by IETF IAAN. Store in SmisCommon class
# which was supposed to hold non-dmtf constants.
* Previously:
incorrect use
CIM_ReplicationServiceCapabilities['SupportedReplicationTypes'] --
2(Synchronous Mirror Local) for Capabilities.VOLUME_REPLICATE
capability.
Now:
Use CIM_ReplicationServiceCapabilities['SupportedSynchronousActions'] and
['SupportedAsynchronousActions'] -- 2(CreateElementReplica) for
Capabilities.VOLUME_REPLICATE capability.
* Remove smis_constants.RepSvc.Action class.
* Add dmtf.REPLICA_CAP_ACTION_CREATE_ELEMENT for 2(CreateElementReplica)
in CIM_ReplicationServiceCapabilities['SupportedSynchronousActions'] and
['SupportedAsynchronousActions'].
* Replace smis_constants.RepSvc with these constants in dmtf.py:
RepSvc.RepTypes.SYNC_SNAPSHOT_LOCAL
-> dmtf.REPLICA_CAP_TYPE_SYNC_SNAPSHOT_LOCAL
RepSvc.RepTypes.ASYNC_SNAPSHOT_LOCAL
-> dmtf.REPLICA_CAP_TYPE_ASYNC_SNAPSHOT_LOCAL
RepSvc.RepTypes.SYNC_CLONE_LOCAL
-> dmtf.REPLICA_CAP_TYPE_SYNC_CLONE_LOCAL
RepSvc.RepTypes.ASYNC_CLONE_LOCAL
-> dmtf.REPLICA_CAP_TYPE_ASYNC_CLONE_LOCAL
RepSvc.RepTypes.SYNC_MIRROR_LOCAL
-> dmtf.REPLICA_CAP_TYPE_SYNC_MIRROR_LOCAL
RepSvc.RepTypes.ASYNC_MIRROR_LOCAL
-> dmtf.REPLICA_CAP_TYPE_ASYNC_MIRROR_LOCAL
* Removed these unused constants:
RepSvc.RepTypes.SYNC_MIRROR_REMOTE
RepSvc.RepTypes.ASYNC_MIRROR_REMOTE
RepSvc.RepTypes.SYNC_CLONE_REMOTE
RepSvc.RepTypes.ASYNC_CLONE_REMOTE
* Replace smis_constants.CopyStates with dmtf.py constants:
smis_constants.CopyStates.SYNCHRONIZED
-> dmtf.COPY_STATE_SYNC
* Removed smis_constants.CopyStates unused constants:
smis_constants.CopyStates.INITIALIZED
smis_constants.CopyStates.UNSYNCHRONIZED
smis_constants.CopyStates.INACTIVE
* Remove smis_constants.CopyStates class.
* Replaced smis_constants.CopyTypes by dmtf constants:
smis_constants.CopyTypes.ASYNC
-> dmtf.ST_CONF_CAP_COPY_TYPE_ASYNC
smis_constants.CopyTypes.SYNC
-> dmtf.ST_CONF_CAP_COPY_TYPE_SYNC
smis_constants.CopyTypes.UNSYNCASSOC
-> dmtf.ST_CONF_CAP_COPY_TYPE_UNSYNC_ASSOC
smis_constants.CopyTypes.UNSYNCUNASSOC
-> dmtf.ST_CONF_CAP_COPY_TYPE_UNSYNC_UNASSOC
* Removed smis_constants.CopyTypes as all its constants moved out.
* Replaced this constants by dmtf one:
smis_constants.Synchronized.SyncState.SYNCHRONIZED
-> dmtf.ST_SYNC_STATE_SYNCHRONIZED
* Removed unused constants in smis_constants.py:
smis_constants.Synchronized.SyncState.INITIALIZED
smis_constants.Synchronized.SyncState.PREPAREINPROGRESS
smis_constants.Synchronized.SyncState.PREPARED
smis_constants.Synchronized.SyncState.RESYNCINPROGRESS
smis_constants.Synchronized.SyncState.FRACTURE_IN_PROGRESS
smis_constants.Synchronized.SyncState.QUIESCEINPROGRESS
smis_constants.Synchronized.SyncState.QUIESCED
smis_constants.Synchronized.SyncState.RESTORE_IN_PROGRESSS
smis_constants.Synchronized.SyncState.IDLE
smis_constants.Synchronized.SyncState.BROKEN
smis_constants.Synchronized.SyncState.FRACTURED
smis_constants.Synchronized.SyncState.FROZEN
smis_constants.Synchronized.SyncState.COPY_IN_PROGRESS
* Remove smis_constants.Synchronized class as all its constants moved out.
* Removed these unused constants of smis_constants.py:
CREATE_ELEMENT_REPLICA_MODE_SYNC
CREATE_ELEMENT_REPLICA_MODE_ASYNC
VOL_OP_STATUS_OK
VOL_OP_STATUS_DEGRADED
VOL_OP_STATUS_ERR
VOL_OP_STATUS_STARTING
VOL_OP_STATUS_DORMANT
EXPOSE_PATHS_DA_READ_ONLY
* Replace smis_constants.EXPOSE_PATHS_DA_READ_WRITE with
dmtf.CTRL_CONF_SRV_DA_RW
* Remove empty smis_constants.py file.
* Makefile and rpm SPEC file updated

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

commit 1ff995135ea4eb717142df9e72749c08776c0f12
Author: Gris Ge <***@redhat.com>
Date: Fri Oct 3 14:29:26 2014 +0800

SMI-S Plugin: Refactor dmtf.py

* Move dmtf.DMTF.OP_STATUS_XXX to dmtf.DMTF_OP_STATUS_XXX.
* Move dmtf.DMTF.dmtf_op_status_list_conv() to
dmtf.dmtf_op_status_list_conv()
* Move dmtf.DMTF.dmtf_op_status_to_str() to
dmtf._dmtf_op_status_to_str()
* Removed all dmtf.DMTF_STATUS_XXX constants as no method is
using it.
* Please use dmtf.DMTF_OP_STATUS_XXX instead if needed.
* Remove DMTF class as no __init__() or methods any more.
* All DMTF constants moved to dmtf.py file level.

Changes in V2:

* Remove 'DMTF_' prefix of constants in dmtf.py.
* Changed 'from dmtf import *' to 'import dmtf' in smis_xxx.py files.
* Renamed dmtf.dmtf_op_status_list_conv() to dmtf.op_status_list_conv()

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

commit 4ab67a5e0333e575bac55789500da666e5332966
Author: Gris Ge <***@redhat.com>
Date: Tue Sep 30 17:22:06 2014 +0800

SMI-S Plugin: Refactor, add smis_disk.py file.

* Empty smis_disk.py with license file only.
* Makefile and RPM spec file updated.
* Remove as no method is using EMC_DISK_STATUS_REMOVED constants.
* Replace DMTF.cim_disk_status_of() with smis_disk.disk_status_of_cim_disk()
* Replace dmtf.dmtf_disk_type_2_lsm_disk_type() with
smis_disk.dmtf_disk_type_2_lsm_disk_type()
* Remove unused method Smis._cim_disk_of_pri_ext()
* Replace Smis._disk_id() with smis_disk.disk_id_of_cim_disk()
* Replace Smis._new_disk_cim_disk_pros() with
smis_disk.cim_disk_pros()
* Replace Smis._sys_id_child(cim_disk) with
smis_disk.sys_id_of_cim_disk(cim_disk)
* Replace Smis._new_disk() with smis_disk.cim_disk_to_lsm_disk()
* Moved Smis._pri_cim_ext_of_cim_disk() into smis_disk.
* Merged Smis._new_disk_cim_ext_pros() into smis_disk.cim_disk_to_lsm_disk()
as no need to has a method for storing a non-shared list.
* Combining these changes in one patch as they are internal actions for
smis_disk.cim_disk_to_lsm_disk().
* Hide these internal methods of smis_disk:
smis_disk.disk_id_of_cim_disk()
-> smis_disk._disk_id_of_cim_disk()
smis_disk.dmtf_disk_type_2_lsm_disk_type()
-> smis_disk._dmtf_disk_type_2_lsm_disk_type()
smis_disk.disk_status_of_cim_disk()
-> smis_disk._disk_status_of_cim_disk()

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

commit d5832a47232db7b1661089cb74f60c8f0f526413
Author: Gris Ge <***@redhat.com>
Date: Tue Sep 30 15:13:48 2014 +0800

SMI-S Plugin: Refactor, add smis_pool.py file

* Empty smis_pool.py with license only.
* Makefile and RPM spec file updated.
* Replace Smis._cim_pools_of() with smis_pool.cim_pools_of_cim_sys_path()
* Merge the pool filtering(remove spare pool and other unused pool) into
smis_pool.cim_pools_of_cim_sys_path().
With this, it save some WBEM calls[1] in volumes().
Performance changes for volumes()(lsmcli list --type volumes):
EMC VNX with 95 volumes:
Old: 13.37s
New: 8.97s

* Replace Smis._pool_id() with smis_pool.pool_id_of_cim_pool()
* Replace Smis._property_list_of_id(self, 'Pool') with
smis_pool.cim_pool_id_pros()
* Replaced Smis._new_pool_cim_pool_pros(self) with
smis_pool.cim_pool_pros()
* Remove smis_constants.JOB_RETRIEVE_POOL
* Remove Smis._new_pool_from_name() and Smis._new_pool_from_job()
* Move DMTF.cim_pool_status_of() to
smis_pool._pool_status_of_cim_pool().
# This method is for smis_pool internal use only now.
* Move Smis._pool_element_type() to
smis_pool._pool_element_type()
# This method is for smis_pool internal use only now.
* Removed Smis._sys_id_of_cim_pool() as no method require it.
* Add MegaRAID workaround for smis_pool._pool_element_type()
to improve performance by returning (Pool.ELEMENT_TYPE_VOLUME, 0)
directly. Tested on a remote MegaRAID card with two pools:
Old: 10.10s # With all pending patches but this one.
New: 4.61s
* Move Smis._new_pool() to smis_pool.cim_pool_to_lsm_pool()
* Including three changes in patch as _pool_status_of_cim_pool() and
_pool_element_type() are internal methods for
smis_pool.cim_pool_to_lsm_pool() now.
* Using json to save the CIMInstanceName of CIM_StoragePool into
lsm.Pool.plugin_data and convert it back when needed:
* Save:
Pool.plugin_data = json.dumps({
'classname': cim_path.classname,
'keybindings': dict(cim_path.keybindings),
'host': cim_path.host,
'namespace': cim_path.namespace,
})

* Load:
CIMInstanceName(**json.loads(Pool.plugin_data))

* Replace Smis._get_cim_instance_by_id(self, 'Pool', pool.id) with
smis_pool.lsm_pool_to_cim_pool_path(smis_common, pool)
* Replace Smis._get_pool_from_vol() with smis_pool.pool_id_of_cim_vol()

Changes in V2:
* Fix the error message formatter.
* Use json instead of cPickle for security concern[2].

[1] Old codes will try to find volumes on spare pool or other unused pool
which is waster of time.
[2] __reduce__() will be called by cPickle.loads() which might be
use to excute any command remoted.

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

commit 678bfed7256b46e7815759a1e69c977006866b4c
Author: Gris Ge <***@redhat.com>
Date: Thu Sep 25 20:58:26 2014 +0800

SMI-S Plugin: Refactor, add smis_sys.py

* Just empty smis_sys.py file with license only.
* Makefile and RPM spec file updated.
* Replace Smis._property_list_of_id(self, "System") with
smis_sys.cim_sys_id_pros()
* Replace Smis._sys_id(self, cim_sys) with
smis_sys.sys_id_of_cim_sys(cim_sys)
* Move Smis.system_list to SmisCommon.system_list to allow
other smis_sys.py to do system filtering.
* Replaced Smis._root_cim_syss(self) with smis_sys.root_cim_sys(smis_common)
* Replace Smis._cim_sys_pros(self) with smis_sys.cim_sys_pros()
* Make DMTF._dmtf_op_status_list_conv() public as
DMTF.dmtf_op_status_list_conv().
* Move DMTF.cim_sys_status_of() to smis_sys._sys_status_of_cim_sys().
# Only used in smis_sys internally, hence hide from public.
* Move Smis._cim_sys_to_lsm() to smis_sys.cim_sys_to_lsm_sys()
* Add DMTF.OP_STATUS_UNKNOWN -> System.STATUS_UNKNOWN map.
Found EMC SMI-S provider will use 0(Unknown) for outdated system.
* Including smis_sys._sys_status_of_cim_sys() and
smis_sys.cim_sys_to_lsm_sys() changes in one patch as
_sys_status_of_cim_sys() is only used by smis_sys.cim_sys_to_lsm_sys().
* Replace Smis._get_cim_instance_by_id("System") with
smis_sys.cim_sys_of_sys_id()
* Fix the bug when query filtered system.
Example:

URI: smispy://***@emc-smi?systems=CLARiiON+APM00041704073
CMD: lsmcli capabilities --sys CLARiiON+FCN00122500421

Expected result:
lsmcli should report system not found as URI already filter that
requested system out.

Actual result:
lsmcli got capabilities of filtered system.

Fix:
Replace EnumerateInstances("CIM_ComputerSystem") with
smis_sys.root_cim_sys() which implemented the system filter.

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

commit b4ff7817510d1bd08941ff2981d90c0459d4aeb6
Author: Tony Asleson <***@redhat.com>
Date: Tue Sep 23 11:55:52 2014 -0500

SMI-S plugin: Refactor, add smis_cap.py, smis_constants.py files

Moving handle_cim_error, hex_string_format to utils.py

Move smis class constants to smis_constants.py, move remaining
DMTF constants to dmtf.py file.

There is quite a bit of code which is used to determine
what capabilities an array supports. Move this into
a separate file of related functionality.

To make this work we needed to move:

- get_class_instance
- get_cim_service_path

To smis_common.py

I also moved the MASK_* constants to the new file too.

Updated:
- Rename file to smis_cap.py
- Change from class to functions instead

Signed-off-by: Tony Asleson <***@redhat.com>

commit a9352a009fba07e710fdcf7c4b7e21b7198acbe4
Author: Gris Ge <***@redhat.com>
Date: Tue Sep 23 17:52:22 2014 +0800

SMI-S plugin: Refactor, remove eseries.py, smisproxy.py files

* Remove fallback mode as no array really need them.
All SMI-S provider I have access support DMTF profile register and support
SMI-S 1.4 'Array' profile[1].
* New method: SmisCommon.is_netappe() for NetApp-E vendor code check.
* Simply move eseries.py codes into smis.py using SmisCommon.is_netappe()
check.
* Remove eseries.py file.
* Makefile and RPM spec file updated.
* SmisProxy is not needed any more after eseries.py got removed.
* Vendor specific code will be stored in smis.py or future sub
module/namespace of smis.py.
* Makefile and RPM spec file updated.

Changes in V2:

* Fixed a NetApp-E bug:
Old:
self._vendor_namespace = SmisCommon._PRODUCT_NETAPP_E

def is_netappe(self):
return self._vendor_product == SmisCommon._PRODUCT_MEGARAID

New:
self._vendor_product = SmisCommon._PRODUCT_NETAPP_E

def is_netappe(self):
return self._vendor_product == SmisCommon._PRODUCT_NETAPP_E

[1] LSI/Avago MegaRAID is using 1.2 and using vendor specific code in this
plugin.

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

commit 32d8384e3a79518b119e365adbc138e0380d64a8
Author: Gris Ge <***@redhat.com>
Date: Tue Sep 23 17:52:15 2014 +0800

SMI-S plugin: Refactor, add smis_common.py, utils.py, dmtf.py files

* The SMI-S provider of HP 3PAR and LSI/Avago MegaRAID is using
'root/PG_Interop' namespace for profile register. Adding
'root/PG_Interop' into check list for profile register namespace.
* Move _merge_list() to separate file utils.py
* Move smis._merge_list() to utils.merge_list().
* Makefile and rpm spec updated.
* Moving SNIA class constants into SmisCommon class.
* SmisCommon class will handle WBEM connection which need __init__(),
so we create a SmisCommon class instead of using smis_common namespace.
* Makefile and RPM spec file updated.
* Move these constants into DMTF as they are defined in DMTF DSP1033:
Smis.DMTF_INTEROP_NAMESPACES => DMTF.INTEROP_NAMESPACES
Smis.SMIS_DEFAULT_NAMESPACE => DMTF.DEFAULT_NAMESPACE
* Move WBEM connection to SmisCommon. This allow use to move to other
WBEM client library in the future(like lmiwbem) with limited changes.
* In Smis class, the 'self._c' was a object of pywbem.WBEMConnection, now
a object of SmisCommon.
* To limit the changes of Smis class, wrap used method of WBEMConnection
in SmisCommon:
EnumerateInstances()
EnumerateInstanceNames()
InvokeMethod()
GetInstance()
References()
DeleteInstance()
Associators()
AssociatorNames()
These method names is defined by DMTF DSP0200, so I keep these CaMel method
name.

* EnumerateInstances() and EnumerateInstanceNames() will enumerate in vendor
name space instead of interop namespace. The vendor namespace was checked
by SmisCommon._vendor_namespace(self) via CIM_ElementConformsToProfile
association.

* New profile register in SmisCommon.__init__():
1. Only store highest version of certain profile.
Support status will be stored as SmisCommon._profile_dict in this
format:
{
SmisCommon.SNIA_DISK_LITE_PROFILE: \
SmisCommon.SMIS_SPEC_VER_1_4,

}
The SmisCommon._profile_dict will be used by
SmisCommon.profile_check().
2. Store root CIM_RegisteredProfile as SmisCommon.root_blk_cim_rp.
It will be used by Smis._root_cim_syss() method. (In other patch)
3. New profile support status check SmisCommon.profile_check().
4. Skip MegaRAID profile register check as they only support 1.2 'Array'
profile.

* Replace Smis._profile_is_supported() with SmisCommon.profile_check().
* Smis.cim_root_profile_dict is not needed anymore as
Smis._profile_is_supported() is replaced.

* Replace Smis._enumerate() with SmisCommon.EnumerateInstances() as
SmisCommon will handle the vendor namespace issue now.

* Replace Smis._enumerate() in disk capability check with
EnumerateInstanceNames() to save some time.[1]

* New method SmisCommon.is_megaraid(). It could be used to determine
the vendor specific code.

* Update Smis._root_cim_syss() to use SmisCommon.root_blk_cim_rp for
CIM_ElementConformsToProfile association.

* LSI/Avago MegaRAID has vendor specific code as it skip the profile
check[2]. It just enumerate all CIM_ComputerSystem as MegaRAID does not
support 'Multiple Computer System' profile.

[1] EnumerateInstanceNames() only return CIMInstanceName which contains
less data than a CIMInstance. For capability check, we just want to
find whether CIM_DiskDrive is supported or not. CIMInstanceName is enough
for this.

[2] If profile check skiped, SmisCommon.root_blk_cim_rp will be None.

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

-----------------------------------------------------------------------

Summary of changes:
.../include/libstoragemgmt/libstoragemgmt_types.h | 2 +
daemon/lsm_daemon.c | 6 +-
doc/man/lsmcli.1.in | 2 +
packaging/libstoragemgmt.spec.in | 39 +-
plugin/Makefile.am | 10 +-
plugin/nstor/nstor.py | 4 +-
plugin/ontap/na.py | 6 +-
plugin/ontap/ontap.py | 57 +-
plugin/sim/simarray.py | 22 +-
plugin/simc/simc_lsmplugin.c | 3 +
plugin/smispy/dmtf.py | 403 ++--
plugin/smispy/eseries.py | 164 --
plugin/smispy/smis.py | 2174 ++++----------------
plugin/smispy/smis_cap.py | 384 ++++
plugin/smispy/smis_common.py | 374 ++++
plugin/smispy/smis_disk.py | 195 ++
plugin/smispy/smis_pool.py | 290 +++
plugin/smispy/smis_sys.py | 149 ++
plugin/smispy/smisproxy.py | 51 -
plugin/smispy/smispy_lsmplugin | 4 +-
plugin/smispy/utils.py | 68 +
python_binding/lsm/_data.py | 2 +
test/plugin_test.py | 17 +-
tools/lsmcli/cmdline.py | 1 +
tools/lsmcli/data_display.py | 2 +
tools/lsmenv | 40 +-
26 files changed, 2296 insertions(+), 2173 deletions(-)
delete mode 100644 plugin/smispy/eseries.py
create mode 100644 plugin/smispy/smis_cap.py
create mode 100644 plugin/smispy/smis_common.py
create mode 100644 plugin/smispy/smis_disk.py
create mode 100644 plugin/smispy/smis_pool.py
create mode 100644 plugin/smispy/smis_sys.py
delete mode 100644 plugin/smispy/smisproxy.py
create mode 100644 plugin/smispy/utils.py


hooks/post-receive
--
libstoragemgmt
Loading...