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 <afor...@schubergphilis.com>
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 <d...@onecht.net>
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 <ove.ewer...@oracle.com>:
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)