2 from PLC.Method import Method
3 from PLC.Parameter import Parameter, Mixed
4 from PLC.Auth import Auth, BootAuth, SessionAuth
5 from PLC.Nodes import Node, Nodes
6 from PLC.Messages import Message, Messages
8 from PLC.Boot import notify_owners
10 class BootNotifyOwners(Method):
12 Notify the owners of the node, and/or support about an event that
13 happened on the machine.
15 Returns 1 if successful.
21 Mixed(BootAuth(), SessionAuth()),
22 Message.fields['message_id'],
23 Parameter(int, "Notify PIs"),
24 Parameter(int, "Notify technical contacts"),
25 Parameter(int, "Notify support")
28 returns = Parameter(int, '1 if successful')
30 def call(self, auth, message_id, include_pis, include_techs, include_support):
31 assert isinstance(self.caller, Node)
32 notify_owners(self, self.caller, message_id, include_pis, include_techs, include_support)