1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23 from flumotion.component.plugs import base
24
25
27 """
28 Base class for plugs that are started when the manager is started,
29 and stopped when the manager is shut down. ManagerLifecycle plugs
30 have no special methods; they are expected to do their interesting
31 actions in response to the ManagerPlug start() and stop() methods.
32 """
33
35 """
36 Example implementation of the ManagerLifecyle socket, just prints
37 things on the console. Pretty stupid!
38 """
40 info = vishnu.connectionInfo
41 print ('started manager running on %s:%d (%s)'
42 % (info['host'], info['port'],
43 info['using_ssl'] and 'with ssl' or 'without ssl'))
44
45 - def stop(self, vishnu):
46 info = vishnu.connectionInfo
47 print ('stopped manager running on %s:%d (%s)'
48 % (info['host'], info['port'],
49 info['using_ssl'] and 'with ssl' or 'without ssl'))
50