Use case
Administrator wants to be able to assign Vlan to an Isolated network. He also would like the Vlan to be assigned to the network for its entire lifecycle.
General Flow
1) Create a new network offering
Create a network offering with guestIpType=Isolated, specifyVlan=true, isPersistent=true
- specifyVlan=true means that the Admin has to specify the Vlan when he creates the network.
- isPersistent=true will ensure that the network created from this offering, will never be picked up by the Network Garbage Collection thread, and its Vlan will never be released.
Code changes:
- Have to remove the restriction in the code as currently specifyVlan=true is allowed for Shared Network Offerings only.
Create a new network
Create a network from the network offering created on the step #1. Define the Vlan when create the network.
Code changes:
- Vlan assignment to Isolated Networks part of code needs to be changed. At the moment vlan for the Guest Isolated network is randomly allocated from the Vnet range defined on the physical network object. When Admin defines the Vlan for the network, the Vlan should be managed outside of the CloudStack, therefore it should be outside of the Physical Network Vnet range. Basically we should follow the same logic as when we create Shared network with Vlan specified.
- UI: Only ROOT admin is aware of the Vlans in the system. So only he can create the Isolated network with the vlan defined. UI should handle it and don't display network offerings with "specifyVlan=true" when create a new Isolated network.
DB changes
No DB changes
UI changes
"Create network" dialog changes:
- Display network offering with specifyVlan=true as an option, only on Root Admin UI. To get this offerings with listNetworkOfferings API, add specifyVlan=true to the list of parameters.
- Add and display Vlan field when network offering with SpecifyVlan=true is selected.
Changes have to be done on the on following tabs:
- Networks tab
- VPC->Create new Tier tab
Limitations:
- You can't change the Vlan once it's assigned to the network. It will remain with it for the entire network life cycle.