Skip to content
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

Docker-machine addred suport to Vsphere for extra arument #11

Merged
merged 3 commits into from
Jan 25, 2018

Conversation

gjagtap
Copy link
Contributor

@gjagtap gjagtap commented Jan 24, 2018

While Creating Vsphere Vcenter machine , it need extra argument, so added list for xarg.
this list will contain create parameter.

Ganesh Jagtap and others added 2 commits January 12, 2018 14:14
Docker-machine create() added one more list parameter,
it will suport vmwarevsphere create.
@@ -86,7 +86,7 @@ def version(self):
match = self._match(cmd, regexp)
return match.group(1)

def create(self, name, driver='virtualbox', blocking=True):
def create(self, name, driver='virtualbox', blocking=True, xarg=[]):
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yes, you are right. Done the changes as you suggested.

@@ -99,7 +99,10 @@ def create(self, name, driver='virtualbox', blocking=True):
Returns:
int: error code from the run
"""
cmd = ['create', '--driver', driver, name]
cmd = ['create', '--driver', driver]
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This can be written as `cmd = ['create', '--driver', driver] + xarg + [name]

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done the changes as you suggested.

1) Removed Mutable Default Arguments
2) cmd argument list merge modified.
@gijzelaerr
Copy link
Owner

perfect thanks!

@gijzelaerr gijzelaerr merged commit bf3266a into gijzelaerr:master Jan 25, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants