summaryrefslogtreecommitdiff
path: root/contrib/python/pypodman
diff options
context:
space:
mode:
authorJhon Honce <jhonce@redhat.com>2018-09-25 10:09:16 -0700
committerJhon Honce <jhonce@redhat.com>2018-10-01 07:24:50 -0700
commit9074565f4e623124f17ce02657e35d658abafae5 (patch)
tree6177fa9a72650f6d5ce4cdc2dca0b86dc17c69cd /contrib/python/pypodman
parentdf978a264d7944351e7cded0a9506cab8a7bb0db (diff)
downloadpodman-9074565f4e623124f17ce02657e35d658abafae5.tar.gz
podman-9074565f4e623124f17ce02657e35d658abafae5.tar.bz2
podman-9074565f4e623124f17ce02657e35d658abafae5.zip
Implement pod varlink bindings
* Update varlink document * Add NoContainersInPod error in go and python * Add support for varlink pod interface * New code passes pylint * Fix bug in test_runner.sh * Update integration tests for race condition on status check * Add missing port config file support Signed-off-by: Jhon Honce <jhonce@redhat.com>
Diffstat (limited to 'contrib/python/pypodman')
-rw-r--r--contrib/python/pypodman/pypodman/lib/podman_parser.py11
1 files changed, 9 insertions, 2 deletions
diff --git a/contrib/python/pypodman/pypodman/lib/podman_parser.py b/contrib/python/pypodman/pypodman/lib/podman_parser.py
index 4150e5d50..a7c869a98 100644
--- a/contrib/python/pypodman/pypodman/lib/podman_parser.py
+++ b/contrib/python/pypodman/pypodman/lib/podman_parser.py
@@ -69,8 +69,8 @@ class PodmanArgumentParser(argparse.ArgumentParser):
self.add_argument(
'--username',
'-l',
- default=getpass.getuser(),
- help='Authenicating user on remote host. (default: %(default)s)')
+ help='Authenicating user on remote host. (default: {})'.format(
+ getpass.getuser()))
self.add_argument(
'--host', help='name of remote host. (default: None)')
self.add_argument(
@@ -175,6 +175,13 @@ class PodmanArgumentParser(argparse.ArgumentParser):
) # yapf:disable
reqattr(
+ 'port',
+ getattr(args, 'port')
+ or os.environ.get('PORT')
+ or config['default'].get('port', None)
+ ) # yapf:disable
+
+ reqattr(
'remote_socket_path',
getattr(args, 'remote_socket_path')
or os.environ.get('REMOTE_SOCKET_PATH')