Gris Ge
2014-09-25 12:58:25 UTC
New smis_sys.py file to contain all lsm.System related methods including
the CIM_ComputerSystem to lsm.System converter method.
This patchset is based on:
* [V2 0/3] Move capablities to separate file
* [PATCH V3 00/10] SMI-S plugin: Reorganize code layout.
Plan for this change:
1. smis.py will only handle:
* plugin interface.
* some actions require two or more smis_xxx file:
Example A: Get all cim_pool.
Step 1: This require list all cim_sys first.1]
Step 2: Then find all associated cim_pool.
# Step 1 is in smis_sys.py
# Step 2 will be in smis_pool.py
# As smis_pool.py cannot depend on smis_sys.py[1],
# smis.py has to combine these two steps to provide all
# cim_pools.
Example B: job_status() for volume_create()
* Common job handling will be in smis_common.py like query
CIM_ConcreteJob and use CIM_AffectedJobElement to get cim_pool.
* Converting cim_pool to lsm.Pool will be in smis_pool.py
# As smis_common cannot depend on smis_pool[1],
# A method like _new_vol_from_job() has to be placed in smis.py,
# not smis_common.py or smis_pool.py
2. smis_xxx.py contain all lsm.XXX related methods:
smis_sys: lsm.System
smis_pool: lsm.Pool
smis_vol: lsm.Volume and volume_mask() _unmask()
smis_ag: lsm.AccessGroup
[1] In case of looping requirement.
Gris Ge (7):
SMI-S Plugin: Add smis_sys.py to smis-s plugin.
SMI-S Plugin: Move lsm.System.id generator to smis_sys.py
SMI-S Plugin: Move URI system filter to SmisCommon
SMI-S Plugin: Move Smis._root_cim_syss() to smis_sys.py
SMI-S Plugin: Move Smis._cim_sys_pros() to smis_sys.py
SMI-S Plugin: Move System converter to smis_sys.py
SMI-S Plugin: Improve cim_sys query on system_id
packaging/libstoragemgmt.spec.in | 1 +
plugin/Makefile.am | 3 +-
plugin/smispy/dmtf.py | 25 +-----
plugin/smispy/smis.py | 170 +++++++++------------------------------
plugin/smispy/smis_common.py | 3 +-
plugin/smispy/smis_sys.py | 149 ++++++++++++++++++++++++++++++++++
6 files changed, 197 insertions(+), 154 deletions(-)
create mode 100644 plugin/smispy/smis_sys.py
the CIM_ComputerSystem to lsm.System converter method.
This patchset is based on:
* [V2 0/3] Move capablities to separate file
* [PATCH V3 00/10] SMI-S plugin: Reorganize code layout.
Plan for this change:
1. smis.py will only handle:
* plugin interface.
* some actions require two or more smis_xxx file:
Example A: Get all cim_pool.
Step 1: This require list all cim_sys first.1]
Step 2: Then find all associated cim_pool.
# Step 1 is in smis_sys.py
# Step 2 will be in smis_pool.py
# As smis_pool.py cannot depend on smis_sys.py[1],
# smis.py has to combine these two steps to provide all
# cim_pools.
Example B: job_status() for volume_create()
* Common job handling will be in smis_common.py like query
CIM_ConcreteJob and use CIM_AffectedJobElement to get cim_pool.
* Converting cim_pool to lsm.Pool will be in smis_pool.py
# As smis_common cannot depend on smis_pool[1],
# A method like _new_vol_from_job() has to be placed in smis.py,
# not smis_common.py or smis_pool.py
2. smis_xxx.py contain all lsm.XXX related methods:
smis_sys: lsm.System
smis_pool: lsm.Pool
smis_vol: lsm.Volume and volume_mask() _unmask()
smis_ag: lsm.AccessGroup
[1] In case of looping requirement.
Gris Ge (7):
SMI-S Plugin: Add smis_sys.py to smis-s plugin.
SMI-S Plugin: Move lsm.System.id generator to smis_sys.py
SMI-S Plugin: Move URI system filter to SmisCommon
SMI-S Plugin: Move Smis._root_cim_syss() to smis_sys.py
SMI-S Plugin: Move Smis._cim_sys_pros() to smis_sys.py
SMI-S Plugin: Move System converter to smis_sys.py
SMI-S Plugin: Improve cim_sys query on system_id
packaging/libstoragemgmt.spec.in | 1 +
plugin/Makefile.am | 3 +-
plugin/smispy/dmtf.py | 25 +-----
plugin/smispy/smis.py | 170 +++++++++------------------------------
plugin/smispy/smis_common.py | 3 +-
plugin/smispy/smis_sys.py | 149 ++++++++++++++++++++++++++++++++++
6 files changed, 197 insertions(+), 154 deletions(-)
create mode 100644 plugin/smispy/smis_sys.py
--
1.8.3.1
1.8.3.1