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 E72C611A74 for ; Fri, 8 Aug 2014 08:51:34 +0000 (UTC) Received: (qmail 25078 invoked by uid 500); 8 Aug 2014 08:51:34 -0000 Delivered-To: apmail-cloudstack-dev-archive@cloudstack.apache.org Received: (qmail 25044 invoked by uid 500); 8 Aug 2014 08:51:34 -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 25032 invoked by uid 99); 8 Aug 2014 08:51:33 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 08 Aug 2014 08:51:33 +0000 X-ASF-Spam-Status: No, hits=-0.7 required=5.0 tests=RCVD_IN_DNSWL_LOW,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of daan.hoogland@gmail.com designates 209.85.213.181 as permitted sender) Received: from [209.85.213.181] (HELO mail-ig0-f181.google.com) (209.85.213.181) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 08 Aug 2014 08:51:29 +0000 Received: by mail-ig0-f181.google.com with SMTP id h3so691056igd.8 for ; Fri, 08 Aug 2014 01:51:09 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :content-type; bh=2SZDDDFhOTpbrx1cdFdcxcK7ZjuwrrUumoyEkMZeS/Q=; b=XDXJ3CslPeDccnxUKqUhOxXHCwNCRSIIvbVuMzsj9VWwvmoLzeomzGF+GLMR5wJkHp Ui540uxx3mDn5wT6iMIHzAmSnnWBvYEffSdA8/KOTKDZWoXYpAr8H2I7oaLOCEK5bwgL CuIFb7AKFTCpg3wqO6qU13L6ZIPxcCPRoVLAKz+Knsm6bMi8Y38sN1QpBc5ZK5qd2MA4 7FOU4cYAikX/4fbr8Ep3n3UZOLUTfL9rnzYUCXUIKzZI6gmlIB2p6T1gsZ0eB61BqTaO KaAidMMdpYKuO58fLeTHuYpqRf9OjUGYsI8DeU+PVtL737BN8vcjs654TnI0lW8td5Cg rqPw== X-Received: by 10.50.128.234 with SMTP id nr10mr3065615igb.3.1407487869028; Fri, 08 Aug 2014 01:51:09 -0700 (PDT) MIME-Version: 1.0 Received: by 10.107.155.79 with HTTP; Fri, 8 Aug 2014 01:50:48 -0700 (PDT) In-Reply-To: References: From: Daan Hoogland Date: Fri, 8 Aug 2014 10:50:48 +0200 Message-ID: Subject: Re: List APIs Behavior To: dev Content-Type: text/plain; charset=UTF-8 X-Virus-Checked: Checked by ClamAV on apache.org Gaurav, I think you are now pointing at one of the qualities of our API that need to be addressed in 5.0 [1]. I may be wrong but I don't think a standard behavior in these cases is defined and every list api has a choice of several conventions to folow. Feel free to define what the behavior should be in a future version by editing [1] :) [1] https://cwiki.apache.org/confluence/display/CLOUDSTACK/API+changes On Fri, Aug 8, 2014 at 10:44 AM, Gaurav Aradhye wrote: > Hello, > > Can somebody please address this query? > > Regards, > Gaurav > > > On Thu, Aug 7, 2014 at 10:23 PM, Gaurav Aradhye > wrote: > >> I want to understand the output of the list APIs when the entity is not >> present / deleted. Suppose I create an account, create a network within it >> and acquire a public IP address in the network. >> >> 1) ListPublicIpAddresses - public ip id passed, returns public IP >> 2) ListPublicIpAddresses - account, domainid passed, returns public IP >> >> Now I delete the public IP (Disassociate). >> >> After this operation, I expect following results: >> 1) ListPublicIpAddreses - account,domain id passed, result: None (assuming >> there was only one) >> 2) ListPublicIpAddresses - public ip id passed, I expect exception here >> because the id must have been removed from DB. But I get "None" as result >> here. >> >> If I get None, then can I assume that id is still present in DB but it is >> marked as obsolete? >> >> When can I expect an exception in return? And when can I expect None? >> Ideally, when we search by Id, then exception should be thrown and when we >> expect by passing account/domainid/projectid/networkid etc, then None >> should be returned. Do all List APIs follow a similar guideline? >> >> Regards, >> Gaurav >> -- Daan