Discussion:
[Libstoragemgmt-devel] [PATCH 2/4] test_automated.py: Remove / from ID
Tony Asleson
2014-05-01 22:09:20 UTC
Permalink
Signed-off-by: Tony Asleson <***@redhat.com>
---
test/webtest/test_automated.py | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/test/webtest/test_automated.py b/test/webtest/test_automated.py
index 23d9a88..332acfc 100755
--- a/test/webtest/test_automated.py
+++ b/test/webtest/test_automated.py
@@ -24,7 +24,9 @@ def run_test(cmdline, output_dir, sys_id, uri, password ):
(ec, out, error) = call(exec_array)

# Save the output to a temp dir
- fn = "%s/%s" % (output_dir, sys_id.replace(' ', '_'))
+ sys_id = sys_id.replace('/', '-')
+ sys_id = sys_id.replace(' ', '_')
+ fn = "%s/%s" % (output_dir, sys_id)

with open(fn + ".out", 'w') as so:
so.write(out)
@@ -69,4 +71,4 @@ if __name__ == '__main__':
p.join(1)
if not p.is_alive():
process_list.remove(p)
- break
\ No newline at end of file
+ break
--
1.8.2.1
Tony Asleson
2014-05-01 22:09:22 UTC
Permalink
We were missing some parts to the if expressions which
resulted in us incorrectly marking operations as supported
when they in fact were not supported.

Signed-off-by: Tony Asleson <***@redhat.com>
---
lsm/lsm/smis.py | 24 ++++++++++--------------
1 file changed, 10 insertions(+), 14 deletions(-)

diff --git a/lsm/lsm/smis.py b/lsm/lsm/smis.py
index 5516883..d7d1a08 100644
--- a/lsm/lsm/smis.py
+++ b/lsm/lsm/smis.py
@@ -625,36 +625,32 @@ class Smis(IStorageAreaNetwork):
"""
rs = self._get_class_instance("CIM_ReplicationService", 'SystemName',
system.id, True)
-
if rs:
rs_cap = self._c.Associators(
rs.path,
AssocClass='CIM_ElementCapabilities',
ResultClass='CIM_ReplicationServiceCapabilities')[0]

- if self.RepSvc.Action.CREATE_ELEMENT_REPLICA in \
- rs_cap['SupportedAsynchronousActions'] \
- or self.RepSvc.Action.CREATE_ELEMENT_REPLICA in \
- rs_cap['SupportedSynchronousActions']:
+ s_rt = rs_cap['SupportedReplicationTypes']
+
+ if self.RepSvc.Action.CREATE_ELEMENT_REPLICA in s_rt or \
+ self.RepSvc.Action.CREATE_ELEMENT_REPLICA in s_rt:
cap.set(Capabilities.VOLUME_REPLICATE)

# Mirror support is not working and is not supported at this time.
- # if self.RepSvc.RepTypes.SYNC_MIRROR_LOCAL in \
- # rs_cap['SupportedReplicationTypes']:
+ # if self.RepSvc.RepTypes.SYNC_MIRROR_LOCAL in s_rt:
# cap.set(Capabilities.DeviceID)

# if self.RepSvc.RepTypes.ASYNC_MIRROR_LOCAL \
- # in rs_cap['SupportedReplicationTypes']:
+ # in s_rt:
# cap.set(Capabilities.VOLUME_REPLICATE_MIRROR_ASYNC)

- if self.RepSvc.RepTypes.SYNC_SNAPSHOT_LOCAL \
- or self.RepSvc.RepTypes.ASYNC_SNAPSHOT_LOCAL \
- in rs_cap['SupportedReplicationTypes']:
+ if self.RepSvc.RepTypes.SYNC_SNAPSHOT_LOCAL in s_rt or \
+ self.RepSvc.RepTypes.ASYNC_SNAPSHOT_LOCAL in s_rt:
cap.set(Capabilities.VOLUME_REPLICATE_CLONE)

- if self.RepSvc.RepTypes.SYNC_CLONE_LOCAL \
- or self.RepSvc.RepTypes.ASYNC_CLONE_LOCAL \
- in rs_cap['SupportedReplicationTypes']:
+ if self.RepSvc.RepTypes.SYNC_CLONE_LOCAL in s_rt or \
+ self.RepSvc.RepTypes.ASYNC_CLONE_LOCAL in s_rt:
cap.set(Capabilities.VOLUME_REPLICATE_COPY)
else:
# Try older storage configuration service
--
1.8.2.1
Tony Asleson
2014-05-01 22:09:21 UTC
Permalink
Signed-off-by: Tony Asleson <***@redhat.com>
---
test/plugin_test.py | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/test/plugin_test.py b/test/plugin_test.py
index 3349d65..3ef683c 100755
--- a/test/plugin_test.py
+++ b/test/plugin_test.py
@@ -372,9 +372,11 @@ class TestPlugin(unittest.TestCase):
lsm.Capabilities.VOLUME_DELETE]):
vol, pool = self._volume_create(s.id)

+ # For the moment lets allow the array to pick the pool
+ # to supply the backing store for the replicate
if supported(cap, [capability]):
volume_clone = self.c.volume_replicate(
- pool, replication_type, vol,
+ None, replication_type, vol,
rs('volume_clone'))[1]

self.assertTrue(volume_clone is not None)
--
1.8.2.1
Loading...