-
Notifications
You must be signed in to change notification settings - Fork 1.3k
import network acl rules using csv #12013
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: 4.22
Are you sure you want to change the base?
Conversation
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## 4.22 #12013 +/- ##
============================================
- Coverage 17.59% 17.58% -0.01%
Complexity 15595 15595
============================================
Files 5910 5912 +2
Lines 529606 529844 +238
Branches 64705 64741 +36
============================================
Hits 93178 93178
- Misses 425940 426178 +238
Partials 10488 10488
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
|
@blueorangutan package |
|
@sudo87 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. |
DaanHoogland
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
clgtm so far, let me test when you are ready @sudo87
|
Packaging result [SF]: ✔️ el8 ✔️ el9 ✔️ el10 ✔️ debian ✔️ suse15. SL-JID 15706 |
|
@blueorangutan test keepEnv |
|
@DaanHoogland a [SL] Trillian-Jenkins test job (ol8 mgmt + kvm-ol8) has been kicked to run smoke tests |
|
@blueorangutan package |
|
@sudo87 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. |
|
[SF] Trillian test result (tid-14811)
|
|
Packaging result [SF]: ✔️ el8 ✔️ el9 ✔️ el10 ✔️ debian ✔️ suse15. SL-JID 15736 |
|
[SF] Trillian test result (tid-14868)
|
| // no rules got imported | ||
| if (createdRules.isEmpty() && !errors.isEmpty()) { | ||
| logger.error("Failed to import any ACL rules. Errors: {}", String.join("; ", errors)); | ||
| throw new CloudRuntimeException("Failed to import any ACL rules."); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this is very confusing to a user. the reason is probably because a rule already existed and it is counterintuitive to not allow it. We might add a flag allowing overwriting it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As per the discussion on original issue, user can create new ACL and import the csv and assign it to network. Allowing overwriting rules will lead to loss of simplicity.
|
api/src/main/java/org/apache/cloudstack/api/command/user/network/ImportNetworkACLCmd.java
Outdated
Show resolved
Hide resolved
api/src/main/java/org/apache/cloudstack/api/command/user/network/ImportNetworkACLCmd.java
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
This PR adds functionality to import network ACL rules from CSV files, addressing issue #8858. Users can now bulk import ACL rules through a UI modal that validates and previews CSV data before submission.
Key changes:
- New Vue component for CSV file upload and validation with data preview table
- Backend API command to process and import multiple ACL rules from structured data
- UI integration with import button and modal in the ACL rules tab
Reviewed changes
Copilot reviewed 9 out of 9 changed files in this pull request and generated 5 comments.
Show a summary per file
| File | Description |
|---|---|
| ui/src/views/network/ImportNetworkACL.vue | New component implementing CSV upload, parsing, validation, and preview functionality |
| ui/src/views/network/AclRulesTab.vue | Added import button and modal integration for the new import feature |
| ui/public/locales/en.json | Added internationalization keys for import UI labels and validation messages |
| server/src/main/java/com/cloud/server/ManagementServerImpl.java | Registered new ImportNetworkACLCmd command |
| server/src/main/java/com/cloud/network/vpc/NetworkACLServiceImpl.java | Implemented bulk import logic with rule creation and error handling |
| api/src/main/java/org/apache/cloudstack/api/command/user/network/ImportNetworkACLCmd.java | New API command definition for importing ACL rules |
| api/src/main/java/org/apache/cloudstack/api/command/user/network/CreateNetworkACLCmd.java | Added setter methods to support programmatic rule creation |
| api/src/main/java/com/cloud/network/vpc/NetworkACLService.java | Added service interface method for importing ACL rules |
| api/src/main/java/com/cloud/event/EventTypes.java | Added new event type for ACL import operations |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
server/src/main/java/com/cloud/network/vpc/NetworkACLServiceImpl.java
Outdated
Show resolved
Hide resolved
api/src/main/java/org/apache/cloudstack/api/command/user/network/CreateNetworkACLCmd.java
Outdated
Show resolved
Hide resolved
|
@blueorangutan package |
|
@sudo87 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. |
|
Packaging result [SF]: ✔️ el8 ✔️ el9 ✔️ el10 ✔️ debian ✔️ suse15. SL-JID 15973 |
|
@blueorangutan test |
|
@sudo87 a [SL] Trillian-Jenkins test job (ol8 mgmt + kvm-ol8) has been kicked to run smoke tests |
api/src/main/java/org/apache/cloudstack/api/command/user/network/ImportNetworkACLCmd.java
Outdated
Show resolved
Hide resolved
api/src/main/java/org/apache/cloudstack/api/command/user/network/ImportNetworkACLCmd.java
Outdated
Show resolved
Hide resolved
api/src/main/java/org/apache/cloudstack/api/command/user/network/ImportNetworkACLCmd.java
Outdated
Show resolved
Hide resolved
sureshanaparti
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
minor suggestions, clgtm
|
Thank you @sureshanaparti for your review comments. |
|
[SF] Trillian test result (tid-14957)
|
|
[SF] Trillian test result (tid-14966)
|
|
This pull request has merge conflicts. Dear author, please fix the conflicts and sync your branch with the base branch. |

Description
This PR fixes #8858
Types of changes
Feature/Enhancement Scale or Bug Severity
Feature/Enhancement Scale
Bug Severity
Screenshots (if appropriate):
Screen.Recording.2025-11-12.at.5.32.34.PM.mov
How Has This Been Tested?
Test file:
AclRules-test-acls-e27d1e32-09b6-4cb9-acde-2a748d857678.csv
How did you try to break this feature and the system with this change?