gijzelaerr / python-docker-machine Goto Github PK
View Code? Open in Web Editor NEWPython wrapper around docker-machine
License: Other
Python wrapper around docker-machine
License: Other
Hi
Is there any way to add token argument for a driver ?
m.create('test-d', driver='digitalocean', blocking=True)
Traceback (most recent call last):
File "", line 1, in
File "/usr/local/lib/python3.6/site-packages/machine/machine.py", line 104, in create
stdout, stderr, errorcode = self._run_blocking(cmd)
File "/usr/local/lib/python3.6/site-packages/machine/machine.py", line 56, in _run_blocking
raise RuntimeError("cmd returned error %s: %s" % (error_code, stderr.decode('utf-8').strip()))
RuntimeError: cmd returned error 1: Error setting machine configuration from flags provided: digitalocean driver requires the --digitalocean-access-token option
How would one be able to render the output from the docker-machine
commands back to sysout when running the various commands?
I'm writing a CLI that uses your excellent little library, but doing things like creating and provisioning can take a long time without any feedback via your library even though there is some progress when running directly from docker-machine
.
How do you setup path on windows?
eliminating the need for the docker-machine binary.
At the moment we cannot use docker-machine on travis, due to an issue with docker-machine:
Until this is fixed we cannot run the test suite on travis.
create vm,
In current implementation , after popen, we communicate, it will wait internally. there is no point for adding extra wait call.
I think non blocking is not yet implementation
for reference https://docs.python.org/3.4/library/subprocess.html
Popen.communicate(input=None, timeout=None)
Interact with process: Send data to stdin. Read data from stdout and stderr, until end-of-file is reached. Wait for process to terminate. The optional input argument should be data to be sent to the child process, or None, if no data should be sent to the child. The type of input must be bytes or, if universal_newlines was True, a string.
Machine.ls() generate buggy last entry {'Name': u''}
In [18]: machine.Machine().ls()
Out[18]:
[{'Active': '-', 'Name': 'python-docker-machine', .... },
{'Active': '-', 'Name': 'swarm-1', .... },
{'Active': '-', 'Name': 'swarm-2',... },
{'Active': '-', 'Name': 'swarm-3', .... },
{'Name': ''}]
It comes from empty line after stdout.split("\n")
at
python-docker-machine/machine/machine.py
Line 149 in 188e84f
In [15]: '1\n2\n'.split('\n')
Out[15]: ['1', '2', '']
lines split result need to filtered in order to drop last
empty-string-entry
PR will come shortly
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.