diff options
author | baude <bbaude@redhat.com> | 2018-03-26 09:39:14 -0500 |
---|---|---|
committer | Atomic Bot <atomic-devel@projectatomic.io> | 2018-04-23 14:29:45 +0000 |
commit | 8493dba23c73617d9529b7ca13b400d50ac6f455 (patch) | |
tree | c0de0c67334b9fa7166e01cae95dc560c1e2455a /varlink_client.py | |
parent | cf1d884ffa45b342f38a78189bbd86186ce6cbfe (diff) | |
download | podman-8493dba23c73617d9529b7ca13b400d50ac6f455.tar.gz podman-8493dba23c73617d9529b7ca13b400d50ac6f455.tar.bz2 podman-8493dba23c73617d9529b7ca13b400d50ac6f455.zip |
Initial varlink implementation
Signed-off-by: baude <bbaude@redhat.com>
Closes: #627
Approved by: mheon
Diffstat (limited to 'varlink_client.py')
-rw-r--r-- | varlink_client.py | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/varlink_client.py b/varlink_client.py new file mode 100644 index 000000000..7446e3012 --- /dev/null +++ b/varlink_client.py @@ -0,0 +1,9 @@ +from varlink import (Client, VarlinkError) +import json + +address = "unix:/run/podman/io.projectatomic.podman" + +with Client(address=address) as client: + podman = client.open('io.projectatomic.podman') + response = podman.GetVersion() + print(json.dumps(response, indent=4, separators=(',', ': ')))
\ No newline at end of file |