-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdriver.py
More file actions
87 lines (66 loc) · 2.46 KB
/
driver.py
File metadata and controls
87 lines (66 loc) · 2.46 KB
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
class ContainerDriver(object):
'''Base class for container drivers.'''
def create(self, context, container, sandbox_name=None):
"""Create a container."""
raise NotImplementedError()
def delete(self, container, force):
"""Delete a container."""
raise NotImplementedError()
def list(self):
"""List all containers."""
raise NotImplementedError()
def show(self, container):
"""Show the details of a container."""
raise NotImplementedError()
def reboot(self, container):
"""Reboot a container."""
raise NotImplementedError()
def stop(self, container):
"""Stop a container."""
raise NotImplementedError()
def start(self, container):
"""Start a container."""
raise NotImplementedError()
def pause(self, container):
"""Pause a container."""
raise NotImplementedError()
def unpause(self, container):
"""Pause a container."""
raise NotImplementedError()
def show_logs(self, container):
"""Show logs of a container."""
raise NotImplementedError()
def execute(self, container, command):
"""Execute a command in a running container."""
raise NotImplementedError()
def kill(self, container, signal):
"""kill signal to a container."""
raise NotImplementedError()
def create_sandbox(self, context, container, **kwargs):
"""Create a sandbox."""
raise NotImplementedError()
def delete_sandbox(self, context, sandbox_id):
"""Delete a sandbox."""
raise NotImplementedError()
# Note: This is not currently used, but
# may be used later
def stop_sandbox(self, context, sandbox_id):
"""Stop a sandbox."""
raise NotImplementedError()
def get_sandbox_id(self, container):
"""Retrieve sandbox ID."""
raise NotImplementedError()
def set_sandbox_id(self, container, sandbox_id):
"""Set sandbox ID."""
raise NotImplementedError()
def get_sandbox_name(self, container):
"""Retrieve sandbox name."""
raise NotImplementedError()
def get_container_name(self, container):
"""Retrieve sandbox name."""
raise NotImplementedError()
def get_addresses(self, context, container):
"""Retrieve IP addresses of the container."""
def update(self, container):
"""Update a container."""
raise NotImplementedError()