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/10/19 08:59:10 UTC

[GitHub] [cloudstack] davidjumani opened a new pull request #4412: Validating type parameter and including all types

davidjumani opened a new pull request #4412:
URL: https://github.com/apache/cloudstack/pull/4412


   ## Description
   Validating the `type` parameter for the listNetworks API.
   Also allowing all type to be passed
   
   ## Types of changes
   <!--- What types of changes does your code introduce? Put an `x` in all the boxes that apply: -->
   - [ ] Breaking change (fix or feature that would cause existing functionality to change)
   - [ ] New feature (non-breaking change which adds functionality)
   - [ ] Bug fix (non-breaking change which fixes an issue)
   - [x] Enhancement (improves an existing feature and functionality)
   - [ ] Cleanup (Code refactoring and cleanup, that may add test cases)
   
   ## How Has This Been Tested?
   ```
   (localhost) 🐱 > list networks type=usolated
   🙈 Error: (HTTP 431, error code 4350) Unexpected Guest type : usolated
   list networks type=all
   
   (localhost) 🐱 > list networks type=all filter=name
   {
   ............
   }
   ```


----------------------------------------------------------------
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



[GitHub] [cloudstack] davidjumani commented on pull request #4412: Validating type parameter and including all types

Posted by GitBox <gi...@apache.org>.
davidjumani commented on pull request #4412:
URL: https://github.com/apache/cloudstack/pull/4412#issuecomment-711884265


   @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



[GitHub] [cloudstack] DaanHoogland merged pull request #4412: Validating type parameter and including all types

Posted by GitBox <gi...@apache.org>.
DaanHoogland merged pull request #4412:
URL: https://github.com/apache/cloudstack/pull/4412


   


----------------------------------------------------------------
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



[GitHub] [cloudstack] blueorangutan commented on pull request #4412: Validating type parameter and including all types

Posted by GitBox <gi...@apache.org>.
blueorangutan commented on pull request #4412:
URL: https://github.com/apache/cloudstack/pull/4412#issuecomment-711885578


   @davidjumani 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



[GitHub] [cloudstack] blueorangutan commented on pull request #4412: Validating type parameter and including all types

Posted by GitBox <gi...@apache.org>.
blueorangutan commented on pull request #4412:
URL: https://github.com/apache/cloudstack/pull/4412#issuecomment-713200699


   <b>Trillian test result (tid-3024)</b>
   Environment: kvm-centos7 (x2), Advanced Networking with Mgmt server 7
   Total time taken: 32269 seconds
   Marvin logs: https://github.com/blueorangutan/acs-prs/releases/download/trillian/pr4412-t3024-kvm-centos7.zip
   Intermittent failure detected: /marvin/tests/smoke/test_ssvm.py
   Intermittent failure detected: /marvin/tests/smoke/test_hostha_kvm.py
   Smoke tests completed. 83 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



[GitHub] [cloudstack] DaanHoogland commented on pull request #4412: Validating type parameter and including all types

Posted by GitBox <gi...@apache.org>.
DaanHoogland commented on pull request #4412:
URL: https://github.com/apache/cloudstack/pull/4412#issuecomment-712829463


   I'm fine with leaving it there


----------------------------------------------------------------
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



[GitHub] [cloudstack] davidjumani commented on a change in pull request #4412: Validating type parameter and including all types

Posted by GitBox <gi...@apache.org>.
davidjumani commented on a change in pull request #4412:
URL: https://github.com/apache/cloudstack/pull/4412#discussion_r507595743



##########
File path: api/src/main/java/org/apache/cloudstack/api/command/user/network/ListNetworksCmd.java
##########
@@ -101,7 +102,13 @@ public Long getZoneId() {
     }
 
     public String getGuestIpType() {
-        return guestIpType;
+        if (!Strings.isNullOrEmpty(guestIpType)) {
+            if (guestIpType.equalsIgnoreCase("all")) {
+                return null;
+            }
+            return Network.GuestType.fromValue(guestIpType).toString();
+        }
+        return null;

Review comment:
       that's right!




----------------------------------------------------------------
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



[GitHub] [cloudstack] davidjumani commented on pull request #4412: Validating type parameter and including all types

Posted by GitBox <gi...@apache.org>.
davidjumani commented on pull request #4412:
URL: https://github.com/apache/cloudstack/pull/4412#issuecomment-712788881


   @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



[GitHub] [cloudstack] blueorangutan commented on pull request #4412: Validating type parameter and including all types

Posted by GitBox <gi...@apache.org>.
blueorangutan commented on pull request #4412:
URL: https://github.com/apache/cloudstack/pull/4412#issuecomment-712789324


   @davidjumani 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



[GitHub] [cloudstack] blueorangutan commented on pull request #4412: Validating type parameter and including all types

Posted by GitBox <gi...@apache.org>.
blueorangutan commented on pull request #4412:
URL: https://github.com/apache/cloudstack/pull/4412#issuecomment-711916501


   Packaging result: ✔centos7 ✖centos8 ✔debian. JID-2205


----------------------------------------------------------------
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



[GitHub] [cloudstack] DaanHoogland commented on a change in pull request #4412: Validating type parameter and including all types

Posted by GitBox <gi...@apache.org>.
DaanHoogland commented on a change in pull request #4412:
URL: https://github.com/apache/cloudstack/pull/4412#discussion_r507594548



##########
File path: api/src/main/java/org/apache/cloudstack/api/command/user/network/ListNetworksCmd.java
##########
@@ -101,7 +102,13 @@ public Long getZoneId() {
     }
 
     public String getGuestIpType() {
-        return guestIpType;
+        if (!Strings.isNullOrEmpty(guestIpType)) {
+            if (guestIpType.equalsIgnoreCase("all")) {
+                return null;
+            }
+            return Network.GuestType.fromValue(guestIpType).toString();
+        }
+        return null;

Review comment:
       so in the end empty and "all" are treated the same?




----------------------------------------------------------------
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



[GitHub] [cloudstack] davidjumani commented on pull request #4412: Validating type parameter and including all types

Posted by GitBox <gi...@apache.org>.
davidjumani commented on pull request #4412:
URL: https://github.com/apache/cloudstack/pull/4412#issuecomment-712827451


   I think that all should be there as a filter. Will be useful in Primate to simplify the existing code once merged


----------------------------------------------------------------
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