Commit Graph

927 Commits

Author SHA1 Message Date
Pearl Dsilva 3a6f68b56a Merge branch 'nsx-integration' of https://github.com/apache/cloudstack into nsx-cks-support 2023-12-05 14:01:15 -05:00
nvazquez 33b494aebf
Merge branch 'main' into nsx-integration 2023-11-30 22:58:43 -03:00
Nicolas Vazquez 8a87eaaec9
[NSX] Add ACL types support (#8224)
* NSX: Create segment group on segment creation

* Add unit tests

* Remove group for segment before removing segment

* Create Distributed Firewall rules

* Remove distributed firewall policy on segment deletion

* Fix policy rule ID and add more unit tests

* Fix DROP action rules and transform tests

* Add new ACL rules

* Fixes

* associate security policies with groups and not to DFW and add deletion of rules

* Fix name convention

---------

Co-authored-by: Pearl Dsilva <pearl1594@gmail.com>
2023-11-30 20:32:48 -03:00
Pearl Dsilva 55ae22a34f CKS support changed - MTU updated, etc 2023-11-30 09:37:33 -05:00
Pearl Dsilva 87491fed6f Merge branch 'nsx-isolated-source-nat' of https://github.com/apache/cloudstack into nsx-cks-support 2023-11-28 14:47:59 -05:00
Pearl Dsilva d3c97a9f54 fix filter for getting transport zones 2023-11-28 08:59:29 -05:00
Pearl Dsilva bfa98b1050 update order of ports in PF & FW rules 2023-11-16 21:21:38 -05:00
Pearl Dsilva 8c1154c625 add license 2023-11-15 15:41:15 -05:00
Pearl Dsilva b1dcb9a111 Add support to delete firewall rules 2023-11-15 10:56:13 -05:00
Pearl Dsilva cd503725b1 fix npes 2023-11-14 23:42:03 -05:00
Pearl Dsilva 6fcdf2092f build failure - fix unit test 2023-11-14 22:43:25 -05:00
Pearl Dsilva b0257dfaba Add Firewall rules 2023-11-14 22:24:44 -05:00
Pearl Dsilva 96de7e3fcc Add support for routed NSX Isolated networks \n and non RFC 1918 compliant IPs 2023-11-14 11:02:52 -05:00
Pearl Dsilva 770a96ae40 Add support for routed NSX Isolated networks \n and non RFC 1918 compliant IPs 2023-11-14 10:39:31 -05:00
rRajivramachandran 96b07d797b
Fix flaky tungsten test using comparator (#8232) 2023-11-14 10:17:32 +01:00
nvazquez d72829c602
Fix policy rule ID and add more unit tests 2023-11-13 22:59:21 -03:00
nvazquez 1a24ba6949
Remove distributed firewall policy on segment deletion 2023-11-13 16:44:22 -03:00
nvazquez c6acd8fb61
Create Distributed Firewall rules 2023-11-13 16:20:57 -03:00
nvazquez bd9be1239c
Remove group for segment before removing segment 2023-11-12 22:55:17 -03:00
nvazquez 28b4fee6c2
Add unit tests 2023-11-12 22:33:01 -03:00
nvazquez e5965a152f
NSX: Create segment group on segment creation 2023-11-12 21:07:51 -03:00
Pearl Dsilva 88a07f479f
NSX - add LB route Advertizement (#8192) 2023-11-07 11:05:02 -03:00
nvazquez ab994dbfcf
Merge branch 'main' into nsx-integration 2023-11-06 08:15:33 -03:00
Nicolas Vazquez ecd32d5632
[NSX] Fix update source NAT IP (#8176)
* [NSX] Fix update source NAT IP

* Fix startup

* Fix API result
2023-11-06 08:15:00 -03:00
rRajivramachandran e9b24b6c32
Make authentication request parameter order to be deterministic (#8185) 2023-11-06 09:53:49 +01:00
Pearl Dsilva b89085ef11 NSX: Support Source NAT on NSX Isolated networks 2023-11-03 14:10:47 -04:00
nvazquez 42300aa80e
Merge branch 'main' into nsx-integration 2023-11-03 12:08:39 -03:00
Pearl Dsilva 7c72aa1285 Merge branch 'main' of https://github.com/apache/cloudstack into nsx-integration 2023-11-03 09:56:33 -04:00
Codegass b2938c0528
Refactor testCRUDAcl into Separate Test Cases (#7705)
- Extracted shared ACL setup logic into a private helper method, setupAcl().
- Split original testCRUDAcl into two separate tests: testCRUDAclReadAll and testCRUDAclReadOne.
- Each test case now represents a unique scenario for better readability and maintainability.
- Replaced assertTrue(false) with fail() in catch blocks for better test failure indication.

These changes aim to enhance the clarity and maintainability of the test suite, and ensure each test case checks only one scenario.
2023-11-03 18:08:15 +05:30
gzhao9 9e8f591ace
Refactoring org.apache.cloudstack.network.tungsten.service (#8098)
* Refactoring reduces mock cloning of TungstenAnswer

* Apply suggestions from code review

Great suggestions, thanks a lot!

Co-authored-by: dahn <daan.hoogland@gmail.com>

* Rename CreateMockTungstenAnswer  to MockTungstenAnswerFactory

* Updated parameter to camel case.

* Revised in accordance with the latest update

* Replace all `\r` with `\n`.

* Replace all \r with \n.

* temp for re-uploading

* reupdate

* update line ending

* update ling ending

* Add static methods to avoid duplicate creation of new

---------

Co-authored-by: dahn <daan.hoogland@gmail.com>
2023-11-03 17:19:59 +05:30
gzhao9 2f97e3bd83
refactor MockNetworkVO (#8137)
* refactor MockNetworkVO

* Apply suggestions from code review

Co-authored-by: dahn <daan.hoogland@gmail.com>

* adding static

adding a static method to the MockNetworkVO class that generates a MockNetworkVO rather than using new everytime.

---------

Co-authored-by: dahn <daan.hoogland@gmail.com>
2023-11-03 17:19:32 +05:30
Pearl Dsilva a36f355877
NSX: Router Public nic to get IP from systemVM Ip range (#8172)
* NSX: Router Public nic to get IP from systemVM Ip range

* Fix VR IP address and setSourceNatIp command

* NSX: hide systemVM reserved IP range SourceNAT

* fix test

---------

Co-authored-by: nvazquez <nicovazquez90@gmail.com>
2023-11-01 16:14:33 -03:00
Pearl Dsilva dc90d0b9dd
NSX: fix LB member addition and deletion and add defensive checks (#8167) 2023-10-31 21:35:02 -03:00
Nicolas Vazquez d0fe7b269f
NSX: Fix VR public NIC allocation (#8166) 2023-10-31 20:34:56 -03:00
Pearl Dsilva 20cb9f56f3 Merge branch 'main' of https://github.com/apache/cloudstack into nsx-integration 2023-10-31 06:10:52 -04:00
Harikrishna 235e4fe190
Oauth2 integration with CloudStack (#7996)
OAuth2, the industry-standard authorization or authentication framework, simplifies the process of
granting access to resources. CloudStack supports OAuth2 authentication wherein users can login into
CloudStack without using a username and password. Support for Google and Github providers has been added.
Other OAuth2 providers can be easily integrated with CloudStack using its plugin framework.

The login page will show provider options when the OAuth2 is enabled and corresponding providers are configured.

"OAuth configuration" sub-section is present under "Configuration" where admins can register the corresponding
OAuth providers.
2023-10-31 13:25:28 +05:30
Nicolas Vazquez a4be3eb380
[NSX] Add SNAT support (#8100)
* In progress add source NAT

* Fix after merge

* Fix tests

* Fix NPE on isolated network deletion

* Reserve source NAT IP when its not passed for NSX VPC

* Create source NAT rule on VR NIC allocation

* Fix update VPC and remove VPC to update and remove SNAT rule

* Fix packaging

* Address review comment

* Fix build

* fix build - unused import

* Add defensive checks

* Add missing design to NSX public guru

---------

Co-authored-by: Pearl Dsilva <pearl1594@gmail.com>
2023-10-31 00:54:27 -03:00
Pearl Dsilva 72bdc38381 build failure fix 2023-10-30 20:41:44 -04:00
Pearl Dsilva ff85d3df3b
Nsx add lb rule (#8161)
* NSX: Create and delete NSX Static Nat rules

* fix issues with static nat

* add static nat

* Support to add and delete Port forward rules

* add license

* fix adding multiple pf rules

* cleanup

* NSX: Add support to create and delete Load balancer rules

* fix deletion of lb rules

* add header file and update protocol detail
2023-10-30 19:55:03 -04:00
Pearl Dsilva ce1659e8fc
NSX: Create and Delete static NAT & Port forward rules (#8131)
* NSX: Create and delete NSX Static Nat rules

* fix issues with static nat

* add static nat

* Support to add and delete Port forward rules

* add license

* fix adding multiple pf rules

* cleanup

* fix lint check

* fix smoke tests

* fix smoke tests
2023-10-30 19:37:12 -04:00
Nicolas Vazquez f46b7883a8
[NSX] Allow NSX isolated networks (#8132)
* Add network offerings for NSX on isolated networks

* Fix offerings creation

* In progress NSX isolated network

* Fixes

* Fix NIC allocation to router
2023-10-24 15:00:41 -03:00
Pearl Dsilva be2b8edd20
NSX: Refactor Network & VPC offering (#8110)
* [NSX] Refactor API wrapper operations

* Network offering changes for NSX

* fix services and provider combination

* address comments: rename param

* update nsx_mode parameter

---------

Co-authored-by: nvazquez <nicovazquez90@gmail.com>
2023-10-23 12:50:13 -03:00
Pearl Dsilva 69ded800e9
modify NSX resource naming convention (#8095)
* modify NSX resource naming convention

* remove unused imports

* add a setup phase between desgin and implementation of a network for intermediary steps

* add method to all classes
2023-10-23 12:31:30 -03:00
Pearl Dsilva 8337486fdc
Nsx unit tests (#8090)
* Add tests

* add test for NsxGuestNetworkGuru

* add unit tests for NsxResource

* add unti tests for NsxElement

* cleanup

* [NSX] Refactor API wrapper operations

* update tests

* update tests - add nsxProviderServiceImpl test

* add unit test - NsxServiceImpl

* add license

* Big refactor

* Address review comment

* change network cidr to cidr to prevent NPE

* add domain and zone names to the various networks - vpc & tier

* fix tests

---------

Co-authored-by: nvazquez <nicovazquez90@gmail.com>
2023-10-12 22:30:47 -03:00
Nicolas Vazquez 3f8f9e294b
[NSX] Refactor API wrapper operations (#8059)
* [NSX] Refactor API wrapper operations

* Big refactor

* Address review comment

* change network cidr to cidr to prevent NPE

* add domain and zone names to the various networks - vpc & tier

---------

Co-authored-by: Pearl Dsilva <pearl1594@gmail.com>
2023-10-12 19:39:01 -03:00
Nicolas Vazquez 7332e6dbda
[NSX] Fix DHCP relay config deletion was missing zone name (#8068) 2023-10-10 12:05:19 -03:00
Pearl Dsilva dc1665cba7
[NSX] Cleanup DHCP Relay config on segment deletion (#108)
* Cleanup DHCP Relay config on segment deletion

* update segment & relay name generators and call delete dhcprelay after deletion of segment

* address comment
2023-10-08 21:00:42 -03:00
Nicolas Vazquez e7e511b685
[NSX] Create a DHCP relay and add it to a VPC tier segment (#107)
* Create DHCP relay command and execute request

* In progress integrate with networking

* Create DHCP relay config on the network VR allocation

* Revert domain router dao changes

* Create DHCP relay con VR nic plug to NSX network

* Link DHCP relay config to segment after creation
2023-10-08 20:59:16 -03:00
Pearl Dsilva 272704c4a7 move creation of segments to design phase 2023-09-27 11:32:17 -04:00
Pearl Dsilva 15f704e530 add sleep before deletion of vpc / tier g/w for ports to be removed 2023-09-27 06:37:55 -04:00