Allow more generic searches of ACLs#9566
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #9566 +/- ##
============================================
- Coverage 15.77% 15.77% -0.01%
Complexity 12542 12542
============================================
Files 5623 5623
Lines 491611 491619 +8
Branches 60012 63123 +3111
============================================
- Hits 77568 77565 -3
- Misses 405584 405594 +10
- Partials 8459 8460 +1
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
4b33e4a to
fae65ad
Compare
|
@blueorangutan package |
|
@DaanHoogland 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 ✔️ debian ✔️ suse15. SL-JID 10778 |
|
@blueorangutan test |
|
@DaanHoogland a [SL] Trillian-Jenkins test job (ol8 mgmt + kvm-ol8) has been kicked to run smoke tests |
|
[SF] Trillian test result (tid-11162)
|
kiranchavala
left a comment
There was a problem hiding this comment.
@DaanHoogland currently the keyword search is working only for protocol field and description
can the keyword search improved to other parameters like
(cmk) > list networkacls -h
listNetworkACLs: Lists all network ACL items
API Params Type Description
========== ==== ===========
account string list resources by account. Must be used w
ith the domainId parameter.
aclid uuid list network ACL items by ACL ID
action string list network ACL items by action
domainid uuid list only resources belonging to the doma
in specified
fordisplay boolean list resources by display flag; only ROOT
admin is eligible to pass this paramete
r
id uuid Lists network ACL Item with the specified
ID
isrecursive boolean defaults to false, but if true, lists all
resources from the parent specified by
the domainId till leaves.
keyword string List by keyword
listall boolean If set to false, list only resources belo
nging to the command's caller; if set to
true - list resources that the caller i
s authorized to see. Default value is fa
lse. Resources dedicated to a project ar
e listed only if using the projectid par
ameter.
networkid uuid list network ACL items by network ID
page integer
pagesize integer
projectid uuid list objects by project; if projectid=-1
lists All VMs
protocol string list network ACL items by protocol
tags map List resources by tags (key/value pairs)
traffictype string list network ACL items by traffic type -
ingress or egress
|
@kiranchavala that would be a bigger effort, the search is no only for acl item fields. As for account, aclid, domain etc, those are implied (at least in the GUI). things like traffic_type and action, these are enumerals and require a different kind of selection, i.e. they are not free text searchable and hence are left out of scope. |
bernardodemarco
left a comment
There was a problem hiding this comment.
I manually tested in a local environment.
Regarding the listNetworkACLs API, the filtering is working as expected. I created four ACL rules and filtered them by protocol and description.
@DaanHoogland, what do you think about using one of the Ant Design components for the input field?
Regarding the listNetworkACLLists, when executing the API with the keyword parameter, apparently a NPE is not being handled.
(localcloud) 🐱 > list networkacllists vpcid="f9510528-eb2c-405f-b690-21a540c00661" keyword="acl"
🙈 Error: (HTTP 530, error code 4250) Caught error: nullManagement server logs:
2024-09-01T16:09:42,439 ERROR [c.c.n.v.d.NetworkACLDaoImpl] (qtp1438988851-385:[ctx-49b0b1cf, ctx-54f34d08]) (logid:d0c03e10) Caught: com.mysql.cj.jdbc.ClientPreparedStatement: SELECT network_acl.id, network_acl.vpc_id, network_acl.uuid, network_acl.name, network_acl.description, network_acl.display FROM network_acl WHERE network_acl.vpc_id IN (1,0) AND network_acl.display = 1 AND (network_acl.name LIKE x'2561636c25' OR network_acl.description LIKE x'2561636c25' OR ) ORDER BY network_acl.id DESC LIMIT 0, 500 java.lang.NullPointerException
2024-09-01T16:09:42,439 ERROR [c.c.a.ApiServer] (qtp1438988851-385:[ctx-49b0b1cf, ctx-54f34d08]) (logid:d0c03e10) unhandled exception executing api command: [Ljava.lang.String;@33af317 com.cloud.utils.exception.CloudRuntimeException: Caught error: null
thanks @bernardodemarco
which one would you like to see implemented?
2024-09-01T16:09:42,439 ERROR [c.c.n.v.d.NetworkACLDaoImpl] (qtp1438988851-385:[ctx-49b0b1cf, ctx-54f34d08]) (logid:d0c03e10) Caught: com.mysql.cj.jdbc.ClientPreparedStatement: SELECT network_acl.id, network_acl.vpc_id, network_acl.uuid, network_acl.name, network_acl.description, network_acl.display FROM network_acl WHERE network_acl.vpc_id IN (1,0) AND network_acl.display = 1 AND (network_acl.name LIKE x'2561636c25' OR network_acl.description LIKE x'2561636c25' OR ) ORDER BY network_acl.id DESC LIMIT 0, 500 java.lang.NullPointerException
2024-09-01T16:09:42,439 ERROR [c.c.a.ApiServer] (qtp1438988851-385:[ctx-49b0b1cf, ctx-54f34d08]) (logid:d0c03e10) unhandled exception executing api command: [Ljava.lang.String;@33af317 com.cloud.utils.exception.CloudRuntimeException: Caught error: nullthanks, will have a look |
I believe that the |
|
@bernardodemarco took some time (priorities) but updated the PR now. |
|
@blueorangutan package |
|
@DaanHoogland 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 ✔️ debian ✔️ suse15. SL-JID 11013 |
|
@blueorangutan test |
|
@DaanHoogland a [SL] Trillian-Jenkins test job (ol8 mgmt + kvm-ol8) has been kicked to run smoke tests |
|
[SF] Trillian test result (tid-11388)
|
|
@kiranchavala @bernardodemarco is this ok by you? (cc @JoaoJandre ) |
bernardodemarco
left a comment
There was a problem hiding this comment.
@DaanHoogland, I've tested it again, and everything seems to be working well.
Execution of the listNetworkACLLists API with the keyword parameter:
(localcloud) 🐱 > list networkacllists keyword="vpc"
{
"count": 1,
"networkacllist": [
{
"description": "ACL 01",
"fordisplay": true,
"id": "e85bc061-1ffe-475a-92f0-a7dfbcfbd878",
"name": "vpc-01-acl-01"
}
]
}
Thanks @DaanHoogland we can revisit them in future if required |
|
@vishesh92 a Jenkins job has been kicked to build UI QA env. I'll keep you posted as I make progress. |
|
UI build: ✔️ |
37b089f to
21f9cbc
Compare
|
@blueorangutan package |
|
@DaanHoogland 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 ✔️ debian ✔️ suse15. SL-JID 11057 |
|
@blueorangutan test |
|
@DaanHoogland a [SL] Trillian-Jenkins test job (ol8 mgmt + kvm-ol8) has been kicked to run smoke tests |
vishesh92
left a comment
There was a problem hiding this comment.
lgtm. Tested on my local env with simulator. Search with keyword is working as expected.
|
[SF] Trillian test result (tid-11432)
|







Description
This PR...
Fixes: #8859
Types of changes
Feature/Enhancement Scale or Bug Severity
Feature/Enhancement Scale
Bug Severity
Screenshots (if appropriate):
How Has This Been Tested?
How did you try to break this feature and the system with this change?