Skip to content

api/utils/ui: List protocol numbers and icmp types#8293

Merged
weizhouapache merged 10 commits intoapache:mainfrom
weizhouapache:4.19-list-network-protocols
Feb 2, 2024
Merged

api/utils/ui: List protocol numbers and icmp types#8293
weizhouapache merged 10 commits intoapache:mainfrom
weizhouapache:4.19-list-network-protocols

Conversation

@weizhouapache
Copy link
Copy Markdown
Member

Description

This PR contains the following changes

  • adds a new API to list network procotols and details/types/codes, etc
  • get network protocols on UI and add dropdowns for procotol numbers and icmp types/codes
  • validate icmp types/codes when add network ACL
  • etc

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)
  • build/CI

Feature/Enhancement Scale or Bug Severity

Feature/Enhancement Scale

  • Major
  • Minor

Bug Severity

  • BLOCKER
  • Critical
  • Major
  • Minor
  • Trivial

Screenshots (if appropriate):

How Has This Been Tested?

How did you try to break this feature and the system with this change?

@weizhouapache
Copy link
Copy Markdown
Member Author

@blueorangutan package

@blueorangutan
Copy link
Copy Markdown

@weizhouapache a [SL] Jenkins job has been kicked to build packages. It will be bundled with KVM, XenServer and VMware SystemVM templates. I'll keep you posted as I make progress.

@codecov
Copy link
Copy Markdown

codecov bot commented Dec 1, 2023

Codecov Report

Attention: 101 lines in your changes are missing coverage. Please review.

Comparison is base (12dcf5c) 28.95% compared to head (d1b3ff9) 30.84%.
Report is 2 commits behind head on main.

Files Patch % Lines
ui/src/views/network/AclListRulesTab.vue 0.00% 28 Missing ⚠️
ui/src/views/network/EgressRulesTab.vue 0.00% 16 Missing ⚠️
ui/src/views/network/FirewallRules.vue 0.00% 16 Missing ⚠️
...i/src/views/network/IngressEgressRuleConfigure.vue 0.00% 16 Missing ⚠️
...oudstack/api/response/NetworkProtocolResponse.java 57.14% 9 Missing ⚠️
...oud/network/security/SecurityGroupManagerImpl.java 0.00% 8 Missing ⚠️
...ain/java/com/cloud/utils/net/NetworkProtocols.java 98.36% 1 Missing and 3 partials ⚠️
.../command/user/network/ListNetworkProtocolsCmd.java 93.93% 1 Missing and 1 partial ⚠️
...a/com/cloud/network/vpc/NetworkACLServiceImpl.java 0.00% 0 Missing and 1 partial ⚠️
...ls/src/main/java/com/cloud/utils/net/NetUtils.java 88.88% 0 Missing and 1 partial ⚠️
Additional details and impacted files
@@             Coverage Diff              @@
##               main    #8293      +/-   ##
============================================
+ Coverage     28.95%   30.84%   +1.88%     
- Complexity    31460    33916    +2456     
============================================
  Files          5329     5332       +3     
  Lines        373523   373901     +378     
  Branches      54315    54333      +18     
