Removed methods:
Python: pool_create_from_volumes()
C: lsm_pool_create_from_volumes()
Removed constants:
Python: lsm.Pool.MEMBER_TYPE_VOLUME
C: LSM_POOL_MEMBER_TYPE_VOLUME
Removed capabilities:
Python:
lsm.Capabilities.POOL_CREATE_FROM_VOLUMES
lsm.Capabilities.POOL_CREATE_VOLUME_RAID_0 and etc
C:
LSM_CAP_POOL_CREATE_VOLUME_RAID_0 and etc
Signed-off-by: Gris Ge <***@redhat.com>
---
c_binding/include/libstoragemgmt/libstoragemgmt.h | 25 -----------
.../libstoragemgmt/libstoragemgmt_capabilities.h | 16 -------
.../libstoragemgmt/libstoragemgmt_plug_interface.h | 19 --------
.../include/libstoragemgmt/libstoragemgmt_types.h | 1 -
c_binding/lsm_mgmt.cpp | 24 -----------
c_binding/lsm_plugin_ipc.cpp | 50 +---------------------
python_binding/lsm/_client.py | 27 ------------
python_binding/lsm/_data.py | 18 --------
python_binding/lsm/_iplugin.py | 11 -----
9 files changed, 1 insertion(+), 190 deletions(-)
diff --git a/c_binding/include/libstoragemgmt/libstoragemgmt.h b/c_binding/include/libstoragemgmt/libstoragemgmt.h
index cd209e8..0496cce 100644
--- a/c_binding/include/libstoragemgmt/libstoragemgmt.h
+++ b/c_binding/include/libstoragemgmt/libstoragemgmt.h
@@ -291,31 +291,6 @@ extern "C" {
lsm_pool** pool, char **job, lsm_flag flags);
/**
- * Create new pool in by specifying which volumes should be used for pool
- * creation.
- * @param [in] conn Valid connection @see lsm_connect_password
- * @param [in] system System of where pool will reside
- * @param [in] pool_name The name of the new pool, will not fail
- * if request name cannot be fulfilled
- * @param [in] member_ids The IDs of volumes to create new pool from
- * The new pool could contain more volumes
- * than requested due to internal needs,
- * but if possible should only contain
- * requested volumes.
- * @param [in] raid_type The RAID type for new pool
- * @param [out] pool Newly created pool
- * @param [out] job Job ID of aysnc.
- * @param [in] flags Reserved for future use, must be zero
- * @return LSM_ERR_OK on success, LSM_ERR_JOB_STARTED if async.,
- * else error code
- */
- int LSM_DLL_EXPORT lsm_pool_create_from_volumes(lsm_connect *conn,
- lsm_system *system, const char *pool_name,
- lsm_volume *volumes[], uint32_t num_volumes,
- lsm_pool_raid_type raid_type,
- lsm_pool** pool, char **job, lsm_flag flags);
-
- /**
* Create new pool from an existing pool
* @param [in] conn Valid connection @see lsm_connect_password
* @param [in] system System of where pool will reside
diff --git a/c_binding/include/libstoragemgmt/libstoragemgmt_capabilities.h b/c_binding/include/libstoragemgmt/libstoragemgmt_capabilities.h
index 2963d09..2ccbef3 100644
--- a/c_binding/include/libstoragemgmt/libstoragemgmt_capabilities.h
+++ b/c_binding/include/libstoragemgmt/libstoragemgmt_capabilities.h
@@ -120,22 +120,6 @@ typedef enum {
LSM_CAP_POOL_CREATE_DISK_RAID_16 = 153,
LSM_CAP_POOL_CREATE_DISK_RAID_NOT_APPLICABLE = 154,
- LSM_CAP_POOL_CREATE_VOLUME_RAID_0 = 160,
- LSM_CAP_POOL_CREATE_VOLUME_RAID_1 = 161,
- LSM_CAP_POOL_CREATE_VOLUME_RAID_JBOD = 162,
- LSM_CAP_POOL_CREATE_VOLUME_RAID_3 = 163,
- LSM_CAP_POOL_CREATE_VOLUME_RAID_4 = 164,
- LSM_CAP_POOL_CREATE_VOLUME_RAID_5 = 165,
- LSM_CAP_POOL_CREATE_VOLUME_RAID_6 = 166,
- LSM_CAP_POOL_CREATE_VOLUME_RAID_10 = 167,
- LSM_CAP_POOL_CREATE_VOLUME_RAID_50 = 168,
- LSM_CAP_POOL_CREATE_VOLUME_RAID_51 = 169,
- LSM_CAP_POOL_CREATE_VOLUME_RAID_60 = 170,
- LSM_CAP_POOL_CREATE_VOLUME_RAID_61 = 171,
- LSM_CAP_POOL_CREATE_VOLUME_RAID_15 = 172,
- LSM_CAP_POOL_CREATE_VOLUME_RAID_16 = 173,
- LSM_CAP_POOL_CREATE_VOLUME_RAID_NOT_APPLICABLE = 174,
-
LSM_CAP_POOL_DELETE = 200, /**< Pool delete support */
LSM_CAP_POOLS_QUICK_SEARCH = 210, /**< Seach occurs on array */
diff --git a/c_binding/include/libstoragemgmt/libstoragemgmt_plug_interface.h b/c_binding/include/libstoragemgmt/libstoragemgmt_plug_interface.h
index 7eb152c..a337c1a 100644
--- a/c_binding/include/libstoragemgmt/libstoragemgmt_plug_interface.h
+++ b/c_binding/include/libstoragemgmt/libstoragemgmt_plug_interface.h
@@ -248,24 +248,6 @@ typedef int (*lsm_plug_pool_create_from_disks)( lsm_plugin_ptr c,
lsm_pool_raid_type raid_type, lsm_pool **pool, char **job,
lsm_flag flags);
-/**
- * Create a pool and specifying volumes to use.
- * @param[in] c Valid lsm plug-in pointer
- * @param[in] system System
- * @param[in] pool_name Human name of pool
- * @param[in] volumes Array of volume pointers
- * @param[in] num_volumes Number of volumes
- * @param[in] raid_type Raid type for pool
- * @param[out] pool Newly create pool if done sync.
- * @param[out] job Job id if execution is async.
- * @return LSM_ERR_OK, else error reason
- */
-typedef int (*lsm_plug_pool_create_from_volumes)( lsm_plugin_ptr c,
- lsm_system *system,
- const char *pool_name, lsm_volume *volumes[],
- uint32_t num_volumes,
- lsm_pool_raid_type raid_type, lsm_pool** pool, char **job,
- lsm_flag flags);
/**
* Create a pool and specifying pool to use.
@@ -837,7 +819,6 @@ struct lsm_san_ops_v1 {
lsm_plug_disk_list disk_get; /**< retrieve disks */
lsm_plug_pool_create pool_create; /**< Pool create */
lsm_plug_pool_create_from_disks pool_create_from_disks; /**< Pool create from disks */
- lsm_plug_pool_create_from_volumes pool_create_from_volumes; /**< Pool create using volumes */
lsm_plug_pool_create_from_pool pool_create_from_pool; /**< Pool creation from pool */
lsm_plug_pool_delete pool_delete; /**< Delete a pool */
lsm_plug_volume_create vol_create; /**< creating a lun */
diff --git a/c_binding/include/libstoragemgmt/libstoragemgmt_types.h b/c_binding/include/libstoragemgmt/libstoragemgmt_types.h
index ce1559a..3691eda 100644
--- a/c_binding/include/libstoragemgmt/libstoragemgmt_types.h
+++ b/c_binding/include/libstoragemgmt/libstoragemgmt_types.h
@@ -265,7 +265,6 @@ typedef enum {
LSM_POOL_MEMBER_TYPE_UNKNOWN = 0,
LSM_POOL_MEMBER_TYPE_DISK = 1,
LSM_POOL_MEMBER_TYPE_POOL = 2,
- LSM_POOL_MEMBER_TYPE_VOLUME = 3,
LSM_POOL_MEMBER_TYPE_DISK_MIX = 10,
LSM_POOL_MEMBER_TYPE_DISK_ATA = 11,
LSM_POOL_MEMBER_TYPE_DISK_SATA = 12,
diff --git a/c_binding/lsm_mgmt.cpp b/c_binding/lsm_mgmt.cpp
index 74ddf73..0ad8597 100644
--- a/c_binding/lsm_mgmt.cpp
+++ b/c_binding/lsm_mgmt.cpp
@@ -871,7 +871,6 @@ static int valid_pool_member_type(lsm_pool_member_type validate)
case (LSM_POOL_MEMBER_TYPE_UNKNOWN):
case (LSM_POOL_MEMBER_TYPE_DISK):
case (LSM_POOL_MEMBER_TYPE_POOL):
- case (LSM_POOL_MEMBER_TYPE_VOLUME):
case (LSM_POOL_MEMBER_TYPE_DISK_MIX):
case (LSM_POOL_MEMBER_TYPE_DISK_ATA):
case (LSM_POOL_MEMBER_TYPE_DISK_SATA):
@@ -992,29 +991,6 @@ int LSM_DLL_EXPORT lsm_pool_create_from_disks(lsm_connect *c,
}
-int LSM_DLL_EXPORT lsm_pool_create_from_volumes(lsm_connect *c,
- lsm_system *system, const char *pool_name,
- lsm_volume *volumes[], uint32_t num_volumes,
- lsm_pool_raid_type raid_type,
- lsm_pool** pool, char **job, lsm_flag flags)
-{
- uint32_t i;
-
- if( !volumes || !num_volumes ) {
- return LSM_ERR_INVALID_ARGUMENT;
- }
-
- /* Create disks container */
- std::vector<Value> vols;
- for( i = 0; i < num_volumes; ++i ) {
- vols.push_back(volume_to_value(volumes[i]));
- }
-
- return lsm_pool_create_from(c, system, pool_name, vols, raid_type,
- pool, job, flags, "volumes",
- "pool_create_from_volumes");
-}
-
int lsm_pool_create_from_pool(lsm_connect *c, lsm_system *system,
const char *pool_name, lsm_pool *pool,
diff --git a/c_binding/lsm_plugin_ipc.cpp b/c_binding/lsm_plugin_ipc.cpp
index 3279ea3..8be63b0 100644
--- a/c_binding/lsm_plugin_ipc.cpp
+++ b/c_binding/lsm_plugin_ipc.cpp
@@ -595,53 +595,6 @@ static int handle_pool_create_from_disks(lsm_plugin_ptr p, Value ¶ms, Value
return rc;
}
-static int handle_pool_create_from_volumes(lsm_plugin_ptr p, Value ¶ms, Value &response)
-{
- int rc = LSM_ERR_NO_SUPPORT;
- if( p && p->san_ops && p->san_ops->pool_create_from_volumes ) {
-
- Value v_sys = params["system"];
- Value v_pool_name = params["pool_name"];
- Value v_volumes = params["volumes"];
- Value v_raid_t = params["raid_type"];
-
- if( Value::object_t == v_sys.valueType() &&
- Value::string_t == v_pool_name.valueType() &&
- Value::array_t == v_volumes.valueType() &&
- Value::numeric_t == v_raid_t.valueType() &&
- LSM_FLAG_EXPECTED_TYPE(params)) {
-
- /* Get the array of disks */
- lsm_volume **volumes = NULL;
- uint32_t num_volumes = 0;
- rc = value_array_to_volumes(v_volumes, &volumes, &num_volumes);
-
- if( LSM_ERR_OK == rc ) {
- lsm_system *sys = value_to_system(v_sys);
- const char *pool_name = v_pool_name.asC_str();
- lsm_pool_raid_type raid_type = (lsm_pool_raid_type)v_raid_t.asInt32_t();
-
- lsm_pool *pool = NULL;
- char *job = NULL;
-
- rc = p->san_ops->pool_create_from_volumes(p, sys, pool_name,
- volumes, num_volumes, raid_type,
- &pool, &job, LSM_FLAG_GET_VALUE(params));
-
- Value p = pool_to_value(pool);
- response = job_handle(p, job);
- lsm_volume_record_array_free(volumes, num_volumes);
- lsm_pool_record_free(pool);
- lsm_system_record_free(sys);
- free(job);
- }
- } else {
- rc = LSM_ERR_TRANSPORT_INVALID_ARG;
- }
- }
- return rc;
-}
-
static int handle_pool_create_from_pool(lsm_plugin_ptr p, Value ¶ms, Value &response)
{
int rc = LSM_ERR_NO_SUPPORT;
@@ -2284,7 +2237,6 @@ static std::map<std::string,handler> dispatch = static_map<std::string,handler>
("pools", handle_pools)
("pool_create", handle_pool_create)
("pool_create_from_disks", handle_pool_create_from_disks)
- ("pool_create_from_volumes", handle_pool_create_from_volumes)
("pool_create_from_pool", handle_pool_create_from_pool)
("pool_delete", handle_pool_delete)
("time_out_set", handle_set_time_out)
@@ -2692,4 +2644,4 @@ void lsm_plug_nfs_export_search_filter(const char *search_key,
nfs_free);
}
}
-}
\ No newline at end of file
+}
diff --git a/python_binding/lsm/_client.py b/python_binding/lsm/_client.py
index 74e663c..c85cdee 100644
--- a/python_binding/lsm/_client.py
+++ b/python_binding/lsm/_client.py
@@ -362,33 +362,6 @@ class Client(INetworkAttachedStorage):
"""
return self._tp.rpc('pool_create_from_disks', _del_self(locals()))
- ## Create new pool in the hard way by defined what exactly volumes should
- ## be used. Depending on these capabilities:
- ## Capabilities.POOL_CREATE_FROM_VOLUMES
- ## Return the newly created pool object with all supported optional data.
- # @param self The this pointer
- # @param system_id The id of system where new pool should reside.
- # @param pool_name The name for new pool. Will not fail if created
- # pool_name is not the same as requested.
- # @param volumes The volumes to create new pool from.
- # The new pool could contain more volumes than
- # requested due to internal needs, but if possible,
- # new pool should only contain requested volumes.
- # @param raid_type The RAID level for new pool.
- # Capabilities.POOL_CREATE_VOLUME_RAID_XXX will
- # indicate the supported RAID level.
- # @param flags Reserved for future use.
- # @returns A tuple (job_id, new_pool), when one is None the other is
- # valid.
- @_return_requires(unicode, Pool)
- def pool_create_from_volumes(self, system_id, pool_name, volumes,
- raid_type, flags=0):
- """
- Creates pool from volumes.
- Returns the created new pool object.
- """
- return self._tp.rpc('pool_create_from_volumes', _del_self(locals()))
-
## Create new pool in the hard way by defined what exactly pool should
## be allocate space from. Depending on this capability:
## Capabilities.POOL_CREATE_FROM_POOL
diff --git a/python_binding/lsm/_data.py b/python_binding/lsm/_data.py
index 04c7af3..444c7b9 100644
--- a/python_binding/lsm/_data.py
+++ b/python_binding/lsm/_data.py
@@ -431,7 +431,6 @@ class Pool(IData):
MEMBER_TYPE_DISK_LUN = 111
MEMBER_TYPE_POOL = 2
- MEMBER_TYPE_VOLUME = 3
_MEMBER_TYPE_2_DISK_TYPE = {
MEMBER_TYPE_DISK: Disk.DISK_TYPE_UNKNOWN,
@@ -769,7 +768,6 @@ class Capabilities(IData):
#Pool
POOL_CREATE = 130
POOL_CREATE_FROM_DISKS = 131
- POOL_CREATE_FROM_VOLUMES = 132
POOL_CREATE_FROM_POOL = 133
POOL_CREATE_DISK_RAID_0 = 140
@@ -788,22 +786,6 @@ class Capabilities(IData):
POOL_CREATE_DISK_RAID_16 = 153
POOL_CREATE_DISK_RAID_NOT_APPLICABLE = 154
- POOL_CREATE_VOLUME_RAID_0 = 160
- POOL_CREATE_VOLUME_RAID_1 = 161
- POOL_CREATE_VOLUME_RAID_JBOD = 162
- POOL_CREATE_VOLUME_RAID_3 = 163
- POOL_CREATE_VOLUME_RAID_4 = 164
- POOL_CREATE_VOLUME_RAID_5 = 165
- POOL_CREATE_VOLUME_RAID_6 = 166
- POOL_CREATE_VOLUME_RAID_10 = 167
- POOL_CREATE_VOLUME_RAID_50 = 168
- POOL_CREATE_VOLUME_RAID_51 = 169
- POOL_CREATE_VOLUME_RAID_60 = 170
- POOL_CREATE_VOLUME_RAID_61 = 171
- POOL_CREATE_VOLUME_RAID_15 = 172
- POOL_CREATE_VOLUME_RAID_16 = 173
- POOL_CREATE_VOLUME_RAID_NOT_APPLICABLE = 174
-
POOL_DELETE = 200
POOLS_QUICK_SEARCH = 210
diff --git a/python_binding/lsm/_iplugin.py b/python_binding/lsm/_iplugin.py
index d903fc3..6c32f71 100644
--- a/python_binding/lsm/_iplugin.py
+++ b/python_binding/lsm/_iplugin.py
@@ -151,17 +151,6 @@ class IStorageAreaNetwork(IPlugin):
"""
raise LsmError(ErrorNumber.NO_SUPPORT, "Not supported")
- def pool_create_from_volumes(self, system_id, pool_name, member_ids,
- raid_type, flags=0):
- """
- Creates a pool from existing volumes
-
- Returns a tuple (job_id, re-sized_volume)
- Note: Tuple return values are mutually exclusive, when one
- is None the other must be valid.
- """
- raise LsmError(ErrorNumber.NO_SUPPORT, "Not supported")
-
def pool_create_from_pool(self, system_id, pool_name, member_id,
size_bytes, flags=0):
"""
--
1.8.3.1