iotile-ext-cloud 1.1.0 regression
- Dominant language
- Python
- Stars
- 14
- Forks
- 7
- PR merge metrics
- No merged PRs in 30d
Description
The PR change to modify the way we support verifying a cloud connection (https://github.com/iotile/coretools/commit/336a3d7b47049598ecb0deec5f9f4cbe33b7cce0#diff-9fe63ecc7aa07c80890100f03619b599L51) means that we can't verify without setting something in the `iotile cloud` registry:
```
self._conf.get('cloud:verify-server')
```
On the broker, we attempt to validate with a command line argument, since using the `iotile config ...` style is hard to use in that context. Basically, we call:
```
cloud = IOTileCloud(retries=5, timeout=(5, 10), verify=args.skip_verify)
```
It would be nice to still support using `verify` as a direct argument passed to `IOTileCloud` instead of forcing it to go through an `iotile:config` registry value. Something like:
```python
def __init__(self, domain=None, username=None, arg_verify=None, **kwargs):
reg = ComponentRegistry()
self._conf = ConfigManager()
if domain is None:
domain = self._conf.get('cloud:server')
if not self.verify_server:
urllib3.disable_warnings(urllib3.exceptions.InsecureRequestWarning)
_verify = arg_verify if arg_verify is not None else self.verify_server
self.api = Api(domain=domain, verify=_verify, **kwargs)
self._domain = self.api.domain
```
Contributor guide
Assessment
This issue has not been assessed yet.