Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id A3CB8200B95 for ; Tue, 27 Sep 2016 16:25:24 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id A257D160AD3; Tue, 27 Sep 2016 14:25:24 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id F1382160AD2 for ; Tue, 27 Sep 2016 16:25:23 +0200 (CEST) Received: (qmail 4629 invoked by uid 500); 27 Sep 2016 14:25:18 -0000 Mailing-List: contact dev-help@cloudstack.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@cloudstack.apache.org Delivered-To: mailing list dev@cloudstack.apache.org Received: (qmail 3305 invoked by uid 99); 27 Sep 2016 14:25:18 -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; Tue, 27 Sep 2016 14:25:18 +0000 Received: by git1-us-west.apache.org (ASF Mail Server at git1-us-west.apache.org, from userid 33) id C690DE38B7; Tue, 27 Sep 2016 14:25:17 +0000 (UTC) From: jburwell To: dev@cloudstack.apache.org Reply-To: dev@cloudstack.apache.org References: In-Reply-To: Subject: [GitHub] cloudstack pull request #1615: CLOUDSTACK-9438: Fix for CLOUDSTACK-9252 - Ma... Content-Type: text/plain Message-Id: <20160927142517.C690DE38B7@git1-us-west.apache.org> Date: Tue, 27 Sep 2016 14:25:17 +0000 (UTC) archived-at: Tue, 27 Sep 2016 14:25:24 -0000 Github user jburwell commented on a diff in the pull request: https://github.com/apache/cloudstack/pull/1615#discussion_r80702685 --- Diff: test/integration/smoke/test_ssvm.py --- @@ -1197,3 +1205,148 @@ def test_10_destroy_cpvm(self): # Call to verify cloud process is running self.test_04_cpvm_internals() return + + @attr( + tags=[ + "advanced", + "advancedns", + "smoke", + "basic", + "sg"], + required_hardware="true") + def test_11_ss_nfs_version_on_ssvm(self): + """Test NFS Version on Secondary Storage mounted properly on SSVM + """ + + # 1) List SSVM in zone + # 2) Get id and url from mounted nfs store + # 3) Update NFS version for previous image store + # 4) Stop SSVM + # 5) Check NFS version of mounted nfs store after SSVM starts + + nfs_version = self.config.nfsVersion + if nfs_version == None: + self.skipTest('No NFS version provided in test data') + + #List SSVM for zone id + list_ssvm_response = list_ssvms( + self.apiclient, + systemvmtype='secondarystoragevm', + state='Running', + zoneid=self.zone.id + ) + self.assertEqual( + isinstance(list_ssvm_response, list), + True, + "Check list response returns a valid list" + ) + self.assertEqual( + len(list_ssvm_response), + 1, + "Check list System VMs response" + ) + + ssvm = list_ssvm_response[0] + image_stores_response = ImageStore.list(self.apiclient,zoneid=self.zone.id) + + if self.hypervisor.lower() in ('vmware', 'hyperv'): + # SSH into SSVMs is done via management server for Vmware and Hyper-V + result = get_process_status( + self.apiclient.connection.mgtSvr, + 22, + self.apiclient.connection.user, + self.apiclient.connection.passwd, + ssvm.privateip, + "mount | grep 'type nfs'", + hypervisor=self.hypervisor) + + for res in result: + split_res = res.split(" on ") + mounted_img_store_url = split_res[0] + for img_store in image_stores_response: + img_store_url = str(img_store.url) + if img_store_url.startswith("nfs://"): + img_store_url = img_store_url[6:] + #Add colon after ip address to match output from mount command + first_slash = img_store_url.find('/') + img_store_url = img_store_url[0:first_slash] + ':' + img_store_url[first_slash:] + if img_store_url == mounted_img_store_url: + img_store_id = img_store.id + break --- End diff -- What is this `for` accomplishing? --- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastructure@apache.org or file a JIRA ticket with INFRA. ---