You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cloudstack.apache.org by GitBox <gi...@apache.org> on 2020/01/27 08:30:15 UTC

[GitHub] [cloudstack] davidjumani opened a new pull request #3840: Fix listing management server by parameters

davidjumani opened a new pull request #3840: Fix listing management server by parameters
URL: https://github.com/apache/cloudstack/pull/3840
 
 
   ## Description
   The List Management Server api returns a list of all the management servers but fails when trying to list by id or name. This ensures that it fetches the details as per the parameters passed.
   "Fixes: #3833"
   
   ## Types of changes
   - [ ] Breaking change (fix or feature that would cause existing functionality to change)
   - [ ] New feature (non-breaking change which adds functionality)
   - [x] Bug fix (non-breaking change which fixes an issue)
   - [ ] Enhancement (improves an existing feature and functionality)
   - [ ] Cleanup (Code refactoring and cleanup, that may add test cases)
   
   ## How Has This Been Tested?
   Verified by testing the api with and without parameters
   
   <!-- Please read the [CONTRIBUTING](https://github.com/apache/cloudstack/blob/master/CONTRIBUTING.md) document -->
   

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


With regards,
Apache Git Services

[GitHub] [cloudstack] blueorangutan commented on issue #3840: Fix listing management server by parameters

Posted by GitBox <gi...@apache.org>.
blueorangutan commented on issue #3840: Fix listing management server by parameters
URL: https://github.com/apache/cloudstack/pull/3840#issuecomment-579678151
 
 
   @rhtyd a Trillian-Jenkins test job (centos7 mgmt + kvm-centos7) has been kicked to run smoke tests

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


With regards,
Apache Git Services

[GitHub] [cloudstack] rhtyd removed a comment on issue #3840: Fix listing management server by parameters

Posted by GitBox <gi...@apache.org>.
rhtyd removed a comment on issue #3840: Fix listing management server by parameters
URL: https://github.com/apache/cloudstack/pull/3840#issuecomment-579678056
 
 
   @blueorangutan test
   
   

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


With regards,
Apache Git Services

[GitHub] [cloudstack] rhtyd removed a comment on issue #3840: Fix listing management server by parameters

Posted by GitBox <gi...@apache.org>.
rhtyd removed a comment on issue #3840: Fix listing management server by parameters
URL: https://github.com/apache/cloudstack/pull/3840#issuecomment-579092153
 
 
   @blueorangutan test

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


With regards,
Apache Git Services

[GitHub] [cloudstack] blueorangutan commented on issue #3840: Fix listing management server by parameters

Posted by GitBox <gi...@apache.org>.
blueorangutan commented on issue #3840: Fix listing management server by parameters
URL: https://github.com/apache/cloudstack/pull/3840#issuecomment-579981941
 
 
   <b>Trillian test result (tid-835)</b>
   Environment: kvm-centos7 (x2), Advanced Networking with Mgmt server 7
   Total time taken: 41805 seconds
   Marvin logs: https://github.com/blueorangutan/acs-prs/releases/download/trillian/pr3840-t835-kvm-centos7.zip
   Intermittent failure detected: /marvin/tests/smoke/test_privategw_acl.py
   Intermittent failure detected: /marvin/tests/smoke/test_vpc_redundant.py
   Smoke tests completed. 77 look OK, 0 have error(s)
   Only failed tests results shown below:
   
   
   Test | Result | Time (s) | Test File
   --- | --- | --- | ---
   

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


With regards,
Apache Git Services

[GitHub] [cloudstack] rhtyd removed a comment on issue #3840: Fix listing management server by parameters

Posted by GitBox <gi...@apache.org>.
rhtyd removed a comment on issue #3840: Fix listing management server by parameters
URL: https://github.com/apache/cloudstack/pull/3840#issuecomment-578670633
 
 
   @blueorangutan package

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


With regards,
Apache Git Services

[GitHub] [cloudstack] blueorangutan commented on issue #3840: Fix listing management server by parameters

Posted by GitBox <gi...@apache.org>.
blueorangutan commented on issue #3840: Fix listing management server by parameters
URL: https://github.com/apache/cloudstack/pull/3840#issuecomment-579092244
 
 
   @rhtyd a Trillian-Jenkins test job (centos7 mgmt + kvm-centos7) has been kicked to run smoke tests

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


With regards,
Apache Git Services

[GitHub] [cloudstack] blueorangutan commented on issue #3840: Fix listing management server by parameters

Posted by GitBox <gi...@apache.org>.
blueorangutan commented on issue #3840: Fix listing management server by parameters
URL: https://github.com/apache/cloudstack/pull/3840#issuecomment-578679570
 
 
   Packaging result: ✔centos6 ✔centos7 ✔debian. JID-659

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


With regards,
Apache Git Services

[GitHub] [cloudstack] blueorangutan commented on issue #3840: Fix listing management server by parameters

Posted by GitBox <gi...@apache.org>.
blueorangutan commented on issue #3840: Fix listing management server by parameters
URL: https://github.com/apache/cloudstack/pull/3840#issuecomment-578670899
 
 
   @rhtyd a Jenkins job has been kicked to build packages. I'll keep you posted as I make progress.

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


With regards,
Apache Git Services

[GitHub] [cloudstack] rhtyd commented on issue #3840: Fix listing management server by parameters

Posted by GitBox <gi...@apache.org>.
rhtyd commented on issue #3840: Fix listing management server by parameters
URL: https://github.com/apache/cloudstack/pull/3840#issuecomment-579678056
 
 
   @blueorangutan test
   
   

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


With regards,
Apache Git Services

[GitHub] [cloudstack] blueorangutan removed a comment on issue #3840: Fix listing management server by parameters

Posted by GitBox <gi...@apache.org>.
blueorangutan removed a comment on issue #3840: Fix listing management server by parameters
URL: https://github.com/apache/cloudstack/pull/3840#issuecomment-579092244
 
 
   @rhtyd a Trillian-Jenkins test job (centos7 mgmt + kvm-centos7) has been kicked to run smoke tests

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


With regards,
Apache Git Services

[GitHub] [cloudstack] blueorangutan removed a comment on issue #3840: Fix listing management server by parameters

Posted by GitBox <gi...@apache.org>.
blueorangutan removed a comment on issue #3840: Fix listing management server by parameters
URL: https://github.com/apache/cloudstack/pull/3840#issuecomment-579678151
 
 
   @rhtyd a Trillian-Jenkins test job (centos7 mgmt + kvm-centos7) has been kicked to run smoke tests

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


With regards,
Apache Git Services

[GitHub] [cloudstack] rhtyd merged pull request #3840: Fix listing management server by parameters

Posted by GitBox <gi...@apache.org>.
rhtyd merged pull request #3840: Fix listing management server by parameters
URL: https://github.com/apache/cloudstack/pull/3840
 
 
   

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


With regards,
Apache Git Services

[GitHub] [cloudstack] rhtyd commented on issue #3840: Fix listing management server by parameters

Posted by GitBox <gi...@apache.org>.
rhtyd commented on issue #3840: Fix listing management server by parameters
URL: https://github.com/apache/cloudstack/pull/3840#issuecomment-579712798
 
 
   @blueorangutan help

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


With regards,
Apache Git Services

[GitHub] [cloudstack] blueorangutan removed a comment on issue #3840: Fix listing management server by parameters

Posted by GitBox <gi...@apache.org>.
blueorangutan removed a comment on issue #3840: Fix listing management server by parameters
URL: https://github.com/apache/cloudstack/pull/3840#issuecomment-578670899
 
 
   @rhtyd a Jenkins job has been kicked to build packages. I'll keep you posted as I make progress.

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


With regards,
Apache Git Services

[GitHub] [cloudstack] rhtyd removed a comment on issue #3840: Fix listing management server by parameters

Posted by GitBox <gi...@apache.org>.
rhtyd removed a comment on issue #3840: Fix listing management server by parameters
URL: https://github.com/apache/cloudstack/pull/3840#issuecomment-579712798
 
 
   @blueorangutan help

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


With regards,
Apache Git Services

[GitHub] [cloudstack] rhtyd commented on issue #3840: Fix listing management server by parameters

Posted by GitBox <gi...@apache.org>.
rhtyd commented on issue #3840: Fix listing management server by parameters
URL: https://github.com/apache/cloudstack/pull/3840#issuecomment-579092153
 
 
   @blueorangutan test

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


With regards,
Apache Git Services

[GitHub] [cloudstack] shwstppr commented on issue #3840: Fix listing management server by parameters

Posted by GitBox <gi...@apache.org>.
shwstppr commented on issue #3840: Fix listing management server by parameters
URL: https://github.com/apache/cloudstack/pull/3840#issuecomment-578701509
 
 
   LGTM based on code changes

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


With regards,
Apache Git Services

[GitHub] [cloudstack] rhtyd closed pull request #3840: Fix listing management server by parameters

Posted by GitBox <gi...@apache.org>.
rhtyd closed pull request #3840: Fix listing management server by parameters
URL: https://github.com/apache/cloudstack/pull/3840
 
 
   

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


With regards,
Apache Git Services

[GitHub] [cloudstack] blueorangutan commented on issue #3840: Fix listing management server by parameters

Posted by GitBox <gi...@apache.org>.
blueorangutan commented on issue #3840: Fix listing management server by parameters
URL: https://github.com/apache/cloudstack/pull/3840#issuecomment-579712839
 
 
   @rhtyd I understand these words: "help", "hello", "thanks", "package", "test"
   Test command usage: test [mgmt os] [hypervisor] [additional tests]
   Mgmt OS options: ['centos6', 'centos7', 'ubuntu']
   Hypervisor options: ['kvm-centos6', 'kvm-centos7', 'kvm-ubuntu', 'xenserver-71', 'xenserver-65sp1', 'xenserver-62sp1', 'vmware-65u2', 'vmware-60u2', 'vmware-55u3', 'vmware-51u1', 'vmware-50u1']
   Additional tests: list of space separated tests with paths relative to the `test/integration` directory, for example: component/test_acl_listvm.py component/test_volumes.py
   Note: when additional tests are passed, you need to specify mgmt server os and hypervisor or use the `matrix` command.
   
   Blessed contributors for kicking Trillian test jobs: ['rhtyd', 'nvazquez', 'PaulAngus', 'borisstoyanov', 'DaanHoogland', 'shwstppr', 'andrijapanicsb', 'Spaceman1984', 'Pearl1594', 'davidjumani']

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


With regards,
Apache Git Services

[GitHub] [cloudstack] rhtyd commented on a change in pull request #3840: Fix listing management server by parameters

Posted by GitBox <gi...@apache.org>.
rhtyd commented on a change in pull request #3840: Fix listing management server by parameters
URL: https://github.com/apache/cloudstack/pull/3840#discussion_r372743279
 
 

 ##########
 File path: server/src/main/java/com/cloud/api/query/QueryManagerImpl.java
 ##########
 @@ -3832,20 +3832,43 @@ protected ResourceDetailResponse createResourceDetailsResponse(ResourceDetail re
     @Override
     public ListResponse<ManagementServerResponse> listManagementServers(ListMgmtsCmd cmd) {
         ListResponse<ManagementServerResponse> response = new ListResponse<>();
-        List<ManagementServerResponse> result = new ArrayList<>();
-        for (ManagementServerHostVO mgmt : managementServerHostDao.listAll()) {
-            ManagementServerResponse mgmtResponse = new ManagementServerResponse();
-            mgmtResponse.setId(mgmt.getUuid());
-            mgmtResponse.setName(mgmt.getName());
-            mgmtResponse.setState(mgmt.getState());
-            mgmtResponse.setVersion(mgmt.getVersion());
-            mgmtResponse.setObjectName("managementserver");
-            result.add(mgmtResponse);
-        }
-        response.setResponses(result);
+        Pair<List<ManagementServerHostVO>, Integer> result = listManagementServersInternal(cmd);
+        List<ManagementServerResponse> hostResponses = new ArrayList<>();
+
+        for(ManagementServerHostVO host : result.first()) {
 
 Review comment:
   Add space after for and ifs

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


With regards,
Apache Git Services

[GitHub] [cloudstack] blueorangutan removed a comment on issue #3840: Fix listing management server by parameters

Posted by GitBox <gi...@apache.org>.
blueorangutan removed a comment on issue #3840: Fix listing management server by parameters
URL: https://github.com/apache/cloudstack/pull/3840#issuecomment-578679570
 
 
   Packaging result: ✔centos6 ✔centos7 ✔debian. JID-659

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


With regards,
Apache Git Services

[GitHub] [cloudstack] davidjumani opened a new pull request #3840: Fix listing management server by parameters

Posted by GitBox <gi...@apache.org>.
davidjumani opened a new pull request #3840: Fix listing management server by parameters
URL: https://github.com/apache/cloudstack/pull/3840
 
 
   ## Description
   The List Management Server api returns a list of all the management servers but fails when trying to list by id or name. This ensures that it fetches the details as per the parameters passed.
   Fixes: #3833
   
   ## Types of changes
   - [ ] Breaking change (fix or feature that would cause existing functionality to change)
   - [ ] New feature (non-breaking change which adds functionality)
   - [x] Bug fix (non-breaking change which fixes an issue)
   - [ ] Enhancement (improves an existing feature and functionality)
   - [ ] Cleanup (Code refactoring and cleanup, that may add test cases)
   
   ## How Has This Been Tested?
   Verified by testing the api with and without parameters
   
   <!-- Please read the [CONTRIBUTING](https://github.com/apache/cloudstack/blob/master/CONTRIBUTING.md) document -->
   

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


With regards,
Apache Git Services

[GitHub] [cloudstack] rhtyd commented on issue #3840: Fix listing management server by parameters

Posted by GitBox <gi...@apache.org>.
rhtyd commented on issue #3840: Fix listing management server by parameters
URL: https://github.com/apache/cloudstack/pull/3840#issuecomment-578666843
 
 
   @davidjumani can you rebase against 4.13, as the issue asked for PR to be against 4.13 branch?

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


With regards,
Apache Git Services

[GitHub] [cloudstack] rhtyd commented on issue #3840: Fix listing management server by parameters

Posted by GitBox <gi...@apache.org>.
rhtyd commented on issue #3840: Fix listing management server by parameters
URL: https://github.com/apache/cloudstack/pull/3840#issuecomment-578670633
 
 
   @blueorangutan package

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


With regards,
Apache Git Services