Open
Description
The PR change to modify the way we support verifying a cloud connection (336a3d7#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:
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
Metadata
Metadata
Assignees
Labels
No labels