| Conditions | 1 |
| Total Lines | 13 |
| Lines | 0 |
| Ratio | 0 % |
| 1 | from st2actions.runners.pythonrunner import Action |
||
| 11 | def get_connection(self): |
||
| 12 | """ |
||
| 13 | Get a connection to the Kubernetes IO API Service |
||
| 14 | """ |
||
| 15 | user = self.config['user'] |
||
| 16 | password = self.config['password'] |
||
| 17 | base_api = self.config['kubernetes_api_url'] |
||
| 18 | verify = self.config.get('verify', True) |
||
| 19 | |||
| 20 | # TODO : Instantiate API connection and return |
||
| 21 | self.client = requests.get(base_api, auth=HTTPBasicAuth(user, password), |
||
| 22 | verify=verify, stream=True) |
||
| 23 | return self.client |
||
| 24 | |||
| 27 | return self.resultsets.formatter(result) |