-
Notifications
You must be signed in to change notification settings - Fork 89
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Improved and refactored support for multiple Load Balancers (of #111 …
…and #328, in preparation for #644) Note: There was already a high degree of symmetry (of both functionality and implementation) between the CPI's support for LBs and AGWs. However, previous CPI enhancements (for example: #541 for #111 and #638 for #328) had reduced this symmetry to some degree, and also caused some divergence between the names of some methods and variables (vs their implementations/values), which would make it harder to both implement and review the new functionality for #644, and also harder to maintain the symmetry between the LB and AGW functionality. These changes include: - refactoring of existing code/implementation. E.g. Renamed some vars and methods to more accurately reflect their current values/behavior. - minor configuration API enhancements. E.g. Allow the `load_balancer` config to be configured as an Array, instead of the (previously-undocumented, but already-supported) comma-delimited string of LB names, to support multiple LB configs which differ by more than just the LB name (which now enables the functionality of #111 and #328 to be used more independently within a single config). - adding multiple new/missing unit tests, which cover existing functionality (previously added by #541 for #111 and #638 for #328) which was previously not covered/tested by the unit test suite. --- COMMIT HISTORY: Modified the `VMCloudProps._parse_load_balancer_config` method to allow the `load_balancer` config to be configured as an Array. Note: When specifying an Array of LBs, each element of the Array should be a String and/or Hash of the same format which was previously (and still is) valid when configuring a single LB as a non-Array. Refactoring: Minor refactoring in the `VMManager._get_load_balancers` method. Added additional data type validation to the `VMCloudProps._parse_load_balancer_config` method. Modified the `VMCloudProps._parse_load_balancer_config` method to return `nil` when the `load_balancer` config is omitted/missing. Added additional specs for the `VMCloudProps._parse_load_balancer_config` method. Refactoring: Renamed the `VMCloudProps.load_balancer` attribute. Refactoring of the `VMCloudProps._parse_load_balancer_config` and `VMManager._get_load_balancers` methods' implementations. Refactoring: Cleanup of the `VMCloudProps._parse_load_balancer_config` method's implementation. Refactoring: Minor cleanup of the `VMManager._get_load_balancers` method's implementation. Renamed a key within the Hash returned by the `AzureClient.parse_network_interface` method. Fixed the `AzureClient.parse_network_interface` method to correctly return all of the NIC's load_balancers' info (instead of only the first LB's info). Refactoring: Minor refactoring in the `AzureClient.create_network_interface` method. Refactoring: Renamed some vars in the `AzureClient.create_network_interface` method. Refactoring: Renamed a key within the `nic_params` Hash (from "load_balancer" to "load_balancers"), and fixed inaccurate doc comments for that key. Fixed a comment typo. Refactoring: Renamed a method and some vars: vm_manager_network.rb.
- Loading branch information
Showing
10 changed files
with
233 additions
and
67 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.