Skip to content

Network Offering: Allow enabling network and vpc offering during creation#4564

Merged
DaanHoogland merged 2 commits into
apache:masterfrom
shapeblue:enable-offering
Feb 13, 2021
Merged

Network Offering: Allow enabling network and vpc offering during creation#4564
DaanHoogland merged 2 commits into
apache:masterfrom
shapeblue:enable-offering

Conversation

@Pearl1594

Copy link
Copy Markdown
Contributor

Description

This PR allows one to enable network offering during creation

Types of changes

  • 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)
  • Enhancement (improves an existing feature and functionality)
  • Cleanup (Code refactoring and cleanup, that may add test cases)

Feature/Enhancement Scale or Bug Severity

Feature/Enhancement Scale

  • Major
  • Minor

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

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

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

same as above comment for NetworkOfferingVO. Set it while creating VO itself.

@DaanHoogland DaanHoogland added this to the 4.16.0.0 milestone Jan 4, 2021

@DaanHoogland DaanHoogland left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

@harikrishna-patnala harikrishna-patnala left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@shwstppr

shwstppr commented Feb 9, 2021

Copy link
Copy Markdown
Contributor

@blueorangutan package

@blueorangutan

Copy link
Copy Markdown

@shwstppr a Jenkins job has been kicked to build packages. I'll keep you posted as I make progress.

@blueorangutan

Copy link
Copy Markdown

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

@Pearl1594

Copy link
Copy Markdown
Contributor Author

@blueorangutan package

@blueorangutan

Copy link
Copy Markdown

@Pearl1594 a Jenkins job has been kicked to build packages. I'll keep you posted as I make progress.

@blueorangutan

Copy link
Copy Markdown

Packaging result: ✔centos7 ✔centos8 ✔debian. JID-2677

@DaanHoogland

Copy link
Copy Markdown
Contributor

@blueorangutan test

@blueorangutan

Copy link
Copy Markdown

@DaanHoogland a Trillian-Jenkins test job (centos7 mgmt + kvm-centos7) has been kicked to run smoke tests

@blueorangutan

Copy link
Copy Markdown

Trillian test result (tid-3533)
Environment: kvm-centos7 (x2), Advanced Networking with Mgmt server 7
Total time taken: 33048 seconds
Marvin logs: https://github.com/blueorangutan/acs-prs/releases/download/trillian/pr4564-t3533-kvm-centos7.zip
Smoke tests completed. 86 look OK, 0 have error(s)
Only failed tests results shown below:

Test Result Time (s) Test File

@DaanHoogland DaanHoogland merged commit b6fe9f9 into apache:master Feb 13, 2021
@DaanHoogland DaanHoogland deleted the enable-offering branch February 13, 2021 10:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants