-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy path__init__.py
More file actions
34 lines (26 loc) · 891 Bytes
/
__init__.py
File metadata and controls
34 lines (26 loc) · 891 Bytes
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
class AbstractSchedulerClient(object):
"""
A generic interface to a scheduler backend.
"""
def __init__(self, target, auth, options):
self.target = target
self.auth = auth
self.options = options
def create(self, name, image, command, **kwargs):
"""Create a new container."""
raise NotImplementedError
def destroy(self, name):
"""Destroy a container."""
raise NotImplementedError
def run(self, name, image, entrypoint, command):
"""Run a one-off command."""
raise NotImplementedError
def start(self, name):
"""Start a container."""
raise NotImplementedError
def state(self, name):
"""Display the given job's running state."""
raise NotImplementedError
def stop(self, name):
"""Stop a container."""
raise NotImplementedError