Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
LIBCLOUD-700 Add support for setting the region #513
I based it on the joyent driver, which follows a similar pattern (so of note that one may suffer the same issue!).
Running DimensionData and Rackspace side by side does give results for the DimensionData driver, then
Will follow the EC2 pattern instead and resubmit changes
Updated and tested against multiple regions in the same process by:
DimensionData = get_driver(Provider.DIMENSIONDATA)
drivers = [DimensionData('anthony','****',region='dd-na'),
for driver in drivers:
Gives 14 and 154 as expected.
@tonybaloney Thanks, I will have a look.
Also, to clarify it, your example wouldn't uncover the bug. You would need to do something like this:
driver1 = cls(region='region-1') driver2 = cls(region='region-2') pprint(driver1.list_nodes()) pprint(driver2.list_nodes()) pprint(driver1.list_nodes()) # If there is a bug, this line would result in region from driver2 also being used here