Use multithreading to create machines#166
Open
deepshikhaaa wants to merge 2 commits intogluster:masterfrom
Open
Use multithreading to create machines#166deepshikhaaa wants to merge 2 commits intogluster:masterfrom
deepshikhaaa wants to merge 2 commits intogluster:masterfrom
Conversation
Signed-off-by: Deepshikha Khandelwal <dkhandel@redhat.com>
|
Why implement our own code and not:
Ansible could easily run multiple VMs and not wait for the result, no? (and then you wait for it as an asyc task) |
nigelbabu
reviewed
Sep 7, 2018
| Function to check if there's successful ssh connection can be established | ||
| Function to create a node on cloud | ||
| ''' | ||
| name = 'distributed-testing.'+str(uuid.uuid4()) |
Contributor
There was a problem hiding this comment.
Can you use a hyphen here. This has always annoyed me :)
| if not isinstance(pubkey, str): | ||
| pubkey = str(pubkey) | ||
|
|
||
| step = SSHKeyDeployment(pubkey) |
Contributor
There was a problem hiding this comment.
You may need to have that str/unicode hack in here.
| name = 'distributed-testing.'+str(uuid.uuid4()) | ||
| node = conn.deploy_node( | ||
| name=name, image=image, size=flavor, deploy=step) | ||
| time.sleep(5) |
Contributor
There was a problem hiding this comment.
Do you still need this sleep? I believe a Deployment waits until the node is ready to copy the key over anyway.
Signed-off-by: Deepshikha Khandelwal <dkhandel@redhat.com>
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Signed-off-by: Deepshikha Khandelwal dkhandel@redhat.com