| Total Complexity | 2 |
| Total Lines | 14 |
| Duplicated Lines | 0 % |
| 1 | import hvac |
||
| 5 | class VaultBaseAction(Action): |
||
| 6 | |||
| 7 | def __init__(self, config): |
||
| 8 | super(VaultBaseAction, self).__init__(config) |
||
| 9 | self.vault = self._get_client() |
||
| 10 | |||
| 11 | def _get_client(self): |
||
| 12 | url = self.config['url'] |
||
| 13 | token = self.config['token'] |
||
| 14 | cert = self.config['cert'] |
||
| 15 | verify = self.config['verify'] |
||
| 16 | |||
| 17 | client = hvac.Client(url=url, token=token, cert=cert, verify=verify) |
||
| 18 | return client |
||
| 19 |