You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cloudstack.apache.org by gi...@git.apache.org on 2017/05/31 04:33:21 UTC

[GitHub] jayapalu commented on a change in pull request #2126: CLOUDSTACK-9740 : Search for secondary IP of NIC that is attached to an instance is not working

jayapalu commented on a change in pull request #2126: CLOUDSTACK-9740 : Search for secondary IP of NIC that is attached to an instance is not working
URL: https://github.com/apache/cloudstack/pull/2126#discussion_r119269248
 
 

 ##########
 File path: api/src/org/apache/cloudstack/api/command/user/vm/ListNicsCmd.java
 ##########
 @@ -122,22 +123,44 @@ public static String getResultObjectName() {
     public void execute() throws ResourceUnavailableException, ResourceAllocationException, ConcurrentOperationException, InsufficientCapacityException {
 
         try {
-            List<? extends Nic> results = _networkService.listNics(this);
-            ListResponse<NicResponse> response = new ListResponse<NicResponse>();
-            List<NicResponse> resList = null;
-            if (results != null) {
-                resList = new ArrayList<NicResponse>(results.size());
-                for (Nic r : results) {
-                    NicResponse resp = _responseGenerator.createNicResponse(r);
-                    resp.setObjectName("nic");
-                    resList.add(resp);
+            if (this.getKeyword() != null && !this.getKeyword().isEmpty() && this.getNicId() != null) {
+                List<? extends NicSecondaryIp> results = _networkService.listSecondaryNics(this);
 
 Review comment:
   Change the method name listSecondaryNics.  Here method is not listing the secondary nics it is listing nic secondary ips. The method name some thing like listVmNicSecondaryIps
 
----------------------------------------------------------------
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:
users@infra.apache.org


With regards,
Apache Git Services