============================================
+ Hits         108163   115322    +7159     
+ Misses       250569   243400    -7169     
- Partials      14791    15179     +388     
Flag Coverage Δ
simulator-marvin-tests 24.78% <0.31%> (-0.03%) ⬇️
uitests 4.41% <0.00%> (-0.02%) ⬇️
unit-tests 16.45% <91.82%> (+1.61%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@weizhouapache
Copy link
Copy Markdown
Member Author

@blueorangutan package

@blueorangutan
Copy link
Copy Markdown

@weizhouapache a [SL] Jenkins job has been kicked to build packages. It will be bundled with KVM, XenServer and VMware SystemVM templates. I'll keep you posted as I make progress.

@blueorangutan
Copy link
Copy Markdown

Packaging result [SF]: ✔️ el7 ✔️ el8 ✔️ el9 ✔️ debian ✔️ suse15. SL-JID 7893

@weizhouapache
Copy link
Copy Markdown
Member Author

@blueorangutan test

@blueorangutan
Copy link
Copy Markdown

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

@blueorangutan
Copy link
Copy Markdown

[SF] Trillian test result (tid-8452)
Environment: kvm-centos7 (x2), Advanced Networking with Mgmt server 7
Total time taken: 58362 seconds
Marvin logs: https://github.com/blueorangutan/acs-prs/releases/download/trillian/pr8293-t8452-kvm-centos7.zip
Smoke tests completed. 119 look OK, 2 have errors, 0 did not run
Only failed and skipped tests results shown below:

Test Result Time (s) Test File
test_01_invalid_upgrade_kubernetes_cluster Failure 3617.86 test_kubernetes_clusters.py
test_02_upgrade_kubernetes_cluster Failure 3617.78 test_kubernetes_clusters.py
test_03_deploy_and_scale_kubernetes_cluster Failure 0.04 test_kubernetes_clusters.py
test_04_autoscale_kubernetes_cluster Failure 0.04 test_kubernetes_clusters.py
test_05_basic_lifecycle_kubernetes_cluster Failure 0.03 test_kubernetes_clusters.py
test_06_delete_kubernetes_cluster Failure 0.04 test_kubernetes_clusters.py
test_07_deploy_kubernetes_ha_cluster Failure 0.03 test_kubernetes_clusters.py
test_08_upgrade_kubernetes_ha_cluster Failure 0.04 test_kubernetes_clusters.py
test_09_delete_kubernetes_ha_cluster Failure 0.03 test_kubernetes_clusters.py
test_10_vpc_tier_kubernetes_cluster Failure 45.74 test_kubernetes_clusters.py
test_11_test_unmanaged_cluster_lifecycle Error 1.22 test_kubernetes_clusters.py
ContextSuite context=TestKubernetesCluster>:teardown Error 50.37 test_kubernetes_clusters.py
test_01_verify_ipv6_vpc Error 363.28 test_vpc_ipv6.py

@weizhouapache
Copy link
Copy Markdown
Member Author

@blueorangutan test

@blueorangutan
Copy link
Copy Markdown

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

@weizhouapache
Copy link
Copy Markdown
Member Author

@blueorangutan package

@blueorangutan
Copy link
Copy Markdown

@weizhouapache a [SL] Jenkins job has been kicked to build packages. It will be bundled with KVM, XenServer and VMware SystemVM templates. I'll keep you posted as I make progress.

@blueorangutan
Copy link
Copy Markdown

blueorangutan commented Dec 4, 2023

Packaging result [SF] ✔️ el7 ✔️ el8 ✔️ el9 ✔️ debian ✔️ suse15. SL-JID 7905

@DaanHoogland
Copy link
Copy Markdown
Contributor

@blueorangutan test

@blueorangutan
Copy link
Copy Markdown

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

@github-actions
Copy link
Copy Markdown

github-actions bot commented Dec 4, 2023

This pull request has merge conflicts. Dear author, please fix the conflicts and sync your branch with the base branch.

@weizhouapache
Copy link
Copy Markdown
Member Author

@blueorangutan package

@blueorangutan
Copy link
Copy Markdown

@weizhouapache a [SL] Jenkins job has been kicked to build packages. It will be bundled with KVM, XenServer and VMware SystemVM templates. I'll keep you posted as I make progress.

@blueorangutan
Copy link
Copy Markdown

[SF] Trillian test result (tid-8459)
Environment: kvm-centos7 (x2), Advanced Networking with Mgmt server 7
Total time taken: 54420 seconds
Marvin logs: https://github.com/blueorangutan/acs-prs/releases/download/trillian/pr8293-t8459-kvm-centos7.zip
Smoke tests completed. 120 look OK, 1 have errors, 0 did not run
Only failed and skipped tests results shown below:

Test Result Time (s) Test File
test_08_migrate_vm Error 0.07 test_vm_life_cycle.py

Copy link
Copy Markdown
Contributor

@DaanHoogland DaanHoogland left a comment

Choose a reason for hiding this comment

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

code looks good, did a small monkey test on both ui and API but might need more testing mainly in advancedsg zone

Comment thread utils/src/main/java/com/cloud/utils/net/NetworkProtocols.java Outdated
@weizhouapache
Copy link
Copy Markdown
Member Author

@blueorangutan package

@blueorangutan
Copy link
Copy Markdown

Packaging result [SF]: ✔️ el7 ✔️ el8 ✔️ el9 ✔️ debian ✔️ suse15. SL-JID 7949

@DaanHoogland
Copy link
Copy Markdown
Contributor

@blueorangutan test

@blueorangutan
Copy link
Copy Markdown

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

@blueorangutan
Copy link
Copy Markdown

[SF] Trillian test result (tid-8490)
Environment: kvm-centos7 (x2), Advanced Networking with Mgmt server 7
Total time taken: 45702 seconds
Marvin logs: https://github.com/blueorangutan/acs-prs/releases/download/trillian/pr8293-t8490-kvm-centos7.zip
Smoke tests completed. 120 look OK, 1 have errors, 0 did not run
Only failed and skipped tests results shown below:

Test Result Time (s) Test File
test_08_migrate_vm Error 0.06 test_vm_life_cycle.py

@weizhouapache weizhouapache force-pushed the 4.19-list-network-protocols branch from 80e8e20 to 18c8888 Compare December 11, 2023 08:42
@kiranchavala
Copy link
Copy Markdown
Member

@blueorangutan package

@blueorangutan
Copy link
Copy Markdown

@kiranchavala a [SL] Jenkins job has been kicked to build packages. It will be bundled with KVM, XenServer and VMware SystemVM templates. I'll keep you posted as I make progress.

@blueorangutan
Copy link
Copy Markdown

Packaging result [SF]: ✔️ el7 ✔️ el8 ✔️ el9 ✔️ debian ✔️ suse15. SL-JID 8043

Copy link
Copy Markdown
Member

@kiranchavala kiranchavala left a comment

Choose a reason for hiding this comment

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

LGTM, tested the feature manually, with Isolated networks (firewall rules) , VPC (network acl), and security group rules in advanced zone

The dropdowns ( protocols numbers, icmp type and icmp code ) in the UI is working fine

@weizhouapache
Copy link
Copy Markdown
Member Author

this has been tested by @kiranchavala and @alexandremattioli

@shwstppr
ready for merge to main after 4.19.0.0 release

@weizhouapache weizhouapache marked this pull request as ready for review January 10, 2024 07:41
Copy link
Copy Markdown
Contributor

@DaanHoogland DaanHoogland left a comment

Choose a reason for hiding this comment

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

clgtm

@weizhouapache
Copy link
Copy Markdown
Member Author

merging based on 2 approvals and manual testing.

@weizhouapache weizhouapache merged commit af8a582 into apache:main Feb 2, 2024
@weizhouapache weizhouapache deleted the 4.19-list-network-protocols branch February 2, 2024 15:02
dhslove pushed a commit to ablecloud-team/ablestack-cloud that referenced this pull request Feb 7, 2024
This PR contains the following changes

* adds a new API to list network procotols and details/types/codes, etc
* get network protocols on UI and add dropdowns for procotol numbers and icmp types/codes
* validate icmp types/codes when add network ACL
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.

4 participants