You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cloudstack.apache.org by "BryanMLima (via GitHub)" <gi...@apache.org> on 2023/01/31 12:15:54 UTC
[GitHub] [cloudstack] BryanMLima opened a new pull request, #7150: Global ACL for VPCs
BryanMLima opened a new pull request, #7150:
URL: https://github.com/apache/cloudstack/pull/7150
### Description
Currently, ACS allows the creation of ACLs for VPCs; however, it is required to create an ACL per VPC. Therefore, even if multiple VPCs had the same ACL rules, it would be required to create multiple ACLs. This PR aims to change this behavior as to be able to create global ACLs which will be available to all VPCs, similar to the default ones: `default_allow` and `default_deny`.
This PR removed the requirement of the parameter `vpcId` of the `createNetworkACLList`; therefore, if there is not a VPC ID in the parameter call, then it is a global ACL. It is important to note that only root admins can manipulate these global ACLs, but anyone can use them.
### 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)
- [x] 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
- [x] Minor
#### Bug Severity
- [ ] BLOCKER
- [ ] Critical
- [ ] Major
- [x] Minor
- [ ] Trivial
### Screenshots (if appropriate):
### How Has This Been Tested?
I performed the following tests in a local lab:
<details>
<summary><h3>T0 - createNetworkAclList</h3></summary>
I created a global ACL with a root admin account.
~~~
(lab-bryan) π± > create networkacllist name=teste-2-global description=testeglobal2 fordisplay=true
{
"networkacllist": {
"description": "testeglobal2",
"fordisplay": true,
"id": "fb7cadc2-8209-4a5f-974f-58a7db6b1115",
"name": "teste-2-global"
}
}
~~~
I tried to create a global ACL with a domain admin account.
~~~
(lab-bryan-domain) π± > create networkacllist name=teste-2-global description=testeglobal2 fordisplay=true
π Error: (HTTP 531, error code 4365) Only Root Admin can create global ACLs.
~~~
**Expected?** Yes
</details>
<details>
<summary><h3>T1 - replaceNetworkaclList</h3></summary>
I replaced the ACL for a network as root admin
~~~
(lab-bryan) π± > replace networkacllist networkid=b539e342-e625-4cae-bc1f-9115f9f8f734 aclid=fb7cadc2-8209-4a5f-974f-58a7db6b1115
{
"success": true
}
~~~
I replaced the ACL for a network as domain admin
~~~
(lab-bryan-domain) π± > replace networkacllist networkid=b539e342-e625-4cae-bc1f-9115f9f8f734 aclid=fb7cadc2-8209-4a5f-974f-58a7db6b1115
{
"success": true
}
~~~
**Expected?** Yes
</details>
<details>
<summary><h3>T2 - createNetworkAcl</h3></summary>
I created an ACL rule as root admin
~~~
(lab-bryan) π± > create networkacl aclid=fb7cadc2-8209-4a5f-974f-58a7db6b1115 protocol=all action=allow cidrlist=0.0.0.0/0
{
"networkacl": {
"aclid": "fb7cadc2-8209-4a5f-974f-58a7db6b1115",
"aclname": "teste-2-global",
"action": "Allow",
"cidrlist": "0.0.0.0/0",
"fordisplay": true,
"id": "acafd739-4dc2-472b-b571-2fed43502150",
"number": 1,
"protocol": "all",
"state": "Active",
"tags": [],
"traffictype": "Ingress"
}
}
~~~
I tried to create an ACL rule as a domain admin
~~~
(lab-bryan-domain) π± > create networkacl aclid=fb7cadc2-8209-4a5f-974f-58a7db6b1115 protocol=all action=allow cidrlist=0.0.0.0/0
π Error: (HTTP 531, error code 4365) Only Root Admins can create rules for a global ACL.
~~~
**Expected?** Yes
</details>
<details>
<summary><h3>T3 - deleteNetworkAcl</h3></summary>
I deleted an ACL rule as root admin
~~~
(lab-bryan) π± > delete networkacl id=acafd739-4dc2-472b-b571-2fed43502150
{
"success": true
}
~~~
I tried to delete an ACL rule as domain admin
~~~
(lab-bryan-domain) π± > delete networkacl id=acafd739-4dc2-472b-b571-2fed43502150
{
"accountid": "a522847f-936d-4347-8603-9a959df2128c",
"cmd": "org.apache.cloudstack.api.command.user.network.DeleteNetworkACLCmd",
"completed": "2023-01-26T14:52:53+0000",
"created": "2023-01-26T14:52:53+0000",
"jobid": "6785543c-d729-4725-99a0-f01eace2963a",
"jobprocstatus": 0,
"jobresult": {
"errorcode": 530,
"errortext": "Only Root Admin can delete global ACL rules."
},
"jobresultcode": 530,
"jobresulttype": "object",
"jobstatus": 2,
"userid": "b7dcc0af-e83d-4290-bfcd-39b69abb5a0e"
}
π Error: async API failed for job 6785543c-d729-4725-99a0-f01eace2963a
~~~
**Expected?** Yes
</details>
<details>
<summary><h3>T4 - moveNetworkAclItem</h3></summary>
I tried to move an ACL rule as root admin, I used a screenshot as CMK has a problem to decode the response of API `moveNetworkAclItem` (not caused by this PR, this faulty behavior was already like this).

I tried to move an ACL rule as domain admin

