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 50961118D4 for ; Tue, 6 May 2014 19:26:09 +0000 (UTC) Received: (qmail 99287 invoked by uid 500); 6 May 2014 18:02:44 -0000 Delivered-To: apmail-cloudstack-dev-archive@cloudstack.apache.org Received: (qmail 99245 invoked by uid 500); 6 May 2014 18:02:43 -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 99230 invoked by uid 99); 6 May 2014 18:02:43 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 06 May 2014 18:02:43 +0000 X-ASF-Spam-Status: No, hits=-2.3 required=5.0 tests=RCVD_IN_DNSWL_MED,SPF_PASS,UNPARSEABLE_RELAY X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of Ove.Ewerlid@oracle.com designates 156.151.31.81 as permitted sender) Received: from [156.151.31.81] (HELO userp1040.oracle.com) (156.151.31.81) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 06 May 2014 18:02:38 +0000 Received: from acsinet21.oracle.com (acsinet21.oracle.com [141.146.126.237]) by userp1040.oracle.com (Sentrion-MTA-4.3.2/Sentrion-MTA-4.3.2) with ESMTP id s46I2EK8008933 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Tue, 6 May 2014 18:02:15 GMT Received: from aserz7021.oracle.com (aserz7021.oracle.com [141.146.126.230]) by acsinet21.oracle.com (8.14.4+Sun/8.14.4) with ESMTP id s46I2Dej006703 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Tue, 6 May 2014 18:02:13 GMT Received: from abhmp0005.oracle.com (abhmp0005.oracle.com [141.146.116.11]) by aserz7021.oracle.com (8.14.4+Sun/8.14.4) with ESMTP id s46I2D7Y006686; Tue, 6 May 2014 18:02:13 GMT Received: from amd-a.everlid.net (/83.255.61.176) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Tue, 06 May 2014 11:02:13 -0700 Message-ID: <536923A3.2060000@oracle.com> Date: Tue, 06 May 2014 20:02:11 +0200 From: Ove Ewerlid User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.5.0 MIME-Version: 1.0 To: dev@cloudstack.apache.org, antonio.fornie@gmail.com Subject: Re: 44 API breakage in UpdateUser References: <5366A0E5.4040900@oracle.com> <53681430.2030404@oracle.com> In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-Source-IP: acsinet21.oracle.com [141.146.126.237] X-Virus-Checked: Checked by ClamAV on apache.org On 05/06/2014 08:45 AM, Antonio ForniƩ Casarrubios wrote: > Hi Ove, > > Sorry but I think the only thing I did here was to put in a constant a > hardcoded value, but you should find who put the hardcoded value in the > first place. yes, 'git blame' is lacking in conveying specifics. 'git log -p' provides additional detail; git log -p --grep 'Corrects problems from prev' api/src/org/apache/cloudstack/api/ApiConstants.java showing a commit of yours that modifies the value of API_KEY. Is this interpretation incorrect? Irregardless of the source of the change, the value of API_KEY is exposed in UpdateUserCmd.java as an API parameter hence changing this value changes the behavior of the API. The same commit introduces USER_API_KEY retaining the old value of API_KEY. Perhaps this new constant should have been introduced in more places. Ove commit c211f0bbbe940ed3b9a6e9ef4b5a29be16062e85 Author: Antonio Fornie Date: Fri Mar 7 09:57:31 2014 -0600 Dispatcher corrections, refactoring and tests Corrects problems from previous attempt. Fixes based on help comments from the community and conflict resolution Signed-off-by: Daan Hoogland diff --git a/api/src/org/apache/cloudstack/api/ApiConstants.java b/api/src/org/apache/cloudstack/api/ApiConstants.java index 14df653..f0de48e 100755 --- a/api/src/org/apache/cloudstack/api/ApiConstants.java +++ b/api/src/org/apache/cloudstack/api/ApiConstants.java @@ -23,7 +23,8 @@ public class ApiConstants { public static final String ACCOUNT_ID = "accountid"; public static final String ALGORITHM = "algorithm"; public static final String ALLOCATED_ONLY = "allocatedonly"; - public static final String API_KEY = "userapikey"; + public static final String API_KEY = "apikey"; + public static final String USER_API_KEY = "userapikey"; public static final String APPLIED = "applied"; public static final String AVAILABLE = "available"; public static final String BITS = "bits"; > Cheers > Antonio > > > > 2014-05-06 0:44 GMT+02:00 Ove Ewerlid : > >> On 05/04/2014 10:19 PM, Ove Ewerlid wrote: >> >>> See https://issues.apache.org/jira/browse/CLOUDSTACK-6570 >>> Suggested patch in comment. >>> /Ove >>> >>> >> Looping in the person that 'git blame' thinks changed the value of API_KEY >> in ApiConstants the last time. >> >> Antonio, was USER_API_KEY introduced for cases where the "userapikey" >> value needed to be preserved, such as in the UpdateUserCmd.java API call, >> and that this update was not done for this API? >> >> /Ove >> >> NB; "git blame" may not be accurate hence I may be looping in someone that >> has nothing to do with this. Sorry if that is the case. >> >> >> [oewerlid@amd-a cloudstack]$ git blame api/src/org/apache/cloudstack/api/ApiConstants.java >> | grep "API_KEY" >> c211f0bb api/src/org/apache/cloudstack/api/ApiConstants.java (Antonio >> Fornie 2014-03-07 09:57:31 -0600 26) public static final >> String API_KEY = "apikey"; >> c211f0bb api/src/org/apache/cloudstack/api/ApiConstants.java (Antonio >> Fornie 2014-03-07 09:57:31 -0600 27) public static final >> String USER_API_KEY = "userapikey"; >> [oewerlid@amd-a cloudstack]$ >> >> >> >> >> -- >> Ove Everlid >> System Administrator / Architect / SDN- & Automation- & Linux-hacker >> Mobile: +46706662363 (dedicated work mobile) >> Country: Sweden, timezone; Middle Europan Time (MET or GMT+1) >> > -- Ove Everlid System Administrator / Architect / SDN- & Automation- & Linux-hacker Mobile: +46706662363 (dedicated work mobile) Country: Sweden, timezone; Middle Europan Time (MET or GMT+1)