From notifications-return-15029-apmail-libcloud-notifications-archive=libcloud.apache.org@libcloud.apache.org Thu Dec 13 11:26:11 2018 Return-Path: X-Original-To: apmail-libcloud-notifications-archive@www.apache.org Delivered-To: apmail-libcloud-notifications-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 6497118E1D for ; Thu, 13 Dec 2018 11:26:11 +0000 (UTC) Received: (qmail 73399 invoked by uid 500); 13 Dec 2018 11:26:11 -0000 Delivered-To: apmail-libcloud-notifications-archive@libcloud.apache.org Received: (qmail 73283 invoked by uid 500); 13 Dec 2018 11:26:11 -0000 Mailing-List: contact notifications-help@libcloud.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@libcloud.apache.org Delivered-To: mailing list notifications@libcloud.apache.org Received: (qmail 73027 invoked by uid 500); 13 Dec 2018 11:26:10 -0000 Delivered-To: apmail-libcloud-commits@libcloud.apache.org Received: (qmail 72986 invoked by uid 99); 13 Dec 2018 11:26:10 -0000 Received: from git1-us-west.apache.org (HELO git1-us-west.apache.org) (140.211.11.23) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 13 Dec 2018 11:26:10 +0000 Received: by git1-us-west.apache.org (ASF Mail Server at git1-us-west.apache.org, from userid 33) id 5C47EE1457; Thu, 13 Dec 2018 11:26:10 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: anthonyshaw@apache.org To: commits@libcloud.apache.org Date: Thu, 13 Dec 2018 11:26:19 -0000 Message-Id: <1b54717f4f5d4541a834cca1198a7a18@git.apache.org> In-Reply-To: References: X-Mailer: ASF-Git Admin Mailer Subject: [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 Authored: Tue Oct 30 16:09:59 2018 -0400 Committer: mitch 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