Total Complexity | 2 |
Total Lines | 12 |
Duplicated Lines | 0 % |
Changes | 0 |
1 | #!/usr/bin/env python |
||
6 | class Icinga2GetStatus(Icinga2Action): |
||
7 | |||
8 | def run(self): |
||
9 | self.set_method('get') |
||
10 | self.set_path('/status') |
||
11 | self.logger.debug('Action Icinga2GetStatus started') |
||
12 | client = self.get_client() |
||
13 | client.make_call() |
||
14 | if self.get_error() == 0: |
||
15 | return self.get_body() |
||
16 | else: |
||
17 | sys.exit(self.get_error()) |
||
18 |