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
52 """
53 Base class for plugs that are started when a component is started,
54 and stopped when the component is stopped. ComponentLifecycle plugs
55 have no special methods; they are expected to do their interesting
56 actions in response to the ComponentPlug start() and stop() methods.
57 """
58
60 """
61 Example implementation of the ComponentLifecyle socket, just prints
62 things on the console. Pretty stupid!
63 """
64 - def start(self, component):
65 print 'Component has been started'
66
67 - def stop(self, component):
68 print 'Component is stopping'
69