-
Notifications
You must be signed in to change notification settings - Fork 931
Libcloud 737 create dimension data load balancing driver #567
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Libcloud 737 create dimension data load balancing driver #567
Conversation
…/stop/restart server. list servers using new API, updated extra calls for VLAN and network domain. Fixed up unit tests and added new fixtures
…VIP functionality.
…s to the pool and create a virtual listener on the big-ip. Added docstrings to some of the methods. todo - complete unit tests for extended methods
…s. added ability to delete nodes, vips and pools.
kwargs['region'] = self.selected_region | ||
return kwargs | ||
|
||
def create_balancer(self, name, port, protocol, algorithm, members): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is members
a required argument or you can create a load-balancer with no initial members and attach them later?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I didn't test that case of having members as None but technically you can create a virtual listener pool with no members. I'll add a check before it adds members to check members is not None and add a unit test for that scenario.
On Sat, Aug 29, 2015 at 9:19 AM -0700, "Tomaz Muraus" notifications@github.com wrote:
In libcloud/loadbalancer/drivers/dimensiondata.py:
port=port,
api_version=api_version,
region=region,
**kwargs)
- def _ex_connection_class_kwargs(self):
"""
Add the region to the kwargs before the connection is instantiated
"""
kwargs = super(DimensionDataLBDriver,
self)._ex_connection_class_kwargs()
kwargs['region'] = self.selected_region
return kwargs
- def create_balancer(self, name, port, protocol, algorithm, members):
Is members a required argument or you can create a load-balancer with no initial members and attach them later?
—
Reply to this email directly or view it on GitHub.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Alright, thanks.
Besides that, it looks good to me.
… empty list of members, or a NoneType for the list of members. Also creating tests for the destroy instance methods and added docstrings.
Checked in updates and tests to support the use case you mentioned. Also added a few more tests and some docstrings for when the docs get generated |
Thanks. I thought that the base driver and standard API defaults Imo, it makes sense to allow users to create load balancer without any initial members (e.g. you want to pre-allocate a balancer so you don't need to wait for the creation later on when you need it), so I will also go ahead and make the change in the base API as well. |
I'm having issues (a bunch of merge conflicts) while trying to merge those changes into trunk. Can you please synchronize your branch with the latest upstream trunk? |
…ancing_driver Conflicts: libcloud/compute/drivers/dimensiondata.py
I must be missing something here, some scaffolding logic to add the new unit tests class to the general test suite. I was always running the tests directly. |
You mean you are not sure why tests fail on Travis CI or something else? I can look while merging it. Could be an issue with an import or similar. |
I've done the sync upstream, merged into my fork, then the branch, so auto loadTestsFromName
AttributeError: 'module' object has no attribute 'test_dimensiondata' But, it exists.. On Sun, Aug 30, 2015 at 10:08 PM, Tomaz Muraus notifications@github.com
|
@tonybaloney compute driver was the one causing failure. I've fixed the issue locally and will merge it shortly: python libcloud/test/compute/test_dimensiondata.py
Traceback (most recent call last):
File "libcloud/test/compute/test_dimensiondata.py", line 21, in <module>
from libcloud.compute.drivers.dimensiondata import DimensionDataAPIException
ImportError: cannot import name DimensionDataAPIException I will also look into the test loading code and see if it's possible to make it report more user-friendly errors. |
We just reached the same conclusion. Threw me off having 2 test classes of the same name! Pushed and passing. It should be clear to merge now. |
Merged, thanks! |
Created a dimension data driver for load balancing
placed proprietary logic into ex_methods
supported existing interfaces for LoadBalancer
moved common classes and the connection class used in compute into a common library
added unit tests and fixtures for the load balancer driver
updated the docs
tested against expected results and API docs