-
Notifications
You must be signed in to change notification settings - Fork 924
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-723] Added cloud specific parameter to base compute wait_un… #548
Conversation
…til_running method to make compatible with Azure
@davidwilson2038 Good catch and thanks. |
@@ -1260,8 +1260,9 @@ def delete_key_pair(self, key_pair): | |||
raise NotImplementedError( | |||
'delete_key_pair not implemented for this driver') | |||
|
|||
def wait_until_running(self, nodes, wait_period=3, timeout=600, | |||
ssh_interface='public_ips', force_ipv4=True): | |||
def wait_until_running(self, nodes, ex_cloud_opts=None, wait_period=3, |
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.
Can you please move this new argument to the end so it's the last argument?
This way the change is backward compatible and doesn't break existing code if using non keyword arguments.
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.
Please also add a docstring which explains what this argument does.
Edit: Never mind, I see the docstring is already there.
ssh_interface='public_ips', force_ipv4=True): | ||
def wait_until_running(self, nodes, wait_period=3, | ||
timeout=600, ssh_interface='public_ips', | ||
force_ipv4=True, **ex_list_nodes_kwargs): |
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.
There should be no **
here since user should pass in a dict to the function. I will remove it when merging the patch.
Made this method signature fix (4cc3adf) and merged changes into trunk. Thanks. |
@davidwilson2038 On a related note - Now that this is merged into trunk, you can also override |
Fixed LIBCLOUD-723 bug with Azure driver where the wait_until_running method is broken because it calls self.list_nodes() without any options (list_nodes is defined as requiring an ex_cloud_service parameter). I added an optional ex_cloud_opts parameter to the wait_until_running method to make it work and also allow users of other drivers to specify additional configuration parameters if their list_nodes function allows.