Network Offering: Allow enabling network and vpc offering during creation#4564
Network Offering: Allow enabling network and vpc offering during creation#4564DaanHoogland merged 2 commits intoapache:masterfrom
Conversation
| final NetworkOffering offering = createNetworkOffering(name, displayText, trafficType, tags, specifyVlan, availability, networkRate, serviceProviderMap, false, guestType, false, | ||
| final NetworkOfferingVO offering = createNetworkOffering(name, displayText, trafficType, tags, specifyVlan, availability, networkRate, serviceProviderMap, false, guestType, false, | ||
| serviceOfferingId, conserveMode, serviceCapabilityMap, specifyIpRanges, isPersistent, details, egressDefaultPolicy, maxconn, enableKeepAlive, forVpc, domainIds, zoneIds); | ||
| if (enable) { |
There was a problem hiding this comment.
Instead of updating the offeringVO again, pass the value of "enable" to createNetworkOffering() method and use offeringFinal.setState() method to set it while creating the initial VO entry itself.
| serviceProviderList, serviceCapabilitystList, serviceOfferingId, | ||
| domainIds, zoneIds); | ||
|
|
||
| if (enable) { |
There was a problem hiding this comment.
same as above comment for NetworkOfferingVO. Set it while creating VO itself.
DaanHoogland
left a comment
There was a problem hiding this comment.
this code looks like an imrovement as well as a cleanup, however, for future consideration; the method createNetworkOffering(...) has a (way too) long parameterlist and we should think about introducing a parameter object with some reasonable default instantiation methods.
|
@blueorangutan package |
|
@shwstppr a Jenkins job has been kicked to build packages. I'll keep you posted as I make progress. |
|
Packaging result: ✔centos7 ✖centos8 ✖debian. JID-2661 |
|
@blueorangutan package |
|
@Pearl1594 a Jenkins job has been kicked to build packages. I'll keep you posted as I make progress. |
|
Packaging result: ✔centos7 ✔centos8 ✔debian. JID-2677 |
|
@blueorangutan test |
|
@DaanHoogland a Trillian-Jenkins test job (centos7 mgmt + kvm-centos7) has been kicked to run smoke tests |
|
Trillian test result (tid-3533)
|
Description
This PR allows one to enable network offering during creation
Types of changes
Feature/Enhancement Scale or Bug Severity
Feature/Enhancement Scale
Screenshots (if appropriate):
How Has This Been Tested?
Create a network offering specifying if it has to be enabled / not and create network using that offering - verify that the offering is available in the list of available offerings