You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@libcloud.apache.org by an...@apache.org on 2018/12/13 11:26:19 UTC
[10/45] libcloud git commit: moved create_consistency_group to
drs/drivers/nttcis.py from compute/drivers/nttcis.py. Started testing delete
moved create_consistency_group to drs/drivers/nttcis.py from compute/drivers/nttcis.py. Started testing delete
Project: http://git-wip-us.apache.org/repos/asf/libcloud/repo
Commit: http://git-wip-us.apache.org/repos/asf/libcloud/commit/88daff6d
Tree: http://git-wip-us.apache.org/repos/asf/libcloud/tree/88daff6d
Diff: http://git-wip-us.apache.org/repos/asf/libcloud/diff/88daff6d
Branch: refs/heads/trunk
Commit: 88daff6db7d252e8cad773b43fedf93a6e3bc553
Parents: 10c4a31
Author: mitch <mi...@itaas.dimensiondata.com>
Authored: Tue Oct 30 16:09:59 2018 -0400
Committer: mitch <mi...@itaas.dimensiondata.com>
Committed: Tue Oct 30 16:09:59 2018 -0400
----------------------------------------------------------------------
libcloud/drs/drivers/nttcis.py | 8 +-------
tests/lib_create_test.py | 10 ++++++++++
tests/lib_edit_test.py | 5 +++++
3 files changed, 16 insertions(+), 7 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/libcloud/blob/88daff6d/libcloud/drs/drivers/nttcis.py
----------------------------------------------------------------------
diff --git a/libcloud/drs/drivers/nttcis.py b/libcloud/drs/drivers/nttcis.py
index e368560..ab5f0de 100644
--- a/libcloud/drs/drivers/nttcis.py
+++ b/libcloud/drs/drivers/nttcis.py
@@ -87,10 +87,4 @@ class NttCisDRSDriver(Driver):
method="POST",
data=ET.tostring(consistency_group_elm)).object
response_code = findtext(response, 'responseCode', TYPES_URN)
- try:
- assert response_code in ['IN_PROGRESS', 'OK']
- except AssertionError:
- return response_code
- else:
- info = findtext(response, "info", TYPES_URN)
- print(info)
+ return response_code in ['IN_PROGRESS', 'OK']
http://git-wip-us.apache.org/repos/asf/libcloud/blob/88daff6d/tests/lib_create_test.py
----------------------------------------------------------------------
diff --git a/tests/lib_create_test.py b/tests/lib_create_test.py
index 0b345a8..a38f65b 100644
--- a/tests/lib_create_test.py
+++ b/tests/lib_create_test.py
@@ -250,3 +250,13 @@ def test_fail_create_drs(na_compute_driver, drsdriver):
"sdk_cg", "100", src_id, target_id, description="A test consistency group")
exception_msg = excinfo.value.msg
assert exception_msg == 'DRS is not supported between source Data Center NA9 and target Data Center NA12.'
+
+
+def test_create_drs(na_compute_driver, drsdriver):
+ nodes = na_compute_driver.list_nodes(ex_name='Src-Test-VM01')
+ src_id = nodes[0].id
+ nodes = na_compute_driver.list_nodes(ex_name="Tgt-Test-VM01")
+ target_id = nodes[0].id
+ result = drsdriver.create_consistency_group(
+ "sdk_test_cg", "100", src_id, target_id, description="A test consistency group")
+ assert result is True
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/libcloud/blob/88daff6d/tests/lib_edit_test.py
----------------------------------------------------------------------
diff --git a/tests/lib_edit_test.py b/tests/lib_edit_test.py
index 32984ee..db628c2 100644
--- a/tests/lib_edit_test.py
+++ b/tests/lib_edit_test.py
@@ -450,3 +450,8 @@ def test_delete_listener(compute_driver, lbdriver):
listener = [l for l in listeners if l.name == listener_name][0]
result = lbdriver.destroy_balancer(listener)
assert result is True
+
+
+def test_delete_consistency_group(drsdriver):
+ cg_name = "sdk_test_cg"
+ pass