def setup(self):
        try:
            extension = self._config['extension_url']
            KUBERNETES_API_URL = self._config['kubernetes_api_url'] + extension
            user = self._config['user']
            password = self._config['password']
            verify = self._config['verify']
        except __HOLE__:
            self._log.exception('Configuration file does not contain required fields.')
            raise
        self._log.debug('Connecting to Kubernetes endpoint %s via api_client.' %
                        KUBERNETES_API_URL)
        self.client = requests.get(KUBERNETES_API_URL, auth=HTTPBasicAuth(user, password),
                                   verify=verify, stream=True)
dataset/ETHPy150Open StackStorm/st2contrib/packs/kubernetes/sensors/third_party_resource.py/ThirdPartyResource.setup