This repository has been archived by the owner on Sep 23, 2020. It is now read-only.
/
ui.py
113 lines (83 loc) · 2.22 KB
/
ui.py
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
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
import inspect
import logging
from pidantic.pidantic_exceptions import PIDanticUsageException
def not_implemented(func):
def call(self, *args,**kwargs):
def raise_error(func):
raise PIDanticUsageException("function %s must be implemented" % (func.func_name))
return raise_error(func)
return call
class PidanticFactory(object):
def __init__(self, **kwvals):
pass
def get_pidantic(self, **kwvals):
pass
def stored_instances(self):
pass
class PIDantic(object):
"""
This is the main interface class. It is implemented by specific lower level drivers (like fork, supervisord and
pyon). I/O operations are blocking and must be implemented in a pyon friendly way (gevents)
"""
def __init__(self, event_callback=None, log=logging, use_channel=False, channel_is_stdio=False):
self._log = log
self._use_channel = use_channel
self._channel_is_stdio = channel_is_stdio
self._event_callback = event_callback
@not_implemented
def get_name(self):
pass
@not_implemented
def start(self):
pass
@not_implemented
def cancel_request(self):
pass
@not_implemented
def poll(self):
pass
@not_implemented
def is_done(self):
pass
@not_implemented
def get_state(self):
pass
@not_implemented
def get_error_message(self):
pass
@not_implemented
def terminate(self):
pass
@not_implemented
def send_stdin(self, data):
pass
@not_implemented
def recv_stdout(self, len=None):
pass
@not_implemented
def recv_stderr(self, len=None):
pass
@not_implemented
def send_channel(self, data):
pass
@not_implemented
def recv_channel(self, len=None):
pass
@not_implemented
def has_read_channel(self):
pass
@not_implemented
def has_write_channel(self):
pass
@not_implemented
def has_stdin(self):
pass
@not_implemented
def has_stdout(self):
pass
@not_implemented
def has_stderr(self):
pass
@not_implemented
def set_state_change_callback(self, cb, user_arg):
pass