Loading src/device/service/drivers/gnmi_openconfig/GnmiSessionHandler.py +2 −1 Original line number Diff line number Diff line Loading @@ -38,6 +38,7 @@ class GnmiSessionHandler: self._username = settings.get('username') self._password = settings.get('password') self._use_tls = settings.get('use_tls', False) self._encoding = settings.get('encoding') self._channel : Optional[grpc.Channel] = None self._stub : Optional[gNMIStub] = None self._monit_thread = None Loading Loading @@ -90,7 +91,7 @@ class GnmiSessionHandler: get_request = GetRequest() get_request.type = GetRequest.DataType.ALL get_request.encoding = Encoding.JSON_IETF get_request.encoding = get_request.encoding = Encoding.Value(self._encoding) if self._encoding else Encoding.JSON_IETF #get_request.use_models.add() # kept empty: return for all models supported for i,resource_key in enumerate(resource_keys): str_resource_name = 'resource_key[#{:d}]'.format(i) Loading src/device/service/drivers/gnmi_openconfig/tools/Capabilities.py +2 −2 Original line number Diff line number Diff line Loading @@ -44,6 +44,6 @@ def check_capabilities( if len(supported_encodings) == 0: # pylint: disable=broad-exception-raised raise Exception('No supported encodings found') if 'JSON_IETF' not in supported_encodings: if len({'JSON_IETF', 'PROTO'}.intersection(supported_encodings)) == 0: # pylint: disable=broad-exception-raised raise Exception('JSON_IETF encoding not supported') raise Exception('JSON_IETF or PROTO encodings not supported') Loading
src/device/service/drivers/gnmi_openconfig/GnmiSessionHandler.py +2 −1 Original line number Diff line number Diff line Loading @@ -38,6 +38,7 @@ class GnmiSessionHandler: self._username = settings.get('username') self._password = settings.get('password') self._use_tls = settings.get('use_tls', False) self._encoding = settings.get('encoding') self._channel : Optional[grpc.Channel] = None self._stub : Optional[gNMIStub] = None self._monit_thread = None Loading Loading @@ -90,7 +91,7 @@ class GnmiSessionHandler: get_request = GetRequest() get_request.type = GetRequest.DataType.ALL get_request.encoding = Encoding.JSON_IETF get_request.encoding = get_request.encoding = Encoding.Value(self._encoding) if self._encoding else Encoding.JSON_IETF #get_request.use_models.add() # kept empty: return for all models supported for i,resource_key in enumerate(resource_keys): str_resource_name = 'resource_key[#{:d}]'.format(i) Loading
src/device/service/drivers/gnmi_openconfig/tools/Capabilities.py +2 −2 Original line number Diff line number Diff line Loading @@ -44,6 +44,6 @@ def check_capabilities( if len(supported_encodings) == 0: # pylint: disable=broad-exception-raised raise Exception('No supported encodings found') if 'JSON_IETF' not in supported_encodings: if len({'JSON_IETF', 'PROTO'}.intersection(supported_encodings)) == 0: # pylint: disable=broad-exception-raised raise Exception('JSON_IETF encoding not supported') raise Exception('JSON_IETF or PROTO encodings not supported')