**Expected?** Yes
</details>
<details>
<summary><h3>T5 - updateNetworkAclItem</h3></summary>
I updated an ACL rule as root admin
~~~
(lab-bryan) π± > update networkaclitem id=97c39f8e-f800-4fe5-add2-8261148ecd46 cidrlist=0.0.0.0/0,192.168.0.1/8
{
"networkacl": {
"aclid": "fb7cadc2-8209-4a5f-974f-58a7db6b1115",
"aclname": "teste-2-global",
"action": "Allow",
"cidrlist": "0.0.0.0/0,192.168.0.1/8",
"fordisplay": true,
"id": "97c39f8e-f800-4fe5-add2-8261148ecd46",
"number": 3,
"protocol": "all",
"state": "Add",
"tags": [],
"traffictype": "Ingress"
}
}
~~~
I tried to update an ACL rule as domain Admin
~~~
(lab-bryan-domain) π± > update networkaclitem id=97c39f8e-f800-4fe5-add2-8261148ecd46 cidrlist=0.0.0.0/0,192.168.0.1/8
{
"accountid": "a522847f-936d-4347-8603-9a959df2128c",
"cmd": "org.apache.cloudstack.api.command.user.network.UpdateNetworkACLItemCmd",
"completed": "2023-01-26T15:09:38+0000",
"created": "2023-01-26T15:09:38+0000",
"jobid": "996a0316-1529-47a5-b8e9-1988575a8088",
"jobprocstatus": 0,
"jobresult": {
"errorcode": 530,
"errortext": "Only Root Admins can update global ACLs."
},
"jobresultcode": 530,
"jobresulttype": "object",
"jobstatus": 2,
"userid": "b7dcc0af-e83d-4290-bfcd-39b69abb5a0e"
}
π Error: async API failed for job 996a0316-1529-47a5-b8e9-1988575a8088
~~~
**Expected?** Yes
</details>
<details>
<summary><h3>T6 - deleteNetworkAclList</h3></summary>
I deleted an ACL rule as root admin
~~~
(lab-bryan) π± > delete networkacllist id=fb7cadc2-8209-4a5f-974f-58a7db6b1115
{
"success": true
}
~~~
I tried to delete an ACL rule as domain admin
~~~
(lab-bryan-domain) π± > delete networkacllist id=fb7cadc2-8209-4a5f-974f-58a7db6b1115
{
"accountid": "a522847f-936d-4347-8603-9a959df2128c",
"cmd": "org.apache.cloudstack.api.command.user.network.DeleteNetworkACLListCmd",
"completed": "2023-01-26T15:11:13+0000",
"created": "2023-01-26T15:11:13+0000",
"jobid": "40a2047d-8d23-4785-b53a-5baee1da9bf7",
"jobprocstatus": 0,
"jobresult": {
"errorcode": 530,
"errortext": "Only Root Admin can delete global ACLs."
},
"jobresultcode": 530,
"jobresulttype": "object",
"jobstatus": 2,
"userid": "b7dcc0af-e83d-4290-bfcd-39b69abb5a0e"
}
π Error: async API failed for job 40a2047d-8d23-4785-b53a-5baee1da9bf7
~~~
**Expected?** Yes
</details>
---
Furthermore, I created three VPCs and three VMs, each one attach to a tier of a VPC. After this, I created a global ACL allowing SSH connections. I tested the `ssh` command with all public IPs, previously created, of the VMs. All worked as expected. Furthermore, I changed the rule to deny any access to por 22 for the TCP protocol. Similarly, I tried to used `ssh` with all 3 public IPs and all failed.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [cloudstack] blueorangutan commented on pull request #7150: Global ACL for VPCs
Posted by "blueorangutan (via GitHub)" <gi...@apache.org>.
blueorangutan commented on PR #7150:
URL: https://github.com/apache/cloudstack/pull/7150#issuecomment-1435432371
<b>Trillian test result (tid-6191)</b>
Environment: kvm-centos7 (x2), Advanced Networking with Mgmt server 7
Total time taken: 50872 seconds
Marvin logs: https://github.com/blueorangutan/acs-prs/releases/download/trillian/pr7150-t6191-kvm-centos7.zip
Smoke tests completed. 106 look OK, 3 have errors, 0 did not run
Only failed and skipped tests results shown below:
Test | Result | Time (s) | Test File
--- | --- | --- | ---
test_08_upgrade_kubernetes_ha_cluster | `Error` | 4012.29 | test_kubernetes_clusters.py
test_09_delete_kubernetes_ha_cluster | `Failure` | 0.04 | test_kubernetes_clusters.py
ContextSuite context=TestKubernetesCluster>:teardown | `Error` | 78.73 | test_kubernetes_clusters.py
test_create_acl_rule | `Error` | 5.53 | test_global_acls.py
test_create_global_acl | `Error` | 1.45 | test_global_acls.py
test_delete_acl_rule | `Failure` | 4.65 | test_global_acls.py
test_delete_acl_rule | `Error` | 4.65 | test_global_acls.py
test_delete_global_acl | `Failure` | 2.52 | test_global_acls.py
test_delete_global_acl | `Error` | 2.53 | test_global_acls.py
test_replace_acl_of_network | `Error` | 94.77 | test_global_acls.py
test_hostha_enable_ha_when_host_in_maintenance | `Error` | 303.83 | test_hostha_kvm.py
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [cloudstack] DaanHoogland commented on pull request #7150: Global ACL for VPCs
Posted by "DaanHoogland (via GitHub)" <gi...@apache.org>.
DaanHoogland commented on PR #7150:
URL: https://github.com/apache/cloudstack/pull/7150#issuecomment-1527334589
@blueorangutan test
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [cloudstack] blueorangutan commented on pull request #7150: Global ACL for VPCs
Posted by "blueorangutan (via GitHub)" <gi...@apache.org>.
blueorangutan commented on PR #7150:
URL: https://github.com/apache/cloudstack/pull/7150#issuecomment-1528166307
<b>Trillian test result (tid-6487)</b>
Environment: kvm-centos7 (x2), Advanced Networking with Mgmt server 7
Total time taken: 42771 seconds
Marvin logs: https://github.com/blueorangutan/acs-prs/releases/download/trillian/pr7150-t6487-kvm-centos7.zip
Smoke tests completed. 109 look OK, 0 have errors, 0 did not run
Only failed and skipped tests results shown below:
Test | Result | Time (s) | Test File
--- | --- | --- | ---
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [cloudstack] DaanHoogland closed pull request #7150: Global ACL for VPCs
Posted by "DaanHoogland (via GitHub)" <gi...@apache.org>.
DaanHoogland closed pull request #7150: Global ACL for VPCs
URL: https://github.com/apache/cloudstack/pull/7150
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Global ACL for VPCs [cloudstack]
Posted by "shwstppr (via GitHub)" <gi...@apache.org>.
shwstppr commented on PR #7150:
URL: https://github.com/apache/cloudstack/pull/7150#issuecomment-1744611886
@blueorangutan package
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Global ACL for VPCs [cloudstack]
Posted by "DaanHoogland (via GitHub)" <gi...@apache.org>.
DaanHoogland commented on PR #7150:
URL: https://github.com/apache/cloudstack/pull/7150#issuecomment-1831446753
@blueorangutan test
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Global ACL for VPCs [cloudstack]
Posted by "DaanHoogland (via GitHub)" <gi...@apache.org>.
DaanHoogland commented on PR #7150:
URL: https://github.com/apache/cloudstack/pull/7150#issuecomment-1833822565
There was a test added to the smoke test suites, so I think we are done here; merging
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Global ACL for VPCs [cloudstack]
Posted by "blueorangutan (via GitHub)" <gi...@apache.org>.
blueorangutan commented on PR #7150:
URL: https://github.com/apache/cloudstack/pull/7150#issuecomment-1826284738
@shwstppr a [SL] Trillian-Jenkins test job (centos7 mgmt + kvm-centos7) has been kicked to run smoke tests
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [cloudstack] codecov[bot] commented on pull request #7150: Global ACL for VPCs
Posted by codecov.
codecov[bot] commented on PR #7150:
URL: https://github.com/apache/cloudstack/pull/7150#issuecomment-1410318414
# [Codecov](https://codecov.io/gh/apache/cloudstack/pull/7150?src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) Report
> Merging [#7150](https://codecov.io/gh/apache/cloudstack/pull/7150?src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (1a74620) into [main](https://codecov.io/gh/apache/cloudstack/commit/83c2bfacd879d588816ae0f16f002b3a40ef11c8?el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (83c2bfa) will **increase** coverage by `0.07%`.
> The diff coverage is `43.63%`.
```diff
@@ Coverage Diff @@
## main #7150 +/- ##
============================================
+ Coverage 11.79% 11.86% +0.07%
- Complexity 7692 7739 +47
============================================
Files 2511 2512 +1
Lines 246578 246839 +261
Branches 38446 38493 +47
============================================
+ Hits 29090 29297 +207
+ Misses 213703 213683 -20
- Partials 3785 3859 +74
```
| [Impacted Files](https://codecov.io/gh/apache/cloudstack/pull/7150?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | Coverage Ξ | |
|---|---|---|
| [.../main/java/com/cloud/network/vpc/NetworkACLVO.java](https://codecov.io/gh/apache/cloudstack/pull/7150?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-ZW5naW5lL3NjaGVtYS9zcmMvbWFpbi9qYXZhL2NvbS9jbG91ZC9uZXR3b3JrL3ZwYy9OZXR3b3JrQUNMVk8uamF2YQ==) | `34.61% <0.00%> (-1.39%)` | :arrow_down: |
| [...ain/java/com/cloud/network/NetworkServiceImpl.java](https://codecov.io/gh/apache/cloudstack/pull/7150?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c2VydmVyL3NyYy9tYWluL2phdmEvY29tL2Nsb3VkL25ldHdvcmsvTmV0d29ya1NlcnZpY2VJbXBsLmphdmE=) | `11.39% <0.00%> (+0.25%)` | :arrow_up: |
| [...a/com/cloud/network/vpc/NetworkACLServiceImpl.java](https://codecov.io/gh/apache/cloudstack/pull/7150?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c2VydmVyL3NyYy9tYWluL2phdmEvY29tL2Nsb3VkL25ldHdvcmsvdnBjL05ldHdvcmtBQ0xTZXJ2aWNlSW1wbC5qYXZh) | `54.51% <52.17%> (+0.57%)` | :arrow_up: |
| [...dstack/network/contrail/model/ModelObjectBase.java](https://codecov.io/gh/apache/cloudstack/pull/7150?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-cGx1Z2lucy9uZXR3b3JrLWVsZW1lbnRzL2p1bmlwZXItY29udHJhaWwvc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL2Nsb3Vkc3RhY2svbmV0d29yay9jb250cmFpbC9tb2RlbC9Nb2RlbE9iamVjdEJhc2UuamF2YQ==) | `28.84% <0.00%> (-19.24%)` | :arrow_down: |
| [...cloudstack/network/contrail/model/ModelObject.java](https://codecov.io/gh/apache/cloudstack/pull/7150?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-cGx1Z2lucy9uZXR3b3JrLWVsZW1lbnRzL2p1bmlwZXItY29udHJhaWwvc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL2Nsb3Vkc3RhY2svbmV0d29yay9jb250cmFpbC9tb2RlbC9Nb2RlbE9iamVjdC5qYXZh) | `29.16% <0.00%> (-4.17%)` | :arrow_down: |
| [.../src/main/java/com/cloud/configuration/Config.java](https://codecov.io/gh/apache/cloudstack/pull/7150?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c2VydmVyL3NyYy9tYWluL2phdmEvY29tL2Nsb3VkL2NvbmZpZ3VyYXRpb24vQ29uZmlnLmphdmE=) | `88.91% <0.00%> (-0.82%)` | :arrow_down: |
| [...udstack/consoleproxy/ConsoleAccessManagerImpl.java](https://codecov.io/gh/apache/cloudstack/pull/7150?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c2VydmVyL3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9jbG91ZHN0YWNrL2NvbnNvbGVwcm94eS9Db25zb2xlQWNjZXNzTWFuYWdlckltcGwuamF2YQ==) | `5.10% <0.00%> (-0.12%)` | :arrow_down: |
| [...in/java/com/cloud/server/ManagementServerImpl.java](https://codecov.io/gh/apache/cloudstack/pull/7150?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c2VydmVyL3NyYy9tYWluL2phdmEvY29tL2Nsb3VkL3NlcnZlci9NYW5hZ2VtZW50U2VydmVySW1wbC5qYXZh) | `5.66% <0.00%> (-0.06%)` | :arrow_down: |
| [...src/main/java/com/cloud/api/ApiResponseHelper.java](https://codecov.io/gh/apache/cloudstack/pull/7150?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c2VydmVyL3NyYy9tYWluL2phdmEvY29tL2Nsb3VkL2FwaS9BcGlSZXNwb25zZUhlbHBlci5qYXZh) | `3.83% <0.00%> (-0.04%)` | :arrow_down: |
| [...com/cloud/api/query/dao/DataCenterJoinDaoImpl.java](https://codecov.io/gh/apache/cloudstack/pull/7150?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c2VydmVyL3NyYy9tYWluL2phdmEvY29tL2Nsb3VkL2FwaS9xdWVyeS9kYW8vRGF0YUNlbnRlckpvaW5EYW9JbXBsLmphdmE=) | `1.81% <0.00%> (-0.04%)` | :arrow_down: |
| ... and [27 more](https://codecov.io/gh/apache/cloudstack/pull/7150?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | |
:mega: Weβre building smart automated test selection to slash your CI/CD build times. [Learn more](https://about.codecov.io/iterative-testing/?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [cloudstack] blueorangutan commented on pull request #7150: Global ACL for VPCs
Posted by "blueorangutan (via GitHub)" <gi...@apache.org>.
blueorangutan commented on PR #7150:
URL: https://github.com/apache/cloudstack/pull/7150#issuecomment-1433411891
Packaging result: :heavy_check_mark: el7 :heavy_multiplication_x: el8 :heavy_multiplication_x: el9 :heavy_check_mark: debian :heavy_multiplication_x: suse15. SL-JID 5594
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Global ACL for VPCs [cloudstack]
Posted by "blueorangutan (via GitHub)" <gi...@apache.org>.
blueorangutan commented on PR #7150:
URL: https://github.com/apache/cloudstack/pull/7150#issuecomment-1831264114
@shwstppr 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.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Global ACL for VPCs [cloudstack]
Posted by "blueorangutan (via GitHub)" <gi...@apache.org>.
blueorangutan commented on PR #7150:
URL: https://github.com/apache/cloudstack/pull/7150#issuecomment-1809708329
@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.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Global ACL for VPCs [cloudstack]
Posted by "BryanMLima (via GitHub)" <gi...@apache.org>.
BryanMLima commented on PR #7150:
URL: https://github.com/apache/cloudstack/pull/7150#issuecomment-1808907346
@DaanHoogland @shwstppr I addressed the private gateway issue, it should be good now. Do you guys think this could still be on the `4.19` release?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [cloudstack] DaanHoogland commented on pull request #7150: Global ACL for VPCs
Posted by "DaanHoogland (via GitHub)" <gi...@apache.org>.
DaanHoogland commented on PR #7150:
URL: https://github.com/apache/cloudstack/pull/7150#issuecomment-1630186556
@blueorangutan test
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [cloudstack] blueorangutan commented on pull request #7150: Global ACL for VPCs
Posted by "blueorangutan (via GitHub)" <gi...@apache.org>.
blueorangutan commented on PR #7150:
URL: https://github.com/apache/cloudstack/pull/7150#issuecomment-1631510837
<b>[SF] Trillian test result (tid-7042)</b>
Environment: kvm-centos7 (x2), Advanced Networking with Mgmt server 7
Total time taken: 53267 seconds
Marvin logs: https://github.com/blueorangutan/acs-prs/releases/download/trillian/pr7150-t7042-kvm-centos7.zip
Smoke tests completed. 108 look OK, 1 have errors, 0 did not run
Only failed and skipped tests results shown below:
Test | Result | Time (s) | Test File
--- | --- | --- | ---
test_01_migrate_VM_and_root_volume | `Error` | 81.75 | test_vm_life_cycle.py
test_02_migrate_VM_with_two_data_disks | `Error` | 54.45 | test_vm_life_cycle.py
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [cloudstack] BryanMLima commented on pull request #7150: Global ACL for VPCs
Posted by "BryanMLima (via GitHub)" <gi...@apache.org>.
BryanMLima commented on PR #7150:
URL: https://github.com/apache/cloudstack/pull/7150#issuecomment-1478283026
Hey @rohityadavcloud could you review this one again and check if the integration tests added are good enough?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Global ACL for VPCs [cloudstack]
Posted by "DaanHoogland (via GitHub)" <gi...@apache.org>.
DaanHoogland commented on PR #7150:
URL: https://github.com/apache/cloudstack/pull/7150#issuecomment-1752746171
@blueorangutan test
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Global ACL for VPCs [cloudstack]
Posted by "DaanHoogland (via GitHub)" <gi...@apache.org>.
DaanHoogland commented on PR #7150:
URL: https://github.com/apache/cloudstack/pull/7150#issuecomment-1827144771
> [SF] Trillian test result (tid-8391) Environment: kvm-centos7 (x2), Advanced Networking with Mgmt server 7 Total time taken: 58616 seconds Marvin logs: https://github.com/blueorangutan/acs-prs/releases/download/trillian/pr7150-t8391-kvm-centos7.zip Smoke tests completed. 117 look OK, 2 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.05 test_vm_life_cycle.py
> test_02_redundant_VPC_default_routes `Failure` 380.19 test_vpc_redundant.py
> test_05_rvpc_multi_tiers `Failure` 459.34 test_vpc_redundant.py
> test_05_rvpc_multi_tiers `Error` 459.35 test_vpc_redundant.py
@BryanMLima can you look to make sure the redundant vpc test failures are not a problem? Did you test redundant VPCs?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Global ACL for VPCs [cloudstack]
Posted by "DaanHoogland (via GitHub)" <gi...@apache.org>.
DaanHoogland commented on PR #7150:
URL: https://github.com/apache/cloudstack/pull/7150#issuecomment-1814705090
@blueorangutan package
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Global ACL for VPCs [cloudstack]
Posted by "blueorangutan (via GitHub)" <gi...@apache.org>.
blueorangutan commented on PR #7150:
URL: https://github.com/apache/cloudstack/pull/7150#issuecomment-1816432524
@weizhouapache a [SL] Trillian-Jenkins test job (centos7 mgmt + kvm-centos7) has been kicked to run smoke tests
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Global ACL for VPCs [cloudstack]
Posted by "blueorangutan (via GitHub)" <gi...@apache.org>.
blueorangutan commented on PR #7150:
URL: https://github.com/apache/cloudstack/pull/7150#issuecomment-1814822566
Packaging result [SF]: :heavy_check_mark: el7 :heavy_check_mark: el8 :heavy_check_mark: el9 :heavy_check_mark: debian :heavy_check_mark: suse15. SL-JID 7775
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Global ACL for VPCs [cloudstack]
Posted by "DaanHoogland (via GitHub)" <gi...@apache.org>.
DaanHoogland commented on PR #7150:
URL: https://github.com/apache/cloudstack/pull/7150#issuecomment-1812128578
@BryanMLima can you update this one?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Global ACL for VPCs [cloudstack]
Posted by "blueorangutan (via GitHub)" <gi...@apache.org>.
blueorangutan commented on PR #7150:
URL: https://github.com/apache/cloudstack/pull/7150#issuecomment-1826219468
<b>[SF] Trillian test result (tid-8390)</b>
Environment: kvm-centos7 (x2), Advanced Networking with Mgmt server 7
Total time taken: 52760 seconds
Marvin logs: https://github.com/blueorangutan/acs-prs/releases/download/trillian/pr7150-t8390-kvm-centos7.zip
Smoke tests completed. 109 look OK, 10 have errors, 0 did not run
Only failed and skipped tests results shown below:
Test | Result | Time (s) | Test File
--- | --- | --- | ---
test_list_vms_metrics_admin | `Error` | 0.19 | test_metrics_api.py
test_list_vms_metrics_history | `Error` | 0.13 | test_metrics_api.py
test_list_vms_metrics_user | `Error` | 0.14 | test_metrics_api.py
test_list_volumes_metrics_history | `Error` | 0.14 | test_metrics_api.py
test_deploy_vm_from_iso | `Error` | 0.00 | test_deploy_vm_iso.py
ContextSuite context=TestIsolatedNetworksPasswdServer>:setup | `Error` | 0.00 | test_password_server.py
test_01_create_iso_with_checksum_sha1 | `Error` | 66.50 | test_iso.py
test_02_create_iso_with_checksum_sha256 | `Error` | 66.49 | test_iso.py
test_03_create_iso_with_checksum_md5 | `Error` | 66.50 | test_iso.py
test_04_create_iso_with_no_checksum | `Error` | 66.51 | test_iso.py
ContextSuite context=TestSharedNetwork>:setup | `Error` | 52.84 | test_network.py
ContextSuite context=TestDeployVirtioSCSIVM>:teardown | `Error` | 309.77 | test_deploy_virtio_scsi_vm.py
ContextSuite context=TestInternalLb>:setup | `Error` | 0.00 | test_internal_lb.py
ContextSuite context=TestRouterDHCPHosts>:setup | `Error` | 0.00 | test_router_dhcphosts.py
ContextSuite context=TestRouterDHCPOpts>:setup | `Error` | 0.00 | test_router_dhcphosts.py
ContextSuite context=TestSnapshotStandaloneBackup>:setup | `Error` | 590.04 | test_snapshots.py
test_01_create_template | `Error` | 11.48 | test_templates.py
test_CreateTemplateWithDuplicateName | `Error` | 17.77 | test_templates.py
test_02_create_template_with_checksum_sha1 | `Error` | 65.51 | test_templates.py
test_03_create_template_with_checksum_sha256 | `Error` | 65.52 | test_templates.py
test_05_create_template_with_no_checksum | `Error` | 135.95 | test_templates.py
test_03_delete_template | `Error` | 1.09 | test_templates.py
test_04_extract_template | `Error` | 1.07 | test_templates.py
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [cloudstack] blueorangutan commented on pull request #7150: Global ACL for VPCs
Posted by "blueorangutan (via GitHub)" <gi...@apache.org>.
blueorangutan commented on PR #7150:
URL: https://github.com/apache/cloudstack/pull/7150#issuecomment-1629182423
Packaging result [SF]: :heavy_check_mark: el7 :heavy_check_mark: el8 :heavy_check_mark: el9 :heavy_check_mark: debian :heavy_check_mark: suse15. SL-JID 6453
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [cloudstack] github-actions[bot] commented on pull request #7150: Global ACL for VPCs
Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on PR #7150:
URL: https://github.com/apache/cloudstack/pull/7150#issuecomment-1625336137
This pull request has merge conflicts. Dear author, please fix the conflicts and sync your branch with the base branch.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [cloudstack] DaanHoogland commented on a diff in pull request #7150: Global ACL for VPCs
Posted by "DaanHoogland (via GitHub)" <gi...@apache.org>.
DaanHoogland commented on code in PR #7150:
URL: https://github.com/apache/cloudstack/pull/7150#discussion_r1105858701
##########
test/integration/smoke/test_global_acls.py:
##########
@@ -0,0 +1,212 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+from marvin.cloudstackTestCase import cloudstackTestCase
+from marvin.lib.utils import cleanup_resources
+from marvin.lib.base import (Network, NetworkACLList, NetworkOffering, VpcOffering, VPC, NetworkACL)
+from marvin.lib.common import (get_domain, get_zone)
+from nose.plugins.attrib import attr
+from marvin.cloudstackException import CloudstackAPIException
+
+
+class Services:
+ """Test Global ACLs
+ """
+
+ def __init__(self):
+ self.services = {
+ "root_domain": {
+ "name": "ROOT",
+ },
+ "domain": {
+ "name": "Domain",
+ },
+ "user": {
+ "username": "user",
+ "roletype": 0,
+ },
+ "domain_admin": {
+ "username": "Domain admin",
+ "roletype": 2,
+ },
+ "root_admin": {
+ "username": "Root admin",
+ "roletype": 1,
+ },
+ "vpc": {
+ "name": "vpc-networkacl",
+ "displaytext": "vpc-networkacl",
+ "cidr": "10.1.1.0/24",
+ },
+ "vpcnetwork": {
+ "name": "vpcnetwork",
+ "displaytext": "vpcnetwork",
+ },
+ "rule": {
+ "protocol": "all",
+ "traffictype": "ingress",
+ }
+ }
+
+
+class TestGlobalACLs(cloudstackTestCase):
+
+ @classmethod
+ def setUpClass(cls):
+ cls.testClient = super(TestGlobalACLs, cls).getClsTestClient()
+ cls.api_client = cls.testClient.getApiClient()
+
+ cls.services = Services().services
+ cls.domain = get_domain(cls.api_client)
+ cls.zone = get_zone(cls.api_client, cls.testClient.getZoneForTests())
+ return
+
+ @classmethod
+ def tearDownClass(cls):
+ super(TestGlobalACLs, cls).tearDownClass()
+
+ def setUp(self):
+ self.apiclient = self.testClient.getApiClient()
+ self.user_apiclient = self.testClient.getUserApiClient(self.services["user"]["username"],
+ self.services["domain"]["name"],
+ self.services["user"]["roletype"])
+
+ self.domain_admin_apiclient = self.testClient.getUserApiClient(self.services["domain_admin"]["username"],
+ self.services["domain"]["name"],
+ self.services["domain_admin"]["roletype"])
+
+ self.admin_apiclient = self.testClient.getUserApiClient(self.services["root_admin"]["username"],
+ self.services["root_domain"]["name"],
+ self.services["root_admin"]["roletype"])
+
+ self.cleanup = []
+ return
+
+ def tearDown(self):
+ try:
+ cleanup_resources(self.apiclient, self.cleanup)
+ cleanup_resources(self.user_apiclient, self.cleanup)
+ except Exception as e:
+ self.debug("Warning! Exception in tearDown: %s" % e)
+
+ @attr(tags=["advanced", "basic"], required_hardware="false")
+ def test_create_global_acl(self):
+ """ Test create global ACL as a normal user, domain admin and root admin users.
+ """
+
+ self.debug("Creating ACL list as a normal user, should raise exception.")
+ self.assertRaisesRegex(CloudstackAPIException, "Only Root Admin can create global ACLs.",
+ NetworkACLList.create, apiclient=self.user_apiclient, services={},
+ name="acl", description="acl")
+
+ self.debug("Creating ACL list as a domain admin, should raise exception.")
+ self.assertRaisesRegex(CloudstackAPIException, "Only Root Admin can create global ACLs.",
+ NetworkACLList.create, apiclient=self.domain_admin_apiclient, services={},
+ name="acl", description="acl")
+
+ self.debug("Creating ACL list as a root admin, should work.")
+ acl = NetworkACLList.create(apiclient=self.admin_apiclient, services={}, name="acl", description="acl")
+ self.assertIsNotNone(acl, "A root admin user should be able to create a global ACL.")
+
+ return
+
+ @attr(tags=["advanced", "basic"], required_hardware="false")
+ def test_replace_acl_of_network(self):
+ """ Test to replace ACL of a VPC as a normal user, domain admin and root admin users.
+ """
+ # Create network offering
+ networkOffering = NetworkOffering.list(self.apiclient, name="DefaultIsolatedNetworkOfferingForVpcNetworks")
+ self.assertTrue(networkOffering is not None and len(networkOffering) > 0, "No VPC based network offering")
+
+ # Getting VPC offering
+ vpcOffering = VpcOffering.list(self.apiclient, name="Default VPC offering")
+ self.assertTrue(vpcOffering is not None and len(vpcOffering) > 0, "No VPC offerings found")
+
+ # Creating VPC
+ vpc = VPC.create(
+ apiclient=self.apiclient,
+ services=self.services["vpc"],
+ networkDomain="vpc.networkacl",
+ vpcofferingid=vpcOffering[0].id,
+ zoneid=self.zone.id,
+ domainid=self.domain.id
+ )
+ self.assertTrue(vpc is not None, "VPC creation failed")
+
+ # Creating ACL list
+ acl = NetworkACLList.create(apiclient=self.apiclient, services={}, name="acl", description="acl")
+
+ # Creating tier on VPC with ACL list
+ network = Network.create(
+ apiclient=self.apiclient,
+ services=self.services["vpcnetwork"],
+ accountid="Admin",
+ domainid=self.domain.id,
+ networkofferingid=networkOffering[0].id,
+ zoneid=self.zone.id,
+ vpcid=vpc.id,
+ aclid=acl.id,
+ gateway="10.1.1.1",
+ netmask="255.255.255.192"
+ )
+
+ # User should be able to replace ACL
+ network.replaceACLList(apiclient=self.user_apiclient, aclid=acl.id)
+ # Domain Admin should be able to replace ACL
+ network.replaceACLList(apiclient=self.domain_admin_apiclient, aclid=acl.id)
+ # Admin should be able to replace ACL
+ network.replaceACLList(apiclient=self.admin_apiclient, aclid=acl.id)
+
+ return
+
+ @attr(tags=["advanced", "basic"], required_hardware="false")
+ def test_create_acl_rule(self):
+ """ Test to create ACL rule as a normal user, domain admin and root admin users.
+ """
+ # Creating ACL list
+ acl = NetworkACLList.create(apiclient=self.admin_apiclient, services={}, name="acl", description="acl")
+
+ self.debug("Creating ACL rule as a user, should raise exception.")
+ self.assertRaisesRegex(CloudstackAPIException, "Only Root Admins can create rules for a global ACL.",
+ NetworkACL.create, self.user_apiclient, services=self.services["rule"], aclid=acl.id)
+ self.debug("Creating ACL rule as a domain admin, should raise exception.")
+ self.assertRaisesRegex(CloudstackAPIException, "Only Root Admins can create rules for a global ACL.",
+ NetworkACL.create, self.domain_admin_apiclient, services=self.services["rule"], aclid=acl.id)
+ self.debug("Creating ACL rule as a root admin, should work.")
+ NetworkACL.create(self.admin_apiclient, services=self.services["rule"], aclid=acl.id)
+
+ return
+
+ @attr(tags=["advanced", "basic"], required_hardware="false")
+ def test_delete_acl_rule(self):
+ """ Test to delete ACL rule as a normal user, domain admin and root admin users.
+ """
+ # Creating ACL list
+ acl = NetworkACLList.create(apiclient=self.api_client, services={}, name="acl", description="acl")
+
+ # Creating ACL rule
+ acl_rule = NetworkACL.create(self.apiclient, services=self.services["rule"], aclid=acl.id)
+
+ self.debug("Deleting ACL rule as a user, should raise exception.")
+ self.assertRaisesRegex(Exception, "Only Root Admin can delete global ACL rules.",
+ NetworkACL.delete, acl_rule, self.user_apiclient)
+ self.debug("Deleting ACL rule as a domain admin, should raise exception.")
+ self.assertRaisesRegex(Exception, "Only Root Admin can delete global ACL rules.",
+ NetworkACL.delete, acl_rule, self.domain_admin_apiclient)
+ self.debug("Deleting ACL rule as a root admin, should work.")
+ NetworkACL.delete(acl_rule, self.admin_apiclient)
Review Comment:
```suggestion
NetworkACL.delete(acl_rule, self.admin_apiclient)
self.cleanup.remove(acl_rule)
```
so if an exception is thrown in between the cleanup is done properly
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [cloudstack] DaanHoogland commented on pull request #7150: Global ACL for VPCs
Posted by "DaanHoogland (via GitHub)" <gi...@apache.org>.
DaanHoogland commented on PR #7150:
URL: https://github.com/apache/cloudstack/pull/7150#issuecomment-1434437434
@blueorangutan test
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Global ACL for VPCs [cloudstack]
Posted by "blueorangutan (via GitHub)" <gi...@apache.org>.
blueorangutan commented on PR #7150:
URL: https://github.com/apache/cloudstack/pull/7150#issuecomment-1826482705
<b>[SF] Trillian test result (tid-8391)</b>
Environment: kvm-centos7 (x2), Advanced Networking with Mgmt server 7
Total time taken: 58616 seconds
Marvin logs: https://github.com/blueorangutan/acs-prs/releases/download/trillian/pr7150-t8391-kvm-centos7.zip
Smoke tests completed. 117 look OK, 2 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.05 | test_vm_life_cycle.py
test_02_redundant_VPC_default_routes | `Failure` | 380.19 | test_vpc_redundant.py
test_05_rvpc_multi_tiers | `Failure` | 459.34 | test_vpc_redundant.py
test_05_rvpc_multi_tiers | `Error` | 459.35 | test_vpc_redundant.py
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Global ACL for VPCs [cloudstack]
Posted by "blueorangutan (via GitHub)" <gi...@apache.org>.
blueorangutan commented on PR #7150:
URL: https://github.com/apache/cloudstack/pull/7150#issuecomment-1816189248
<b>[SF] Trillian Build Failed (tid-8343)<b/>
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Global ACL for VPCs [cloudstack]
Posted by "blueorangutan (via GitHub)" <gi...@apache.org>.
blueorangutan commented on PR #7150:
URL: https://github.com/apache/cloudstack/pull/7150#issuecomment-1831313655
Packaging result [SF]: :heavy_check_mark: el7 :heavy_check_mark: el8 :heavy_check_mark: el9 :heavy_check_mark: debian :heavy_check_mark: suse15. SL-JID 7863
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [cloudstack] blueorangutan commented on pull request #7150: Global ACL for VPCs
Posted by "blueorangutan (via GitHub)" <gi...@apache.org>.
blueorangutan commented on PR #7150:
URL: https://github.com/apache/cloudstack/pull/7150#issuecomment-1681732300
@DaanHoogland a [SF] Trillian-Jenkins test job (centos7 mgmt + kvm-centos7) has been kicked to run smoke tests
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [cloudstack] blueorangutan commented on pull request #7150: Global ACL for VPCs
Posted by "blueorangutan (via GitHub)" <gi...@apache.org>.
blueorangutan commented on PR #7150:
URL: https://github.com/apache/cloudstack/pull/7150#issuecomment-1680061977
@DaanHoogland a [SF] 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.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Global ACL for VPCs [cloudstack]
Posted by "DaanHoogland (via GitHub)" <gi...@apache.org>.
DaanHoogland commented on PR #7150:
URL: https://github.com/apache/cloudstack/pull/7150#issuecomment-1754798677
@stephankruggg are you good with this?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Global ACL for VPCs [cloudstack]
Posted by "blueorangutan (via GitHub)" <gi...@apache.org>.
blueorangutan commented on PR #7150:
URL: https://github.com/apache/cloudstack/pull/7150#issuecomment-1752558089
@shwstppr a [SF] 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.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [cloudstack] BryanMLima commented on a diff in pull request #7150: Global ACL for VPCs
Posted by "BryanMLima (via GitHub)" <gi...@apache.org>.
BryanMLima commented on code in PR #7150:
URL: https://github.com/apache/cloudstack/pull/7150#discussion_r1104659570
##########
server/src/main/java/com/cloud/network/vpc/NetworkACLServiceImpl.java:
##########
@@ -103,12 +104,15 @@ public class NetworkACLServiceImpl extends ManagerBase implements NetworkACLServ
@Override
public NetworkACL createNetworkACL(final String name, final String description, final long vpcId, final Boolean forDisplay) {
- final Account caller = CallContext.current().getCallingAccount();
- final Vpc vpc = _entityMgr.findById(Vpc.class, vpcId);
- if (vpc == null) {
- throw new InvalidParameterValueException("Unable to find VPC");
+ if (vpcId != 0) {
+ final Account caller = CallContext.current().getCallingAccount();
+ final Vpc vpc = _vpcDao.findById(vpcId);
Review Comment:
The method `_entityMgr.findById` will call the method `_vpcDao.findById`. Is there a reason to use `entityManager` in this case?
##########
server/src/main/java/com/cloud/network/vpc/NetworkACLServiceImpl.java:
##########
@@ -1138,17 +1133,59 @@ protected void validateMoveAclRulesData(NetworkACLItemVO ruleBeingMoved, Network
if (nextRule == null && previousRule == null) {
throw new InvalidParameterValueException("Both previous and next ACL rule IDs cannot be invalid.");
}
- long aclId = ruleBeingMoved.getAclId();
+ long ruleAclId = ruleBeingMoved.getAclId();
Review Comment:
I needed the ACL ID in the next lines, so I changed as to not create a var named `aclId1`; however, as I reviewed the code, the `ruleAclId` is the same as `aclId`, so I reverted this change.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [cloudstack] DaanHoogland commented on pull request #7150: Global ACL for VPCs
Posted by "DaanHoogland (via GitHub)" <gi...@apache.org>.
DaanHoogland commented on PR #7150:
URL: https://github.com/apache/cloudstack/pull/7150#issuecomment-1433318035
@blueorangutan package
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [cloudstack] DaanHoogland commented on a diff in pull request #7150: Global ACL for VPCs
Posted by "DaanHoogland (via GitHub)" <gi...@apache.org>.
DaanHoogland commented on code in PR #7150:
URL: https://github.com/apache/cloudstack/pull/7150#discussion_r1129189370
##########
test/integration/smoke/test_global_acls.py:
##########
@@ -0,0 +1,249 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+from marvin.cloudstackTestCase import cloudstackTestCase
+from marvin.lib.utils import cleanup_resources
+from marvin.lib.base import (Network, NetworkACLList, NetworkOffering, VpcOffering, VPC, NetworkACL)
+from marvin.lib.common import (get_domain, get_zone)
+from nose.plugins.attrib import attr
+from marvin.cloudstackException import CloudstackAPIException
+
+
+class Services:
+ """Test Global ACLs
+ """
+
+ def __init__(self):
+ self.services = {
+ "root_domain": {
+ "name": "ROOT",
+ },
+ "domain": {
+ "name": "Domain",
+ },
+ "user": {
+ "username": "user",
+ "roletype": 0,
+ },
+ "domain_admin": {
+ "username": "Domain admin",
+ "roletype": 2,
+ },
+ "root_admin": {
+ "username": "Root admin",
+ "roletype": 1,
+ },
+ "vpc": {
+ "name": "vpc-networkacl",
+ "displaytext": "vpc-networkacl",
+ "cidr": "10.1.1.0/24",
+ },
+ "vpcnetwork": {
+ "name": "vpcnetwork",
+ "displaytext": "vpcnetwork",
+ },
+ "rule": {
+ "protocol": "all",
+ "traffictype": "ingress",
+ }
+ }
+
+
+class TestGlobalACLs(cloudstackTestCase):
+
+ @classmethod
+ def setUpClass(cls):
+ cls.testClient = super(TestGlobalACLs, cls).getClsTestClient()
+ cls.apiclient = cls.testClient.getApiClient()
+
+ cls.services = Services().services
+ cls.domain = get_domain(cls.apiclient)
+ cls.zone = get_zone(cls.apiclient, cls.testClient.getZoneForTests())
+ return
+
+ @classmethod
+ def tearDownClass(cls):
Review Comment:
note: there is no cls._cleanup so no class level cleanup is done.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [cloudstack] BryanMLima commented on pull request #7150: Global ACL for VPCs
Posted by "BryanMLima (via GitHub)" <gi...@apache.org>.
BryanMLima commented on PR #7150:
URL: https://github.com/apache/cloudstack/pull/7150#issuecomment-1516278931
Hey @DaanHoogland @rohityadavcloud
Can we proceed with this one? Are the integration tests added enough?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [cloudstack] blueorangutan commented on pull request #7150: Global ACL for VPCs
Posted by "blueorangutan (via GitHub)" <gi...@apache.org>.
blueorangutan commented on PR #7150:
URL: https://github.com/apache/cloudstack/pull/7150#issuecomment-1680138629
Packaging result [SF]: :heavy_check_mark: el7 :heavy_check_mark: el8 :heavy_check_mark: el9 :heavy_check_mark: debian :heavy_check_mark: suse15. SL-JID 6792
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [cloudstack] DaanHoogland commented on a diff in pull request #7150: Global ACL for VPCs
Posted by "DaanHoogland (via GitHub)" <gi...@apache.org>.
DaanHoogland commented on code in PR #7150:
URL: https://github.com/apache/cloudstack/pull/7150#discussion_r1105846623
##########
test/integration/smoke/test_global_acls.py:
##########
@@ -0,0 +1,212 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+from marvin.cloudstackTestCase import cloudstackTestCase
+from marvin.lib.utils import cleanup_resources
+from marvin.lib.base import (Network, NetworkACLList, NetworkOffering, VpcOffering, VPC, NetworkACL)
+from marvin.lib.common import (get_domain, get_zone)
+from nose.plugins.attrib import attr
+from marvin.cloudstackException import CloudstackAPIException
+
+
+class Services:
+ """Test Global ACLs
+ """
+
+ def __init__(self):
+ self.services = {
+ "root_domain": {
+ "name": "ROOT",
+ },
+ "domain": {
+ "name": "Domain",
+ },
+ "user": {
+ "username": "user",
+ "roletype": 0,
+ },
+ "domain_admin": {
+ "username": "Domain admin",
+ "roletype": 2,
+ },
+ "root_admin": {
+ "username": "Root admin",
+ "roletype": 1,
+ },
+ "vpc": {
+ "name": "vpc-networkacl",
+ "displaytext": "vpc-networkacl",
+ "cidr": "10.1.1.0/24",
+ },
+ "vpcnetwork": {
+ "name": "vpcnetwork",
+ "displaytext": "vpcnetwork",
+ },
+ "rule": {
+ "protocol": "all",
+ "traffictype": "ingress",
+ }
+ }
+
+
+class TestGlobalACLs(cloudstackTestCase):
+
+ @classmethod
+ def setUpClass(cls):
+ cls.testClient = super(TestGlobalACLs, cls).getClsTestClient()
+ cls.api_client = cls.testClient.getApiClient()
+
+ cls.services = Services().services
+ cls.domain = get_domain(cls.api_client)
+ cls.zone = get_zone(cls.api_client, cls.testClient.getZoneForTests())
+ return
+
+ @classmethod
+ def tearDownClass(cls):
+ super(TestGlobalACLs, cls).tearDownClass()
+
+ def setUp(self):
+ self.apiclient = self.testClient.getApiClient()
+ self.user_apiclient = self.testClient.getUserApiClient(self.services["user"]["username"],
+ self.services["domain"]["name"],
+ self.services["user"]["roletype"])
+
+ self.domain_admin_apiclient = self.testClient.getUserApiClient(self.services["domain_admin"]["username"],
+ self.services["domain"]["name"],
+ self.services["domain_admin"]["roletype"])
+
+ self.admin_apiclient = self.testClient.getUserApiClient(self.services["root_admin"]["username"],
+ self.services["root_domain"]["name"],
+ self.services["root_admin"]["roletype"])
+
+ self.cleanup = []
+ return
+
+ def tearDown(self):
+ try:
+ cleanup_resources(self.apiclient, self.cleanup)
+ cleanup_resources(self.user_apiclient, self.cleanup)
+ except Exception as e:
+ self.debug("Warning! Exception in tearDown: %s" % e)
+
+ @attr(tags=["advanced", "basic"], required_hardware="false")
+ def test_create_global_acl(self):
+ """ Test create global ACL as a normal user, domain admin and root admin users.
+ """
+
+ self.debug("Creating ACL list as a normal user, should raise exception.")
+ self.assertRaisesRegex(CloudstackAPIException, "Only Root Admin can create global ACLs.",
+ NetworkACLList.create, apiclient=self.user_apiclient, services={},
+ name="acl", description="acl")
+
+ self.debug("Creating ACL list as a domain admin, should raise exception.")
+ self.assertRaisesRegex(CloudstackAPIException, "Only Root Admin can create global ACLs.",
+ NetworkACLList.create, apiclient=self.domain_admin_apiclient, services={},
+ name="acl", description="acl")
+
+ self.debug("Creating ACL list as a root admin, should work.")
+ acl = NetworkACLList.create(apiclient=self.admin_apiclient, services={}, name="acl", description="acl")
+ self.assertIsNotNone(acl, "A root admin user should be able to create a global ACL.")
+
+ return
+
+ @attr(tags=["advanced", "basic"], required_hardware="false")
+ def test_replace_acl_of_network(self):
+ """ Test to replace ACL of a VPC as a normal user, domain admin and root admin users.
+ """
+ # Create network offering
+ networkOffering = NetworkOffering.list(self.apiclient, name="DefaultIsolatedNetworkOfferingForVpcNetworks")
+ self.assertTrue(networkOffering is not None and len(networkOffering) > 0, "No VPC based network offering")
+
+ # Getting VPC offering
+ vpcOffering = VpcOffering.list(self.apiclient, name="Default VPC offering")
+ self.assertTrue(vpcOffering is not None and len(vpcOffering) > 0, "No VPC offerings found")
+
+ # Creating VPC
+ vpc = VPC.create(
+ apiclient=self.apiclient,
+ services=self.services["vpc"],
+ networkDomain="vpc.networkacl",
+ vpcofferingid=vpcOffering[0].id,
+ zoneid=self.zone.id,
+ domainid=self.domain.id
+ )
Review Comment:
```suggestion
vpc = VPC.create(
apiclient=self.apiclient,
services=self.services["vpc"],
networkDomain="vpc.networkacl",
vpcofferingid=vpcOffering[0].id,
zoneid=self.zone.id,
domainid=self.domain.id
)
self.cleanup.append(vpc)
```
##########
test/integration/smoke/test_global_acls.py:
##########
@@ -0,0 +1,212 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+from marvin.cloudstackTestCase import cloudstackTestCase
+from marvin.lib.utils import cleanup_resources
+from marvin.lib.base import (Network, NetworkACLList, NetworkOffering, VpcOffering, VPC, NetworkACL)
+from marvin.lib.common import (get_domain, get_zone)
+from nose.plugins.attrib import attr
+from marvin.cloudstackException import CloudstackAPIException
+
+
+class Services:
+ """Test Global ACLs
+ """
+
+ def __init__(self):
+ self.services = {
+ "root_domain": {
+ "name": "ROOT",
+ },
+ "domain": {
+ "name": "Domain",
+ },
+ "user": {
+ "username": "user",
+ "roletype": 0,
+ },
+ "domain_admin": {
+ "username": "Domain admin",
+ "roletype": 2,
+ },
+ "root_admin": {
+ "username": "Root admin",
+ "roletype": 1,
+ },
+ "vpc": {
+ "name": "vpc-networkacl",
+ "displaytext": "vpc-networkacl",
+ "cidr": "10.1.1.0/24",
+ },
+ "vpcnetwork": {
+ "name": "vpcnetwork",
+ "displaytext": "vpcnetwork",
+ },
+ "rule": {
+ "protocol": "all",
+ "traffictype": "ingress",
+ }
+ }
+
+
+class TestGlobalACLs(cloudstackTestCase):
+
+ @classmethod
+ def setUpClass(cls):
+ cls.testClient = super(TestGlobalACLs, cls).getClsTestClient()
+ cls.api_client = cls.testClient.getApiClient()
+
+ cls.services = Services().services
+ cls.domain = get_domain(cls.api_client)
+ cls.zone = get_zone(cls.api_client, cls.testClient.getZoneForTests())
+ return
+
+ @classmethod
+ def tearDownClass(cls):
+ super(TestGlobalACLs, cls).tearDownClass()
+
+ def setUp(self):
+ self.apiclient = self.testClient.getApiClient()
+ self.user_apiclient = self.testClient.getUserApiClient(self.services["user"]["username"],
+ self.services["domain"]["name"],
+ self.services["user"]["roletype"])
+
+ self.domain_admin_apiclient = self.testClient.getUserApiClient(self.services["domain_admin"]["username"],
+ self.services["domain"]["name"],
+ self.services["domain_admin"]["roletype"])
+
+ self.admin_apiclient = self.testClient.getUserApiClient(self.services["root_admin"]["username"],
+ self.services["root_domain"]["name"],
+ self.services["root_admin"]["roletype"])
+
+ self.cleanup = []
+ return
+
+ def tearDown(self):
+ try:
+ cleanup_resources(self.apiclient, self.cleanup)
+ cleanup_resources(self.user_apiclient, self.cleanup)
Review Comment:
I donΒ΄t think this will work. At least the list will have to be reversed to make sure no dependend resources are deleted after their dependencies which will lead to exceptions (being ignored in this case)
```suggestion
cleanup_resources(self.apiclient, reversed(self.cleanup))
cleanup_resources(self.user_apiclient, reversed(self.cleanup))
```
##########
test/integration/smoke/test_global_acls.py:
##########
@@ -0,0 +1,212 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+from marvin.cloudstackTestCase import cloudstackTestCase
+from marvin.lib.utils import cleanup_resources
+from marvin.lib.base import (Network, NetworkACLList, NetworkOffering, VpcOffering, VPC, NetworkACL)
+from marvin.lib.common import (get_domain, get_zone)
+from nose.plugins.attrib import attr
+from marvin.cloudstackException import CloudstackAPIException
+
+
+class Services:
+ """Test Global ACLs
+ """
+
+ def __init__(self):
+ self.services = {
+ "root_domain": {
+ "name": "ROOT",
+ },
+ "domain": {
+ "name": "Domain",
+ },
+ "user": {
+ "username": "user",
+ "roletype": 0,
+ },
+ "domain_admin": {
+ "username": "Domain admin",
+ "roletype": 2,
+ },
+ "root_admin": {
+ "username": "Root admin",
+ "roletype": 1,
+ },
+ "vpc": {
+ "name": "vpc-networkacl",
+ "displaytext": "vpc-networkacl",
+ "cidr": "10.1.1.0/24",
+ },
+ "vpcnetwork": {
+ "name": "vpcnetwork",
+ "displaytext": "vpcnetwork",
+ },
+ "rule": {
+ "protocol": "all",
+ "traffictype": "ingress",
+ }
+ }
+
+
+class TestGlobalACLs(cloudstackTestCase):
+
+ @classmethod
+ def setUpClass(cls):
+ cls.testClient = super(TestGlobalACLs, cls).getClsTestClient()
+ cls.api_client = cls.testClient.getApiClient()
+
+ cls.services = Services().services
+ cls.domain = get_domain(cls.api_client)
+ cls.zone = get_zone(cls.api_client, cls.testClient.getZoneForTests())
+ return
+
+ @classmethod
+ def tearDownClass(cls):
+ super(TestGlobalACLs, cls).tearDownClass()
+
+ def setUp(self):
+ self.apiclient = self.testClient.getApiClient()
+ self.user_apiclient = self.testClient.getUserApiClient(self.services["user"]["username"],
+ self.services["domain"]["name"],
+ self.services["user"]["roletype"])
+
+ self.domain_admin_apiclient = self.testClient.getUserApiClient(self.services["domain_admin"]["username"],
+ self.services["domain"]["name"],
+ self.services["domain_admin"]["roletype"])
+
+ self.admin_apiclient = self.testClient.getUserApiClient(self.services["root_admin"]["username"],
+ self.services["root_domain"]["name"],
+ self.services["root_admin"]["roletype"])
+
+ self.cleanup = []
+ return
+
+ def tearDown(self):
+ try:
+ cleanup_resources(self.apiclient, self.cleanup)
+ cleanup_resources(self.user_apiclient, self.cleanup)
+ except Exception as e:
+ self.debug("Warning! Exception in tearDown: %s" % e)
+
+ @attr(tags=["advanced", "basic"], required_hardware="false")
+ def test_create_global_acl(self):
+ """ Test create global ACL as a normal user, domain admin and root admin users.
+ """
+
+ self.debug("Creating ACL list as a normal user, should raise exception.")
+ self.assertRaisesRegex(CloudstackAPIException, "Only Root Admin can create global ACLs.",
+ NetworkACLList.create, apiclient=self.user_apiclient, services={},
+ name="acl", description="acl")
+
+ self.debug("Creating ACL list as a domain admin, should raise exception.")
+ self.assertRaisesRegex(CloudstackAPIException, "Only Root Admin can create global ACLs.",
+ NetworkACLList.create, apiclient=self.domain_admin_apiclient, services={},
+ name="acl", description="acl")
+
+ self.debug("Creating ACL list as a root admin, should work.")
+ acl = NetworkACLList.create(apiclient=self.admin_apiclient, services={}, name="acl", description="acl")
+ self.assertIsNotNone(acl, "A root admin user should be able to create a global ACL.")
+
+ return
+
+ @attr(tags=["advanced", "basic"], required_hardware="false")
+ def test_replace_acl_of_network(self):
+ """ Test to replace ACL of a VPC as a normal user, domain admin and root admin users.
+ """
+ # Create network offering
+ networkOffering = NetworkOffering.list(self.apiclient, name="DefaultIsolatedNetworkOfferingForVpcNetworks")
+ self.assertTrue(networkOffering is not None and len(networkOffering) > 0, "No VPC based network offering")
+
+ # Getting VPC offering
+ vpcOffering = VpcOffering.list(self.apiclient, name="Default VPC offering")
+ self.assertTrue(vpcOffering is not None and len(vpcOffering) > 0, "No VPC offerings found")
+
+ # Creating VPC
+ vpc = VPC.create(
+ apiclient=self.apiclient,
+ services=self.services["vpc"],
+ networkDomain="vpc.networkacl",
+ vpcofferingid=vpcOffering[0].id,
+ zoneid=self.zone.id,
+ domainid=self.domain.id
+ )
+ self.assertTrue(vpc is not None, "VPC creation failed")
+
+ # Creating ACL list
+ acl = NetworkACLList.create(apiclient=self.apiclient, services={}, name="acl", description="acl")
+
+ # Creating tier on VPC with ACL list
+ network = Network.create(
+ apiclient=self.apiclient,
+ services=self.services["vpcnetwork"],
+ accountid="Admin",
+ domainid=self.domain.id,
+ networkofferingid=networkOffering[0].id,
+ zoneid=self.zone.id,
+ vpcid=vpc.id,
+ aclid=acl.id,
+ gateway="10.1.1.1",
+ netmask="255.255.255.192"
+ )
+
+ # User should be able to replace ACL
+ network.replaceACLList(apiclient=self.user_apiclient, aclid=acl.id)
+ # Domain Admin should be able to replace ACL
+ network.replaceACLList(apiclient=self.domain_admin_apiclient, aclid=acl.id)
+ # Admin should be able to replace ACL
+ network.replaceACLList(apiclient=self.admin_apiclient, aclid=acl.id)
+
+ return
+
+ @attr(tags=["advanced", "basic"], required_hardware="false")
+ def test_create_acl_rule(self):
+ """ Test to create ACL rule as a normal user, domain admin and root admin users.
+ """
+ # Creating ACL list
+ acl = NetworkACLList.create(apiclient=self.admin_apiclient, services={}, name="acl", description="acl")
Review Comment:
```suggestion
acl = NetworkACLList.create(apiclient=self.admin_apiclient, services={}, name="acl", description="acl")
self.cleanup.append(acl)
```
##########
test/integration/smoke/test_global_acls.py:
##########
@@ -0,0 +1,212 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+from marvin.cloudstackTestCase import cloudstackTestCase
+from marvin.lib.utils import cleanup_resources
+from marvin.lib.base import (Network, NetworkACLList, NetworkOffering, VpcOffering, VPC, NetworkACL)
+from marvin.lib.common import (get_domain, get_zone)
+from nose.plugins.attrib import attr
+from marvin.cloudstackException import CloudstackAPIException
+
+
+class Services:
+ """Test Global ACLs
+ """
+
+ def __init__(self):
+ self.services = {
+ "root_domain": {
+ "name": "ROOT",
+ },
+ "domain": {
+ "name": "Domain",
+ },
+ "user": {
+ "username": "user",
+ "roletype": 0,
+ },
+ "domain_admin": {
+ "username": "Domain admin",
+ "roletype": 2,
+ },
+ "root_admin": {
+ "username": "Root admin",
+ "roletype": 1,
+ },
+ "vpc": {
+ "name": "vpc-networkacl",
+ "displaytext": "vpc-networkacl",
+ "cidr": "10.1.1.0/24",
+ },
+ "vpcnetwork": {
+ "name": "vpcnetwork",
+ "displaytext": "vpcnetwork",
+ },
+ "rule": {
+ "protocol": "all",
+ "traffictype": "ingress",
+ }
+ }
+
+
+class TestGlobalACLs(cloudstackTestCase):
+
+ @classmethod
+ def setUpClass(cls):
+ cls.testClient = super(TestGlobalACLs, cls).getClsTestClient()
+ cls.api_client = cls.testClient.getApiClient()
+
+ cls.services = Services().services
+ cls.domain = get_domain(cls.api_client)
+ cls.zone = get_zone(cls.api_client, cls.testClient.getZoneForTests())
+ return
+
+ @classmethod
+ def tearDownClass(cls):
+ super(TestGlobalACLs, cls).tearDownClass()
+
+ def setUp(self):
+ self.apiclient = self.testClient.getApiClient()
+ self.user_apiclient = self.testClient.getUserApiClient(self.services["user"]["username"],
+ self.services["domain"]["name"],
+ self.services["user"]["roletype"])
+
+ self.domain_admin_apiclient = self.testClient.getUserApiClient(self.services["domain_admin"]["username"],
+ self.services["domain"]["name"],
+ self.services["domain_admin"]["roletype"])
+
+ self.admin_apiclient = self.testClient.getUserApiClient(self.services["root_admin"]["username"],
+ self.services["root_domain"]["name"],
+ self.services["root_admin"]["roletype"])
+
+ self.cleanup = []
+ return
+
+ def tearDown(self):
+ try:
+ cleanup_resources(self.apiclient, self.cleanup)
+ cleanup_resources(self.user_apiclient, self.cleanup)
+ except Exception as e:
+ self.debug("Warning! Exception in tearDown: %s" % e)
+
+ @attr(tags=["advanced", "basic"], required_hardware="false")
+ def test_create_global_acl(self):
+ """ Test create global ACL as a normal user, domain admin and root admin users.
+ """
+
+ self.debug("Creating ACL list as a normal user, should raise exception.")
+ self.assertRaisesRegex(CloudstackAPIException, "Only Root Admin can create global ACLs.",
+ NetworkACLList.create, apiclient=self.user_apiclient, services={},
+ name="acl", description="acl")
+
+ self.debug("Creating ACL list as a domain admin, should raise exception.")
+ self.assertRaisesRegex(CloudstackAPIException, "Only Root Admin can create global ACLs.",
+ NetworkACLList.create, apiclient=self.domain_admin_apiclient, services={},
+ name="acl", description="acl")
+
+ self.debug("Creating ACL list as a root admin, should work.")
+ acl = NetworkACLList.create(apiclient=self.admin_apiclient, services={}, name="acl", description="acl")
+ self.assertIsNotNone(acl, "A root admin user should be able to create a global ACL.")
+
+ return
+
+ @attr(tags=["advanced", "basic"], required_hardware="false")
+ def test_replace_acl_of_network(self):
+ """ Test to replace ACL of a VPC as a normal user, domain admin and root admin users.
+ """
+ # Create network offering
+ networkOffering = NetworkOffering.list(self.apiclient, name="DefaultIsolatedNetworkOfferingForVpcNetworks")
+ self.assertTrue(networkOffering is not None and len(networkOffering) > 0, "No VPC based network offering")
+
+ # Getting VPC offering
+ vpcOffering = VpcOffering.list(self.apiclient, name="Default VPC offering")
+ self.assertTrue(vpcOffering is not None and len(vpcOffering) > 0, "No VPC offerings found")
+
+ # Creating VPC
+ vpc = VPC.create(
+ apiclient=self.apiclient,
+ services=self.services["vpc"],
+ networkDomain="vpc.networkacl",
+ vpcofferingid=vpcOffering[0].id,
+ zoneid=self.zone.id,
+ domainid=self.domain.id
+ )
+ self.assertTrue(vpc is not None, "VPC creation failed")
+
+ # Creating ACL list
+ acl = NetworkACLList.create(apiclient=self.apiclient, services={}, name="acl", description="acl")
+
+ # Creating tier on VPC with ACL list
+ network = Network.create(
+ apiclient=self.apiclient,
+ services=self.services["vpcnetwork"],
+ accountid="Admin",
+ domainid=self.domain.id,
+ networkofferingid=networkOffering[0].id,
+ zoneid=self.zone.id,
+ vpcid=vpc.id,
+ aclid=acl.id,
+ gateway="10.1.1.1",
+ netmask="255.255.255.192"
+ )
+
+ # User should be able to replace ACL
+ network.replaceACLList(apiclient=self.user_apiclient, aclid=acl.id)
+ # Domain Admin should be able to replace ACL
+ network.replaceACLList(apiclient=self.domain_admin_apiclient, aclid=acl.id)
+ # Admin should be able to replace ACL
+ network.replaceACLList(apiclient=self.admin_apiclient, aclid=acl.id)
+
+ return
+
+ @attr(tags=["advanced", "basic"], required_hardware="false")
+ def test_create_acl_rule(self):
+ """ Test to create ACL rule as a normal user, domain admin and root admin users.
+ """
+ # Creating ACL list
+ acl = NetworkACLList.create(apiclient=self.admin_apiclient, services={}, name="acl", description="acl")
+
+ self.debug("Creating ACL rule as a user, should raise exception.")
+ self.assertRaisesRegex(CloudstackAPIException, "Only Root Admins can create rules for a global ACL.",
+ NetworkACL.create, self.user_apiclient, services=self.services["rule"], aclid=acl.id)
+ self.debug("Creating ACL rule as a domain admin, should raise exception.")
+ self.assertRaisesRegex(CloudstackAPIException, "Only Root Admins can create rules for a global ACL.",
+ NetworkACL.create, self.domain_admin_apiclient, services=self.services["rule"], aclid=acl.id)
+ self.debug("Creating ACL rule as a root admin, should work.")
+ NetworkACL.create(self.admin_apiclient, services=self.services["rule"], aclid=acl.id)
+
+ return
+
+ @attr(tags=["advanced", "basic"], required_hardware="false")
+ def test_delete_acl_rule(self):
+ """ Test to delete ACL rule as a normal user, domain admin and root admin users.
+ """
+ # Creating ACL list
+ acl = NetworkACLList.create(apiclient=self.api_client, services={}, name="acl", description="acl")
Review Comment:
```suggestion
acl = NetworkACLList.create(apiclient=self.api_client, services={}, name="acl", description="acl")
self.cleanup.append(acl)
```
##########
test/integration/smoke/test_global_acls.py:
##########
@@ -0,0 +1,212 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+from marvin.cloudstackTestCase import cloudstackTestCase
+from marvin.lib.utils import cleanup_resources
+from marvin.lib.base import (Network, NetworkACLList, NetworkOffering, VpcOffering, VPC, NetworkACL)
+from marvin.lib.common import (get_domain, get_zone)
+from nose.plugins.attrib import attr
+from marvin.cloudstackException import CloudstackAPIException
+
+
+class Services:
+ """Test Global ACLs
+ """
+
+ def __init__(self):
+ self.services = {
+ "root_domain": {
+ "name": "ROOT",
+ },
+ "domain": {
+ "name": "Domain",
+ },
+ "user": {
+ "username": "user",
+ "roletype": 0,
+ },
+ "domain_admin": {
+ "username": "Domain admin",
+ "roletype": 2,
+ },
+ "root_admin": {
+ "username": "Root admin",
+ "roletype": 1,
+ },
+ "vpc": {
+ "name": "vpc-networkacl",
+ "displaytext": "vpc-networkacl",
+ "cidr": "10.1.1.0/24",
+ },
+ "vpcnetwork": {
+ "name": "vpcnetwork",
+ "displaytext": "vpcnetwork",
+ },
+ "rule": {
+ "protocol": "all",
+ "traffictype": "ingress",
+ }
+ }
+
+
+class TestGlobalACLs(cloudstackTestCase):
+
+ @classmethod
+ def setUpClass(cls):
+ cls.testClient = super(TestGlobalACLs, cls).getClsTestClient()
+ cls.api_client = cls.testClient.getApiClient()
+
+ cls.services = Services().services
+ cls.domain = get_domain(cls.api_client)
+ cls.zone = get_zone(cls.api_client, cls.testClient.getZoneForTests())
+ return
+
+ @classmethod
+ def tearDownClass(cls):
+ super(TestGlobalACLs, cls).tearDownClass()
+
+ def setUp(self):
+ self.apiclient = self.testClient.getApiClient()
+ self.user_apiclient = self.testClient.getUserApiClient(self.services["user"]["username"],
+ self.services["domain"]["name"],
+ self.services["user"]["roletype"])
+
+ self.domain_admin_apiclient = self.testClient.getUserApiClient(self.services["domain_admin"]["username"],
+ self.services["domain"]["name"],
+ self.services["domain_admin"]["roletype"])
+
+ self.admin_apiclient = self.testClient.getUserApiClient(self.services["root_admin"]["username"],
+ self.services["root_domain"]["name"],
+ self.services["root_admin"]["roletype"])
+
+ self.cleanup = []
+ return
+
+ def tearDown(self):
+ try:
+ cleanup_resources(self.apiclient, self.cleanup)
+ cleanup_resources(self.user_apiclient, self.cleanup)
+ except Exception as e:
+ self.debug("Warning! Exception in tearDown: %s" % e)
+
+ @attr(tags=["advanced", "basic"], required_hardware="false")
+ def test_create_global_acl(self):
+ """ Test create global ACL as a normal user, domain admin and root admin users.
+ """
+
+ self.debug("Creating ACL list as a normal user, should raise exception.")
+ self.assertRaisesRegex(CloudstackAPIException, "Only Root Admin can create global ACLs.",
+ NetworkACLList.create, apiclient=self.user_apiclient, services={},
+ name="acl", description="acl")
+
+ self.debug("Creating ACL list as a domain admin, should raise exception.")
+ self.assertRaisesRegex(CloudstackAPIException, "Only Root Admin can create global ACLs.",
+ NetworkACLList.create, apiclient=self.domain_admin_apiclient, services={},
+ name="acl", description="acl")
+
+ self.debug("Creating ACL list as a root admin, should work.")
+ acl = NetworkACLList.create(apiclient=self.admin_apiclient, services={}, name="acl", description="acl")
Review Comment:
```suggestion
acl = NetworkACLList.create(apiclient=self.admin_apiclient, services={}, name="acl", description="acl")
self.cleanup.append(acl)
```
##########
test/integration/smoke/test_global_acls.py:
##########
@@ -0,0 +1,212 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+from marvin.cloudstackTestCase import cloudstackTestCase
+from marvin.lib.utils import cleanup_resources
+from marvin.lib.base import (Network, NetworkACLList, NetworkOffering, VpcOffering, VPC, NetworkACL)
+from marvin.lib.common import (get_domain, get_zone)
+from nose.plugins.attrib import attr
+from marvin.cloudstackException import CloudstackAPIException
+
+
+class Services:
+ """Test Global ACLs
+ """
+
+ def __init__(self):
+ self.services = {
+ "root_domain": {
+ "name": "ROOT",
+ },
+ "domain": {
+ "name": "Domain",
+ },
+ "user": {
+ "username": "user",
+ "roletype": 0,
+ },
+ "domain_admin": {
+ "username": "Domain admin",
+ "roletype": 2,
+ },
+ "root_admin": {
+ "username": "Root admin",
+ "roletype": 1,
+ },
+ "vpc": {
+ "name": "vpc-networkacl",
+ "displaytext": "vpc-networkacl",
+ "cidr": "10.1.1.0/24",
+ },
+ "vpcnetwork": {
+ "name": "vpcnetwork",
+ "displaytext": "vpcnetwork",
+ },
+ "rule": {
+ "protocol": "all",
+ "traffictype": "ingress",
+ }
+ }
+
+
+class TestGlobalACLs(cloudstackTestCase):
+
+ @classmethod
+ def setUpClass(cls):
+ cls.testClient = super(TestGlobalACLs, cls).getClsTestClient()
+ cls.api_client = cls.testClient.getApiClient()
+
+ cls.services = Services().services
+ cls.domain = get_domain(cls.api_client)
+ cls.zone = get_zone(cls.api_client, cls.testClient.getZoneForTests())
+ return
+
+ @classmethod
+ def tearDownClass(cls):
+ super(TestGlobalACLs, cls).tearDownClass()
+
+ def setUp(self):
+ self.apiclient = self.testClient.getApiClient()
+ self.user_apiclient = self.testClient.getUserApiClient(self.services["user"]["username"],
+ self.services["domain"]["name"],
+ self.services["user"]["roletype"])
+
+ self.domain_admin_apiclient = self.testClient.getUserApiClient(self.services["domain_admin"]["username"],
+ self.services["domain"]["name"],
+ self.services["domain_admin"]["roletype"])
+
+ self.admin_apiclient = self.testClient.getUserApiClient(self.services["root_admin"]["username"],
+ self.services["root_domain"]["name"],
+ self.services["root_admin"]["roletype"])
+
+ self.cleanup = []
+ return
+
+ def tearDown(self):
+ try:
+ cleanup_resources(self.apiclient, self.cleanup)
+ cleanup_resources(self.user_apiclient, self.cleanup)
+ except Exception as e:
+ self.debug("Warning! Exception in tearDown: %s" % e)
+
+ @attr(tags=["advanced", "basic"], required_hardware="false")
+ def test_create_global_acl(self):
+ """ Test create global ACL as a normal user, domain admin and root admin users.
+ """
+
+ self.debug("Creating ACL list as a normal user, should raise exception.")
+ self.assertRaisesRegex(CloudstackAPIException, "Only Root Admin can create global ACLs.",
+ NetworkACLList.create, apiclient=self.user_apiclient, services={},
+ name="acl", description="acl")
+
+ self.debug("Creating ACL list as a domain admin, should raise exception.")
+ self.assertRaisesRegex(CloudstackAPIException, "Only Root Admin can create global ACLs.",
+ NetworkACLList.create, apiclient=self.domain_admin_apiclient, services={},
+ name="acl", description="acl")
+
+ self.debug("Creating ACL list as a root admin, should work.")
+ acl = NetworkACLList.create(apiclient=self.admin_apiclient, services={}, name="acl", description="acl")
+ self.assertIsNotNone(acl, "A root admin user should be able to create a global ACL.")
+
+ return
+
+ @attr(tags=["advanced", "basic"], required_hardware="false")
+ def test_replace_acl_of_network(self):
+ """ Test to replace ACL of a VPC as a normal user, domain admin and root admin users.
+ """
+ # Create network offering
+ networkOffering = NetworkOffering.list(self.apiclient, name="DefaultIsolatedNetworkOfferingForVpcNetworks")
+ self.assertTrue(networkOffering is not None and len(networkOffering) > 0, "No VPC based network offering")
+
+ # Getting VPC offering
+ vpcOffering = VpcOffering.list(self.apiclient, name="Default VPC offering")
+ self.assertTrue(vpcOffering is not None and len(vpcOffering) > 0, "No VPC offerings found")
+
+ # Creating VPC
+ vpc = VPC.create(
+ apiclient=self.apiclient,
+ services=self.services["vpc"],
+ networkDomain="vpc.networkacl",
+ vpcofferingid=vpcOffering[0].id,
+ zoneid=self.zone.id,
+ domainid=self.domain.id
+ )
+ self.assertTrue(vpc is not None, "VPC creation failed")
+
+ # Creating ACL list
+ acl = NetworkACLList.create(apiclient=self.apiclient, services={}, name="acl", description="acl")
+
+ # Creating tier on VPC with ACL list
+ network = Network.create(
+ apiclient=self.apiclient,
+ services=self.services["vpcnetwork"],
+ accountid="Admin",
+ domainid=self.domain.id,
+ networkofferingid=networkOffering[0].id,
+ zoneid=self.zone.id,
+ vpcid=vpc.id,
+ aclid=acl.id,
+ gateway="10.1.1.1",
+ netmask="255.255.255.192"
+ )
Review Comment:
```suggestion
network = Network.create(
apiclient=self.apiclient,
services=self.services["vpcnetwork"],
accountid="Admin",
domainid=self.domain.id,
networkofferingid=networkOffering[0].id,
zoneid=self.zone.id,
vpcid=vpc.id,
aclid=acl.id,
gateway="10.1.1.1",
netmask="255.255.255.192"
)
self.cleanup.append(network)
```
##########
test/integration/smoke/test_global_acls.py:
##########
@@ -0,0 +1,212 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+from marvin.cloudstackTestCase import cloudstackTestCase
+from marvin.lib.utils import cleanup_resources
+from marvin.lib.base import (Network, NetworkACLList, NetworkOffering, VpcOffering, VPC, NetworkACL)
+from marvin.lib.common import (get_domain, get_zone)
+from nose.plugins.attrib import attr
+from marvin.cloudstackException import CloudstackAPIException
+
+
+class Services:
+ """Test Global ACLs
+ """
+
+ def __init__(self):
+ self.services = {
+ "root_domain": {
+ "name": "ROOT",
+ },
+ "domain": {
+ "name": "Domain",
+ },
+ "user": {
+ "username": "user",
+ "roletype": 0,
+ },
+ "domain_admin": {
+ "username": "Domain admin",
+ "roletype": 2,
+ },
+ "root_admin": {
+ "username": "Root admin",
+ "roletype": 1,
+ },
+ "vpc": {
+ "name": "vpc-networkacl",
+ "displaytext": "vpc-networkacl",
+ "cidr": "10.1.1.0/24",
+ },
+ "vpcnetwork": {
+ "name": "vpcnetwork",
+ "displaytext": "vpcnetwork",
+ },
+ "rule": {
+ "protocol": "all",
+ "traffictype": "ingress",
+ }
+ }
+
+
+class TestGlobalACLs(cloudstackTestCase):
+
+ @classmethod
+ def setUpClass(cls):
+ cls.testClient = super(TestGlobalACLs, cls).getClsTestClient()
+ cls.api_client = cls.testClient.getApiClient()
+
+ cls.services = Services().services
+ cls.domain = get_domain(cls.api_client)
+ cls.zone = get_zone(cls.api_client, cls.testClient.getZoneForTests())
+ return
+
+ @classmethod
+ def tearDownClass(cls):
+ super(TestGlobalACLs, cls).tearDownClass()
+
+ def setUp(self):
+ self.apiclient = self.testClient.getApiClient()
+ self.user_apiclient = self.testClient.getUserApiClient(self.services["user"]["username"],
+ self.services["domain"]["name"],
+ self.services["user"]["roletype"])
+
+ self.domain_admin_apiclient = self.testClient.getUserApiClient(self.services["domain_admin"]["username"],
+ self.services["domain"]["name"],
+ self.services["domain_admin"]["roletype"])
+
+ self.admin_apiclient = self.testClient.getUserApiClient(self.services["root_admin"]["username"],
+ self.services["root_domain"]["name"],
+ self.services["root_admin"]["roletype"])
+
+ self.cleanup = []
+ return
+
+ def tearDown(self):
+ try:
+ cleanup_resources(self.apiclient, self.cleanup)
+ cleanup_resources(self.user_apiclient, self.cleanup)
+ except Exception as e:
+ self.debug("Warning! Exception in tearDown: %s" % e)
+
+ @attr(tags=["advanced", "basic"], required_hardware="false")
+ def test_create_global_acl(self):
+ """ Test create global ACL as a normal user, domain admin and root admin users.
+ """
+
+ self.debug("Creating ACL list as a normal user, should raise exception.")
+ self.assertRaisesRegex(CloudstackAPIException, "Only Root Admin can create global ACLs.",
+ NetworkACLList.create, apiclient=self.user_apiclient, services={},
+ name="acl", description="acl")
+
+ self.debug("Creating ACL list as a domain admin, should raise exception.")
+ self.assertRaisesRegex(CloudstackAPIException, "Only Root Admin can create global ACLs.",
+ NetworkACLList.create, apiclient=self.domain_admin_apiclient, services={},
+ name="acl", description="acl")
+
+ self.debug("Creating ACL list as a root admin, should work.")
+ acl = NetworkACLList.create(apiclient=self.admin_apiclient, services={}, name="acl", description="acl")
+ self.assertIsNotNone(acl, "A root admin user should be able to create a global ACL.")
+
+ return
+
+ @attr(tags=["advanced", "basic"], required_hardware="false")
+ def test_replace_acl_of_network(self):
+ """ Test to replace ACL of a VPC as a normal user, domain admin and root admin users.
+ """
+ # Create network offering
+ networkOffering = NetworkOffering.list(self.apiclient, name="DefaultIsolatedNetworkOfferingForVpcNetworks")
+ self.assertTrue(networkOffering is not None and len(networkOffering) > 0, "No VPC based network offering")
+
+ # Getting VPC offering
+ vpcOffering = VpcOffering.list(self.apiclient, name="Default VPC offering")
+ self.assertTrue(vpcOffering is not None and len(vpcOffering) > 0, "No VPC offerings found")
+
+ # Creating VPC
+ vpc = VPC.create(
+ apiclient=self.apiclient,
+ services=self.services["vpc"],
+ networkDomain="vpc.networkacl",
+ vpcofferingid=vpcOffering[0].id,
+ zoneid=self.zone.id,
+ domainid=self.domain.id
+ )
+ self.assertTrue(vpc is not None, "VPC creation failed")
+
+ # Creating ACL list
+ acl = NetworkACLList.create(apiclient=self.apiclient, services={}, name="acl", description="acl")
+
+ # Creating tier on VPC with ACL list
+ network = Network.create(
+ apiclient=self.apiclient,
+ services=self.services["vpcnetwork"],
+ accountid="Admin",
+ domainid=self.domain.id,
+ networkofferingid=networkOffering[0].id,
+ zoneid=self.zone.id,
+ vpcid=vpc.id,
+ aclid=acl.id,
+ gateway="10.1.1.1",
+ netmask="255.255.255.192"
+ )
+
+ # User should be able to replace ACL
+ network.replaceACLList(apiclient=self.user_apiclient, aclid=acl.id)
+ # Domain Admin should be able to replace ACL
+ network.replaceACLList(apiclient=self.domain_admin_apiclient, aclid=acl.id)
+ # Admin should be able to replace ACL
+ network.replaceACLList(apiclient=self.admin_apiclient, aclid=acl.id)
+
+ return
+
+ @attr(tags=["advanced", "basic"], required_hardware="false")
+ def test_create_acl_rule(self):
+ """ Test to create ACL rule as a normal user, domain admin and root admin users.
+ """
+ # Creating ACL list
+ acl = NetworkACLList.create(apiclient=self.admin_apiclient, services={}, name="acl", description="acl")
+
+ self.debug("Creating ACL rule as a user, should raise exception.")
+ self.assertRaisesRegex(CloudstackAPIException, "Only Root Admins can create rules for a global ACL.",
+ NetworkACL.create, self.user_apiclient, services=self.services["rule"], aclid=acl.id)
+ self.debug("Creating ACL rule as a domain admin, should raise exception.")
+ self.assertRaisesRegex(CloudstackAPIException, "Only Root Admins can create rules for a global ACL.",
+ NetworkACL.create, self.domain_admin_apiclient, services=self.services["rule"], aclid=acl.id)
+ self.debug("Creating ACL rule as a root admin, should work.")
+ NetworkACL.create(self.admin_apiclient, services=self.services["rule"], aclid=acl.id)
Review Comment:
```suggestion
acl2 = NetworkACL.create(self.admin_apiclient, services=self.services["rule"], aclid=acl.id)
self.cleanup.append(acl2)
```
##########
test/integration/smoke/test_global_acls.py:
##########
@@ -0,0 +1,212 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+from marvin.cloudstackTestCase import cloudstackTestCase
+from marvin.lib.utils import cleanup_resources
+from marvin.lib.base import (Network, NetworkACLList, NetworkOffering, VpcOffering, VPC, NetworkACL)
+from marvin.lib.common import (get_domain, get_zone)
+from nose.plugins.attrib import attr
+from marvin.cloudstackException import CloudstackAPIException
+
+
+class Services:
+ """Test Global ACLs
+ """
+
+ def __init__(self):
+ self.services = {
+ "root_domain": {
+ "name": "ROOT",
+ },
+ "domain": {
+ "name": "Domain",
+ },
+ "user": {
+ "username": "user",
+ "roletype": 0,
+ },
+ "domain_admin": {
+ "username": "Domain admin",
+ "roletype": 2,
+ },
+ "root_admin": {
+ "username": "Root admin",
+ "roletype": 1,
+ },
+ "vpc": {
+ "name": "vpc-networkacl",
+ "displaytext": "vpc-networkacl",
+ "cidr": "10.1.1.0/24",
+ },
+ "vpcnetwork": {
+ "name": "vpcnetwork",
+ "displaytext": "vpcnetwork",
+ },
+ "rule": {
+ "protocol": "all",
+ "traffictype": "ingress",
+ }
+ }
+
+
+class TestGlobalACLs(cloudstackTestCase):
+
+ @classmethod
+ def setUpClass(cls):
+ cls.testClient = super(TestGlobalACLs, cls).getClsTestClient()
+ cls.api_client = cls.testClient.getApiClient()
+
+ cls.services = Services().services
+ cls.domain = get_domain(cls.api_client)
+ cls.zone = get_zone(cls.api_client, cls.testClient.getZoneForTests())
+ return
+
+ @classmethod
+ def tearDownClass(cls):
+ super(TestGlobalACLs, cls).tearDownClass()
+
+ def setUp(self):
+ self.apiclient = self.testClient.getApiClient()
+ self.user_apiclient = self.testClient.getUserApiClient(self.services["user"]["username"],
+ self.services["domain"]["name"],
+ self.services["user"]["roletype"])
+
+ self.domain_admin_apiclient = self.testClient.getUserApiClient(self.services["domain_admin"]["username"],
+ self.services["domain"]["name"],
+ self.services["domain_admin"]["roletype"])
+
+ self.admin_apiclient = self.testClient.getUserApiClient(self.services["root_admin"]["username"],
+ self.services["root_domain"]["name"],
+ self.services["root_admin"]["roletype"])
+
+ self.cleanup = []
+ return
+
+ def tearDown(self):
+ try:
+ cleanup_resources(self.apiclient, self.cleanup)
+ cleanup_resources(self.user_apiclient, self.cleanup)
+ except Exception as e:
+ self.debug("Warning! Exception in tearDown: %s" % e)
+
+ @attr(tags=["advanced", "basic"], required_hardware="false")
+ def test_create_global_acl(self):
+ """ Test create global ACL as a normal user, domain admin and root admin users.
+ """
+
+ self.debug("Creating ACL list as a normal user, should raise exception.")
+ self.assertRaisesRegex(CloudstackAPIException, "Only Root Admin can create global ACLs.",
+ NetworkACLList.create, apiclient=self.user_apiclient, services={},
+ name="acl", description="acl")
+
+ self.debug("Creating ACL list as a domain admin, should raise exception.")
+ self.assertRaisesRegex(CloudstackAPIException, "Only Root Admin can create global ACLs.",
+ NetworkACLList.create, apiclient=self.domain_admin_apiclient, services={},
+ name="acl", description="acl")
+
+ self.debug("Creating ACL list as a root admin, should work.")
+ acl = NetworkACLList.create(apiclient=self.admin_apiclient, services={}, name="acl", description="acl")
+ self.assertIsNotNone(acl, "A root admin user should be able to create a global ACL.")
+
+ return
+
+ @attr(tags=["advanced", "basic"], required_hardware="false")
+ def test_replace_acl_of_network(self):
+ """ Test to replace ACL of a VPC as a normal user, domain admin and root admin users.
+ """
+ # Create network offering
+ networkOffering = NetworkOffering.list(self.apiclient, name="DefaultIsolatedNetworkOfferingForVpcNetworks")
+ self.assertTrue(networkOffering is not None and len(networkOffering) > 0, "No VPC based network offering")
+
+ # Getting VPC offering
+ vpcOffering = VpcOffering.list(self.apiclient, name="Default VPC offering")
+ self.assertTrue(vpcOffering is not None and len(vpcOffering) > 0, "No VPC offerings found")
+
+ # Creating VPC
+ vpc = VPC.create(
+ apiclient=self.apiclient,
+ services=self.services["vpc"],
+ networkDomain="vpc.networkacl",
+ vpcofferingid=vpcOffering[0].id,
+ zoneid=self.zone.id,
+ domainid=self.domain.id
+ )
+ self.assertTrue(vpc is not None, "VPC creation failed")
+
+ # Creating ACL list
+ acl = NetworkACLList.create(apiclient=self.apiclient, services={}, name="acl", description="acl")
+
+ # Creating tier on VPC with ACL list
+ network = Network.create(
+ apiclient=self.apiclient,
+ services=self.services["vpcnetwork"],
+ accountid="Admin",
+ domainid=self.domain.id,
+ networkofferingid=networkOffering[0].id,
+ zoneid=self.zone.id,
+ vpcid=vpc.id,
+ aclid=acl.id,
+ gateway="10.1.1.1",
+ netmask="255.255.255.192"
+ )
+
+ # User should be able to replace ACL
+ network.replaceACLList(apiclient=self.user_apiclient, aclid=acl.id)
+ # Domain Admin should be able to replace ACL
+ network.replaceACLList(apiclient=self.domain_admin_apiclient, aclid=acl.id)
+ # Admin should be able to replace ACL
+ network.replaceACLList(apiclient=self.admin_apiclient, aclid=acl.id)
+
+ return
+
+ @attr(tags=["advanced", "basic"], required_hardware="false")
+ def test_create_acl_rule(self):
+ """ Test to create ACL rule as a normal user, domain admin and root admin users.
+ """
+ # Creating ACL list
+ acl = NetworkACLList.create(apiclient=self.admin_apiclient, services={}, name="acl", description="acl")
+
+ self.debug("Creating ACL rule as a user, should raise exception.")
+ self.assertRaisesRegex(CloudstackAPIException, "Only Root Admins can create rules for a global ACL.",
+ NetworkACL.create, self.user_apiclient, services=self.services["rule"], aclid=acl.id)
+ self.debug("Creating ACL rule as a domain admin, should raise exception.")
+ self.assertRaisesRegex(CloudstackAPIException, "Only Root Admins can create rules for a global ACL.",
+ NetworkACL.create, self.domain_admin_apiclient, services=self.services["rule"], aclid=acl.id)
+ self.debug("Creating ACL rule as a root admin, should work.")
+ NetworkACL.create(self.admin_apiclient, services=self.services["rule"], aclid=acl.id)
+
+ return
+
+ @attr(tags=["advanced", "basic"], required_hardware="false")
+ def test_delete_acl_rule(self):
+ """ Test to delete ACL rule as a normal user, domain admin and root admin users.
+ """
+ # Creating ACL list
+ acl = NetworkACLList.create(apiclient=self.api_client, services={}, name="acl", description="acl")
+
+ # Creating ACL rule
+ acl_rule = NetworkACL.create(self.apiclient, services=self.services["rule"], aclid=acl.id)
Review Comment:
```suggestion
acl_rule = NetworkACL.create(self.apiclient, services=self.services["rule"], aclid=acl.id)
self.cleanup.append(acl_rule)
```
##########
test/integration/smoke/test_global_acls.py:
##########
@@ -0,0 +1,212 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+from marvin.cloudstackTestCase import cloudstackTestCase
+from marvin.lib.utils import cleanup_resources
+from marvin.lib.base import (Network, NetworkACLList, NetworkOffering, VpcOffering, VPC, NetworkACL)
+from marvin.lib.common import (get_domain, get_zone)
+from nose.plugins.attrib import attr
+from marvin.cloudstackException import CloudstackAPIException
+
+
+class Services:
+ """Test Global ACLs
+ """
+
+ def __init__(self):
+ self.services = {
+ "root_domain": {
+ "name": "ROOT",
+ },
+ "domain": {
+ "name": "Domain",
+ },
+ "user": {
+ "username": "user",
+ "roletype": 0,
+ },
+ "domain_admin": {
+ "username": "Domain admin",
+ "roletype": 2,
+ },
+ "root_admin": {
+ "username": "Root admin",
+ "roletype": 1,
+ },
+ "vpc": {
+ "name": "vpc-networkacl",
+ "displaytext": "vpc-networkacl",
+ "cidr": "10.1.1.0/24",
+ },
+ "vpcnetwork": {
+ "name": "vpcnetwork",
+ "displaytext": "vpcnetwork",
+ },
+ "rule": {
+ "protocol": "all",
+ "traffictype": "ingress",
+ }
+ }
+
+
+class TestGlobalACLs(cloudstackTestCase):
+
+ @classmethod
+ def setUpClass(cls):
+ cls.testClient = super(TestGlobalACLs, cls).getClsTestClient()
+ cls.api_client = cls.testClient.getApiClient()
+
+ cls.services = Services().services
+ cls.domain = get_domain(cls.api_client)
+ cls.zone = get_zone(cls.api_client, cls.testClient.getZoneForTests())
+ return
+
+ @classmethod
+ def tearDownClass(cls):
+ super(TestGlobalACLs, cls).tearDownClass()
+
+ def setUp(self):
+ self.apiclient = self.testClient.getApiClient()
+ self.user_apiclient = self.testClient.getUserApiClient(self.services["user"]["username"],
+ self.services["domain"]["name"],
+ self.services["user"]["roletype"])
+
+ self.domain_admin_apiclient = self.testClient.getUserApiClient(self.services["domain_admin"]["username"],
+ self.services["domain"]["name"],
+ self.services["domain_admin"]["roletype"])
+
+ self.admin_apiclient = self.testClient.getUserApiClient(self.services["root_admin"]["username"],
+ self.services["root_domain"]["name"],
+ self.services["root_admin"]["roletype"])
+
+ self.cleanup = []
+ return
+
+ def tearDown(self):
+ try:
+ cleanup_resources(self.apiclient, self.cleanup)
+ cleanup_resources(self.user_apiclient, self.cleanup)
+ except Exception as e:
+ self.debug("Warning! Exception in tearDown: %s" % e)
+
+ @attr(tags=["advanced", "basic"], required_hardware="false")
+ def test_create_global_acl(self):
+ """ Test create global ACL as a normal user, domain admin and root admin users.
+ """
+
+ self.debug("Creating ACL list as a normal user, should raise exception.")
+ self.assertRaisesRegex(CloudstackAPIException, "Only Root Admin can create global ACLs.",
+ NetworkACLList.create, apiclient=self.user_apiclient, services={},
+ name="acl", description="acl")
+
+ self.debug("Creating ACL list as a domain admin, should raise exception.")
+ self.assertRaisesRegex(CloudstackAPIException, "Only Root Admin can create global ACLs.",
+ NetworkACLList.create, apiclient=self.domain_admin_apiclient, services={},
+ name="acl", description="acl")
+
+ self.debug("Creating ACL list as a root admin, should work.")
+ acl = NetworkACLList.create(apiclient=self.admin_apiclient, services={}, name="acl", description="acl")
+ self.assertIsNotNone(acl, "A root admin user should be able to create a global ACL.")
+
+ return
+
+ @attr(tags=["advanced", "basic"], required_hardware="false")
+ def test_replace_acl_of_network(self):
+ """ Test to replace ACL of a VPC as a normal user, domain admin and root admin users.
+ """
+ # Create network offering
+ networkOffering = NetworkOffering.list(self.apiclient, name="DefaultIsolatedNetworkOfferingForVpcNetworks")
+ self.assertTrue(networkOffering is not None and len(networkOffering) > 0, "No VPC based network offering")
+
+ # Getting VPC offering
+ vpcOffering = VpcOffering.list(self.apiclient, name="Default VPC offering")
+ self.assertTrue(vpcOffering is not None and len(vpcOffering) > 0, "No VPC offerings found")
+
+ # Creating VPC
+ vpc = VPC.create(
+ apiclient=self.apiclient,
+ services=self.services["vpc"],
+ networkDomain="vpc.networkacl",
+ vpcofferingid=vpcOffering[0].id,
+ zoneid=self.zone.id,
+ domainid=self.domain.id
+ )
+ self.assertTrue(vpc is not None, "VPC creation failed")
+
+ # Creating ACL list
+ acl = NetworkACLList.create(apiclient=self.apiclient, services={}, name="acl", description="acl")
+
+ # Creating tier on VPC with ACL list
+ network = Network.create(
+ apiclient=self.apiclient,
+ services=self.services["vpcnetwork"],
+ accountid="Admin",
+ domainid=self.domain.id,
+ networkofferingid=networkOffering[0].id,
+ zoneid=self.zone.id,
+ vpcid=vpc.id,
+ aclid=acl.id,
+ gateway="10.1.1.1",
+ netmask="255.255.255.192"
+ )
+
+ # User should be able to replace ACL
+ network.replaceACLList(apiclient=self.user_apiclient, aclid=acl.id)
+ # Domain Admin should be able to replace ACL
+ network.replaceACLList(apiclient=self.domain_admin_apiclient, aclid=acl.id)
+ # Admin should be able to replace ACL
+ network.replaceACLList(apiclient=self.admin_apiclient, aclid=acl.id)
+
+ return
+
+ @attr(tags=["advanced", "basic"], required_hardware="false")
+ def test_create_acl_rule(self):
+ """ Test to create ACL rule as a normal user, domain admin and root admin users.
+ """
+ # Creating ACL list
+ acl = NetworkACLList.create(apiclient=self.admin_apiclient, services={}, name="acl", description="acl")
+
+ self.debug("Creating ACL rule as a user, should raise exception.")
+ self.assertRaisesRegex(CloudstackAPIException, "Only Root Admins can create rules for a global ACL.",
+ NetworkACL.create, self.user_apiclient, services=self.services["rule"], aclid=acl.id)
+ self.debug("Creating ACL rule as a domain admin, should raise exception.")
+ self.assertRaisesRegex(CloudstackAPIException, "Only Root Admins can create rules for a global ACL.",
+ NetworkACL.create, self.domain_admin_apiclient, services=self.services["rule"], aclid=acl.id)
+ self.debug("Creating ACL rule as a root admin, should work.")
+ NetworkACL.create(self.admin_apiclient, services=self.services["rule"], aclid=acl.id)
+
+ return
+
+ @attr(tags=["advanced", "basic"], required_hardware="false")
+ def test_delete_acl_rule(self):
+ """ Test to delete ACL rule as a normal user, domain admin and root admin users.
+ """
+ # Creating ACL list
+ acl = NetworkACLList.create(apiclient=self.api_client, services={}, name="acl", description="acl")
+
+ # Creating ACL rule
+ acl_rule = NetworkACL.create(self.apiclient, services=self.services["rule"], aclid=acl.id)
+
+ self.debug("Deleting ACL rule as a user, should raise exception.")
+ self.assertRaisesRegex(Exception, "Only Root Admin can delete global ACL rules.",
+ NetworkACL.delete, acl_rule, self.user_apiclient)
+ self.debug("Deleting ACL rule as a domain admin, should raise exception.")
+ self.assertRaisesRegex(Exception, "Only Root Admin can delete global ACL rules.",
+ NetworkACL.delete, acl_rule, self.domain_admin_apiclient)
+ self.debug("Deleting ACL rule as a root admin, should work.")
+ NetworkACL.delete(acl_rule, self.admin_apiclient)
Review Comment:
is this an essential test part,
```suggestion
```
and if so shouldnΒ΄t some kind of validation follow?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [cloudstack] DaanHoogland commented on a diff in pull request #7150: Global ACL for VPCs
Posted by "DaanHoogland (via GitHub)" <gi...@apache.org>.
DaanHoogland commented on code in PR #7150:
URL: https://github.com/apache/cloudstack/pull/7150#discussion_r1108144729
##########
test/integration/smoke/test_global_acls.py:
##########
@@ -0,0 +1,245 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+from marvin.cloudstackTestCase import cloudstackTestCase
+from marvin.lib.utils import cleanup_resources
+from marvin.lib.base import (Network, NetworkACLList, NetworkOffering, VpcOffering, VPC, NetworkACL)
+from marvin.lib.common import (get_domain, get_zone)
+from nose.plugins.attrib import attr
+from marvin.cloudstackException import CloudstackAPIException
+
+
+class Services:
+ """Test Global ACLs
+ """
+
+ def __init__(self):
+ self.services = {
+ "root_domain": {
+ "name": "ROOT",
+ },
+ "domain": {
+ "name": "Domain",
+ },
+ "user": {
+ "username": "user",
+ "roletype": 0,
+ },
+ "domain_admin": {
+ "username": "Domain admin",
+ "roletype": 2,
+ },
+ "root_admin": {
+ "username": "Root admin",
+ "roletype": 1,
+ },
+ "vpc": {
+ "name": "vpc-networkacl",
+ "displaytext": "vpc-networkacl",
+ "cidr": "10.1.1.0/24",
+ },
+ "vpcnetwork": {
+ "name": "vpcnetwork",
+ "displaytext": "vpcnetwork",
+ },
+ "rule": {
+ "protocol": "all",
+ "traffictype": "ingress",
+ }
+ }
+
+
+class TestGlobalACLs(cloudstackTestCase):
+
+ @classmethod
+ def setUpClass(cls):
+ cls.testClient = super(TestGlobalACLs, cls).getClsTestClient()
+ cls.apiclient = cls.testClient.getApiClient()
+
+ cls.services = Services().services
+ cls.domain = get_domain(cls.apiclient)
+ cls.zone = get_zone(cls.apiclient, cls.testClient.getZoneForTests())
+ return
+
+ @classmethod
+ def tearDownClass(cls):
+ super(TestGlobalACLs, cls).tearDownClass()
+
+ def setUp(self):
+ self.user_apiclient = self.testClient.getUserApiClient(self.services["user"]["username"],
+ self.services["domain"]["name"],
+ self.services["user"]["roletype"])
+
+ self.domain_admin_apiclient = self.testClient.getUserApiClient(self.services["domain_admin"]["username"],
+ self.services["domain"]["name"],
+ self.services["domain_admin"]["roletype"])
+
+ self.admin_apiclient = self.testClient.getUserApiClient(self.services["root_admin"]["username"],
+ self.services["root_domain"]["name"],
+ self.services["root_admin"]["roletype"])
+
+ self.cleanup = []
+ return
+
+ def tearDown(self):
+ super(TestGlobalACLs, cls).tearDown()
+
+ @attr(tags=["advanced", "basic"], required_hardware="false")
+ def test_create_global_acl(self):
+ """ Test create global ACL as a normal user, domain admin and root admin users.
+ """
+
+ self.debug("Creating ACL list as a normal user, should raise exception.")
+ self.assertRaisesRegex(CloudstackAPIException, "Only Root Admin can create global ACLs.",
+ NetworkACLList.create, apiclient=self.user_apiclient, services={},
+ name="acl", description="acl")
+
+ self.debug("Creating ACL list as a domain admin, should raise exception.")
+ self.assertRaisesRegex(CloudstackAPIException, "Only Root Admin can create global ACLs.",
+ NetworkACLList.create, apiclient=self.domain_admin_apiclient, services={},
+ name="acl", description="acl")
+
+ self.debug("Creating ACL list as a root admin, should work.")
+ acl = NetworkACLList.create(apiclient=self.admin_apiclient, services={}, name="acl", description="acl")
+ self.cleanup.append(acl)
+ self.assertIsNotNone(acl, "A root admin user should be able to create a global ACL.")
+
+ return
+
+ @attr(tags=["advanced", "basic"], required_hardware="false")
+ def test_replace_acl_of_network(self):
+ """ Test to replace ACL of a VPC as a normal user, domain admin and root admin users.
+ """
+ # Get network offering
+ networkOffering = NetworkOffering.list(self.apiclient, name="DefaultIsolatedNetworkOfferingForVpcNetworks")
+ self.assertTrue(networkOffering is not None and len(networkOffering) > 0, "No VPC network offering")
+
+ # Getting VPC offering
+ vpcOffering = VpcOffering.list(self.apiclient, name="Default VPC offering")
+ self.assertTrue(vpcOffering is not None and len(vpcOffering) > 0, "No VPC offerings found")
+
+ # Creating VPC
+ vpc = VPC.create(
+ apiclient=self.apiclient,
+ services=self.services["vpc"],
+ networkDomain="vpc.networkacl",
+ vpcofferingid=vpcOffering[0].id,
+ zoneid=self.zone.id,
+ domainid=self.domain.id
+ )
+ self.cleanup.append(vpc)
+ self.assertTrue(vpc is not None, "VPC creation failed")
+
+ # Creating ACL list
+ acl = NetworkACLList.create(apiclient=self.apiclient, services={}, name="acl", description="acl")
+
+ # Creating tier on VPC with ACL list
+ network = Network.create(
+ apiclient=self.apiclient,
+ services=self.services["vpcnetwork"],
+ accountid="Admin",
+ domainid=self.domain.id,
+ networkofferingid=networkOffering[0].id,
+ zoneid=self.zone.id,
+ vpcid=vpc.id,
+ aclid=acl.id,
+ gateway="10.1.1.1",
+ netmask="255.255.255.192"
+ )
+ self.cleanup.append(network)
+
+ # User should be able to replace ACL
+ network.replaceACLList(apiclient=self.user_apiclient, aclid=acl.id)
+ # Domain Admin should be able to replace ACL
+ network.replaceACLList(apiclient=self.domain_admin_apiclient, aclid=acl.id)
+ # Admin should be able to replace ACL
+ network.replaceACLList(apiclient=self.admin_apiclient, aclid=acl.id)
+
+ return
+
+ @attr(tags=["advanced", "basic"], required_hardware="false")
+ def test_create_acl_rule(self):
+ """ Test to create ACL rule as a normal user, domain admin and root admin users.
+ """
+ # Creating ACL list
+ acl = NetworkACLList.create(apiclient=self.admin_apiclient, services={}, name="acl", description="acl")
+ self.cleanup.append(acl)
+
+ self.debug("Creating ACL rule as a user, should raise exception.")
+ self.assertRaisesRegex(CloudstackAPIException, "Only Root Admins can create rules for a global ACL.",
+ NetworkACL.create, self.user_apiclient, services=self.services["rule"], aclid=acl.id)
+ self.debug("Creating ACL rule as a domain admin, should raise exception.")
+ self.assertRaisesRegex(CloudstackAPIException, "Only Root Admins can create rules for a global ACL.",
+ NetworkACL.create, self.domain_admin_apiclient, services=self.services["rule"], aclid=acl.id)
+ self.debug("Creating ACL rule as a root admin, should work.")
+ acl_rule = NetworkACL.create(self.admin_apiclient, services=self.services["rule"], aclid=acl.id)
+ self.cleanup.append(acl_rule)
+
+ return
+
+ @attr(tags=["advanced", "basic"], required_hardware="false")
+ def test_delete_acl_rule(self):
+ """ Test to delete ACL rule as a normal user, domain admin and root admin users.
+ """
+ # Creating ACL list
+ acl = NetworkACLList.create(apiclient=self.apiclient, services={}, name="acl", description="acl")
+ self.cleanup.append(acl)
+
+ # Creating ACL rule
+ acl_rule = NetworkACL.create(self.apiclient, services=self.services["rule"], aclid=acl.id)
+
+ self.debug("Deleting ACL rule as a user, should raise exception.")
+ self.assertRaisesRegex(Exception, "Only Root Admin can delete global ACL rules.",
+ NetworkACL.delete, acl_rule, self.user_apiclient)
+ self.debug("Deleting ACL rule as a domain admin, should raise exception.")
+ self.assertRaisesRegex(Exception, "Only Root Admin can delete global ACL rules.",
+ NetworkACL.delete, acl_rule, self.domain_admin_apiclient)
+
+ self.debug("Deleting ACL rule as a root admin, should work.")
+ NetworkACL.delete(acl_rule, self.admin_apiclient)
+
+ # Verify if the number of ACL rules is equal to four, i.e. the number of rules
+ # for the default ACLs `default_allow` (2 rules) and `default_deny` (2 rules) ACLs
+ number_of_acl_rules = acl_rule.list(apiclient=self.admin_apiclient)
+ self.assertEqual(len(number_of_acl_rules), 4)
+
+ return
+
+
+ @attr(tags=["advanced", "basic"], required_hardware="false")
+ def test_delete_global_acl(self):
+ """ Test delete global ACL as a normal user, domain admin and root admin users.
+ """
+
+ # Creating ACL list. Not adding to cleanup as it will be deleted in this method
+ acl = NetworkACLList.create(apiclient=self.apiclient, services={}, name="acl", description="acl")
+
+ self.debug("Deleting ACL list as a normal user, should raise exception.")
+ self.assertRaisesRegex(Exception, "Only Root Admin can delete global ACLs.",
+ NetworkACLList.delete, acl, apiclient=self.user_apiclient)
+
+ self.debug("Deleting ACL list as a domain admin, should raise exception.")
+ self.assertRaisesRegex(Exception, "Only Root Admin can delete global ACLs.",
+ NetworkACLList.delete, acl, apiclient=self.domain_admin_apiclient)
+
+ self.debug("Deleting ACL list as a root admin, should work.")
+ acl.delete(apiclient=self.admin_apiclient)
Review Comment:
```suggestion
acl.delete(apiclient=self.admin_apiclient)
self.cleanup.remove(acl)
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [cloudstack] sonarcloud[bot] commented on pull request #7150: Global ACL for VPCs
Posted by "sonarcloud[bot] (via GitHub)" <gi...@apache.org>.
sonarcloud[bot] commented on PR #7150:
URL: https://github.com/apache/cloudstack/pull/7150#issuecomment-1432015785
SonarCloud Quality Gate failed. [](https://sonarcloud.io/dashboard?id=apache_cloudstack&pullRequest=7150)
[](https://sonarcloud.io/project/issues?id=apache_cloudstack&pullRequest=7150&resolved=false&types=BUG) [](https://sonarcloud.io/project/issues?id=apache_cloudstack&pullRequest=7150&resolved=false&types=BUG) [0 Bugs](https://sonarcloud.io/project/issues?id=apache_cloudstack&pullRequest=7150&resolved=false&types=BUG)
[](https://sonarcloud.io/project/issues?id=apache_cloudstack&pullRequest=7150&resolved=false&types=VULNERABILITY) [](https://sonarcloud.io/project/issues?id=apache_cloudstack&pullRequest=7150&resolved=false&types=VULNERABILITY) [0 Vulnerabilities](https://sonarcloud.io/project/issues?id=apache_cloudstack&pullRequest=7150&resolved=false&types=VULNERABILITY)
[](https://sonarcloud.io/project/security_hotspots?id=apache_cloudstack&pullRequest=7150&resolved=false&types=SECURITY_HOTSPOT) [](https://sonarcloud.io/project/security_hotspots?id=apache_cloudstack&pullRequest=7150&resolved=false&types=SECURITY_HOTSPOT) [0 Security Hotspots](https://sonarcloud.io/project/security_hotspots?id=apache_cloudstack&pullRequest=7150&resolved=false&types=SECURITY_HOTSPOT)
[](https://sonarcloud.io/project/issues?id=apache_cloudstack&pullRequest=7150&resolved=false&types=CODE_SMELL) [](https://sonarcloud.io/project/issues?id=apache_cloudstack&pullRequest=7150&resolved=false&types=CODE_SMELL) [1 Code Smell](https://sonarcloud.io/project/issues?id=apache_cloudstack&pullRequest=7150&resolved=false&types=CODE_SMELL)
[](https://sonarcloud.io/component_measures?id=apache_cloudstack&pullRequest=7150&metric=new_coverage&view=list) [27.0% Coverage](https://sonarcloud.io/component_measures?id=apache_cloudstack&pullRequest=7150&metric=new_coverage&view=list)
[](https://sonarcloud.io/component_measures?id=apache_cloudstack&pullRequest=7150&metric=new_duplicated_lines_density&view=list) [0.0% Duplication](https://sonarcloud.io/component_measures?id=apache_cloudstack&pullRequest=7150&metric=new_duplicated_lines_density&view=list)
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [cloudstack] stephankruggg commented on a diff in pull request #7150: Global ACL for VPCs
Posted by "stephankruggg (via GitHub)" <gi...@apache.org>.
stephankruggg commented on code in PR #7150:
URL: https://github.com/apache/cloudstack/pull/7150#discussion_r1127746390
##########
server/src/main/java/com/cloud/network/vpc/NetworkACLServiceImpl.java:
##########
@@ -409,7 +408,8 @@ protected void validateAclRuleNumber(CreateNetworkACLCmd createNetworkAclCmd, Ne
* <ul>
* <li>If the parameter is null, we return an {@link InvalidParameterValueException};
* <li>Default ACLs {@link NetworkACL#DEFAULT_ALLOW} and {@link NetworkACL#DEFAULT_DENY} cannot be modified. Therefore, if any of them is provided we throw a {@link InvalidParameterValueException};
- * <li>If the network does not have a VPC, we will throw an {@link InvalidParameterValueException}.
+ * <li>If no VPC is given, then it is a global ACL and there is no need to check any VPC ID. However, if a VPC is given and it does not exist, we will throw an
+ * {@link InvalidParameterValueException}.
Review Comment:
```suggestion
* <li>If no VPC is given, then it is a global ACL and there is no need to check any VPC ID. However, if a VPC is given and it does not exist, throws an
* {@link InvalidParameterValueException}.
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [cloudstack] blueorangutan commented on pull request #7150: Global ACL for VPCs
Posted by "blueorangutan (via GitHub)" <gi...@apache.org>.
blueorangutan commented on PR #7150:
URL: https://github.com/apache/cloudstack/pull/7150#issuecomment-1737327941
@BryanMLima a [SF] 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.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Global ACL for VPCs [cloudstack]
Posted by "DaanHoogland (via GitHub)" <gi...@apache.org>.
DaanHoogland closed pull request #7150: Global ACL for VPCs
URL: https://github.com/apache/cloudstack/pull/7150
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Global ACL for VPCs [cloudstack]
Posted by "DaanHoogland (via GitHub)" <gi...@apache.org>.
DaanHoogland commented on PR #7150:
URL: https://github.com/apache/cloudstack/pull/7150#issuecomment-1816433753
> > @BryanMLima , one last thing; Do you think it makes sense to add the integration test to the test matrix somewhere? (in .github/workflows/ci.yaml)
>
> To be honest, I do not know the criteria for adding integration tests to the test matrix. From my understanding, all smoke tests need to pass for a PR to be merged, thus, I do not think it is necessary to add the integration test to the test matrix as well.
@BryanMLima, adding it to the github actions matrix will give a result without waiting for shapeblue people. And as this is a no hardware required test it could well be executed in the simulator as well. As you say "not .. necessary" but convenient for reviewing and keeping the feature safe.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Global ACL for VPCs [cloudstack]
Posted by "shwstppr (via GitHub)" <gi...@apache.org>.
shwstppr commented on PR #7150:
URL: https://github.com/apache/cloudstack/pull/7150#issuecomment-1825737588
@blueorangutan test
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Global ACL for VPCs [cloudstack]
Posted by "BryanMLima (via GitHub)" <gi...@apache.org>.
BryanMLima commented on PR #7150:
URL: https://github.com/apache/cloudstack/pull/7150#issuecomment-1769241782
It has been found a bug in a specific scenario where global ACLs were not correctly verified on VPC's private gateway creation. While this issue is not addressed, this PR will be in draft.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Global ACL for VPCs [cloudstack]
Posted by "shwstppr (via GitHub)" <gi...@apache.org>.
shwstppr commented on PR #7150:
URL: https://github.com/apache/cloudstack/pull/7150#issuecomment-1766607279
@blueorangutan LLtest
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [cloudstack] sonarcloud[bot] commented on pull request #7150: Global ACL for VPCs
Posted by "sonarcloud[bot] (via GitHub)" <gi...@apache.org>.
sonarcloud[bot] commented on PR #7150:
URL: https://github.com/apache/cloudstack/pull/7150#issuecomment-1428401450
SonarCloud Quality Gate failed. [](https://sonarcloud.io/dashboard?id=apache_cloudstack&pullRequest=7150)
[](https://sonarcloud.io/project/issues?id=apache_cloudstack&pullRequest=7150&resolved=false&types=BUG) [](https://sonarcloud.io/project/issues?id=apache_cloudstack&pullRequest=7150&resolved=false&types=BUG) [0 Bugs](https://sonarcloud.io/project/issues?id=apache_cloudstack&pullRequest=7150&resolved=false&types=BUG)
[](https://sonarcloud.io/project/issues?id=apache_cloudstack&pullRequest=7150&resolved=false&types=VULNERABILITY) [](https://sonarcloud.io/project/issues?id=apache_cloudstack&pullRequest=7150&resolved=false&types=VULNERABILITY) [0 Vulnerabilities](https://sonarcloud.io/project/issues?id=apache_cloudstack&pullRequest=7150&resolved=false&types=VULNERABILITY)
[](https://sonarcloud.io/project/security_hotspots?id=apache_cloudstack&pullRequest=7150&resolved=false&types=SECURITY_HOTSPOT) [](https://sonarcloud.io/project/security_hotspots?id=apache_cloudstack&pullRequest=7150&resolved=false&types=SECURITY_HOTSPOT) [0 Security Hotspots](https://sonarcloud.io/project/security_hotspots?id=apache_cloudstack&pullRequest=7150&resolved=false&types=SECURITY_HOTSPOT)
[](https://sonarcloud.io/project/issues?id=apache_cloudstack&pullRequest=7150&resolved=false&types=CODE_SMELL) [](https://sonarcloud.io/project/issues?id=apache_cloudstack&pullRequest=7150&resolved=false&types=CODE_SMELL) [1 Code Smell](https://sonarcloud.io/project/issues?id=apache_cloudstack&pullRequest=7150&resolved=false&types=CODE_SMELL)
[](https://sonarcloud.io/component_measures?id=apache_cloudstack&pullRequest=7150&metric=new_coverage&view=list) [27.0% Coverage](https://sonarcloud.io/component_measures?id=apache_cloudstack&pullRequest=7150&metric=new_coverage&view=list)
[](https://sonarcloud.io/component_measures?id=apache_cloudstack&pullRequest=7150&metric=new_duplicated_lines_density&view=list) [0.0% Duplication](https://sonarcloud.io/component_measures?id=apache_cloudstack&pullRequest=7150&metric=new_duplicated_lines_density&view=list)
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Global ACL for VPCs [cloudstack]
Posted by "BryanMLima (via GitHub)" <gi...@apache.org>.
BryanMLima commented on PR #7150:
URL: https://github.com/apache/cloudstack/pull/7150#issuecomment-1830395314
> > [SF] Trillian test result (tid-8391) Environment: kvm-centos7 (x2), Advanced Networking with Mgmt server 7 Total time taken: 58616 seconds Marvin logs: https://github.com/blueorangutan/acs-prs/releases/download/trillian/pr7150-t8391-kvm-centos7.zip Smoke tests completed. 117 look OK, 2 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.05 test_vm_life_cycle.py
> > test_02_redundant_VPC_default_routes `Failure` 380.19 test_vpc_redundant.py
> > test_05_rvpc_multi_tiers `Failure` 459.34 test_vpc_redundant.py
> > test_05_rvpc_multi_tiers `Error` 459.35 test_vpc_redundant.py
>
> @BryanMLima can you look to make sure the redundant vpc test failures are not a problem? Did you test redundant VPCs?
The Trillian tests are related to connection issues; this PR's changes should not impact this test, as it is not using global ACLs.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Global ACL for VPCs [cloudstack]
Posted by "DaanHoogland (via GitHub)" <gi...@apache.org>.
DaanHoogland commented on PR #7150:
URL: https://github.com/apache/cloudstack/pull/7150#issuecomment-1815914120
@BryanMLima , one last thing; Do you think it makes sense to add the integration test to the test matrix somewhere? (in .github/workflows/ci.yaml)
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [cloudstack] DaanHoogland commented on a diff in pull request #7150: Global ACL for VPCs
Posted by "DaanHoogland (via GitHub)" <gi...@apache.org>.
DaanHoogland commented on code in PR #7150:
URL: https://github.com/apache/cloudstack/pull/7150#discussion_r1129189370
##########
test/integration/smoke/test_global_acls.py:
##########
@@ -0,0 +1,249 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+from marvin.cloudstackTestCase import cloudstackTestCase
+from marvin.lib.utils import cleanup_resources
+from marvin.lib.base import (Network, NetworkACLList, NetworkOffering, VpcOffering, VPC, NetworkACL)
+from marvin.lib.common import (get_domain, get_zone)
+from nose.plugins.attrib import attr
+from marvin.cloudstackException import CloudstackAPIException
+
+
+class Services:
+ """Test Global ACLs
+ """
+
+ def __init__(self):
+ self.services = {
+ "root_domain": {
+ "name": "ROOT",
+ },
+ "domain": {
+ "name": "Domain",
+ },
+ "user": {
+ "username": "user",
+ "roletype": 0,
+ },
+ "domain_admin": {
+ "username": "Domain admin",
+ "roletype": 2,
+ },
+ "root_admin": {
+ "username": "Root admin",
+ "roletype": 1,
+ },
+ "vpc": {
+ "name": "vpc-networkacl",
+ "displaytext": "vpc-networkacl",
+ "cidr": "10.1.1.0/24",
+ },
+ "vpcnetwork": {
+ "name": "vpcnetwork",
+ "displaytext": "vpcnetwork",
+ },
+ "rule": {
+ "protocol": "all",
+ "traffictype": "ingress",
+ }
+ }
+
+
+class TestGlobalACLs(cloudstackTestCase):
+
+ @classmethod
+ def setUpClass(cls):
+ cls.testClient = super(TestGlobalACLs, cls).getClsTestClient()
+ cls.apiclient = cls.testClient.getApiClient()
+
+ cls.services = Services().services
+ cls.domain = get_domain(cls.apiclient)
+ cls.zone = get_zone(cls.apiclient, cls.testClient.getZoneForTests())
+ return
+
+ @classmethod
+ def tearDownClass(cls):
Review Comment:
note: there is no cls._cleanup so no cleanup is done.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [cloudstack] BryanMLima commented on pull request #7150: Global ACL for VPCs
Posted by "BryanMLima (via GitHub)" <gi...@apache.org>.
BryanMLima commented on PR #7150:
URL: https://github.com/apache/cloudstack/pull/7150#issuecomment-1555025690
@rohityadavcloud @DaanHoogland
Hello guys, is there any update about this one?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Global ACL for VPCs [cloudstack]
Posted by "blueorangutan (via GitHub)" <gi...@apache.org>.
blueorangutan commented on PR #7150:
URL: https://github.com/apache/cloudstack/pull/7150#issuecomment-1752747804
@DaanHoogland a [SF] Trillian-Jenkins test job (centos7 mgmt + kvm-centos7) has been kicked to run smoke tests
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Global ACL for VPCs [cloudstack]
Posted by "shwstppr (via GitHub)" <gi...@apache.org>.
shwstppr commented on PR #7150:
URL: https://github.com/apache/cloudstack/pull/7150#issuecomment-1770370294
@BryanMLima thanks for the update. Will this be ready for 4.19?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Global ACL for VPCs [cloudstack]
Posted by "blueorangutan (via GitHub)" <gi...@apache.org>.
blueorangutan commented on PR #7150:
URL: https://github.com/apache/cloudstack/pull/7150#issuecomment-1766607716
@shwstppr a [LL] Trillian-Jenkins test job (centos7 mgmt + kvm-centos7) has been kicked to run smoke tests
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Global ACL for VPCs [cloudstack]
Posted by "blueorangutan (via GitHub)" <gi...@apache.org>.
blueorangutan commented on PR #7150:
URL: https://github.com/apache/cloudstack/pull/7150#issuecomment-1766449857
Packaging result [SF]: :heavy_check_mark: el7 :heavy_check_mark: el8 :heavy_check_mark: el9 :heavy_check_mark: debian :heavy_check_mark: suse15. SL-JID 7402
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Global ACL for VPCs [cloudstack]
Posted by "blueorangutan (via GitHub)" <gi...@apache.org>.
blueorangutan commented on PR #7150:
URL: https://github.com/apache/cloudstack/pull/7150#issuecomment-1767599018
<b>[LL]Trillian test result (tid-6843)</b>
Environment: kvm-centos7 (x2), Advanced Networking with Mgmt server 7
Total time taken: 45041 seconds
Marvin logs: https://github.com/blueorangutan/acs-prs/releases/download/trillian/pr7150-t6843-kvm-centos7.zip
Smoke tests completed. 113 look OK, 1 have errors, 0 did not run
Only failed and skipped tests results shown below:
Test | Result | Time (s) | Test File
--- | --- | --- | ---
test_03_deploy_vm_wrong_checksum | `Error` | 39.60 | test_templates.py
test_09_list_templates_download_details | `Failure` | 0.04 | test_templates.py
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Global ACL for VPCs [cloudstack]
Posted by "blueorangutan (via GitHub)" <gi...@apache.org>.
blueorangutan commented on PR #7150:
URL: https://github.com/apache/cloudstack/pull/7150#issuecomment-1744612268
@shwstppr a [SF] 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.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [cloudstack] blueorangutan commented on pull request #7150: Global ACL for VPCs
Posted by "blueorangutan (via GitHub)" <gi...@apache.org>.
blueorangutan commented on PR #7150:
URL: https://github.com/apache/cloudstack/pull/7150#issuecomment-1527213017
@DaanHoogland a 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.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [cloudstack] BryanMLima commented on pull request #7150: Global ACL for VPCs
Posted by "BryanMLima (via GitHub)" <gi...@apache.org>.
BryanMLima commented on PR #7150:
URL: https://github.com/apache/cloudstack/pull/7150#issuecomment-1427978948
> I like the general feature - could you add more marvin/integration tests for this?
@rohityadavcloud I added smoke tests for this feature. Let me know if you think this is enough. I used the manual tests I did as reference; however, there were methods that were not on the Marvin lib `base.py` file. It looks like this file is auto generated and I did not find any way to add these missing methods for the network ACL rules.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [cloudstack] blueorangutan commented on pull request #7150: Global ACL for VPCs
Posted by "blueorangutan (via GitHub)" <gi...@apache.org>.
blueorangutan commented on PR #7150:
URL: https://github.com/apache/cloudstack/pull/7150#issuecomment-1434438460
@DaanHoogland a Trillian-Jenkins test job (centos7 mgmt + kvm-centos7) has been kicked to run smoke tests
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Global ACL for VPCs [cloudstack]
Posted by "blueorangutan (via GitHub)" <gi...@apache.org>.
blueorangutan commented on PR #7150:
URL: https://github.com/apache/cloudstack/pull/7150#issuecomment-1744737759
@shwstppr a [SF] Trillian-Jenkins test job (centos7 mgmt + kvm-centos7) has been kicked to run smoke tests
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Global ACL for VPCs [cloudstack]
Posted by "shwstppr (via GitHub)" <gi...@apache.org>.
shwstppr commented on PR #7150:
URL: https://github.com/apache/cloudstack/pull/7150#issuecomment-1744736628
@blueorangutan test
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Global ACL for VPCs [cloudstack]
Posted by "weizhouapache (via GitHub)" <gi...@apache.org>.
weizhouapache commented on PR #7150:
URL: https://github.com/apache/cloudstack/pull/7150#issuecomment-1816449820
> > > @BryanMLima , one last thing; Do you think it makes sense to add the integration test to the test matrix somewhere? (in .github/workflows/ci.yaml)
> >
> >
> > To be honest, I do not know the criteria for adding integration tests to the test matrix. From my understanding, all smoke tests need to pass for a PR to be merged, thus, I do not think it is necessary to add the integration test to the test matrix as well.
>
> @BryanMLima, adding it to the github actions matrix will give a result without waiting for shapeblue people. And as this is a no hardware required test it could well be executed in the simulator as well. As you say "not .. necessary" but convenient for reviewing and keeping the feature safe.
ah, ok, sometimes smoke tests pass in trillian test but not in CI tests. we can have a try.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Global ACL for VPCs [cloudstack]
Posted by "blueorangutan (via GitHub)" <gi...@apache.org>.
blueorangutan commented on PR #7150:
URL: https://github.com/apache/cloudstack/pull/7150#issuecomment-1825644536
@shwstppr 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.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Global ACL for VPCs [cloudstack]
Posted by "shwstppr (via GitHub)" <gi...@apache.org>.
shwstppr commented on PR #7150:
URL: https://github.com/apache/cloudstack/pull/7150#issuecomment-1833465655
Test results from backend,
```
02:17:10 Smoke tests completed. 119 look OK, 0 have errors, 0 did not run
02:17:10 Only failed and skipped tests results shown below:
02:17:10
02:17:10
02:17:10 Test | Result | Time (s) | Test File
02:17:10 --- | --- | --- | ---
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Global ACL for VPCs [cloudstack]
Posted by "blueorangutan (via GitHub)" <gi...@apache.org>.
blueorangutan commented on PR #7150:
URL: https://github.com/apache/cloudstack/pull/7150#issuecomment-1754053003
<b>[SF] Trillian test result (tid-7881)</b>
Environment: kvm-centos7 (x2), Advanced Networking with Mgmt server 7
Total time taken: 44998 seconds
Marvin logs: https://github.com/blueorangutan/acs-prs/releases/download/trillian/pr7150-t7881-kvm-centos7.zip
Smoke tests completed. 113 look OK, 1 have errors, 0 did not run
Only failed and skipped tests results shown below:
Test | Result | Time (s) | Test File
--- | --- | --- | ---
test_02_upgrade_kubernetes_cluster | `Failure` | 581.44 | test_kubernetes_clusters.py
test_08_upgrade_kubernetes_ha_cluster | `Failure` | 700.81 | test_kubernetes_clusters.py
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Global ACL for VPCs [cloudstack]
Posted by "blueorangutan (via GitHub)" <gi...@apache.org>.
blueorangutan commented on PR #7150:
URL: https://github.com/apache/cloudstack/pull/7150#issuecomment-1752649333
Packaging result [SF]: :heavy_check_mark: el7 :heavy_check_mark: el8 :heavy_check_mark: el9 :heavy_check_mark: debian :heavy_check_mark: suse15. SL-JID 7272
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [cloudstack] BryanMLima commented on pull request #7150: Global ACL for VPCs
Posted by "BryanMLima (via GitHub)" <gi...@apache.org>.
BryanMLima commented on PR #7150:
URL: https://github.com/apache/cloudstack/pull/7150#issuecomment-1737324606
@blueorangutan package
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [cloudstack] sonarcloud[bot] commented on pull request #7150: Global ACL for VPCs
Posted by "sonarcloud[bot] (via GitHub)" <gi...@apache.org>.
sonarcloud[bot] commented on PR #7150:
URL: https://github.com/apache/cloudstack/pull/7150#issuecomment-1517008738
SonarCloud Quality Gate failed. [](https://sonarcloud.io/dashboard?id=apache_cloudstack&pullRequest=7150)
[](https://sonarcloud.io/project/issues?id=apache_cloudstack&pullRequest=7150&resolved=false&types=BUG) [](https://sonarcloud.io/project/issues?id=apache_cloudstack&pullRequest=7150&resolved=false&types=BUG) [0 Bugs](https://sonarcloud.io/project/issues?id=apache_cloudstack&pullRequest=7150&resolved=false&types=BUG)
[](https://sonarcloud.io/project/issues?id=apache_cloudstack&pullRequest=7150&resolved=false&types=VULNERABILITY) [](https://sonarcloud.io/project/issues?id=apache_cloudstack&pullRequest=7150&resolved=false&types=VULNERABILITY) [0 Vulnerabilities](https://sonarcloud.io/project/issues?id=apache_cloudstack&pullRequest=7150&resolved=false&types=VULNERABILITY)
[](https://sonarcloud.io/project/security_hotspots?id=apache_cloudstack&pullRequest=7150&resolved=false&types=SECURITY_HOTSPOT) [](https://sonarcloud.io/project/security_hotspots?id=apache_cloudstack&pullRequest=7150&resolved=false&types=SECURITY_HOTSPOT) [0 Security Hotspots](https://sonarcloud.io/project/security_hotspots?id=apache_cloudstack&pullRequest=7150&resolved=false&types=SECURITY_HOTSPOT)
[](https://sonarcloud.io/project/issues?id=apache_cloudstack&pullRequest=7150&resolved=false&types=CODE_SMELL) [](https://sonarcloud.io/project/issues?id=apache_cloudstack&pullRequest=7150&resolved=false&types=CODE_SMELL) [0 Code Smells](https://sonarcloud.io/project/issues?id=apache_cloudstack&pullRequest=7150&resolved=false&types=CODE_SMELL)
[](https://sonarcloud.io/component_measures?id=apache_cloudstack&pullRequest=7150&metric=new_coverage&view=list) [27.0% Coverage](https://sonarcloud.io/component_measures?id=apache_cloudstack&pullRequest=7150&metric=new_coverage&view=list)
[](https://sonarcloud.io/component_measures?id=apache_cloudstack&pullRequest=7150&metric=new_duplicated_lines_density&view=list) [0.0% Duplication](https://sonarcloud.io/component_measures?id=apache_cloudstack&pullRequest=7150&metric=new_duplicated_lines_density&view=list)
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [cloudstack] sonarcloud[bot] commented on pull request #7150: Global ACL for VPCs
Posted by "sonarcloud[bot] (via GitHub)" <gi...@apache.org>.
sonarcloud[bot] commented on PR #7150:
URL: https://github.com/apache/cloudstack/pull/7150#issuecomment-1520378511
SonarCloud Quality Gate failed. [](https://sonarcloud.io/dashboard?id=apache_cloudstack&pullRequest=7150)
[](https://sonarcloud.io/project/issues?id=apache_cloudstack&pullRequest=7150&resolved=false&types=BUG) [](https://sonarcloud.io/project/issues?id=apache_cloudstack&pullRequest=7150&resolved=false&types=BUG) [0 Bugs](https://sonarcloud.io/project/issues?id=apache_cloudstack&pullRequest=7150&resolved=false&types=BUG)
[](https://sonarcloud.io/project/issues?id=apache_cloudstack&pullRequest=7150&resolved=false&types=VULNERABILITY) [](https://sonarcloud.io/project/issues?id=apache_cloudstack&pullRequest=7150&resolved=false&types=VULNERABILITY) [0 Vulnerabilities](https://sonarcloud.io/project/issues?id=apache_cloudstack&pullRequest=7150&resolved=false&types=VULNERABILITY)
[](https://sonarcloud.io/project/security_hotspots?id=apache_cloudstack&pullRequest=7150&resolved=false&types=SECURITY_HOTSPOT) [](https://sonarcloud.io/project/security_hotspots?id=apache_cloudstack&pullRequest=7150&resolved=false&types=SECURITY_HOTSPOT) [0 Security Hotspots](https://sonarcloud.io/project/security_hotspots?id=apache_cloudstack&pullRequest=7150&resolved=false&types=SECURITY_HOTSPOT)
[](https://sonarcloud.io/project/issues?id=apache_cloudstack&pullRequest=7150&resolved=false&types=CODE_SMELL) [](https://sonarcloud.io/project/issues?id=apache_cloudstack&pullRequest=7150&resolved=false&types=CODE_SMELL) [0 Code Smells](https://sonarcloud.io/project/issues?id=apache_cloudstack&pullRequest=7150&resolved=false&types=CODE_SMELL)
[](https://sonarcloud.io/component_measures?id=apache_cloudstack&pullRequest=7150&metric=new_coverage&view=list) [26.9% Coverage](https://sonarcloud.io/component_measures?id=apache_cloudstack&pullRequest=7150&metric=new_coverage&view=list)
[](https://sonarcloud.io/component_measures?id=apache_cloudstack&pullRequest=7150&metric=new_duplicated_lines_density&view=list) [0.0% Duplication](https://sonarcloud.io/component_measures?id=apache_cloudstack&pullRequest=7150&metric=new_duplicated_lines_density&view=list)
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [cloudstack] DaanHoogland commented on pull request #7150: Global ACL for VPCs
Posted by "DaanHoogland (via GitHub)" <gi...@apache.org>.
DaanHoogland commented on PR #7150:
URL: https://github.com/apache/cloudstack/pull/7150#issuecomment-1631984945
@rohityadavcloud I take it yours is a clgtm (without testing) . just a 3rd party testing needed here.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [cloudstack] sonarcloud[bot] commented on pull request #7150: Global ACL for VPCs
Posted by sonarcloud.
sonarcloud[bot] commented on PR #7150:
URL: https://github.com/apache/cloudstack/pull/7150#issuecomment-1410335707
SonarCloud Quality Gate failed. [](https://sonarcloud.io/dashboard?id=apache_cloudstack&pullRequest=7150)
[](https://sonarcloud.io/project/issues?id=apache_cloudstack&pullRequest=7150&resolved=false&types=BUG) [](https://sonarcloud.io/project/issues?id=apache_cloudstack&pullRequest=7150&resolved=false&types=BUG) [0 Bugs](https://sonarcloud.io/project/issues?id=apache_cloudstack&pullRequest=7150&resolved=false&types=BUG)
[](https://sonarcloud.io/project/issues?id=apache_cloudstack&pullRequest=7150&resolved=false&types=VULNERABILITY) [](https://sonarcloud.io/project/issues?id=apache_cloudstack&pullRequest=7150&resolved=false&types=VULNERABILITY) [0 Vulnerabilities](https://sonarcloud.io/project/issues?id=apache_cloudstack&pullRequest=7150&resolved=false&types=VULNERABILITY)
[](https://sonarcloud.io/project/security_hotspots?id=apache_cloudstack&pullRequest=7150&resolved=false&types=SECURITY_HOTSPOT) [](https://sonarcloud.io/project/security_hotspots?id=apache_cloudstack&pullRequest=7150&resolved=false&types=SECURITY_HOTSPOT) [0 Security Hotspots](https://sonarcloud.io/project/security_hotspots?id=apache_cloudstack&pullRequest=7150&resolved=false&types=SECURITY_HOTSPOT)
[](https://sonarcloud.io/project/issues?id=apache_cloudstack&pullRequest=7150&resolved=false&types=CODE_SMELL) [](https://sonarcloud.io/project/issues?id=apache_cloudstack&pullRequest=7150&resolved=false&types=CODE_SMELL) [2 Code Smells](https://sonarcloud.io/project/issues?id=apache_cloudstack&pullRequest=7150&resolved=false&types=CODE_SMELL)
[](https://sonarcloud.io/component_measures?id=apache_cloudstack&pullRequest=7150&metric=new_coverage&view=list) [29.3% Coverage](https://sonarcloud.io/component_measures?id=apache_cloudstack&pullRequest=7150&metric=new_coverage&view=list)
[](https://sonarcloud.io/component_measures?id=apache_cloudstack&pullRequest=7150&metric=new_duplicated_lines_density&view=list) [0.0% Duplication](https://sonarcloud.io/component_measures?id=apache_cloudstack&pullRequest=7150&metric=new_duplicated_lines_density&view=list)
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [cloudstack] sonarcloud[bot] commented on pull request #7150: Global ACL for VPCs
Posted by "sonarcloud[bot] (via GitHub)" <gi...@apache.org>.
sonarcloud[bot] commented on PR #7150:
URL: https://github.com/apache/cloudstack/pull/7150#issuecomment-1433149866
SonarCloud Quality Gate failed. [](https://sonarcloud.io/dashboard?id=apache_cloudstack&pullRequest=7150)
[](https://sonarcloud.io/project/issues?id=apache_cloudstack&pullRequest=7150&resolved=false&types=BUG) [](https://sonarcloud.io/project/issues?id=apache_cloudstack&pullRequest=7150&resolved=false&types=BUG) [0 Bugs](https://sonarcloud.io/project/issues?id=apache_cloudstack&pullRequest=7150&resolved=false&types=BUG)
[](https://sonarcloud.io/project/issues?id=apache_cloudstack&pullRequest=7150&resolved=false&types=VULNERABILITY) [](https://sonarcloud.io/project/issues?id=apache_cloudstack&pullRequest=7150&resolved=false&types=VULNERABILITY) [0 Vulnerabilities](https://sonarcloud.io/project/issues?id=apache_cloudstack&pullRequest=7150&resolved=false&types=VULNERABILITY)
[](https://sonarcloud.io/project/security_hotspots?id=apache_cloudstack&pullRequest=7150&resolved=false&types=SECURITY_HOTSPOT) [](https://sonarcloud.io/project/security_hotspots?id=apache_cloudstack&pullRequest=7150&resolved=false&types=SECURITY_HOTSPOT) [0 Security Hotspots](https://sonarcloud.io/project/security_hotspots?id=apache_cloudstack&pullRequest=7150&resolved=false&types=SECURITY_HOTSPOT)
[](https://sonarcloud.io/project/issues?id=apache_cloudstack&pullRequest=7150&resolved=false&types=CODE_SMELL) [](https://sonarcloud.io/project/issues?id=apache_cloudstack&pullRequest=7150&resolved=false&types=CODE_SMELL) [1 Code Smell](https://sonarcloud.io/project/issues?id=apache_cloudstack&pullRequest=7150&resolved=false&types=CODE_SMELL)
[](https://sonarcloud.io/component_measures?id=apache_cloudstack&pullRequest=7150&metric=new_coverage&view=list) [27.0% Coverage](https://sonarcloud.io/component_measures?id=apache_cloudstack&pullRequest=7150&metric=new_coverage&view=list)
[](https://sonarcloud.io/component_measures?id=apache_cloudstack&pullRequest=7150&metric=new_duplicated_lines_density&view=list) [0.0% Duplication](https://sonarcloud.io/component_measures?id=apache_cloudstack&pullRequest=7150&metric=new_duplicated_lines_density&view=list)
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [cloudstack] blueorangutan commented on pull request #7150: Global ACL for VPCs
Posted by "blueorangutan (via GitHub)" <gi...@apache.org>.
blueorangutan commented on PR #7150:
URL: https://github.com/apache/cloudstack/pull/7150#issuecomment-1439217025
<b>Trillian test result (tid-6209)</b>
Environment: kvm-centos7 (x2), Advanced Networking with Mgmt server 7
Total time taken: 40913 seconds
Marvin logs: https://github.com/blueorangutan/acs-prs/releases/download/trillian/pr7150-t6209-kvm-centos7.zip
Smoke tests completed. 109 look OK, 0 have errors, 0 did not run
Only failed and skipped tests results shown below:
Test | Result | Time (s) | Test File
--- | --- | --- | ---
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [cloudstack] DaanHoogland commented on a diff in pull request #7150: Global ACL for VPCs
Posted by "DaanHoogland (via GitHub)" <gi...@apache.org>.
DaanHoogland commented on code in PR #7150:
URL: https://github.com/apache/cloudstack/pull/7150#discussion_r1129186056
##########
server/src/main/java/com/cloud/network/vpc/NetworkACLServiceImpl.java:
##########
@@ -103,12 +104,15 @@ public class NetworkACLServiceImpl extends ManagerBase implements NetworkACLServ
@Override
public NetworkACL createNetworkACL(final String name, final String description, final long vpcId, final Boolean forDisplay) {
- final Account caller = CallContext.current().getCallingAccount();
- final Vpc vpc = _entityMgr.findById(Vpc.class, vpcId);
- if (vpc == null) {
- throw new InvalidParameterValueException("Unable to find VPC");
+ if (vpcId != 0) {
+ final Account caller = CallContext.current().getCallingAccount();
+ final Vpc vpc = _vpcDao.findById(vpcId);
Review Comment:
nah
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [cloudstack] blueorangutan commented on pull request #7150: Global ACL for VPCs
Posted by "blueorangutan (via GitHub)" <gi...@apache.org>.
blueorangutan commented on PR #7150:
URL: https://github.com/apache/cloudstack/pull/7150#issuecomment-1433318992
@DaanHoogland a 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.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [cloudstack] BryanMLima closed pull request #7150: Global ACL for VPCs
Posted by "BryanMLima (via GitHub)" <gi...@apache.org>.
BryanMLima closed pull request #7150: Global ACL for VPCs
URL: https://github.com/apache/cloudstack/pull/7150
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [cloudstack] blueorangutan commented on pull request #7150: Global ACL for VPCs
Posted by "blueorangutan (via GitHub)" <gi...@apache.org>.
blueorangutan commented on PR #7150:
URL: https://github.com/apache/cloudstack/pull/7150#issuecomment-1527299194
Packaging result: :heavy_check_mark: el7 :heavy_check_mark: el8 :heavy_check_mark: el9 :heavy_check_mark: debian :heavy_check_mark: suse15. SL-JID 5995
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [cloudstack] sonarcloud[bot] commented on pull request #7150: Global ACL for VPCs
Posted by "sonarcloud[bot] (via GitHub)" <gi...@apache.org>.
sonarcloud[bot] commented on PR #7150:
URL: https://github.com/apache/cloudstack/pull/7150#issuecomment-1437239504
SonarCloud Quality Gate failed. [](https://sonarcloud.io/dashboard?id=apache_cloudstack&pullRequest=7150)
[](https://sonarcloud.io/project/issues?id=apache_cloudstack&pullRequest=7150&resolved=false&types=BUG) [](https://sonarcloud.io/project/issues?id=apache_cloudstack&pullRequest=7150&resolved=false&types=BUG) [0 Bugs](https://sonarcloud.io/project/issues?id=apache_cloudstack&pullRequest=7150&resolved=false&types=BUG)
[](https://sonarcloud.io/project/issues?id=apache_cloudstack&pullRequest=7150&resolved=false&types=VULNERABILITY) [](https://sonarcloud.io/project/issues?id=apache_cloudstack&pullRequest=7150&resolved=false&types=VULNERABILITY) [0 Vulnerabilities](https://sonarcloud.io/project/issues?id=apache_cloudstack&pullRequest=7150&resolved=false&types=VULNERABILITY)
[](https://sonarcloud.io/project/security_hotspots?id=apache_cloudstack&pullRequest=7150&resolved=false&types=SECURITY_HOTSPOT) [](https://sonarcloud.io/project/security_hotspots?id=apache_cloudstack&pullRequest=7150&resolved=false&types=SECURITY_HOTSPOT) [0 Security Hotspots](https://sonarcloud.io/project/security_hotspots?id=apache_cloudstack&pullRequest=7150&resolved=false&types=SECURITY_HOTSPOT)
[](https://sonarcloud.io/project/issues?id=apache_cloudstack&pullRequest=7150&resolved=false&types=CODE_SMELL) [](https://sonarcloud.io/project/issues?id=apache_cloudstack&pullRequest=7150&resolved=false&types=CODE_SMELL) [1 Code Smell](https://sonarcloud.io/project/issues?id=apache_cloudstack&pullRequest=7150&resolved=false&types=CODE_SMELL)
[](https://sonarcloud.io/component_measures?id=apache_cloudstack&pullRequest=7150&metric=new_coverage&view=list) [27.0% Coverage](https://sonarcloud.io/component_measures?id=apache_cloudstack&pullRequest=7150&metric=new_coverage&view=list)
[](https://sonarcloud.io/component_measures?id=apache_cloudstack&pullRequest=7150&metric=new_duplicated_lines_density&view=list) [0.0% Duplication](https://sonarcloud.io/component_measures?id=apache_cloudstack&pullRequest=7150&metric=new_duplicated_lines_density&view=list)
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [cloudstack] blueorangutan commented on pull request #7150: Global ACL for VPCs
Posted by "blueorangutan (via GitHub)" <gi...@apache.org>.
blueorangutan commented on PR #7150:
URL: https://github.com/apache/cloudstack/pull/7150#issuecomment-1438321624
@DaanHoogland a Trillian-Jenkins test job (centos7 mgmt + kvm-centos7) has been kicked to run smoke tests
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [cloudstack] DaanHoogland commented on pull request #7150: Global ACL for VPCs
Posted by "DaanHoogland (via GitHub)" <gi...@apache.org>.
DaanHoogland commented on PR #7150:
URL: https://github.com/apache/cloudstack/pull/7150#issuecomment-1438320571
@blueorangutan test
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [cloudstack] blueorangutan commented on pull request #7150: Global ACL for VPCs
Posted by "blueorangutan (via GitHub)" <gi...@apache.org>.
blueorangutan commented on PR #7150:
URL: https://github.com/apache/cloudstack/pull/7150#issuecomment-1630187072
@DaanHoogland a [SF] Trillian-Jenkins test job (centos7 mgmt + kvm-centos7) has been kicked to run smoke tests
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Global ACL for VPCs [cloudstack]
Posted by "shwstppr (via GitHub)" <gi...@apache.org>.
shwstppr commented on PR #7150:
URL: https://github.com/apache/cloudstack/pull/7150#issuecomment-1766318978
@blueorangutan package
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Global ACL for VPCs [cloudstack]
Posted by "BryanMLima (via GitHub)" <gi...@apache.org>.
BryanMLima commented on PR #7150:
URL: https://github.com/apache/cloudstack/pull/7150#issuecomment-1816313947
> @BryanMLima , one last thing; Do you think it makes sense to add the integration test to the test matrix somewhere? (in .github/workflows/ci.yaml)
To be honest, I do not know the criteria for adding integration tests to the test matrix. From my understanding, all smoke tests need to pass for a PR to be merged, thus, I do not think it is necessary to add the integration test to the test matrix as well.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Global ACL for VPCs [cloudstack]
Posted by "weizhouapache (via GitHub)" <gi...@apache.org>.
weizhouapache commented on PR #7150:
URL: https://github.com/apache/cloudstack/pull/7150#issuecomment-1816430528
@blueorangutan test
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Global ACL for VPCs [cloudstack]
Posted by "BryanMLima (via GitHub)" <gi...@apache.org>.
BryanMLima commented on PR #7150:
URL: https://github.com/apache/cloudstack/pull/7150#issuecomment-1825607171
@DaanHoogland could you trigger the integration tests again? The error seems unrelated to this PR.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Global ACL for VPCs [cloudstack]
Posted by "shwstppr (via GitHub)" <gi...@apache.org>.
shwstppr commented on PR #7150:
URL: https://github.com/apache/cloudstack/pull/7150#issuecomment-1825643843
@blueorangutan package
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Global ACL for VPCs [cloudstack]
Posted by "BryanMLima (via GitHub)" <gi...@apache.org>.
BryanMLima commented on PR #7150:
URL: https://github.com/apache/cloudstack/pull/7150#issuecomment-1830535704
@blueorangutan package
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Global ACL for VPCs [cloudstack]
Posted by "blueorangutan (via GitHub)" <gi...@apache.org>.
blueorangutan commented on PR #7150:
URL: https://github.com/apache/cloudstack/pull/7150#issuecomment-1831458994
@DaanHoogland a [SL] Trillian-Jenkins test job (centos7 mgmt + kvm-centos7) has been kicked to run smoke tests
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Global ACL for VPCs [cloudstack]
Posted by "shwstppr (via GitHub)" <gi...@apache.org>.
shwstppr commented on PR #7150:
URL: https://github.com/apache/cloudstack/pull/7150#issuecomment-1833472799
@DaanHoogland cc @borisstoyanov do we need any further testing or it good to merge?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [cloudstack] DaanHoogland commented on pull request #7150: Global ACL for VPCs
Posted by "DaanHoogland (via GitHub)" <gi...@apache.org>.
DaanHoogland commented on PR #7150:
URL: https://github.com/apache/cloudstack/pull/7150#issuecomment-1680059629
@blueorangutan package
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Global ACL for VPCs [cloudstack]
Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on PR #7150:
URL: https://github.com/apache/cloudstack/pull/7150#issuecomment-1812111114
This pull request has merge conflicts. Dear author, please fix the conflicts and sync your branch with the base branch.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [cloudstack] weizhouapache commented on pull request #7150: Global ACL for VPCs
Posted by "weizhouapache (via GitHub)" <gi...@apache.org>.
weizhouapache commented on PR #7150:
URL: https://github.com/apache/cloudstack/pull/7150#issuecomment-1673310693
moved to 4.19.0.0 as this is not a bug fix
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [cloudstack] DaanHoogland commented on pull request #7150: Global ACL for VPCs
Posted by "DaanHoogland (via GitHub)" <gi...@apache.org>.
DaanHoogland commented on PR #7150:
URL: https://github.com/apache/cloudstack/pull/7150#issuecomment-1681730716
@blueorangutan test
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [cloudstack] blueorangutan commented on pull request #7150: Global ACL for VPCs
Posted by "blueorangutan (via GitHub)" <gi...@apache.org>.
blueorangutan commented on PR #7150:
URL: https://github.com/apache/cloudstack/pull/7150#issuecomment-1527335433
@DaanHoogland a Trillian-Jenkins test job (centos7 mgmt + kvm-centos7) has been kicked to run smoke tests
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [cloudstack] blueorangutan commented on pull request #7150: Global ACL for VPCs
Posted by "blueorangutan (via GitHub)" <gi...@apache.org>.
blueorangutan commented on PR #7150:
URL: https://github.com/apache/cloudstack/pull/7150#issuecomment-1629094514
@DaanHoogland a [SF] 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.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [cloudstack] DaanHoogland commented on pull request #7150: Global ACL for VPCs
Posted by "DaanHoogland (via GitHub)" <gi...@apache.org>.
DaanHoogland commented on PR #7150:
URL: https://github.com/apache/cloudstack/pull/7150#issuecomment-1558898104
> @rohityadavcloud @DaanHoogland Hello guys, is there any update about this one?
I approved this on basis of code review. We need a 3rd party test and a second lgtm (might be the same)
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Global ACL for VPCs [cloudstack]
Posted by "blueorangutan (via GitHub)" <gi...@apache.org>.
blueorangutan commented on PR #7150:
URL: https://github.com/apache/cloudstack/pull/7150#issuecomment-1825739331
@shwstppr a [SL] Trillian-Jenkins test job (centos7 mgmt + kvm-centos7) has been kicked to run smoke tests
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Global ACL for VPCs [cloudstack]
Posted by "shwstppr (via GitHub)" <gi...@apache.org>.
shwstppr commented on PR #7150:
URL: https://github.com/apache/cloudstack/pull/7150#issuecomment-1752555366
@blueorangutan package
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Global ACL for VPCs [cloudstack]
Posted by "blueorangutan (via GitHub)" <gi...@apache.org>.
blueorangutan commented on PR #7150:
URL: https://github.com/apache/cloudstack/pull/7150#issuecomment-1766321072
@shwstppr a [SF] 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.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Global ACL for VPCs [cloudstack]
Posted by "shwstppr (via GitHub)" <gi...@apache.org>.
shwstppr commented on PR #7150:
URL: https://github.com/apache/cloudstack/pull/7150#issuecomment-1825643556
@blueorangutan packagae
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Global ACL for VPCs [cloudstack]
Posted by "shwstppr (via GitHub)" <gi...@apache.org>.
shwstppr commented on PR #7150:
URL: https://github.com/apache/cloudstack/pull/7150#issuecomment-1831263579
@blueorangutan package
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Global ACL for VPCs [cloudstack]
Posted by "shwstppr (via GitHub)" <gi...@apache.org>.
shwstppr commented on PR #7150:
URL: https://github.com/apache/cloudstack/pull/7150#issuecomment-1829691231
@BryanMLima any update on this? Also, merge conflicts here
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Global ACL for VPCs [cloudstack]
Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on PR #7150:
URL: https://github.com/apache/cloudstack/pull/7150#issuecomment-1829339314
This pull request has merge conflicts. Dear author, please fix the conflicts and sync your branch with the base branch.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Global ACL for VPCs [cloudstack]
Posted by "DaanHoogland (via GitHub)" <gi...@apache.org>.
DaanHoogland merged PR #7150:
URL: https://github.com/apache/cloudstack/pull/7150
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Global ACL for VPCs [cloudstack]
Posted by "blueorangutan (via GitHub)" <gi...@apache.org>.
blueorangutan commented on PR #7150:
URL: https://github.com/apache/cloudstack/pull/7150#issuecomment-1830552426
@BryanMLima 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.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Global ACL for VPCs [cloudstack]
Posted by "blueorangutan (via GitHub)" <gi...@apache.org>.
blueorangutan commented on PR #7150:
URL: https://github.com/apache/cloudstack/pull/7150#issuecomment-1817365932
<b>[SF] Trillian test result (tid-8351)</b>
Environment: kvm-centos7 (x2), Advanced Networking with Mgmt server 7
Total time taken: 54237 seconds
Marvin logs: https://github.com/blueorangutan/acs-prs/releases/download/trillian/pr7150-t8351-kvm-centos7.zip
Smoke tests completed. 116 look OK, 3 have errors, 0 did not run
Only failed and skipped tests results shown below:
Test | Result | Time (s) | Test File
--- | --- | --- | ---
test_08_upgrade_kubernetes_ha_cluster | `Failure` | 665.57 | test_kubernetes_clusters.py
test_08_migrate_vm | `Error` | 0.05 | test_vm_life_cycle.py
test_hostha_enable_ha_when_host_in_maintenance | `Error` | 302.81 | test_hostha_kvm.py
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Global ACL for VPCs [cloudstack]
Posted by "blueorangutan (via GitHub)" <gi...@apache.org>.
blueorangutan commented on PR #7150:
URL: https://github.com/apache/cloudstack/pull/7150#issuecomment-1815912919
@DaanHoogland a [SL] Trillian-Jenkins test job (centos7 mgmt + kvm-centos7) has been kicked to run smoke tests
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Global ACL for VPCs [cloudstack]
Posted by "DaanHoogland (via GitHub)" <gi...@apache.org>.
DaanHoogland commented on PR #7150:
URL: https://github.com/apache/cloudstack/pull/7150#issuecomment-1809706498
@blueorangutan package
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [cloudstack] DaanHoogland commented on a diff in pull request #7150: Global ACL for VPCs
Posted by "DaanHoogland (via GitHub)" <gi...@apache.org>.
DaanHoogland commented on code in PR #7150:
URL: https://github.com/apache/cloudstack/pull/7150#discussion_r1092096891
##########
server/src/main/java/com/cloud/network/vpc/NetworkACLServiceImpl.java:
##########
@@ -103,12 +104,15 @@ public class NetworkACLServiceImpl extends ManagerBase implements NetworkACLServ
@Override
public NetworkACL createNetworkACL(final String name, final String description, final long vpcId, final Boolean forDisplay) {
- final Account caller = CallContext.current().getCallingAccount();
- final Vpc vpc = _entityMgr.findById(Vpc.class, vpcId);
- if (vpc == null) {
- throw new InvalidParameterValueException("Unable to find VPC");
+ if (vpcId != 0) {
+ final Account caller = CallContext.current().getCallingAccount();
+ final Vpc vpc = _vpcDao.findById(vpcId);
Review Comment:
why does this need to change from `_entityMgr.findById(Vpc.class, vpcId)` to `_vpcDao.findById(vpcId)`? I a sure someone implemented this on purpose at some point.
##########
server/src/main/java/com/cloud/network/vpc/NetworkACLServiceImpl.java:
##########
@@ -1138,17 +1133,59 @@ protected void validateMoveAclRulesData(NetworkACLItemVO ruleBeingMoved, Network
if (nextRule == null && previousRule == null) {
throw new InvalidParameterValueException("Both previous and next ACL rule IDs cannot be invalid.");
}
- long aclId = ruleBeingMoved.getAclId();
+ long ruleAclId = ruleBeingMoved.getAclId();
Review Comment:
why must this be renamed? The new name does seem clearer to me.
##########
api/src/main/java/org/apache/cloudstack/api/command/user/network/CreateNetworkACLListCmd.java:
##########
@@ -111,12 +120,23 @@ public void execute() throws ResourceUnavailableException {
@Override
public long getEntityOwnerId() {
- Vpc vpc = _entityMgr.findById(Vpc.class, getVpcId());
- if (vpc == null) {
- throw new InvalidParameterValueException("Invalid vpcId is given");
- }
+ Account account;
+ Long vpcId = getVpcId();
Review Comment:
why not just use `vpcId`?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Global ACL for VPCs [cloudstack]
Posted by "blueorangutan (via GitHub)" <gi...@apache.org>.
blueorangutan commented on PR #7150:
URL: https://github.com/apache/cloudstack/pull/7150#issuecomment-1744735048
Packaging result [SF]: :heavy_check_mark: el7 :heavy_check_mark: el8 :heavy_check_mark: el9 :heavy_check_mark: debian :heavy_check_mark: suse15. SL-JID 7209
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [cloudstack] github-actions[bot] commented on pull request #7150: Global ACL for VPCs
Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on PR #7150:
URL: https://github.com/apache/cloudstack/pull/7150#issuecomment-1731309388
This pull request has merge conflicts. Dear author, please fix the conflicts and sync your branch with the base branch.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [cloudstack] blueorangutan commented on pull request #7150: Global ACL for VPCs
Posted by "blueorangutan (via GitHub)" <gi...@apache.org>.
blueorangutan commented on PR #7150:
URL: https://github.com/apache/cloudstack/pull/7150#issuecomment-1737455984
Packaging result [SF]: :heavy_check_mark: el7 :heavy_check_mark: el8 :heavy_check_mark: el9 :heavy_check_mark: debian :heavy_check_mark: suse15. SL-JID 7131
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [cloudstack] DaanHoogland commented on pull request #7150: Global ACL for VPCs
Posted by "DaanHoogland (via GitHub)" <gi...@apache.org>.
DaanHoogland commented on PR #7150:
URL: https://github.com/apache/cloudstack/pull/7150#issuecomment-1629092771
@blueorangutan package
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Global ACL for VPCs [cloudstack]
Posted by "shwstppr (via GitHub)" <gi...@apache.org>.
shwstppr commented on PR #7150:
URL: https://github.com/apache/cloudstack/pull/7150#issuecomment-1826284299
@blueorangutan test
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Global ACL for VPCs [cloudstack]
Posted by "blueorangutan (via GitHub)" <gi...@apache.org>.
blueorangutan commented on PR #7150:
URL: https://github.com/apache/cloudstack/pull/7150#issuecomment-1825733974
Packaging result [SF]: :heavy_check_mark: el7 :heavy_check_mark: el8 :heavy_check_mark: el9 :heavy_check_mark: debian :heavy_check_mark: suse15. SL-JID 7825
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Global ACL for VPCs [cloudstack]
Posted by "blueorangutan (via GitHub)" <gi...@apache.org>.
blueorangutan commented on PR #7150:
URL: https://github.com/apache/cloudstack/pull/7150#issuecomment-1814706274
@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.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Global ACL for VPCs [cloudstack]
Posted by "DaanHoogland (via GitHub)" <gi...@apache.org>.
DaanHoogland commented on PR #7150:
URL: https://github.com/apache/cloudstack/pull/7150#issuecomment-1815912641
@blueorangutan test
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Global ACL for VPCs [cloudstack]
Posted by "blueorangutan (via GitHub)" <gi...@apache.org>.
blueorangutan commented on PR #7150:
URL: https://github.com/apache/cloudstack/pull/7150#issuecomment-1817364558
<b>[SF] Trillian test result (tid-8359)</b>
Environment: kvm-centos7 (x2), Advanced Networking with Mgmt server 7
Total time taken: 51341 seconds
Marvin logs: https://github.com/blueorangutan/acs-prs/releases/download/trillian/pr7150-t8359-kvm-centos7.zip
Smoke tests completed. 117 look OK, 2 have errors, 0 did not run
Only failed and skipped tests results shown below:
Test | Result | Time (s) | Test File
--- | --- | --- | ---
test_08_upgrade_kubernetes_ha_cluster | `Failure` | 676.62 | test_kubernetes_clusters.py
test_08_migrate_vm | `Error` | 0.05 | test_vm_life_cycle.py
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Global ACL for VPCs [cloudstack]
Posted by "weizhouapache (via GitHub)" <gi...@apache.org>.
weizhouapache commented on PR #7150:
URL: https://github.com/apache/cloudstack/pull/7150#issuecomment-1816382493
> > @BryanMLima , one last thing; Do you think it makes sense to add the integration test to the test matrix somewhere? (in .github/workflows/ci.yaml)
>
> To be honest, I do not know the criteria for adding integration tests to the test matrix. From my understanding, all smoke tests need to pass for a PR to be merged, thus, I do not think it is necessary to add the integration test to the test matrix as well.
the tests in `test/integration/smoke/` should be executed in trillian test
currently there are some issues with our yum repository. fixing it
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Global ACL for VPCs [cloudstack]
Posted by "BryanMLima (via GitHub)" <gi...@apache.org>.
BryanMLima commented on PR #7150:
URL: https://github.com/apache/cloudstack/pull/7150#issuecomment-1773282114
> @BryanMLima thanks for the update. Will this be ready for 4.19?
I don't think so, I have other tasks to work upon at the moment, and it will be difficult to get this PR ready before the 4.19.0 code freeze at the end of the month.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [cloudstack] BryanMLima commented on pull request #7150: Global ACL for VPCs
Posted by "BryanMLima (via GitHub)" <gi...@apache.org>.
BryanMLima commented on PR #7150:
URL: https://github.com/apache/cloudstack/pull/7150#issuecomment-1431913355
@DaanHoogland thanks for the review, I'm not used to the Marvin tests so your suggestions made it clearer to me. Let me know if there is more to change.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [cloudstack] blueorangutan commented on pull request #7150: Global ACL for VPCs
Posted by "blueorangutan (via GitHub)" <gi...@apache.org>.
blueorangutan commented on PR #7150:
URL: https://github.com/apache/cloudstack/pull/7150#issuecomment-1434395765
Packaging result: :heavy_check_mark: el7 :heavy_check_mark: el8 :heavy_check_mark: el9 :heavy_check_mark: debian :heavy_check_mark: suse15. SL-JID 5599
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [cloudstack] DaanHoogland commented on pull request #7150: Global ACL for VPCs
Posted by "DaanHoogland (via GitHub)" <gi...@apache.org>.
DaanHoogland commented on PR #7150:
URL: https://github.com/apache/cloudstack/pull/7150#issuecomment-1437190102
@blueorangutan package
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [cloudstack] blueorangutan commented on pull request #7150: Global ACL for VPCs
Posted by "blueorangutan (via GitHub)" <gi...@apache.org>.
blueorangutan commented on PR #7150:
URL: https://github.com/apache/cloudstack/pull/7150#issuecomment-1437190762
@DaanHoogland a 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.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [cloudstack] blueorangutan commented on pull request #7150: Global ACL for VPCs
Posted by "blueorangutan (via GitHub)" <gi...@apache.org>.
blueorangutan commented on PR #7150:
URL: https://github.com/apache/cloudstack/pull/7150#issuecomment-1437281566
Packaging result: :heavy_check_mark: el7 :heavy_check_mark: el8 :heavy_check_mark: el9 :heavy_check_mark: debian :heavy_check_mark: suse15. SL-JID 5613
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [cloudstack] DaanHoogland commented on a diff in pull request #7150: Global ACL for VPCs
Posted by "DaanHoogland (via GitHub)" <gi...@apache.org>.
DaanHoogland commented on code in PR #7150:
URL: https://github.com/apache/cloudstack/pull/7150#discussion_r1108144395
##########
test/integration/smoke/test_global_acls.py:
##########
@@ -0,0 +1,245 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+from marvin.cloudstackTestCase import cloudstackTestCase
+from marvin.lib.utils import cleanup_resources
+from marvin.lib.base import (Network, NetworkACLList, NetworkOffering, VpcOffering, VPC, NetworkACL)
+from marvin.lib.common import (get_domain, get_zone)
+from nose.plugins.attrib import attr
+from marvin.cloudstackException import CloudstackAPIException
+
+
+class Services:
+ """Test Global ACLs
+ """
+
+ def __init__(self):
+ self.services = {
+ "root_domain": {
+ "name": "ROOT",
+ },
+ "domain": {
+ "name": "Domain",
+ },
+ "user": {
+ "username": "user",
+ "roletype": 0,
+ },
+ "domain_admin": {
+ "username": "Domain admin",
+ "roletype": 2,
+ },
+ "root_admin": {
+ "username": "Root admin",
+ "roletype": 1,
+ },
+ "vpc": {
+ "name": "vpc-networkacl",
+ "displaytext": "vpc-networkacl",
+ "cidr": "10.1.1.0/24",
+ },
+ "vpcnetwork": {
+ "name": "vpcnetwork",
+ "displaytext": "vpcnetwork",
+ },
+ "rule": {
+ "protocol": "all",
+ "traffictype": "ingress",
+ }
+ }
+
+
+class TestGlobalACLs(cloudstackTestCase):
+
+ @classmethod
+ def setUpClass(cls):
+ cls.testClient = super(TestGlobalACLs, cls).getClsTestClient()
+ cls.apiclient = cls.testClient.getApiClient()
+
+ cls.services = Services().services
+ cls.domain = get_domain(cls.apiclient)
+ cls.zone = get_zone(cls.apiclient, cls.testClient.getZoneForTests())
+ return
+
+ @classmethod
+ def tearDownClass(cls):
+ super(TestGlobalACLs, cls).tearDownClass()
+
+ def setUp(self):
+ self.user_apiclient = self.testClient.getUserApiClient(self.services["user"]["username"],
+ self.services["domain"]["name"],
+ self.services["user"]["roletype"])
+
+ self.domain_admin_apiclient = self.testClient.getUserApiClient(self.services["domain_admin"]["username"],
+ self.services["domain"]["name"],
+ self.services["domain_admin"]["roletype"])
+
+ self.admin_apiclient = self.testClient.getUserApiClient(self.services["root_admin"]["username"],
+ self.services["root_domain"]["name"],
+ self.services["root_admin"]["roletype"])
+
+ self.cleanup = []
+ return
+
+ def tearDown(self):
+ super(TestGlobalACLs, cls).tearDown()
+
+ @attr(tags=["advanced", "basic"], required_hardware="false")
+ def test_create_global_acl(self):
+ """ Test create global ACL as a normal user, domain admin and root admin users.
+ """
+
+ self.debug("Creating ACL list as a normal user, should raise exception.")
+ self.assertRaisesRegex(CloudstackAPIException, "Only Root Admin can create global ACLs.",
+ NetworkACLList.create, apiclient=self.user_apiclient, services={},
+ name="acl", description="acl")
+
+ self.debug("Creating ACL list as a domain admin, should raise exception.")
+ self.assertRaisesRegex(CloudstackAPIException, "Only Root Admin can create global ACLs.",
+ NetworkACLList.create, apiclient=self.domain_admin_apiclient, services={},
+ name="acl", description="acl")
+
+ self.debug("Creating ACL list as a root admin, should work.")
+ acl = NetworkACLList.create(apiclient=self.admin_apiclient, services={}, name="acl", description="acl")
+ self.cleanup.append(acl)
+ self.assertIsNotNone(acl, "A root admin user should be able to create a global ACL.")
+
+ return
+
+ @attr(tags=["advanced", "basic"], required_hardware="false")
+ def test_replace_acl_of_network(self):
+ """ Test to replace ACL of a VPC as a normal user, domain admin and root admin users.
+ """
+ # Get network offering
+ networkOffering = NetworkOffering.list(self.apiclient, name="DefaultIsolatedNetworkOfferingForVpcNetworks")
+ self.assertTrue(networkOffering is not None and len(networkOffering) > 0, "No VPC network offering")
+
+ # Getting VPC offering
+ vpcOffering = VpcOffering.list(self.apiclient, name="Default VPC offering")
+ self.assertTrue(vpcOffering is not None and len(vpcOffering) > 0, "No VPC offerings found")
+
+ # Creating VPC
+ vpc = VPC.create(
+ apiclient=self.apiclient,
+ services=self.services["vpc"],
+ networkDomain="vpc.networkacl",
+ vpcofferingid=vpcOffering[0].id,
+ zoneid=self.zone.id,
+ domainid=self.domain.id
+ )
+ self.cleanup.append(vpc)
+ self.assertTrue(vpc is not None, "VPC creation failed")
+
+ # Creating ACL list
+ acl = NetworkACLList.create(apiclient=self.apiclient, services={}, name="acl", description="acl")
+
+ # Creating tier on VPC with ACL list
+ network = Network.create(
+ apiclient=self.apiclient,
+ services=self.services["vpcnetwork"],
+ accountid="Admin",
+ domainid=self.domain.id,
+ networkofferingid=networkOffering[0].id,
+ zoneid=self.zone.id,
+ vpcid=vpc.id,
+ aclid=acl.id,
+ gateway="10.1.1.1",
+ netmask="255.255.255.192"
+ )
+ self.cleanup.append(network)
+
+ # User should be able to replace ACL
+ network.replaceACLList(apiclient=self.user_apiclient, aclid=acl.id)
+ # Domain Admin should be able to replace ACL
+ network.replaceACLList(apiclient=self.domain_admin_apiclient, aclid=acl.id)
+ # Admin should be able to replace ACL
+ network.replaceACLList(apiclient=self.admin_apiclient, aclid=acl.id)
+
+ return
+
+ @attr(tags=["advanced", "basic"], required_hardware="false")
+ def test_create_acl_rule(self):
+ """ Test to create ACL rule as a normal user, domain admin and root admin users.
+ """
+ # Creating ACL list
+ acl = NetworkACLList.create(apiclient=self.admin_apiclient, services={}, name="acl", description="acl")
+ self.cleanup.append(acl)
+
+ self.debug("Creating ACL rule as a user, should raise exception.")
+ self.assertRaisesRegex(CloudstackAPIException, "Only Root Admins can create rules for a global ACL.",
+ NetworkACL.create, self.user_apiclient, services=self.services["rule"], aclid=acl.id)
+ self.debug("Creating ACL rule as a domain admin, should raise exception.")
+ self.assertRaisesRegex(CloudstackAPIException, "Only Root Admins can create rules for a global ACL.",
+ NetworkACL.create, self.domain_admin_apiclient, services=self.services["rule"], aclid=acl.id)
+ self.debug("Creating ACL rule as a root admin, should work.")
+ acl_rule = NetworkACL.create(self.admin_apiclient, services=self.services["rule"], aclid=acl.id)
+ self.cleanup.append(acl_rule)
+
+ return
+
+ @attr(tags=["advanced", "basic"], required_hardware="false")
+ def test_delete_acl_rule(self):
+ """ Test to delete ACL rule as a normal user, domain admin and root admin users.
+ """
+ # Creating ACL list
+ acl = NetworkACLList.create(apiclient=self.apiclient, services={}, name="acl", description="acl")
+ self.cleanup.append(acl)
+
+ # Creating ACL rule
+ acl_rule = NetworkACL.create(self.apiclient, services=self.services["rule"], aclid=acl.id)
+
+ self.debug("Deleting ACL rule as a user, should raise exception.")
+ self.assertRaisesRegex(Exception, "Only Root Admin can delete global ACL rules.",
+ NetworkACL.delete, acl_rule, self.user_apiclient)
+ self.debug("Deleting ACL rule as a domain admin, should raise exception.")
+ self.assertRaisesRegex(Exception, "Only Root Admin can delete global ACL rules.",
+ NetworkACL.delete, acl_rule, self.domain_admin_apiclient)
+
+ self.debug("Deleting ACL rule as a root admin, should work.")
+ NetworkACL.delete(acl_rule, self.admin_apiclient)
+
+ # Verify if the number of ACL rules is equal to four, i.e. the number of rules
+ # for the default ACLs `default_allow` (2 rules) and `default_deny` (2 rules) ACLs
+ number_of_acl_rules = acl_rule.list(apiclient=self.admin_apiclient)
+ self.assertEqual(len(number_of_acl_rules), 4)
+
+ return
+
+
+ @attr(tags=["advanced", "basic"], required_hardware="false")
+ def test_delete_global_acl(self):
+ """ Test delete global ACL as a normal user, domain admin and root admin users.
+ """
+
+ # Creating ACL list. Not adding to cleanup as it will be deleted in this method
+ acl = NetworkACLList.create(apiclient=self.apiclient, services={}, name="acl", description="acl")
Review Comment:
```suggestion
acl = NetworkACLList.create(apiclient=self.apiclient, services={}, name="acl", description="acl")
self.cleanup.append(acl)
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [cloudstack] sonarcloud[bot] commented on pull request #7150: Global ACL for VPCs
Posted by "sonarcloud[bot] (via GitHub)" <gi...@apache.org>.
sonarcloud[bot] commented on PR #7150:
URL: https://github.com/apache/cloudstack/pull/7150#issuecomment-1474421867
SonarCloud Quality Gate failed. [](https://sonarcloud.io/dashboard?id=apache_cloudstack&pullRequest=7150)
[](https://sonarcloud.io/project/issues?id=apache_cloudstack&pullRequest=7150&resolved=false&types=BUG) [](https://sonarcloud.io/project/issues?id=apache_cloudstack&pullRequest=7150&resolved=false&types=BUG) [0 Bugs](https://sonarcloud.io/project/issues?id=apache_cloudstack&pullRequest=7150&resolved=false&types=BUG)
[](https://sonarcloud.io/project/issues?id=apache_cloudstack&pullRequest=7150&resolved=false&types=VULNERABILITY) [](https://sonarcloud.io/project/issues?id=apache_cloudstack&pullRequest=7150&resolved=false&types=VULNERABILITY) [0 Vulnerabilities](https://sonarcloud.io/project/issues?id=apache_cloudstack&pullRequest=7150&resolved=false&types=VULNERABILITY)
[](https://sonarcloud.io/project/security_hotspots?id=apache_cloudstack&pullRequest=7150&resolved=false&types=SECURITY_HOTSPOT) [](https://sonarcloud.io/project/security_hotspots?id=apache_cloudstack&pullRequest=7150&resolved=false&types=SECURITY_HOTSPOT) [0 Security Hotspots](https://sonarcloud.io/project/security_hotspots?id=apache_cloudstack&pullRequest=7150&resolved=false&types=SECURITY_HOTSPOT)
[](https://sonarcloud.io/project/issues?id=apache_cloudstack&pullRequest=7150&resolved=false&types=CODE_SMELL) [](https://sonarcloud.io/project/issues?id=apache_cloudstack&pullRequest=7150&resolved=false&types=CODE_SMELL) [1 Code Smell](https://sonarcloud.io/project/issues?id=apache_cloudstack&pullRequest=7150&resolved=false&types=CODE_SMELL)
[](https://sonarcloud.io/component_measures?id=apache_cloudstack&pullRequest=7150&metric=new_coverage&view=list) [27.0% Coverage](https://sonarcloud.io/component_measures?id=apache_cloudstack&pullRequest=7150&metric=new_coverage&view=list)
[](https://sonarcloud.io/component_measures?id=apache_cloudstack&pullRequest=7150&metric=new_duplicated_lines_density&view=list) [0.0% Duplication](https://sonarcloud.io/component_measures?id=apache_cloudstack&pullRequest=7150&metric=new_duplicated_lines_density&view=list)
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [cloudstack] DaanHoogland commented on pull request #7150: Global ACL for VPCs
Posted by "DaanHoogland (via GitHub)" <gi...@apache.org>.
DaanHoogland commented on PR #7150:
URL: https://github.com/apache/cloudstack/pull/7150#issuecomment-1527212122
@blueorangutan package
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org