rhtyd opened a new pull request #3235: network: allow ability to specify if 
network's ipaddress usage need to be hidden
URL: https://github.com/apache/cloudstack/pull/3235
 
 
   Problem: Admins don’t want to charge for IP address usage on certain 
(shared) networks.
   Root Cause: There is no flag or detail for admins to provide using UI or API 
when creating networks to specify
   if they want IP address usage of the network hidden.
   Solution: A new boolean hideipaddressusage flag is added to the 
createNetwork API and a checkbox in the
   ‘Add guest network’ UI for the root admins to specify if they want the 
(shared) network’s IP address usage to
   be hidden in the listUsageRecords API response. The provided flag is saved 
as the ‘hideIpAddressUsage’
   detail in the cloud.network_details table for the network. For existing 
(shared) networks, root admins can
   also specify the same boolean API parameter hideipaddressusage with the 
updateNetwork API request to
   configure the behaviour for an existing network. When the detail/flag is 
true, the IP address usage for the
   (shared) network is not exported in the listUsageRecords API response. The 
listNetworks API response will
   include the details of a network for root admin only. (note usage is still 
recorded in the usage database but
   not return by the listUsageRecords API)
   
   ## 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)
   - [x] New feature (non-breaking change which adds functionality)
   - [ ] 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)
   
   This adds a new API arg only accessible to admins to specify if they
   want the network's ip address usage hidden. This then saves this setting
   in the network_details table for a network, and the listUsageRecords
   API response creator checks for an IP address if it needs to be exported
   or skipped/hidden.
   
   The setting is available only to root admin via the listNetworks API 
response (details key).
   Root admin can also update existing networks by using updateNetwork API and 
passing `hideipaddressusage=true|false`
   
   UI screenshot, that adds this checkbox only for admins creating a shared 
network:
   ![screenshot from 2019-01-17 
17-11-39](https://user-images.githubusercontent.com/95203/51316923-21645080-1a7c-11e9-8c78-9769aa84b7c1.png)
   
   **note: it's possible for all other kinds of networks to have their ip 
address usages skipped as well, available via the API.
   

----------------------------------------------------------------
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:
[email protected]


With regards,
Apache Git Services

Reply via email to