GutoVeronezi opened a new pull request, #12184:
URL: https://github.com/apache/cloudstack/pull/12184

   ### Description
   
   While deleting a traffic type, ACS checks whether there are any networks 
associated with it. However, if we have several physical networks containing a 
traffic type, ACS does not filter the physical network to do the validation. 
For instance, if we have two (2) physical networks containing the traffic type 
`Guest`, the first one having networks related to it, and the second not having 
networks related to it, if we try to remove the traffic type `Guest` from the 
second physical network, ACS give us the message `The Traffic Type is not 
deletable because there are existing networks with this traffic type:Guest`.
   
   The API `deleteTrafficType` was designed to filter the physical network 
where the traffic type is, however, the filtering is not applied correctly. 
This PR intends to fix this typo to honor the API behavior. This bug was fixed 
once with #6510; however, it was reintroduced with #6781. 
   
   ### 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)
   
   ### Feature/Enhancement Scale or Bug Severity
   
   #### Bug Severity
   
   - [ ] BLOCKER
   - [ ] Critical
   - [ ] Major
   - [x] Minor
   - [ ] Trivial
   
   
   ### How Has This Been Tested?
   
   To test the fix, I executed the following steps on an advanced zone:
   
   - create 2 physical networks (`A` and `B`);
   - add the `Guest` traffic type in physical network `A`;
   - create a network and a VM on the network;
   - add the `Guest` traffic type in physical network `B`.
   
   Without the changes, I tried to remove the `Guest` traffic type from 
physical networks `A` and `B`; for both, ACS returned the error message `The 
Traffic Type is not deletable because there are existing networks with this 
traffic type:Guest`. 
   
   Without the changes, I tried to remove the `Guest` traffic type from 
physical networks `A` and `B`; for `A`, ACS returned the error message `The 
Traffic Type is not deletable because there are existing networks with this 
traffic type:Guest`; for `B`, it was removed correctly. 
   


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

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to