Jhon Honce
5aa36c1861
Clean up pylint warnings and errors for podman
...
* Some of the pedantic errors were not corrected
* Clean up prep for porting to MacOS and PyPi hosting
* Fix broken unittest
Signed-off-by: Jhon Honce <jhonce@redhat.com>
Closes : #1159
Approved by: rhatdan
2018-07-28 11:49:11 +00:00
Jhon Honce
32b690e902
Clean up pylint warnings and errors
...
* Some of the pedantic errors were not corrected
* Clean up prep for porting to MacOS and PyPi hosting
Signed-off-by: Jhon Honce <jhonce@redhat.com>
Closes : #1155
Approved by: baude
2018-07-25 02:50:16 +00:00
Jhon Honce
9a18681ba6
[WIP] Refactor and simplify python builds
...
* pypodman namespaced in site-packages
* version numbers pulled from requirements.txt
* add python-podman spec file to install eggs
Signed-off-by: Jhon Honce <jhonce@redhat.com>
Closes : #1106
Approved by: rhatdan
2018-07-23 18:53:44 +00:00
Jhon Honce
06c546e88d
Downgrade setup.py
...
Signed-off-by: Jhon Honce <jhonce@redhat.com>
Closes : #1095
Approved by: mheon
2018-07-14 03:40:20 +00:00
Jhon Honce
74ccd9ce5f
Update python directories to better support setup.py
...
Signed-off-by: Jhon Honce <jhonce@redhat.com>
2018-07-13 12:50:12 -07:00
Jhon Honce
44b523c946
remote python client for podman
...
* Use podman library for access
* Verbose error checking
* Planned windows and macosx ports
Signed-off-by: Jhon Honce <jhonce@redhat.com>
2018-07-13 11:29:28 -07:00
Jhon Honce
86154b6538
Refactor attach()/start() after podman changes
...
* Update examples
* Update/Clean up unittests
* Add Mixins for container attach()/start()
Signed-off-by: Jhon Honce <jhonce@redhat.com>
Closes : #1080
Approved by: baude
2018-07-12 01:38:30 +00:00
Jhon Honce
ca6ffbccc2
Refactor unittest for change in history API
...
* test_images.TestImages.test_history changed to allow
'<missing>' as legal image ID. Previously all layers
used the image ID. Now layer 0 reports '<missing>'.
Signed-off-by: Jhon Honce <jhonce@redhat.com>
Closes : #1056
Approved by: jwhonce
2018-07-06 21:59:36 +00:00
W. Trevor King
8aed3857d3
contrib/python/test/test_tunnel: Fix -nNT -> -nNTq
...
Catching the tests up with 60427ab3
(add podman remote client,
2018-06-22, #986 ) to avoid non-fatal smoketest failures like [1]:
======================================================================
FAIL: test_tunnel (test.test_tunnel.TestTunnel)
----------------------------------------------------------------------
Traceback (most recent call last):
File "/usr/lib64/python3.6/unittest/mock.py", line 1179, in patched
return func(*args, **keywargs)
File "/go/src/github.com/projectatomic/libpod/contrib/python/test/test_tunnel.py", line 79, in test_tunnel
mock_Popen.assert_called_once_with(cmd, close_fds=True)
File "/usr/lib64/python3.6/unittest/mock.py", line 825, in assert_called_once_with
return self.assert_called_with(*args, **kwargs)
File "/usr/lib64/python3.6/unittest/mock.py", line 814, in assert_called_with
raise AssertionError(_error_message()) from cause
AssertionError: Expected call: Popen(['ssh', '-nNT', '-L', '/tmp/user/socket:/run/podman/socket', '-i', '~/.ssh/id_rsa', 'ssh://user@hostname'], close_fds=True)
Actual call: Popen(['ssh', '-nNTq', '-L', '/tmp/user/socket:/run/podman/socket', '-i', '~/.ssh/id_rsa', 'ssh://user@hostname'], close_fds=True)
[1]: 0d792d5c92
.1.1529764423989739036/output.log
Signed-off-by: W. Trevor King <wking@tremily.us>
Closes : #1035
Approved by: mheon
2018-07-06 16:38:42 +00:00
baude
60427ab3d2
add podman remote client
...
podman client that is capable of:
* images
* ps
* rm
* rmi
this is only a mockup to frame out and prove python library and ssh
tunnelling usage.
Signed-off-by: baude <bbaude@redhat.com>
Closes : #986
Approved by: rhatdan
2018-06-27 04:52:22 +00:00
Jhon Honce
2f0f9944b6
Add unittests and fix bugs
...
* Improved error messages
* Improved checking of user input
Signed-off-by: Jhon Honce <jhonce@redhat.com>
Closes : #978
Approved by: mheon
2018-06-22 17:25:44 +00:00
Jhon Honce
7ea95a6afa
Implement SSH tunnels between client and podman server
...
* client currently forks ssh client pending finding a well
maintained ssh library for python. Including support for
AF_UNIX forwarding.
Signed-off-by: Jhon Honce <jhonce@redhat.com>
2018-06-19 20:08:20 -07:00
Jhon Honce
93c1722caa
Add support for BuildImage
...
Signed-off-by: Jhon Honce <jhonce@redhat.com>
Closes : #908
Approved by: baude
2018-06-05 21:23:54 +00:00
Jhon Honce
4f5e6728b7
Provide examples for python podman API
...
Signed-off-by: Jhon Honce <jhonce@redhat.com>
Closes : #870
Approved by: rhatdan
2018-06-01 21:19:56 +00:00
Jhon Honce
727ecfeadf
Use Version from spec file in setup.py
...
- If envvar PODMAN_VERSION not set use default version of 0.0.0
Signed-off-by: Jhon Honce <jhonce@redhat.com>
Closes : #807
Approved by: rhatdan
2018-06-01 20:18:23 +00:00
Jhon Honce
80baf0d800
Fix lable handling
...
Signed-off-by: Jhon Honce <jhonce@redhat.com>
2018-06-01 10:03:54 -07:00
Jhon Honce
2cb881fa58
Implement container attach
...
Signed-off-by: Jhon Honce <jhonce@redhat.com>
2018-05-31 20:13:35 -07:00
Jhon Honce
0a4ade1c17
Implement python podman create and start
...
- Added alias 'container()' to image model for CreateContainer()
- Fixed return in containers_create.go to wrap error in varlink
exception
- Added a wait time to container.kill(), number of seconds to wait
for the container to change state
- Refactored cached_property() to use system libraries
- Refactored tests to speed up performance
Signed-off-by: Jhon Honce <jhonce@redhat.com>
Closes : #821
Approved by: rhatdan
2018-05-25 09:31:21 +00:00
Jhon Honce
684b544e9c
Spell check strings and comments
...
Signed-off-by: Jhon Honce <jhonce@redhat.com>
Closes : #831
Approved by: rhatdan
2018-05-25 08:45:15 +00:00
Jhon Honce
d252fa710e
Fix test_runner call of podman varlink
...
- Updated some tests due to slippage between tests and code
- Skipped tests will be reinstated in a separate PR
Signed-off-by: Jhon Honce <jhonce@redhat.com>
Closes : #825
Approved by: rhatdan
2018-05-23 19:46:23 +00:00
Jhon Honce
5f0d4b10e9
Add support for Zulu timestamp parsing
...
- Improve error message when podman varlink service is not running
Signed-off-by: Jhon Honce <jhonce@redhat.com>
Closes : #800
Approved by: rhatdan
2018-05-23 17:54:09 +00:00
baude
ae7c45968d
set varlink timeout to 1 seconds
...
Add option to varlink for --timeout. Input for this option is in milliseconds
Signed-off-by: baude <bbaude@redhat.com>
Closes : #814
Approved by: baude
2018-05-22 13:50:10 +00:00
Jhon Honce
4b804e8516
Implement podman.containers.commit()
...
- Add API support
- Update tests
- Make changes from reviews
Signed-off-by: Jhon Honce <jhonce@redhat.com>
Closes : #798
Approved by: mheon
2018-05-18 21:08:21 +00:00
Jhon Honce
2fdd4a1610
Skip tests that are flaking, holding up merge queue
...
Signed-off-by: Jhon Honce <jhonce@redhat.com>
Closes : #783
Approved by: baude
2018-05-16 19:20:24 +00:00
Jhon Honce
1aaf8df5be
Refactor libpod python varlink bindings
...
- More pythonic
- Leverage context managers to help with socket leaks
- Add system unittest's
- Add image unittest's
- Add container unittest's
- Add models for system, containers and images, and their collections
- Add helper functions for datetime parsing/formatting
- GetInfo() implemented
- Add support for setuptools
- Update documentation
- Support for Python 3.4-3.6
Signed-off-by: Jhon Honce <jhonce@redhat.com>
Closes : #748
Approved by: baude
2018-05-16 14:01:10 +00:00