| Conditions | 2 |
| Total Lines | 11 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 1 | ||
| Bugs | 1 | Features | 0 |
| 1 | import json |
||
| 19 | def __init__(self, config): |
||
| 20 | super(SensuAction, self).__init__(config) |
||
| 21 | self.username = self.config['user'] |
||
| 22 | self.password = self.config['pass'] |
||
| 23 | if self.config['ssl']: |
||
| 24 | protocol = 'https' |
||
| 25 | else: |
||
| 26 | protocol = "http" |
||
| 27 | self.base_url = "%s://%s:%s" % (protocol, self.config['host'], self.config['port']) |
||
| 28 | |||
| 29 | self.api = SensuAPI(url_base=self.base_url, username=self.username, password=self.password) |
||
| 30 |