Tony Asleson
2014-06-18 21:42:42 UTC
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 2114cdbcafc19d161ab3ef2176b43fec03b1da35 (commit)
via 60197871108d245a03b5f8ce205e695abe8c0fcf (commit)
via 906963d1069207101ecf6b2a664246a494c93ad3 (commit)
via b4b30f5f8a1c2aa263d6e3e4ebabd567f8316856 (commit)
via 0bc6f08a1910f9e8d59d19aa0aeb51ba73a96b52 (commit)
via 1aad49020d6b0cb15452deca7dd91d890a29d42f (commit)
via 3ad3349e5a514c6313632a24243a83226b2ce3a5 (commit)
via 70a88b5f239a11afdc858946201979996e9c2473 (commit)
via b51146a11f5bcf8cfc84523ac87f743c7aec0222 (commit)
via eb4c096852ad5cd049082d8590cf38ff86d9820d (commit)
via 61712dbca304db66c3d92a5ade08122223b2dba7 (commit)
via 8e6608f1e9103cee25c6d826f28546d30741366a (commit)
via cce1348a844db5f67c84bef1eb98eeac3f72ebb4 (commit)
via 956fb3e6ac4e166f622cfdbb0f34a384eb8eff42 (commit)
via f0bb247caf5eb286ea67365c4cf18db3793cd6c0 (commit)
via f3c260b95d164d9305beaaed3856d02d4ab0cc68 (commit)
from b011428eb852674ad4865d49aff58cfad0261092 (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 2114cdbcafc19d161ab3ef2176b43fec03b1da35
Author: Tony Asleson <***@redhat.com>
Date: Wed Jun 18 15:02:35 2014 -0500
smis.py: _get_class_instance incorrect call
Incorrect parameter passing with new signature
Signed-off-by: Tony Asleson <***@redhat.com>
commit 60197871108d245a03b5f8ce205e695abe8c0fcf
Author: Tony Asleson <***@redhat.com>
Date: Tue Jun 17 17:22:01 2014 -0500
C API: Remove individual initiator support
Remove all the related functions for lsm_initiator
data type.
Signed-off-by: Tony Asleson <***@redhat.com>
commit 906963d1069207101ecf6b2a664246a494c93ad3
Author: Tony Asleson <***@redhat.com>
Date: Tue Jun 17 16:44:39 2014 -0500
C & PY API: Add element_type to pools
This is required to allow the user to know what a
pool can be used to create.
Signed-off-by: Tony Asleson <***@redhat.com>
commit b4b30f5f8a1c2aa263d6e3e4ebabd567f8316856
Author: Tony Asleson <***@redhat.com>
Date: Tue Jun 17 15:38:55 2014 -0500
C API: Re-name *optional.h to *_hash.h
Signed-off-by: Tony Asleson <***@redhat.com>
commit 0bc6f08a1910f9e8d59d19aa0aeb51ba73a96b52
Author: Tony Asleson <***@redhat.com>
Date: Tue Jun 17 15:29:44 2014 -0500
C & PY API: Remove optional data
After discussion on the mailing list it came to light that the
whole notion of optional data is more of a hinderence than a
benefit. This library needs to be easy and straight forward
to use.
I renamed the C lsm_optional_data to lsm_hash as we are using it
for parsing uri and use the hash for query string parameters.
"No matter how far down the wrong road youâve gone, turn back."
Signed-off-by: Tony Asleson <***@redhat.com>
commit 1aad49020d6b0cb15452deca7dd91d890a29d42f
Author: Tony Asleson <***@redhat.com>
Date: Tue Jun 17 14:03:39 2014 -0500
Changes to get unit test to work
Gris asked me to remove the patch
'lsmcli: Remove initiator commands and trivial changes'.
However, that patch did have some critial changes to make things
work so parts of it that are needed have been added to this one
and the changes needed to get the unit tests to pass.
Signed-off-by: Tony Asleson <***@redhat.com>
commit 3ad3349e5a514c6313632a24243a83226b2ce3a5
Author: Gris Ge <***@redhat.com>
Date: Tue Jun 17 20:47:33 2014 +0800
LSM Plugins: Remove lsm.Initiator and related methods
* Remove lsm.Initiator and related methods from plugins.
* Update iscsi_chap_auth().
* SMI-S plugin now fully support interop namespace.
* Removed some unused methods from SMI-S plugin.
* Tested by these commands:
lsmcli list --type access_groups
lsmcli ag-add-init --ag <AG_ID> --init <INIT_ID> --init-type WWPN|iSCSI
lsmcli ag-del-init --ag <AG_ID> --init <INIT_ID>
lsmcli volume-mask --vol <VOL_ID> --ag <AG_ID>
lsmcli list --type volumes --ag <AG_ID>
lsmcli list --type access_groups --vol <VOL_ID>
lsmcli volume-unmask --vol <VOL_ID> --ag <AG_ID>
* Tested on these plugin:
nstor:
Nexentastor 3.1.5
ONTAP:
ONTAP 8.1.2 7-mode
Simulator:
SimArray 2.4
SMI-S:
EMC VNX(full test)
SMI-S access group query test:
EMC VMAX, FUJITSU ETERNUS, HDS AMS[1], IBM XIV, NetApp ONTAP[2]
SMI-S NetApp E-Serial:
'Masking and Mapping' not supported.
Targetd:
lsmcli volume-mask --vol <VOL_ID> --init <INIT_ID> --init-type iSCSI
lsmcli list --type volumes --ag <AG_ID>
lsmcli list --type access_groups --vol <VOL_ID>
lsmcli volume-unmask --vol <VOL_ID> --ag <AG_ID>
[1] HDS AMS marked 'other' type of access_group, need investigation, might be
iSCSI target port.
[2] NetApp ONTAP SMI-S provider does not provider initiator ID when call
access_groups(), need investigation.
Signed-off-by: Gris Ge <***@redhat.com>
commit 70a88b5f239a11afdc858946201979996e9c2473
Author: Gris Ge <***@redhat.com>
Date: Tue Jun 17 20:47:32 2014 +0800
Python library: Remove lsm.Initiator and related methods
* Removed class:
lsm.Initiator
* Removed methods:
lsm.Client.initiators()
lsm.Client.initiator_grant()
lsm.Client.initiator_revoke()
lsm.Client.volumes_accessible_by_initiator()
lsm.Client.initiators_granted_to_volume()
lsm.Volume._access_string_to_type()
* Updated methods:
lsm.Client.iscsi_chap_auth()
# Change argument from 'lsm.Initiator: initiator' to 'String: init_id'
* Removed constants:
lsm.ErrorNumber.INITIATOR_NOT_IN_ACCESS_GROUP
lsm.ErrorNumber.INVALID_INIT
lsm.ErrorNumber.NOT_FOUND_INITIATOR
lsm.ErrorNumber.UNSUPPORTED_INITIATOR_TYPE
lsm.Capabilities.INITIATORS
lsm.Capabilities.INITIATORS_GRANTED_TO_VOLUME
lsm.Capabilities.VOLUME_INITIATOR_GRANT
lsm.Capabilities.VOLUME_INITIATOR_REVOKE
lsm.Capabilities.VOLUME_ACCESSIBLE_BY_INITIATOR
lsm.Volume.ACCESS_READ_ONLY
lsm.Volume.ACCESS_READ_WRITE
lsm.Volume.ACCESS_NONE
* Added constants:
lsm.ErrorNumber.LSM_BUG
# Indicate there is bug inside of LSM. User should report this error as
# a bug to upstream.
# I am intend to replace all 'INTERNAL_ERROR' and 'PLUGIN_ERROR' to this
# one.
Signed-off-by: Gris Ge <***@redhat.com>
commit b51146a11f5bcf8cfc84523ac87f743c7aec0222
Author: Tony Asleson <***@redhat.com>
Date: Fri Jun 13 15:48:36 2014 -0500
_data.py: Rename OptionalData.list to OptionalData.keys
Match the expected naming of a hash data structure for obtaining
a list of keys.
Signed-off-by: Tony Asleson <***@redhat.com>
commit eb4c096852ad5cd049082d8590cf38ff86d9820d
Author: Tony Asleson <***@redhat.com>
Date: Fri Jun 13 15:43:20 2014 -0500
_data.py: Revert change optional data value type
Reverts the change thus preserving the data type associated to
the 'key'.
Signed-off-by: Tony Asleson <***@redhat.com>
commit 61712dbca304db66c3d92a5ade08122223b2dba7
Author: Tony Asleson <***@redhat.com>
Date: Fri Jun 13 15:19:12 2014 -0500
C API: optional data, add more value types
The existing code assumes that optional data is a key/value where the key is
a string type. However, the python code is placing numeric values, string lists
and strings into the optional data which automatically gets serialized and
de-serialized back to the client retaining the types enclosed. I made a change
in a previous commit which changes it to make everything a string and we broke
the display code which was expecting the member id of the optional pool data to
be a list of strings.
This patch adds the following capabilities for optional data type values for
the C API:
-Get/Set long double
-Get/Set uint64_t
-Get/Set int64_t
-Get/Set lsm_string_list
I added a enum and function:
typedef enum {
LSM_OPTIONAL_DATA_INVALID = -2, /**< Invalid */
LSM_OPTIONAL_DATA_NOT_FOUND = -1, /**< Key not found */
LSM_OPTIONAL_DATA_STRING = 1, /**< Contains a string */
LSM_OPTIONAL_DATA_SIGN_INT = 2, /**< Contains a signed int */
LSM_OPTIONAL_DATA_UNSIGNED_INT = 3, /**< Contains an unsigned int */
LSM_OPTIONAL_DATA_REAL = 4, /**< Contains a real number */
LSM_OPTIONAL_DATA_STRING_LIST = 10 /**< Contains a list of strings*/
} lsm_optional_data_type;
lsm_optional_data_type LSM_DLL_EXPORT lsm_optional_data_type_get(
lsm_optional_data *op, const char *key);
Which needs to be utilized to see that type the value is. Once that is
determined then the user can call one of the newly added corresponding get
functions.
However, this is far from ideal for the following reason. The JSON RPC IPC
used between the client and plug-in only has a single number type which
encompasses all of the types listed above (int64_t, uint64_t, long double)
and then some (numbers of arbitrary size). Thus a plug-in could be returning
a value to a client and the 'type' of numeric may vary based on the numerical
value. So a client to be robust would need to handle checking for multiple
numeric types for a single optional value. The only way I see this being
consistent is if we extend the API so that we encode the 'type' and value in
the serialized JSON so that we can consistently give the same 'type' of numeric
to the client application. This patch looks at the numeric string and puts it
in the first available fitting number in this order: int64, uint64, long double.
Any other suggestions people have, please share them.
Thanks!
Regards,
Tony
Signed-off-by: Tony Asleson <***@redhat.com>
commit 8e6608f1e9103cee25c6d826f28546d30741366a
Author: Tony Asleson <***@redhat.com>
Date: Thu Jun 12 13:59:57 2014 -0500
ontap.py: Fix errors found in testing
Running the plugin_test.py yielded a number of
issues which are addressed with this patch.
Signed-off-by: Tony Asleson <***@redhat.com>
commit cce1348a844db5f67c84bef1eb98eeac3f72ebb4
Author: Tony Asleson <***@redhat.com>
Date: Wed Jun 11 13:44:41 2014 -0600
smis.py: remove opt status_info
This was made manditory and thus these optional adds
are incorrect.
Signed-off-by: Tony Asleson <***@redhat.com>
commit 956fb3e6ac4e166f622cfdbb0f34a384eb8eff42
Author: Tony Asleson <***@redhat.com>
Date: Tue Jun 10 16:13:21 2014 -0500
_data.py: Make _check_opt_data class method
The method was already very close to being a method,
so moved it and removed the allowed parameter to
reference the class as it already was.
Signed-off-by: Tony Asleson <***@redhat.com>
commit f0bb247caf5eb286ea67365c4cf18db3793cd6c0
Author: Tony Asleson <***@redhat.com>
Date: Tue Jun 10 15:29:37 2014 -0500
smis.py: _property_list_of_id parameter add
A number of times this method is called with a number of identical
line of code following it which consolidate properties with those
that are used for ID. I moved this logic into the method and
added a default parameter to maintain same functionality.
Signed-off-by: Tony Asleson <***@redhat.com>
commit f3c260b95d164d9305beaaed3856d02d4ab0cc68
Author: Tony Asleson <***@redhat.com>
Date: Tue Jun 10 15:26:26 2014 -0500
simarray.py, targetd.py: Use public imports
Signed-off-by: Tony Asleson <***@redhat.com>
-----------------------------------------------------------------------
Summary of changes:
c_binding/include/libstoragemgmt/Makefile.am | 3 +-
c_binding/include/libstoragemgmt/libstoragemgmt.h | 104 +---
.../libstoragemgmt/libstoragemgmt_capabilities.h | 6 -
.../include/libstoragemgmt/libstoragemgmt_disk.h | 8 -
.../include/libstoragemgmt/libstoragemgmt_error.h | 2 +-
.../include/libstoragemgmt/libstoragemgmt_fs.h | 7 -
...gemgmt_optionaldata.h => libstoragemgmt_hash.h} | 37 +-
.../libstoragemgmt/libstoragemgmt_initiators.h | 76 --
.../libstoragemgmt/libstoragemgmt_nfsexport.h | 11 -
.../libstoragemgmt/libstoragemgmt_plug_interface.h | 124 +---
.../include/libstoragemgmt/libstoragemgmt_pool.h | 8 +-
.../libstoragemgmt/libstoragemgmt_snapshot.h | 7 -
.../libstoragemgmt/libstoragemgmt_systems.h | 6 -
.../include/libstoragemgmt/libstoragemgmt_types.h | 53 +--
.../libstoragemgmt/libstoragemgmt_volumes.h | 8 -
c_binding/lsm_convert.cpp | 134 +---
c_binding/lsm_convert.hpp | 28 -
c_binding/lsm_datatypes.cpp | 217 ++----
c_binding/lsm_datatypes.hpp | 42 +-
c_binding/lsm_ipc.cpp | 29 +-
c_binding/lsm_ipc.hpp | 8 +-
c_binding/lsm_mgmt.cpp | 173 +----
c_binding/lsm_plugin_ipc.cpp | 200 +-----
doc/man/lsmcli.1.in | 49 +-
plugin/nstor/nstor.py | 133 +---
plugin/ontap/na.py | 47 +-
plugin/ontap/ontap.py | 178 ++---
plugin/sim/simarray.py | 255 ++-----
plugin/sim/simulator.py | 31 +-
plugin/simc/simc_lsmplugin.c | 399 +---------
plugin/smispy/eseries.py | 65 --
plugin/smispy/smis.py | 825 +++++++-------------
plugin/targetd/targetd.py | 115 +---
plugin/v7k/ibmv7k.py | 156 +----
python_binding/lsm/__init__.py | 6 +-
python_binding/lsm/_client.py | 69 +--
python_binding/lsm/_common.py | 8 +-
python_binding/lsm/_data.py | 148 +----
python_binding/lsm/_iplugin.py | 42 +-
test/cmdtest.py | 50 +-
test/plugin_test.py | 70 ++-
test/tester.c | 212 +-----
tools/lsmcli/cmdline.py | 232 ++-----
tools/lsmcli/data_display.py | 134 +---
44 files changed, 884 insertions(+), 3631 deletions(-)
rename c_binding/include/libstoragemgmt/{libstoragemgmt_optionaldata.h => libstoragemgmt_hash.h} (71%)
delete mode 100644 c_binding/include/libstoragemgmt/libstoragemgmt_initiators.h
hooks/post-receive
generated because a ref change was pushed to the repository containing
the project "libstoragemgmt".
The branch, master has been updated
via 2114cdbcafc19d161ab3ef2176b43fec03b1da35 (commit)
via 60197871108d245a03b5f8ce205e695abe8c0fcf (commit)
via 906963d1069207101ecf6b2a664246a494c93ad3 (commit)
via b4b30f5f8a1c2aa263d6e3e4ebabd567f8316856 (commit)
via 0bc6f08a1910f9e8d59d19aa0aeb51ba73a96b52 (commit)
via 1aad49020d6b0cb15452deca7dd91d890a29d42f (commit)
via 3ad3349e5a514c6313632a24243a83226b2ce3a5 (commit)
via 70a88b5f239a11afdc858946201979996e9c2473 (commit)
via b51146a11f5bcf8cfc84523ac87f743c7aec0222 (commit)
via eb4c096852ad5cd049082d8590cf38ff86d9820d (commit)
via 61712dbca304db66c3d92a5ade08122223b2dba7 (commit)
via 8e6608f1e9103cee25c6d826f28546d30741366a (commit)
via cce1348a844db5f67c84bef1eb98eeac3f72ebb4 (commit)
via 956fb3e6ac4e166f622cfdbb0f34a384eb8eff42 (commit)
via f0bb247caf5eb286ea67365c4cf18db3793cd6c0 (commit)
via f3c260b95d164d9305beaaed3856d02d4ab0cc68 (commit)
from b011428eb852674ad4865d49aff58cfad0261092 (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 2114cdbcafc19d161ab3ef2176b43fec03b1da35
Author: Tony Asleson <***@redhat.com>
Date: Wed Jun 18 15:02:35 2014 -0500
smis.py: _get_class_instance incorrect call
Incorrect parameter passing with new signature
Signed-off-by: Tony Asleson <***@redhat.com>
commit 60197871108d245a03b5f8ce205e695abe8c0fcf
Author: Tony Asleson <***@redhat.com>
Date: Tue Jun 17 17:22:01 2014 -0500
C API: Remove individual initiator support
Remove all the related functions for lsm_initiator
data type.
Signed-off-by: Tony Asleson <***@redhat.com>
commit 906963d1069207101ecf6b2a664246a494c93ad3
Author: Tony Asleson <***@redhat.com>
Date: Tue Jun 17 16:44:39 2014 -0500
C & PY API: Add element_type to pools
This is required to allow the user to know what a
pool can be used to create.
Signed-off-by: Tony Asleson <***@redhat.com>
commit b4b30f5f8a1c2aa263d6e3e4ebabd567f8316856
Author: Tony Asleson <***@redhat.com>
Date: Tue Jun 17 15:38:55 2014 -0500
C API: Re-name *optional.h to *_hash.h
Signed-off-by: Tony Asleson <***@redhat.com>
commit 0bc6f08a1910f9e8d59d19aa0aeb51ba73a96b52
Author: Tony Asleson <***@redhat.com>
Date: Tue Jun 17 15:29:44 2014 -0500
C & PY API: Remove optional data
After discussion on the mailing list it came to light that the
whole notion of optional data is more of a hinderence than a
benefit. This library needs to be easy and straight forward
to use.
I renamed the C lsm_optional_data to lsm_hash as we are using it
for parsing uri and use the hash for query string parameters.
"No matter how far down the wrong road youâve gone, turn back."
Signed-off-by: Tony Asleson <***@redhat.com>
commit 1aad49020d6b0cb15452deca7dd91d890a29d42f
Author: Tony Asleson <***@redhat.com>
Date: Tue Jun 17 14:03:39 2014 -0500
Changes to get unit test to work
Gris asked me to remove the patch
'lsmcli: Remove initiator commands and trivial changes'.
However, that patch did have some critial changes to make things
work so parts of it that are needed have been added to this one
and the changes needed to get the unit tests to pass.
Signed-off-by: Tony Asleson <***@redhat.com>
commit 3ad3349e5a514c6313632a24243a83226b2ce3a5
Author: Gris Ge <***@redhat.com>
Date: Tue Jun 17 20:47:33 2014 +0800
LSM Plugins: Remove lsm.Initiator and related methods
* Remove lsm.Initiator and related methods from plugins.
* Update iscsi_chap_auth().
* SMI-S plugin now fully support interop namespace.
* Removed some unused methods from SMI-S plugin.
* Tested by these commands:
lsmcli list --type access_groups
lsmcli ag-add-init --ag <AG_ID> --init <INIT_ID> --init-type WWPN|iSCSI
lsmcli ag-del-init --ag <AG_ID> --init <INIT_ID>
lsmcli volume-mask --vol <VOL_ID> --ag <AG_ID>
lsmcli list --type volumes --ag <AG_ID>
lsmcli list --type access_groups --vol <VOL_ID>
lsmcli volume-unmask --vol <VOL_ID> --ag <AG_ID>
* Tested on these plugin:
nstor:
Nexentastor 3.1.5
ONTAP:
ONTAP 8.1.2 7-mode
Simulator:
SimArray 2.4
SMI-S:
EMC VNX(full test)
SMI-S access group query test:
EMC VMAX, FUJITSU ETERNUS, HDS AMS[1], IBM XIV, NetApp ONTAP[2]
SMI-S NetApp E-Serial:
'Masking and Mapping' not supported.
Targetd:
lsmcli volume-mask --vol <VOL_ID> --init <INIT_ID> --init-type iSCSI
lsmcli list --type volumes --ag <AG_ID>
lsmcli list --type access_groups --vol <VOL_ID>
lsmcli volume-unmask --vol <VOL_ID> --ag <AG_ID>
[1] HDS AMS marked 'other' type of access_group, need investigation, might be
iSCSI target port.
[2] NetApp ONTAP SMI-S provider does not provider initiator ID when call
access_groups(), need investigation.
Signed-off-by: Gris Ge <***@redhat.com>
commit 70a88b5f239a11afdc858946201979996e9c2473
Author: Gris Ge <***@redhat.com>
Date: Tue Jun 17 20:47:32 2014 +0800
Python library: Remove lsm.Initiator and related methods
* Removed class:
lsm.Initiator
* Removed methods:
lsm.Client.initiators()
lsm.Client.initiator_grant()
lsm.Client.initiator_revoke()
lsm.Client.volumes_accessible_by_initiator()
lsm.Client.initiators_granted_to_volume()
lsm.Volume._access_string_to_type()
* Updated methods:
lsm.Client.iscsi_chap_auth()
# Change argument from 'lsm.Initiator: initiator' to 'String: init_id'
* Removed constants:
lsm.ErrorNumber.INITIATOR_NOT_IN_ACCESS_GROUP
lsm.ErrorNumber.INVALID_INIT
lsm.ErrorNumber.NOT_FOUND_INITIATOR
lsm.ErrorNumber.UNSUPPORTED_INITIATOR_TYPE
lsm.Capabilities.INITIATORS
lsm.Capabilities.INITIATORS_GRANTED_TO_VOLUME
lsm.Capabilities.VOLUME_INITIATOR_GRANT
lsm.Capabilities.VOLUME_INITIATOR_REVOKE
lsm.Capabilities.VOLUME_ACCESSIBLE_BY_INITIATOR
lsm.Volume.ACCESS_READ_ONLY
lsm.Volume.ACCESS_READ_WRITE
lsm.Volume.ACCESS_NONE
* Added constants:
lsm.ErrorNumber.LSM_BUG
# Indicate there is bug inside of LSM. User should report this error as
# a bug to upstream.
# I am intend to replace all 'INTERNAL_ERROR' and 'PLUGIN_ERROR' to this
# one.
Signed-off-by: Gris Ge <***@redhat.com>
commit b51146a11f5bcf8cfc84523ac87f743c7aec0222
Author: Tony Asleson <***@redhat.com>
Date: Fri Jun 13 15:48:36 2014 -0500
_data.py: Rename OptionalData.list to OptionalData.keys
Match the expected naming of a hash data structure for obtaining
a list of keys.
Signed-off-by: Tony Asleson <***@redhat.com>
commit eb4c096852ad5cd049082d8590cf38ff86d9820d
Author: Tony Asleson <***@redhat.com>
Date: Fri Jun 13 15:43:20 2014 -0500
_data.py: Revert change optional data value type
Reverts the change thus preserving the data type associated to
the 'key'.
Signed-off-by: Tony Asleson <***@redhat.com>
commit 61712dbca304db66c3d92a5ade08122223b2dba7
Author: Tony Asleson <***@redhat.com>
Date: Fri Jun 13 15:19:12 2014 -0500
C API: optional data, add more value types
The existing code assumes that optional data is a key/value where the key is
a string type. However, the python code is placing numeric values, string lists
and strings into the optional data which automatically gets serialized and
de-serialized back to the client retaining the types enclosed. I made a change
in a previous commit which changes it to make everything a string and we broke
the display code which was expecting the member id of the optional pool data to
be a list of strings.
This patch adds the following capabilities for optional data type values for
the C API:
-Get/Set long double
-Get/Set uint64_t
-Get/Set int64_t
-Get/Set lsm_string_list
I added a enum and function:
typedef enum {
LSM_OPTIONAL_DATA_INVALID = -2, /**< Invalid */
LSM_OPTIONAL_DATA_NOT_FOUND = -1, /**< Key not found */
LSM_OPTIONAL_DATA_STRING = 1, /**< Contains a string */
LSM_OPTIONAL_DATA_SIGN_INT = 2, /**< Contains a signed int */
LSM_OPTIONAL_DATA_UNSIGNED_INT = 3, /**< Contains an unsigned int */
LSM_OPTIONAL_DATA_REAL = 4, /**< Contains a real number */
LSM_OPTIONAL_DATA_STRING_LIST = 10 /**< Contains a list of strings*/
} lsm_optional_data_type;
lsm_optional_data_type LSM_DLL_EXPORT lsm_optional_data_type_get(
lsm_optional_data *op, const char *key);
Which needs to be utilized to see that type the value is. Once that is
determined then the user can call one of the newly added corresponding get
functions.
However, this is far from ideal for the following reason. The JSON RPC IPC
used between the client and plug-in only has a single number type which
encompasses all of the types listed above (int64_t, uint64_t, long double)
and then some (numbers of arbitrary size). Thus a plug-in could be returning
a value to a client and the 'type' of numeric may vary based on the numerical
value. So a client to be robust would need to handle checking for multiple
numeric types for a single optional value. The only way I see this being
consistent is if we extend the API so that we encode the 'type' and value in
the serialized JSON so that we can consistently give the same 'type' of numeric
to the client application. This patch looks at the numeric string and puts it
in the first available fitting number in this order: int64, uint64, long double.
Any other suggestions people have, please share them.
Thanks!
Regards,
Tony
Signed-off-by: Tony Asleson <***@redhat.com>
commit 8e6608f1e9103cee25c6d826f28546d30741366a
Author: Tony Asleson <***@redhat.com>
Date: Thu Jun 12 13:59:57 2014 -0500
ontap.py: Fix errors found in testing
Running the plugin_test.py yielded a number of
issues which are addressed with this patch.
Signed-off-by: Tony Asleson <***@redhat.com>
commit cce1348a844db5f67c84bef1eb98eeac3f72ebb4
Author: Tony Asleson <***@redhat.com>
Date: Wed Jun 11 13:44:41 2014 -0600
smis.py: remove opt status_info
This was made manditory and thus these optional adds
are incorrect.
Signed-off-by: Tony Asleson <***@redhat.com>
commit 956fb3e6ac4e166f622cfdbb0f34a384eb8eff42
Author: Tony Asleson <***@redhat.com>
Date: Tue Jun 10 16:13:21 2014 -0500
_data.py: Make _check_opt_data class method
The method was already very close to being a method,
so moved it and removed the allowed parameter to
reference the class as it already was.
Signed-off-by: Tony Asleson <***@redhat.com>
commit f0bb247caf5eb286ea67365c4cf18db3793cd6c0
Author: Tony Asleson <***@redhat.com>
Date: Tue Jun 10 15:29:37 2014 -0500
smis.py: _property_list_of_id parameter add
A number of times this method is called with a number of identical
line of code following it which consolidate properties with those
that are used for ID. I moved this logic into the method and
added a default parameter to maintain same functionality.
Signed-off-by: Tony Asleson <***@redhat.com>
commit f3c260b95d164d9305beaaed3856d02d4ab0cc68
Author: Tony Asleson <***@redhat.com>
Date: Tue Jun 10 15:26:26 2014 -0500
simarray.py, targetd.py: Use public imports
Signed-off-by: Tony Asleson <***@redhat.com>
-----------------------------------------------------------------------
Summary of changes:
c_binding/include/libstoragemgmt/Makefile.am | 3 +-
c_binding/include/libstoragemgmt/libstoragemgmt.h | 104 +---
.../libstoragemgmt/libstoragemgmt_capabilities.h | 6 -
.../include/libstoragemgmt/libstoragemgmt_disk.h | 8 -
.../include/libstoragemgmt/libstoragemgmt_error.h | 2 +-
.../include/libstoragemgmt/libstoragemgmt_fs.h | 7 -
...gemgmt_optionaldata.h => libstoragemgmt_hash.h} | 37 +-
.../libstoragemgmt/libstoragemgmt_initiators.h | 76 --
.../libstoragemgmt/libstoragemgmt_nfsexport.h | 11 -
.../libstoragemgmt/libstoragemgmt_plug_interface.h | 124 +---
.../include/libstoragemgmt/libstoragemgmt_pool.h | 8 +-
.../libstoragemgmt/libstoragemgmt_snapshot.h | 7 -
.../libstoragemgmt/libstoragemgmt_systems.h | 6 -
.../include/libstoragemgmt/libstoragemgmt_types.h | 53 +--
.../libstoragemgmt/libstoragemgmt_volumes.h | 8 -
c_binding/lsm_convert.cpp | 134 +---
c_binding/lsm_convert.hpp | 28 -
c_binding/lsm_datatypes.cpp | 217 ++----
c_binding/lsm_datatypes.hpp | 42 +-
c_binding/lsm_ipc.cpp | 29 +-
c_binding/lsm_ipc.hpp | 8 +-
c_binding/lsm_mgmt.cpp | 173 +----
c_binding/lsm_plugin_ipc.cpp | 200 +-----
doc/man/lsmcli.1.in | 49 +-
plugin/nstor/nstor.py | 133 +---
plugin/ontap/na.py | 47 +-
plugin/ontap/ontap.py | 178 ++---
plugin/sim/simarray.py | 255 ++-----
plugin/sim/simulator.py | 31 +-
plugin/simc/simc_lsmplugin.c | 399 +---------
plugin/smispy/eseries.py | 65 --
plugin/smispy/smis.py | 825 +++++++-------------
plugin/targetd/targetd.py | 115 +---
plugin/v7k/ibmv7k.py | 156 +----
python_binding/lsm/__init__.py | 6 +-
python_binding/lsm/_client.py | 69 +--
python_binding/lsm/_common.py | 8 +-
python_binding/lsm/_data.py | 148 +----
python_binding/lsm/_iplugin.py | 42 +-
test/cmdtest.py | 50 +-
test/plugin_test.py | 70 ++-
test/tester.c | 212 +-----
tools/lsmcli/cmdline.py | 232 ++-----
tools/lsmcli/data_display.py | 134 +---
44 files changed, 884 insertions(+), 3631 deletions(-)
rename c_binding/include/libstoragemgmt/{libstoragemgmt_optionaldata.h => libstoragemgmt_hash.h} (71%)
delete mode 100644 c_binding/include/libstoragemgmt/libstoragemgmt_initiators.h
hooks/post-receive
--
libstoragemgmt
libstoragemgmt