Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #737 from miguelaferreira/feature/mferreira/ncx-fo…
…llow-redirects-gardened-rebase CLOUDSTACK-8758: Handle redirects in communication with NXS controller (a.k.a. Nicira NVP)When an NSX controller node is part of a cluster it will redirect API calls to the master controller. Because the ACS management server does not follow such redirects, if there is a change of master within a NSX cluster, the NSX device (a.k.a. NiciraNvp) needs to be reconfigured (via the management server DB). The goal of this PR is to enable ACS management server to follow HTTP redirects sent by NSX controllers. However, other changes were made to the cloud-utils module that provides the REST client that the NSX plugin uses. Cosmetic changes: * Upgrade maven module structure for cloud-utils and cloud-plugin-netowkr-nvp to comply with maven default * Several refactorings on both modules to consistently format the code, remove unused code, declare final when possible, remove auto generated comments, etc Other changes: * Upgrade HTTP library used in REST client to version 4.5 of Apache HTTP Components * Implement generic REST client that supports HTTP redirects * Implement NSX specific REST client * Simplify NSX api implementation * Previously existing unit tests for both the REST client and NSX api were either maintained in the same test classes, moved to new test classes (because code under tests also moved), or removed (because code under tests was also removed) * New Marvin tests for NSX controllers Testing: * Ran all unit tests present in the project * Ran Java Integration tests for NSX api targeting both a master and a slave controller * Ran new Marvin test for NSX controller * Manual inspection of logs to confirm redirection is taking place * pr/737: Use NSX specific RestClient in API implementation (NiciraNvpApi) Refactor NSX api implementation (NiciraNvpApi) Add NSX specific RestClient implementation Delegate HTTP protocol activity in RESTServiceConnector to RestClient Add basic RestClient implentation based on HTTP Components 4.5 Code clean up in cloud-plugin-network-nvp project Code clean up in cloud-utils project Refactor cloud-plugin-network-nvp project into Maven default structure Refactor cloud-utils project into Maven default structure Fix unit-test library dependencies Add Marvin test for Nicira NVP plugin Create Nicira NVP devices and enable plugin at deploy Signed-off-by: Remi Bergsma <github@remi.nl>
- Loading branch information