Return-Path: X-Original-To: apmail-cloudstack-dev-archive@www.apache.org Delivered-To: apmail-cloudstack-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 49DC010F20 for ; Fri, 1 Nov 2013 07:44:14 +0000 (UTC) Received: (qmail 71381 invoked by uid 500); 1 Nov 2013 07:44:12 -0000 Delivered-To: apmail-cloudstack-dev-archive@cloudstack.apache.org Received: (qmail 71347 invoked by uid 500); 1 Nov 2013 07:44:12 -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 71321 invoked by uid 99); 1 Nov 2013 07:44:12 -0000 Received: from reviews-vm.apache.org (HELO reviews.apache.org) (140.211.11.40) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 01 Nov 2013 07:44:12 +0000 Received: from reviews.apache.org (localhost [127.0.0.1]) by reviews.apache.org (Postfix) with ESMTP id 83CF61CBE3B; Fri, 1 Nov 2013 07:44:08 +0000 (UTC) Content-Type: multipart/alternative; boundary="===============2724473684534925990==" MIME-Version: 1.0 Subject: Review Request 15175: Added a verifyElementInList utility function From: "Santhosh Edukulla" To: "Girish Shilamkar" , "Prasanna Santhanam" Cc: "Santhosh Edukulla" , "cloudstack" Date: Fri, 01 Nov 2013 07:44:08 -0000 Message-ID: <20131101074408.8090.89553@reviews.apache.org> X-ReviewBoard-URL: https://reviews.apache.org Auto-Submitted: auto-generated Sender: "Santhosh Edukulla" X-ReviewGroup: cloudstack X-ReviewRequest-URL: https://reviews.apache.org/r/15175/ X-Sender: "Santhosh Edukulla" Reply-To: "Santhosh Edukulla" --===============2724473684534925990== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit ----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/15175/ ----------------------------------------------------------- Review request for cloudstack, Girish Shilamkar and Prasanna Santhanam. Repository: cloudstack-git Description ------- The purpose is to verify a given element in list at a given position with few error checks like list type,empty list and position Returns appropriate codes based upon the inputs. Can be used under tests instead of multiple asserts Earlier, there was a list validity function, this is on top of that. Need to go to both master and 4.2 Diffs ----- tools/marvin/marvin/codes.py bd01ad3 tools/marvin/marvin/integration/lib/utils.py b6e38ec Diff: https://reviews.apache.org/r/15175/diff/ Testing ------- Tested. >>> from utils import verifyElementInList >>> a=[1,2,3] >>> verifyElementInList(a,2) [0, 'ELEMENT NOT FOUND IN THE INPUT'] >>> verifyElementInList(a,1) [1, None] >>> verifyElementInList(a,3) [0, 'ELEMENT NOT FOUND IN THE INPUT'] Thanks, Santhosh Edukulla --===============2724473684534925990==--