[jira] [Commented] (CLOUDSTACK-10360) Inconsistent method name

2018-04-30 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/CLOUDSTACK-10360?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16458373#comment-16458373
 ] 

ASF GitHub Bot commented on CLOUDSTACK-10360:
-

rhtyd closed pull request #2598: CLOUDSTACK-10360: Change the method name.
URL: https://github.com/apache/cloudstack/pull/2598
 
 
   

This is a PR merged from a forked repository.
As GitHub hides the original diff on merge, it is displayed below for
the sake of provenance:

As this is a foreign pull request (from a fork), the diff is supplied
below (as it won't show otherwise due to GitHub magic):

diff --git 
a/framework/config/src/main/java/org/apache/cloudstack/framework/config/ConfigKey.java
 
b/framework/config/src/main/java/org/apache/cloudstack/framework/config/ConfigKey.java
index 1734b98757b..2ace24dce5a 100644
--- 
a/framework/config/src/main/java/org/apache/cloudstack/framework/config/ConfigKey.java
+++ 
b/framework/config/src/main/java/org/apache/cloudstack/framework/config/ConfigKey.java
@@ -152,7 +152,7 @@ public T valueIn(Long id) {
 return value();
 }
 
-String value = s_depot != null ? 
s_depot.scoped(this).getConfigValue(id, this) : null;
+String value = s_depot != null ? 
s_depot.findScopedConfigStorage(this).getConfigValue(id, this) : null;
 if (value == null) {
 return value();
 } else {
diff --git 
a/framework/config/src/main/java/org/apache/cloudstack/framework/config/impl/ConfigDepotImpl.java
 
b/framework/config/src/main/java/org/apache/cloudstack/framework/config/impl/ConfigDepotImpl.java
index 6a85b90b70d..bb49ce1042f 100644
--- 
a/framework/config/src/main/java/org/apache/cloudstack/framework/config/impl/ConfigDepotImpl.java
+++ 
b/framework/config/src/main/java/org/apache/cloudstack/framework/config/impl/ConfigDepotImpl.java
@@ -166,7 +166,7 @@ public ConfigurationDao global() {
 return _configDao;
 }
 
-public ScopedConfigStorage scoped(ConfigKey config) {
+public ScopedConfigStorage findScopedConfigStorage(ConfigKey config) {
 for (ScopedConfigStorage storage : _scopedStorages) {
 if (storage.getScope() == config.scope()) {
 return storage;


 


This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


> Inconsistent method name
> 
>
> Key: CLOUDSTACK-10360
> URL: https://issues.apache.org/jira/browse/CLOUDSTACK-10360
> Project: CloudStack
>  Issue Type: Improvement
>  Security Level: Public(Anyone can view this level - this is the 
> default.) 
>Reporter: KuiLIU
>Priority: Major
>
> The following method is named as "scoped" that seems to whether the variable 
> config is scoped in _scopedStorages or not.
> Actually, the method tries to find a storage of which scope equals to the 
> scope of config.
> So that, the method name "findStorage" should be more clear than "scoped".
> {code:java}
> public ScopedConfigStorage scoped(ConfigKey config) {
> for (ScopedConfigStorage storage : _scopedStorages) {
> if (storage.getScope() == config.scope()) {
> return storage;
> }
> }
> throw new CloudRuntimeException("Unable to find config storage for 
> this scope: " + config.scope() + " for " + config.key());
> }
> {code}



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Commented] (CLOUDSTACK-10360) Inconsistent method name

2018-04-30 Thread ASF subversion and git services (JIRA)

[ 
https://issues.apache.org/jira/browse/CLOUDSTACK-10360?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16458374#comment-16458374
 ] 

ASF subversion and git services commented on CLOUDSTACK-10360:
--

Commit 93509a431cde8452037e79f7b85584a2a3c025df in cloudstack's branch 
refs/heads/master from [~BruceKuiLIU]
[ https://gitbox.apache.org/repos/asf?p=cloudstack.git;h=93509a4 ]

CLOUDSTACK-10360: Change the method name. (#2598)

The method is named as "scoped" that seems to whether the variable config is 
scoped in _scopedStorages or not. Actually, the method tries to find a storage 
of which scope equals to the scope of config. So that, the method name 
"findStorage" should be more clear than "scoped".


> Inconsistent method name
> 
>
> Key: CLOUDSTACK-10360
> URL: https://issues.apache.org/jira/browse/CLOUDSTACK-10360
> Project: CloudStack
>  Issue Type: Improvement
>  Security Level: Public(Anyone can view this level - this is the 
> default.) 
>Reporter: KuiLIU
>Priority: Major
>
> The following method is named as "scoped" that seems to whether the variable 
> config is scoped in _scopedStorages or not.
> Actually, the method tries to find a storage of which scope equals to the 
> scope of config.
> So that, the method name "findStorage" should be more clear than "scoped".
> {code:java}
> public ScopedConfigStorage scoped(ConfigKey config) {
> for (ScopedConfigStorage storage : _scopedStorages) {
> if (storage.getScope() == config.scope()) {
> return storage;
> }
> }
> throw new CloudRuntimeException("Unable to find config storage for 
> this scope: " + config.scope() + " for " + config.key());
> }
> {code}



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Commented] (CLOUDSTACK-10360) Inconsistent method name

2018-04-30 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/CLOUDSTACK-10360?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16458372#comment-16458372
 ] 

ASF GitHub Bot commented on CLOUDSTACK-10360:
-

rhtyd commented on issue #2598: CLOUDSTACK-10360: Change the method name.
URL: https://github.com/apache/cloudstack/pull/2598#issuecomment-385327981
 
 
   We can merge this since it's a cosmetic fix - name change refactoring, no 
effective code change. I'll merge this based on code reviews and Travis passing.


This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


> Inconsistent method name
> 
>
> Key: CLOUDSTACK-10360
> URL: https://issues.apache.org/jira/browse/CLOUDSTACK-10360
> Project: CloudStack
>  Issue Type: Improvement
>  Security Level: Public(Anyone can view this level - this is the 
> default.) 
>Reporter: KuiLIU
>Priority: Major
>
> The following method is named as "scoped" that seems to whether the variable 
> config is scoped in _scopedStorages or not.
> Actually, the method tries to find a storage of which scope equals to the 
> scope of config.
> So that, the method name "findStorage" should be more clear than "scoped".
> {code:java}
> public ScopedConfigStorage scoped(ConfigKey config) {
> for (ScopedConfigStorage storage : _scopedStorages) {
> if (storage.getScope() == config.scope()) {
> return storage;
> }
> }
> throw new CloudRuntimeException("Unable to find config storage for 
> this scope: " + config.scope() + " for " + config.key());
> }
> {code}



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Commented] (CLOUDSTACK-10360) Inconsistent method name

2018-04-28 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/CLOUDSTACK-10360?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16457546#comment-16457546
 ] 

ASF GitHub Bot commented on CLOUDSTACK-10360:
-

rafaelweingartner commented on issue #2598: CLOUDSTACK-10360: Change the method 
name.
URL: https://github.com/apache/cloudstack/pull/2598#issuecomment-385167494
 
 
   I would say that Travis and Jenkins validation are enough for this kind of 
PR. Of course, we still need reviews.
   
   @BruceKuiLiu your initiative is good. I have seen @DaanHoogland comments in 
your PRs, and he has some good points. Please, do not take them personally. It 
is natural to have different opinion/views and they are essential to create 
discussion and really achieve improvements and code quality.


This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


> Inconsistent method name
> 
>
> Key: CLOUDSTACK-10360
> URL: https://issues.apache.org/jira/browse/CLOUDSTACK-10360
> Project: CloudStack
>  Issue Type: Improvement
>  Security Level: Public(Anyone can view this level - this is the 
> default.) 
>Reporter: KuiLIU
>Priority: Major
>
> The following method is named as "scoped" that seems to whether the variable 
> config is scoped in _scopedStorages or not.
> Actually, the method tries to find a storage of which scope equals to the 
> scope of config.
> So that, the method name "findStorage" should be more clear than "scoped".
> {code:java}
> public ScopedConfigStorage scoped(ConfigKey config) {
> for (ScopedConfigStorage storage : _scopedStorages) {
> if (storage.getScope() == config.scope()) {
> return storage;
> }
> }
> throw new CloudRuntimeException("Unable to find config storage for 
> this scope: " + config.scope() + " for " + config.key());
> }
> {code}



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Commented] (CLOUDSTACK-10360) Inconsistent method name

2018-04-28 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/CLOUDSTACK-10360?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16457503#comment-16457503
 ] 

ASF GitHub Bot commented on CLOUDSTACK-10360:
-

DaanHoogland commented on issue #2598: CLOUDSTACK-10360: Change the method name.
URL: https://github.com/apache/cloudstack/pull/2598#issuecomment-385161225
 
 
   @rhtyd @rafaelweingartner @wido @mike-tutkowski @anyone, do we need testing 
on this change?


This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


> Inconsistent method name
> 
>
> Key: CLOUDSTACK-10360
> URL: https://issues.apache.org/jira/browse/CLOUDSTACK-10360
> Project: CloudStack
>  Issue Type: Improvement
>  Security Level: Public(Anyone can view this level - this is the 
> default.) 
>Reporter: KuiLIU
>Priority: Major
>
> The following method is named as "scoped" that seems to whether the variable 
> config is scoped in _scopedStorages or not.
> Actually, the method tries to find a storage of which scope equals to the 
> scope of config.
> So that, the method name "findStorage" should be more clear than "scoped".
> {code:java}
> public ScopedConfigStorage scoped(ConfigKey config) {
> for (ScopedConfigStorage storage : _scopedStorages) {
> if (storage.getScope() == config.scope()) {
> return storage;
> }
> }
> throw new CloudRuntimeException("Unable to find config storage for 
> this scope: " + config.scope() + " for " + config.key());
> }
> {code}



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Commented] (CLOUDSTACK-10360) Inconsistent method name

2018-04-28 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/CLOUDSTACK-10360?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16457502#comment-16457502
 ] 

ASF GitHub Bot commented on CLOUDSTACK-10360:
-

DaanHoogland commented on issue #2598: CLOUDSTACK-10360: Change the method name.
URL: https://github.com/apache/cloudstack/pull/2598#issuecomment-385160812
 
 
   I like your take on readable code @BruceKuiLiu though I didn't agree with 
all your PRs so far, please keep it up


This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


> Inconsistent method name
> 
>
> Key: CLOUDSTACK-10360
> URL: https://issues.apache.org/jira/browse/CLOUDSTACK-10360
> Project: CloudStack
>  Issue Type: Improvement
>  Security Level: Public(Anyone can view this level - this is the 
> default.) 
>Reporter: KuiLIU
>Priority: Major
>
> The following method is named as "scoped" that seems to whether the variable 
> config is scoped in _scopedStorages or not.
> Actually, the method tries to find a storage of which scope equals to the 
> scope of config.
> So that, the method name "findStorage" should be more clear than "scoped".
> {code:java}
> public ScopedConfigStorage scoped(ConfigKey config) {
> for (ScopedConfigStorage storage : _scopedStorages) {
> if (storage.getScope() == config.scope()) {
> return storage;
> }
> }
> throw new CloudRuntimeException("Unable to find config storage for 
> this scope: " + config.scope() + " for " + config.key());
> }
> {code}



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Commented] (CLOUDSTACK-10360) Inconsistent method name

2018-04-28 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/CLOUDSTACK-10360?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16457501#comment-16457501
 ] 

ASF GitHub Bot commented on CLOUDSTACK-10360:
-

DaanHoogland commented on issue #2598: CLOUDSTACK-10360: Change the method name.
URL: https://github.com/apache/cloudstack/pull/2598#issuecomment-385160812
 
 
   I like your take on radable code @BruceKuiLiu though I didn't agree with all 
your PRs so far, please keep it up


This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


> Inconsistent method name
> 
>
> Key: CLOUDSTACK-10360
> URL: https://issues.apache.org/jira/browse/CLOUDSTACK-10360
> Project: CloudStack
>  Issue Type: Improvement
>  Security Level: Public(Anyone can view this level - this is the 
> default.) 
>Reporter: KuiLIU
>Priority: Major
>
> The following method is named as "scoped" that seems to whether the variable 
> config is scoped in _scopedStorages or not.
> Actually, the method tries to find a storage of which scope equals to the 
> scope of config.
> So that, the method name "findStorage" should be more clear than "scoped".
> {code:java}
> public ScopedConfigStorage scoped(ConfigKey config) {
> for (ScopedConfigStorage storage : _scopedStorages) {
> if (storage.getScope() == config.scope()) {
> return storage;
> }
> }
> throw new CloudRuntimeException("Unable to find config storage for 
> this scope: " + config.scope() + " for " + config.key());
> }
> {code}



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Commented] (CLOUDSTACK-10360) Inconsistent method name

2018-04-24 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/CLOUDSTACK-10360?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16449688#comment-16449688
 ] 

ASF GitHub Bot commented on CLOUDSTACK-10360:
-

BruceKuiLiu commented on a change in pull request #2598: CLOUDSTACK-10360: 
Change the method name.
URL: https://github.com/apache/cloudstack/pull/2598#discussion_r183698884
 
 

 ##
 File path: 
framework/config/src/main/java/org/apache/cloudstack/framework/config/impl/ConfigDepotImpl.java
 ##
 @@ -166,7 +166,7 @@ public ConfigurationDao global() {
 return _configDao;
 }
 
-public ScopedConfigStorage scoped(ConfigKey config) {
+public ScopedConfigStorage findStorage(ConfigKey config) {
 
 Review comment:
   Thanks, "findScopedConfigStorage" is more clear.


This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


> Inconsistent method name
> 
>
> Key: CLOUDSTACK-10360
> URL: https://issues.apache.org/jira/browse/CLOUDSTACK-10360
> Project: CloudStack
>  Issue Type: Improvement
>  Security Level: Public(Anyone can view this level - this is the 
> default.) 
>Reporter: KuiLIU
>Priority: Major
>
> The following method is named as "scoped" that seems to whether the variable 
> config is scoped in _scopedStorages or not.
> Actually, the method tries to find a storage of which scope equals to the 
> scope of config.
> So that, the method name "findStorage" should be more clear than "scoped".
> {code:java}
> public ScopedConfigStorage scoped(ConfigKey config) {
> for (ScopedConfigStorage storage : _scopedStorages) {
> if (storage.getScope() == config.scope()) {
> return storage;
> }
> }
> throw new CloudRuntimeException("Unable to find config storage for 
> this scope: " + config.scope() + " for " + config.key());
> }
> {code}



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Commented] (CLOUDSTACK-10360) Inconsistent method name

2018-04-24 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/CLOUDSTACK-10360?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16449578#comment-16449578
 ] 

ASF GitHub Bot commented on CLOUDSTACK-10360:
-

rafaelweingartner commented on a change in pull request #2598: 
CLOUDSTACK-10360: Change the method name.
URL: https://github.com/apache/cloudstack/pull/2598#discussion_r183675863
 
 

 ##
 File path: 
framework/config/src/main/java/org/apache/cloudstack/framework/config/impl/ConfigDepotImpl.java
 ##
 @@ -166,7 +166,7 @@ public ConfigurationDao global() {
 return _configDao;
 }
 
-public ScopedConfigStorage scoped(ConfigKey config) {
+public ScopedConfigStorage findStorage(ConfigKey config) {
 
 Review comment:
   I would use something like `findScopedConfigStorage`. This `findStorage` can 
be confused with find storage pool.


This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


> Inconsistent method name
> 
>
> Key: CLOUDSTACK-10360
> URL: https://issues.apache.org/jira/browse/CLOUDSTACK-10360
> Project: CloudStack
>  Issue Type: Improvement
>  Security Level: Public(Anyone can view this level - this is the 
> default.) 
>Reporter: KuiLIU
>Priority: Major
>
> The following method is named as "scoped" that seems to whether the variable 
> config is scoped in _scopedStorages or not.
> Actually, the method tries to find a storage of which scope equals to the 
> scope of config.
> So that, the method name "findStorage" should be more clear than "scoped".
> {code:java}
> public ScopedConfigStorage scoped(ConfigKey config) {
> for (ScopedConfigStorage storage : _scopedStorages) {
> if (storage.getScope() == config.scope()) {
> return storage;
> }
> }
> throw new CloudRuntimeException("Unable to find config storage for 
> this scope: " + config.scope() + " for " + config.key());
> }
> {code}



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Commented] (CLOUDSTACK-10360) Inconsistent method name

2018-04-24 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/CLOUDSTACK-10360?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16449455#comment-16449455
 ] 

ASF GitHub Bot commented on CLOUDSTACK-10360:
-

BruceKuiLiu opened a new pull request #2598: CLOUDSTACK-10360: Change the 
method name.
URL: https://github.com/apache/cloudstack/pull/2598
 
 
   The method is named as "scoped" that seems to whether the variable config is 
scoped in _scopedStorages or not.
   Actually, the method tries to find a storage of which scope equals to the 
scope of config.
   So that, the method name "findStorage" should be more clear than "scoped".
   


This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


> Inconsistent method name
> 
>
> Key: CLOUDSTACK-10360
> URL: https://issues.apache.org/jira/browse/CLOUDSTACK-10360
> Project: CloudStack
>  Issue Type: Improvement
>  Security Level: Public(Anyone can view this level - this is the 
> default.) 
>Reporter: KuiLIU
>Priority: Major
>
> The following method is named as "scoped" that seems to whether the variable 
> config is scoped in _scopedStorages or not.
> Actually, the method tries to find a storage of which scope equals to the 
> scope of config.
> So that, the method name "findStorage" should be more clear than "scoped".
> {code:java}
> public ScopedConfigStorage scoped(ConfigKey config) {
> for (ScopedConfigStorage storage : _scopedStorages) {
> if (storage.getScope() == config.scope()) {
> return storage;
> }
> }
> throw new CloudRuntimeException("Unable to find config storage for 
> this scope: " + config.scope() + " for " + config.key());
> }
> {code}



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)