-
Notifications
You must be signed in to change notification settings - Fork 49
Expand file tree
/
Copy pathapcontent.py
More file actions
28 lines (23 loc) · 763 Bytes
/
Copy pathapcontent.py
File metadata and controls
28 lines (23 loc) · 763 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
#!/usr/bin/env python
# -*- coding: utf-8 -*-
from apsection import alarmpi_section
class alarmpi_content(alarmpi_section):
def __init__(self, stype, sconfig, debug, main):
alarmpi_section.__init__(self, stype, sconfig, debug, main)
self.build()
def get(self, netup):
if(self.main['netup']):
if self.standalone() < 2:
return self._get()
else:
return ' ' # standalone > 1 means standalone only
else:
if self.standalone() < 2:
return self._get_offline()
return self._get() # standalone > 1 means standalone only
def _get(self):
return self.content
def _get_offline(self):
return self.content + ' (). '
def build(self):
self.content='Instance of ' + self.stype + ' class.'