blob: c75c3d174e7afe4733bb8244ceaffa493b4053db (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
|
import podman as p
class PodmanRemote(object):
def __init__(self):
self.args = None
self._remote_uri= None
self._local_uri= None
self._identity_file= None
self._client = None
def set_args(self, args, local_uri, remote_uri, identity_file):
self.args = args
self._local_uri = local_uri
self.remote_uri = remote_uri
self._identity_file = identity_file
@property
def remote_uri(self):
return self._remote_uri
@property
def local_uri(self):
return self._local_uri
@property
def client(self):
if self._client is None:
self._client = p.Client(uri=self.local_uri, remote_uri=self.remote_uri, identity_file=self.identity_file)
return self._client
@remote_uri.setter
def remote_uri(self, uri):
self._remote_uri = uri
@local_uri.setter
def local_uri(self, uri):
self._local_uri= uri
@property
def identity_file(self):
return self._identity_file
|