move the library to ONF
Change-Id: I383437e2934ce04cc1a7dc332134f7308991776f
diff --git a/grpc_robot/__init__.py b/grpc_robot/__init__.py
new file mode 100644
index 0000000..4ab9009
--- /dev/null
+++ b/grpc_robot/__init__.py
@@ -0,0 +1,18 @@
+# Copyright 2020-present Open Networking Foundation
+# Original copyright 2020-present ADTRAN, Inc.
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+from .dmi_robot import GrpcDmiRobot as Dmi
+from .voltha_robot import GrpcVolthaRobot as Voltha
+from .tools.robot_tools import Collections
+from .tools.dmi_tools import DmiTools
+from .tools.voltha_tools import VolthaTools
diff --git a/grpc_robot/dmi_robot.py b/grpc_robot/dmi_robot.py
new file mode 100644
index 0000000..23950b5
--- /dev/null
+++ b/grpc_robot/dmi_robot.py
@@ -0,0 +1,55 @@
+# Copyright 2020-present Open Networking Foundation
+# Original copyright 2020-present ADTRAN, Inc.
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+import dmi
+
+from robot.api.deco import keyword
+from grpc_robot.grpc_robot import GrpcRobot
+
+
+class GrpcDmiRobot(GrpcRobot):
+ """
+ This library is intended to supported different Protocol Buffer definitions. Precondition is that python files
+ generated from Protocol Buffer files are available in a pip package which must be installed before the library
+ is used.
+
+ | Supported device | Pip package | Pip package version | Library Name |
+ | dmi | device-management-interface | 0.9.1 | grpc_robot.Dmi |
+ | dmi | device-management-interface | 0.9.2 | grpc_robot.Dmi |
+ | dmi | device-management-interface | 0.9.3 | grpc_robot.Dmi |
+ | dmi | device-management-interface | 0.9.4 | grpc_robot.Dmi |
+ | dmi | device-management-interface | 0.9.5 | grpc_robot.Dmi |
+ | dmi | device-management-interface | 0.9.6 | grpc_robot.Dmi |
+ | dmi | device-management-interface | 0.9.8 | grpc_robot.Dmi |
+ | dmi | device-management-interface | 0.9.9 | grpc_robot.Dmi |
+ | dmi | device-management-interface | 0.10.1 | grpc_robot.Dmi |
+ | dmi | device-management-interface | 0.10.2 | grpc_robot.Dmi |
+ | dmi | device-management-interface | 0.12.0 | grpc_robot.Dmi |
+ | dmi | device-management-interface | 1.0.0 | grpc_robot.Dmi |
+ """
+
+ device = 'dmi'
+ package_name = 'device-management-interface'
+ installed_package = dmi
+
+ def __init__(self, **kwargs):
+ super().__init__(**kwargs)
+
+ @keyword
+ def dmi_version_get(self):
+ """
+ Retrieve the version of the currently used python module _device-management-interface_.
+
+ *Return*: version string consisting of three dot-separated numbers (x.y.z)
+ """
+ return self.pb_version
diff --git a/grpc_robot/grpc_robot.py b/grpc_robot/grpc_robot.py
new file mode 100644
index 0000000..2de6192
--- /dev/null
+++ b/grpc_robot/grpc_robot.py
@@ -0,0 +1,349 @@
+# Copyright 2020-present Open Networking Foundation
+# Original copyright 2020-present ADTRAN, Inc.
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+import os
+import grpc
+import json
+import getpass
+import inspect
+import logging
+import logging.config
+import tempfile
+import textwrap
+import importlib
+import pkg_resources
+
+from .tools.protop import ProtoBufParser
+from distutils.version import StrictVersion
+from robot.api.deco import keyword
+from robot.libraries.BuiltIn import BuiltIn, RobotNotRunningError
+
+
+def _package_version_get(package_name, source=None):
+ """
+ Returns the installed version number for the given pip package with name _package_name_.
+ """
+
+ if source:
+ head, tail = os.path.split(os.path.dirname(os.path.abspath(source)))
+
+ while tail:
+ try:
+ with open(os.path.join(head, 'VERSION')) as version_file:
+ return version_file.read().strip()
+ except Exception:
+ head, tail = os.path.split(head)
+
+ try:
+ return pkg_resources.get_distribution(package_name).version
+ except pkg_resources.DistributionNotFound:
+ raise NameError("Package '%s' is not installed!" % package_name)
+
+
+class GrpcRobot(object):
+
+ device = None
+ package_name = ''
+ installed_package = None
+
+ try:
+ ROBOT_LIBRARY_VERSION = _package_version_get('grpc_robot')
+ except NameError:
+ ROBOT_LIBRARY_VERSION = 'unknown'
+
+ ROBOT_LIBRARY_SCOPE = 'TEST_SUITE'
+ global_init = 0
+ global_timeout = 120
+ min_robot_version = 30202
+
+ connection_type = 'grpc'
+
+ def __init__(self, **kwargs):
+ super().__init__()
+
+ self._host = None
+ self._port = None
+
+ self.grpc_channel = None
+ self.timeout = 30
+ self.protobuf = None
+
+ self.keywords = {}
+
+ self.enable_logging()
+ self.logger = logging.getLogger('grpc')
+
+ self.pb_version = self.get_installed_version() or self.get_latest_pb_version()
+ self.load_services(self.pb_version)
+
+ @staticmethod
+ def enable_logging():
+
+ try:
+ log_dir = BuiltIn().replace_variables('${OUTPUT_DIR}')
+ except RobotNotRunningError:
+ log_dir = tempfile.gettempdir()
+
+ try:
+ logfile_name = os.path.join(log_dir, 'grpc_robot_%s.log' % getpass.getuser())
+ except KeyError:
+ logfile_name = os.path.join(log_dir, 'grpc_robot.log')
+
+ logging.config.dictConfig({
+ 'version': 1,
+ 'disable_existing_loggers': False,
+
+ 'formatters': {
+ 'standard': {
+ 'format': '%(asctime)s %(name)s [%(levelname)s] : %(message)s'
+ },
+ },
+ 'handlers': {
+ 'file': {
+ 'level': 'DEBUG',
+ 'class': 'logging.FileHandler',
+ 'mode': 'a',
+ 'filename': logfile_name,
+ 'formatter': 'standard'
+ },
+ },
+ 'loggers': {
+ 'grpc': {
+ 'handlers': ['file'],
+ 'level': 'DEBUG',
+ 'propagate': True
+ },
+ }
+ })
+
+ @staticmethod
+ def get_modules(*modules):
+ module_list = []
+ for module in modules:
+ for name, obj in inspect.getmembers(module, predicate=lambda o: inspect.isclass(o)):
+ module_list.append(obj)
+
+ return module_list
+
+ @staticmethod
+ def get_keywords_from_modules(*modules):
+ keywords = {}
+
+ for module in modules:
+ for name, obj in inspect.getmembers(module):
+ if hasattr(obj, 'robot_name'):
+ keywords[name] = module
+
+ return keywords
+
+ def get_installed_version(self):
+ dists = [str(d).split() for d in pkg_resources.working_set if str(d).split()[0] == self.package_name]
+
+ try:
+ pb_version = dists[0][-1]
+ self.logger.info('installed package %s==%s' % (self.package_name, pb_version))
+ except IndexError:
+ self.logger.error('package for %s not installed' % self.package_name)
+ return None
+
+ if pb_version not in self.get_supported_versions():
+ self.logger.warning('installed package %s==%s not supported by library, using version %s' % (
+ self.package_name, pb_version, self.get_latest_pb_version()))
+ pb_version = None
+
+ return pb_version
+
+ def get_supported_versions(self):
+
+ path = os.path.join(os.path.dirname(os.path.abspath(__file__)), 'services', self.device)
+
+ return sorted([
+ (name.split(self.device + '_')[1]).replace('_', '.')
+ for name in os.listdir(path)
+ if os.path.isdir(os.path.join(path, name)) and name.startswith(self.device)
+ ], key=StrictVersion)
+
+ def get_latest_pb_version(self):
+ return self.get_supported_versions()[-1]
+
+ def load_services(self, pb_version):
+ pb_version = pb_version.replace('.', '_')
+ path = os.path.join(os.path.dirname(os.path.abspath(__file__)), 'services', self.device, '%s_%s' % (self.device, pb_version))
+
+ modules = importlib.import_module('grpc_robot.services.%s.%s_%s' % (self.device, self.device, pb_version))
+
+ module_list = self.get_modules(modules)
+
+ self.keywords = self.get_keywords_from_modules(*module_list)
+
+ try:
+ self.protobuf = json.loads(open(os.path.join(path, '%s.json' % self.device)).read())
+ self.logger.debug('loaded services from %s' % os.path.join(path, '%s.json' % self.device))
+ except FileNotFoundError:
+ pip_dir = os.path.join(os.path.dirname(self.installed_package.__file__), 'protos')
+ self.protobuf = ProtoBufParser(self.device, self.pb_version, pip_dir).parse_files()
+
+ @keyword
+ def get_keyword_names(self):
+ """
+ Returns the list of keyword names
+ """
+ return sorted(list(self.keywords.keys()) + [name for name in dir(self) if hasattr(getattr(self, name), 'robot_name')])
+
+ def run_keyword(self, keyword_name, args, kwargs):
+ """
+ http://robotframework.org/robotframework/latest/RobotFrameworkUserGuide.html#running-keywords
+
+ :param keyword_name: name of method to run
+ :param args: arguments to this method
+ :param kwargs: kwargs
+ :return: whatever the method returns
+ """
+ if keyword_name in self.keywords:
+ c = self.keywords[keyword_name](self)
+ else:
+ c = self
+
+ return getattr(c, keyword_name)(*args, **kwargs)
+
+ def get_keyword_arguments(self, keyword_name):
+ """
+ http://robotframework.org/robotframework/latest/RobotFrameworkUserGuide.html#getting-keyword-arguments
+
+ :param keyword_name: name of method
+ :return: list of method arguments like in urls above
+ """
+
+ if keyword_name in self.keywords:
+ a = inspect.getargspec(getattr(self.keywords[keyword_name], keyword_name))
+ else:
+ a = inspect.getargspec(getattr(self, keyword_name))
+
+ # skip "self" as first parameter -> [1:]
+ args_without_defaults = a.args[1:-len(a.defaults)] if a.defaults is not None else a.args[1:]
+
+ args_with_defaults = []
+ if a.defaults is not None:
+ args_with_defaults = zip(a.args[-len(a.defaults):], a.defaults)
+ args_with_defaults = ['%s=%s' % (x, y) for x, y in args_with_defaults]
+
+ args = args_without_defaults + args_with_defaults
+
+ if a.varargs is not None:
+ args.append('*%s' % a.varargs)
+
+ if a.keywords is not None:
+ args.append('**%s' % a.keywords)
+
+ return args
+
+ def get_keyword_documentation(self, keyword_name):
+ """
+ http://robotframework.org/robotframework/latest/RobotFrameworkUserGuide.html#getting-keyword-documentation
+ http://robotframework.org/robotframework/latest/RobotFrameworkUserGuide.html#documentation-formatting
+
+ :param keyword_name: name of method to get documentation for
+ :return: string formatted according documentation
+ """
+
+ if keyword_name == '__intro__':
+ return self.__doc__
+
+ doc_string = ''
+
+ if keyword_name in self.keywords:
+ c = self.keywords[keyword_name]
+ doc_string += textwrap.dedent(getattr(c, keyword_name).__doc__ or '') + '\n'
+ doc_string += c(self).get_documentation(keyword_name) # instanciate class and call "get_documentation"
+ return doc_string
+
+ return textwrap.dedent(getattr(self, keyword_name).__doc__ or '')
+
+ @keyword
+ def connection_open(self, host, port, **kwargs):
+ """
+ Opens a connection to the gRPC host.
+
+ *Parameters*:
+ - host: <string>|<IP address>; Name or IP address of the gRPC host.
+ - port: <number>; TCP port of the gRPC host.
+
+ *Named Parameters*:
+ - timeout: <number>; Timeout in seconds for a gRPC response. Default: 30 s
+ """
+ self._host = host
+ self._port = port
+ self.timeout = int(kwargs.get('timeout', self.timeout))
+
+ channel_options = [
+ ('grpc.keepalive_time_ms', 10000),
+ ('grpc.keepalive_timeout_ms', 5000)
+ ]
+
+ if kwargs.get('insecure', True):
+ self.grpc_channel = grpc.insecure_channel('%s:%s' % (self._host, self._port), options=channel_options)
+ else:
+ raise NotImplementedError('other than "insecure channel" not implemented')
+
+ user_pb_version = kwargs.get('pb_version') or self.pb_version
+ pb_version = user_pb_version # ToDo: or device_pb_version # get the pb version from device when available
+
+ self.load_services(pb_version)
+
+ @keyword
+ def connection_close(self):
+ """
+ Closes the connection to the gRPC host.
+ """
+ del self.grpc_channel
+ self.grpc_channel = None
+
+ def _connection_parameters_get(self):
+ return {
+ 'timeout': self.timeout
+ }
+
+ @keyword
+ def connection_parameters_set(self, **kwargs):
+ """
+ Sets the gRPC channel connection parameters.
+
+ *Named Parameters*:
+ - timeout: <number>; Timeout in seconds for a gRPC response.
+
+ *Return*: Same dictionary as the keyword _Connection Parameter Get_ with the values before they got changed.
+ """
+ connection_parameters = self._connection_parameters_get()
+
+ self.timeout = int(kwargs.get('timeout', self.timeout))
+
+ return connection_parameters
+
+ @keyword
+ def connection_parameters_get(self):
+ """
+ Retrieves the connection parameters for the gRPC channel.
+
+ *Return*: A dictionary with the keys:
+ - timeout
+ """
+ return self._connection_parameters_get()
+
+ @keyword
+ def library_version_get(self):
+ """
+ Retrieve the version of the currently running library instance.
+
+ *Return*: version string consisting of three dot-separated numbers (x.y.z)
+ """
+ return self.ROBOT_LIBRARY_VERSION
diff --git a/grpc_robot/services/__init__.py b/grpc_robot/services/__init__.py
new file mode 100644
index 0000000..b1ed822
--- /dev/null
+++ b/grpc_robot/services/__init__.py
@@ -0,0 +1,13 @@
+# Copyright 2020-present Open Networking Foundation
+# Original copyright 2020-present ADTRAN, Inc.
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
diff --git a/grpc_robot/services/dmi/__init__.py b/grpc_robot/services/dmi/__init__.py
new file mode 100644
index 0000000..b1ed822
--- /dev/null
+++ b/grpc_robot/services/dmi/__init__.py
@@ -0,0 +1,13 @@
+# Copyright 2020-present Open Networking Foundation
+# Original copyright 2020-present ADTRAN, Inc.
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
diff --git a/grpc_robot/services/dmi/dmi_0_10_1/__init__.py b/grpc_robot/services/dmi/dmi_0_10_1/__init__.py
new file mode 100644
index 0000000..a96b5a5
--- /dev/null
+++ b/grpc_robot/services/dmi/dmi_0_10_1/__init__.py
@@ -0,0 +1,14 @@
+# Copyright 2020-present Open Networking Foundation
+# Original copyright 2020-present ADTRAN, Inc.
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+from ..dmi_0_9_9 import *
diff --git a/grpc_robot/services/dmi/dmi_0_10_1/dmi.json b/grpc_robot/services/dmi/dmi_0_10_1/dmi.json
new file mode 100644
index 0000000..98802e6
--- /dev/null
+++ b/grpc_robot/services/dmi/dmi_0_10_1/dmi.json
@@ -0,0 +1 @@
+{"modules": [{"name": "commons", "imports": []}, {"name": "hw", "imports": ["timestamp"]}, {"name": "hw_metrics_mgmt_service", "imports": ["commons", "hw"]}, {"name": "hw_events_mgmt_service", "imports": ["commons", "hw", "timestamp"]}, {"name": "sw_image", "imports": ["commons"]}, {"name": "hw_management_service", "imports": ["commons", "hw", "empty"]}, {"name": "sw_management_service", "imports": ["commons", "hw", "sw_image"]}], "data_types": [{"name": "Status", "type": "enum", "module": "commons", "values": {"0": "UNDEFINED_STATUS", "1": "OK_STATUS", "2": "ERROR_STATUS"}}, {"name": "LogLevel", "type": "enum", "module": "commons", "values": {"0": "TRACE", "1": "DEBUG", "2": "INFO", "3": "WARN", "4": "ERROR"}}, {"name": "Uuid", "type": "message", "module": "hw", "fields": [{"name": "uuid", "is_choice": false, "repeated": false, "type": "string", "lookup": false}]}, {"name": "HardwareID", "type": "message", "module": "hw", "fields": [{"name": "uuid", "is_choice": false, "repeated": false, "type": "Uuid", "lookup": true}]}, {"name": "Uri", "type": "message", "module": "hw", "fields": [{"name": "uri", "is_choice": false, "repeated": false, "type": "string", "lookup": false}]}, {"name": "ComponentType", "type": "enum", "module": "hw", "values": {"0": "COMPONENT_TYPE_UNDEFINED", "1": "COMPONENT_TYPE_UNKNOWN", "2": "COMPONENT_TYPE_CHASSIS", "3": "COMPONENT_TYPE_BACKPLANE", "4": "COMPONENT_TYPE_CONTAINER", "5": "COMPONENT_TYPE_POWER_SUPPLY", "6": "COMPONENT_TYPE_FAN", "7": "COMPONENT_TYPE_SENSOR", "8": "COMPONENT_TYPE_MODULE", "9": "COMPONENT_TYPE_PORT", "10": "COMPONENT_TYPE_CPU", "11": "COMPONENT_TYPE_BATTERY", "12": "COMPONENT_TYPE_STORAGE", "13": "COMPONENT_TYPE_MEMORY", "14": "COMPONENT_TYPE_TRANSCEIVER"}}, {"name": "ComponentAdminState", "type": "enum", "module": "hw", "values": {"0": "COMP_ADMIN_STATE_UNDEFINED", "1": "COMP_ADMIN_STATE_UNKNOWN", "2": "COMP_ADMIN_STATE_LOCKED", "3": "COMP_ADMIN_STATE_SHUTTING_DOWN", "4": "COMP_ADMIN_STATE_UNLOCKED"}}, {"name": "ComponentOperState", "type": "enum", "module": "hw", "values": {"0": "COMP_OPER_STATE_UNDEFINED", "1": "COMP_OPER_STATE_UNKNOWN", "2": "COMP_OPER_STATE_DISABLED", "3": "COMP_OPER_STATE_ENABLED", "4": "COMP_OPER_STATE_TESTING"}}, {"name": "ComponentUsageState", "type": "enum", "module": "hw", "values": {"0": "COMP_USAGE_STATE_UNDEFINED", "1": "COMP_USAGE_STATE_UNKNOWN", "2": "COMP_USAGE_STATE_IDLE", "3": "COMP_USAGE_STATE_ACTIVE", "4": "COMP_USAGE_STATE_BUSY"}}, {"name": "ComponentAlarmState", "type": "enum", "module": "hw", "values": {"0": "COMP_ALARM_STATE_UNDEFINED", "1": "COMP_ALARM_STATE_UNKNOWN", "2": "COMP_ALARM_STATE_UNDER_REPAIR", "3": "COMP_ALARM_STATE_CRITICAL", "4": "COMP_ALARM_STATE_MAJOR", "5": "COMP_ALARM_STATE_MINOR", "6": "COMP_ALARM_STATE_WARNING", "7": "COMP_ALARM_STATE_INDETERMINATE"}}, {"name": "ComponentStandbyState", "type": "enum", "module": "hw", "values": {"0": "COMP_STANDBY_STATE_UNDEFINED", "1": "COMP_STANDBY_STATE_UNKNOWN", "2": "COMP_STANDBY_STATE_HOT", "3": "COMP_STANDBY_STATE_COLD", "4": "COMP_STANDBY_STATE_PROVIDING_SERVICE"}}, {"name": "ComponentState", "type": "message", "module": "hw", "fields": [{"name": "state_last_changed", "is_choice": false, "repeated": false, "type": "google.protobuf.Timestamp", "lookup": true}, {"name": "admin_state", "is_choice": false, "repeated": false, "type": "ComponentAdminState", "lookup": true}, {"name": "oper_state", "is_choice": false, "repeated": false, "type": "ComponentOperState", "lookup": true}, {"name": "usage_state", "is_choice": false, "repeated": false, "type": "ComponentUsageState", "lookup": true}, {"name": "alarm_state", "is_choice": false, "repeated": false, "type": "ComponentAlarmState", "lookup": true}, {"name": "standby_state", "is_choice": false, "repeated": false, "type": "ComponentStandbyState", "lookup": true}]}, {"name": "DataValueType", "type": "enum", "module": "hw", "values": {"0": "VALUE_TYPE_UNDEFINED", "1": "VALUE_TYPE_OTHER", "2": "VALUE_TYPE_UNKNOWN", "3": "VALUE_TYPE_VOLTS_AC", "4": "VALUE_TYPE_VOLTS_DC", "5": "VALUE_TYPE_AMPERES", "6": "VALUE_TYPE_WATTS", "7": "VALUE_TYPE_HERTZ", "8": "VALUE_TYPE_CELSIUS", "9": "VALUE_TYPE_PERCENT_RH", "10": "VALUE_TYPE_RPM", "11": "VALUE_TYPE_CMM", "12": "VALUE_TYPE_TRUTH_VALUE"}}, {"name": "ValueScale", "type": "enum", "module": "hw", "values": {"0": "VALUE_SCALE_UNDEFINED", "1": "VALUE_SCALE_YOCTO", "2": "VALUE_SCALE_ZEPTO", "3": "VALUE_SCALE_ATTO", "4": "VALUE_SCALE_FEMTO", "5": "VALUE_SCALE_PICO", "6": "VALUE_SCALE_NANO", "7": "VALUE_SCALE_MICRO", "8": "VALUE_SCALE_MILLI", "9": "VALUE_SCALE_UNITS", "10": "VALUE_SCALE_KILO", "11": "VALUE_SCALE_MEGA", "12": "VALUE_SCALE_GIGA", "13": "VALUE_SCALE_TERA", "14": "VALUE_SCALE_PETA", "15": "VALUE_SCALE_EXA", "16": "VALUE_SCALE_ZETTA", "17": "VALUE_SCALE_YOTTA"}}, {"name": "SensorStatus", "type": "enum", "module": "hw", "values": {"0": "SENSOR_STATUS_UNDEFINED", "1": "SENSOR_STATUS_OK", "2": "SENSOR_STATUS_UNAVAILABLE", "3": "SENSOR_STATUS_NONOPERATIONAL"}}, {"name": "ComponentSensorData", "type": "message", "module": "hw", "fields": [{"name": "value", "is_choice": false, "repeated": false, "type": "int32", "lookup": false}, {"name": "type", "is_choice": false, "repeated": false, "type": "DataValueType", "lookup": true}, {"name": "scale", "is_choice": false, "repeated": false, "type": "ValueScale", "lookup": true}, {"name": "precision", "is_choice": false, "repeated": false, "type": "int32", "lookup": false}, {"name": "status", "is_choice": false, "repeated": false, "type": "SensorStatus", "lookup": true}, {"name": "units_display", "is_choice": false, "repeated": false, "type": "string", "lookup": false}, {"name": "timestamp", "is_choice": false, "repeated": false, "type": "google.protobuf.Timestamp", "lookup": true}, {"name": "value_update_rate", "is_choice": false, "repeated": false, "type": "uint32", "lookup": false}, {"name": "data_type", "is_choice": false, "repeated": false, "type": "string", "lookup": false}]}, {"name": "ConnectorType", "type": "enum", "module": "hw", "values": {"0": "CONNECTOR_TYPE_UNDEFINED", "1": "RJ45", "2": "FIBER_LC", "3": "FIBER_SC_PC", "4": "FIBER_MPO"}}, {"name": "Speed", "type": "enum", "module": "hw", "values": {"0": "SPEED_UNDEFINED", "1": "DYNAMIC", "2": "GIGABIT_1", "3": "GIGABIT_10", "4": "GIGABIT_25", "5": "GIGABIT_40", "6": "GIGABIT_100", "7": "GIGABIT_400", "8": "MEGABIT_2500", "9": "MEGABIT_1250"}}, {"name": "Protocol", "type": "enum", "module": "hw", "values": {"0": "PROTOCOL_UNDEFINED", "1": "ETHERNET", "2": "GPON", "3": "XGPON", "4": "XGSPON", "5": "GFAST", "6": "SERIAL", "7": "EPON"}}, {"name": "PortComponentAttributes", "type": "message", "module": "hw", "fields": [{"name": "connector_type", "is_choice": false, "repeated": false, "type": "ConnectorType", "lookup": true}, {"name": "speed", "is_choice": false, "repeated": false, "type": "Speed", "lookup": true}, {"name": "protocol", "is_choice": false, "repeated": false, "type": "Protocol", "lookup": true}, {"name": "physical_label", "is_choice": false, "repeated": false, "type": "string", "lookup": false}]}, {"name": "ContainerComponentAttributes", "type": "message", "module": "hw", "fields": [{"name": "physical_label", "is_choice": false, "repeated": false, "type": "string", "lookup": false}]}, {"name": "SupportedVoltage", "type": "enum", "module": "hw", "values": {"0": "SUPPORTED_VOLTAGE_UNDEFINED", "1": "V48", "2": "V230", "3": "V115"}}, {"name": "PsuComponentAttributes", "type": "message", "module": "hw", "fields": [{"name": "supported_voltage", "is_choice": false, "repeated": false, "type": "SupportedVoltage", "lookup": true}]}, {"name": "FormFactor", "type": "enum", "module": "hw", "values": {"0": "FORM_FACTOR_UNKNOWN", "1": "QSFP", "2": "QSFP_PLUS", "3": "QSFP28", "4": "SFP", "5": "SFP_PLUS", "6": "XFP", "7": "CFP4", "8": "CFP2", "9": "CPAK", "10": "X2", "11": "OTHER", "12": "CFP", "13": "CFP2_ACO", "14": "CFP2_DCO"}}, {"name": "Type", "type": "enum", "module": "hw", "values": {"0": "TYPE_UNKNOWN", "1": "ETHERNET", "2": "GPON", "3": "XGPON", "4": "XGSPON", "5": "CPON", "6": "NG_PON2", "7": "EPON"}}, {"name": "TransceiverComponentsAttributes", "type": "message", "module": "hw", "fields": [{"name": "form_factor", "is_choice": false, "repeated": false, "type": "FormFactor", "lookup": true}, {"name": "trans_type", "is_choice": false, "repeated": false, "type": "Type", "lookup": true}, {"name": "max_distance", "is_choice": false, "repeated": false, "type": "uint32", "lookup": false}, {"name": "max_distance_scale", "is_choice": false, "repeated": false, "type": "ValueScale", "lookup": true}, {"name": "rx_wavelength", "is_choice": false, "repeated": true, "type": "uint32", "lookup": false}, {"name": "tx_wavelength", "is_choice": false, "repeated": true, "type": "uint32", "lookup": false}, {"name": "wavelength_scale", "is_choice": false, "repeated": false, "type": "ValueScale", "lookup": true}]}, {"name": "Component", "type": "message", "module": "hw", "fields": [{"name": "name", "is_choice": false, "repeated": false, "type": "string", "lookup": false}, {"name": "class", "is_choice": false, "repeated": false, "type": "ComponentType", "lookup": true}, {"name": "description", "is_choice": false, "repeated": false, "type": "string", "lookup": false}, {"name": "parent", "is_choice": false, "repeated": false, "type": "string", "lookup": false}, {"name": "parent_rel_pos", "is_choice": false, "repeated": false, "type": "int32", "lookup": false}, {"name": "children", "is_choice": false, "repeated": true, "type": "Component", "lookup": true}, {"name": "hardware_rev", "is_choice": false, "repeated": false, "type": "string", "lookup": false}, {"name": "firmware_rev", "is_choice": false, "repeated": false, "type": "string", "lookup": false}, {"name": "software_rev", "is_choice": false, "repeated": false, "type": "string", "lookup": false}, {"name": "serial_num", "is_choice": false, "repeated": false, "type": "string", "lookup": false}, {"name": "mfg_name", "is_choice": false, "repeated": false, "type": "string", "lookup": false}, {"name": "model_name", "is_choice": false, "repeated": false, "type": "string", "lookup": false}, {"name": "alias", "is_choice": false, "repeated": false, "type": "string", "lookup": false}, {"name": "asset_id", "is_choice": false, "repeated": false, "type": "string", "lookup": false}, {"name": "is_fru", "is_choice": false, "repeated": false, "type": "bool", "lookup": false}, {"name": "mfg_date", "is_choice": false, "repeated": false, "type": "google.protobuf.Timestamp", "lookup": true}, {"name": "uri", "is_choice": false, "repeated": false, "type": "Uri", "lookup": true}, {"name": "uuid", "is_choice": false, "repeated": false, "type": "Uuid", "lookup": true}, {"name": "state", "is_choice": false, "repeated": false, "type": "ComponentState", "lookup": true}, {"name": "sensor_data", "is_choice": false, "repeated": true, "type": "ComponentSensorData", "lookup": true}, {"name": "specific", "is_choice": true, "cases": [{"name": "port_attr", "type": "PortComponentAttributes", "lookup": true}, {"name": "container_attr", "type": "ContainerComponentAttributes", "lookup": true}, {"name": "psu_attr", "type": "PsuComponentAttributes", "lookup": true}, {"name": "transceiver_attr", "type": "TransceiverComponentsAttributes", "lookup": true}]}]}, {"name": "Hardware", "type": "message", "module": "hw", "fields": [{"name": "last_change", "is_choice": false, "repeated": false, "type": "google.protobuf.Timestamp", "lookup": true}, {"name": "root", "is_choice": false, "repeated": false, "type": "Component", "lookup": true}, {"name": "last_booted", "is_choice": false, "repeated": false, "type": "google.protobuf.Timestamp", "lookup": true}]}, {"name": "ModifiableComponent", "type": "message", "module": "hw", "fields": [{"name": "name", "is_choice": false, "repeated": false, "type": "string", "lookup": false}, {"name": "class", "is_choice": false, "repeated": false, "type": "ComponentType", "lookup": true}, {"name": "parent", "is_choice": false, "repeated": false, "type": "Component", "lookup": true}, {"name": "parent_rel_pos", "is_choice": false, "repeated": false, "type": "int32", "lookup": false}, {"name": "alias", "is_choice": false, "repeated": false, "type": "string", "lookup": false}, {"name": "asset_id", "is_choice": false, "repeated": false, "type": "string", "lookup": false}, {"name": "uri", "is_choice": false, "repeated": false, "type": "Uri", "lookup": true}, {"name": "admin_state", "is_choice": false, "repeated": false, "type": "ComponentAdminState", "lookup": true}]}, {"name": "MetricNames", "type": "enum", "module": "hw_metrics_mgmt_service", "values": {"0": "METRIC_NAME_UNDEFINED", "1": "METRIC_FAN_SPEED", "100": "METRIC_CPU_TEMP", "101": "METRIC_CPU_USAGE_PERCENTAGE", "200": "METRIC_TRANSCEIVER_TEMP", "201": "METRIC_TRANSCEIVER_VOLTAGE", "202": "METRIC_TRANSCEIVER_BIAS", "203": "METRIC_TRANSCEIVER_RX_POWER", "204": "METRIC_TRANSCEIVER_TX_POWER", "205": "METRIC_TRANSCEIVER_WAVELENGTH", "300": "METRIC_DISK_TEMP", "301": "METRIC_DISK_CAPACITY", "302": "METRIC_DISK_USAGE", "303": "METRIC_DISK_USAGE_PERCENTAGE", "304": "METRIC_DISK_READ_WRITE_PERCENTAGE", "305": "METRIC_DISK_FAULTY_CELLS_PERCENTAGE", "400": "METRIC_RAM_TEMP", "401": "METRIC_RAM_CAPACITY", "402": "METRIC_RAM_USAGE", "403": "METRIC_RAM_USAGE_PERCENTAGE", "500": "METRIC_POWER_MAX", "501": "METRIC_POWER_USAGE", "502": "METRIC_POWER_USAGE_PERCENTAGE", "600": "METRIC_INNER_SURROUNDING_TEMP"}}, {"name": "MetricConfig", "type": "message", "module": "hw_metrics_mgmt_service", "fields": [{"name": "metric_id", "is_choice": false, "repeated": false, "type": "MetricNames", "lookup": true}, {"name": "is_configured", "is_choice": false, "repeated": false, "type": "bool", "lookup": false}, {"name": "poll_interval", "is_choice": false, "repeated": false, "type": "uint32", "lookup": false}]}, {"name": "MetricsConfig", "type": "message", "module": "hw_metrics_mgmt_service", "fields": [{"name": "metrics", "is_choice": false, "repeated": true, "type": "MetricConfig", "lookup": true}]}, {"name": "Reason", "type": "enum", "module": "hw_metrics_mgmt_service", "values": {"0": "UNDEFINED_REASON", "1": "UNKNOWN_DEVICE", "2": "INTERNAL_ERROR", "3": "DEVICE_UNREACHABLE"}}, {"name": "ListMetricsResponse", "type": "message", "module": "hw_metrics_mgmt_service", "fields": [{"name": "status", "is_choice": false, "repeated": false, "type": "Status", "lookup": true}, {"name": "reason", "is_choice": false, "repeated": false, "type": "Reason", "lookup": true}, {"name": "metrics", "is_choice": false, "repeated": false, "type": "MetricsConfig", "lookup": true}, {"name": "reason_detail", "is_choice": false, "repeated": false, "type": "string", "lookup": false}]}, {"name": "MetricsConfigurationRequest", "type": "message", "module": "hw_metrics_mgmt_service", "fields": [{"name": "device_uuid", "is_choice": false, "repeated": false, "type": "Uuid", "lookup": true}, {"name": "operation", "is_choice": true, "cases": [{"name": "changes", "type": "MetricsConfig", "lookup": true}, {"name": "reset_to_default", "type": "bool", "lookup": false}]}]}, {"name": "Reason", "type": "enum", "module": "hw_metrics_mgmt_service", "values": {"0": "UNDEFINED_REASON", "1": "UNKNOWN_DEVICE", "2": "INTERNAL_ERROR", "3": "POLL_INTERVAL_UNSUPPORTED", "4": "INVALID_METRIC", "5": "DEVICE_UNREACHABLE"}}, {"name": "MetricsConfigurationResponse", "type": "message", "module": "hw_metrics_mgmt_service", "fields": [{"name": "status", "is_choice": false, "repeated": false, "type": "Status", "lookup": true}, {"name": "reason", "is_choice": false, "repeated": false, "type": "Reason", "lookup": true}, {"name": "reason_detail", "is_choice": false, "repeated": false, "type": "string", "lookup": false}]}, {"name": "MetricMetaData", "type": "message", "module": "hw_metrics_mgmt_service", "fields": [{"name": "device_uuid", "is_choice": false, "repeated": false, "type": "Uuid", "lookup": true}, {"name": "component_uuid", "is_choice": false, "repeated": false, "type": "Uuid", "lookup": true}, {"name": "component_name", "is_choice": false, "repeated": false, "type": "string", "lookup": false}]}, {"name": "Metric", "type": "message", "module": "hw_metrics_mgmt_service", "fields": [{"name": "metric_id", "is_choice": false, "repeated": false, "type": "MetricNames", "lookup": true}, {"name": "metric_metadata", "is_choice": false, "repeated": false, "type": "MetricMetaData", "lookup": true}, {"name": "value", "is_choice": false, "repeated": false, "type": "ComponentSensorData", "lookup": true}]}, {"name": "GetMetricRequest", "type": "message", "module": "hw_metrics_mgmt_service", "fields": [{"name": "meta_data", "is_choice": false, "repeated": false, "type": "MetricMetaData", "lookup": true}, {"name": "metric_id", "is_choice": false, "repeated": false, "type": "MetricNames", "lookup": true}]}, {"name": "Reason", "type": "enum", "module": "hw_metrics_mgmt_service", "values": {"0": "UNDEFINED_REASON", "1": "UNKNOWN_DEVICE", "2": "UNKNOWN_COMPONENT", "3": "INTERNAL_ERROR", "4": "INVALID_METRIC", "5": "DEVICE_UNREACHABLE"}}, {"name": "GetMetricResponse", "type": "message", "module": "hw_metrics_mgmt_service", "fields": [{"name": "status", "is_choice": false, "repeated": false, "type": "Status", "lookup": true}, {"name": "reason", "is_choice": false, "repeated": false, "type": "Reason", "lookup": true}, {"name": "metric", "is_choice": false, "repeated": false, "type": "Metric", "lookup": true}, {"name": "reason_detail", "is_choice": false, "repeated": false, "type": "string", "lookup": false}]}, {"name": "EventIds", "type": "enum", "module": "hw_events_mgmt_service", "values": {"0": "EVENT_NAME_UNDEFINED", "100": "EVENT_TRANSCEIVER_PLUG_OUT", "101": "EVENT_TRANSCEIVER_PLUG_IN", "102": "EVENT_TRANSCEIVER_VOLTAGE_ABOVE_THRESHOLD", "103": "EVENT_TRANSCEIVER_VOLTAGE_BELOW_THRESHOLD", "104": "EVENT_TRANSCEIVER_TEMPERATURE_ABOVE_THRESHOLD", "105": "EVENT_TRANSCEIVER_TEMPERATURE_BELOW_THRESHOLD", "106": "EVENT_TRANSCEIVER_CURRENT_ABOVE_THRESHOLD", "107": "EVENT_TRANSCEIVER_CURRENT_BELOW_THRESHOLD", "108": "EVENT_TRANSCEIVER_RX_POWER_ABOVE_THRESHOLD", "109": "EVENT_TRANSCEIVER_RX_POWER_BELOW_THRESHOLD", "110": "EVENT_TRANSCEIVER_TX_POWER_ABOVE_THRESHOLD", "111": "EVENT_TRANSCEIVER_TX_POWER_BELOW_THRESHOLD", "112": "EVENT_TRANSCEIVER_FAILURE", "113": "EVENT_TRANSCEIVER_VOLTAGE_ABOVE_THRESHOLD_RECOVERED", "114": "EVENT_TRANSCEIVER_VOLTAGE_BELOW_THRESHOLD_RECOVERED", "115": "EVENT_TRANSCEIVER_TEMPERATURE_ABOVE_THRESHOLD_RECOVERED", "116": "EVENT_TRANSCEIVER_TEMPERATURE_BELOW_THRESHOLD_RECOVERED", "117": "EVENT_TRANSCEIVER_CURRENT_ABOVE_THRESHOLD_RECOVERED", "118": "EVENT_TRANSCEIVER_CURRENT_BELOW_THRESHOLD_RECOVERED", "119": "EVENT_TRANSCEIVER_RX_POWER_ABOVE_THRESHOLD_RECOVERED", "120": "EVENT_TRANSCEIVER_RX_POWER_BELOW_THRESHOLD_RECOVERED", "121": "EVENT_TRANSCEIVER_TX_POWER_ABOVE_THRESHOLD_RECOVERED", "122": "EVENT_TRANSCEIVER_TX_POWER_BELOW_THRESHOLD_RECOVERED", "123": "EVENT_TRANSCEIVER_FAILURE_RECOVERED", "200": "EVENT_PSU_PLUG_OUT", "201": "EVENT_PSU_PLUG_IN", "202": "EVENT_PSU_FAILURE", "203": "EVENT_PSU_FAILURE_RECOVERED", "300": "EVENT_FAN_FAILURE", "301": "EVENT_FAN_PLUG_OUT", "302": "EVENT_FAN_PLUG_IN", "303": "EVENT_FAN_FAILURE_RECOVERED", "400": "EVENT_CPU_TEMPERATURE_ABOVE_CRITICAL", "401": "EVENT_CPU_TEMPERATURE_ABOVE_FATAL", "402": "EVENT_CPU_TEMPERATURE_ABOVE_CRITICAL_RECOVERED", "403": "EVENT_CPU_TEMPERATURE_ABOVE_FATAL_RECOVERED", "500": "EVENT_HW_DEVICE_RESET", "501": "EVENT_HW_DEVICE_TEMPERATURE_ABOVE_CRITICAL", "502": "EVENT_HW_DEVICE_TEMPERATURE_ABOVE_FATAL", "503": "EVENT_HW_DEVICE_TEMPERATURE_ABOVE_CRITICAL_RECOVERED", "504": "EVENT_HW_DEVICE_TEMPERATURE_ABOVE_FATAL_RECOVERED"}}, {"name": "ValueType", "type": "message", "module": "hw_events_mgmt_service", "fields": [{"name": "val", "is_choice": true, "cases": [{"name": "int_val", "type": "int64", "lookup": false}, {"name": "uint_val", "type": "uint64", "lookup": false}, {"name": "float_val", "type": "float", "lookup": false}]}]}, {"name": "WaterMarks", "type": "message", "module": "hw_events_mgmt_service", "fields": [{"name": "high", "is_choice": false, "repeated": false, "type": "ValueType", "lookup": true}, {"name": "low", "is_choice": false, "repeated": false, "type": "ValueType", "lookup": true}]}, {"name": "Thresholds", "type": "message", "module": "hw_events_mgmt_service", "fields": [{"name": "threshold", "is_choice": true, "cases": [{"name": "upper", "type": "WaterMarks", "lookup": true}, {"name": "lower", "type": "WaterMarks", "lookup": true}]}]}, {"name": "ThresholdInformation", "type": "message", "module": "hw_events_mgmt_service", "fields": [{"name": "observed_value", "is_choice": false, "repeated": false, "type": "ValueType", "lookup": true}, {"name": "thresholds", "is_choice": false, "repeated": false, "type": "Thresholds", "lookup": true}]}, {"name": "EventCfg", "type": "message", "module": "hw_events_mgmt_service", "fields": [{"name": "event_id", "is_choice": false, "repeated": false, "type": "EventIds", "lookup": true}, {"name": "is_configured", "is_choice": false, "repeated": false, "type": "bool", "lookup": false}, {"name": "thresholds", "is_choice": false, "repeated": false, "type": "Thresholds", "lookup": true}]}, {"name": "EventsCfg", "type": "message", "module": "hw_events_mgmt_service", "fields": [{"name": "items", "is_choice": false, "repeated": true, "type": "EventCfg", "lookup": true}]}, {"name": "Reason", "type": "enum", "module": "hw_events_mgmt_service", "values": {"0": "UNDEFINED_REASON", "1": "UNKNOWN_DEVICE", "2": "INTERNAL_ERROR", "3": "DEVICE_UNREACHABLE"}}, {"name": "ListEventsResponse", "type": "message", "module": "hw_events_mgmt_service", "fields": [{"name": "status", "is_choice": false, "repeated": false, "type": "Status", "lookup": true}, {"name": "reason", "is_choice": false, "repeated": false, "type": "Reason", "lookup": true}, {"name": "events", "is_choice": false, "repeated": false, "type": "EventsCfg", "lookup": true}, {"name": "reason_detail", "is_choice": false, "repeated": false, "type": "string", "lookup": false}]}, {"name": "EventsConfigurationRequest", "type": "message", "module": "hw_events_mgmt_service", "fields": [{"name": "device_uuid", "is_choice": false, "repeated": false, "type": "Uuid", "lookup": true}, {"name": "operation", "is_choice": true, "cases": [{"name": "changes", "type": "EventsCfg", "lookup": true}, {"name": "reset_to_default", "type": "bool", "lookup": false}]}]}, {"name": "Reason", "type": "enum", "module": "hw_events_mgmt_service", "values": {"0": "UNDEFINED_REASON", "1": "UNKNOWN_DEVICE", "2": "INTERNAL_ERROR", "3": "INVALID_CONFIG", "4": "DEVICE_UNREACHABLE"}}, {"name": "EventsConfigurationResponse", "type": "message", "module": "hw_events_mgmt_service", "fields": [{"name": "status", "is_choice": false, "repeated": false, "type": "Status", "lookup": true}, {"name": "reason", "is_choice": false, "repeated": false, "type": "Reason", "lookup": true}, {"name": "reason_detail", "is_choice": false, "repeated": false, "type": "string", "lookup": false}]}, {"name": "EventMetaData", "type": "message", "module": "hw_events_mgmt_service", "fields": [{"name": "device_uuid", "is_choice": false, "repeated": false, "type": "Uuid", "lookup": true}, {"name": "component_uuid", "is_choice": false, "repeated": false, "type": "Uuid", "lookup": true}, {"name": "component_name", "is_choice": false, "repeated": false, "type": "string", "lookup": false}]}, {"name": "Event", "type": "message", "module": "hw_events_mgmt_service", "fields": [{"name": "event_metadata", "is_choice": false, "repeated": false, "type": "EventMetaData", "lookup": true}, {"name": "event_id", "is_choice": false, "repeated": false, "type": "EventIds", "lookup": true}, {"name": "raised_ts", "is_choice": false, "repeated": false, "type": "google.protobuf.Timestamp", "lookup": true}, {"name": "threshold_info", "is_choice": false, "repeated": false, "type": "ThresholdInformation", "lookup": true}, {"name": "add_info", "is_choice": false, "repeated": false, "type": "string", "lookup": false}]}, {"name": "ImageVersion", "type": "message", "module": "sw_image", "fields": [{"name": "image_name", "is_choice": false, "repeated": false, "type": "string", "lookup": false}, {"name": "version", "is_choice": false, "repeated": false, "type": "string", "lookup": false}]}, {"name": "ImageInformation", "type": "message", "module": "sw_image", "fields": [{"name": "image", "is_choice": false, "repeated": false, "type": "ImageVersion", "lookup": true}, {"name": "image_install_script", "is_choice": false, "repeated": false, "type": "string", "lookup": false}, {"name": "image_url", "is_choice": false, "repeated": false, "type": "string", "lookup": false}, {"name": "sha256sum", "is_choice": false, "repeated": false, "type": "string", "lookup": false}]}, {"name": "ImageState", "type": "enum", "module": "sw_image", "values": {"0": "UNDEFINED_STATE", "1": "COPYING_IMAGE", "2": "INSTALLING_IMAGE", "3": "COMMITTING_IMAGE", "4": "REBOOTING_DEVICE", "5": "UPGRADE_COMPLETE", "6": "UPGRADE_FAILED", "7": "ACTIVATION_COMPLETE", "8": "ACTIVATION_FAILED"}}, {"name": "Reason", "type": "enum", "module": "sw_image", "values": {"0": "UNDEFINED_REASON", "1": "ERROR_IN_REQUEST", "2": "INTERNAL_ERROR", "3": "DEVICE_IN_WRONG_STATE", "4": "INVALID_IMAGE", "5": "WRONG_IMAGE_CHECKSUM", "6": "OPERATION_ALREADY_IN_PROGRESS", "7": "UNKNOWN_DEVICE", "8": "DEVICE_NOT_REACHABLE"}}, {"name": "ImageStatus", "type": "message", "module": "sw_image", "fields": [{"name": "status", "is_choice": false, "repeated": false, "type": "Status", "lookup": true}, {"name": "reason", "is_choice": false, "repeated": false, "type": "Reason", "lookup": true}, {"name": "state", "is_choice": false, "repeated": false, "type": "ImageState", "lookup": true}, {"name": "description", "is_choice": false, "repeated": false, "type": "string", "lookup": false}, {"name": "reason_detail", "is_choice": false, "repeated": false, "type": "string", "lookup": false}]}, {"name": "PhysicalInventoryRequest", "type": "message", "module": "hw_management_service", "fields": [{"name": "device_uuid", "is_choice": false, "repeated": false, "type": "Uuid", "lookup": true}]}, {"name": "Reason", "type": "enum", "module": "hw_management_service", "values": {"0": "UNDEFINED_REASON", "1": "UNKNOWN_DEVICE", "2": "INTERNAL_ERROR", "3": "DEVICE_UNREACHABLE"}}, {"name": "PhysicalInventoryResponse", "type": "message", "module": "hw_management_service", "fields": [{"name": "status", "is_choice": false, "repeated": false, "type": "Status", "lookup": true}, {"name": "reason", "is_choice": false, "repeated": false, "type": "Reason", "lookup": true}, {"name": "inventory", "is_choice": false, "repeated": false, "type": "Hardware", "lookup": true}, {"name": "reason_detail", "is_choice": false, "repeated": false, "type": "string", "lookup": false}]}, {"name": "HWComponentInfoGetRequest", "type": "message", "module": "hw_management_service", "fields": [{"name": "device_uuid", "is_choice": false, "repeated": false, "type": "Uuid", "lookup": true}, {"name": "component_uuid", "is_choice": false, "repeated": false, "type": "Uuid", "lookup": true}, {"name": "component_name", "is_choice": false, "repeated": false, "type": "string", "lookup": false}]}, {"name": "Reason", "type": "enum", "module": "hw_management_service", "values": {"0": "UNDEFINED_REASON", "1": "UNKNOWN_DEVICE", "2": "UNKNOWN_COMPONENT", "3": "INTERNAL_ERROR", "4": "DEVICE_UNREACHABLE"}}, {"name": "HWComponentInfoGetResponse", "type": "message", "module": "hw_management_service", "fields": [{"name": "status", "is_choice": false, "repeated": false, "type": "Status", "lookup": true}, {"name": "reason", "is_choice": false, "repeated": false, "type": "Reason", "lookup": true}, {"name": "component", "is_choice": false, "repeated": false, "type": "Component", "lookup": true}, {"name": "reason_detail", "is_choice": false, "repeated": false, "type": "string", "lookup": false}]}, {"name": "HWComponentInfoSetRequest", "type": "message", "module": "hw_management_service", "fields": [{"name": "device_uuid", "is_choice": false, "repeated": false, "type": "Uuid", "lookup": true}, {"name": "component_uuid", "is_choice": false, "repeated": false, "type": "Uuid", "lookup": true}, {"name": "component_name", "is_choice": false, "repeated": false, "type": "string", "lookup": false}, {"name": "changes", "is_choice": false, "repeated": false, "type": "ModifiableComponent", "lookup": true}]}, {"name": "Reason", "type": "enum", "module": "hw_management_service", "values": {"0": "UNDEFINED_REASON", "1": "UNKNOWN_DEVICE", "2": "UNKNOWN_COMPONENT", "3": "INVALID_PARAMS", "4": "INTERNAL_ERROR", "5": "DEVICE_UNREACHABLE"}}, {"name": "HWComponentInfoSetResponse", "type": "message", "module": "hw_management_service", "fields": [{"name": "status", "is_choice": false, "repeated": false, "type": "Status", "lookup": true}, {"name": "reason", "is_choice": false, "repeated": false, "type": "Reason", "lookup": true}, {"name": "reason_detail", "is_choice": false, "repeated": false, "type": "string", "lookup": false}]}, {"name": "Reason", "type": "enum", "module": "hw_management_service", "values": {"0": "UNDEFINED_REASON", "1": "DEVICE_ALREADY_MANAGED", "2": "OPERATION_ALREADY_IN_PROGRESS", "3": "INVALID_PARAMS", "4": "INTERNAL_ERROR"}}, {"name": "StartManagingDeviceResponse", "type": "message", "module": "hw_management_service", "fields": [{"name": "status", "is_choice": false, "repeated": false, "type": "Status", "lookup": true}, {"name": "reason", "is_choice": false, "repeated": false, "type": "Reason", "lookup": true}, {"name": "device_uuid", "is_choice": false, "repeated": false, "type": "Uuid", "lookup": true}, {"name": "reason_detail", "is_choice": false, "repeated": false, "type": "string", "lookup": false}]}, {"name": "StopManagingDeviceRequest", "type": "message", "module": "hw_management_service", "fields": [{"name": "name", "is_choice": false, "repeated": false, "type": "string", "lookup": false}]}, {"name": "Reason", "type": "enum", "module": "hw_management_service", "values": {"0": "UNDEFINED_REASON", "1": "UNKNOWN_DEVICE"}}, {"name": "StopManagingDeviceResponse", "type": "message", "module": "hw_management_service", "fields": [{"name": "status", "is_choice": false, "repeated": false, "type": "Status", "lookup": true}, {"name": "reason", "is_choice": false, "repeated": false, "type": "Reason", "lookup": true}, {"name": "reason_detail", "is_choice": false, "repeated": false, "type": "string", "lookup": false}]}, {"name": "ManagedDevicesResponse", "type": "message", "module": "hw_management_service", "fields": [{"name": "devices", "is_choice": false, "repeated": true, "type": "ModifiableComponent", "lookup": true}]}, {"name": "SetLoggingEndpointRequest", "type": "message", "module": "hw_management_service", "fields": [{"name": "device_uuid", "is_choice": false, "repeated": false, "type": "Uuid", "lookup": true}, {"name": "logging_endpoint", "is_choice": false, "repeated": false, "type": "string", "lookup": false}, {"name": "logging_protocol", "is_choice": false, "repeated": false, "type": "string", "lookup": false}]}, {"name": "Reason", "type": "enum", "module": "hw_management_service", "values": {"0": "UNDEFINED_REASON", "1": "UNKNOWN_DEVICE", "2": "INTERNAL_ERROR", "3": "LOGGING_ENDPOINT_ERROR", "4": "LOGGING_ENDPOINT_PROTOCOL_ERROR", "5": "MSGBUS_ENDPOINT_ERROR", "6": "DEVICE_UNREACHABLE"}}, {"name": "SetRemoteEndpointResponse", "type": "message", "module": "hw_management_service", "fields": [{"name": "status", "is_choice": false, "repeated": false, "type": "Status", "lookup": true}, {"name": "reason", "is_choice": false, "repeated": false, "type": "Reason", "lookup": true}, {"name": "reason_detail", "is_choice": false, "repeated": false, "type": "string", "lookup": false}]}, {"name": "Reason", "type": "enum", "module": "hw_management_service", "values": {"0": "UNDEFINED_REASON", "1": "UNKNOWN_DEVICE", "2": "INTERNAL_ERROR", "3": "DEVICE_UNREACHABLE"}}, {"name": "GetLoggingEndpointResponse", "type": "message", "module": "hw_management_service", "fields": [{"name": "status", "is_choice": false, "repeated": false, "type": "Status", "lookup": true}, {"name": "reason", "is_choice": false, "repeated": false, "type": "Reason", "lookup": true}, {"name": "logging_endpoint", "is_choice": false, "repeated": false, "type": "string", "lookup": false}, {"name": "logging_protocol", "is_choice": false, "repeated": false, "type": "string", "lookup": false}, {"name": "reason_detail", "is_choice": false, "repeated": false, "type": "string", "lookup": false}]}, {"name": "SetMsgBusEndpointRequest", "type": "message", "module": "hw_management_service", "fields": [{"name": "msgbus_endpoint", "is_choice": false, "repeated": false, "type": "string", "lookup": false}]}, {"name": "Reason", "type": "enum", "module": "hw_management_service", "values": {"0": "UNDEFINED_REASON", "1": "INTERNAL_ERROR", "2": "DEVICE_UNREACHABLE"}}, {"name": "GetMsgBusEndpointResponse", "type": "message", "module": "hw_management_service", "fields": [{"name": "status", "is_choice": false, "repeated": false, "type": "Status", "lookup": true}, {"name": "reason", "is_choice": false, "repeated": false, "type": "Reason", "lookup": true}, {"name": "msgbus_endpoint", "is_choice": false, "repeated": false, "type": "string", "lookup": false}, {"name": "reason_detail", "is_choice": false, "repeated": false, "type": "string", "lookup": false}]}, {"name": "EntitiesLogLevel", "type": "message", "module": "hw_management_service", "fields": [{"name": "logLevel", "is_choice": false, "repeated": false, "type": "LogLevel", "lookup": true}, {"name": "entities", "is_choice": false, "repeated": true, "type": "string", "lookup": false}]}, {"name": "SetLogLevelRequest", "type": "message", "module": "hw_management_service", "fields": [{"name": "device_uuid", "is_choice": false, "repeated": false, "type": "Uuid", "lookup": true}, {"name": "loglevels", "is_choice": false, "repeated": true, "type": "EntitiesLogLevel", "lookup": true}]}, {"name": "Reason", "type": "enum", "module": "hw_management_service", "values": {"0": "UNDEFINED_REASON", "1": "UNKNOWN_DEVICE", "2": "INTERNAL_ERROR", "3": "UNKNOWN_LOG_ENTITY", "4": "DEVICE_UNREACHABLE"}}, {"name": "SetLogLevelResponse", "type": "message", "module": "hw_management_service", "fields": [{"name": "device_uuid", "is_choice": false, "repeated": false, "type": "Uuid", "lookup": true}, {"name": "status", "is_choice": false, "repeated": false, "type": "Status", "lookup": true}, {"name": "reason", "is_choice": false, "repeated": false, "type": "Reason", "lookup": true}, {"name": "reason_detail", "is_choice": false, "repeated": false, "type": "string", "lookup": false}]}, {"name": "GetLogLevelRequest", "type": "message", "module": "hw_management_service", "fields": [{"name": "device_uuid", "is_choice": false, "repeated": false, "type": "Uuid", "lookup": true}, {"name": "entities", "is_choice": false, "repeated": true, "type": "string", "lookup": false}]}, {"name": "Reason", "type": "enum", "module": "hw_management_service", "values": {"0": "UNDEFINED_REASON", "1": "UNKNOWN_DEVICE", "2": "INTERNAL_ERROR", "3": "UNKNOWN_LOG_ENTITY", "4": "DEVICE_UNREACHABLE"}}, {"name": "GetLogLevelResponse", "type": "message", "module": "hw_management_service", "fields": [{"name": "device_uuid", "is_choice": false, "repeated": false, "type": "Uuid", "lookup": true}, {"name": "logLevels", "is_choice": false, "repeated": true, "type": "EntitiesLogLevel", "lookup": true}, {"name": "status", "is_choice": false, "repeated": false, "type": "Status", "lookup": true}, {"name": "reason", "is_choice": false, "repeated": false, "type": "Reason", "lookup": true}, {"name": "reason_detail", "is_choice": false, "repeated": false, "type": "string", "lookup": false}]}, {"name": "GetLoggableEntitiesRequest", "type": "message", "module": "hw_management_service", "fields": [{"name": "device_uuid", "is_choice": false, "repeated": false, "type": "Uuid", "lookup": true}]}, {"name": "SoftwareVersionInformation", "type": "message", "module": "sw_management_service", "fields": [{"name": "active_versions", "is_choice": false, "repeated": true, "type": "ImageVersion", "lookup": true}, {"name": "standby_versions", "is_choice": false, "repeated": true, "type": "ImageVersion", "lookup": true}]}, {"name": "Reason", "type": "enum", "module": "sw_management_service", "values": {"0": "UNDEFINED_REASON", "1": "UNKNOWN_DEVICE", "2": "INTERNAL_ERROR", "3": "DEVICE_UNREACHABLE"}}, {"name": "GetSoftwareVersionInformationResponse", "type": "message", "module": "sw_management_service", "fields": [{"name": "status", "is_choice": false, "repeated": false, "type": "Status", "lookup": true}, {"name": "reason", "is_choice": false, "repeated": false, "type": "Reason", "lookup": true}, {"name": "info", "is_choice": false, "repeated": false, "type": "SoftwareVersionInformation", "lookup": true}, {"name": "reason_detail", "is_choice": false, "repeated": false, "type": "string", "lookup": false}]}, {"name": "DownloadImageRequest", "type": "message", "module": "sw_management_service", "fields": [{"name": "device_uuid", "is_choice": false, "repeated": false, "type": "Uuid", "lookup": true}, {"name": "image_info", "is_choice": false, "repeated": false, "type": "ImageInformation", "lookup": true}]}, {"name": "ConfigRequest", "type": "message", "module": "sw_management_service", "fields": [{"name": "device_uuid", "is_choice": false, "repeated": false, "type": "Uuid", "lookup": true}, {"name": "config_url", "is_choice": false, "repeated": false, "type": "string", "lookup": false}]}, {"name": "Reason", "type": "enum", "module": "sw_management_service", "values": {"0": "UNDEFINED_REASON", "1": "UNKNOWN_DEVICE", "2": "INTERNAL_ERROR", "3": "ERROR_FETCHING_CONFIG", "4": "INVALID_CONFIG", "5": "OPERATION_ALREADY_IN_PROGRESS", "6": "DEVICE_UNREACHABLE"}}, {"name": "ConfigResponse", "type": "message", "module": "sw_management_service", "fields": [{"name": "status", "is_choice": false, "repeated": false, "type": "Status", "lookup": true}, {"name": "reason", "is_choice": false, "repeated": false, "type": "Reason", "lookup": true}, {"name": "reason_detail", "is_choice": false, "repeated": false, "type": "string", "lookup": false}]}, {"name": "StartupConfigInfoRequest", "type": "message", "module": "sw_management_service", "fields": [{"name": "device_uuid", "is_choice": false, "repeated": false, "type": "Uuid", "lookup": true}]}, {"name": "Reason", "type": "enum", "module": "sw_management_service", "values": {"0": "UNDEFINED_REASON", "1": "UNKNOWN_DEVICE", "2": "INTERNAL_ERROR", "3": "DEVICE_UNREACHABLE"}}, {"name": "StartupConfigInfoResponse", "type": "message", "module": "sw_management_service", "fields": [{"name": "status", "is_choice": false, "repeated": false, "type": "Status", "lookup": true}, {"name": "reason", "is_choice": false, "repeated": false, "type": "Reason", "lookup": true}, {"name": "config_url", "is_choice": false, "repeated": false, "type": "string", "lookup": false}, {"name": "version", "is_choice": false, "repeated": false, "type": "string", "lookup": false}, {"name": "reason_detail", "is_choice": false, "repeated": false, "type": "string", "lookup": false}]}], "services": [{"name": "NativeMetricsManagementService", "module": "hw_metrics_mgmt_service", "rpcs": [{"name": "ListMetrics", "request": {"is_stream": false, "type": "HardwareID", "lookup": true}, "response": {"is_stream": false, "type": "ListMetricsResponse", "lookup": true}}, {"name": "UpdateMetricsConfiguration", "request": {"is_stream": false, "type": "MetricsConfigurationRequest", "lookup": true}, "response": {"is_stream": false, "type": "MetricsConfigurationResponse", "lookup": true}}, {"name": "GetMetric", "request": {"is_stream": false, "type": "GetMetricRequest", "lookup": true}, "response": {"is_stream": false, "type": "GetMetricResponse", "lookup": true}}]}, {"name": "NativeEventsManagementService", "module": "hw_events_mgmt_service", "rpcs": [{"name": "ListEvents", "request": {"is_stream": false, "type": "HardwareID", "lookup": true}, "response": {"is_stream": false, "type": "ListEventsResponse", "lookup": true}}, {"name": "UpdateEventsConfiguration", "request": {"is_stream": false, "type": "EventsConfigurationRequest", "lookup": true}, "response": {"is_stream": false, "type": "EventsConfigurationResponse", "lookup": true}}]}, {"name": "NativeHWManagementService", "module": "hw_management_service", "rpcs": [{"name": "StartManagingDevice", "request": {"is_stream": false, "type": "ModifiableComponent", "lookup": true}, "response": {"is_stream": true, "type": "StartManagingDeviceResponse", "lookup": true}}, {"name": "StopManagingDevice", "request": {"is_stream": false, "type": "StopManagingDeviceRequest", "lookup": true}, "response": {"is_stream": false, "type": "StopManagingDeviceResponse", "lookup": true}}, {"name": "GetManagedDevices", "request": {"is_stream": false, "type": "google.protobuf.Empty", "lookup": false}, "response": {"is_stream": false, "type": "ManagedDevicesResponse", "lookup": true}}, {"name": "GetPhysicalInventory", "request": {"is_stream": false, "type": "PhysicalInventoryRequest", "lookup": true}, "response": {"is_stream": true, "type": "PhysicalInventoryResponse", "lookup": true}}, {"name": "GetHWComponentInfo", "request": {"is_stream": false, "type": "HWComponentInfoGetRequest", "lookup": true}, "response": {"is_stream": true, "type": "HWComponentInfoGetResponse", "lookup": true}}, {"name": "SetHWComponentInfo", "request": {"is_stream": false, "type": "HWComponentInfoSetRequest", "lookup": true}, "response": {"is_stream": false, "type": "HWComponentInfoSetResponse", "lookup": true}}, {"name": "SetLoggingEndpoint", "request": {"is_stream": false, "type": "SetLoggingEndpointRequest", "lookup": true}, "response": {"is_stream": false, "type": "SetRemoteEndpointResponse", "lookup": true}}, {"name": "GetLoggingEndpoint", "request": {"is_stream": false, "type": "HardwareID", "lookup": true}, "response": {"is_stream": false, "type": "GetLoggingEndpointResponse", "lookup": true}}, {"name": "SetMsgBusEndpoint", "request": {"is_stream": false, "type": "SetMsgBusEndpointRequest", "lookup": true}, "response": {"is_stream": false, "type": "SetRemoteEndpointResponse", "lookup": true}}, {"name": "GetMsgBusEndpoint", "request": {"is_stream": false, "type": "google.protobuf.Empty", "lookup": false}, "response": {"is_stream": false, "type": "GetMsgBusEndpointResponse", "lookup": true}}, {"name": "GetLoggableEntities", "request": {"is_stream": false, "type": "GetLoggableEntitiesRequest", "lookup": true}, "response": {"is_stream": false, "type": "GetLogLevelResponse", "lookup": true}}, {"name": "SetLogLevel", "request": {"is_stream": false, "type": "SetLogLevelRequest", "lookup": true}, "response": {"is_stream": false, "type": "SetLogLevelResponse", "lookup": true}}, {"name": "GetLogLevel", "request": {"is_stream": false, "type": "GetLogLevelRequest", "lookup": true}, "response": {"is_stream": false, "type": "GetLogLevelResponse", "lookup": true}}]}, {"name": "NativeSoftwareManagementService", "module": "sw_management_service", "rpcs": [{"name": "GetSoftwareVersion", "request": {"is_stream": false, "type": "HardwareID", "lookup": true}, "response": {"is_stream": false, "type": "GetSoftwareVersionInformationResponse", "lookup": true}}, {"name": "DownloadImage", "request": {"is_stream": false, "type": "DownloadImageRequest", "lookup": true}, "response": {"is_stream": true, "type": "ImageStatus", "lookup": true}}, {"name": "ActivateImage", "request": {"is_stream": false, "type": "HardwareID", "lookup": true}, "response": {"is_stream": true, "type": "ImageStatus", "lookup": true}}, {"name": "RevertToStandbyImage", "request": {"is_stream": false, "type": "HardwareID", "lookup": true}, "response": {"is_stream": true, "type": "ImageStatus", "lookup": true}}, {"name": "UpdateStartupConfiguration", "request": {"is_stream": false, "type": "ConfigRequest", "lookup": true}, "response": {"is_stream": true, "type": "ConfigResponse", "lookup": true}}, {"name": "GetStartupConfigurationInfo", "request": {"is_stream": false, "type": "StartupConfigInfoRequest", "lookup": true}, "response": {"is_stream": false, "type": "StartupConfigInfoResponse", "lookup": true}}]}]}
\ No newline at end of file
diff --git a/grpc_robot/services/dmi/dmi_0_10_2/__init__.py b/grpc_robot/services/dmi/dmi_0_10_2/__init__.py
new file mode 100644
index 0000000..abb0bf7
--- /dev/null
+++ b/grpc_robot/services/dmi/dmi_0_10_2/__init__.py
@@ -0,0 +1,14 @@
+# Copyright 2020-present Open Networking Foundation
+# Original copyright 2020-present ADTRAN, Inc.
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+from ..dmi_0_10_1 import *
diff --git a/grpc_robot/services/dmi/dmi_0_10_2/dmi.json b/grpc_robot/services/dmi/dmi_0_10_2/dmi.json
new file mode 100644
index 0000000..98802e6
--- /dev/null
+++ b/grpc_robot/services/dmi/dmi_0_10_2/dmi.json
@@ -0,0 +1 @@
+{"modules": [{"name": "commons", "imports": []}, {"name": "hw", "imports": ["timestamp"]}, {"name": "hw_metrics_mgmt_service", "imports": ["commons", "hw"]}, {"name": "hw_events_mgmt_service", "imports": ["commons", "hw", "timestamp"]}, {"name": "sw_image", "imports": ["commons"]}, {"name": "hw_management_service", "imports": ["commons", "hw", "empty"]}, {"name": "sw_management_service", "imports": ["commons", "hw", "sw_image"]}], "data_types": [{"name": "Status", "type": "enum", "module": "commons", "values": {"0": "UNDEFINED_STATUS", "1": "OK_STATUS", "2": "ERROR_STATUS"}}, {"name": "LogLevel", "type": "enum", "module": "commons", "values": {"0": "TRACE", "1": "DEBUG", "2": "INFO", "3": "WARN", "4": "ERROR"}}, {"name": "Uuid", "type": "message", "module": "hw", "fields": [{"name": "uuid", "is_choice": false, "repeated": false, "type": "string", "lookup": false}]}, {"name": "HardwareID", "type": "message", "module": "hw", "fields": [{"name": "uuid", "is_choice": false, "repeated": false, "type": "Uuid", "lookup": true}]}, {"name": "Uri", "type": "message", "module": "hw", "fields": [{"name": "uri", "is_choice": false, "repeated": false, "type": "string", "lookup": false}]}, {"name": "ComponentType", "type": "enum", "module": "hw", "values": {"0": "COMPONENT_TYPE_UNDEFINED", "1": "COMPONENT_TYPE_UNKNOWN", "2": "COMPONENT_TYPE_CHASSIS", "3": "COMPONENT_TYPE_BACKPLANE", "4": "COMPONENT_TYPE_CONTAINER", "5": "COMPONENT_TYPE_POWER_SUPPLY", "6": "COMPONENT_TYPE_FAN", "7": "COMPONENT_TYPE_SENSOR", "8": "COMPONENT_TYPE_MODULE", "9": "COMPONENT_TYPE_PORT", "10": "COMPONENT_TYPE_CPU", "11": "COMPONENT_TYPE_BATTERY", "12": "COMPONENT_TYPE_STORAGE", "13": "COMPONENT_TYPE_MEMORY", "14": "COMPONENT_TYPE_TRANSCEIVER"}}, {"name": "ComponentAdminState", "type": "enum", "module": "hw", "values": {"0": "COMP_ADMIN_STATE_UNDEFINED", "1": "COMP_ADMIN_STATE_UNKNOWN", "2": "COMP_ADMIN_STATE_LOCKED", "3": "COMP_ADMIN_STATE_SHUTTING_DOWN", "4": "COMP_ADMIN_STATE_UNLOCKED"}}, {"name": "ComponentOperState", "type": "enum", "module": "hw", "values": {"0": "COMP_OPER_STATE_UNDEFINED", "1": "COMP_OPER_STATE_UNKNOWN", "2": "COMP_OPER_STATE_DISABLED", "3": "COMP_OPER_STATE_ENABLED", "4": "COMP_OPER_STATE_TESTING"}}, {"name": "ComponentUsageState", "type": "enum", "module": "hw", "values": {"0": "COMP_USAGE_STATE_UNDEFINED", "1": "COMP_USAGE_STATE_UNKNOWN", "2": "COMP_USAGE_STATE_IDLE", "3": "COMP_USAGE_STATE_ACTIVE", "4": "COMP_USAGE_STATE_BUSY"}}, {"name": "ComponentAlarmState", "type": "enum", "module": "hw", "values": {"0": "COMP_ALARM_STATE_UNDEFINED", "1": "COMP_ALARM_STATE_UNKNOWN", "2": "COMP_ALARM_STATE_UNDER_REPAIR", "3": "COMP_ALARM_STATE_CRITICAL", "4": "COMP_ALARM_STATE_MAJOR", "5": "COMP_ALARM_STATE_MINOR", "6": "COMP_ALARM_STATE_WARNING", "7": "COMP_ALARM_STATE_INDETERMINATE"}}, {"name": "ComponentStandbyState", "type": "enum", "module": "hw", "values": {"0": "COMP_STANDBY_STATE_UNDEFINED", "1": "COMP_STANDBY_STATE_UNKNOWN", "2": "COMP_STANDBY_STATE_HOT", "3": "COMP_STANDBY_STATE_COLD", "4": "COMP_STANDBY_STATE_PROVIDING_SERVICE"}}, {"name": "ComponentState", "type": "message", "module": "hw", "fields": [{"name": "state_last_changed", "is_choice": false, "repeated": false, "type": "google.protobuf.Timestamp", "lookup": true}, {"name": "admin_state", "is_choice": false, "repeated": false, "type": "ComponentAdminState", "lookup": true}, {"name": "oper_state", "is_choice": false, "repeated": false, "type": "ComponentOperState", "lookup": true}, {"name": "usage_state", "is_choice": false, "repeated": false, "type": "ComponentUsageState", "lookup": true}, {"name": "alarm_state", "is_choice": false, "repeated": false, "type": "ComponentAlarmState", "lookup": true}, {"name": "standby_state", "is_choice": false, "repeated": false, "type": "ComponentStandbyState", "lookup": true}]}, {"name": "DataValueType", "type": "enum", "module": "hw", "values": {"0": "VALUE_TYPE_UNDEFINED", "1": "VALUE_TYPE_OTHER", "2": "VALUE_TYPE_UNKNOWN", "3": "VALUE_TYPE_VOLTS_AC", "4": "VALUE_TYPE_VOLTS_DC", "5": "VALUE_TYPE_AMPERES", "6": "VALUE_TYPE_WATTS", "7": "VALUE_TYPE_HERTZ", "8": "VALUE_TYPE_CELSIUS", "9": "VALUE_TYPE_PERCENT_RH", "10": "VALUE_TYPE_RPM", "11": "VALUE_TYPE_CMM", "12": "VALUE_TYPE_TRUTH_VALUE"}}, {"name": "ValueScale", "type": "enum", "module": "hw", "values": {"0": "VALUE_SCALE_UNDEFINED", "1": "VALUE_SCALE_YOCTO", "2": "VALUE_SCALE_ZEPTO", "3": "VALUE_SCALE_ATTO", "4": "VALUE_SCALE_FEMTO", "5": "VALUE_SCALE_PICO", "6": "VALUE_SCALE_NANO", "7": "VALUE_SCALE_MICRO", "8": "VALUE_SCALE_MILLI", "9": "VALUE_SCALE_UNITS", "10": "VALUE_SCALE_KILO", "11": "VALUE_SCALE_MEGA", "12": "VALUE_SCALE_GIGA", "13": "VALUE_SCALE_TERA", "14": "VALUE_SCALE_PETA", "15": "VALUE_SCALE_EXA", "16": "VALUE_SCALE_ZETTA", "17": "VALUE_SCALE_YOTTA"}}, {"name": "SensorStatus", "type": "enum", "module": "hw", "values": {"0": "SENSOR_STATUS_UNDEFINED", "1": "SENSOR_STATUS_OK", "2": "SENSOR_STATUS_UNAVAILABLE", "3": "SENSOR_STATUS_NONOPERATIONAL"}}, {"name": "ComponentSensorData", "type": "message", "module": "hw", "fields": [{"name": "value", "is_choice": false, "repeated": false, "type": "int32", "lookup": false}, {"name": "type", "is_choice": false, "repeated": false, "type": "DataValueType", "lookup": true}, {"name": "scale", "is_choice": false, "repeated": false, "type": "ValueScale", "lookup": true}, {"name": "precision", "is_choice": false, "repeated": false, "type": "int32", "lookup": false}, {"name": "status", "is_choice": false, "repeated": false, "type": "SensorStatus", "lookup": true}, {"name": "units_display", "is_choice": false, "repeated": false, "type": "string", "lookup": false}, {"name": "timestamp", "is_choice": false, "repeated": false, "type": "google.protobuf.Timestamp", "lookup": true}, {"name": "value_update_rate", "is_choice": false, "repeated": false, "type": "uint32", "lookup": false}, {"name": "data_type", "is_choice": false, "repeated": false, "type": "string", "lookup": false}]}, {"name": "ConnectorType", "type": "enum", "module": "hw", "values": {"0": "CONNECTOR_TYPE_UNDEFINED", "1": "RJ45", "2": "FIBER_LC", "3": "FIBER_SC_PC", "4": "FIBER_MPO"}}, {"name": "Speed", "type": "enum", "module": "hw", "values": {"0": "SPEED_UNDEFINED", "1": "DYNAMIC", "2": "GIGABIT_1", "3": "GIGABIT_10", "4": "GIGABIT_25", "5": "GIGABIT_40", "6": "GIGABIT_100", "7": "GIGABIT_400", "8": "MEGABIT_2500", "9": "MEGABIT_1250"}}, {"name": "Protocol", "type": "enum", "module": "hw", "values": {"0": "PROTOCOL_UNDEFINED", "1": "ETHERNET", "2": "GPON", "3": "XGPON", "4": "XGSPON", "5": "GFAST", "6": "SERIAL", "7": "EPON"}}, {"name": "PortComponentAttributes", "type": "message", "module": "hw", "fields": [{"name": "connector_type", "is_choice": false, "repeated": false, "type": "ConnectorType", "lookup": true}, {"name": "speed", "is_choice": false, "repeated": false, "type": "Speed", "lookup": true}, {"name": "protocol", "is_choice": false, "repeated": false, "type": "Protocol", "lookup": true}, {"name": "physical_label", "is_choice": false, "repeated": false, "type": "string", "lookup": false}]}, {"name": "ContainerComponentAttributes", "type": "message", "module": "hw", "fields": [{"name": "physical_label", "is_choice": false, "repeated": false, "type": "string", "lookup": false}]}, {"name": "SupportedVoltage", "type": "enum", "module": "hw", "values": {"0": "SUPPORTED_VOLTAGE_UNDEFINED", "1": "V48", "2": "V230", "3": "V115"}}, {"name": "PsuComponentAttributes", "type": "message", "module": "hw", "fields": [{"name": "supported_voltage", "is_choice": false, "repeated": false, "type": "SupportedVoltage", "lookup": true}]}, {"name": "FormFactor", "type": "enum", "module": "hw", "values": {"0": "FORM_FACTOR_UNKNOWN", "1": "QSFP", "2": "QSFP_PLUS", "3": "QSFP28", "4": "SFP", "5": "SFP_PLUS", "6": "XFP", "7": "CFP4", "8": "CFP2", "9": "CPAK", "10": "X2", "11": "OTHER", "12": "CFP", "13": "CFP2_ACO", "14": "CFP2_DCO"}}, {"name": "Type", "type": "enum", "module": "hw", "values": {"0": "TYPE_UNKNOWN", "1": "ETHERNET", "2": "GPON", "3": "XGPON", "4": "XGSPON", "5": "CPON", "6": "NG_PON2", "7": "EPON"}}, {"name": "TransceiverComponentsAttributes", "type": "message", "module": "hw", "fields": [{"name": "form_factor", "is_choice": false, "repeated": false, "type": "FormFactor", "lookup": true}, {"name": "trans_type", "is_choice": false, "repeated": false, "type": "Type", "lookup": true}, {"name": "max_distance", "is_choice": false, "repeated": false, "type": "uint32", "lookup": false}, {"name": "max_distance_scale", "is_choice": false, "repeated": false, "type": "ValueScale", "lookup": true}, {"name": "rx_wavelength", "is_choice": false, "repeated": true, "type": "uint32", "lookup": false}, {"name": "tx_wavelength", "is_choice": false, "repeated": true, "type": "uint32", "lookup": false}, {"name": "wavelength_scale", "is_choice": false, "repeated": false, "type": "ValueScale", "lookup": true}]}, {"name": "Component", "type": "message", "module": "hw", "fields": [{"name": "name", "is_choice": false, "repeated": false, "type": "string", "lookup": false}, {"name": "class", "is_choice": false, "repeated": false, "type": "ComponentType", "lookup": true}, {"name": "description", "is_choice": false, "repeated": false, "type": "string", "lookup": false}, {"name": "parent", "is_choice": false, "repeated": false, "type": "string", "lookup": false}, {"name": "parent_rel_pos", "is_choice": false, "repeated": false, "type": "int32", "lookup": false}, {"name": "children", "is_choice": false, "repeated": true, "type": "Component", "lookup": true}, {"name": "hardware_rev", "is_choice": false, "repeated": false, "type": "string", "lookup": false}, {"name": "firmware_rev", "is_choice": false, "repeated": false, "type": "string", "lookup": false}, {"name": "software_rev", "is_choice": false, "repeated": false, "type": "string", "lookup": false}, {"name": "serial_num", "is_choice": false, "repeated": false, "type": "string", "lookup": false}, {"name": "mfg_name", "is_choice": false, "repeated": false, "type": "string", "lookup": false}, {"name": "model_name", "is_choice": false, "repeated": false, "type": "string", "lookup": false}, {"name": "alias", "is_choice": false, "repeated": false, "type": "string", "lookup": false}, {"name": "asset_id", "is_choice": false, "repeated": false, "type": "string", "lookup": false}, {"name": "is_fru", "is_choice": false, "repeated": false, "type": "bool", "lookup": false}, {"name": "mfg_date", "is_choice": false, "repeated": false, "type": "google.protobuf.Timestamp", "lookup": true}, {"name": "uri", "is_choice": false, "repeated": false, "type": "Uri", "lookup": true}, {"name": "uuid", "is_choice": false, "repeated": false, "type": "Uuid", "lookup": true}, {"name": "state", "is_choice": false, "repeated": false, "type": "ComponentState", "lookup": true}, {"name": "sensor_data", "is_choice": false, "repeated": true, "type": "ComponentSensorData", "lookup": true}, {"name": "specific", "is_choice": true, "cases": [{"name": "port_attr", "type": "PortComponentAttributes", "lookup": true}, {"name": "container_attr", "type": "ContainerComponentAttributes", "lookup": true}, {"name": "psu_attr", "type": "PsuComponentAttributes", "lookup": true}, {"name": "transceiver_attr", "type": "TransceiverComponentsAttributes", "lookup": true}]}]}, {"name": "Hardware", "type": "message", "module": "hw", "fields": [{"name": "last_change", "is_choice": false, "repeated": false, "type": "google.protobuf.Timestamp", "lookup": true}, {"name": "root", "is_choice": false, "repeated": false, "type": "Component", "lookup": true}, {"name": "last_booted", "is_choice": false, "repeated": false, "type": "google.protobuf.Timestamp", "lookup": true}]}, {"name": "ModifiableComponent", "type": "message", "module": "hw", "fields": [{"name": "name", "is_choice": false, "repeated": false, "type": "string", "lookup": false}, {"name": "class", "is_choice": false, "repeated": false, "type": "ComponentType", "lookup": true}, {"name": "parent", "is_choice": false, "repeated": false, "type": "Component", "lookup": true}, {"name": "parent_rel_pos", "is_choice": false, "repeated": false, "type": "int32", "lookup": false}, {"name": "alias", "is_choice": false, "repeated": false, "type": "string", "lookup": false}, {"name": "asset_id", "is_choice": false, "repeated": false, "type": "string", "lookup": false}, {"name": "uri", "is_choice": false, "repeated": false, "type": "Uri", "lookup": true}, {"name": "admin_state", "is_choice": false, "repeated": false, "type": "ComponentAdminState", "lookup": true}]}, {"name": "MetricNames", "type": "enum", "module": "hw_metrics_mgmt_service", "values": {"0": "METRIC_NAME_UNDEFINED", "1": "METRIC_FAN_SPEED", "100": "METRIC_CPU_TEMP", "101": "METRIC_CPU_USAGE_PERCENTAGE", "200": "METRIC_TRANSCEIVER_TEMP", "201": "METRIC_TRANSCEIVER_VOLTAGE", "202": "METRIC_TRANSCEIVER_BIAS", "203": "METRIC_TRANSCEIVER_RX_POWER", "204": "METRIC_TRANSCEIVER_TX_POWER", "205": "METRIC_TRANSCEIVER_WAVELENGTH", "300": "METRIC_DISK_TEMP", "301": "METRIC_DISK_CAPACITY", "302": "METRIC_DISK_USAGE", "303": "METRIC_DISK_USAGE_PERCENTAGE", "304": "METRIC_DISK_READ_WRITE_PERCENTAGE", "305": "METRIC_DISK_FAULTY_CELLS_PERCENTAGE", "400": "METRIC_RAM_TEMP", "401": "METRIC_RAM_CAPACITY", "402": "METRIC_RAM_USAGE", "403": "METRIC_RAM_USAGE_PERCENTAGE", "500": "METRIC_POWER_MAX", "501": "METRIC_POWER_USAGE", "502": "METRIC_POWER_USAGE_PERCENTAGE", "600": "METRIC_INNER_SURROUNDING_TEMP"}}, {"name": "MetricConfig", "type": "message", "module": "hw_metrics_mgmt_service", "fields": [{"name": "metric_id", "is_choice": false, "repeated": false, "type": "MetricNames", "lookup": true}, {"name": "is_configured", "is_choice": false, "repeated": false, "type": "bool", "lookup": false}, {"name": "poll_interval", "is_choice": false, "repeated": false, "type": "uint32", "lookup": false}]}, {"name": "MetricsConfig", "type": "message", "module": "hw_metrics_mgmt_service", "fields": [{"name": "metrics", "is_choice": false, "repeated": true, "type": "MetricConfig", "lookup": true}]}, {"name": "Reason", "type": "enum", "module": "hw_metrics_mgmt_service", "values": {"0": "UNDEFINED_REASON", "1": "UNKNOWN_DEVICE", "2": "INTERNAL_ERROR", "3": "DEVICE_UNREACHABLE"}}, {"name": "ListMetricsResponse", "type": "message", "module": "hw_metrics_mgmt_service", "fields": [{"name": "status", "is_choice": false, "repeated": false, "type": "Status", "lookup": true}, {"name": "reason", "is_choice": false, "repeated": false, "type": "Reason", "lookup": true}, {"name": "metrics", "is_choice": false, "repeated": false, "type": "MetricsConfig", "lookup": true}, {"name": "reason_detail", "is_choice": false, "repeated": false, "type": "string", "lookup": false}]}, {"name": "MetricsConfigurationRequest", "type": "message", "module": "hw_metrics_mgmt_service", "fields": [{"name": "device_uuid", "is_choice": false, "repeated": false, "type": "Uuid", "lookup": true}, {"name": "operation", "is_choice": true, "cases": [{"name": "changes", "type": "MetricsConfig", "lookup": true}, {"name": "reset_to_default", "type": "bool", "lookup": false}]}]}, {"name": "Reason", "type": "enum", "module": "hw_metrics_mgmt_service", "values": {"0": "UNDEFINED_REASON", "1": "UNKNOWN_DEVICE", "2": "INTERNAL_ERROR", "3": "POLL_INTERVAL_UNSUPPORTED", "4": "INVALID_METRIC", "5": "DEVICE_UNREACHABLE"}}, {"name": "MetricsConfigurationResponse", "type": "message", "module": "hw_metrics_mgmt_service", "fields": [{"name": "status", "is_choice": false, "repeated": false, "type": "Status", "lookup": true}, {"name": "reason", "is_choice": false, "repeated": false, "type": "Reason", "lookup": true}, {"name": "reason_detail", "is_choice": false, "repeated": false, "type": "string", "lookup": false}]}, {"name": "MetricMetaData", "type": "message", "module": "hw_metrics_mgmt_service", "fields": [{"name": "device_uuid", "is_choice": false, "repeated": false, "type": "Uuid", "lookup": true}, {"name": "component_uuid", "is_choice": false, "repeated": false, "type": "Uuid", "lookup": true}, {"name": "component_name", "is_choice": false, "repeated": false, "type": "string", "lookup": false}]}, {"name": "Metric", "type": "message", "module": "hw_metrics_mgmt_service", "fields": [{"name": "metric_id", "is_choice": false, "repeated": false, "type": "MetricNames", "lookup": true}, {"name": "metric_metadata", "is_choice": false, "repeated": false, "type": "MetricMetaData", "lookup": true}, {"name": "value", "is_choice": false, "repeated": false, "type": "ComponentSensorData", "lookup": true}]}, {"name": "GetMetricRequest", "type": "message", "module": "hw_metrics_mgmt_service", "fields": [{"name": "meta_data", "is_choice": false, "repeated": false, "type": "MetricMetaData", "lookup": true}, {"name": "metric_id", "is_choice": false, "repeated": false, "type": "MetricNames", "lookup": true}]}, {"name": "Reason", "type": "enum", "module": "hw_metrics_mgmt_service", "values": {"0": "UNDEFINED_REASON", "1": "UNKNOWN_DEVICE", "2": "UNKNOWN_COMPONENT", "3": "INTERNAL_ERROR", "4": "INVALID_METRIC", "5": "DEVICE_UNREACHABLE"}}, {"name": "GetMetricResponse", "type": "message", "module": "hw_metrics_mgmt_service", "fields": [{"name": "status", "is_choice": false, "repeated": false, "type": "Status", "lookup": true}, {"name": "reason", "is_choice": false, "repeated": false, "type": "Reason", "lookup": true}, {"name": "metric", "is_choice": false, "repeated": false, "type": "Metric", "lookup": true}, {"name": "reason_detail", "is_choice": false, "repeated": false, "type": "string", "lookup": false}]}, {"name": "EventIds", "type": "enum", "module": "hw_events_mgmt_service", "values": {"0": "EVENT_NAME_UNDEFINED", "100": "EVENT_TRANSCEIVER_PLUG_OUT", "101": "EVENT_TRANSCEIVER_PLUG_IN", "102": "EVENT_TRANSCEIVER_VOLTAGE_ABOVE_THRESHOLD", "103": "EVENT_TRANSCEIVER_VOLTAGE_BELOW_THRESHOLD", "104": "EVENT_TRANSCEIVER_TEMPERATURE_ABOVE_THRESHOLD", "105": "EVENT_TRANSCEIVER_TEMPERATURE_BELOW_THRESHOLD", "106": "EVENT_TRANSCEIVER_CURRENT_ABOVE_THRESHOLD", "107": "EVENT_TRANSCEIVER_CURRENT_BELOW_THRESHOLD", "108": "EVENT_TRANSCEIVER_RX_POWER_ABOVE_THRESHOLD", "109": "EVENT_TRANSCEIVER_RX_POWER_BELOW_THRESHOLD", "110": "EVENT_TRANSCEIVER_TX_POWER_ABOVE_THRESHOLD", "111": "EVENT_TRANSCEIVER_TX_POWER_BELOW_THRESHOLD", "112": "EVENT_TRANSCEIVER_FAILURE", "113": "EVENT_TRANSCEIVER_VOLTAGE_ABOVE_THRESHOLD_RECOVERED", "114": "EVENT_TRANSCEIVER_VOLTAGE_BELOW_THRESHOLD_RECOVERED", "115": "EVENT_TRANSCEIVER_TEMPERATURE_ABOVE_THRESHOLD_RECOVERED", "116": "EVENT_TRANSCEIVER_TEMPERATURE_BELOW_THRESHOLD_RECOVERED", "117": "EVENT_TRANSCEIVER_CURRENT_ABOVE_THRESHOLD_RECOVERED", "118": "EVENT_TRANSCEIVER_CURRENT_BELOW_THRESHOLD_RECOVERED", "119": "EVENT_TRANSCEIVER_RX_POWER_ABOVE_THRESHOLD_RECOVERED", "120": "EVENT_TRANSCEIVER_RX_POWER_BELOW_THRESHOLD_RECOVERED", "121": "EVENT_TRANSCEIVER_TX_POWER_ABOVE_THRESHOLD_RECOVERED", "122": "EVENT_TRANSCEIVER_TX_POWER_BELOW_THRESHOLD_RECOVERED", "123": "EVENT_TRANSCEIVER_FAILURE_RECOVERED", "200": "EVENT_PSU_PLUG_OUT", "201": "EVENT_PSU_PLUG_IN", "202": "EVENT_PSU_FAILURE", "203": "EVENT_PSU_FAILURE_RECOVERED", "300": "EVENT_FAN_FAILURE", "301": "EVENT_FAN_PLUG_OUT", "302": "EVENT_FAN_PLUG_IN", "303": "EVENT_FAN_FAILURE_RECOVERED", "400": "EVENT_CPU_TEMPERATURE_ABOVE_CRITICAL", "401": "EVENT_CPU_TEMPERATURE_ABOVE_FATAL", "402": "EVENT_CPU_TEMPERATURE_ABOVE_CRITICAL_RECOVERED", "403": "EVENT_CPU_TEMPERATURE_ABOVE_FATAL_RECOVERED", "500": "EVENT_HW_DEVICE_RESET", "501": "EVENT_HW_DEVICE_TEMPERATURE_ABOVE_CRITICAL", "502": "EVENT_HW_DEVICE_TEMPERATURE_ABOVE_FATAL", "503": "EVENT_HW_DEVICE_TEMPERATURE_ABOVE_CRITICAL_RECOVERED", "504": "EVENT_HW_DEVICE_TEMPERATURE_ABOVE_FATAL_RECOVERED"}}, {"name": "ValueType", "type": "message", "module": "hw_events_mgmt_service", "fields": [{"name": "val", "is_choice": true, "cases": [{"name": "int_val", "type": "int64", "lookup": false}, {"name": "uint_val", "type": "uint64", "lookup": false}, {"name": "float_val", "type": "float", "lookup": false}]}]}, {"name": "WaterMarks", "type": "message", "module": "hw_events_mgmt_service", "fields": [{"name": "high", "is_choice": false, "repeated": false, "type": "ValueType", "lookup": true}, {"name": "low", "is_choice": false, "repeated": false, "type": "ValueType", "lookup": true}]}, {"name": "Thresholds", "type": "message", "module": "hw_events_mgmt_service", "fields": [{"name": "threshold", "is_choice": true, "cases": [{"name": "upper", "type": "WaterMarks", "lookup": true}, {"name": "lower", "type": "WaterMarks", "lookup": true}]}]}, {"name": "ThresholdInformation", "type": "message", "module": "hw_events_mgmt_service", "fields": [{"name": "observed_value", "is_choice": false, "repeated": false, "type": "ValueType", "lookup": true}, {"name": "thresholds", "is_choice": false, "repeated": false, "type": "Thresholds", "lookup": true}]}, {"name": "EventCfg", "type": "message", "module": "hw_events_mgmt_service", "fields": [{"name": "event_id", "is_choice": false, "repeated": false, "type": "EventIds", "lookup": true}, {"name": "is_configured", "is_choice": false, "repeated": false, "type": "bool", "lookup": false}, {"name": "thresholds", "is_choice": false, "repeated": false, "type": "Thresholds", "lookup": true}]}, {"name": "EventsCfg", "type": "message", "module": "hw_events_mgmt_service", "fields": [{"name": "items", "is_choice": false, "repeated": true, "type": "EventCfg", "lookup": true}]}, {"name": "Reason", "type": "enum", "module": "hw_events_mgmt_service", "values": {"0": "UNDEFINED_REASON", "1": "UNKNOWN_DEVICE", "2": "INTERNAL_ERROR", "3": "DEVICE_UNREACHABLE"}}, {"name": "ListEventsResponse", "type": "message", "module": "hw_events_mgmt_service", "fields": [{"name": "status", "is_choice": false, "repeated": false, "type": "Status", "lookup": true}, {"name": "reason", "is_choice": false, "repeated": false, "type": "Reason", "lookup": true}, {"name": "events", "is_choice": false, "repeated": false, "type": "EventsCfg", "lookup": true}, {"name": "reason_detail", "is_choice": false, "repeated": false, "type": "string", "lookup": false}]}, {"name": "EventsConfigurationRequest", "type": "message", "module": "hw_events_mgmt_service", "fields": [{"name": "device_uuid", "is_choice": false, "repeated": false, "type": "Uuid", "lookup": true}, {"name": "operation", "is_choice": true, "cases": [{"name": "changes", "type": "EventsCfg", "lookup": true}, {"name": "reset_to_default", "type": "bool", "lookup": false}]}]}, {"name": "Reason", "type": "enum", "module": "hw_events_mgmt_service", "values": {"0": "UNDEFINED_REASON", "1": "UNKNOWN_DEVICE", "2": "INTERNAL_ERROR", "3": "INVALID_CONFIG", "4": "DEVICE_UNREACHABLE"}}, {"name": "EventsConfigurationResponse", "type": "message", "module": "hw_events_mgmt_service", "fields": [{"name": "status", "is_choice": false, "repeated": false, "type": "Status", "lookup": true}, {"name": "reason", "is_choice": false, "repeated": false, "type": "Reason", "lookup": true}, {"name": "reason_detail", "is_choice": false, "repeated": false, "type": "string", "lookup": false}]}, {"name": "EventMetaData", "type": "message", "module": "hw_events_mgmt_service", "fields": [{"name": "device_uuid", "is_choice": false, "repeated": false, "type": "Uuid", "lookup": true}, {"name": "component_uuid", "is_choice": false, "repeated": false, "type": "Uuid", "lookup": true}, {"name": "component_name", "is_choice": false, "repeated": false, "type": "string", "lookup": false}]}, {"name": "Event", "type": "message", "module": "hw_events_mgmt_service", "fields": [{"name": "event_metadata", "is_choice": false, "repeated": false, "type": "EventMetaData", "lookup": true}, {"name": "event_id", "is_choice": false, "repeated": false, "type": "EventIds", "lookup": true}, {"name": "raised_ts", "is_choice": false, "repeated": false, "type": "google.protobuf.Timestamp", "lookup": true}, {"name": "threshold_info", "is_choice": false, "repeated": false, "type": "ThresholdInformation", "lookup": true}, {"name": "add_info", "is_choice": false, "repeated": false, "type": "string", "lookup": false}]}, {"name": "ImageVersion", "type": "message", "module": "sw_image", "fields": [{"name": "image_name", "is_choice": false, "repeated": false, "type": "string", "lookup": false}, {"name": "version", "is_choice": false, "repeated": false, "type": "string", "lookup": false}]}, {"name": "ImageInformation", "type": "message", "module": "sw_image", "fields": [{"name": "image", "is_choice": false, "repeated": false, "type": "ImageVersion", "lookup": true}, {"name": "image_install_script", "is_choice": false, "repeated": false, "type": "string", "lookup": false}, {"name": "image_url", "is_choice": false, "repeated": false, "type": "string", "lookup": false}, {"name": "sha256sum", "is_choice": false, "repeated": false, "type": "string", "lookup": false}]}, {"name": "ImageState", "type": "enum", "module": "sw_image", "values": {"0": "UNDEFINED_STATE", "1": "COPYING_IMAGE", "2": "INSTALLING_IMAGE", "3": "COMMITTING_IMAGE", "4": "REBOOTING_DEVICE", "5": "UPGRADE_COMPLETE", "6": "UPGRADE_FAILED", "7": "ACTIVATION_COMPLETE", "8": "ACTIVATION_FAILED"}}, {"name": "Reason", "type": "enum", "module": "sw_image", "values": {"0": "UNDEFINED_REASON", "1": "ERROR_IN_REQUEST", "2": "INTERNAL_ERROR", "3": "DEVICE_IN_WRONG_STATE", "4": "INVALID_IMAGE", "5": "WRONG_IMAGE_CHECKSUM", "6": "OPERATION_ALREADY_IN_PROGRESS", "7": "UNKNOWN_DEVICE", "8": "DEVICE_NOT_REACHABLE"}}, {"name": "ImageStatus", "type": "message", "module": "sw_image", "fields": [{"name": "status", "is_choice": false, "repeated": false, "type": "Status", "lookup": true}, {"name": "reason", "is_choice": false, "repeated": false, "type": "Reason", "lookup": true}, {"name": "state", "is_choice": false, "repeated": false, "type": "ImageState", "lookup": true}, {"name": "description", "is_choice": false, "repeated": false, "type": "string", "lookup": false}, {"name": "reason_detail", "is_choice": false, "repeated": false, "type": "string", "lookup": false}]}, {"name": "PhysicalInventoryRequest", "type": "message", "module": "hw_management_service", "fields": [{"name": "device_uuid", "is_choice": false, "repeated": false, "type": "Uuid", "lookup": true}]}, {"name": "Reason", "type": "enum", "module": "hw_management_service", "values": {"0": "UNDEFINED_REASON", "1": "UNKNOWN_DEVICE", "2": "INTERNAL_ERROR", "3": "DEVICE_UNREACHABLE"}}, {"name": "PhysicalInventoryResponse", "type": "message", "module": "hw_management_service", "fields": [{"name": "status", "is_choice": false, "repeated": false, "type": "Status", "lookup": true}, {"name": "reason", "is_choice": false, "repeated": false, "type": "Reason", "lookup": true}, {"name": "inventory", "is_choice": false, "repeated": false, "type": "Hardware", "lookup": true}, {"name": "reason_detail", "is_choice": false, "repeated": false, "type": "string", "lookup": false}]}, {"name": "HWComponentInfoGetRequest", "type": "message", "module": "hw_management_service", "fields": [{"name": "device_uuid", "is_choice": false, "repeated": false, "type": "Uuid", "lookup": true}, {"name": "component_uuid", "is_choice": false, "repeated": false, "type": "Uuid", "lookup": true}, {"name": "component_name", "is_choice": false, "repeated": false, "type": "string", "lookup": false}]}, {"name": "Reason", "type": "enum", "module": "hw_management_service", "values": {"0": "UNDEFINED_REASON", "1": "UNKNOWN_DEVICE", "2": "UNKNOWN_COMPONENT", "3": "INTERNAL_ERROR", "4": "DEVICE_UNREACHABLE"}}, {"name": "HWComponentInfoGetResponse", "type": "message", "module": "hw_management_service", "fields": [{"name": "status", "is_choice": false, "repeated": false, "type": "Status", "lookup": true}, {"name": "reason", "is_choice": false, "repeated": false, "type": "Reason", "lookup": true}, {"name": "component", "is_choice": false, "repeated": false, "type": "Component", "lookup": true}, {"name": "reason_detail", "is_choice": false, "repeated": false, "type": "string", "lookup": false}]}, {"name": "HWComponentInfoSetRequest", "type": "message", "module": "hw_management_service", "fields": [{"name": "device_uuid", "is_choice": false, "repeated": false, "type": "Uuid", "lookup": true}, {"name": "component_uuid", "is_choice": false, "repeated": false, "type": "Uuid", "lookup": true}, {"name": "component_name", "is_choice": false, "repeated": false, "type": "string", "lookup": false}, {"name": "changes", "is_choice": false, "repeated": false, "type": "ModifiableComponent", "lookup": true}]}, {"name": "Reason", "type": "enum", "module": "hw_management_service", "values": {"0": "UNDEFINED_REASON", "1": "UNKNOWN_DEVICE", "2": "UNKNOWN_COMPONENT", "3": "INVALID_PARAMS", "4": "INTERNAL_ERROR", "5": "DEVICE_UNREACHABLE"}}, {"name": "HWComponentInfoSetResponse", "type": "message", "module": "hw_management_service", "fields": [{"name": "status", "is_choice": false, "repeated": false, "type": "Status", "lookup": true}, {"name": "reason", "is_choice": false, "repeated": false, "type": "Reason", "lookup": true}, {"name": "reason_detail", "is_choice": false, "repeated": false, "type": "string", "lookup": false}]}, {"name": "Reason", "type": "enum", "module": "hw_management_service", "values": {"0": "UNDEFINED_REASON", "1": "DEVICE_ALREADY_MANAGED", "2": "OPERATION_ALREADY_IN_PROGRESS", "3": "INVALID_PARAMS", "4": "INTERNAL_ERROR"}}, {"name": "StartManagingDeviceResponse", "type": "message", "module": "hw_management_service", "fields": [{"name": "status", "is_choice": false, "repeated": false, "type": "Status", "lookup": true}, {"name": "reason", "is_choice": false, "repeated": false, "type": "Reason", "lookup": true}, {"name": "device_uuid", "is_choice": false, "repeated": false, "type": "Uuid", "lookup": true}, {"name": "reason_detail", "is_choice": false, "repeated": false, "type": "string", "lookup": false}]}, {"name": "StopManagingDeviceRequest", "type": "message", "module": "hw_management_service", "fields": [{"name": "name", "is_choice": false, "repeated": false, "type": "string", "lookup": false}]}, {"name": "Reason", "type": "enum", "module": "hw_management_service", "values": {"0": "UNDEFINED_REASON", "1": "UNKNOWN_DEVICE"}}, {"name": "StopManagingDeviceResponse", "type": "message", "module": "hw_management_service", "fields": [{"name": "status", "is_choice": false, "repeated": false, "type": "Status", "lookup": true}, {"name": "reason", "is_choice": false, "repeated": false, "type": "Reason", "lookup": true}, {"name": "reason_detail", "is_choice": false, "repeated": false, "type": "string", "lookup": false}]}, {"name": "ManagedDevicesResponse", "type": "message", "module": "hw_management_service", "fields": [{"name": "devices", "is_choice": false, "repeated": true, "type": "ModifiableComponent", "lookup": true}]}, {"name": "SetLoggingEndpointRequest", "type": "message", "module": "hw_management_service", "fields": [{"name": "device_uuid", "is_choice": false, "repeated": false, "type": "Uuid", "lookup": true}, {"name": "logging_endpoint", "is_choice": false, "repeated": false, "type": "string", "lookup": false}, {"name": "logging_protocol", "is_choice": false, "repeated": false, "type": "string", "lookup": false}]}, {"name": "Reason", "type": "enum", "module": "hw_management_service", "values": {"0": "UNDEFINED_REASON", "1": "UNKNOWN_DEVICE", "2": "INTERNAL_ERROR", "3": "LOGGING_ENDPOINT_ERROR", "4": "LOGGING_ENDPOINT_PROTOCOL_ERROR", "5": "MSGBUS_ENDPOINT_ERROR", "6": "DEVICE_UNREACHABLE"}}, {"name": "SetRemoteEndpointResponse", "type": "message", "module": "hw_management_service", "fields": [{"name": "status", "is_choice": false, "repeated": false, "type": "Status", "lookup": true}, {"name": "reason", "is_choice": false, "repeated": false, "type": "Reason", "lookup": true}, {"name": "reason_detail", "is_choice": false, "repeated": false, "type": "string", "lookup": false}]}, {"name": "Reason", "type": "enum", "module": "hw_management_service", "values": {"0": "UNDEFINED_REASON", "1": "UNKNOWN_DEVICE", "2": "INTERNAL_ERROR", "3": "DEVICE_UNREACHABLE"}}, {"name": "GetLoggingEndpointResponse", "type": "message", "module": "hw_management_service", "fields": [{"name": "status", "is_choice": false, "repeated": false, "type": "Status", "lookup": true}, {"name": "reason", "is_choice": false, "repeated": false, "type": "Reason", "lookup": true}, {"name": "logging_endpoint", "is_choice": false, "repeated": false, "type": "string", "lookup": false}, {"name": "logging_protocol", "is_choice": false, "repeated": false, "type": "string", "lookup": false}, {"name": "reason_detail", "is_choice": false, "repeated": false, "type": "string", "lookup": false}]}, {"name": "SetMsgBusEndpointRequest", "type": "message", "module": "hw_management_service", "fields": [{"name": "msgbus_endpoint", "is_choice": false, "repeated": false, "type": "string", "lookup": false}]}, {"name": "Reason", "type": "enum", "module": "hw_management_service", "values": {"0": "UNDEFINED_REASON", "1": "INTERNAL_ERROR", "2": "DEVICE_UNREACHABLE"}}, {"name": "GetMsgBusEndpointResponse", "type": "message", "module": "hw_management_service", "fields": [{"name": "status", "is_choice": false, "repeated": false, "type": "Status", "lookup": true}, {"name": "reason", "is_choice": false, "repeated": false, "type": "Reason", "lookup": true}, {"name": "msgbus_endpoint", "is_choice": false, "repeated": false, "type": "string", "lookup": false}, {"name": "reason_detail", "is_choice": false, "repeated": false, "type": "string", "lookup": false}]}, {"name": "EntitiesLogLevel", "type": "message", "module": "hw_management_service", "fields": [{"name": "logLevel", "is_choice": false, "repeated": false, "type": "LogLevel", "lookup": true}, {"name": "entities", "is_choice": false, "repeated": true, "type": "string", "lookup": false}]}, {"name": "SetLogLevelRequest", "type": "message", "module": "hw_management_service", "fields": [{"name": "device_uuid", "is_choice": false, "repeated": false, "type": "Uuid", "lookup": true}, {"name": "loglevels", "is_choice": false, "repeated": true, "type": "EntitiesLogLevel", "lookup": true}]}, {"name": "Reason", "type": "enum", "module": "hw_management_service", "values": {"0": "UNDEFINED_REASON", "1": "UNKNOWN_DEVICE", "2": "INTERNAL_ERROR", "3": "UNKNOWN_LOG_ENTITY", "4": "DEVICE_UNREACHABLE"}}, {"name": "SetLogLevelResponse", "type": "message", "module": "hw_management_service", "fields": [{"name": "device_uuid", "is_choice": false, "repeated": false, "type": "Uuid", "lookup": true}, {"name": "status", "is_choice": false, "repeated": false, "type": "Status", "lookup": true}, {"name": "reason", "is_choice": false, "repeated": false, "type": "Reason", "lookup": true}, {"name": "reason_detail", "is_choice": false, "repeated": false, "type": "string", "lookup": false}]}, {"name": "GetLogLevelRequest", "type": "message", "module": "hw_management_service", "fields": [{"name": "device_uuid", "is_choice": false, "repeated": false, "type": "Uuid", "lookup": true}, {"name": "entities", "is_choice": false, "repeated": true, "type": "string", "lookup": false}]}, {"name": "Reason", "type": "enum", "module": "hw_management_service", "values": {"0": "UNDEFINED_REASON", "1": "UNKNOWN_DEVICE", "2": "INTERNAL_ERROR", "3": "UNKNOWN_LOG_ENTITY", "4": "DEVICE_UNREACHABLE"}}, {"name": "GetLogLevelResponse", "type": "message", "module": "hw_management_service", "fields": [{"name": "device_uuid", "is_choice": false, "repeated": false, "type": "Uuid", "lookup": true}, {"name": "logLevels", "is_choice": false, "repeated": true, "type": "EntitiesLogLevel", "lookup": true}, {"name": "status", "is_choice": false, "repeated": false, "type": "Status", "lookup": true}, {"name": "reason", "is_choice": false, "repeated": false, "type": "Reason", "lookup": true}, {"name": "reason_detail", "is_choice": false, "repeated": false, "type": "string", "lookup": false}]}, {"name": "GetLoggableEntitiesRequest", "type": "message", "module": "hw_management_service", "fields": [{"name": "device_uuid", "is_choice": false, "repeated": false, "type": "Uuid", "lookup": true}]}, {"name": "SoftwareVersionInformation", "type": "message", "module": "sw_management_service", "fields": [{"name": "active_versions", "is_choice": false, "repeated": true, "type": "ImageVersion", "lookup": true}, {"name": "standby_versions", "is_choice": false, "repeated": true, "type": "ImageVersion", "lookup": true}]}, {"name": "Reason", "type": "enum", "module": "sw_management_service", "values": {"0": "UNDEFINED_REASON", "1": "UNKNOWN_DEVICE", "2": "INTERNAL_ERROR", "3": "DEVICE_UNREACHABLE"}}, {"name": "GetSoftwareVersionInformationResponse", "type": "message", "module": "sw_management_service", "fields": [{"name": "status", "is_choice": false, "repeated": false, "type": "Status", "lookup": true}, {"name": "reason", "is_choice": false, "repeated": false, "type": "Reason", "lookup": true}, {"name": "info", "is_choice": false, "repeated": false, "type": "SoftwareVersionInformation", "lookup": true}, {"name": "reason_detail", "is_choice": false, "repeated": false, "type": "string", "lookup": false}]}, {"name": "DownloadImageRequest", "type": "message", "module": "sw_management_service", "fields": [{"name": "device_uuid", "is_choice": false, "repeated": false, "type": "Uuid", "lookup": true}, {"name": "image_info", "is_choice": false, "repeated": false, "type": "ImageInformation", "lookup": true}]}, {"name": "ConfigRequest", "type": "message", "module": "sw_management_service", "fields": [{"name": "device_uuid", "is_choice": false, "repeated": false, "type": "Uuid", "lookup": true}, {"name": "config_url", "is_choice": false, "repeated": false, "type": "string", "lookup": false}]}, {"name": "Reason", "type": "enum", "module": "sw_management_service", "values": {"0": "UNDEFINED_REASON", "1": "UNKNOWN_DEVICE", "2": "INTERNAL_ERROR", "3": "ERROR_FETCHING_CONFIG", "4": "INVALID_CONFIG", "5": "OPERATION_ALREADY_IN_PROGRESS", "6": "DEVICE_UNREACHABLE"}}, {"name": "ConfigResponse", "type": "message", "module": "sw_management_service", "fields": [{"name": "status", "is_choice": false, "repeated": false, "type": "Status", "lookup": true}, {"name": "reason", "is_choice": false, "repeated": false, "type": "Reason", "lookup": true}, {"name": "reason_detail", "is_choice": false, "repeated": false, "type": "string", "lookup": false}]}, {"name": "StartupConfigInfoRequest", "type": "message", "module": "sw_management_service", "fields": [{"name": "device_uuid", "is_choice": false, "repeated": false, "type": "Uuid", "lookup": true}]}, {"name": "Reason", "type": "enum", "module": "sw_management_service", "values": {"0": "UNDEFINED_REASON", "1": "UNKNOWN_DEVICE", "2": "INTERNAL_ERROR", "3": "DEVICE_UNREACHABLE"}}, {"name": "StartupConfigInfoResponse", "type": "message", "module": "sw_management_service", "fields": [{"name": "status", "is_choice": false, "repeated": false, "type": "Status", "lookup": true}, {"name": "reason", "is_choice": false, "repeated": false, "type": "Reason", "lookup": true}, {"name": "config_url", "is_choice": false, "repeated": false, "type": "string", "lookup": false}, {"name": "version", "is_choice": false, "repeated": false, "type": "string", "lookup": false}, {"name": "reason_detail", "is_choice": false, "repeated": false, "type": "string", "lookup": false}]}], "services": [{"name": "NativeMetricsManagementService", "module": "hw_metrics_mgmt_service", "rpcs": [{"name": "ListMetrics", "request": {"is_stream": false, "type": "HardwareID", "lookup": true}, "response": {"is_stream": false, "type": "ListMetricsResponse", "lookup": true}}, {"name": "UpdateMetricsConfiguration", "request": {"is_stream": false, "type": "MetricsConfigurationRequest", "lookup": true}, "response": {"is_stream": false, "type": "MetricsConfigurationResponse", "lookup": true}}, {"name": "GetMetric", "request": {"is_stream": false, "type": "GetMetricRequest", "lookup": true}, "response": {"is_stream": false, "type": "GetMetricResponse", "lookup": true}}]}, {"name": "NativeEventsManagementService", "module": "hw_events_mgmt_service", "rpcs": [{"name": "ListEvents", "request": {"is_stream": false, "type": "HardwareID", "lookup": true}, "response": {"is_stream": false, "type": "ListEventsResponse", "lookup": true}}, {"name": "UpdateEventsConfiguration", "request": {"is_stream": false, "type": "EventsConfigurationRequest", "lookup": true}, "response": {"is_stream": false, "type": "EventsConfigurationResponse", "lookup": true}}]}, {"name": "NativeHWManagementService", "module": "hw_management_service", "rpcs": [{"name": "StartManagingDevice", "request": {"is_stream": false, "type": "ModifiableComponent", "lookup": true}, "response": {"is_stream": true, "type": "StartManagingDeviceResponse", "lookup": true}}, {"name": "StopManagingDevice", "request": {"is_stream": false, "type": "StopManagingDeviceRequest", "lookup": true}, "response": {"is_stream": false, "type": "StopManagingDeviceResponse", "lookup": true}}, {"name": "GetManagedDevices", "request": {"is_stream": false, "type": "google.protobuf.Empty", "lookup": false}, "response": {"is_stream": false, "type": "ManagedDevicesResponse", "lookup": true}}, {"name": "GetPhysicalInventory", "request": {"is_stream": false, "type": "PhysicalInventoryRequest", "lookup": true}, "response": {"is_stream": true, "type": "PhysicalInventoryResponse", "lookup": true}}, {"name": "GetHWComponentInfo", "request": {"is_stream": false, "type": "HWComponentInfoGetRequest", "lookup": true}, "response": {"is_stream": true, "type": "HWComponentInfoGetResponse", "lookup": true}}, {"name": "SetHWComponentInfo", "request": {"is_stream": false, "type": "HWComponentInfoSetRequest", "lookup": true}, "response": {"is_stream": false, "type": "HWComponentInfoSetResponse", "lookup": true}}, {"name": "SetLoggingEndpoint", "request": {"is_stream": false, "type": "SetLoggingEndpointRequest", "lookup": true}, "response": {"is_stream": false, "type": "SetRemoteEndpointResponse", "lookup": true}}, {"name": "GetLoggingEndpoint", "request": {"is_stream": false, "type": "HardwareID", "lookup": true}, "response": {"is_stream": false, "type": "GetLoggingEndpointResponse", "lookup": true}}, {"name": "SetMsgBusEndpoint", "request": {"is_stream": false, "type": "SetMsgBusEndpointRequest", "lookup": true}, "response": {"is_stream": false, "type": "SetRemoteEndpointResponse", "lookup": true}}, {"name": "GetMsgBusEndpoint", "request": {"is_stream": false, "type": "google.protobuf.Empty", "lookup": false}, "response": {"is_stream": false, "type": "GetMsgBusEndpointResponse", "lookup": true}}, {"name": "GetLoggableEntities", "request": {"is_stream": false, "type": "GetLoggableEntitiesRequest", "lookup": true}, "response": {"is_stream": false, "type": "GetLogLevelResponse", "lookup": true}}, {"name": "SetLogLevel", "request": {"is_stream": false, "type": "SetLogLevelRequest", "lookup": true}, "response": {"is_stream": false, "type": "SetLogLevelResponse", "lookup": true}}, {"name": "GetLogLevel", "request": {"is_stream": false, "type": "GetLogLevelRequest", "lookup": true}, "response": {"is_stream": false, "type": "GetLogLevelResponse", "lookup": true}}]}, {"name": "NativeSoftwareManagementService", "module": "sw_management_service", "rpcs": [{"name": "GetSoftwareVersion", "request": {"is_stream": false, "type": "HardwareID", "lookup": true}, "response": {"is_stream": false, "type": "GetSoftwareVersionInformationResponse", "lookup": true}}, {"name": "DownloadImage", "request": {"is_stream": false, "type": "DownloadImageRequest", "lookup": true}, "response": {"is_stream": true, "type": "ImageStatus", "lookup": true}}, {"name": "ActivateImage", "request": {"is_stream": false, "type": "HardwareID", "lookup": true}, "response": {"is_stream": true, "type": "ImageStatus", "lookup": true}}, {"name": "RevertToStandbyImage", "request": {"is_stream": false, "type": "HardwareID", "lookup": true}, "response": {"is_stream": true, "type": "ImageStatus", "lookup": true}}, {"name": "UpdateStartupConfiguration", "request": {"is_stream": false, "type": "ConfigRequest", "lookup": true}, "response": {"is_stream": true, "type": "ConfigResponse", "lookup": true}}, {"name": "GetStartupConfigurationInfo", "request": {"is_stream": false, "type": "StartupConfigInfoRequest", "lookup": true}, "response": {"is_stream": false, "type": "StartupConfigInfoResponse", "lookup": true}}]}]}
\ No newline at end of file
diff --git a/grpc_robot/services/dmi/dmi_0_12_0/__init__.py b/grpc_robot/services/dmi/dmi_0_12_0/__init__.py
new file mode 100644
index 0000000..64c6f44
--- /dev/null
+++ b/grpc_robot/services/dmi/dmi_0_12_0/__init__.py
@@ -0,0 +1,14 @@
+# Copyright 2020-present Open Networking Foundation
+# Original copyright 2020-present ADTRAN, Inc.
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+from ..dmi_0_10_2 import *
diff --git a/grpc_robot/services/dmi/dmi_0_12_0/dmi.json b/grpc_robot/services/dmi/dmi_0_12_0/dmi.json
new file mode 100644
index 0000000..3f5918c
--- /dev/null
+++ b/grpc_robot/services/dmi/dmi_0_12_0/dmi.json
@@ -0,0 +1 @@
+{"modules": [{"name": "commons", "imports": []}, {"name": "hw", "imports": ["timestamp"]}, {"name": "hw_metrics_mgmt_service", "imports": ["commons", "hw"]}, {"name": "hw_events_mgmt_service", "imports": ["commons", "hw", "timestamp"]}, {"name": "sw_image", "imports": ["commons"]}, {"name": "hw_management_service", "imports": ["commons", "hw", "empty"]}, {"name": "sw_management_service", "imports": ["commons", "hw", "sw_image"]}], "data_types": [{"name": "Status", "type": "enum", "module": "commons", "values": {"0": "UNDEFINED_STATUS", "1": "OK_STATUS", "2": "ERROR_STATUS"}}, {"name": "LogLevel", "type": "enum", "module": "commons", "values": {"0": "TRACE", "1": "DEBUG", "2": "INFO", "3": "WARN", "4": "ERROR"}}, {"name": "Uuid", "type": "message", "module": "hw", "fields": [{"name": "uuid", "is_choice": false, "repeated": false, "type": "string", "lookup": false}]}, {"name": "HardwareID", "type": "message", "module": "hw", "fields": [{"name": "uuid", "is_choice": false, "repeated": false, "type": "Uuid", "lookup": true}]}, {"name": "Uri", "type": "message", "module": "hw", "fields": [{"name": "uri", "is_choice": false, "repeated": false, "type": "string", "lookup": false}]}, {"name": "ComponentType", "type": "enum", "module": "hw", "values": {"0": "COMPONENT_TYPE_UNDEFINED", "1": "COMPONENT_TYPE_UNKNOWN", "2": "COMPONENT_TYPE_CHASSIS", "3": "COMPONENT_TYPE_BACKPLANE", "4": "COMPONENT_TYPE_CONTAINER", "5": "COMPONENT_TYPE_POWER_SUPPLY", "6": "COMPONENT_TYPE_FAN", "7": "COMPONENT_TYPE_SENSOR", "8": "COMPONENT_TYPE_MODULE", "9": "COMPONENT_TYPE_PORT", "10": "COMPONENT_TYPE_CPU", "11": "COMPONENT_TYPE_BATTERY", "12": "COMPONENT_TYPE_STORAGE", "13": "COMPONENT_TYPE_MEMORY", "14": "COMPONENT_TYPE_TRANSCEIVER"}}, {"name": "ComponentAdminState", "type": "enum", "module": "hw", "values": {"0": "COMP_ADMIN_STATE_UNDEFINED", "1": "COMP_ADMIN_STATE_UNKNOWN", "2": "COMP_ADMIN_STATE_LOCKED", "3": "COMP_ADMIN_STATE_SHUTTING_DOWN", "4": "COMP_ADMIN_STATE_UNLOCKED"}}, {"name": "ComponentOperState", "type": "enum", "module": "hw", "values": {"0": "COMP_OPER_STATE_UNDEFINED", "1": "COMP_OPER_STATE_UNKNOWN", "2": "COMP_OPER_STATE_DISABLED", "3": "COMP_OPER_STATE_ENABLED", "4": "COMP_OPER_STATE_TESTING"}}, {"name": "ComponentUsageState", "type": "enum", "module": "hw", "values": {"0": "COMP_USAGE_STATE_UNDEFINED", "1": "COMP_USAGE_STATE_UNKNOWN", "2": "COMP_USAGE_STATE_IDLE", "3": "COMP_USAGE_STATE_ACTIVE", "4": "COMP_USAGE_STATE_BUSY"}}, {"name": "ComponentAlarmState", "type": "enum", "module": "hw", "values": {"0": "COMP_ALARM_STATE_UNDEFINED", "1": "COMP_ALARM_STATE_UNKNOWN", "2": "COMP_ALARM_STATE_UNDER_REPAIR", "3": "COMP_ALARM_STATE_CRITICAL", "4": "COMP_ALARM_STATE_MAJOR", "5": "COMP_ALARM_STATE_MINOR", "6": "COMP_ALARM_STATE_WARNING", "7": "COMP_ALARM_STATE_INDETERMINATE"}}, {"name": "ComponentStandbyState", "type": "enum", "module": "hw", "values": {"0": "COMP_STANDBY_STATE_UNDEFINED", "1": "COMP_STANDBY_STATE_UNKNOWN", "2": "COMP_STANDBY_STATE_HOT", "3": "COMP_STANDBY_STATE_COLD", "4": "COMP_STANDBY_STATE_PROVIDING_SERVICE"}}, {"name": "ComponentState", "type": "message", "module": "hw", "fields": [{"name": "state_last_changed", "is_choice": false, "repeated": false, "type": "google.protobuf.Timestamp", "lookup": true}, {"name": "admin_state", "is_choice": false, "repeated": false, "type": "ComponentAdminState", "lookup": true}, {"name": "oper_state", "is_choice": false, "repeated": false, "type": "ComponentOperState", "lookup": true}, {"name": "usage_state", "is_choice": false, "repeated": false, "type": "ComponentUsageState", "lookup": true}, {"name": "alarm_state", "is_choice": false, "repeated": false, "type": "ComponentAlarmState", "lookup": true}, {"name": "standby_state", "is_choice": false, "repeated": false, "type": "ComponentStandbyState", "lookup": true}]}, {"name": "DataValueType", "type": "enum", "module": "hw", "values": {"0": "VALUE_TYPE_UNDEFINED", "1": "VALUE_TYPE_OTHER", "2": "VALUE_TYPE_UNKNOWN", "3": "VALUE_TYPE_VOLTS_AC", "4": "VALUE_TYPE_VOLTS_DC", "5": "VALUE_TYPE_AMPERES", "6": "VALUE_TYPE_WATTS", "7": "VALUE_TYPE_HERTZ", "8": "VALUE_TYPE_CELSIUS", "9": "VALUE_TYPE_PERCENT_RH", "10": "VALUE_TYPE_RPM", "11": "VALUE_TYPE_CMM", "12": "VALUE_TYPE_TRUTH_VALUE", "13": "VALUE_TYPE_PERCENT", "14": "VALUE_TYPE_METERS", "15": "VALUE_TYPE_BYTES"}}, {"name": "ValueScale", "type": "enum", "module": "hw", "values": {"0": "VALUE_SCALE_UNDEFINED", "1": "VALUE_SCALE_YOCTO", "2": "VALUE_SCALE_ZEPTO", "3": "VALUE_SCALE_ATTO", "4": "VALUE_SCALE_FEMTO", "5": "VALUE_SCALE_PICO", "6": "VALUE_SCALE_NANO", "7": "VALUE_SCALE_MICRO", "8": "VALUE_SCALE_MILLI", "9": "VALUE_SCALE_UNITS", "10": "VALUE_SCALE_KILO", "11": "VALUE_SCALE_MEGA", "12": "VALUE_SCALE_GIGA", "13": "VALUE_SCALE_TERA", "14": "VALUE_SCALE_PETA", "15": "VALUE_SCALE_EXA", "16": "VALUE_SCALE_ZETTA", "17": "VALUE_SCALE_YOTTA"}}, {"name": "SensorStatus", "type": "enum", "module": "hw", "values": {"0": "SENSOR_STATUS_UNDEFINED", "1": "SENSOR_STATUS_OK", "2": "SENSOR_STATUS_UNAVAILABLE", "3": "SENSOR_STATUS_NONOPERATIONAL"}}, {"name": "ComponentSensorData", "type": "message", "module": "hw", "fields": [{"name": "value", "is_choice": false, "repeated": false, "type": "int32", "lookup": false}, {"name": "type", "is_choice": false, "repeated": false, "type": "DataValueType", "lookup": true}, {"name": "scale", "is_choice": false, "repeated": false, "type": "ValueScale", "lookup": true}, {"name": "precision", "is_choice": false, "repeated": false, "type": "int32", "lookup": false}, {"name": "status", "is_choice": false, "repeated": false, "type": "SensorStatus", "lookup": true}, {"name": "units_display", "is_choice": false, "repeated": false, "type": "string", "lookup": false}, {"name": "timestamp", "is_choice": false, "repeated": false, "type": "google.protobuf.Timestamp", "lookup": true}, {"name": "value_update_rate", "is_choice": false, "repeated": false, "type": "uint32", "lookup": false}, {"name": "data_type", "is_choice": false, "repeated": false, "type": "string", "lookup": false}]}, {"name": "ConnectorType", "type": "enum", "module": "hw", "values": {"0": "CONNECTOR_TYPE_UNDEFINED", "1": "RJ45", "2": "FIBER_LC", "3": "FIBER_SC_PC", "4": "FIBER_MPO", "5": "RS232"}}, {"name": "Speed", "type": "enum", "module": "hw", "values": {"0": "SPEED_UNDEFINED", "1": "DYNAMIC", "2": "GIGABIT_1", "3": "GIGABIT_10", "4": "GIGABIT_25", "5": "GIGABIT_40", "6": "GIGABIT_100", "7": "GIGABIT_400", "8": "MEGABIT_2500", "9": "MEGABIT_1250"}}, {"name": "Protocol", "type": "enum", "module": "hw", "values": {"0": "PROTOCOL_UNDEFINED", "1": "ETHERNET", "2": "GPON", "3": "XGPON", "4": "XGSPON", "5": "GFAST", "6": "SERIAL", "7": "EPON", "8": "BITS"}}, {"name": "PortComponentAttributes", "type": "message", "module": "hw", "fields": [{"name": "connector_type", "is_choice": false, "repeated": false, "type": "ConnectorType", "lookup": true}, {"name": "speed", "is_choice": false, "repeated": false, "type": "Speed", "lookup": true}, {"name": "protocol", "is_choice": false, "repeated": false, "type": "Protocol", "lookup": true}, {"name": "physical_label", "is_choice": false, "repeated": false, "type": "string", "lookup": false}]}, {"name": "ContainerComponentAttributes", "type": "message", "module": "hw", "fields": [{"name": "physical_label", "is_choice": false, "repeated": false, "type": "string", "lookup": false}]}, {"name": "SupportedVoltage", "type": "enum", "module": "hw", "values": {"0": "SUPPORTED_VOLTAGE_UNDEFINED", "1": "V48", "2": "V230", "3": "V115"}}, {"name": "PsuComponentAttributes", "type": "message", "module": "hw", "fields": [{"name": "supported_voltage", "is_choice": false, "repeated": false, "type": "SupportedVoltage", "lookup": true}]}, {"name": "FormFactor", "type": "enum", "module": "hw", "values": {"0": "FORM_FACTOR_UNKNOWN", "1": "QSFP", "2": "QSFP_PLUS", "3": "QSFP28", "4": "SFP", "5": "SFP_PLUS", "6": "XFP", "7": "CFP4", "8": "CFP2", "9": "CPAK", "10": "X2", "11": "OTHER", "12": "CFP", "13": "CFP2_ACO", "14": "CFP2_DCO"}}, {"name": "Type", "type": "enum", "module": "hw", "values": {"0": "TYPE_UNKNOWN", "1": "ETHERNET", "2": "GPON", "3": "XGPON", "4": "XGSPON", "5": "CPON", "6": "NG_PON2", "7": "EPON"}}, {"name": "TransceiverComponentsAttributes", "type": "message", "module": "hw", "fields": [{"name": "form_factor", "is_choice": false, "repeated": false, "type": "FormFactor", "lookup": true}, {"name": "trans_type", "is_choice": false, "repeated": false, "type": "Type", "lookup": true}, {"name": "max_distance", "is_choice": false, "repeated": false, "type": "uint32", "lookup": false}, {"name": "max_distance_scale", "is_choice": false, "repeated": false, "type": "ValueScale", "lookup": true}, {"name": "rx_wavelength", "is_choice": false, "repeated": true, "type": "uint32", "lookup": false}, {"name": "tx_wavelength", "is_choice": false, "repeated": true, "type": "uint32", "lookup": false}, {"name": "wavelength_scale", "is_choice": false, "repeated": false, "type": "ValueScale", "lookup": true}]}, {"name": "Component", "type": "message", "module": "hw", "fields": [{"name": "name", "is_choice": false, "repeated": false, "type": "string", "lookup": false}, {"name": "class", "is_choice": false, "repeated": false, "type": "ComponentType", "lookup": true}, {"name": "description", "is_choice": false, "repeated": false, "type": "string", "lookup": false}, {"name": "parent", "is_choice": false, "repeated": false, "type": "string", "lookup": false}, {"name": "parent_rel_pos", "is_choice": false, "repeated": false, "type": "int32", "lookup": false}, {"name": "children", "is_choice": false, "repeated": true, "type": "Component", "lookup": true}, {"name": "hardware_rev", "is_choice": false, "repeated": false, "type": "string", "lookup": false}, {"name": "firmware_rev", "is_choice": false, "repeated": false, "type": "string", "lookup": false}, {"name": "software_rev", "is_choice": false, "repeated": false, "type": "string", "lookup": false}, {"name": "serial_num", "is_choice": false, "repeated": false, "type": "string", "lookup": false}, {"name": "mfg_name", "is_choice": false, "repeated": false, "type": "string", "lookup": false}, {"name": "model_name", "is_choice": false, "repeated": false, "type": "string", "lookup": false}, {"name": "alias", "is_choice": false, "repeated": false, "type": "string", "lookup": false}, {"name": "asset_id", "is_choice": false, "repeated": false, "type": "string", "lookup": false}, {"name": "is_fru", "is_choice": false, "repeated": false, "type": "bool", "lookup": false}, {"name": "mfg_date", "is_choice": false, "repeated": false, "type": "google.protobuf.Timestamp", "lookup": true}, {"name": "uri", "is_choice": false, "repeated": false, "type": "Uri", "lookup": true}, {"name": "uuid", "is_choice": false, "repeated": false, "type": "Uuid", "lookup": true}, {"name": "state", "is_choice": false, "repeated": false, "type": "ComponentState", "lookup": true}, {"name": "sensor_data", "is_choice": false, "repeated": true, "type": "ComponentSensorData", "lookup": true}, {"name": "specific", "is_choice": true, "cases": [{"name": "port_attr", "type": "PortComponentAttributes", "lookup": true}, {"name": "container_attr", "type": "ContainerComponentAttributes", "lookup": true}, {"name": "psu_attr", "type": "PsuComponentAttributes", "lookup": true}, {"name": "transceiver_attr", "type": "TransceiverComponentsAttributes", "lookup": true}]}]}, {"name": "Hardware", "type": "message", "module": "hw", "fields": [{"name": "last_change", "is_choice": false, "repeated": false, "type": "google.protobuf.Timestamp", "lookup": true}, {"name": "root", "is_choice": false, "repeated": false, "type": "Component", "lookup": true}, {"name": "last_booted", "is_choice": false, "repeated": false, "type": "google.protobuf.Timestamp", "lookup": true}]}, {"name": "ModifiableComponent", "type": "message", "module": "hw", "fields": [{"name": "name", "is_choice": false, "repeated": false, "type": "string", "lookup": false}, {"name": "class", "is_choice": false, "repeated": false, "type": "ComponentType", "lookup": true}, {"name": "parent", "is_choice": false, "repeated": false, "type": "Component", "lookup": true}, {"name": "parent_rel_pos", "is_choice": false, "repeated": false, "type": "int32", "lookup": false}, {"name": "alias", "is_choice": false, "repeated": false, "type": "string", "lookup": false}, {"name": "asset_id", "is_choice": false, "repeated": false, "type": "string", "lookup": false}, {"name": "uri", "is_choice": false, "repeated": false, "type": "Uri", "lookup": true}, {"name": "admin_state", "is_choice": false, "repeated": false, "type": "ComponentAdminState", "lookup": true}]}, {"name": "MetricNames", "type": "enum", "module": "hw_metrics_mgmt_service", "values": {"0": "METRIC_NAME_UNDEFINED", "1": "METRIC_FAN_SPEED", "100": "METRIC_CPU_TEMP", "101": "METRIC_CPU_USAGE_PERCENTAGE", "200": "METRIC_TRANSCEIVER_TEMP", "201": "METRIC_TRANSCEIVER_VOLTAGE", "202": "METRIC_TRANSCEIVER_BIAS", "203": "METRIC_TRANSCEIVER_RX_POWER", "204": "METRIC_TRANSCEIVER_TX_POWER", "205": "METRIC_TRANSCEIVER_WAVELENGTH", "300": "METRIC_DISK_TEMP", "301": "METRIC_DISK_CAPACITY", "302": "METRIC_DISK_USAGE", "303": "METRIC_DISK_USAGE_PERCENTAGE", "304": "METRIC_DISK_READ_WRITE_PERCENTAGE", "305": "METRIC_DISK_FAULTY_CELLS_PERCENTAGE", "400": "METRIC_RAM_TEMP", "401": "METRIC_RAM_CAPACITY", "402": "METRIC_RAM_USAGE", "403": "METRIC_RAM_USAGE_PERCENTAGE", "500": "METRIC_POWER_MAX", "501": "METRIC_POWER_USAGE", "502": "METRIC_POWER_USAGE_PERCENTAGE", "600": "METRIC_INNER_SURROUNDING_TEMP"}}, {"name": "MetricConfig", "type": "message", "module": "hw_metrics_mgmt_service", "fields": [{"name": "metric_id", "is_choice": false, "repeated": false, "type": "MetricNames", "lookup": true}, {"name": "is_configured", "is_choice": false, "repeated": false, "type": "bool", "lookup": false}, {"name": "poll_interval", "is_choice": false, "repeated": false, "type": "uint32", "lookup": false}]}, {"name": "MetricsConfig", "type": "message", "module": "hw_metrics_mgmt_service", "fields": [{"name": "metrics", "is_choice": false, "repeated": true, "type": "MetricConfig", "lookup": true}]}, {"name": "Reason", "type": "enum", "module": "hw_metrics_mgmt_service", "values": {"0": "UNDEFINED_REASON", "1": "UNKNOWN_DEVICE", "2": "INTERNAL_ERROR", "3": "DEVICE_UNREACHABLE"}}, {"name": "ListMetricsResponse", "type": "message", "module": "hw_metrics_mgmt_service", "fields": [{"name": "status", "is_choice": false, "repeated": false, "type": "Status", "lookup": true}, {"name": "reason", "is_choice": false, "repeated": false, "type": "Reason", "lookup": true}, {"name": "metrics", "is_choice": false, "repeated": false, "type": "MetricsConfig", "lookup": true}, {"name": "reason_detail", "is_choice": false, "repeated": false, "type": "string", "lookup": false}]}, {"name": "MetricsConfigurationRequest", "type": "message", "module": "hw_metrics_mgmt_service", "fields": [{"name": "device_uuid", "is_choice": false, "repeated": false, "type": "Uuid", "lookup": true}, {"name": "operation", "is_choice": true, "cases": [{"name": "changes", "type": "MetricsConfig", "lookup": true}, {"name": "reset_to_default", "type": "bool", "lookup": false}]}]}, {"name": "Reason", "type": "enum", "module": "hw_metrics_mgmt_service", "values": {"0": "UNDEFINED_REASON", "1": "UNKNOWN_DEVICE", "2": "INTERNAL_ERROR", "3": "POLL_INTERVAL_UNSUPPORTED", "4": "INVALID_METRIC", "5": "DEVICE_UNREACHABLE"}}, {"name": "MetricsConfigurationResponse", "type": "message", "module": "hw_metrics_mgmt_service", "fields": [{"name": "status", "is_choice": false, "repeated": false, "type": "Status", "lookup": true}, {"name": "reason", "is_choice": false, "repeated": false, "type": "Reason", "lookup": true}, {"name": "reason_detail", "is_choice": false, "repeated": false, "type": "string", "lookup": false}]}, {"name": "MetricMetaData", "type": "message", "module": "hw_metrics_mgmt_service", "fields": [{"name": "device_uuid", "is_choice": false, "repeated": false, "type": "Uuid", "lookup": true}, {"name": "component_uuid", "is_choice": false, "repeated": false, "type": "Uuid", "lookup": true}, {"name": "component_name", "is_choice": false, "repeated": false, "type": "string", "lookup": false}]}, {"name": "Metric", "type": "message", "module": "hw_metrics_mgmt_service", "fields": [{"name": "metric_id", "is_choice": false, "repeated": false, "type": "MetricNames", "lookup": true}, {"name": "metric_metadata", "is_choice": false, "repeated": false, "type": "MetricMetaData", "lookup": true}, {"name": "value", "is_choice": false, "repeated": false, "type": "ComponentSensorData", "lookup": true}]}, {"name": "GetMetricRequest", "type": "message", "module": "hw_metrics_mgmt_service", "fields": [{"name": "meta_data", "is_choice": false, "repeated": false, "type": "MetricMetaData", "lookup": true}, {"name": "metric_id", "is_choice": false, "repeated": false, "type": "MetricNames", "lookup": true}]}, {"name": "Reason", "type": "enum", "module": "hw_metrics_mgmt_service", "values": {"0": "UNDEFINED_REASON", "1": "UNKNOWN_DEVICE", "2": "UNKNOWN_COMPONENT", "3": "INTERNAL_ERROR", "4": "INVALID_METRIC", "5": "DEVICE_UNREACHABLE"}}, {"name": "GetMetricResponse", "type": "message", "module": "hw_metrics_mgmt_service", "fields": [{"name": "status", "is_choice": false, "repeated": false, "type": "Status", "lookup": true}, {"name": "reason", "is_choice": false, "repeated": false, "type": "Reason", "lookup": true}, {"name": "metric", "is_choice": false, "repeated": false, "type": "Metric", "lookup": true}, {"name": "reason_detail", "is_choice": false, "repeated": false, "type": "string", "lookup": false}]}, {"name": "EventIds", "type": "enum", "module": "hw_events_mgmt_service", "values": {"0": "EVENT_NAME_UNDEFINED", "100": "EVENT_TRANSCEIVER_PLUG_OUT", "101": "EVENT_TRANSCEIVER_PLUG_IN", "102": "EVENT_TRANSCEIVER_VOLTAGE_ABOVE_THRESHOLD", "103": "EVENT_TRANSCEIVER_VOLTAGE_BELOW_THRESHOLD", "104": "EVENT_TRANSCEIVER_TEMPERATURE_ABOVE_THRESHOLD", "105": "EVENT_TRANSCEIVER_TEMPERATURE_BELOW_THRESHOLD", "106": "EVENT_TRANSCEIVER_CURRENT_ABOVE_THRESHOLD", "107": "EVENT_TRANSCEIVER_CURRENT_BELOW_THRESHOLD", "108": "EVENT_TRANSCEIVER_RX_POWER_ABOVE_THRESHOLD", "109": "EVENT_TRANSCEIVER_RX_POWER_BELOW_THRESHOLD", "110": "EVENT_TRANSCEIVER_TX_POWER_ABOVE_THRESHOLD", "111": "EVENT_TRANSCEIVER_TX_POWER_BELOW_THRESHOLD", "112": "EVENT_TRANSCEIVER_FAILURE", "113": "EVENT_TRANSCEIVER_VOLTAGE_ABOVE_THRESHOLD_RECOVERED", "114": "EVENT_TRANSCEIVER_VOLTAGE_BELOW_THRESHOLD_RECOVERED", "115": "EVENT_TRANSCEIVER_TEMPERATURE_ABOVE_THRESHOLD_RECOVERED", "116": "EVENT_TRANSCEIVER_TEMPERATURE_BELOW_THRESHOLD_RECOVERED", "117": "EVENT_TRANSCEIVER_CURRENT_ABOVE_THRESHOLD_RECOVERED", "118": "EVENT_TRANSCEIVER_CURRENT_BELOW_THRESHOLD_RECOVERED", "119": "EVENT_TRANSCEIVER_RX_POWER_ABOVE_THRESHOLD_RECOVERED", "120": "EVENT_TRANSCEIVER_RX_POWER_BELOW_THRESHOLD_RECOVERED", "121": "EVENT_TRANSCEIVER_TX_POWER_ABOVE_THRESHOLD_RECOVERED", "122": "EVENT_TRANSCEIVER_TX_POWER_BELOW_THRESHOLD_RECOVERED", "123": "EVENT_TRANSCEIVER_FAILURE_RECOVERED", "200": "EVENT_PSU_PLUG_OUT", "201": "EVENT_PSU_PLUG_IN", "202": "EVENT_PSU_FAILURE", "203": "EVENT_PSU_FAILURE_RECOVERED", "300": "EVENT_FAN_FAILURE", "301": "EVENT_FAN_PLUG_OUT", "302": "EVENT_FAN_PLUG_IN", "303": "EVENT_FAN_FAILURE_RECOVERED", "400": "EVENT_CPU_TEMPERATURE_ABOVE_CRITICAL", "401": "EVENT_CPU_TEMPERATURE_ABOVE_FATAL", "402": "EVENT_CPU_TEMPERATURE_ABOVE_CRITICAL_RECOVERED", "403": "EVENT_CPU_TEMPERATURE_ABOVE_FATAL_RECOVERED", "500": "EVENT_HW_DEVICE_RESET", "501": "EVENT_HW_DEVICE_TEMPERATURE_ABOVE_CRITICAL", "502": "EVENT_HW_DEVICE_TEMPERATURE_ABOVE_FATAL", "503": "EVENT_HW_DEVICE_TEMPERATURE_ABOVE_CRITICAL_RECOVERED", "504": "EVENT_HW_DEVICE_TEMPERATURE_ABOVE_FATAL_RECOVERED"}}, {"name": "ValueType", "type": "message", "module": "hw_events_mgmt_service", "fields": [{"name": "val", "is_choice": true, "cases": [{"name": "int_val", "type": "int64", "lookup": false}, {"name": "uint_val", "type": "uint64", "lookup": false}, {"name": "float_val", "type": "float", "lookup": false}]}]}, {"name": "WaterMarks", "type": "message", "module": "hw_events_mgmt_service", "fields": [{"name": "high", "is_choice": false, "repeated": false, "type": "ValueType", "lookup": true}, {"name": "low", "is_choice": false, "repeated": false, "type": "ValueType", "lookup": true}]}, {"name": "Thresholds", "type": "message", "module": "hw_events_mgmt_service", "fields": [{"name": "threshold", "is_choice": true, "cases": [{"name": "upper", "type": "WaterMarks", "lookup": true}, {"name": "lower", "type": "WaterMarks", "lookup": true}]}]}, {"name": "ThresholdInformation", "type": "message", "module": "hw_events_mgmt_service", "fields": [{"name": "observed_value", "is_choice": false, "repeated": false, "type": "ValueType", "lookup": true}, {"name": "thresholds", "is_choice": false, "repeated": false, "type": "Thresholds", "lookup": true}]}, {"name": "EventCfg", "type": "message", "module": "hw_events_mgmt_service", "fields": [{"name": "event_id", "is_choice": false, "repeated": false, "type": "EventIds", "lookup": true}, {"name": "is_configured", "is_choice": false, "repeated": false, "type": "bool", "lookup": false}, {"name": "thresholds", "is_choice": false, "repeated": false, "type": "Thresholds", "lookup": true}]}, {"name": "EventsCfg", "type": "message", "module": "hw_events_mgmt_service", "fields": [{"name": "items", "is_choice": false, "repeated": true, "type": "EventCfg", "lookup": true}]}, {"name": "Reason", "type": "enum", "module": "hw_events_mgmt_service", "values": {"0": "UNDEFINED_REASON", "1": "UNKNOWN_DEVICE", "2": "INTERNAL_ERROR", "3": "DEVICE_UNREACHABLE"}}, {"name": "ListEventsResponse", "type": "message", "module": "hw_events_mgmt_service", "fields": [{"name": "status", "is_choice": false, "repeated": false, "type": "Status", "lookup": true}, {"name": "reason", "is_choice": false, "repeated": false, "type": "Reason", "lookup": true}, {"name": "events", "is_choice": false, "repeated": false, "type": "EventsCfg", "lookup": true}, {"name": "reason_detail", "is_choice": false, "repeated": false, "type": "string", "lookup": false}]}, {"name": "EventsConfigurationRequest", "type": "message", "module": "hw_events_mgmt_service", "fields": [{"name": "device_uuid", "is_choice": false, "repeated": false, "type": "Uuid", "lookup": true}, {"name": "operation", "is_choice": true, "cases": [{"name": "changes", "type": "EventsCfg", "lookup": true}, {"name": "reset_to_default", "type": "bool", "lookup": false}]}]}, {"name": "Reason", "type": "enum", "module": "hw_events_mgmt_service", "values": {"0": "UNDEFINED_REASON", "1": "UNKNOWN_DEVICE", "2": "INTERNAL_ERROR", "3": "INVALID_CONFIG", "4": "DEVICE_UNREACHABLE"}}, {"name": "EventsConfigurationResponse", "type": "message", "module": "hw_events_mgmt_service", "fields": [{"name": "status", "is_choice": false, "repeated": false, "type": "Status", "lookup": true}, {"name": "reason", "is_choice": false, "repeated": false, "type": "Reason", "lookup": true}, {"name": "reason_detail", "is_choice": false, "repeated": false, "type": "string", "lookup": false}]}, {"name": "EventMetaData", "type": "message", "module": "hw_events_mgmt_service", "fields": [{"name": "device_uuid", "is_choice": false, "repeated": false, "type": "Uuid", "lookup": true}, {"name": "component_uuid", "is_choice": false, "repeated": false, "type": "Uuid", "lookup": true}, {"name": "component_name", "is_choice": false, "repeated": false, "type": "string", "lookup": false}]}, {"name": "Event", "type": "message", "module": "hw_events_mgmt_service", "fields": [{"name": "event_metadata", "is_choice": false, "repeated": false, "type": "EventMetaData", "lookup": true}, {"name": "event_id", "is_choice": false, "repeated": false, "type": "EventIds", "lookup": true}, {"name": "raised_ts", "is_choice": false, "repeated": false, "type": "google.protobuf.Timestamp", "lookup": true}, {"name": "threshold_info", "is_choice": false, "repeated": false, "type": "ThresholdInformation", "lookup": true}, {"name": "add_info", "is_choice": false, "repeated": false, "type": "string", "lookup": false}]}, {"name": "ImageVersion", "type": "message", "module": "sw_image", "fields": [{"name": "image_name", "is_choice": false, "repeated": false, "type": "string", "lookup": false}, {"name": "version", "is_choice": false, "repeated": false, "type": "string", "lookup": false}]}, {"name": "ImageInformation", "type": "message", "module": "sw_image", "fields": [{"name": "image", "is_choice": false, "repeated": false, "type": "ImageVersion", "lookup": true}, {"name": "image_install_script", "is_choice": false, "repeated": false, "type": "string", "lookup": false}, {"name": "image_url", "is_choice": false, "repeated": false, "type": "string", "lookup": false}, {"name": "sha256sum", "is_choice": false, "repeated": false, "type": "string", "lookup": false}]}, {"name": "ImageState", "type": "enum", "module": "sw_image", "values": {"0": "UNDEFINED_STATE", "1": "COPYING_IMAGE", "2": "INSTALLING_IMAGE", "3": "COMMITTING_IMAGE", "4": "REBOOTING_DEVICE", "5": "UPGRADE_COMPLETE", "6": "UPGRADE_FAILED", "7": "ACTIVATION_COMPLETE", "8": "ACTIVATION_FAILED"}}, {"name": "Reason", "type": "enum", "module": "sw_image", "values": {"0": "UNDEFINED_REASON", "1": "ERROR_IN_REQUEST", "2": "INTERNAL_ERROR", "3": "DEVICE_IN_WRONG_STATE", "4": "INVALID_IMAGE", "5": "WRONG_IMAGE_CHECKSUM", "6": "OPERATION_ALREADY_IN_PROGRESS", "7": "UNKNOWN_DEVICE", "8": "DEVICE_NOT_REACHABLE"}}, {"name": "ImageStatus", "type": "message", "module": "sw_image", "fields": [{"name": "status", "is_choice": false, "repeated": false, "type": "Status", "lookup": true}, {"name": "reason", "is_choice": false, "repeated": false, "type": "Reason", "lookup": true}, {"name": "state", "is_choice": false, "repeated": false, "type": "ImageState", "lookup": true}, {"name": "description", "is_choice": false, "repeated": false, "type": "string", "lookup": false}, {"name": "reason_detail", "is_choice": false, "repeated": false, "type": "string", "lookup": false}]}, {"name": "PhysicalInventoryRequest", "type": "message", "module": "hw_management_service", "fields": [{"name": "device_uuid", "is_choice": false, "repeated": false, "type": "Uuid", "lookup": true}]}, {"name": "Reason", "type": "enum", "module": "hw_management_service", "values": {"0": "UNDEFINED_REASON", "1": "UNKNOWN_DEVICE", "2": "INTERNAL_ERROR", "3": "DEVICE_UNREACHABLE"}}, {"name": "PhysicalInventoryResponse", "type": "message", "module": "hw_management_service", "fields": [{"name": "status", "is_choice": false, "repeated": false, "type": "Status", "lookup": true}, {"name": "reason", "is_choice": false, "repeated": false, "type": "Reason", "lookup": true}, {"name": "inventory", "is_choice": false, "repeated": false, "type": "Hardware", "lookup": true}, {"name": "reason_detail", "is_choice": false, "repeated": false, "type": "string", "lookup": false}]}, {"name": "HWComponentInfoGetRequest", "type": "message", "module": "hw_management_service", "fields": [{"name": "device_uuid", "is_choice": false, "repeated": false, "type": "Uuid", "lookup": true}, {"name": "component_uuid", "is_choice": false, "repeated": false, "type": "Uuid", "lookup": true}, {"name": "component_name", "is_choice": false, "repeated": false, "type": "string", "lookup": false}]}, {"name": "Reason", "type": "enum", "module": "hw_management_service", "values": {"0": "UNDEFINED_REASON", "1": "UNKNOWN_DEVICE", "2": "UNKNOWN_COMPONENT", "3": "INTERNAL_ERROR", "4": "DEVICE_UNREACHABLE"}}, {"name": "HWComponentInfoGetResponse", "type": "message", "module": "hw_management_service", "fields": [{"name": "status", "is_choice": false, "repeated": false, "type": "Status", "lookup": true}, {"name": "reason", "is_choice": false, "repeated": false, "type": "Reason", "lookup": true}, {"name": "component", "is_choice": false, "repeated": false, "type": "Component", "lookup": true}, {"name": "reason_detail", "is_choice": false, "repeated": false, "type": "string", "lookup": false}]}, {"name": "HWComponentInfoSetRequest", "type": "message", "module": "hw_management_service", "fields": [{"name": "device_uuid", "is_choice": false, "repeated": false, "type": "Uuid", "lookup": true}, {"name": "component_uuid", "is_choice": false, "repeated": false, "type": "Uuid", "lookup": true}, {"name": "component_name", "is_choice": false, "repeated": false, "type": "string", "lookup": false}, {"name": "changes", "is_choice": false, "repeated": false, "type": "ModifiableComponent", "lookup": true}]}, {"name": "Reason", "type": "enum", "module": "hw_management_service", "values": {"0": "UNDEFINED_REASON", "1": "UNKNOWN_DEVICE", "2": "UNKNOWN_COMPONENT", "3": "INVALID_PARAMS", "4": "INTERNAL_ERROR", "5": "DEVICE_UNREACHABLE"}}, {"name": "HWComponentInfoSetResponse", "type": "message", "module": "hw_management_service", "fields": [{"name": "status", "is_choice": false, "repeated": false, "type": "Status", "lookup": true}, {"name": "reason", "is_choice": false, "repeated": false, "type": "Reason", "lookup": true}, {"name": "reason_detail", "is_choice": false, "repeated": false, "type": "string", "lookup": false}]}, {"name": "Reason", "type": "enum", "module": "hw_management_service", "values": {"0": "UNDEFINED_REASON", "1": "DEVICE_ALREADY_MANAGED", "2": "OPERATION_ALREADY_IN_PROGRESS", "3": "INVALID_PARAMS", "4": "INTERNAL_ERROR"}}, {"name": "StartManagingDeviceResponse", "type": "message", "module": "hw_management_service", "fields": [{"name": "status", "is_choice": false, "repeated": false, "type": "Status", "lookup": true}, {"name": "reason", "is_choice": false, "repeated": false, "type": "Reason", "lookup": true}, {"name": "device_uuid", "is_choice": false, "repeated": false, "type": "Uuid", "lookup": true}, {"name": "reason_detail", "is_choice": false, "repeated": false, "type": "string", "lookup": false}]}, {"name": "StopManagingDeviceRequest", "type": "message", "module": "hw_management_service", "fields": [{"name": "name", "is_choice": false, "repeated": false, "type": "string", "lookup": false}]}, {"name": "Reason", "type": "enum", "module": "hw_management_service", "values": {"0": "UNDEFINED_REASON", "1": "UNKNOWN_DEVICE"}}, {"name": "StopManagingDeviceResponse", "type": "message", "module": "hw_management_service", "fields": [{"name": "status", "is_choice": false, "repeated": false, "type": "Status", "lookup": true}, {"name": "reason", "is_choice": false, "repeated": false, "type": "Reason", "lookup": true}, {"name": "reason_detail", "is_choice": false, "repeated": false, "type": "string", "lookup": false}]}, {"name": "ManagedDevicesResponse", "type": "message", "module": "hw_management_service", "fields": [{"name": "devices", "is_choice": false, "repeated": true, "type": "ModifiableComponent", "lookup": true}]}, {"name": "SetLoggingEndpointRequest", "type": "message", "module": "hw_management_service", "fields": [{"name": "device_uuid", "is_choice": false, "repeated": false, "type": "Uuid", "lookup": true}, {"name": "logging_endpoint", "is_choice": false, "repeated": false, "type": "string", "lookup": false}, {"name": "logging_protocol", "is_choice": false, "repeated": false, "type": "string", "lookup": false}]}, {"name": "Reason", "type": "enum", "module": "hw_management_service", "values": {"0": "UNDEFINED_REASON", "1": "UNKNOWN_DEVICE", "2": "INTERNAL_ERROR", "3": "LOGGING_ENDPOINT_ERROR", "4": "LOGGING_ENDPOINT_PROTOCOL_ERROR", "5": "MSGBUS_ENDPOINT_ERROR", "6": "DEVICE_UNREACHABLE"}}, {"name": "SetRemoteEndpointResponse", "type": "message", "module": "hw_management_service", "fields": [{"name": "status", "is_choice": false, "repeated": false, "type": "Status", "lookup": true}, {"name": "reason", "is_choice": false, "repeated": false, "type": "Reason", "lookup": true}, {"name": "reason_detail", "is_choice": false, "repeated": false, "type": "string", "lookup": false}]}, {"name": "Reason", "type": "enum", "module": "hw_management_service", "values": {"0": "UNDEFINED_REASON", "1": "UNKNOWN_DEVICE", "2": "INTERNAL_ERROR", "3": "DEVICE_UNREACHABLE"}}, {"name": "GetLoggingEndpointResponse", "type": "message", "module": "hw_management_service", "fields": [{"name": "status", "is_choice": false, "repeated": false, "type": "Status", "lookup": true}, {"name": "reason", "is_choice": false, "repeated": false, "type": "Reason", "lookup": true}, {"name": "logging_endpoint", "is_choice": false, "repeated": false, "type": "string", "lookup": false}, {"name": "logging_protocol", "is_choice": false, "repeated": false, "type": "string", "lookup": false}, {"name": "reason_detail", "is_choice": false, "repeated": false, "type": "string", "lookup": false}]}, {"name": "SetMsgBusEndpointRequest", "type": "message", "module": "hw_management_service", "fields": [{"name": "msgbus_endpoint", "is_choice": false, "repeated": false, "type": "string", "lookup": false}]}, {"name": "Reason", "type": "enum", "module": "hw_management_service", "values": {"0": "UNDEFINED_REASON", "1": "INTERNAL_ERROR", "2": "DEVICE_UNREACHABLE"}}, {"name": "GetMsgBusEndpointResponse", "type": "message", "module": "hw_management_service", "fields": [{"name": "status", "is_choice": false, "repeated": false, "type": "Status", "lookup": true}, {"name": "reason", "is_choice": false, "repeated": false, "type": "Reason", "lookup": true}, {"name": "msgbus_endpoint", "is_choice": false, "repeated": false, "type": "string", "lookup": false}, {"name": "reason_detail", "is_choice": false, "repeated": false, "type": "string", "lookup": false}]}, {"name": "EntitiesLogLevel", "type": "message", "module": "hw_management_service", "fields": [{"name": "logLevel", "is_choice": false, "repeated": false, "type": "LogLevel", "lookup": true}, {"name": "entities", "is_choice": false, "repeated": true, "type": "string", "lookup": false}]}, {"name": "SetLogLevelRequest", "type": "message", "module": "hw_management_service", "fields": [{"name": "device_uuid", "is_choice": false, "repeated": false, "type": "Uuid", "lookup": true}, {"name": "loglevels", "is_choice": false, "repeated": true, "type": "EntitiesLogLevel", "lookup": true}]}, {"name": "Reason", "type": "enum", "module": "hw_management_service", "values": {"0": "UNDEFINED_REASON", "1": "UNKNOWN_DEVICE", "2": "INTERNAL_ERROR", "3": "UNKNOWN_LOG_ENTITY", "4": "DEVICE_UNREACHABLE"}}, {"name": "SetLogLevelResponse", "type": "message", "module": "hw_management_service", "fields": [{"name": "device_uuid", "is_choice": false, "repeated": false, "type": "Uuid", "lookup": true}, {"name": "status", "is_choice": false, "repeated": false, "type": "Status", "lookup": true}, {"name": "reason", "is_choice": false, "repeated": false, "type": "Reason", "lookup": true}, {"name": "reason_detail", "is_choice": false, "repeated": false, "type": "string", "lookup": false}]}, {"name": "GetLogLevelRequest", "type": "message", "module": "hw_management_service", "fields": [{"name": "device_uuid", "is_choice": false, "repeated": false, "type": "Uuid", "lookup": true}, {"name": "entities", "is_choice": false, "repeated": true, "type": "string", "lookup": false}]}, {"name": "Reason", "type": "enum", "module": "hw_management_service", "values": {"0": "UNDEFINED_REASON", "1": "UNKNOWN_DEVICE", "2": "INTERNAL_ERROR", "3": "UNKNOWN_LOG_ENTITY", "4": "DEVICE_UNREACHABLE"}}, {"name": "GetLogLevelResponse", "type": "message", "module": "hw_management_service", "fields": [{"name": "device_uuid", "is_choice": false, "repeated": false, "type": "Uuid", "lookup": true}, {"name": "logLevels", "is_choice": false, "repeated": true, "type": "EntitiesLogLevel", "lookup": true}, {"name": "status", "is_choice": false, "repeated": false, "type": "Status", "lookup": true}, {"name": "reason", "is_choice": false, "repeated": false, "type": "Reason", "lookup": true}, {"name": "reason_detail", "is_choice": false, "repeated": false, "type": "string", "lookup": false}]}, {"name": "GetLoggableEntitiesRequest", "type": "message", "module": "hw_management_service", "fields": [{"name": "device_uuid", "is_choice": false, "repeated": false, "type": "Uuid", "lookup": true}]}, {"name": "SoftwareVersionInformation", "type": "message", "module": "sw_management_service", "fields": [{"name": "active_versions", "is_choice": false, "repeated": true, "type": "ImageVersion", "lookup": true}, {"name": "standby_versions", "is_choice": false, "repeated": true, "type": "ImageVersion", "lookup": true}]}, {"name": "Reason", "type": "enum", "module": "sw_management_service", "values": {"0": "UNDEFINED_REASON", "1": "UNKNOWN_DEVICE", "2": "INTERNAL_ERROR", "3": "DEVICE_UNREACHABLE"}}, {"name": "GetSoftwareVersionInformationResponse", "type": "message", "module": "sw_management_service", "fields": [{"name": "status", "is_choice": false, "repeated": false, "type": "Status", "lookup": true}, {"name": "reason", "is_choice": false, "repeated": false, "type": "Reason", "lookup": true}, {"name": "info", "is_choice": false, "repeated": false, "type": "SoftwareVersionInformation", "lookup": true}, {"name": "reason_detail", "is_choice": false, "repeated": false, "type": "string", "lookup": false}]}, {"name": "DownloadImageRequest", "type": "message", "module": "sw_management_service", "fields": [{"name": "device_uuid", "is_choice": false, "repeated": false, "type": "Uuid", "lookup": true}, {"name": "image_info", "is_choice": false, "repeated": false, "type": "ImageInformation", "lookup": true}]}, {"name": "ConfigRequest", "type": "message", "module": "sw_management_service", "fields": [{"name": "device_uuid", "is_choice": false, "repeated": false, "type": "Uuid", "lookup": true}, {"name": "config_url", "is_choice": false, "repeated": false, "type": "string", "lookup": false}]}, {"name": "Reason", "type": "enum", "module": "sw_management_service", "values": {"0": "UNDEFINED_REASON", "1": "UNKNOWN_DEVICE", "2": "INTERNAL_ERROR", "3": "ERROR_FETCHING_CONFIG", "4": "INVALID_CONFIG", "5": "OPERATION_ALREADY_IN_PROGRESS", "6": "DEVICE_UNREACHABLE"}}, {"name": "ConfigResponse", "type": "message", "module": "sw_management_service", "fields": [{"name": "status", "is_choice": false, "repeated": false, "type": "Status", "lookup": true}, {"name": "reason", "is_choice": false, "repeated": false, "type": "Reason", "lookup": true}, {"name": "reason_detail", "is_choice": false, "repeated": false, "type": "string", "lookup": false}]}, {"name": "StartupConfigInfoRequest", "type": "message", "module": "sw_management_service", "fields": [{"name": "device_uuid", "is_choice": false, "repeated": false, "type": "Uuid", "lookup": true}]}, {"name": "Reason", "type": "enum", "module": "sw_management_service", "values": {"0": "UNDEFINED_REASON", "1": "UNKNOWN_DEVICE", "2": "INTERNAL_ERROR", "3": "DEVICE_UNREACHABLE"}}, {"name": "StartupConfigInfoResponse", "type": "message", "module": "sw_management_service", "fields": [{"name": "status", "is_choice": false, "repeated": false, "type": "Status", "lookup": true}, {"name": "reason", "is_choice": false, "repeated": false, "type": "Reason", "lookup": true}, {"name": "config_url", "is_choice": false, "repeated": false, "type": "string", "lookup": false}, {"name": "version", "is_choice": false, "repeated": false, "type": "string", "lookup": false}, {"name": "reason_detail", "is_choice": false, "repeated": false, "type": "string", "lookup": false}]}], "services": [{"name": "NativeMetricsManagementService", "module": "hw_metrics_mgmt_service", "rpcs": [{"name": "ListMetrics", "request": {"is_stream": false, "type": "HardwareID", "lookup": true}, "response": {"is_stream": false, "type": "ListMetricsResponse", "lookup": true}}, {"name": "UpdateMetricsConfiguration", "request": {"is_stream": false, "type": "MetricsConfigurationRequest", "lookup": true}, "response": {"is_stream": false, "type": "MetricsConfigurationResponse", "lookup": true}}, {"name": "GetMetric", "request": {"is_stream": false, "type": "GetMetricRequest", "lookup": true}, "response": {"is_stream": false, "type": "GetMetricResponse", "lookup": true}}]}, {"name": "NativeEventsManagementService", "module": "hw_events_mgmt_service", "rpcs": [{"name": "ListEvents", "request": {"is_stream": false, "type": "HardwareID", "lookup": true}, "response": {"is_stream": false, "type": "ListEventsResponse", "lookup": true}}, {"name": "UpdateEventsConfiguration", "request": {"is_stream": false, "type": "EventsConfigurationRequest", "lookup": true}, "response": {"is_stream": false, "type": "EventsConfigurationResponse", "lookup": true}}]}, {"name": "NativeHWManagementService", "module": "hw_management_service", "rpcs": [{"name": "StartManagingDevice", "request": {"is_stream": false, "type": "ModifiableComponent", "lookup": true}, "response": {"is_stream": true, "type": "StartManagingDeviceResponse", "lookup": true}}, {"name": "StopManagingDevice", "request": {"is_stream": false, "type": "StopManagingDeviceRequest", "lookup": true}, "response": {"is_stream": false, "type": "StopManagingDeviceResponse", "lookup": true}}, {"name": "GetManagedDevices", "request": {"is_stream": false, "type": "google.protobuf.Empty", "lookup": false}, "response": {"is_stream": false, "type": "ManagedDevicesResponse", "lookup": true}}, {"name": "GetPhysicalInventory", "request": {"is_stream": false, "type": "PhysicalInventoryRequest", "lookup": true}, "response": {"is_stream": true, "type": "PhysicalInventoryResponse", "lookup": true}}, {"name": "GetHWComponentInfo", "request": {"is_stream": false, "type": "HWComponentInfoGetRequest", "lookup": true}, "response": {"is_stream": true, "type": "HWComponentInfoGetResponse", "lookup": true}}, {"name": "SetHWComponentInfo", "request": {"is_stream": false, "type": "HWComponentInfoSetRequest", "lookup": true}, "response": {"is_stream": false, "type": "HWComponentInfoSetResponse", "lookup": true}}, {"name": "SetLoggingEndpoint", "request": {"is_stream": false, "type": "SetLoggingEndpointRequest", "lookup": true}, "response": {"is_stream": false, "type": "SetRemoteEndpointResponse", "lookup": true}}, {"name": "GetLoggingEndpoint", "request": {"is_stream": false, "type": "HardwareID", "lookup": true}, "response": {"is_stream": false, "type": "GetLoggingEndpointResponse", "lookup": true}}, {"name": "SetMsgBusEndpoint", "request": {"is_stream": false, "type": "SetMsgBusEndpointRequest", "lookup": true}, "response": {"is_stream": false, "type": "SetRemoteEndpointResponse", "lookup": true}}, {"name": "GetMsgBusEndpoint", "request": {"is_stream": false, "type": "google.protobuf.Empty", "lookup": false}, "response": {"is_stream": false, "type": "GetMsgBusEndpointResponse", "lookup": true}}, {"name": "GetLoggableEntities", "request": {"is_stream": false, "type": "GetLoggableEntitiesRequest", "lookup": true}, "response": {"is_stream": false, "type": "GetLogLevelResponse", "lookup": true}}, {"name": "SetLogLevel", "request": {"is_stream": false, "type": "SetLogLevelRequest", "lookup": true}, "response": {"is_stream": false, "type": "SetLogLevelResponse", "lookup": true}}, {"name": "GetLogLevel", "request": {"is_stream": false, "type": "GetLogLevelRequest", "lookup": true}, "response": {"is_stream": false, "type": "GetLogLevelResponse", "lookup": true}}]}, {"name": "NativeSoftwareManagementService", "module": "sw_management_service", "rpcs": [{"name": "GetSoftwareVersion", "request": {"is_stream": false, "type": "HardwareID", "lookup": true}, "response": {"is_stream": false, "type": "GetSoftwareVersionInformationResponse", "lookup": true}}, {"name": "DownloadImage", "request": {"is_stream": false, "type": "DownloadImageRequest", "lookup": true}, "response": {"is_stream": true, "type": "ImageStatus", "lookup": true}}, {"name": "ActivateImage", "request": {"is_stream": false, "type": "HardwareID", "lookup": true}, "response": {"is_stream": true, "type": "ImageStatus", "lookup": true}}, {"name": "RevertToStandbyImage", "request": {"is_stream": false, "type": "HardwareID", "lookup": true}, "response": {"is_stream": true, "type": "ImageStatus", "lookup": true}}, {"name": "UpdateStartupConfiguration", "request": {"is_stream": false, "type": "ConfigRequest", "lookup": true}, "response": {"is_stream": true, "type": "ConfigResponse", "lookup": true}}, {"name": "GetStartupConfigurationInfo", "request": {"is_stream": false, "type": "StartupConfigInfoRequest", "lookup": true}, "response": {"is_stream": false, "type": "StartupConfigInfoResponse", "lookup": true}}]}]}
\ No newline at end of file
diff --git a/grpc_robot/services/dmi/dmi_0_9_1/__init__.py b/grpc_robot/services/dmi/dmi_0_9_1/__init__.py
new file mode 100644
index 0000000..9e78f73
--- /dev/null
+++ b/grpc_robot/services/dmi/dmi_0_9_1/__init__.py
@@ -0,0 +1,17 @@
+# Copyright 2020-present Open Networking Foundation
+# Original copyright 2020-present ADTRAN, Inc.
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+from .hw_events_mgmt_service import *
+from .hw_management_service import *
+from .hw_metrics_mgmt_service import *
+from .sw_management_service import *
diff --git a/grpc_robot/services/dmi/dmi_0_9_1/dmi.json b/grpc_robot/services/dmi/dmi_0_9_1/dmi.json
new file mode 100644
index 0000000..84a0d71
--- /dev/null
+++ b/grpc_robot/services/dmi/dmi_0_9_1/dmi.json
@@ -0,0 +1 @@
+{"modules": [{"name": "commons", "imports": []}, {"name": "hw", "imports": ["timestamp"]}, {"name": "hw_metrics_mgmt_service", "imports": ["commons", "hw"]}, {"name": "hw_events_mgmt_service", "imports": ["commons", "hw", "timestamp"]}, {"name": "sw_image", "imports": ["commons"]}, {"name": "hw_management_service", "imports": ["commons", "hw", "empty"]}, {"name": "sw_management_service", "imports": ["commons", "hw", "sw_image"]}], "data_types": [{"name": "Status", "type": "enum", "module": "commons", "values": ["UNDEFINED_STATUS", "OK", "ERROR"]}, {"name": "Reason", "type": "enum", "module": "commons", "values": ["UNDEFINED_REASON", "UNKNOWN_DEVICE", "INTERNAL_ERROR", "WRONG_METRIC", "WRONG_EVENT", "LOGGING_ENDPOINT_ERROR", "LOGGING_ENDPOINT_PROTOCOL_ERROR", "KAFKA_ENDPOINT_ERROR"]}, {"name": "Uuid", "type": "message", "module": "hw", "fields": [{"name": "uuid", "is_choice": false, "repeated": false, "type": "string", "lookup": false}]}, {"name": "HardwareID", "type": "message", "module": "hw", "fields": [{"name": "uuid", "is_choice": false, "repeated": false, "type": "Uuid", "lookup": true}]}, {"name": "Uri", "type": "message", "module": "hw", "fields": [{"name": "uri", "is_choice": false, "repeated": false, "type": "string", "lookup": false}]}, {"name": "ComponentType", "type": "enum", "module": "hw", "values": ["COMPONENT_TYPE_UNDEFINED", "COMPONENT_TYPE_UNKNOWN", "COMPONENT_TYPE_CHASSIS", "COMPONENT_TYPE_BACKPLANE", "COMPONENT_TYPE_CONTAINER", "COMPONENT_TYPE_POWER_SUPPLY", "COMPONENT_TYPE_FAN", "COMPONENT_TYPE_SENSOR", "COMPONENT_TYPE_MODULE", "COMPONENT_TYPE_PORT", "COMPONENT_TYPE_CPU", "COMPONENT_TYPE_BATTERY", "COMPONENT_TYPE_STORAGE", "COMPONENT_TYPE_MEMORY", "COMPONENT_TYPE_TRANSCEIVER", "COMPONENT_TYPE_GPON_TRANSCEIVER", "COMPONENT_TYPE_XGS_PON_TRANSCEIVER"]}, {"name": "ComponentAdminState", "type": "enum", "module": "hw", "values": ["COMP_ADMIN_STATE_UNDEFINED", "COMP_ADMIN_STATE_UNKNOWN", "COMP_ADMIN_STATE_LOCKED", "COMP_ADMIN_STATE_SHUTTING_DOWN", "COMP_ADMIN_STATE_UNLOCKED"]}, {"name": "ComponentOperState", "type": "enum", "module": "hw", "values": ["COMP_OPER_STATE_UNDEFINED", "COMP_OPER_STATE_UNKNOWN", "COMP_OPER_STATE_DISABLED", "COMP_OPER_STATE_ENABLED", "COMP_OPER_STATE_TESTING"]}, {"name": "ComponentUsageState", "type": "enum", "module": "hw", "values": ["COMP_USAGE_STATE_UNDEFINED", "COMP_USAGE_STATE_UNKNOWN", "COMP_USAGE_STATE_IDLE", "COMP_USAGE_STATE_ACTIVE", "COMP_USAGE_STATE_BUSY"]}, {"name": "ComponentAlarmState", "type": "enum", "module": "hw", "values": ["COMP_ALARM_STATE_UNDEFINED", "COMP_ALARM_STATE_UNKNOWN", "COMP_ALARM_STATE_UNDER_REPAIR", "COMP_ALARM_STATE_CRITICAL", "COMP_ALARM_STATE_MAJOR", "COMP_ALARM_STATE_MINOR", "COMP_ALARM_STATE_WARNING", "COMP_ALARM_STATE_INTERMEDIATE"]}, {"name": "ComponentStandbyState", "type": "enum", "module": "hw", "values": ["COMP_STANDBY_STATE_UNDEFINED", "COMP_STANDBY_STATE_UNKNOWN", "COMP_STANDBY_STATE_HOT", "COMP_STANDBY_STATE_COLD", "COMP_STANDBY_STATE_PROVIDING_SERVICE"]}, {"name": "ComponentState", "type": "message", "module": "hw", "fields": [{"name": "state_last_changed", "is_choice": false, "repeated": false, "type": "google.protobuf.Timestamp", "lookup": true}, {"name": "admin_state", "is_choice": false, "repeated": false, "type": "ComponentAdminState", "lookup": true}, {"name": "oper_state", "is_choice": false, "repeated": false, "type": "ComponentOperState", "lookup": true}, {"name": "usage_state", "is_choice": false, "repeated": false, "type": "ComponentUsageState", "lookup": true}, {"name": "alarm_state", "is_choice": false, "repeated": false, "type": "ComponentAlarmState", "lookup": true}, {"name": "standby_state", "is_choice": false, "repeated": false, "type": "ComponentStandbyState", "lookup": true}]}, {"name": "SensorValueType", "type": "enum", "module": "hw", "values": ["SENSOR_VALUE_TYPE_UNDEFINED", "SENSOR_VALUE_TYPE_OTHER", "SENSOR_VALUE_TYPE_UNKNOWN", "SENSOR_VALUE_TYPE_VOLTS_AC", "SENSOR_VALUE_TYPE_VOLTS_DC", "SENSOR_VALUE_TYPE_AMPERES", "SENSOR_VALUE_TYPE_WATTS", "SENSOR_VALUE_TYPE_HERTZ", "SENSOR_VALUE_TYPE_CELSIUS", "SENSOR_VALUE_TYPE_PERCENT_RH", "SENSOR_VALUE_TYPE_RPM", "SENSOR_VALUE_TYPE_CMM", "SENSOR_VALUE_TYPE_TRUTH_VALUE"]}, {"name": "SensorValueScale", "type": "enum", "module": "hw", "values": ["SENSOR_VALUE_SCALE_UNDEFINED", "SENSOR_VALUE_SCALE_YOCTO", "SENSOR_VALUE_SCALE_ZEPTO", "SENSOR_VALUE_SCALE_ATTO", "SENSOR_VALUE_SCALE_FEMTO", "SENSOR_VALUE_SCALE_PICO", "SENSOR_VALUE_SCALE_NANO", "SENSOR_VALUE_SCALE_MICRO", "SENSOR_VALUE_SCALE_MILLI", "SENSOR_VALUE_SCALE_UNITS", "SENSOR_VALUE_SCALE_KILO", "SENSOR_VALUE_SCALE_MEGA", "SENSOR_VALUE_SCALE_GIGA", "SENSOR_VALUE_SCALE_TERA", "SENSOR_VALUE_SCALE_PETA", "SENSOR_VALUE_SCALE_EXA", "SENSOR_VALUE_SCALE_ZETTA", "SENSOR_VALUE_SCALE_YOTTA"]}, {"name": "SensorStatus", "type": "enum", "module": "hw", "values": ["SENSOR_STATUS_UNDEFINED", "SENSOR_STATUS_OK", "SENSOR_STATUS_UNAVAILABLE", "SENSOR_STATUS_NONOPERATIONAL"]}, {"name": "ComponentSensorData", "type": "message", "module": "hw", "fields": [{"name": "value", "is_choice": false, "repeated": false, "type": "int32", "lookup": false}, {"name": "type", "is_choice": false, "repeated": false, "type": "SensorValueType", "lookup": true}, {"name": "scale", "is_choice": false, "repeated": false, "type": "SensorValueScale", "lookup": true}, {"name": "precision", "is_choice": false, "repeated": false, "type": "int32", "lookup": false}, {"name": "status", "is_choice": false, "repeated": false, "type": "SensorStatus", "lookup": true}, {"name": "units_display", "is_choice": false, "repeated": false, "type": "string", "lookup": false}, {"name": "timestamp", "is_choice": false, "repeated": false, "type": "google.protobuf.Timestamp", "lookup": true}, {"name": "value_update_rate", "is_choice": false, "repeated": false, "type": "uint32", "lookup": false}, {"name": "data_type", "is_choice": false, "repeated": false, "type": "string", "lookup": false}]}, {"name": "Component", "type": "message", "module": "hw", "fields": [{"name": "name", "is_choice": false, "repeated": false, "type": "string", "lookup": false}, {"name": "class", "is_choice": false, "repeated": false, "type": "ComponentType", "lookup": true}, {"name": "description", "is_choice": false, "repeated": false, "type": "string", "lookup": false}, {"name": "parent", "is_choice": false, "repeated": false, "type": "string", "lookup": false}, {"name": "parent_rel_pos", "is_choice": false, "repeated": false, "type": "int32", "lookup": false}, {"name": "children", "is_choice": false, "repeated": true, "type": "Component", "lookup": true}, {"name": "hardware_rev", "is_choice": false, "repeated": false, "type": "string", "lookup": false}, {"name": "firmware_rev", "is_choice": false, "repeated": false, "type": "string", "lookup": false}, {"name": "software_rev", "is_choice": false, "repeated": false, "type": "string", "lookup": false}, {"name": "serial_num", "is_choice": false, "repeated": false, "type": "string", "lookup": false}, {"name": "mfg_name", "is_choice": false, "repeated": false, "type": "string", "lookup": false}, {"name": "model_name", "is_choice": false, "repeated": false, "type": "string", "lookup": false}, {"name": "alias", "is_choice": false, "repeated": false, "type": "string", "lookup": false}, {"name": "asset_id", "is_choice": false, "repeated": false, "type": "string", "lookup": false}, {"name": "is_fru", "is_choice": false, "repeated": false, "type": "bool", "lookup": false}, {"name": "mfg_date", "is_choice": false, "repeated": false, "type": "google.protobuf.Timestamp", "lookup": true}, {"name": "uri", "is_choice": false, "repeated": false, "type": "Uri", "lookup": true}, {"name": "uuid", "is_choice": false, "repeated": false, "type": "Uuid", "lookup": true}, {"name": "state", "is_choice": false, "repeated": false, "type": "ComponentState", "lookup": true}, {"name": "sensor_data", "is_choice": false, "repeated": true, "type": "ComponentSensorData", "lookup": true}]}, {"name": "Hardware", "type": "message", "module": "hw", "fields": [{"name": "last_change", "is_choice": false, "repeated": false, "type": "google.protobuf.Timestamp", "lookup": true}, {"name": "root", "is_choice": false, "repeated": false, "type": "Component", "lookup": true}]}, {"name": "ModifiableComponent", "type": "message", "module": "hw", "fields": [{"name": "name", "is_choice": false, "repeated": false, "type": "string", "lookup": false}, {"name": "class", "is_choice": false, "repeated": false, "type": "ComponentType", "lookup": true}, {"name": "parent", "is_choice": false, "repeated": false, "type": "Component", "lookup": true}, {"name": "parent_rel_pos", "is_choice": false, "repeated": false, "type": "int32", "lookup": false}, {"name": "alias", "is_choice": false, "repeated": false, "type": "string", "lookup": false}, {"name": "asset_id", "is_choice": false, "repeated": false, "type": "string", "lookup": false}, {"name": "uri", "is_choice": false, "repeated": false, "type": "Uri", "lookup": true}, {"name": "admin_state", "is_choice": false, "repeated": false, "type": "ComponentAdminState", "lookup": true}]}, {"name": "MetricNames", "type": "enum", "module": "hw_metrics_mgmt_service", "values": ["METRIC_NAME_UNDEFINED", "METRIC_FAN_SPEED", "METRIC_CPU_TEMP", "METRIC_CPU_USAGE_PERCENTAGE", "METRIC_TRANSCEIVER_TEMP", "METRIC_TRANSCEIVER_VOLTAGE", "METRIC_TRANSCEIVER_BIAS", "METRIC_TRANSCEIVER_RX_POWER", "METRIC_TRANSCEIVER_TX_POWER", "METRIC_TRANSCEIVER_WAVELENGTH", "METRIC_DISK_TEMP", "METRIC_DISK_CAPACITY", "METRIC_DISK_USAGE", "METRIC_DISK_USAGE_PERCENTAGE", "METRIC_DISK_READ_WRITE_PERCENTAGE", "METRIC_DISK_FAULTY_CELLS_PERCENTAGE", "METRIC_RAM_TEMP", "METRIC_RAM_CAPACITY", "METRIC_RAM_USAGE", "METRIC_RAM_USAGE_PERCENTAGE", "METRIC_POWER_MAX", "METRIC_POWER_USAGE", "METRIC_POWER_USAGE_PERCENTAGE", "METRIC_INNER_SURROUNDING_TEMP"]}, {"name": "MetricConfig", "type": "message", "module": "hw_metrics_mgmt_service", "fields": [{"name": "metric_id", "is_choice": false, "repeated": false, "type": "MetricNames", "lookup": true}, {"name": "is_configured", "is_choice": false, "repeated": false, "type": "bool", "lookup": false}, {"name": "poll_interval", "is_choice": false, "repeated": false, "type": "uint32", "lookup": false}]}, {"name": "MetricsConfig", "type": "message", "module": "hw_metrics_mgmt_service", "fields": [{"name": "metrics", "is_choice": false, "repeated": true, "type": "MetricConfig", "lookup": true}]}, {"name": "ListMetricsResponse", "type": "message", "module": "hw_metrics_mgmt_service", "fields": [{"name": "status", "is_choice": false, "repeated": false, "type": "Status", "lookup": true}, {"name": "reason", "is_choice": false, "repeated": false, "type": "Reason", "lookup": true}, {"name": "metrics", "is_choice": false, "repeated": false, "type": "MetricsConfig", "lookup": true}]}, {"name": "MetricsConfigurationRequest", "type": "message", "module": "hw_metrics_mgmt_service", "fields": [{"name": "device_uuid", "is_choice": false, "repeated": false, "type": "Uuid", "lookup": true}, {"name": "operation", "is_choice": true, "cases": [{"name": "changes", "type": "MetricsConfig", "lookup": true}, {"name": "reset_to_default", "type": "bool", "lookup": false}]}]}, {"name": "MetricsConfigurationResponse", "type": "message", "module": "hw_metrics_mgmt_service", "fields": [{"name": "status", "is_choice": false, "repeated": false, "type": "Status", "lookup": true}, {"name": "reason", "is_choice": false, "repeated": false, "type": "Reason", "lookup": true}]}, {"name": "MetricMetaData", "type": "message", "module": "hw_metrics_mgmt_service", "fields": [{"name": "device_uuid", "is_choice": false, "repeated": false, "type": "Uuid", "lookup": true}, {"name": "component_uuid", "is_choice": false, "repeated": false, "type": "Uuid", "lookup": true}, {"name": "component_name", "is_choice": false, "repeated": false, "type": "string", "lookup": false}]}, {"name": "Metric", "type": "message", "module": "hw_metrics_mgmt_service", "fields": [{"name": "metric_id", "is_choice": false, "repeated": false, "type": "MetricNames", "lookup": true}, {"name": "metric_metadata", "is_choice": false, "repeated": false, "type": "MetricMetaData", "lookup": true}, {"name": "value", "is_choice": false, "repeated": false, "type": "ComponentSensorData", "lookup": true}]}, {"name": "GetMetricRequest", "type": "message", "module": "hw_metrics_mgmt_service", "fields": [{"name": "meta_data", "is_choice": false, "repeated": false, "type": "MetricMetaData", "lookup": true}, {"name": "metric_id", "is_choice": false, "repeated": false, "type": "MetricNames", "lookup": true}]}, {"name": "GetMetricResponse", "type": "message", "module": "hw_metrics_mgmt_service", "fields": [{"name": "status", "is_choice": false, "repeated": false, "type": "Status", "lookup": true}, {"name": "reason", "is_choice": false, "repeated": false, "type": "Reason", "lookup": true}, {"name": "metric", "is_choice": false, "repeated": false, "type": "Metric", "lookup": true}]}, {"name": "EventIds", "type": "enum", "module": "hw_events_mgmt_service", "values": ["EVENT_NAME_UNDEFINED", "EVENT_TRANSCEIVER_PLUG_OUT", "EVENT_TRANSCEIVER_PLUG_IN", "EVENT_TRANSCEIVER_VOLTAGE_ABOVE_THRESHOLD", "EVENT_TRANSCEIVER_VOLTAGE_BELOW_THRESHOLD", "EVENT_TRANSCEIVER_TEMPERATURE_ABOVE_THRESHOLD", "EVENT_TRANSCEIVER_TEMPERATURE_BELOW_THRESHOLD", "EVENT_TRANSCEIVER_CURRENT_ABOVE_THRESHOLD", "EVENT_TRANSCEIVER_CURRENT_BELOW_THRESHOLD", "EVENT_TRANSCEIVER_RX_POWER_ABOVE_THRESHOLD", "EVENT_TRANSCEIVER_RX_POWER_BELOW_THRESHOLD", "EVENT_TRANSCEIVER_TX_POWER_ABOVE_THRESHOLD", "EVENT_TRANSCEIVER_TX_POWER_BELOW_THRESHOLD", "EVENT_TRANSCEIVER_FAILURE", "EVENT_TRANSCEIVER_VOLTAGE_ABOVE_THRESHOLD_RECOVERED", "EVENT_TRANSCEIVER_VOLTAGE_BELOW_THRESHOLD_RECOVERED", "EVENT_TRANSCEIVER_TEMPERATURE_ABOVE_THRESHOLD_RECOVERED", "EVENT_TRANSCEIVER_TEMPERATURE_BELOW_THRESHOLD_RECOVERED", "EVENT_TRANSCEIVER_CURRENT_ABOVE_THRESHOLD_RECOVERED", "EVENT_TRANSCEIVER_CURRENT_BELOW_THRESHOLD_RECOVERED", "EVENT_TRANSCEIVER_RX_POWER_ABOVE_THRESHOLD_RECOVERED", "EVENT_TRANSCEIVER_RX_POWER_BELOW_THRESHOLD_RECOVERED", "EVENT_TRANSCEIVER_TX_POWER_ABOVE_THRESHOLD_RECOVERED", "EVENT_TRANSCEIVER_TX_POWER_BELOW_THRESHOLD_RECOVERED", "EVENT_TRANSCEIVER_FAILURE_RECOVERED", "EVENT_PSU_PLUG_OUT", "EVENT_PSU_PLUG_IN", "EVENT_PSU_FAILURE", "EVENT_PSU_FAILURE_RECOVERED", "EVENT_FAN_FAILURE", "EVENT_FAN_PLUG_OUT", "EVENT_FAN_PLUG_IN", "EVENT_FAN_FAILURE_RECOVERED", "EVENT_CPU_TEMPERATURE_ABOVE_CRITICAL", "EVENT_CPU_TEMPERATURE_ABOVE_FATAL", "EVENT_CPU_TEMPERATURE_ABOVE_CRITICAL_RECOVERED", "EVENT_CPU_TEMPERATURE_ABOVE_FATAL_RECOVERED", "EVENT_HW_DEVICE_RESET", "EVENT_HW_DEVICE_TEMPERATURE_ABOVE_CRITICAL", "EVENT_HW_DEVICE_TEMPERATURE_ABOVE_FATAL", "EVENT_HW_DEVICE_TEMPERATURE_ABOVE_CRITICAL_RECOVERED", "EVENT_HW_DEVICE_TEMPERATURE_ABOVE_FATAL_RECOVERED"]}, {"name": "ValueType", "type": "message", "module": "hw_events_mgmt_service", "fields": [{"name": "val", "is_choice": true, "cases": [{"name": "int_val", "type": "int64", "lookup": false}, {"name": "uint_val", "type": "uint64", "lookup": false}, {"name": "float_val", "type": "float", "lookup": false}]}]}, {"name": "WaterMarks", "type": "message", "module": "hw_events_mgmt_service", "fields": [{"name": "high", "is_choice": false, "repeated": false, "type": "ValueType", "lookup": true}, {"name": "low", "is_choice": false, "repeated": false, "type": "ValueType", "lookup": true}]}, {"name": "Thresholds", "type": "message", "module": "hw_events_mgmt_service", "fields": [{"name": "threshold", "is_choice": true, "cases": [{"name": "upper", "type": "WaterMarks", "lookup": true}, {"name": "lower", "type": "WaterMarks", "lookup": true}]}]}, {"name": "ThresholdInformation", "type": "message", "module": "hw_events_mgmt_service", "fields": [{"name": "observed_value", "is_choice": false, "repeated": false, "type": "ValueType", "lookup": true}, {"name": "thresholds", "is_choice": false, "repeated": false, "type": "Thresholds", "lookup": true}]}, {"name": "EventCfg", "type": "message", "module": "hw_events_mgmt_service", "fields": [{"name": "event_id", "is_choice": false, "repeated": false, "type": "EventIds", "lookup": true}, {"name": "is_configured", "is_choice": false, "repeated": false, "type": "bool", "lookup": false}, {"name": "thresholds", "is_choice": false, "repeated": false, "type": "Thresholds", "lookup": true}]}, {"name": "EventsCfg", "type": "message", "module": "hw_events_mgmt_service", "fields": [{"name": "items", "is_choice": false, "repeated": true, "type": "EventCfg", "lookup": true}]}, {"name": "ListEventsResponse", "type": "message", "module": "hw_events_mgmt_service", "fields": [{"name": "status", "is_choice": false, "repeated": false, "type": "Status", "lookup": true}, {"name": "reason", "is_choice": false, "repeated": false, "type": "Reason", "lookup": true}, {"name": "events", "is_choice": false, "repeated": false, "type": "EventsCfg", "lookup": true}]}, {"name": "EventsConfigurationRequest", "type": "message", "module": "hw_events_mgmt_service", "fields": [{"name": "device_uuid", "is_choice": false, "repeated": false, "type": "Uuid", "lookup": true}, {"name": "operation", "is_choice": true, "cases": [{"name": "changes", "type": "EventsCfg", "lookup": true}, {"name": "reset_to_default", "type": "bool", "lookup": false}]}]}, {"name": "EventsConfigurationResponse", "type": "message", "module": "hw_events_mgmt_service", "fields": [{"name": "status", "is_choice": false, "repeated": false, "type": "Status", "lookup": true}, {"name": "reason", "is_choice": false, "repeated": false, "type": "Reason", "lookup": true}]}, {"name": "EventMetaData", "type": "message", "module": "hw_events_mgmt_service", "fields": [{"name": "device_uuid", "is_choice": false, "repeated": false, "type": "Uuid", "lookup": true}, {"name": "component_uuid", "is_choice": false, "repeated": false, "type": "Uuid", "lookup": true}, {"name": "component_name", "is_choice": false, "repeated": false, "type": "string", "lookup": false}]}, {"name": "Event", "type": "message", "module": "hw_events_mgmt_service", "fields": [{"name": "event_metadata", "is_choice": false, "repeated": false, "type": "EventMetaData", "lookup": true}, {"name": "event_id", "is_choice": false, "repeated": false, "type": "EventIds", "lookup": true}, {"name": "raised_ts", "is_choice": false, "repeated": false, "type": "google.protobuf.Timestamp", "lookup": true}, {"name": "threshold_info", "is_choice": false, "repeated": false, "type": "ThresholdInformation", "lookup": true}, {"name": "add_info", "is_choice": false, "repeated": false, "type": "string", "lookup": false}]}, {"name": "ImageVersion", "type": "message", "module": "sw_image", "fields": [{"name": "image_name", "is_choice": false, "repeated": false, "type": "string", "lookup": false}, {"name": "version", "is_choice": false, "repeated": false, "type": "string", "lookup": false}]}, {"name": "ImageInformation", "type": "message", "module": "sw_image", "fields": [{"name": "image", "is_choice": false, "repeated": false, "type": "ImageVersion", "lookup": true}, {"name": "image_install_script", "is_choice": false, "repeated": false, "type": "string", "lookup": false}, {"name": "image_url", "is_choice": false, "repeated": false, "type": "string", "lookup": false}, {"name": "sha256sum", "is_choice": false, "repeated": false, "type": "string", "lookup": false}]}, {"name": "ImageState", "type": "enum", "module": "sw_image", "values": ["UNDEFINED_STATE", "COPYING_IMAGE", "INSTALLING_IMAGE", "COMMITTING_IMAGE", "REBOOTING_DEVICE", "UPGRADE_COMPLETE", "UPGRADE_FAILED", "ACTIVATION_COMPLETE", "ACTIVATION_FAILED"]}, {"name": "Reason", "type": "enum", "module": "sw_image", "values": ["UNDEFINED_REASON", "ERROR_IN_REQUEST", "INTERNAL_ERROR", "DEVICE_IN_WRONG_STATE", "INVALID_IMAGE", "WRONG_IMAGE_CHECKSUM"]}, {"name": "ImageStatus", "type": "message", "module": "sw_image", "fields": [{"name": "status", "is_choice": false, "repeated": false, "type": "Status", "lookup": true}, {"name": "reason", "is_choice": false, "repeated": false, "type": "Reason", "lookup": true}, {"name": "state", "is_choice": false, "repeated": false, "type": "ImageState", "lookup": true}, {"name": "description", "is_choice": false, "repeated": false, "type": "string", "lookup": false}]}, {"name": "PhysicalInventoryRequest", "type": "message", "module": "hw_management_service", "fields": [{"name": "device_uuid", "is_choice": false, "repeated": false, "type": "Uuid", "lookup": true}]}, {"name": "PhysicalInventoryResponse", "type": "message", "module": "hw_management_service", "fields": [{"name": "status", "is_choice": false, "repeated": false, "type": "Status", "lookup": true}, {"name": "reason", "is_choice": false, "repeated": false, "type": "Reason", "lookup": true}, {"name": "inventory", "is_choice": false, "repeated": false, "type": "Hardware", "lookup": true}]}, {"name": "HWComponentInfoGetRequest", "type": "message", "module": "hw_management_service", "fields": [{"name": "device_uuid", "is_choice": false, "repeated": false, "type": "Uuid", "lookup": true}, {"name": "component_uuid", "is_choice": false, "repeated": false, "type": "Uuid", "lookup": true}, {"name": "component_name", "is_choice": false, "repeated": false, "type": "string", "lookup": false}]}, {"name": "HWComponentInfoGetResponse", "type": "message", "module": "hw_management_service", "fields": [{"name": "status", "is_choice": false, "repeated": false, "type": "Status", "lookup": true}, {"name": "reason", "is_choice": false, "repeated": false, "type": "Reason", "lookup": true}, {"name": "component", "is_choice": false, "repeated": false, "type": "Component", "lookup": true}]}, {"name": "HWComponentInfoSetRequest", "type": "message", "module": "hw_management_service", "fields": [{"name": "device_uuid", "is_choice": false, "repeated": false, "type": "Uuid", "lookup": true}, {"name": "component_uuid", "is_choice": false, "repeated": false, "type": "Uuid", "lookup": true}, {"name": "component_name", "is_choice": false, "repeated": false, "type": "string", "lookup": false}, {"name": "changes", "is_choice": false, "repeated": false, "type": "ModifiableComponent", "lookup": true}]}, {"name": "HWComponentInfoSetResponse", "type": "message", "module": "hw_management_service", "fields": [{"name": "status", "is_choice": false, "repeated": false, "type": "Status", "lookup": true}, {"name": "reason", "is_choice": false, "repeated": false, "type": "Reason", "lookup": true}]}, {"name": "StartManagingDeviceResponse", "type": "message", "module": "hw_management_service", "fields": [{"name": "status", "is_choice": false, "repeated": false, "type": "Status", "lookup": true}, {"name": "reason", "is_choice": false, "repeated": false, "type": "Reason", "lookup": true}, {"name": "device_uuid", "is_choice": false, "repeated": false, "type": "Uuid", "lookup": true}]}, {"name": "StopManagingDeviceRequest", "type": "message", "module": "hw_management_service", "fields": [{"name": "name", "is_choice": false, "repeated": false, "type": "string", "lookup": false}]}, {"name": "StopManagingDeviceResponse", "type": "message", "module": "hw_management_service", "fields": [{"name": "status", "is_choice": false, "repeated": false, "type": "Status", "lookup": true}, {"name": "reason", "is_choice": false, "repeated": false, "type": "Reason", "lookup": true}]}, {"name": "ManagedDevicesResponse", "type": "message", "module": "hw_management_service", "fields": [{"name": "devices", "is_choice": false, "repeated": true, "type": "ModifiableComponent", "lookup": true}]}, {"name": "SetLoggingEndpointRequest", "type": "message", "module": "hw_management_service", "fields": [{"name": "device_uuid", "is_choice": false, "repeated": false, "type": "Uuid", "lookup": true}, {"name": "logging_endpoint", "is_choice": false, "repeated": false, "type": "string", "lookup": false}, {"name": "logging_protocol", "is_choice": false, "repeated": false, "type": "string", "lookup": false}]}, {"name": "SetRemoteEndpointResponse", "type": "message", "module": "hw_management_service", "fields": [{"name": "status", "is_choice": false, "repeated": false, "type": "Status", "lookup": true}, {"name": "reason", "is_choice": false, "repeated": false, "type": "Reason", "lookup": true}]}, {"name": "GetLoggingEndpointResponse", "type": "message", "module": "hw_management_service", "fields": [{"name": "status", "is_choice": false, "repeated": false, "type": "Status", "lookup": true}, {"name": "reason", "is_choice": false, "repeated": false, "type": "Reason", "lookup": true}, {"name": "logging_endpoint", "is_choice": false, "repeated": false, "type": "string", "lookup": false}, {"name": "logging_protocol", "is_choice": false, "repeated": false, "type": "string", "lookup": false}]}, {"name": "SetMsgBusEndpointRequest", "type": "message", "module": "hw_management_service", "fields": [{"name": "msgbus_endpoint", "is_choice": false, "repeated": false, "type": "string", "lookup": false}]}, {"name": "GetMsgBusEndpointResponse", "type": "message", "module": "hw_management_service", "fields": [{"name": "status", "is_choice": false, "repeated": false, "type": "Status", "lookup": true}, {"name": "reason", "is_choice": false, "repeated": false, "type": "Reason", "lookup": true}, {"name": "msgbus_endpoint", "is_choice": false, "repeated": false, "type": "string", "lookup": false}]}, {"name": "SoftwareVersionInformation", "type": "message", "module": "sw_management_service", "fields": [{"name": "active_versions", "is_choice": false, "repeated": true, "type": "ImageVersion", "lookup": true}, {"name": "standby_versions", "is_choice": false, "repeated": true, "type": "ImageVersion", "lookup": true}]}, {"name": "GetSoftwareVersionInformationResponse", "type": "message", "module": "sw_management_service", "fields": [{"name": "status", "is_choice": false, "repeated": false, "type": "Status", "lookup": true}, {"name": "reason", "is_choice": false, "repeated": false, "type": "Reason", "lookup": true}, {"name": "info", "is_choice": false, "repeated": false, "type": "SoftwareVersionInformation", "lookup": true}]}, {"name": "DownloadImageRequest", "type": "message", "module": "sw_management_service", "fields": [{"name": "device_uuid", "is_choice": false, "repeated": false, "type": "Uuid", "lookup": true}, {"name": "image_info", "is_choice": false, "repeated": false, "type": "ImageInformation", "lookup": true}]}], "services": [{"name": "NativeMetricsManagementService", "module": "hw_metrics_mgmt_service", "rpcs": [{"name": "ListMetrics", "request": {"is_stream": false, "type": "HardwareID", "lookup": true}, "response": {"is_stream": false, "type": "ListMetricsResponse", "lookup": true}}, {"name": "UpdateMetricsConfiguration", "request": {"is_stream": false, "type": "MetricsConfigurationRequest", "lookup": true}, "response": {"is_stream": false, "type": "MetricsConfigurationResponse", "lookup": true}}, {"name": "GetMetric", "request": {"is_stream": false, "type": "GetMetricRequest", "lookup": true}, "response": {"is_stream": false, "type": "GetMetricResponse", "lookup": true}}]}, {"name": "NativeEventsManagementService", "module": "hw_events_mgmt_service", "rpcs": [{"name": "ListEvents", "request": {"is_stream": false, "type": "HardwareID", "lookup": true}, "response": {"is_stream": false, "type": "ListEventsResponse", "lookup": true}}, {"name": "UpdateEventsConfiguration", "request": {"is_stream": false, "type": "EventsConfigurationRequest", "lookup": true}, "response": {"is_stream": false, "type": "EventsConfigurationResponse", "lookup": true}}]}, {"name": "NativeHWManagementService", "module": "hw_management_service", "rpcs": [{"name": "StartManagingDevice", "request": {"is_stream": false, "type": "ModifiableComponent", "lookup": true}, "response": {"is_stream": true, "type": "StartManagingDeviceResponse", "lookup": true}}, {"name": "StopManagingDevice", "request": {"is_stream": false, "type": "StopManagingDeviceRequest", "lookup": true}, "response": {"is_stream": false, "type": "StopManagingDeviceResponse", "lookup": true}}, {"name": "GetManagedDevices", "request": {"is_stream": false, "type": "google.protobuf.Empty", "lookup": false}, "response": {"is_stream": false, "type": "ManagedDevicesResponse", "lookup": true}}, {"name": "GetPhysicalInventory", "request": {"is_stream": false, "type": "PhysicalInventoryRequest", "lookup": true}, "response": {"is_stream": true, "type": "PhysicalInventoryResponse", "lookup": true}}, {"name": "GetHWComponentInfo", "request": {"is_stream": false, "type": "HWComponentInfoGetRequest", "lookup": true}, "response": {"is_stream": true, "type": "HWComponentInfoGetResponse", "lookup": true}}, {"name": "SetHWComponentInfo", "request": {"is_stream": false, "type": "HWComponentInfoSetRequest", "lookup": true}, "response": {"is_stream": false, "type": "HWComponentInfoSetResponse", "lookup": true}}, {"name": "SetLoggingEndpoint", "request": {"is_stream": false, "type": "SetLoggingEndpointRequest", "lookup": true}, "response": {"is_stream": false, "type": "SetRemoteEndpointResponse", "lookup": true}}, {"name": "GetLoggingEndpoint", "request": {"is_stream": false, "type": "Uuid", "lookup": true}, "response": {"is_stream": false, "type": "GetLoggingEndpointResponse", "lookup": true}}, {"name": "SetMsgBusEndpoint", "request": {"is_stream": false, "type": "SetMsgBusEndpointRequest", "lookup": true}, "response": {"is_stream": false, "type": "SetRemoteEndpointResponse", "lookup": true}}, {"name": "GetMsgBusEndpoint", "request": {"is_stream": false, "type": "google.protobuf.Empty", "lookup": false}, "response": {"is_stream": false, "type": "GetMsgBusEndpointResponse", "lookup": true}}]}, {"name": "NativeSoftwareManagementService", "module": "sw_management_service", "rpcs": [{"name": "GetSoftwareVersion", "request": {"is_stream": false, "type": "HardwareID", "lookup": true}, "response": {"is_stream": false, "type": "GetSoftwareVersionInformationResponse", "lookup": true}}, {"name": "DownloadImage", "request": {"is_stream": false, "type": "DownloadImageRequest", "lookup": true}, "response": {"is_stream": true, "type": "ImageStatus", "lookup": true}}, {"name": "ActivateImage", "request": {"is_stream": false, "type": "HardwareID", "lookup": true}, "response": {"is_stream": true, "type": "ImageStatus", "lookup": true}}, {"name": "RevertToStandbyImage", "request": {"is_stream": false, "type": "HardwareID", "lookup": true}, "response": {"is_stream": true, "type": "ImageStatus", "lookup": true}}]}]}
\ No newline at end of file
diff --git a/grpc_robot/services/dmi/dmi_0_9_1/hw_events_mgmt_service.py b/grpc_robot/services/dmi/dmi_0_9_1/hw_events_mgmt_service.py
new file mode 100644
index 0000000..26c1cfe
--- /dev/null
+++ b/grpc_robot/services/dmi/dmi_0_9_1/hw_events_mgmt_service.py
@@ -0,0 +1,38 @@
+# Copyright 2020-present Open Networking Foundation
+# Original copyright 2020-present ADTRAN, Inc.
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+from robot.api.deco import keyword
+from grpc_robot.services.service import is_connected
+
+from grpc_robot.services.service import Service
+from dmi import hw_events_mgmt_service_pb2_grpc, hw_events_mgmt_service_pb2, hw_pb2
+
+
+class NativeEventsManagementService(Service):
+
+ prefix = 'hw_event_mgmt_service_'
+
+ def __init__(self, ctx):
+ super().__init__(ctx=ctx, stub=hw_events_mgmt_service_pb2_grpc.NativeEventsManagementServiceStub)
+
+ # rpc ListEvents(HardwareID) returns(ListEventsResponse);
+ @keyword
+ @is_connected
+ def hw_event_mgmt_service_list_events(self, param_dict, **kwargs):
+ return self._grpc_helper(self.stub.ListEvents, hw_pb2.HardwareID, param_dict, **kwargs)
+
+ # rpc UpdateEventsConfiguration(EventsConfigurationRequest) returns(EventsConfigurationResponse);
+ @keyword
+ @is_connected
+ def hw_event_mgmt_service_update_events_configuration(self, param_dict, **kwargs):
+ return self._grpc_helper(self.stub.UpdateEventsConfiguration, hw_events_mgmt_service_pb2.EventsConfigurationRequest, param_dict, **kwargs)
diff --git a/grpc_robot/services/dmi/dmi_0_9_1/hw_management_service.py b/grpc_robot/services/dmi/dmi_0_9_1/hw_management_service.py
new file mode 100644
index 0000000..8d85b99
--- /dev/null
+++ b/grpc_robot/services/dmi/dmi_0_9_1/hw_management_service.py
@@ -0,0 +1,81 @@
+# Copyright 2020-present Open Networking Foundation
+# Original copyright 2020-present ADTRAN, Inc.
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+from robot.api.deco import keyword
+from grpc_robot.services.service import is_connected
+
+from grpc_robot.services.service import Service
+from dmi import hw_management_service_pb2_grpc, hw_management_service_pb2, hw_pb2
+
+
+class NativeHWManagementService(Service):
+
+ prefix = 'hw_management_service_'
+
+ def __init__(self, ctx):
+ super().__init__(ctx=ctx, stub=hw_management_service_pb2_grpc.NativeHWManagementServiceStub)
+
+ @keyword
+ @is_connected
+ def hw_management_service_start_managing_device(self, param_dict, **kwargs):
+ return self._grpc_helper(self.stub.StartManagingDevice, hw_pb2.ModifiableComponent, param_dict, **kwargs)
+
+ @keyword
+ @is_connected
+ def hw_management_service_stop_managing_device(self, param_dict, **kwargs):
+ return self._grpc_helper(self.stub.StopManagingDevice, hw_management_service_pb2.StopManagingDeviceRequest, param_dict, **kwargs)
+
+ @keyword
+ @is_connected
+ def hw_management_service_get_physical_inventory(self, param_dict, **kwargs):
+ return self._grpc_helper(self.stub.GetPhysicalInventory, hw_management_service_pb2.PhysicalInventoryRequest, param_dict, **kwargs)
+
+ @keyword
+ @is_connected
+ def hw_management_service_get_hw_component_info(self, param_dict, **kwargs):
+ return self._grpc_helper(self.stub.GetHWComponentInfo, hw_management_service_pb2.HWComponentInfoGetRequest, param_dict, **kwargs)
+
+ @keyword
+ @is_connected
+ def hw_management_service_set_hw_component_info(self, param_dict, **kwargs):
+ return self._grpc_helper(self.stub.SetHWComponentInfo, hw_management_service_pb2.HWComponentInfoSetRequest, param_dict, **kwargs)
+
+ # rpc GetManagedDevices(google.protobuf.Empty) returns(ManagedDevicesResponse);
+ @keyword
+ @is_connected
+ def hw_management_service_get_managed_devices(self, **kwargs):
+ return self._grpc_helper(self.stub.GetManagedDevices, hw_management_service_pb2.ManagedDevicesResponse, **kwargs)
+
+ # rpc SetLoggingEndpoint(SetLoggingEndpointRequest) returns(SetRemoteEndpointResponse);
+ @keyword
+ @is_connected
+ def hw_management_service_set_logging_endpoint(self, param_dict, **kwargs):
+ return self._grpc_helper(self.stub.SetLoggingEndpoint, hw_management_service_pb2.SetLoggingEndpointRequest, param_dict, **kwargs)
+
+ # rpc GetLoggingEndpoint(Uuid) returns(GetLoggingEndpointResponse);
+ @keyword
+ @is_connected
+ def hw_management_service_get_logging_endpoint(self, param_dict, **kwargs):
+ return self._grpc_helper(self.stub.GetLoggingEndpoint, hw_pb2.Uuid, param_dict, **kwargs)
+
+ # rpc SetMsgBusEndpoint(SetMsgBusEndpointRequest) returns(SetRemoteEndpointResponse);
+ @keyword
+ @is_connected
+ def hw_management_service_set_msg_bus_endpoint(self, param_dict, **kwargs):
+ return self._grpc_helper(self.stub.SetMsgBusEndpoint, hw_management_service_pb2.SetMsgBusEndpointRequest, param_dict, **kwargs)
+
+ # rpc GetMsgBusEndpoint(google.protobuf.Empty) returns(GetMsgBusEndpointResponse);
+ @keyword
+ @is_connected
+ def hw_management_service_get_msg_bus_endpoint(self, **kwargs):
+ return self._grpc_helper(self.stub.GetMsgBusEndpoint, hw_management_service_pb2.GetMsgBusEndpointResponse, **kwargs)
diff --git a/grpc_robot/services/dmi/dmi_0_9_1/hw_metrics_mgmt_service.py b/grpc_robot/services/dmi/dmi_0_9_1/hw_metrics_mgmt_service.py
new file mode 100644
index 0000000..0fb8940
--- /dev/null
+++ b/grpc_robot/services/dmi/dmi_0_9_1/hw_metrics_mgmt_service.py
@@ -0,0 +1,44 @@
+# Copyright 2020-present Open Networking Foundation
+# Original copyright 2020-present ADTRAN, Inc.
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+from robot.api.deco import keyword
+from grpc_robot.services.service import is_connected
+
+from grpc_robot.services.service import Service
+from dmi import hw_metrics_mgmt_service_pb2_grpc, hw_metrics_mgmt_service_pb2, hw_pb2
+
+
+class NativeMetricsManagementService(Service):
+
+ prefix = 'hw_metrics_mgmt_service_'
+
+ def __init__(self, ctx):
+ super().__init__(ctx=ctx, stub=hw_metrics_mgmt_service_pb2_grpc.NativeMetricsManagementServiceStub)
+
+ # rpc ListMetrics(HardwareID) returns(ListMetricsResponse);
+ @keyword
+ @is_connected
+ def hw_metrics_mgmt_service_list_metrics(self, param_dict, **kwargs):
+ return self._grpc_helper(self.stub.ListMetrics, hw_pb2.HardwareID, param_dict, **kwargs)
+
+ # rpc UpdateMetricsConfiguration(MetricsConfigurationRequest) returns(MetricsConfigurationResponse);
+ @keyword
+ @is_connected
+ def hw_metrics_mgmt_service_update_metrics_configuration(self, param_dict, **kwargs):
+ return self._grpc_helper(self.stub.UpdateMetricsConfiguration, hw_metrics_mgmt_service_pb2.MetricsConfigurationRequest, param_dict, **kwargs)
+
+ # rpc GetMetric(GetMetricRequest) returns(GetMetricResponse);
+ @keyword
+ @is_connected
+ def hw_metrics_mgmt_service_get_metric(self, param_dict, **kwargs):
+ return self._grpc_helper(self.stub.GetMetric, hw_metrics_mgmt_service_pb2.GetMetricRequest, param_dict, **kwargs)
diff --git a/grpc_robot/services/dmi/dmi_0_9_1/sw_management_service.py b/grpc_robot/services/dmi/dmi_0_9_1/sw_management_service.py
new file mode 100644
index 0000000..e844b23
--- /dev/null
+++ b/grpc_robot/services/dmi/dmi_0_9_1/sw_management_service.py
@@ -0,0 +1,46 @@
+# Copyright 2020-present Open Networking Foundation
+# Original copyright 2020-present ADTRAN, Inc.
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+from robot.api.deco import keyword
+from grpc_robot.services.service import is_connected
+
+from grpc_robot.services.service import Service
+from dmi import sw_management_service_pb2_grpc, sw_management_service_pb2, hw_pb2
+
+
+class NativeSoftwareManagementService(Service):
+
+ prefix = 'sw_management_service_'
+
+ def __init__(self, ctx):
+ super().__init__(ctx=ctx, stub=sw_management_service_pb2_grpc.NativeSoftwareManagementServiceStub)
+
+ @keyword
+ @is_connected
+ def sw_management_service_get_software_version(self, param_dict, **kwargs):
+ return self._grpc_helper(self.stub.GetSoftwareVersion, hw_pb2.HardwareID, param_dict, **kwargs)
+
+ @keyword
+ @is_connected
+ def sw_management_service_download_image(self, param_dict, **kwargs):
+ return self._grpc_helper(self.stub.DownloadImage, sw_management_service_pb2.DownloadImageRequest, param_dict, **kwargs)
+
+ @keyword
+ @is_connected
+ def sw_management_service_activate_image(self, param_dict, **kwargs):
+ return self._grpc_helper(self.stub.ActivateImage, hw_pb2.HardwareID, param_dict, **kwargs)
+
+ @keyword
+ @is_connected
+ def sw_management_service_revert_to_standby_image(self, param_dict, **kwargs):
+ return self._grpc_helper(self.stub.RevertToStandbyImage, hw_pb2.HardwareID, param_dict, **kwargs)
diff --git a/grpc_robot/services/dmi/dmi_0_9_2/__init__.py b/grpc_robot/services/dmi/dmi_0_9_2/__init__.py
new file mode 100644
index 0000000..789917d
--- /dev/null
+++ b/grpc_robot/services/dmi/dmi_0_9_2/__init__.py
@@ -0,0 +1,17 @@
+# Copyright 2020-present Open Networking Foundation
+# Original copyright 2020-present ADTRAN, Inc.
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+from ..dmi_0_9_1.hw_events_mgmt_service import *
+from ..dmi_0_9_1.hw_metrics_mgmt_service import *
+from ..dmi_0_9_1.sw_management_service import *
+from .hw_management_service import *
diff --git a/grpc_robot/services/dmi/dmi_0_9_2/dmi.json b/grpc_robot/services/dmi/dmi_0_9_2/dmi.json
new file mode 100644
index 0000000..14850b9
--- /dev/null
+++ b/grpc_robot/services/dmi/dmi_0_9_2/dmi.json
@@ -0,0 +1 @@
+{"modules": [{"name": "commons", "imports": []}, {"name": "hw", "imports": ["timestamp"]}, {"name": "hw_metrics_mgmt_service", "imports": ["commons", "hw"]}, {"name": "hw_events_mgmt_service", "imports": ["commons", "hw", "timestamp"]}, {"name": "sw_image", "imports": ["commons"]}, {"name": "hw_management_service", "imports": ["commons", "hw", "empty"]}, {"name": "sw_management_service", "imports": ["commons", "hw", "sw_image"]}], "data_types": [{"name": "Status", "type": "enum", "module": "commons", "values": {"0": "UNDEFINED_STATUS", "1": "OK_STATUS", "2": "ERROR_STATUS"}}, {"name": "Reason", "type": "enum", "module": "commons", "values": {"0": "UNDEFINED_REASON", "1": "UNKNOWN_DEVICE", "2": "INTERNAL_ERROR", "3": "WRONG_METRIC", "4": "WRONG_EVENT", "5": "LOGGING_ENDPOINT_ERROR", "6": "LOGGING_ENDPOINT_PROTOCOL_ERROR", "7": "KAFKA_ENDPOINT_ERROR"}}, {"name": "LogLevel", "type": "enum", "module": "commons", "values": {"0": "TRACE", "1": "DEBUG", "2": "INFO", "3": "WARN", "4": "ERROR"}}, {"name": "Uuid", "type": "message", "module": "hw", "fields": [{"name": "uuid", "is_choice": false, "repeated": false, "type": "string", "lookup": false}]}, {"name": "HardwareID", "type": "message", "module": "hw", "fields": [{"name": "uuid", "is_choice": false, "repeated": false, "type": "Uuid", "lookup": true}]}, {"name": "Uri", "type": "message", "module": "hw", "fields": [{"name": "uri", "is_choice": false, "repeated": false, "type": "string", "lookup": false}]}, {"name": "ComponentType", "type": "enum", "module": "hw", "values": {"0": "COMPONENT_TYPE_UNDEFINED", "1": "COMPONENT_TYPE_UNKNOWN", "2": "COMPONENT_TYPE_CHASSIS", "3": "COMPONENT_TYPE_BACKPLANE", "4": "COMPONENT_TYPE_CONTAINER", "5": "COMPONENT_TYPE_POWER_SUPPLY", "6": "COMPONENT_TYPE_FAN", "7": "COMPONENT_TYPE_SENSOR", "8": "COMPONENT_TYPE_MODULE", "9": "COMPONENT_TYPE_PORT", "10": "COMPONENT_TYPE_CPU", "11": "COMPONENT_TYPE_BATTERY", "12": "COMPONENT_TYPE_STORAGE", "13": "COMPONENT_TYPE_MEMORY", "14": "COMPONENT_TYPE_TRANSCEIVER", "15": "COMPONENT_TYPE_GPON_TRANSCEIVER", "16": "COMPONENT_TYPE_XGS_PON_TRANSCEIVER"}}, {"name": "ComponentAdminState", "type": "enum", "module": "hw", "values": {"0": "COMP_ADMIN_STATE_UNDEFINED", "1": "COMP_ADMIN_STATE_UNKNOWN", "2": "COMP_ADMIN_STATE_LOCKED", "3": "COMP_ADMIN_STATE_SHUTTING_DOWN", "4": "COMP_ADMIN_STATE_UNLOCKED"}}, {"name": "ComponentOperState", "type": "enum", "module": "hw", "values": {"0": "COMP_OPER_STATE_UNDEFINED", "1": "COMP_OPER_STATE_UNKNOWN", "2": "COMP_OPER_STATE_DISABLED", "3": "COMP_OPER_STATE_ENABLED", "4": "COMP_OPER_STATE_TESTING"}}, {"name": "ComponentUsageState", "type": "enum", "module": "hw", "values": {"0": "COMP_USAGE_STATE_UNDEFINED", "1": "COMP_USAGE_STATE_UNKNOWN", "2": "COMP_USAGE_STATE_IDLE", "3": "COMP_USAGE_STATE_ACTIVE", "4": "COMP_USAGE_STATE_BUSY"}}, {"name": "ComponentAlarmState", "type": "enum", "module": "hw", "values": {"0": "COMP_ALARM_STATE_UNDEFINED", "1": "COMP_ALARM_STATE_UNKNOWN", "2": "COMP_ALARM_STATE_UNDER_REPAIR", "3": "COMP_ALARM_STATE_CRITICAL", "4": "COMP_ALARM_STATE_MAJOR", "5": "COMP_ALARM_STATE_MINOR", "6": "COMP_ALARM_STATE_WARNING", "7": "COMP_ALARM_STATE_INTERMEDIATE"}}, {"name": "ComponentStandbyState", "type": "enum", "module": "hw", "values": {"0": "COMP_STANDBY_STATE_UNDEFINED", "1": "COMP_STANDBY_STATE_UNKNOWN", "2": "COMP_STANDBY_STATE_HOT", "3": "COMP_STANDBY_STATE_COLD", "4": "COMP_STANDBY_STATE_PROVIDING_SERVICE"}}, {"name": "ComponentState", "type": "message", "module": "hw", "fields": [{"name": "state_last_changed", "is_choice": false, "repeated": false, "type": "google.protobuf.Timestamp", "lookup": true}, {"name": "admin_state", "is_choice": false, "repeated": false, "type": "ComponentAdminState", "lookup": true}, {"name": "oper_state", "is_choice": false, "repeated": false, "type": "ComponentOperState", "lookup": true}, {"name": "usage_state", "is_choice": false, "repeated": false, "type": "ComponentUsageState", "lookup": true}, {"name": "alarm_state", "is_choice": false, "repeated": false, "type": "ComponentAlarmState", "lookup": true}, {"name": "standby_state", "is_choice": false, "repeated": false, "type": "ComponentStandbyState", "lookup": true}]}, {"name": "SensorValueType", "type": "enum", "module": "hw", "values": {"0": "SENSOR_VALUE_TYPE_UNDEFINED", "1": "SENSOR_VALUE_TYPE_OTHER", "2": "SENSOR_VALUE_TYPE_UNKNOWN", "3": "SENSOR_VALUE_TYPE_VOLTS_AC", "4": "SENSOR_VALUE_TYPE_VOLTS_DC", "5": "SENSOR_VALUE_TYPE_AMPERES", "6": "SENSOR_VALUE_TYPE_WATTS", "7": "SENSOR_VALUE_TYPE_HERTZ", "8": "SENSOR_VALUE_TYPE_CELSIUS", "9": "SENSOR_VALUE_TYPE_PERCENT_RH", "10": "SENSOR_VALUE_TYPE_RPM", "11": "SENSOR_VALUE_TYPE_CMM", "12": "SENSOR_VALUE_TYPE_TRUTH_VALUE"}}, {"name": "SensorValueScale", "type": "enum", "module": "hw", "values": {"0": "SENSOR_VALUE_SCALE_UNDEFINED", "1": "SENSOR_VALUE_SCALE_YOCTO", "2": "SENSOR_VALUE_SCALE_ZEPTO", "3": "SENSOR_VALUE_SCALE_ATTO", "4": "SENSOR_VALUE_SCALE_FEMTO", "5": "SENSOR_VALUE_SCALE_PICO", "6": "SENSOR_VALUE_SCALE_NANO", "7": "SENSOR_VALUE_SCALE_MICRO", "8": "SENSOR_VALUE_SCALE_MILLI", "9": "SENSOR_VALUE_SCALE_UNITS", "10": "SENSOR_VALUE_SCALE_KILO", "11": "SENSOR_VALUE_SCALE_MEGA", "12": "SENSOR_VALUE_SCALE_GIGA", "13": "SENSOR_VALUE_SCALE_TERA", "14": "SENSOR_VALUE_SCALE_PETA", "15": "SENSOR_VALUE_SCALE_EXA", "16": "SENSOR_VALUE_SCALE_ZETTA", "17": "SENSOR_VALUE_SCALE_YOTTA"}}, {"name": "SensorStatus", "type": "enum", "module": "hw", "values": {"0": "SENSOR_STATUS_UNDEFINED", "1": "SENSOR_STATUS_OK", "2": "SENSOR_STATUS_UNAVAILABLE", "3": "SENSOR_STATUS_NONOPERATIONAL"}}, {"name": "ComponentSensorData", "type": "message", "module": "hw", "fields": [{"name": "value", "is_choice": false, "repeated": false, "type": "int32", "lookup": false}, {"name": "type", "is_choice": false, "repeated": false, "type": "SensorValueType", "lookup": true}, {"name": "scale", "is_choice": false, "repeated": false, "type": "SensorValueScale", "lookup": true}, {"name": "precision", "is_choice": false, "repeated": false, "type": "int32", "lookup": false}, {"name": "status", "is_choice": false, "repeated": false, "type": "SensorStatus", "lookup": true}, {"name": "units_display", "is_choice": false, "repeated": false, "type": "string", "lookup": false}, {"name": "timestamp", "is_choice": false, "repeated": false, "type": "google.protobuf.Timestamp", "lookup": true}, {"name": "value_update_rate", "is_choice": false, "repeated": false, "type": "uint32", "lookup": false}, {"name": "data_type", "is_choice": false, "repeated": false, "type": "string", "lookup": false}]}, {"name": "Component", "type": "message", "module": "hw", "fields": [{"name": "name", "is_choice": false, "repeated": false, "type": "string", "lookup": false}, {"name": "class", "is_choice": false, "repeated": false, "type": "ComponentType", "lookup": true}, {"name": "description", "is_choice": false, "repeated": false, "type": "string", "lookup": false}, {"name": "parent", "is_choice": false, "repeated": false, "type": "string", "lookup": false}, {"name": "parent_rel_pos", "is_choice": false, "repeated": false, "type": "int32", "lookup": false}, {"name": "children", "is_choice": false, "repeated": true, "type": "Component", "lookup": true}, {"name": "hardware_rev", "is_choice": false, "repeated": false, "type": "string", "lookup": false}, {"name": "firmware_rev", "is_choice": false, "repeated": false, "type": "string", "lookup": false}, {"name": "software_rev", "is_choice": false, "repeated": false, "type": "string", "lookup": false}, {"name": "serial_num", "is_choice": false, "repeated": false, "type": "string", "lookup": false}, {"name": "mfg_name", "is_choice": false, "repeated": false, "type": "string", "lookup": false}, {"name": "model_name", "is_choice": false, "repeated": false, "type": "string", "lookup": false}, {"name": "alias", "is_choice": false, "repeated": false, "type": "string", "lookup": false}, {"name": "asset_id", "is_choice": false, "repeated": false, "type": "string", "lookup": false}, {"name": "is_fru", "is_choice": false, "repeated": false, "type": "bool", "lookup": false}, {"name": "mfg_date", "is_choice": false, "repeated": false, "type": "google.protobuf.Timestamp", "lookup": true}, {"name": "uri", "is_choice": false, "repeated": false, "type": "Uri", "lookup": true}, {"name": "uuid", "is_choice": false, "repeated": false, "type": "Uuid", "lookup": true}, {"name": "state", "is_choice": false, "repeated": false, "type": "ComponentState", "lookup": true}, {"name": "sensor_data", "is_choice": false, "repeated": true, "type": "ComponentSensorData", "lookup": true}]}, {"name": "Hardware", "type": "message", "module": "hw", "fields": [{"name": "last_change", "is_choice": false, "repeated": false, "type": "google.protobuf.Timestamp", "lookup": true}, {"name": "root", "is_choice": false, "repeated": false, "type": "Component", "lookup": true}]}, {"name": "ModifiableComponent", "type": "message", "module": "hw", "fields": [{"name": "name", "is_choice": false, "repeated": false, "type": "string", "lookup": false}, {"name": "class", "is_choice": false, "repeated": false, "type": "ComponentType", "lookup": true}, {"name": "parent", "is_choice": false, "repeated": false, "type": "Component", "lookup": true}, {"name": "parent_rel_pos", "is_choice": false, "repeated": false, "type": "int32", "lookup": false}, {"name": "alias", "is_choice": false, "repeated": false, "type": "string", "lookup": false}, {"name": "asset_id", "is_choice": false, "repeated": false, "type": "string", "lookup": false}, {"name": "uri", "is_choice": false, "repeated": false, "type": "Uri", "lookup": true}, {"name": "admin_state", "is_choice": false, "repeated": false, "type": "ComponentAdminState", "lookup": true}]}, {"name": "MetricNames", "type": "enum", "module": "hw_metrics_mgmt_service", "values": {"0": "METRIC_NAME_UNDEFINED", "1": "METRIC_FAN_SPEED", "100": "METRIC_CPU_TEMP", "101": "METRIC_CPU_USAGE_PERCENTAGE", "200": "METRIC_TRANSCEIVER_TEMP", "201": "METRIC_TRANSCEIVER_VOLTAGE", "202": "METRIC_TRANSCEIVER_BIAS", "203": "METRIC_TRANSCEIVER_RX_POWER", "204": "METRIC_TRANSCEIVER_TX_POWER", "205": "METRIC_TRANSCEIVER_WAVELENGTH", "300": "METRIC_DISK_TEMP", "301": "METRIC_DISK_CAPACITY", "302": "METRIC_DISK_USAGE", "303": "METRIC_DISK_USAGE_PERCENTAGE", "304": "METRIC_DISK_READ_WRITE_PERCENTAGE", "305": "METRIC_DISK_FAULTY_CELLS_PERCENTAGE", "400": "METRIC_RAM_TEMP", "401": "METRIC_RAM_CAPACITY", "402": "METRIC_RAM_USAGE", "403": "METRIC_RAM_USAGE_PERCENTAGE", "500": "METRIC_POWER_MAX", "501": "METRIC_POWER_USAGE", "502": "METRIC_POWER_USAGE_PERCENTAGE", "600": "METRIC_INNER_SURROUNDING_TEMP"}}, {"name": "MetricConfig", "type": "message", "module": "hw_metrics_mgmt_service", "fields": [{"name": "metric_id", "is_choice": false, "repeated": false, "type": "MetricNames", "lookup": true}, {"name": "is_configured", "is_choice": false, "repeated": false, "type": "bool", "lookup": false}, {"name": "poll_interval", "is_choice": false, "repeated": false, "type": "uint32", "lookup": false}]}, {"name": "MetricsConfig", "type": "message", "module": "hw_metrics_mgmt_service", "fields": [{"name": "metrics", "is_choice": false, "repeated": true, "type": "MetricConfig", "lookup": true}]}, {"name": "ListMetricsResponse", "type": "message", "module": "hw_metrics_mgmt_service", "fields": [{"name": "status", "is_choice": false, "repeated": false, "type": "Status", "lookup": true}, {"name": "reason", "is_choice": false, "repeated": false, "type": "Reason", "lookup": true}, {"name": "metrics", "is_choice": false, "repeated": false, "type": "MetricsConfig", "lookup": true}]}, {"name": "MetricsConfigurationRequest", "type": "message", "module": "hw_metrics_mgmt_service", "fields": [{"name": "device_uuid", "is_choice": false, "repeated": false, "type": "Uuid", "lookup": true}, {"name": "operation", "is_choice": true, "cases": [{"name": "changes", "type": "MetricsConfig", "lookup": true}, {"name": "reset_to_default", "type": "bool", "lookup": false}]}]}, {"name": "MetricsConfigurationResponse", "type": "message", "module": "hw_metrics_mgmt_service", "fields": [{"name": "status", "is_choice": false, "repeated": false, "type": "Status", "lookup": true}, {"name": "reason", "is_choice": false, "repeated": false, "type": "Reason", "lookup": true}]}, {"name": "MetricMetaData", "type": "message", "module": "hw_metrics_mgmt_service", "fields": [{"name": "device_uuid", "is_choice": false, "repeated": false, "type": "Uuid", "lookup": true}, {"name": "component_uuid", "is_choice": false, "repeated": false, "type": "Uuid", "lookup": true}, {"name": "component_name", "is_choice": false, "repeated": false, "type": "string", "lookup": false}]}, {"name": "Metric", "type": "message", "module": "hw_metrics_mgmt_service", "fields": [{"name": "metric_id", "is_choice": false, "repeated": false, "type": "MetricNames", "lookup": true}, {"name": "metric_metadata", "is_choice": false, "repeated": false, "type": "MetricMetaData", "lookup": true}, {"name": "value", "is_choice": false, "repeated": false, "type": "ComponentSensorData", "lookup": true}]}, {"name": "GetMetricRequest", "type": "message", "module": "hw_metrics_mgmt_service", "fields": [{"name": "meta_data", "is_choice": false, "repeated": false, "type": "MetricMetaData", "lookup": true}, {"name": "metric_id", "is_choice": false, "repeated": false, "type": "MetricNames", "lookup": true}]}, {"name": "GetMetricResponse", "type": "message", "module": "hw_metrics_mgmt_service", "fields": [{"name": "status", "is_choice": false, "repeated": false, "type": "Status", "lookup": true}, {"name": "reason", "is_choice": false, "repeated": false, "type": "Reason", "lookup": true}, {"name": "metric", "is_choice": false, "repeated": false, "type": "Metric", "lookup": true}]}, {"name": "EventIds", "type": "enum", "module": "hw_events_mgmt_service", "values": {"0": "EVENT_NAME_UNDEFINED", "100": "EVENT_TRANSCEIVER_PLUG_OUT", "101": "EVENT_TRANSCEIVER_PLUG_IN", "102": "EVENT_TRANSCEIVER_VOLTAGE_ABOVE_THRESHOLD", "103": "EVENT_TRANSCEIVER_VOLTAGE_BELOW_THRESHOLD", "104": "EVENT_TRANSCEIVER_TEMPERATURE_ABOVE_THRESHOLD", "105": "EVENT_TRANSCEIVER_TEMPERATURE_BELOW_THRESHOLD", "106": "EVENT_TRANSCEIVER_CURRENT_ABOVE_THRESHOLD", "107": "EVENT_TRANSCEIVER_CURRENT_BELOW_THRESHOLD", "108": "EVENT_TRANSCEIVER_RX_POWER_ABOVE_THRESHOLD", "109": "EVENT_TRANSCEIVER_RX_POWER_BELOW_THRESHOLD", "110": "EVENT_TRANSCEIVER_TX_POWER_ABOVE_THRESHOLD", "111": "EVENT_TRANSCEIVER_TX_POWER_BELOW_THRESHOLD", "112": "EVENT_TRANSCEIVER_FAILURE", "113": "EVENT_TRANSCEIVER_VOLTAGE_ABOVE_THRESHOLD_RECOVERED", "114": "EVENT_TRANSCEIVER_VOLTAGE_BELOW_THRESHOLD_RECOVERED", "115": "EVENT_TRANSCEIVER_TEMPERATURE_ABOVE_THRESHOLD_RECOVERED", "116": "EVENT_TRANSCEIVER_TEMPERATURE_BELOW_THRESHOLD_RECOVERED", "117": "EVENT_TRANSCEIVER_CURRENT_ABOVE_THRESHOLD_RECOVERED", "118": "EVENT_TRANSCEIVER_CURRENT_BELOW_THRESHOLD_RECOVERED", "119": "EVENT_TRANSCEIVER_RX_POWER_ABOVE_THRESHOLD_RECOVERED", "120": "EVENT_TRANSCEIVER_RX_POWER_BELOW_THRESHOLD_RECOVERED", "121": "EVENT_TRANSCEIVER_TX_POWER_ABOVE_THRESHOLD_RECOVERED", "122": "EVENT_TRANSCEIVER_TX_POWER_BELOW_THRESHOLD_RECOVERED", "123": "EVENT_TRANSCEIVER_FAILURE_RECOVERED", "200": "EVENT_PSU_PLUG_OUT", "201": "EVENT_PSU_PLUG_IN", "202": "EVENT_PSU_FAILURE", "203": "EVENT_PSU_FAILURE_RECOVERED", "300": "EVENT_FAN_FAILURE", "301": "EVENT_FAN_PLUG_OUT", "302": "EVENT_FAN_PLUG_IN", "303": "EVENT_FAN_FAILURE_RECOVERED", "400": "EVENT_CPU_TEMPERATURE_ABOVE_CRITICAL", "401": "EVENT_CPU_TEMPERATURE_ABOVE_FATAL", "402": "EVENT_CPU_TEMPERATURE_ABOVE_CRITICAL_RECOVERED", "403": "EVENT_CPU_TEMPERATURE_ABOVE_FATAL_RECOVERED", "500": "EVENT_HW_DEVICE_RESET", "501": "EVENT_HW_DEVICE_TEMPERATURE_ABOVE_CRITICAL", "502": "EVENT_HW_DEVICE_TEMPERATURE_ABOVE_FATAL", "503": "EVENT_HW_DEVICE_TEMPERATURE_ABOVE_CRITICAL_RECOVERED", "504": "EVENT_HW_DEVICE_TEMPERATURE_ABOVE_FATAL_RECOVERED"}}, {"name": "ValueType", "type": "message", "module": "hw_events_mgmt_service", "fields": [{"name": "val", "is_choice": true, "cases": [{"name": "int_val", "type": "int64", "lookup": false}, {"name": "uint_val", "type": "uint64", "lookup": false}, {"name": "float_val", "type": "float", "lookup": false}]}]}, {"name": "WaterMarks", "type": "message", "module": "hw_events_mgmt_service", "fields": [{"name": "high", "is_choice": false, "repeated": false, "type": "ValueType", "lookup": true}, {"name": "low", "is_choice": false, "repeated": false, "type": "ValueType", "lookup": true}]}, {"name": "Thresholds", "type": "message", "module": "hw_events_mgmt_service", "fields": [{"name": "threshold", "is_choice": true, "cases": [{"name": "upper", "type": "WaterMarks", "lookup": true}, {"name": "lower", "type": "WaterMarks", "lookup": true}]}]}, {"name": "ThresholdInformation", "type": "message", "module": "hw_events_mgmt_service", "fields": [{"name": "observed_value", "is_choice": false, "repeated": false, "type": "ValueType", "lookup": true}, {"name": "thresholds", "is_choice": false, "repeated": false, "type": "Thresholds", "lookup": true}]}, {"name": "EventCfg", "type": "message", "module": "hw_events_mgmt_service", "fields": [{"name": "event_id", "is_choice": false, "repeated": false, "type": "EventIds", "lookup": true}, {"name": "is_configured", "is_choice": false, "repeated": false, "type": "bool", "lookup": false}, {"name": "thresholds", "is_choice": false, "repeated": false, "type": "Thresholds", "lookup": true}]}, {"name": "EventsCfg", "type": "message", "module": "hw_events_mgmt_service", "fields": [{"name": "items", "is_choice": false, "repeated": true, "type": "EventCfg", "lookup": true}]}, {"name": "ListEventsResponse", "type": "message", "module": "hw_events_mgmt_service", "fields": [{"name": "status", "is_choice": false, "repeated": false, "type": "Status", "lookup": true}, {"name": "reason", "is_choice": false, "repeated": false, "type": "Reason", "lookup": true}, {"name": "events", "is_choice": false, "repeated": false, "type": "EventsCfg", "lookup": true}]}, {"name": "EventsConfigurationRequest", "type": "message", "module": "hw_events_mgmt_service", "fields": [{"name": "device_uuid", "is_choice": false, "repeated": false, "type": "Uuid", "lookup": true}, {"name": "operation", "is_choice": true, "cases": [{"name": "changes", "type": "EventsCfg", "lookup": true}, {"name": "reset_to_default", "type": "bool", "lookup": false}]}]}, {"name": "EventsConfigurationResponse", "type": "message", "module": "hw_events_mgmt_service", "fields": [{"name": "status", "is_choice": false, "repeated": false, "type": "Status", "lookup": true}, {"name": "reason", "is_choice": false, "repeated": false, "type": "Reason", "lookup": true}]}, {"name": "EventMetaData", "type": "message", "module": "hw_events_mgmt_service", "fields": [{"name": "device_uuid", "is_choice": false, "repeated": false, "type": "Uuid", "lookup": true}, {"name": "component_uuid", "is_choice": false, "repeated": false, "type": "Uuid", "lookup": true}, {"name": "component_name", "is_choice": false, "repeated": false, "type": "string", "lookup": false}]}, {"name": "Event", "type": "message", "module": "hw_events_mgmt_service", "fields": [{"name": "event_metadata", "is_choice": false, "repeated": false, "type": "EventMetaData", "lookup": true}, {"name": "event_id", "is_choice": false, "repeated": false, "type": "EventIds", "lookup": true}, {"name": "raised_ts", "is_choice": false, "repeated": false, "type": "google.protobuf.Timestamp", "lookup": true}, {"name": "threshold_info", "is_choice": false, "repeated": false, "type": "ThresholdInformation", "lookup": true}, {"name": "add_info", "is_choice": false, "repeated": false, "type": "string", "lookup": false}]}, {"name": "ImageVersion", "type": "message", "module": "sw_image", "fields": [{"name": "image_name", "is_choice": false, "repeated": false, "type": "string", "lookup": false}, {"name": "version", "is_choice": false, "repeated": false, "type": "string", "lookup": false}]}, {"name": "ImageInformation", "type": "message", "module": "sw_image", "fields": [{"name": "image", "is_choice": false, "repeated": false, "type": "ImageVersion", "lookup": true}, {"name": "image_install_script", "is_choice": false, "repeated": false, "type": "string", "lookup": false}, {"name": "image_url", "is_choice": false, "repeated": false, "type": "string", "lookup": false}, {"name": "sha256sum", "is_choice": false, "repeated": false, "type": "string", "lookup": false}]}, {"name": "ImageState", "type": "enum", "module": "sw_image", "values": {"0": "UNDEFINED_STATE", "1": "COPYING_IMAGE", "2": "INSTALLING_IMAGE", "3": "COMMITTING_IMAGE", "4": "REBOOTING_DEVICE", "5": "UPGRADE_COMPLETE", "6": "UPGRADE_FAILED", "7": "ACTIVATION_COMPLETE", "8": "ACTIVATION_FAILED"}}, {"name": "Reason", "type": "enum", "module": "sw_image", "values": {"0": "UNDEFINED_REASON", "1": "ERROR_IN_REQUEST", "2": "INTERNAL_ERROR", "3": "DEVICE_IN_WRONG_STATE", "4": "INVALID_IMAGE", "5": "WRONG_IMAGE_CHECKSUM"}}, {"name": "ImageStatus", "type": "message", "module": "sw_image", "fields": [{"name": "status", "is_choice": false, "repeated": false, "type": "Status", "lookup": true}, {"name": "reason", "is_choice": false, "repeated": false, "type": "Reason", "lookup": true}, {"name": "state", "is_choice": false, "repeated": false, "type": "ImageState", "lookup": true}, {"name": "description", "is_choice": false, "repeated": false, "type": "string", "lookup": false}]}, {"name": "PhysicalInventoryRequest", "type": "message", "module": "hw_management_service", "fields": [{"name": "device_uuid", "is_choice": false, "repeated": false, "type": "Uuid", "lookup": true}]}, {"name": "PhysicalInventoryResponse", "type": "message", "module": "hw_management_service", "fields": [{"name": "status", "is_choice": false, "repeated": false, "type": "Status", "lookup": true}, {"name": "reason", "is_choice": false, "repeated": false, "type": "Reason", "lookup": true}, {"name": "inventory", "is_choice": false, "repeated": false, "type": "Hardware", "lookup": true}]}, {"name": "HWComponentInfoGetRequest", "type": "message", "module": "hw_management_service", "fields": [{"name": "device_uuid", "is_choice": false, "repeated": false, "type": "Uuid", "lookup": true}, {"name": "component_uuid", "is_choice": false, "repeated": false, "type": "Uuid", "lookup": true}, {"name": "component_name", "is_choice": false, "repeated": false, "type": "string", "lookup": false}]}, {"name": "HWComponentInfoGetResponse", "type": "message", "module": "hw_management_service", "fields": [{"name": "status", "is_choice": false, "repeated": false, "type": "Status", "lookup": true}, {"name": "reason", "is_choice": false, "repeated": false, "type": "Reason", "lookup": true}, {"name": "component", "is_choice": false, "repeated": false, "type": "Component", "lookup": true}]}, {"name": "HWComponentInfoSetRequest", "type": "message", "module": "hw_management_service", "fields": [{"name": "device_uuid", "is_choice": false, "repeated": false, "type": "Uuid", "lookup": true}, {"name": "component_uuid", "is_choice": false, "repeated": false, "type": "Uuid", "lookup": true}, {"name": "component_name", "is_choice": false, "repeated": false, "type": "string", "lookup": false}, {"name": "changes", "is_choice": false, "repeated": false, "type": "ModifiableComponent", "lookup": true}]}, {"name": "HWComponentInfoSetResponse", "type": "message", "module": "hw_management_service", "fields": [{"name": "status", "is_choice": false, "repeated": false, "type": "Status", "lookup": true}, {"name": "reason", "is_choice": false, "repeated": false, "type": "Reason", "lookup": true}]}, {"name": "StartManagingDeviceResponse", "type": "message", "module": "hw_management_service", "fields": [{"name": "status", "is_choice": false, "repeated": false, "type": "Status", "lookup": true}, {"name": "reason", "is_choice": false, "repeated": false, "type": "Reason", "lookup": true}, {"name": "device_uuid", "is_choice": false, "repeated": false, "type": "Uuid", "lookup": true}]}, {"name": "StopManagingDeviceRequest", "type": "message", "module": "hw_management_service", "fields": [{"name": "name", "is_choice": false, "repeated": false, "type": "string", "lookup": false}]}, {"name": "StopManagingDeviceResponse", "type": "message", "module": "hw_management_service", "fields": [{"name": "status", "is_choice": false, "repeated": false, "type": "Status", "lookup": true}, {"name": "reason", "is_choice": false, "repeated": false, "type": "Reason", "lookup": true}]}, {"name": "ManagedDevicesResponse", "type": "message", "module": "hw_management_service", "fields": [{"name": "devices", "is_choice": false, "repeated": true, "type": "ModifiableComponent", "lookup": true}]}, {"name": "SetLoggingEndpointRequest", "type": "message", "module": "hw_management_service", "fields": [{"name": "device_uuid", "is_choice": false, "repeated": false, "type": "Uuid", "lookup": true}, {"name": "logging_endpoint", "is_choice": false, "repeated": false, "type": "string", "lookup": false}, {"name": "logging_protocol", "is_choice": false, "repeated": false, "type": "string", "lookup": false}]}, {"name": "SetRemoteEndpointResponse", "type": "message", "module": "hw_management_service", "fields": [{"name": "status", "is_choice": false, "repeated": false, "type": "Status", "lookup": true}, {"name": "reason", "is_choice": false, "repeated": false, "type": "Reason", "lookup": true}]}, {"name": "GetLoggingEndpointResponse", "type": "message", "module": "hw_management_service", "fields": [{"name": "status", "is_choice": false, "repeated": false, "type": "Status", "lookup": true}, {"name": "reason", "is_choice": false, "repeated": false, "type": "Reason", "lookup": true}, {"name": "logging_endpoint", "is_choice": false, "repeated": false, "type": "string", "lookup": false}, {"name": "logging_protocol", "is_choice": false, "repeated": false, "type": "string", "lookup": false}]}, {"name": "SetMsgBusEndpointRequest", "type": "message", "module": "hw_management_service", "fields": [{"name": "msgbus_endpoint", "is_choice": false, "repeated": false, "type": "string", "lookup": false}]}, {"name": "GetMsgBusEndpointResponse", "type": "message", "module": "hw_management_service", "fields": [{"name": "status", "is_choice": false, "repeated": false, "type": "Status", "lookup": true}, {"name": "reason", "is_choice": false, "repeated": false, "type": "Reason", "lookup": true}, {"name": "msgbus_endpoint", "is_choice": false, "repeated": false, "type": "string", "lookup": false}]}, {"name": "EntitiesLogLevel", "type": "message", "module": "hw_management_service", "fields": [{"name": "logLevel", "is_choice": false, "repeated": false, "type": "LogLevel", "lookup": true}, {"name": "entities", "is_choice": false, "repeated": true, "type": "string", "lookup": false}]}, {"name": "SetLogLevelRequest", "type": "message", "module": "hw_management_service", "fields": [{"name": "device_uuid", "is_choice": false, "repeated": false, "type": "Uuid", "lookup": true}, {"name": "loglevels", "is_choice": false, "repeated": true, "type": "EntitiesLogLevel", "lookup": true}]}, {"name": "SetLogLevelResponse", "type": "message", "module": "hw_management_service", "fields": [{"name": "responses", "is_choice": false, "repeated": true, "type": "DeviceLogResponse", "lookup": true}]}, {"name": "DeviceLogResponse", "type": "message", "module": "hw_management_service", "fields": [{"name": "device_uuid", "is_choice": false, "repeated": false, "type": "Uuid", "lookup": true}, {"name": "status", "is_choice": false, "repeated": false, "type": "Status", "lookup": true}, {"name": "reason", "is_choice": false, "repeated": false, "type": "Reason", "lookup": true}]}, {"name": "GetLogLevelRequest", "type": "message", "module": "hw_management_service", "fields": [{"name": "device_uuid", "is_choice": false, "repeated": false, "type": "Uuid", "lookup": true}, {"name": "entities", "is_choice": false, "repeated": true, "type": "string", "lookup": false}]}, {"name": "GetLogLevelResponse", "type": "message", "module": "hw_management_service", "fields": [{"name": "device_uuid", "is_choice": false, "repeated": false, "type": "Uuid", "lookup": true}, {"name": "logLevels", "is_choice": false, "repeated": true, "type": "EntitiesLogLevel", "lookup": true}, {"name": "status", "is_choice": false, "repeated": false, "type": "Status", "lookup": true}, {"name": "reason", "is_choice": false, "repeated": false, "type": "Reason", "lookup": true}]}, {"name": "GetLoggableEntitiesRequest", "type": "message", "module": "hw_management_service", "fields": [{"name": "device_uuid", "is_choice": false, "repeated": false, "type": "Uuid", "lookup": true}]}, {"name": "SoftwareVersionInformation", "type": "message", "module": "sw_management_service", "fields": [{"name": "active_versions", "is_choice": false, "repeated": true, "type": "ImageVersion", "lookup": true}, {"name": "standby_versions", "is_choice": false, "repeated": true, "type": "ImageVersion", "lookup": true}]}, {"name": "GetSoftwareVersionInformationResponse", "type": "message", "module": "sw_management_service", "fields": [{"name": "status", "is_choice": false, "repeated": false, "type": "Status", "lookup": true}, {"name": "reason", "is_choice": false, "repeated": false, "type": "Reason", "lookup": true}, {"name": "info", "is_choice": false, "repeated": false, "type": "SoftwareVersionInformation", "lookup": true}]}, {"name": "DownloadImageRequest", "type": "message", "module": "sw_management_service", "fields": [{"name": "device_uuid", "is_choice": false, "repeated": false, "type": "Uuid", "lookup": true}, {"name": "image_info", "is_choice": false, "repeated": false, "type": "ImageInformation", "lookup": true}]}], "services": [{"name": "NativeMetricsManagementService", "module": "hw_metrics_mgmt_service", "rpcs": [{"name": "ListMetrics", "request": {"is_stream": false, "type": "HardwareID", "lookup": true}, "response": {"is_stream": false, "type": "ListMetricsResponse", "lookup": true}}, {"name": "UpdateMetricsConfiguration", "request": {"is_stream": false, "type": "MetricsConfigurationRequest", "lookup": true}, "response": {"is_stream": false, "type": "MetricsConfigurationResponse", "lookup": true}}, {"name": "GetMetric", "request": {"is_stream": false, "type": "GetMetricRequest", "lookup": true}, "response": {"is_stream": false, "type": "GetMetricResponse", "lookup": true}}]}, {"name": "NativeEventsManagementService", "module": "hw_events_mgmt_service", "rpcs": [{"name": "ListEvents", "request": {"is_stream": false, "type": "HardwareID", "lookup": true}, "response": {"is_stream": false, "type": "ListEventsResponse", "lookup": true}}, {"name": "UpdateEventsConfiguration", "request": {"is_stream": false, "type": "EventsConfigurationRequest", "lookup": true}, "response": {"is_stream": false, "type": "EventsConfigurationResponse", "lookup": true}}]}, {"name": "NativeHWManagementService", "module": "hw_management_service", "rpcs": [{"name": "StartManagingDevice", "request": {"is_stream": false, "type": "ModifiableComponent", "lookup": true}, "response": {"is_stream": true, "type": "StartManagingDeviceResponse", "lookup": true}}, {"name": "StopManagingDevice", "request": {"is_stream": false, "type": "StopManagingDeviceRequest", "lookup": true}, "response": {"is_stream": false, "type": "StopManagingDeviceResponse", "lookup": true}}, {"name": "GetManagedDevices", "request": {"is_stream": false, "type": "google.protobuf.Empty", "lookup": false}, "response": {"is_stream": false, "type": "ManagedDevicesResponse", "lookup": true}}, {"name": "GetPhysicalInventory", "request": {"is_stream": false, "type": "PhysicalInventoryRequest", "lookup": true}, "response": {"is_stream": true, "type": "PhysicalInventoryResponse", "lookup": true}}, {"name": "GetHWComponentInfo", "request": {"is_stream": false, "type": "HWComponentInfoGetRequest", "lookup": true}, "response": {"is_stream": true, "type": "HWComponentInfoGetResponse", "lookup": true}}, {"name": "SetHWComponentInfo", "request": {"is_stream": false, "type": "HWComponentInfoSetRequest", "lookup": true}, "response": {"is_stream": false, "type": "HWComponentInfoSetResponse", "lookup": true}}, {"name": "SetLoggingEndpoint", "request": {"is_stream": false, "type": "SetLoggingEndpointRequest", "lookup": true}, "response": {"is_stream": false, "type": "SetRemoteEndpointResponse", "lookup": true}}, {"name": "GetLoggingEndpoint", "request": {"is_stream": false, "type": "Uuid", "lookup": true}, "response": {"is_stream": false, "type": "GetLoggingEndpointResponse", "lookup": true}}, {"name": "SetMsgBusEndpoint", "request": {"is_stream": false, "type": "SetMsgBusEndpointRequest", "lookup": true}, "response": {"is_stream": false, "type": "SetRemoteEndpointResponse", "lookup": true}}, {"name": "GetMsgBusEndpoint", "request": {"is_stream": false, "type": "google.protobuf.Empty", "lookup": false}, "response": {"is_stream": false, "type": "GetMsgBusEndpointResponse", "lookup": true}}, {"name": "GetLoggableEntities", "request": {"is_stream": false, "type": "GetLoggableEntitiesRequest", "lookup": true}, "response": {"is_stream": false, "type": "GetLogLevelResponse", "lookup": true}}, {"name": "SetLogLevel", "request": {"is_stream": false, "type": "SetLogLevelRequest", "lookup": true}, "response": {"is_stream": false, "type": "SetLogLevelResponse", "lookup": true}}, {"name": "GetLogLevel", "request": {"is_stream": false, "type": "GetLogLevelRequest", "lookup": true}, "response": {"is_stream": false, "type": "GetLogLevelResponse", "lookup": true}}]}, {"name": "NativeSoftwareManagementService", "module": "sw_management_service", "rpcs": [{"name": "GetSoftwareVersion", "request": {"is_stream": false, "type": "HardwareID", "lookup": true}, "response": {"is_stream": false, "type": "GetSoftwareVersionInformationResponse", "lookup": true}}, {"name": "DownloadImage", "request": {"is_stream": false, "type": "DownloadImageRequest", "lookup": true}, "response": {"is_stream": true, "type": "ImageStatus", "lookup": true}}, {"name": "ActivateImage", "request": {"is_stream": false, "type": "HardwareID", "lookup": true}, "response": {"is_stream": true, "type": "ImageStatus", "lookup": true}}, {"name": "RevertToStandbyImage", "request": {"is_stream": false, "type": "HardwareID", "lookup": true}, "response": {"is_stream": true, "type": "ImageStatus", "lookup": true}}]}]}
\ No newline at end of file
diff --git a/grpc_robot/services/dmi/dmi_0_9_2/hw_management_service.py b/grpc_robot/services/dmi/dmi_0_9_2/hw_management_service.py
new file mode 100644
index 0000000..f275851
--- /dev/null
+++ b/grpc_robot/services/dmi/dmi_0_9_2/hw_management_service.py
@@ -0,0 +1,104 @@
+# Copyright 2020-present Open Networking Foundation
+# Original copyright 2020-present ADTRAN, Inc.
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+from robot.api.deco import keyword
+from ...service import is_connected
+
+from grpc_robot.services.service import Service
+from dmi import hw_management_service_pb2_grpc, hw_management_service_pb2, hw_pb2
+
+
+class NativeHWManagementService(Service):
+
+ prefix = 'hw_management_service_'
+
+ def __init__(self, ctx):
+ super().__init__(ctx=ctx, stub=hw_management_service_pb2_grpc.NativeHWManagementServiceStub)
+
+ # rpc StartManagingDevice(ModifiableComponent) returns(stream StartManagingDeviceResponse);
+ @keyword
+ @is_connected
+ def hw_management_service_start_managing_device(self, param_dict, **kwargs):
+ return self._grpc_helper(self.stub.StartManagingDevice, hw_pb2.ModifiableComponent, param_dict, **kwargs)
+
+ # rpc StopManagingDevice(StopManagingDeviceRequest) returns(StopManagingDeviceResponse);
+ @keyword
+ @is_connected
+ def hw_management_service_stop_managing_device(self, param_dict, **kwargs):
+ return self._grpc_helper(self.stub.StopManagingDevice, hw_management_service_pb2.StopManagingDeviceRequest, param_dict, **kwargs)
+
+ # rpc GetPhysicalInventory(PhysicalInventoryRequest) returns(stream PhysicalInventoryResponse);
+ @keyword
+ @is_connected
+ def hw_management_service_get_physical_inventory(self, param_dict, **kwargs):
+ return self._grpc_helper(self.stub.GetPhysicalInventory, hw_management_service_pb2.PhysicalInventoryRequest, param_dict, **kwargs)
+
+ # rpc GetHWComponentInfo(HWComponentInfoGetRequest) returns(stream HWComponentInfoGetResponse);
+ @keyword
+ @is_connected
+ def hw_management_service_get_hw_component_info(self, param_dict, **kwargs):
+ return self._grpc_helper(self.stub.GetHWComponentInfo, hw_management_service_pb2.HWComponentInfoGetRequest, param_dict, **kwargs)
+
+ # rpc SetHWComponentInfo(HWComponentInfoSetRequest) returns(HWComponentInfoSetResponse);
+ @keyword
+ @is_connected
+ def hw_management_service_set_hw_component_info(self, param_dict, **kwargs):
+ return self._grpc_helper(self.stub.SetHWComponentInfo, hw_management_service_pb2.HWComponentInfoSetRequest, param_dict, **kwargs)
+
+ # rpc GetManagedDevices(google.protobuf.Empty) returns(ManagedDevicesResponse);
+ @keyword
+ @is_connected
+ def hw_management_service_get_managed_devices(self, **kwargs):
+ return self._grpc_helper(self.stub.GetManagedDevices, **kwargs)
+
+ # rpc SetLoggingEndpoint(SetLoggingEndpointRequest) returns(SetRemoteEndpointResponse);
+ @keyword
+ @is_connected
+ def hw_management_service_set_logging_endpoint(self, param_dict, **kwargs):
+ return self._grpc_helper(self.stub.SetLoggingEndpoint, hw_management_service_pb2.SetLoggingEndpointRequest, param_dict, **kwargs)
+
+ # rpc GetLoggingEndpoint(Uuid) returns(GetLoggingEndpointResponse);
+ @keyword
+ @is_connected
+ def hw_management_service_get_logging_endpoint(self, param_dict, **kwargs):
+ return self._grpc_helper(self.stub.GetLoggingEndpoint, hw_pb2.Uuid, param_dict)
+
+ # rpc SetMsgBusEndpoint(SetMsgBusEndpointRequest) returns(SetRemoteEndpointResponse);
+ @keyword
+ @is_connected
+ def hw_management_service_set_msg_bus_endpoint(self, param_dict, **kwargs):
+ return self._grpc_helper(self.stub.SetMsgBusEndpoint, hw_management_service_pb2.SetMsgBusEndpointRequest, param_dict, **kwargs)
+
+ # rpc GetMsgBusEndpoint(google.protobuf.Empty) returns(GetMsgBusEndpointResponse);
+ @keyword
+ @is_connected
+ def hw_management_service_get_msg_bus_endpoint(self, **kwargs):
+ return self._grpc_helper(self.stub.GetMsgBusEndpoint, **kwargs)
+
+ # rpc GetLoggableEntities(GetLoggableEntitiesRequest) returns(GetLogLevelResponse);
+ @keyword
+ @is_connected
+ def hw_management_service_get_loggable_entities(self, param_dict, **kwargs):
+ return self._grpc_helper(self.stub.GetLoggableEntities, hw_management_service_pb2.GetLoggableEntitiesRequest, param_dict, **kwargs)
+
+ # rpc SetLogLevel(SetLogLevelRequest) returns(SetLogLevelResponse);
+ @keyword
+ @is_connected
+ def hw_management_service_set_log_level(self, param_dict, **kwargs):
+ return self._grpc_helper(self.stub.SetLogLevel, hw_management_service_pb2.SetLogLevelRequest, param_dict, **kwargs)
+
+ # rpc GetLogLevel(GetLogLevelRequest) returns(GetLogLevelResponse);
+ @keyword
+ @is_connected
+ def hw_management_service_get_log_level(self, param_dict, **kwargs):
+ return self._grpc_helper(self.stub.GetLogLevel, hw_management_service_pb2.GetLogLevelRequest, param_dict, **kwargs)
diff --git a/grpc_robot/services/dmi/dmi_0_9_3/__init__.py b/grpc_robot/services/dmi/dmi_0_9_3/__init__.py
new file mode 100644
index 0000000..c5af1c4
--- /dev/null
+++ b/grpc_robot/services/dmi/dmi_0_9_3/__init__.py
@@ -0,0 +1,14 @@
+# Copyright 2020-present Open Networking Foundation
+# Original copyright 2020-present ADTRAN, Inc.
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+from ..dmi_0_9_2 import *
diff --git a/grpc_robot/services/dmi/dmi_0_9_3/dmi.json b/grpc_robot/services/dmi/dmi_0_9_3/dmi.json
new file mode 100644
index 0000000..14850b9
--- /dev/null
+++ b/grpc_robot/services/dmi/dmi_0_9_3/dmi.json
@@ -0,0 +1 @@
+{"modules": [{"name": "commons", "imports": []}, {"name": "hw", "imports": ["timestamp"]}, {"name": "hw_metrics_mgmt_service", "imports": ["commons", "hw"]}, {"name": "hw_events_mgmt_service", "imports": ["commons", "hw", "timestamp"]}, {"name": "sw_image", "imports": ["commons"]}, {"name": "hw_management_service", "imports": ["commons", "hw", "empty"]}, {"name": "sw_management_service", "imports": ["commons", "hw", "sw_image"]}], "data_types": [{"name": "Status", "type": "enum", "module": "commons", "values": {"0": "UNDEFINED_STATUS", "1": "OK_STATUS", "2": "ERROR_STATUS"}}, {"name": "Reason", "type": "enum", "module": "commons", "values": {"0": "UNDEFINED_REASON", "1": "UNKNOWN_DEVICE", "2": "INTERNAL_ERROR", "3": "WRONG_METRIC", "4": "WRONG_EVENT", "5": "LOGGING_ENDPOINT_ERROR", "6": "LOGGING_ENDPOINT_PROTOCOL_ERROR", "7": "KAFKA_ENDPOINT_ERROR"}}, {"name": "LogLevel", "type": "enum", "module": "commons", "values": {"0": "TRACE", "1": "DEBUG", "2": "INFO", "3": "WARN", "4": "ERROR"}}, {"name": "Uuid", "type": "message", "module": "hw", "fields": [{"name": "uuid", "is_choice": false, "repeated": false, "type": "string", "lookup": false}]}, {"name": "HardwareID", "type": "message", "module": "hw", "fields": [{"name": "uuid", "is_choice": false, "repeated": false, "type": "Uuid", "lookup": true}]}, {"name": "Uri", "type": "message", "module": "hw", "fields": [{"name": "uri", "is_choice": false, "repeated": false, "type": "string", "lookup": false}]}, {"name": "ComponentType", "type": "enum", "module": "hw", "values": {"0": "COMPONENT_TYPE_UNDEFINED", "1": "COMPONENT_TYPE_UNKNOWN", "2": "COMPONENT_TYPE_CHASSIS", "3": "COMPONENT_TYPE_BACKPLANE", "4": "COMPONENT_TYPE_CONTAINER", "5": "COMPONENT_TYPE_POWER_SUPPLY", "6": "COMPONENT_TYPE_FAN", "7": "COMPONENT_TYPE_SENSOR", "8": "COMPONENT_TYPE_MODULE", "9": "COMPONENT_TYPE_PORT", "10": "COMPONENT_TYPE_CPU", "11": "COMPONENT_TYPE_BATTERY", "12": "COMPONENT_TYPE_STORAGE", "13": "COMPONENT_TYPE_MEMORY", "14": "COMPONENT_TYPE_TRANSCEIVER", "15": "COMPONENT_TYPE_GPON_TRANSCEIVER", "16": "COMPONENT_TYPE_XGS_PON_TRANSCEIVER"}}, {"name": "ComponentAdminState", "type": "enum", "module": "hw", "values": {"0": "COMP_ADMIN_STATE_UNDEFINED", "1": "COMP_ADMIN_STATE_UNKNOWN", "2": "COMP_ADMIN_STATE_LOCKED", "3": "COMP_ADMIN_STATE_SHUTTING_DOWN", "4": "COMP_ADMIN_STATE_UNLOCKED"}}, {"name": "ComponentOperState", "type": "enum", "module": "hw", "values": {"0": "COMP_OPER_STATE_UNDEFINED", "1": "COMP_OPER_STATE_UNKNOWN", "2": "COMP_OPER_STATE_DISABLED", "3": "COMP_OPER_STATE_ENABLED", "4": "COMP_OPER_STATE_TESTING"}}, {"name": "ComponentUsageState", "type": "enum", "module": "hw", "values": {"0": "COMP_USAGE_STATE_UNDEFINED", "1": "COMP_USAGE_STATE_UNKNOWN", "2": "COMP_USAGE_STATE_IDLE", "3": "COMP_USAGE_STATE_ACTIVE", "4": "COMP_USAGE_STATE_BUSY"}}, {"name": "ComponentAlarmState", "type": "enum", "module": "hw", "values": {"0": "COMP_ALARM_STATE_UNDEFINED", "1": "COMP_ALARM_STATE_UNKNOWN", "2": "COMP_ALARM_STATE_UNDER_REPAIR", "3": "COMP_ALARM_STATE_CRITICAL", "4": "COMP_ALARM_STATE_MAJOR", "5": "COMP_ALARM_STATE_MINOR", "6": "COMP_ALARM_STATE_WARNING", "7": "COMP_ALARM_STATE_INTERMEDIATE"}}, {"name": "ComponentStandbyState", "type": "enum", "module": "hw", "values": {"0": "COMP_STANDBY_STATE_UNDEFINED", "1": "COMP_STANDBY_STATE_UNKNOWN", "2": "COMP_STANDBY_STATE_HOT", "3": "COMP_STANDBY_STATE_COLD", "4": "COMP_STANDBY_STATE_PROVIDING_SERVICE"}}, {"name": "ComponentState", "type": "message", "module": "hw", "fields": [{"name": "state_last_changed", "is_choice": false, "repeated": false, "type": "google.protobuf.Timestamp", "lookup": true}, {"name": "admin_state", "is_choice": false, "repeated": false, "type": "ComponentAdminState", "lookup": true}, {"name": "oper_state", "is_choice": false, "repeated": false, "type": "ComponentOperState", "lookup": true}, {"name": "usage_state", "is_choice": false, "repeated": false, "type": "ComponentUsageState", "lookup": true}, {"name": "alarm_state", "is_choice": false, "repeated": false, "type": "ComponentAlarmState", "lookup": true}, {"name": "standby_state", "is_choice": false, "repeated": false, "type": "ComponentStandbyState", "lookup": true}]}, {"name": "SensorValueType", "type": "enum", "module": "hw", "values": {"0": "SENSOR_VALUE_TYPE_UNDEFINED", "1": "SENSOR_VALUE_TYPE_OTHER", "2": "SENSOR_VALUE_TYPE_UNKNOWN", "3": "SENSOR_VALUE_TYPE_VOLTS_AC", "4": "SENSOR_VALUE_TYPE_VOLTS_DC", "5": "SENSOR_VALUE_TYPE_AMPERES", "6": "SENSOR_VALUE_TYPE_WATTS", "7": "SENSOR_VALUE_TYPE_HERTZ", "8": "SENSOR_VALUE_TYPE_CELSIUS", "9": "SENSOR_VALUE_TYPE_PERCENT_RH", "10": "SENSOR_VALUE_TYPE_RPM", "11": "SENSOR_VALUE_TYPE_CMM", "12": "SENSOR_VALUE_TYPE_TRUTH_VALUE"}}, {"name": "SensorValueScale", "type": "enum", "module": "hw", "values": {"0": "SENSOR_VALUE_SCALE_UNDEFINED", "1": "SENSOR_VALUE_SCALE_YOCTO", "2": "SENSOR_VALUE_SCALE_ZEPTO", "3": "SENSOR_VALUE_SCALE_ATTO", "4": "SENSOR_VALUE_SCALE_FEMTO", "5": "SENSOR_VALUE_SCALE_PICO", "6": "SENSOR_VALUE_SCALE_NANO", "7": "SENSOR_VALUE_SCALE_MICRO", "8": "SENSOR_VALUE_SCALE_MILLI", "9": "SENSOR_VALUE_SCALE_UNITS", "10": "SENSOR_VALUE_SCALE_KILO", "11": "SENSOR_VALUE_SCALE_MEGA", "12": "SENSOR_VALUE_SCALE_GIGA", "13": "SENSOR_VALUE_SCALE_TERA", "14": "SENSOR_VALUE_SCALE_PETA", "15": "SENSOR_VALUE_SCALE_EXA", "16": "SENSOR_VALUE_SCALE_ZETTA", "17": "SENSOR_VALUE_SCALE_YOTTA"}}, {"name": "SensorStatus", "type": "enum", "module": "hw", "values": {"0": "SENSOR_STATUS_UNDEFINED", "1": "SENSOR_STATUS_OK", "2": "SENSOR_STATUS_UNAVAILABLE", "3": "SENSOR_STATUS_NONOPERATIONAL"}}, {"name": "ComponentSensorData", "type": "message", "module": "hw", "fields": [{"name": "value", "is_choice": false, "repeated": false, "type": "int32", "lookup": false}, {"name": "type", "is_choice": false, "repeated": false, "type": "SensorValueType", "lookup": true}, {"name": "scale", "is_choice": false, "repeated": false, "type": "SensorValueScale", "lookup": true}, {"name": "precision", "is_choice": false, "repeated": false, "type": "int32", "lookup": false}, {"name": "status", "is_choice": false, "repeated": false, "type": "SensorStatus", "lookup": true}, {"name": "units_display", "is_choice": false, "repeated": false, "type": "string", "lookup": false}, {"name": "timestamp", "is_choice": false, "repeated": false, "type": "google.protobuf.Timestamp", "lookup": true}, {"name": "value_update_rate", "is_choice": false, "repeated": false, "type": "uint32", "lookup": false}, {"name": "data_type", "is_choice": false, "repeated": false, "type": "string", "lookup": false}]}, {"name": "Component", "type": "message", "module": "hw", "fields": [{"name": "name", "is_choice": false, "repeated": false, "type": "string", "lookup": false}, {"name": "class", "is_choice": false, "repeated": false, "type": "ComponentType", "lookup": true}, {"name": "description", "is_choice": false, "repeated": false, "type": "string", "lookup": false}, {"name": "parent", "is_choice": false, "repeated": false, "type": "string", "lookup": false}, {"name": "parent_rel_pos", "is_choice": false, "repeated": false, "type": "int32", "lookup": false}, {"name": "children", "is_choice": false, "repeated": true, "type": "Component", "lookup": true}, {"name": "hardware_rev", "is_choice": false, "repeated": false, "type": "string", "lookup": false}, {"name": "firmware_rev", "is_choice": false, "repeated": false, "type": "string", "lookup": false}, {"name": "software_rev", "is_choice": false, "repeated": false, "type": "string", "lookup": false}, {"name": "serial_num", "is_choice": false, "repeated": false, "type": "string", "lookup": false}, {"name": "mfg_name", "is_choice": false, "repeated": false, "type": "string", "lookup": false}, {"name": "model_name", "is_choice": false, "repeated": false, "type": "string", "lookup": false}, {"name": "alias", "is_choice": false, "repeated": false, "type": "string", "lookup": false}, {"name": "asset_id", "is_choice": false, "repeated": false, "type": "string", "lookup": false}, {"name": "is_fru", "is_choice": false, "repeated": false, "type": "bool", "lookup": false}, {"name": "mfg_date", "is_choice": false, "repeated": false, "type": "google.protobuf.Timestamp", "lookup": true}, {"name": "uri", "is_choice": false, "repeated": false, "type": "Uri", "lookup": true}, {"name": "uuid", "is_choice": false, "repeated": false, "type": "Uuid", "lookup": true}, {"name": "state", "is_choice": false, "repeated": false, "type": "ComponentState", "lookup": true}, {"name": "sensor_data", "is_choice": false, "repeated": true, "type": "ComponentSensorData", "lookup": true}]}, {"name": "Hardware", "type": "message", "module": "hw", "fields": [{"name": "last_change", "is_choice": false, "repeated": false, "type": "google.protobuf.Timestamp", "lookup": true}, {"name": "root", "is_choice": false, "repeated": false, "type": "Component", "lookup": true}]}, {"name": "ModifiableComponent", "type": "message", "module": "hw", "fields": [{"name": "name", "is_choice": false, "repeated": false, "type": "string", "lookup": false}, {"name": "class", "is_choice": false, "repeated": false, "type": "ComponentType", "lookup": true}, {"name": "parent", "is_choice": false, "repeated": false, "type": "Component", "lookup": true}, {"name": "parent_rel_pos", "is_choice": false, "repeated": false, "type": "int32", "lookup": false}, {"name": "alias", "is_choice": false, "repeated": false, "type": "string", "lookup": false}, {"name": "asset_id", "is_choice": false, "repeated": false, "type": "string", "lookup": false}, {"name": "uri", "is_choice": false, "repeated": false, "type": "Uri", "lookup": true}, {"name": "admin_state", "is_choice": false, "repeated": false, "type": "ComponentAdminState", "lookup": true}]}, {"name": "MetricNames", "type": "enum", "module": "hw_metrics_mgmt_service", "values": {"0": "METRIC_NAME_UNDEFINED", "1": "METRIC_FAN_SPEED", "100": "METRIC_CPU_TEMP", "101": "METRIC_CPU_USAGE_PERCENTAGE", "200": "METRIC_TRANSCEIVER_TEMP", "201": "METRIC_TRANSCEIVER_VOLTAGE", "202": "METRIC_TRANSCEIVER_BIAS", "203": "METRIC_TRANSCEIVER_RX_POWER", "204": "METRIC_TRANSCEIVER_TX_POWER", "205": "METRIC_TRANSCEIVER_WAVELENGTH", "300": "METRIC_DISK_TEMP", "301": "METRIC_DISK_CAPACITY", "302": "METRIC_DISK_USAGE", "303": "METRIC_DISK_USAGE_PERCENTAGE", "304": "METRIC_DISK_READ_WRITE_PERCENTAGE", "305": "METRIC_DISK_FAULTY_CELLS_PERCENTAGE", "400": "METRIC_RAM_TEMP", "401": "METRIC_RAM_CAPACITY", "402": "METRIC_RAM_USAGE", "403": "METRIC_RAM_USAGE_PERCENTAGE", "500": "METRIC_POWER_MAX", "501": "METRIC_POWER_USAGE", "502": "METRIC_POWER_USAGE_PERCENTAGE", "600": "METRIC_INNER_SURROUNDING_TEMP"}}, {"name": "MetricConfig", "type": "message", "module": "hw_metrics_mgmt_service", "fields": [{"name": "metric_id", "is_choice": false, "repeated": false, "type": "MetricNames", "lookup": true}, {"name": "is_configured", "is_choice": false, "repeated": false, "type": "bool", "lookup": false}, {"name": "poll_interval", "is_choice": false, "repeated": false, "type": "uint32", "lookup": false}]}, {"name": "MetricsConfig", "type": "message", "module": "hw_metrics_mgmt_service", "fields": [{"name": "metrics", "is_choice": false, "repeated": true, "type": "MetricConfig", "lookup": true}]}, {"name": "ListMetricsResponse", "type": "message", "module": "hw_metrics_mgmt_service", "fields": [{"name": "status", "is_choice": false, "repeated": false, "type": "Status", "lookup": true}, {"name": "reason", "is_choice": false, "repeated": false, "type": "Reason", "lookup": true}, {"name": "metrics", "is_choice": false, "repeated": false, "type": "MetricsConfig", "lookup": true}]}, {"name": "MetricsConfigurationRequest", "type": "message", "module": "hw_metrics_mgmt_service", "fields": [{"name": "device_uuid", "is_choice": false, "repeated": false, "type": "Uuid", "lookup": true}, {"name": "operation", "is_choice": true, "cases": [{"name": "changes", "type": "MetricsConfig", "lookup": true}, {"name": "reset_to_default", "type": "bool", "lookup": false}]}]}, {"name": "MetricsConfigurationResponse", "type": "message", "module": "hw_metrics_mgmt_service", "fields": [{"name": "status", "is_choice": false, "repeated": false, "type": "Status", "lookup": true}, {"name": "reason", "is_choice": false, "repeated": false, "type": "Reason", "lookup": true}]}, {"name": "MetricMetaData", "type": "message", "module": "hw_metrics_mgmt_service", "fields": [{"name": "device_uuid", "is_choice": false, "repeated": false, "type": "Uuid", "lookup": true}, {"name": "component_uuid", "is_choice": false, "repeated": false, "type": "Uuid", "lookup": true}, {"name": "component_name", "is_choice": false, "repeated": false, "type": "string", "lookup": false}]}, {"name": "Metric", "type": "message", "module": "hw_metrics_mgmt_service", "fields": [{"name": "metric_id", "is_choice": false, "repeated": false, "type": "MetricNames", "lookup": true}, {"name": "metric_metadata", "is_choice": false, "repeated": false, "type": "MetricMetaData", "lookup": true}, {"name": "value", "is_choice": false, "repeated": false, "type": "ComponentSensorData", "lookup": true}]}, {"name": "GetMetricRequest", "type": "message", "module": "hw_metrics_mgmt_service", "fields": [{"name": "meta_data", "is_choice": false, "repeated": false, "type": "MetricMetaData", "lookup": true}, {"name": "metric_id", "is_choice": false, "repeated": false, "type": "MetricNames", "lookup": true}]}, {"name": "GetMetricResponse", "type": "message", "module": "hw_metrics_mgmt_service", "fields": [{"name": "status", "is_choice": false, "repeated": false, "type": "Status", "lookup": true}, {"name": "reason", "is_choice": false, "repeated": false, "type": "Reason", "lookup": true}, {"name": "metric", "is_choice": false, "repeated": false, "type": "Metric", "lookup": true}]}, {"name": "EventIds", "type": "enum", "module": "hw_events_mgmt_service", "values": {"0": "EVENT_NAME_UNDEFINED", "100": "EVENT_TRANSCEIVER_PLUG_OUT", "101": "EVENT_TRANSCEIVER_PLUG_IN", "102": "EVENT_TRANSCEIVER_VOLTAGE_ABOVE_THRESHOLD", "103": "EVENT_TRANSCEIVER_VOLTAGE_BELOW_THRESHOLD", "104": "EVENT_TRANSCEIVER_TEMPERATURE_ABOVE_THRESHOLD", "105": "EVENT_TRANSCEIVER_TEMPERATURE_BELOW_THRESHOLD", "106": "EVENT_TRANSCEIVER_CURRENT_ABOVE_THRESHOLD", "107": "EVENT_TRANSCEIVER_CURRENT_BELOW_THRESHOLD", "108": "EVENT_TRANSCEIVER_RX_POWER_ABOVE_THRESHOLD", "109": "EVENT_TRANSCEIVER_RX_POWER_BELOW_THRESHOLD", "110": "EVENT_TRANSCEIVER_TX_POWER_ABOVE_THRESHOLD", "111": "EVENT_TRANSCEIVER_TX_POWER_BELOW_THRESHOLD", "112": "EVENT_TRANSCEIVER_FAILURE", "113": "EVENT_TRANSCEIVER_VOLTAGE_ABOVE_THRESHOLD_RECOVERED", "114": "EVENT_TRANSCEIVER_VOLTAGE_BELOW_THRESHOLD_RECOVERED", "115": "EVENT_TRANSCEIVER_TEMPERATURE_ABOVE_THRESHOLD_RECOVERED", "116": "EVENT_TRANSCEIVER_TEMPERATURE_BELOW_THRESHOLD_RECOVERED", "117": "EVENT_TRANSCEIVER_CURRENT_ABOVE_THRESHOLD_RECOVERED", "118": "EVENT_TRANSCEIVER_CURRENT_BELOW_THRESHOLD_RECOVERED", "119": "EVENT_TRANSCEIVER_RX_POWER_ABOVE_THRESHOLD_RECOVERED", "120": "EVENT_TRANSCEIVER_RX_POWER_BELOW_THRESHOLD_RECOVERED", "121": "EVENT_TRANSCEIVER_TX_POWER_ABOVE_THRESHOLD_RECOVERED", "122": "EVENT_TRANSCEIVER_TX_POWER_BELOW_THRESHOLD_RECOVERED", "123": "EVENT_TRANSCEIVER_FAILURE_RECOVERED", "200": "EVENT_PSU_PLUG_OUT", "201": "EVENT_PSU_PLUG_IN", "202": "EVENT_PSU_FAILURE", "203": "EVENT_PSU_FAILURE_RECOVERED", "300": "EVENT_FAN_FAILURE", "301": "EVENT_FAN_PLUG_OUT", "302": "EVENT_FAN_PLUG_IN", "303": "EVENT_FAN_FAILURE_RECOVERED", "400": "EVENT_CPU_TEMPERATURE_ABOVE_CRITICAL", "401": "EVENT_CPU_TEMPERATURE_ABOVE_FATAL", "402": "EVENT_CPU_TEMPERATURE_ABOVE_CRITICAL_RECOVERED", "403": "EVENT_CPU_TEMPERATURE_ABOVE_FATAL_RECOVERED", "500": "EVENT_HW_DEVICE_RESET", "501": "EVENT_HW_DEVICE_TEMPERATURE_ABOVE_CRITICAL", "502": "EVENT_HW_DEVICE_TEMPERATURE_ABOVE_FATAL", "503": "EVENT_HW_DEVICE_TEMPERATURE_ABOVE_CRITICAL_RECOVERED", "504": "EVENT_HW_DEVICE_TEMPERATURE_ABOVE_FATAL_RECOVERED"}}, {"name": "ValueType", "type": "message", "module": "hw_events_mgmt_service", "fields": [{"name": "val", "is_choice": true, "cases": [{"name": "int_val", "type": "int64", "lookup": false}, {"name": "uint_val", "type": "uint64", "lookup": false}, {"name": "float_val", "type": "float", "lookup": false}]}]}, {"name": "WaterMarks", "type": "message", "module": "hw_events_mgmt_service", "fields": [{"name": "high", "is_choice": false, "repeated": false, "type": "ValueType", "lookup": true}, {"name": "low", "is_choice": false, "repeated": false, "type": "ValueType", "lookup": true}]}, {"name": "Thresholds", "type": "message", "module": "hw_events_mgmt_service", "fields": [{"name": "threshold", "is_choice": true, "cases": [{"name": "upper", "type": "WaterMarks", "lookup": true}, {"name": "lower", "type": "WaterMarks", "lookup": true}]}]}, {"name": "ThresholdInformation", "type": "message", "module": "hw_events_mgmt_service", "fields": [{"name": "observed_value", "is_choice": false, "repeated": false, "type": "ValueType", "lookup": true}, {"name": "thresholds", "is_choice": false, "repeated": false, "type": "Thresholds", "lookup": true}]}, {"name": "EventCfg", "type": "message", "module": "hw_events_mgmt_service", "fields": [{"name": "event_id", "is_choice": false, "repeated": false, "type": "EventIds", "lookup": true}, {"name": "is_configured", "is_choice": false, "repeated": false, "type": "bool", "lookup": false}, {"name": "thresholds", "is_choice": false, "repeated": false, "type": "Thresholds", "lookup": true}]}, {"name": "EventsCfg", "type": "message", "module": "hw_events_mgmt_service", "fields": [{"name": "items", "is_choice": false, "repeated": true, "type": "EventCfg", "lookup": true}]}, {"name": "ListEventsResponse", "type": "message", "module": "hw_events_mgmt_service", "fields": [{"name": "status", "is_choice": false, "repeated": false, "type": "Status", "lookup": true}, {"name": "reason", "is_choice": false, "repeated": false, "type": "Reason", "lookup": true}, {"name": "events", "is_choice": false, "repeated": false, "type": "EventsCfg", "lookup": true}]}, {"name": "EventsConfigurationRequest", "type": "message", "module": "hw_events_mgmt_service", "fields": [{"name": "device_uuid", "is_choice": false, "repeated": false, "type": "Uuid", "lookup": true}, {"name": "operation", "is_choice": true, "cases": [{"name": "changes", "type": "EventsCfg", "lookup": true}, {"name": "reset_to_default", "type": "bool", "lookup": false}]}]}, {"name": "EventsConfigurationResponse", "type": "message", "module": "hw_events_mgmt_service", "fields": [{"name": "status", "is_choice": false, "repeated": false, "type": "Status", "lookup": true}, {"name": "reason", "is_choice": false, "repeated": false, "type": "Reason", "lookup": true}]}, {"name": "EventMetaData", "type": "message", "module": "hw_events_mgmt_service", "fields": [{"name": "device_uuid", "is_choice": false, "repeated": false, "type": "Uuid", "lookup": true}, {"name": "component_uuid", "is_choice": false, "repeated": false, "type": "Uuid", "lookup": true}, {"name": "component_name", "is_choice": false, "repeated": false, "type": "string", "lookup": false}]}, {"name": "Event", "type": "message", "module": "hw_events_mgmt_service", "fields": [{"name": "event_metadata", "is_choice": false, "repeated": false, "type": "EventMetaData", "lookup": true}, {"name": "event_id", "is_choice": false, "repeated": false, "type": "EventIds", "lookup": true}, {"name": "raised_ts", "is_choice": false, "repeated": false, "type": "google.protobuf.Timestamp", "lookup": true}, {"name": "threshold_info", "is_choice": false, "repeated": false, "type": "ThresholdInformation", "lookup": true}, {"name": "add_info", "is_choice": false, "repeated": false, "type": "string", "lookup": false}]}, {"name": "ImageVersion", "type": "message", "module": "sw_image", "fields": [{"name": "image_name", "is_choice": false, "repeated": false, "type": "string", "lookup": false}, {"name": "version", "is_choice": false, "repeated": false, "type": "string", "lookup": false}]}, {"name": "ImageInformation", "type": "message", "module": "sw_image", "fields": [{"name": "image", "is_choice": false, "repeated": false, "type": "ImageVersion", "lookup": true}, {"name": "image_install_script", "is_choice": false, "repeated": false, "type": "string", "lookup": false}, {"name": "image_url", "is_choice": false, "repeated": false, "type": "string", "lookup": false}, {"name": "sha256sum", "is_choice": false, "repeated": false, "type": "string", "lookup": false}]}, {"name": "ImageState", "type": "enum", "module": "sw_image", "values": {"0": "UNDEFINED_STATE", "1": "COPYING_IMAGE", "2": "INSTALLING_IMAGE", "3": "COMMITTING_IMAGE", "4": "REBOOTING_DEVICE", "5": "UPGRADE_COMPLETE", "6": "UPGRADE_FAILED", "7": "ACTIVATION_COMPLETE", "8": "ACTIVATION_FAILED"}}, {"name": "Reason", "type": "enum", "module": "sw_image", "values": {"0": "UNDEFINED_REASON", "1": "ERROR_IN_REQUEST", "2": "INTERNAL_ERROR", "3": "DEVICE_IN_WRONG_STATE", "4": "INVALID_IMAGE", "5": "WRONG_IMAGE_CHECKSUM"}}, {"name": "ImageStatus", "type": "message", "module": "sw_image", "fields": [{"name": "status", "is_choice": false, "repeated": false, "type": "Status", "lookup": true}, {"name": "reason", "is_choice": false, "repeated": false, "type": "Reason", "lookup": true}, {"name": "state", "is_choice": false, "repeated": false, "type": "ImageState", "lookup": true}, {"name": "description", "is_choice": false, "repeated": false, "type": "string", "lookup": false}]}, {"name": "PhysicalInventoryRequest", "type": "message", "module": "hw_management_service", "fields": [{"name": "device_uuid", "is_choice": false, "repeated": false, "type": "Uuid", "lookup": true}]}, {"name": "PhysicalInventoryResponse", "type": "message", "module": "hw_management_service", "fields": [{"name": "status", "is_choice": false, "repeated": false, "type": "Status", "lookup": true}, {"name": "reason", "is_choice": false, "repeated": false, "type": "Reason", "lookup": true}, {"name": "inventory", "is_choice": false, "repeated": false, "type": "Hardware", "lookup": true}]}, {"name": "HWComponentInfoGetRequest", "type": "message", "module": "hw_management_service", "fields": [{"name": "device_uuid", "is_choice": false, "repeated": false, "type": "Uuid", "lookup": true}, {"name": "component_uuid", "is_choice": false, "repeated": false, "type": "Uuid", "lookup": true}, {"name": "component_name", "is_choice": false, "repeated": false, "type": "string", "lookup": false}]}, {"name": "HWComponentInfoGetResponse", "type": "message", "module": "hw_management_service", "fields": [{"name": "status", "is_choice": false, "repeated": false, "type": "Status", "lookup": true}, {"name": "reason", "is_choice": false, "repeated": false, "type": "Reason", "lookup": true}, {"name": "component", "is_choice": false, "repeated": false, "type": "Component", "lookup": true}]}, {"name": "HWComponentInfoSetRequest", "type": "message", "module": "hw_management_service", "fields": [{"name": "device_uuid", "is_choice": false, "repeated": false, "type": "Uuid", "lookup": true}, {"name": "component_uuid", "is_choice": false, "repeated": false, "type": "Uuid", "lookup": true}, {"name": "component_name", "is_choice": false, "repeated": false, "type": "string", "lookup": false}, {"name": "changes", "is_choice": false, "repeated": false, "type": "ModifiableComponent", "lookup": true}]}, {"name": "HWComponentInfoSetResponse", "type": "message", "module": "hw_management_service", "fields": [{"name": "status", "is_choice": false, "repeated": false, "type": "Status", "lookup": true}, {"name": "reason", "is_choice": false, "repeated": false, "type": "Reason", "lookup": true}]}, {"name": "StartManagingDeviceResponse", "type": "message", "module": "hw_management_service", "fields": [{"name": "status", "is_choice": false, "repeated": false, "type": "Status", "lookup": true}, {"name": "reason", "is_choice": false, "repeated": false, "type": "Reason", "lookup": true}, {"name": "device_uuid", "is_choice": false, "repeated": false, "type": "Uuid", "lookup": true}]}, {"name": "StopManagingDeviceRequest", "type": "message", "module": "hw_management_service", "fields": [{"name": "name", "is_choice": false, "repeated": false, "type": "string", "lookup": false}]}, {"name": "StopManagingDeviceResponse", "type": "message", "module": "hw_management_service", "fields": [{"name": "status", "is_choice": false, "repeated": false, "type": "Status", "lookup": true}, {"name": "reason", "is_choice": false, "repeated": false, "type": "Reason", "lookup": true}]}, {"name": "ManagedDevicesResponse", "type": "message", "module": "hw_management_service", "fields": [{"name": "devices", "is_choice": false, "repeated": true, "type": "ModifiableComponent", "lookup": true}]}, {"name": "SetLoggingEndpointRequest", "type": "message", "module": "hw_management_service", "fields": [{"name": "device_uuid", "is_choice": false, "repeated": false, "type": "Uuid", "lookup": true}, {"name": "logging_endpoint", "is_choice": false, "repeated": false, "type": "string", "lookup": false}, {"name": "logging_protocol", "is_choice": false, "repeated": false, "type": "string", "lookup": false}]}, {"name": "SetRemoteEndpointResponse", "type": "message", "module": "hw_management_service", "fields": [{"name": "status", "is_choice": false, "repeated": false, "type": "Status", "lookup": true}, {"name": "reason", "is_choice": false, "repeated": false, "type": "Reason", "lookup": true}]}, {"name": "GetLoggingEndpointResponse", "type": "message", "module": "hw_management_service", "fields": [{"name": "status", "is_choice": false, "repeated": false, "type": "Status", "lookup": true}, {"name": "reason", "is_choice": false, "repeated": false, "type": "Reason", "lookup": true}, {"name": "logging_endpoint", "is_choice": false, "repeated": false, "type": "string", "lookup": false}, {"name": "logging_protocol", "is_choice": false, "repeated": false, "type": "string", "lookup": false}]}, {"name": "SetMsgBusEndpointRequest", "type": "message", "module": "hw_management_service", "fields": [{"name": "msgbus_endpoint", "is_choice": false, "repeated": false, "type": "string", "lookup": false}]}, {"name": "GetMsgBusEndpointResponse", "type": "message", "module": "hw_management_service", "fields": [{"name": "status", "is_choice": false, "repeated": false, "type": "Status", "lookup": true}, {"name": "reason", "is_choice": false, "repeated": false, "type": "Reason", "lookup": true}, {"name": "msgbus_endpoint", "is_choice": false, "repeated": false, "type": "string", "lookup": false}]}, {"name": "EntitiesLogLevel", "type": "message", "module": "hw_management_service", "fields": [{"name": "logLevel", "is_choice": false, "repeated": false, "type": "LogLevel", "lookup": true}, {"name": "entities", "is_choice": false, "repeated": true, "type": "string", "lookup": false}]}, {"name": "SetLogLevelRequest", "type": "message", "module": "hw_management_service", "fields": [{"name": "device_uuid", "is_choice": false, "repeated": false, "type": "Uuid", "lookup": true}, {"name": "loglevels", "is_choice": false, "repeated": true, "type": "EntitiesLogLevel", "lookup": true}]}, {"name": "SetLogLevelResponse", "type": "message", "module": "hw_management_service", "fields": [{"name": "responses", "is_choice": false, "repeated": true, "type": "DeviceLogResponse", "lookup": true}]}, {"name": "DeviceLogResponse", "type": "message", "module": "hw_management_service", "fields": [{"name": "device_uuid", "is_choice": false, "repeated": false, "type": "Uuid", "lookup": true}, {"name": "status", "is_choice": false, "repeated": false, "type": "Status", "lookup": true}, {"name": "reason", "is_choice": false, "repeated": false, "type": "Reason", "lookup": true}]}, {"name": "GetLogLevelRequest", "type": "message", "module": "hw_management_service", "fields": [{"name": "device_uuid", "is_choice": false, "repeated": false, "type": "Uuid", "lookup": true}, {"name": "entities", "is_choice": false, "repeated": true, "type": "string", "lookup": false}]}, {"name": "GetLogLevelResponse", "type": "message", "module": "hw_management_service", "fields": [{"name": "device_uuid", "is_choice": false, "repeated": false, "type": "Uuid", "lookup": true}, {"name": "logLevels", "is_choice": false, "repeated": true, "type": "EntitiesLogLevel", "lookup": true}, {"name": "status", "is_choice": false, "repeated": false, "type": "Status", "lookup": true}, {"name": "reason", "is_choice": false, "repeated": false, "type": "Reason", "lookup": true}]}, {"name": "GetLoggableEntitiesRequest", "type": "message", "module": "hw_management_service", "fields": [{"name": "device_uuid", "is_choice": false, "repeated": false, "type": "Uuid", "lookup": true}]}, {"name": "SoftwareVersionInformation", "type": "message", "module": "sw_management_service", "fields": [{"name": "active_versions", "is_choice": false, "repeated": true, "type": "ImageVersion", "lookup": true}, {"name": "standby_versions", "is_choice": false, "repeated": true, "type": "ImageVersion", "lookup": true}]}, {"name": "GetSoftwareVersionInformationResponse", "type": "message", "module": "sw_management_service", "fields": [{"name": "status", "is_choice": false, "repeated": false, "type": "Status", "lookup": true}, {"name": "reason", "is_choice": false, "repeated": false, "type": "Reason", "lookup": true}, {"name": "info", "is_choice": false, "repeated": false, "type": "SoftwareVersionInformation", "lookup": true}]}, {"name": "DownloadImageRequest", "type": "message", "module": "sw_management_service", "fields": [{"name": "device_uuid", "is_choice": false, "repeated": false, "type": "Uuid", "lookup": true}, {"name": "image_info", "is_choice": false, "repeated": false, "type": "ImageInformation", "lookup": true}]}], "services": [{"name": "NativeMetricsManagementService", "module": "hw_metrics_mgmt_service", "rpcs": [{"name": "ListMetrics", "request": {"is_stream": false, "type": "HardwareID", "lookup": true}, "response": {"is_stream": false, "type": "ListMetricsResponse", "lookup": true}}, {"name": "UpdateMetricsConfiguration", "request": {"is_stream": false, "type": "MetricsConfigurationRequest", "lookup": true}, "response": {"is_stream": false, "type": "MetricsConfigurationResponse", "lookup": true}}, {"name": "GetMetric", "request": {"is_stream": false, "type": "GetMetricRequest", "lookup": true}, "response": {"is_stream": false, "type": "GetMetricResponse", "lookup": true}}]}, {"name": "NativeEventsManagementService", "module": "hw_events_mgmt_service", "rpcs": [{"name": "ListEvents", "request": {"is_stream": false, "type": "HardwareID", "lookup": true}, "response": {"is_stream": false, "type": "ListEventsResponse", "lookup": true}}, {"name": "UpdateEventsConfiguration", "request": {"is_stream": false, "type": "EventsConfigurationRequest", "lookup": true}, "response": {"is_stream": false, "type": "EventsConfigurationResponse", "lookup": true}}]}, {"name": "NativeHWManagementService", "module": "hw_management_service", "rpcs": [{"name": "StartManagingDevice", "request": {"is_stream": false, "type": "ModifiableComponent", "lookup": true}, "response": {"is_stream": true, "type": "StartManagingDeviceResponse", "lookup": true}}, {"name": "StopManagingDevice", "request": {"is_stream": false, "type": "StopManagingDeviceRequest", "lookup": true}, "response": {"is_stream": false, "type": "StopManagingDeviceResponse", "lookup": true}}, {"name": "GetManagedDevices", "request": {"is_stream": false, "type": "google.protobuf.Empty", "lookup": false}, "response": {"is_stream": false, "type": "ManagedDevicesResponse", "lookup": true}}, {"name": "GetPhysicalInventory", "request": {"is_stream": false, "type": "PhysicalInventoryRequest", "lookup": true}, "response": {"is_stream": true, "type": "PhysicalInventoryResponse", "lookup": true}}, {"name": "GetHWComponentInfo", "request": {"is_stream": false, "type": "HWComponentInfoGetRequest", "lookup": true}, "response": {"is_stream": true, "type": "HWComponentInfoGetResponse", "lookup": true}}, {"name": "SetHWComponentInfo", "request": {"is_stream": false, "type": "HWComponentInfoSetRequest", "lookup": true}, "response": {"is_stream": false, "type": "HWComponentInfoSetResponse", "lookup": true}}, {"name": "SetLoggingEndpoint", "request": {"is_stream": false, "type": "SetLoggingEndpointRequest", "lookup": true}, "response": {"is_stream": false, "type": "SetRemoteEndpointResponse", "lookup": true}}, {"name": "GetLoggingEndpoint", "request": {"is_stream": false, "type": "Uuid", "lookup": true}, "response": {"is_stream": false, "type": "GetLoggingEndpointResponse", "lookup": true}}, {"name": "SetMsgBusEndpoint", "request": {"is_stream": false, "type": "SetMsgBusEndpointRequest", "lookup": true}, "response": {"is_stream": false, "type": "SetRemoteEndpointResponse", "lookup": true}}, {"name": "GetMsgBusEndpoint", "request": {"is_stream": false, "type": "google.protobuf.Empty", "lookup": false}, "response": {"is_stream": false, "type": "GetMsgBusEndpointResponse", "lookup": true}}, {"name": "GetLoggableEntities", "request": {"is_stream": false, "type": "GetLoggableEntitiesRequest", "lookup": true}, "response": {"is_stream": false, "type": "GetLogLevelResponse", "lookup": true}}, {"name": "SetLogLevel", "request": {"is_stream": false, "type": "SetLogLevelRequest", "lookup": true}, "response": {"is_stream": false, "type": "SetLogLevelResponse", "lookup": true}}, {"name": "GetLogLevel", "request": {"is_stream": false, "type": "GetLogLevelRequest", "lookup": true}, "response": {"is_stream": false, "type": "GetLogLevelResponse", "lookup": true}}]}, {"name": "NativeSoftwareManagementService", "module": "sw_management_service", "rpcs": [{"name": "GetSoftwareVersion", "request": {"is_stream": false, "type": "HardwareID", "lookup": true}, "response": {"is_stream": false, "type": "GetSoftwareVersionInformationResponse", "lookup": true}}, {"name": "DownloadImage", "request": {"is_stream": false, "type": "DownloadImageRequest", "lookup": true}, "response": {"is_stream": true, "type": "ImageStatus", "lookup": true}}, {"name": "ActivateImage", "request": {"is_stream": false, "type": "HardwareID", "lookup": true}, "response": {"is_stream": true, "type": "ImageStatus", "lookup": true}}, {"name": "RevertToStandbyImage", "request": {"is_stream": false, "type": "HardwareID", "lookup": true}, "response": {"is_stream": true, "type": "ImageStatus", "lookup": true}}]}]}
\ No newline at end of file
diff --git a/grpc_robot/services/dmi/dmi_0_9_4/__init__.py b/grpc_robot/services/dmi/dmi_0_9_4/__init__.py
new file mode 100644
index 0000000..789917d
--- /dev/null
+++ b/grpc_robot/services/dmi/dmi_0_9_4/__init__.py
@@ -0,0 +1,17 @@
+# Copyright 2020-present Open Networking Foundation
+# Original copyright 2020-present ADTRAN, Inc.
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+from ..dmi_0_9_1.hw_events_mgmt_service import *
+from ..dmi_0_9_1.hw_metrics_mgmt_service import *
+from ..dmi_0_9_1.sw_management_service import *
+from .hw_management_service import *
diff --git a/grpc_robot/services/dmi/dmi_0_9_4/dmi.json b/grpc_robot/services/dmi/dmi_0_9_4/dmi.json
new file mode 100644
index 0000000..eee2af4
--- /dev/null
+++ b/grpc_robot/services/dmi/dmi_0_9_4/dmi.json
@@ -0,0 +1 @@
+{"modules": [{"name": "commons", "imports": []}, {"name": "hw", "imports": ["timestamp"]}, {"name": "hw_metrics_mgmt_service", "imports": ["commons", "hw"]}, {"name": "hw_events_mgmt_service", "imports": ["commons", "hw", "timestamp"]}, {"name": "sw_image", "imports": ["commons"]}, {"name": "hw_management_service", "imports": ["commons", "hw", "empty"]}, {"name": "sw_management_service", "imports": ["commons", "hw", "sw_image"]}], "data_types": [{"name": "Status", "type": "enum", "module": "commons", "values": {"0": "UNDEFINED_STATUS", "1": "OK_STATUS", "2": "ERROR_STATUS"}}, {"name": "Reason", "type": "enum", "module": "commons", "values": {"0": "UNDEFINED_REASON", "1": "UNKNOWN_DEVICE", "2": "INTERNAL_ERROR", "3": "WRONG_METRIC", "4": "WRONG_EVENT", "5": "LOGGING_ENDPOINT_ERROR", "6": "LOGGING_ENDPOINT_PROTOCOL_ERROR", "7": "KAFKA_ENDPOINT_ERROR", "8": "UNKNOWN_LOG_ENTITY"}}, {"name": "LogLevel", "type": "enum", "module": "commons", "values": {"0": "TRACE", "1": "DEBUG", "2": "INFO", "3": "WARN", "4": "ERROR"}}, {"name": "Uuid", "type": "message", "module": "hw", "fields": [{"name": "uuid", "is_choice": false, "repeated": false, "type": "string", "lookup": false}]}, {"name": "HardwareID", "type": "message", "module": "hw", "fields": [{"name": "uuid", "is_choice": false, "repeated": false, "type": "Uuid", "lookup": true}]}, {"name": "Uri", "type": "message", "module": "hw", "fields": [{"name": "uri", "is_choice": false, "repeated": false, "type": "string", "lookup": false}]}, {"name": "ComponentType", "type": "enum", "module": "hw", "values": {"0": "COMPONENT_TYPE_UNDEFINED", "1": "COMPONENT_TYPE_UNKNOWN", "2": "COMPONENT_TYPE_CHASSIS", "3": "COMPONENT_TYPE_BACKPLANE", "4": "COMPONENT_TYPE_CONTAINER", "5": "COMPONENT_TYPE_POWER_SUPPLY", "6": "COMPONENT_TYPE_FAN", "7": "COMPONENT_TYPE_SENSOR", "8": "COMPONENT_TYPE_MODULE", "9": "COMPONENT_TYPE_PORT", "10": "COMPONENT_TYPE_CPU", "11": "COMPONENT_TYPE_BATTERY", "12": "COMPONENT_TYPE_STORAGE", "13": "COMPONENT_TYPE_MEMORY", "14": "COMPONENT_TYPE_TRANSCEIVER", "15": "COMPONENT_TYPE_GPON_TRANSCEIVER", "16": "COMPONENT_TYPE_XGS_PON_TRANSCEIVER"}}, {"name": "ComponentAdminState", "type": "enum", "module": "hw", "values": {"0": "COMP_ADMIN_STATE_UNDEFINED", "1": "COMP_ADMIN_STATE_UNKNOWN", "2": "COMP_ADMIN_STATE_LOCKED", "3": "COMP_ADMIN_STATE_SHUTTING_DOWN", "4": "COMP_ADMIN_STATE_UNLOCKED"}}, {"name": "ComponentOperState", "type": "enum", "module": "hw", "values": {"0": "COMP_OPER_STATE_UNDEFINED", "1": "COMP_OPER_STATE_UNKNOWN", "2": "COMP_OPER_STATE_DISABLED", "3": "COMP_OPER_STATE_ENABLED", "4": "COMP_OPER_STATE_TESTING"}}, {"name": "ComponentUsageState", "type": "enum", "module": "hw", "values": {"0": "COMP_USAGE_STATE_UNDEFINED", "1": "COMP_USAGE_STATE_UNKNOWN", "2": "COMP_USAGE_STATE_IDLE", "3": "COMP_USAGE_STATE_ACTIVE", "4": "COMP_USAGE_STATE_BUSY"}}, {"name": "ComponentAlarmState", "type": "enum", "module": "hw", "values": {"0": "COMP_ALARM_STATE_UNDEFINED", "1": "COMP_ALARM_STATE_UNKNOWN", "2": "COMP_ALARM_STATE_UNDER_REPAIR", "3": "COMP_ALARM_STATE_CRITICAL", "4": "COMP_ALARM_STATE_MAJOR", "5": "COMP_ALARM_STATE_MINOR", "6": "COMP_ALARM_STATE_WARNING", "7": "COMP_ALARM_STATE_INTERMEDIATE"}}, {"name": "ComponentStandbyState", "type": "enum", "module": "hw", "values": {"0": "COMP_STANDBY_STATE_UNDEFINED", "1": "COMP_STANDBY_STATE_UNKNOWN", "2": "COMP_STANDBY_STATE_HOT", "3": "COMP_STANDBY_STATE_COLD", "4": "COMP_STANDBY_STATE_PROVIDING_SERVICE"}}, {"name": "ComponentState", "type": "message", "module": "hw", "fields": [{"name": "state_last_changed", "is_choice": false, "repeated": false, "type": "google.protobuf.Timestamp", "lookup": true}, {"name": "admin_state", "is_choice": false, "repeated": false, "type": "ComponentAdminState", "lookup": true}, {"name": "oper_state", "is_choice": false, "repeated": false, "type": "ComponentOperState", "lookup": true}, {"name": "usage_state", "is_choice": false, "repeated": false, "type": "ComponentUsageState", "lookup": true}, {"name": "alarm_state", "is_choice": false, "repeated": false, "type": "ComponentAlarmState", "lookup": true}, {"name": "standby_state", "is_choice": false, "repeated": false, "type": "ComponentStandbyState", "lookup": true}]}, {"name": "SensorValueType", "type": "enum", "module": "hw", "values": {"0": "SENSOR_VALUE_TYPE_UNDEFINED", "1": "SENSOR_VALUE_TYPE_OTHER", "2": "SENSOR_VALUE_TYPE_UNKNOWN", "3": "SENSOR_VALUE_TYPE_VOLTS_AC", "4": "SENSOR_VALUE_TYPE_VOLTS_DC", "5": "SENSOR_VALUE_TYPE_AMPERES", "6": "SENSOR_VALUE_TYPE_WATTS", "7": "SENSOR_VALUE_TYPE_HERTZ", "8": "SENSOR_VALUE_TYPE_CELSIUS", "9": "SENSOR_VALUE_TYPE_PERCENT_RH", "10": "SENSOR_VALUE_TYPE_RPM", "11": "SENSOR_VALUE_TYPE_CMM", "12": "SENSOR_VALUE_TYPE_TRUTH_VALUE"}}, {"name": "SensorValueScale", "type": "enum", "module": "hw", "values": {"0": "SENSOR_VALUE_SCALE_UNDEFINED", "1": "SENSOR_VALUE_SCALE_YOCTO", "2": "SENSOR_VALUE_SCALE_ZEPTO", "3": "SENSOR_VALUE_SCALE_ATTO", "4": "SENSOR_VALUE_SCALE_FEMTO", "5": "SENSOR_VALUE_SCALE_PICO", "6": "SENSOR_VALUE_SCALE_NANO", "7": "SENSOR_VALUE_SCALE_MICRO", "8": "SENSOR_VALUE_SCALE_MILLI", "9": "SENSOR_VALUE_SCALE_UNITS", "10": "SENSOR_VALUE_SCALE_KILO", "11": "SENSOR_VALUE_SCALE_MEGA", "12": "SENSOR_VALUE_SCALE_GIGA", "13": "SENSOR_VALUE_SCALE_TERA", "14": "SENSOR_VALUE_SCALE_PETA", "15": "SENSOR_VALUE_SCALE_EXA", "16": "SENSOR_VALUE_SCALE_ZETTA", "17": "SENSOR_VALUE_SCALE_YOTTA"}}, {"name": "SensorStatus", "type": "enum", "module": "hw", "values": {"0": "SENSOR_STATUS_UNDEFINED", "1": "SENSOR_STATUS_OK", "2": "SENSOR_STATUS_UNAVAILABLE", "3": "SENSOR_STATUS_NONOPERATIONAL"}}, {"name": "ComponentSensorData", "type": "message", "module": "hw", "fields": [{"name": "value", "is_choice": false, "repeated": false, "type": "int32", "lookup": false}, {"name": "type", "is_choice": false, "repeated": false, "type": "SensorValueType", "lookup": true}, {"name": "scale", "is_choice": false, "repeated": false, "type": "SensorValueScale", "lookup": true}, {"name": "precision", "is_choice": false, "repeated": false, "type": "int32", "lookup": false}, {"name": "status", "is_choice": false, "repeated": false, "type": "SensorStatus", "lookup": true}, {"name": "units_display", "is_choice": false, "repeated": false, "type": "string", "lookup": false}, {"name": "timestamp", "is_choice": false, "repeated": false, "type": "google.protobuf.Timestamp", "lookup": true}, {"name": "value_update_rate", "is_choice": false, "repeated": false, "type": "uint32", "lookup": false}, {"name": "data_type", "is_choice": false, "repeated": false, "type": "string", "lookup": false}]}, {"name": "Component", "type": "message", "module": "hw", "fields": [{"name": "name", "is_choice": false, "repeated": false, "type": "string", "lookup": false}, {"name": "class", "is_choice": false, "repeated": false, "type": "ComponentType", "lookup": true}, {"name": "description", "is_choice": false, "repeated": false, "type": "string", "lookup": false}, {"name": "parent", "is_choice": false, "repeated": false, "type": "string", "lookup": false}, {"name": "parent_rel_pos", "is_choice": false, "repeated": false, "type": "int32", "lookup": false}, {"name": "children", "is_choice": false, "repeated": true, "type": "Component", "lookup": true}, {"name": "hardware_rev", "is_choice": false, "repeated": false, "type": "string", "lookup": false}, {"name": "firmware_rev", "is_choice": false, "repeated": false, "type": "string", "lookup": false}, {"name": "software_rev", "is_choice": false, "repeated": false, "type": "string", "lookup": false}, {"name": "serial_num", "is_choice": false, "repeated": false, "type": "string", "lookup": false}, {"name": "mfg_name", "is_choice": false, "repeated": false, "type": "string", "lookup": false}, {"name": "model_name", "is_choice": false, "repeated": false, "type": "string", "lookup": false}, {"name": "alias", "is_choice": false, "repeated": false, "type": "string", "lookup": false}, {"name": "asset_id", "is_choice": false, "repeated": false, "type": "string", "lookup": false}, {"name": "is_fru", "is_choice": false, "repeated": false, "type": "bool", "lookup": false}, {"name": "mfg_date", "is_choice": false, "repeated": false, "type": "google.protobuf.Timestamp", "lookup": true}, {"name": "uri", "is_choice": false, "repeated": false, "type": "Uri", "lookup": true}, {"name": "uuid", "is_choice": false, "repeated": false, "type": "Uuid", "lookup": true}, {"name": "state", "is_choice": false, "repeated": false, "type": "ComponentState", "lookup": true}, {"name": "sensor_data", "is_choice": false, "repeated": true, "type": "ComponentSensorData", "lookup": true}]}, {"name": "Hardware", "type": "message", "module": "hw", "fields": [{"name": "last_change", "is_choice": false, "repeated": false, "type": "google.protobuf.Timestamp", "lookup": true}, {"name": "root", "is_choice": false, "repeated": false, "type": "Component", "lookup": true}]}, {"name": "ModifiableComponent", "type": "message", "module": "hw", "fields": [{"name": "name", "is_choice": false, "repeated": false, "type": "string", "lookup": false}, {"name": "class", "is_choice": false, "repeated": false, "type": "ComponentType", "lookup": true}, {"name": "parent", "is_choice": false, "repeated": false, "type": "Component", "lookup": true}, {"name": "parent_rel_pos", "is_choice": false, "repeated": false, "type": "int32", "lookup": false}, {"name": "alias", "is_choice": false, "repeated": false, "type": "string", "lookup": false}, {"name": "asset_id", "is_choice": false, "repeated": false, "type": "string", "lookup": false}, {"name": "uri", "is_choice": false, "repeated": false, "type": "Uri", "lookup": true}, {"name": "admin_state", "is_choice": false, "repeated": false, "type": "ComponentAdminState", "lookup": true}]}, {"name": "MetricNames", "type": "enum", "module": "hw_metrics_mgmt_service", "values": {"0": "METRIC_NAME_UNDEFINED", "1": "METRIC_FAN_SPEED", "100": "METRIC_CPU_TEMP", "101": "METRIC_CPU_USAGE_PERCENTAGE", "200": "METRIC_TRANSCEIVER_TEMP", "201": "METRIC_TRANSCEIVER_VOLTAGE", "202": "METRIC_TRANSCEIVER_BIAS", "203": "METRIC_TRANSCEIVER_RX_POWER", "204": "METRIC_TRANSCEIVER_TX_POWER", "205": "METRIC_TRANSCEIVER_WAVELENGTH", "300": "METRIC_DISK_TEMP", "301": "METRIC_DISK_CAPACITY", "302": "METRIC_DISK_USAGE", "303": "METRIC_DISK_USAGE_PERCENTAGE", "304": "METRIC_DISK_READ_WRITE_PERCENTAGE", "305": "METRIC_DISK_FAULTY_CELLS_PERCENTAGE", "400": "METRIC_RAM_TEMP", "401": "METRIC_RAM_CAPACITY", "402": "METRIC_RAM_USAGE", "403": "METRIC_RAM_USAGE_PERCENTAGE", "500": "METRIC_POWER_MAX", "501": "METRIC_POWER_USAGE", "502": "METRIC_POWER_USAGE_PERCENTAGE", "600": "METRIC_INNER_SURROUNDING_TEMP"}}, {"name": "MetricConfig", "type": "message", "module": "hw_metrics_mgmt_service", "fields": [{"name": "metric_id", "is_choice": false, "repeated": false, "type": "MetricNames", "lookup": true}, {"name": "is_configured", "is_choice": false, "repeated": false, "type": "bool", "lookup": false}, {"name": "poll_interval", "is_choice": false, "repeated": false, "type": "uint32", "lookup": false}]}, {"name": "MetricsConfig", "type": "message", "module": "hw_metrics_mgmt_service", "fields": [{"name": "metrics", "is_choice": false, "repeated": true, "type": "MetricConfig", "lookup": true}]}, {"name": "ListMetricsResponse", "type": "message", "module": "hw_metrics_mgmt_service", "fields": [{"name": "status", "is_choice": false, "repeated": false, "type": "Status", "lookup": true}, {"name": "reason", "is_choice": false, "repeated": false, "type": "Reason", "lookup": true}, {"name": "metrics", "is_choice": false, "repeated": false, "type": "MetricsConfig", "lookup": true}]}, {"name": "MetricsConfigurationRequest", "type": "message", "module": "hw_metrics_mgmt_service", "fields": [{"name": "device_uuid", "is_choice": false, "repeated": false, "type": "Uuid", "lookup": true}, {"name": "operation", "is_choice": true, "cases": [{"name": "changes", "type": "MetricsConfig", "lookup": true}, {"name": "reset_to_default", "type": "bool", "lookup": false}]}]}, {"name": "MetricsConfigurationResponse", "type": "message", "module": "hw_metrics_mgmt_service", "fields": [{"name": "status", "is_choice": false, "repeated": false, "type": "Status", "lookup": true}, {"name": "reason", "is_choice": false, "repeated": false, "type": "Reason", "lookup": true}]}, {"name": "MetricMetaData", "type": "message", "module": "hw_metrics_mgmt_service", "fields": [{"name": "device_uuid", "is_choice": false, "repeated": false, "type": "Uuid", "lookup": true}, {"name": "component_uuid", "is_choice": false, "repeated": false, "type": "Uuid", "lookup": true}, {"name": "component_name", "is_choice": false, "repeated": false, "type": "string", "lookup": false}]}, {"name": "Metric", "type": "message", "module": "hw_metrics_mgmt_service", "fields": [{"name": "metric_id", "is_choice": false, "repeated": false, "type": "MetricNames", "lookup": true}, {"name": "metric_metadata", "is_choice": false, "repeated": false, "type": "MetricMetaData", "lookup": true}, {"name": "value", "is_choice": false, "repeated": false, "type": "ComponentSensorData", "lookup": true}]}, {"name": "GetMetricRequest", "type": "message", "module": "hw_metrics_mgmt_service", "fields": [{"name": "meta_data", "is_choice": false, "repeated": false, "type": "MetricMetaData", "lookup": true}, {"name": "metric_id", "is_choice": false, "repeated": false, "type": "MetricNames", "lookup": true}]}, {"name": "GetMetricResponse", "type": "message", "module": "hw_metrics_mgmt_service", "fields": [{"name": "status", "is_choice": false, "repeated": false, "type": "Status", "lookup": true}, {"name": "reason", "is_choice": false, "repeated": false, "type": "Reason", "lookup": true}, {"name": "metric", "is_choice": false, "repeated": false, "type": "Metric", "lookup": true}]}, {"name": "EventIds", "type": "enum", "module": "hw_events_mgmt_service", "values": {"0": "EVENT_NAME_UNDEFINED", "100": "EVENT_TRANSCEIVER_PLUG_OUT", "101": "EVENT_TRANSCEIVER_PLUG_IN", "102": "EVENT_TRANSCEIVER_VOLTAGE_ABOVE_THRESHOLD", "103": "EVENT_TRANSCEIVER_VOLTAGE_BELOW_THRESHOLD", "104": "EVENT_TRANSCEIVER_TEMPERATURE_ABOVE_THRESHOLD", "105": "EVENT_TRANSCEIVER_TEMPERATURE_BELOW_THRESHOLD", "106": "EVENT_TRANSCEIVER_CURRENT_ABOVE_THRESHOLD", "107": "EVENT_TRANSCEIVER_CURRENT_BELOW_THRESHOLD", "108": "EVENT_TRANSCEIVER_RX_POWER_ABOVE_THRESHOLD", "109": "EVENT_TRANSCEIVER_RX_POWER_BELOW_THRESHOLD", "110": "EVENT_TRANSCEIVER_TX_POWER_ABOVE_THRESHOLD", "111": "EVENT_TRANSCEIVER_TX_POWER_BELOW_THRESHOLD", "112": "EVENT_TRANSCEIVER_FAILURE", "113": "EVENT_TRANSCEIVER_VOLTAGE_ABOVE_THRESHOLD_RECOVERED", "114": "EVENT_TRANSCEIVER_VOLTAGE_BELOW_THRESHOLD_RECOVERED", "115": "EVENT_TRANSCEIVER_TEMPERATURE_ABOVE_THRESHOLD_RECOVERED", "116": "EVENT_TRANSCEIVER_TEMPERATURE_BELOW_THRESHOLD_RECOVERED", "117": "EVENT_TRANSCEIVER_CURRENT_ABOVE_THRESHOLD_RECOVERED", "118": "EVENT_TRANSCEIVER_CURRENT_BELOW_THRESHOLD_RECOVERED", "119": "EVENT_TRANSCEIVER_RX_POWER_ABOVE_THRESHOLD_RECOVERED", "120": "EVENT_TRANSCEIVER_RX_POWER_BELOW_THRESHOLD_RECOVERED", "121": "EVENT_TRANSCEIVER_TX_POWER_ABOVE_THRESHOLD_RECOVERED", "122": "EVENT_TRANSCEIVER_TX_POWER_BELOW_THRESHOLD_RECOVERED", "123": "EVENT_TRANSCEIVER_FAILURE_RECOVERED", "200": "EVENT_PSU_PLUG_OUT", "201": "EVENT_PSU_PLUG_IN", "202": "EVENT_PSU_FAILURE", "203": "EVENT_PSU_FAILURE_RECOVERED", "300": "EVENT_FAN_FAILURE", "301": "EVENT_FAN_PLUG_OUT", "302": "EVENT_FAN_PLUG_IN", "303": "EVENT_FAN_FAILURE_RECOVERED", "400": "EVENT_CPU_TEMPERATURE_ABOVE_CRITICAL", "401": "EVENT_CPU_TEMPERATURE_ABOVE_FATAL", "402": "EVENT_CPU_TEMPERATURE_ABOVE_CRITICAL_RECOVERED", "403": "EVENT_CPU_TEMPERATURE_ABOVE_FATAL_RECOVERED", "500": "EVENT_HW_DEVICE_RESET", "501": "EVENT_HW_DEVICE_TEMPERATURE_ABOVE_CRITICAL", "502": "EVENT_HW_DEVICE_TEMPERATURE_ABOVE_FATAL", "503": "EVENT_HW_DEVICE_TEMPERATURE_ABOVE_CRITICAL_RECOVERED", "504": "EVENT_HW_DEVICE_TEMPERATURE_ABOVE_FATAL_RECOVERED"}}, {"name": "ValueType", "type": "message", "module": "hw_events_mgmt_service", "fields": [{"name": "val", "is_choice": true, "cases": [{"name": "int_val", "type": "int64", "lookup": false}, {"name": "uint_val", "type": "uint64", "lookup": false}, {"name": "float_val", "type": "float", "lookup": false}]}]}, {"name": "WaterMarks", "type": "message", "module": "hw_events_mgmt_service", "fields": [{"name": "high", "is_choice": false, "repeated": false, "type": "ValueType", "lookup": true}, {"name": "low", "is_choice": false, "repeated": false, "type": "ValueType", "lookup": true}]}, {"name": "Thresholds", "type": "message", "module": "hw_events_mgmt_service", "fields": [{"name": "threshold", "is_choice": true, "cases": [{"name": "upper", "type": "WaterMarks", "lookup": true}, {"name": "lower", "type": "WaterMarks", "lookup": true}]}]}, {"name": "ThresholdInformation", "type": "message", "module": "hw_events_mgmt_service", "fields": [{"name": "observed_value", "is_choice": false, "repeated": false, "type": "ValueType", "lookup": true}, {"name": "thresholds", "is_choice": false, "repeated": false, "type": "Thresholds", "lookup": true}]}, {"name": "EventCfg", "type": "message", "module": "hw_events_mgmt_service", "fields": [{"name": "event_id", "is_choice": false, "repeated": false, "type": "EventIds", "lookup": true}, {"name": "is_configured", "is_choice": false, "repeated": false, "type": "bool", "lookup": false}, {"name": "thresholds", "is_choice": false, "repeated": false, "type": "Thresholds", "lookup": true}]}, {"name": "EventsCfg", "type": "message", "module": "hw_events_mgmt_service", "fields": [{"name": "items", "is_choice": false, "repeated": true, "type": "EventCfg", "lookup": true}]}, {"name": "ListEventsResponse", "type": "message", "module": "hw_events_mgmt_service", "fields": [{"name": "status", "is_choice": false, "repeated": false, "type": "Status", "lookup": true}, {"name": "reason", "is_choice": false, "repeated": false, "type": "Reason", "lookup": true}, {"name": "events", "is_choice": false, "repeated": false, "type": "EventsCfg", "lookup": true}]}, {"name": "EventsConfigurationRequest", "type": "message", "module": "hw_events_mgmt_service", "fields": [{"name": "device_uuid", "is_choice": false, "repeated": false, "type": "Uuid", "lookup": true}, {"name": "operation", "is_choice": true, "cases": [{"name": "changes", "type": "EventsCfg", "lookup": true}, {"name": "reset_to_default", "type": "bool", "lookup": false}]}]}, {"name": "EventsConfigurationResponse", "type": "message", "module": "hw_events_mgmt_service", "fields": [{"name": "status", "is_choice": false, "repeated": false, "type": "Status", "lookup": true}, {"name": "reason", "is_choice": false, "repeated": false, "type": "Reason", "lookup": true}]}, {"name": "EventMetaData", "type": "message", "module": "hw_events_mgmt_service", "fields": [{"name": "device_uuid", "is_choice": false, "repeated": false, "type": "Uuid", "lookup": true}, {"name": "component_uuid", "is_choice": false, "repeated": false, "type": "Uuid", "lookup": true}, {"name": "component_name", "is_choice": false, "repeated": false, "type": "string", "lookup": false}]}, {"name": "Event", "type": "message", "module": "hw_events_mgmt_service", "fields": [{"name": "event_metadata", "is_choice": false, "repeated": false, "type": "EventMetaData", "lookup": true}, {"name": "event_id", "is_choice": false, "repeated": false, "type": "EventIds", "lookup": true}, {"name": "raised_ts", "is_choice": false, "repeated": false, "type": "google.protobuf.Timestamp", "lookup": true}, {"name": "threshold_info", "is_choice": false, "repeated": false, "type": "ThresholdInformation", "lookup": true}, {"name": "add_info", "is_choice": false, "repeated": false, "type": "string", "lookup": false}]}, {"name": "ImageVersion", "type": "message", "module": "sw_image", "fields": [{"name": "image_name", "is_choice": false, "repeated": false, "type": "string", "lookup": false}, {"name": "version", "is_choice": false, "repeated": false, "type": "string", "lookup": false}]}, {"name": "ImageInformation", "type": "message", "module": "sw_image", "fields": [{"name": "image", "is_choice": false, "repeated": false, "type": "ImageVersion", "lookup": true}, {"name": "image_install_script", "is_choice": false, "repeated": false, "type": "string", "lookup": false}, {"name": "image_url", "is_choice": false, "repeated": false, "type": "string", "lookup": false}, {"name": "sha256sum", "is_choice": false, "repeated": false, "type": "string", "lookup": false}]}, {"name": "ImageState", "type": "enum", "module": "sw_image", "values": {"0": "UNDEFINED_STATE", "1": "COPYING_IMAGE", "2": "INSTALLING_IMAGE", "3": "COMMITTING_IMAGE", "4": "REBOOTING_DEVICE", "5": "UPGRADE_COMPLETE", "6": "UPGRADE_FAILED", "7": "ACTIVATION_COMPLETE", "8": "ACTIVATION_FAILED"}}, {"name": "Reason", "type": "enum", "module": "sw_image", "values": {"0": "UNDEFINED_REASON", "1": "ERROR_IN_REQUEST", "2": "INTERNAL_ERROR", "3": "DEVICE_IN_WRONG_STATE", "4": "INVALID_IMAGE", "5": "WRONG_IMAGE_CHECKSUM"}}, {"name": "ImageStatus", "type": "message", "module": "sw_image", "fields": [{"name": "status", "is_choice": false, "repeated": false, "type": "Status", "lookup": true}, {"name": "reason", "is_choice": false, "repeated": false, "type": "Reason", "lookup": true}, {"name": "state", "is_choice": false, "repeated": false, "type": "ImageState", "lookup": true}, {"name": "description", "is_choice": false, "repeated": false, "type": "string", "lookup": false}]}, {"name": "PhysicalInventoryRequest", "type": "message", "module": "hw_management_service", "fields": [{"name": "device_uuid", "is_choice": false, "repeated": false, "type": "Uuid", "lookup": true}]}, {"name": "PhysicalInventoryResponse", "type": "message", "module": "hw_management_service", "fields": [{"name": "status", "is_choice": false, "repeated": false, "type": "Status", "lookup": true}, {"name": "reason", "is_choice": false, "repeated": false, "type": "Reason", "lookup": true}, {"name": "inventory", "is_choice": false, "repeated": false, "type": "Hardware", "lookup": true}]}, {"name": "HWComponentInfoGetRequest", "type": "message", "module": "hw_management_service", "fields": [{"name": "device_uuid", "is_choice": false, "repeated": false, "type": "Uuid", "lookup": true}, {"name": "component_uuid", "is_choice": false, "repeated": false, "type": "Uuid", "lookup": true}, {"name": "component_name", "is_choice": false, "repeated": false, "type": "string", "lookup": false}]}, {"name": "HWComponentInfoGetResponse", "type": "message", "module": "hw_management_service", "fields": [{"name": "status", "is_choice": false, "repeated": false, "type": "Status", "lookup": true}, {"name": "reason", "is_choice": false, "repeated": false, "type": "Reason", "lookup": true}, {"name": "component", "is_choice": false, "repeated": false, "type": "Component", "lookup": true}]}, {"name": "HWComponentInfoSetRequest", "type": "message", "module": "hw_management_service", "fields": [{"name": "device_uuid", "is_choice": false, "repeated": false, "type": "Uuid", "lookup": true}, {"name": "component_uuid", "is_choice": false, "repeated": false, "type": "Uuid", "lookup": true}, {"name": "component_name", "is_choice": false, "repeated": false, "type": "string", "lookup": false}, {"name": "changes", "is_choice": false, "repeated": false, "type": "ModifiableComponent", "lookup": true}]}, {"name": "HWComponentInfoSetResponse", "type": "message", "module": "hw_management_service", "fields": [{"name": "status", "is_choice": false, "repeated": false, "type": "Status", "lookup": true}, {"name": "reason", "is_choice": false, "repeated": false, "type": "Reason", "lookup": true}]}, {"name": "StartManagingDeviceResponse", "type": "message", "module": "hw_management_service", "fields": [{"name": "status", "is_choice": false, "repeated": false, "type": "Status", "lookup": true}, {"name": "reason", "is_choice": false, "repeated": false, "type": "Reason", "lookup": true}, {"name": "device_uuid", "is_choice": false, "repeated": false, "type": "Uuid", "lookup": true}]}, {"name": "StopManagingDeviceRequest", "type": "message", "module": "hw_management_service", "fields": [{"name": "name", "is_choice": false, "repeated": false, "type": "string", "lookup": false}]}, {"name": "StopManagingDeviceResponse", "type": "message", "module": "hw_management_service", "fields": [{"name": "status", "is_choice": false, "repeated": false, "type": "Status", "lookup": true}, {"name": "reason", "is_choice": false, "repeated": false, "type": "Reason", "lookup": true}]}, {"name": "ManagedDevicesResponse", "type": "message", "module": "hw_management_service", "fields": [{"name": "devices", "is_choice": false, "repeated": true, "type": "ModifiableComponent", "lookup": true}]}, {"name": "SetLoggingEndpointRequest", "type": "message", "module": "hw_management_service", "fields": [{"name": "device_uuid", "is_choice": false, "repeated": false, "type": "Uuid", "lookup": true}, {"name": "logging_endpoint", "is_choice": false, "repeated": false, "type": "string", "lookup": false}, {"name": "logging_protocol", "is_choice": false, "repeated": false, "type": "string", "lookup": false}]}, {"name": "SetRemoteEndpointResponse", "type": "message", "module": "hw_management_service", "fields": [{"name": "status", "is_choice": false, "repeated": false, "type": "Status", "lookup": true}, {"name": "reason", "is_choice": false, "repeated": false, "type": "Reason", "lookup": true}]}, {"name": "GetLoggingEndpointResponse", "type": "message", "module": "hw_management_service", "fields": [{"name": "status", "is_choice": false, "repeated": false, "type": "Status", "lookup": true}, {"name": "reason", "is_choice": false, "repeated": false, "type": "Reason", "lookup": true}, {"name": "logging_endpoint", "is_choice": false, "repeated": false, "type": "string", "lookup": false}, {"name": "logging_protocol", "is_choice": false, "repeated": false, "type": "string", "lookup": false}]}, {"name": "SetMsgBusEndpointRequest", "type": "message", "module": "hw_management_service", "fields": [{"name": "msgbus_endpoint", "is_choice": false, "repeated": false, "type": "string", "lookup": false}]}, {"name": "GetMsgBusEndpointResponse", "type": "message", "module": "hw_management_service", "fields": [{"name": "status", "is_choice": false, "repeated": false, "type": "Status", "lookup": true}, {"name": "reason", "is_choice": false, "repeated": false, "type": "Reason", "lookup": true}, {"name": "msgbus_endpoint", "is_choice": false, "repeated": false, "type": "string", "lookup": false}]}, {"name": "EntitiesLogLevel", "type": "message", "module": "hw_management_service", "fields": [{"name": "logLevel", "is_choice": false, "repeated": false, "type": "LogLevel", "lookup": true}, {"name": "entities", "is_choice": false, "repeated": true, "type": "string", "lookup": false}]}, {"name": "SetLogLevelRequest", "type": "message", "module": "hw_management_service", "fields": [{"name": "device_uuid", "is_choice": false, "repeated": false, "type": "Uuid", "lookup": true}, {"name": "loglevels", "is_choice": false, "repeated": true, "type": "EntitiesLogLevel", "lookup": true}]}, {"name": "SetLogLevelResponse", "type": "message", "module": "hw_management_service", "fields": [{"name": "device_uuid", "is_choice": false, "repeated": false, "type": "Uuid", "lookup": true}, {"name": "status", "is_choice": false, "repeated": false, "type": "Status", "lookup": true}, {"name": "reason", "is_choice": false, "repeated": false, "type": "Reason", "lookup": true}]}, {"name": "GetLogLevelRequest", "type": "message", "module": "hw_management_service", "fields": [{"name": "device_uuid", "is_choice": false, "repeated": false, "type": "Uuid", "lookup": true}, {"name": "entities", "is_choice": false, "repeated": true, "type": "string", "lookup": false}]}, {"name": "GetLogLevelResponse", "type": "message", "module": "hw_management_service", "fields": [{"name": "device_uuid", "is_choice": false, "repeated": false, "type": "Uuid", "lookup": true}, {"name": "logLevels", "is_choice": false, "repeated": true, "type": "EntitiesLogLevel", "lookup": true}, {"name": "status", "is_choice": false, "repeated": false, "type": "Status", "lookup": true}, {"name": "reason", "is_choice": false, "repeated": false, "type": "Reason", "lookup": true}]}, {"name": "GetLoggableEntitiesRequest", "type": "message", "module": "hw_management_service", "fields": [{"name": "device_uuid", "is_choice": false, "repeated": false, "type": "Uuid", "lookup": true}]}, {"name": "SoftwareVersionInformation", "type": "message", "module": "sw_management_service", "fields": [{"name": "active_versions", "is_choice": false, "repeated": true, "type": "ImageVersion", "lookup": true}, {"name": "standby_versions", "is_choice": false, "repeated": true, "type": "ImageVersion", "lookup": true}]}, {"name": "GetSoftwareVersionInformationResponse", "type": "message", "module": "sw_management_service", "fields": [{"name": "status", "is_choice": false, "repeated": false, "type": "Status", "lookup": true}, {"name": "reason", "is_choice": false, "repeated": false, "type": "Reason", "lookup": true}, {"name": "info", "is_choice": false, "repeated": false, "type": "SoftwareVersionInformation", "lookup": true}]}, {"name": "DownloadImageRequest", "type": "message", "module": "sw_management_service", "fields": [{"name": "device_uuid", "is_choice": false, "repeated": false, "type": "Uuid", "lookup": true}, {"name": "image_info", "is_choice": false, "repeated": false, "type": "ImageInformation", "lookup": true}]}], "services": [{"name": "NativeMetricsManagementService", "module": "hw_metrics_mgmt_service", "rpcs": [{"name": "ListMetrics", "request": {"is_stream": false, "type": "HardwareID", "lookup": true}, "response": {"is_stream": false, "type": "ListMetricsResponse", "lookup": true}}, {"name": "UpdateMetricsConfiguration", "request": {"is_stream": false, "type": "MetricsConfigurationRequest", "lookup": true}, "response": {"is_stream": false, "type": "MetricsConfigurationResponse", "lookup": true}}, {"name": "GetMetric", "request": {"is_stream": false, "type": "GetMetricRequest", "lookup": true}, "response": {"is_stream": false, "type": "GetMetricResponse", "lookup": true}}]}, {"name": "NativeEventsManagementService", "module": "hw_events_mgmt_service", "rpcs": [{"name": "ListEvents", "request": {"is_stream": false, "type": "HardwareID", "lookup": true}, "response": {"is_stream": false, "type": "ListEventsResponse", "lookup": true}}, {"name": "UpdateEventsConfiguration", "request": {"is_stream": false, "type": "EventsConfigurationRequest", "lookup": true}, "response": {"is_stream": false, "type": "EventsConfigurationResponse", "lookup": true}}]}, {"name": "NativeHWManagementService", "module": "hw_management_service", "rpcs": [{"name": "StartManagingDevice", "request": {"is_stream": false, "type": "ModifiableComponent", "lookup": true}, "response": {"is_stream": true, "type": "StartManagingDeviceResponse", "lookup": true}}, {"name": "StopManagingDevice", "request": {"is_stream": false, "type": "StopManagingDeviceRequest", "lookup": true}, "response": {"is_stream": false, "type": "StopManagingDeviceResponse", "lookup": true}}, {"name": "GetManagedDevices", "request": {"is_stream": false, "type": "google.protobuf.Empty", "lookup": false}, "response": {"is_stream": false, "type": "ManagedDevicesResponse", "lookup": true}}, {"name": "GetPhysicalInventory", "request": {"is_stream": false, "type": "PhysicalInventoryRequest", "lookup": true}, "response": {"is_stream": true, "type": "PhysicalInventoryResponse", "lookup": true}}, {"name": "GetHWComponentInfo", "request": {"is_stream": false, "type": "HWComponentInfoGetRequest", "lookup": true}, "response": {"is_stream": true, "type": "HWComponentInfoGetResponse", "lookup": true}}, {"name": "SetHWComponentInfo", "request": {"is_stream": false, "type": "HWComponentInfoSetRequest", "lookup": true}, "response": {"is_stream": false, "type": "HWComponentInfoSetResponse", "lookup": true}}, {"name": "SetLoggingEndpoint", "request": {"is_stream": false, "type": "SetLoggingEndpointRequest", "lookup": true}, "response": {"is_stream": false, "type": "SetRemoteEndpointResponse", "lookup": true}}, {"name": "GetLoggingEndpoint", "request": {"is_stream": false, "type": "HardwareID", "lookup": true}, "response": {"is_stream": false, "type": "GetLoggingEndpointResponse", "lookup": true}}, {"name": "SetMsgBusEndpoint", "request": {"is_stream": false, "type": "SetMsgBusEndpointRequest", "lookup": true}, "response": {"is_stream": false, "type": "SetRemoteEndpointResponse", "lookup": true}}, {"name": "GetMsgBusEndpoint", "request": {"is_stream": false, "type": "google.protobuf.Empty", "lookup": false}, "response": {"is_stream": false, "type": "GetMsgBusEndpointResponse", "lookup": true}}, {"name": "GetLoggableEntities", "request": {"is_stream": false, "type": "GetLoggableEntitiesRequest", "lookup": true}, "response": {"is_stream": false, "type": "GetLogLevelResponse", "lookup": true}}, {"name": "SetLogLevel", "request": {"is_stream": false, "type": "SetLogLevelRequest", "lookup": true}, "response": {"is_stream": false, "type": "SetLogLevelResponse", "lookup": true}}, {"name": "GetLogLevel", "request": {"is_stream": false, "type": "GetLogLevelRequest", "lookup": true}, "response": {"is_stream": false, "type": "GetLogLevelResponse", "lookup": true}}]}, {"name": "NativeSoftwareManagementService", "module": "sw_management_service", "rpcs": [{"name": "GetSoftwareVersion", "request": {"is_stream": false, "type": "HardwareID", "lookup": true}, "response": {"is_stream": false, "type": "GetSoftwareVersionInformationResponse", "lookup": true}}, {"name": "DownloadImage", "request": {"is_stream": false, "type": "DownloadImageRequest", "lookup": true}, "response": {"is_stream": true, "type": "ImageStatus", "lookup": true}}, {"name": "ActivateImage", "request": {"is_stream": false, "type": "HardwareID", "lookup": true}, "response": {"is_stream": true, "type": "ImageStatus", "lookup": true}}, {"name": "RevertToStandbyImage", "request": {"is_stream": false, "type": "HardwareID", "lookup": true}, "response": {"is_stream": true, "type": "ImageStatus", "lookup": true}}]}]}
\ No newline at end of file
diff --git a/grpc_robot/services/dmi/dmi_0_9_4/hw_management_service.py b/grpc_robot/services/dmi/dmi_0_9_4/hw_management_service.py
new file mode 100644
index 0000000..5430d07
--- /dev/null
+++ b/grpc_robot/services/dmi/dmi_0_9_4/hw_management_service.py
@@ -0,0 +1,104 @@
+# Copyright 2020-present Open Networking Foundation
+# Original copyright 2020-present ADTRAN, Inc.
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+from robot.api.deco import keyword
+from ...service import is_connected
+
+from grpc_robot.services.service import Service
+from dmi import hw_management_service_pb2_grpc, hw_management_service_pb2, hw_pb2
+
+
+class NativeHWManagementService(Service):
+
+ prefix = 'hw_management_service_'
+
+ def __init__(self, ctx):
+ super().__init__(ctx=ctx, stub=hw_management_service_pb2_grpc.NativeHWManagementServiceStub)
+
+ # rpc StartManagingDevice(ModifiableComponent) returns(stream StartManagingDeviceResponse);
+ @keyword
+ @is_connected
+ def hw_management_service_start_managing_device(self, param_dict, **kwargs):
+ return self._grpc_helper(self.stub.StartManagingDevice, hw_pb2.ModifiableComponent, param_dict, **kwargs)
+
+ # rpc StopManagingDevice(StopManagingDeviceRequest) returns(StopManagingDeviceResponse);
+ @keyword
+ @is_connected
+ def hw_management_service_stop_managing_device(self, param_dict, **kwargs):
+ return self._grpc_helper(self.stub.StopManagingDevice, hw_management_service_pb2.StopManagingDeviceRequest, param_dict, **kwargs)
+
+ # rpc GetPhysicalInventory(PhysicalInventoryRequest) returns(stream PhysicalInventoryResponse);
+ @keyword
+ @is_connected
+ def hw_management_service_get_physical_inventory(self, param_dict, **kwargs):
+ return self._grpc_helper(self.stub.GetPhysicalInventory, hw_management_service_pb2.PhysicalInventoryRequest, param_dict, **kwargs)
+
+ # rpc GetHWComponentInfo(HWComponentInfoGetRequest) returns(stream HWComponentInfoGetResponse);
+ @keyword
+ @is_connected
+ def hw_management_service_get_hw_component_info(self, param_dict, **kwargs):
+ return self._grpc_helper(self.stub.GetHWComponentInfo, hw_management_service_pb2.HWComponentInfoGetRequest, param_dict, **kwargs)
+
+ # rpc SetHWComponentInfo(HWComponentInfoSetRequest) returns(HWComponentInfoSetResponse);
+ @keyword
+ @is_connected
+ def hw_management_service_set_hw_component_info(self, param_dict, **kwargs):
+ return self._grpc_helper(self.stub.SetHWComponentInfo, hw_management_service_pb2.HWComponentInfoSetRequest, param_dict, **kwargs)
+
+ # rpc GetManagedDevices(google.protobuf.Empty) returns(ManagedDevicesResponse);
+ @keyword
+ @is_connected
+ def hw_management_service_get_managed_devices(self, **kwargs):
+ return self._grpc_helper(self.stub.GetManagedDevices, **kwargs)
+
+ # rpc SetLoggingEndpoint(SetLoggingEndpointRequest) returns(SetRemoteEndpointResponse);
+ @keyword
+ @is_connected
+ def hw_management_service_set_logging_endpoint(self, param_dict, **kwargs):
+ return self._grpc_helper(self.stub.SetLoggingEndpoint, hw_management_service_pb2.SetLoggingEndpointRequest, param_dict, **kwargs)
+
+ # rpc GetLoggingEndpoint(HardwareID) returns(GetLoggingEndpointResponse);
+ @keyword
+ @is_connected
+ def hw_management_service_get_logging_endpoint(self, param_dict, **kwargs):
+ return self._grpc_helper(self.stub.GetLoggingEndpoint, hw_pb2.HardwareID, param_dict)
+
+ # rpc SetMsgBusEndpoint(SetMsgBusEndpointRequest) returns(SetRemoteEndpointResponse);
+ @keyword
+ @is_connected
+ def hw_management_service_set_msg_bus_endpoint(self, param_dict, **kwargs):
+ return self._grpc_helper(self.stub.SetMsgBusEndpoint, hw_management_service_pb2.SetMsgBusEndpointRequest, param_dict, **kwargs)
+
+ # rpc GetMsgBusEndpoint(google.protobuf.Empty) returns(GetMsgBusEndpointResponse);
+ @keyword
+ @is_connected
+ def hw_management_service_get_msg_bus_endpoint(self, **kwargs):
+ return self._grpc_helper(self.stub.GetMsgBusEndpoint, **kwargs)
+
+ # rpc GetLoggableEntities(GetLoggableEntitiesRequest) returns(GetLogLevelResponse);
+ @keyword
+ @is_connected
+ def hw_management_service_get_loggable_entities(self, param_dict, **kwargs):
+ return self._grpc_helper(self.stub.GetLoggableEntities, hw_management_service_pb2.GetLoggableEntitiesRequest, param_dict, **kwargs)
+
+ # rpc SetLogLevel(SetLogLevelRequest) returns(SetLogLevelResponse);
+ @keyword
+ @is_connected
+ def hw_management_service_set_log_level(self, param_dict, **kwargs):
+ return self._grpc_helper(self.stub.SetLogLevel, hw_management_service_pb2.SetLogLevelRequest, param_dict, **kwargs)
+
+ # rpc GetLogLevel(GetLogLevelRequest) returns(GetLogLevelResponse);
+ @keyword
+ @is_connected
+ def hw_management_service_get_log_level(self, param_dict, **kwargs):
+ return self._grpc_helper(self.stub.GetLogLevel, hw_management_service_pb2.GetLogLevelRequest, param_dict, **kwargs)
diff --git a/grpc_robot/services/dmi/dmi_0_9_5/__init__.py b/grpc_robot/services/dmi/dmi_0_9_5/__init__.py
new file mode 100644
index 0000000..6209d14
--- /dev/null
+++ b/grpc_robot/services/dmi/dmi_0_9_5/__init__.py
@@ -0,0 +1,17 @@
+# Copyright 2020-present Open Networking Foundation
+# Original copyright 2020-present ADTRAN, Inc.
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+from ..dmi_0_9_1.hw_events_mgmt_service import *
+from ..dmi_0_9_4.hw_management_service import *
+from ..dmi_0_9_1.hw_metrics_mgmt_service import *
+from .sw_management_service import *
diff --git a/grpc_robot/services/dmi/dmi_0_9_5/dmi.json b/grpc_robot/services/dmi/dmi_0_9_5/dmi.json
new file mode 100644
index 0000000..adb08de
--- /dev/null
+++ b/grpc_robot/services/dmi/dmi_0_9_5/dmi.json
@@ -0,0 +1 @@
+{"modules": [{"name": "commons", "imports": []}, {"name": "hw", "imports": ["timestamp"]}, {"name": "hw_metrics_mgmt_service", "imports": ["commons", "hw"]}, {"name": "hw_events_mgmt_service", "imports": ["commons", "hw", "timestamp"]}, {"name": "sw_image", "imports": ["commons"]}, {"name": "hw_management_service", "imports": ["commons", "hw", "empty"]}, {"name": "sw_management_service", "imports": ["commons", "hw", "sw_image"]}], "data_types": [{"name": "Status", "type": "enum", "module": "commons", "values": {"0": "UNDEFINED_STATUS", "1": "OK_STATUS", "2": "ERROR_STATUS"}}, {"name": "Reason", "type": "enum", "module": "commons", "values": {"0": "UNDEFINED_REASON", "1": "UNKNOWN_DEVICE", "2": "INTERNAL_ERROR", "3": "WRONG_METRIC", "4": "WRONG_EVENT", "5": "LOGGING_ENDPOINT_ERROR", "6": "LOGGING_ENDPOINT_PROTOCOL_ERROR", "7": "KAFKA_ENDPOINT_ERROR", "8": "UNKNOWN_LOG_ENTITY", "9": "ERROR_FETCHING_CONFIG", "10": "INVALID_CONFIG"}}, {"name": "LogLevel", "type": "enum", "module": "commons", "values": {"0": "TRACE", "1": "DEBUG", "2": "INFO", "3": "WARN", "4": "ERROR"}}, {"name": "Uuid", "type": "message", "module": "hw", "fields": [{"name": "uuid", "is_choice": false, "repeated": false, "type": "string", "lookup": false}]}, {"name": "HardwareID", "type": "message", "module": "hw", "fields": [{"name": "uuid", "is_choice": false, "repeated": false, "type": "Uuid", "lookup": true}]}, {"name": "Uri", "type": "message", "module": "hw", "fields": [{"name": "uri", "is_choice": false, "repeated": false, "type": "string", "lookup": false}]}, {"name": "ComponentType", "type": "enum", "module": "hw", "values": {"0": "COMPONENT_TYPE_UNDEFINED", "1": "COMPONENT_TYPE_UNKNOWN", "2": "COMPONENT_TYPE_CHASSIS", "3": "COMPONENT_TYPE_BACKPLANE", "4": "COMPONENT_TYPE_CONTAINER", "5": "COMPONENT_TYPE_POWER_SUPPLY", "6": "COMPONENT_TYPE_FAN", "7": "COMPONENT_TYPE_SENSOR", "8": "COMPONENT_TYPE_MODULE", "9": "COMPONENT_TYPE_PORT", "10": "COMPONENT_TYPE_CPU", "11": "COMPONENT_TYPE_BATTERY", "12": "COMPONENT_TYPE_STORAGE", "13": "COMPONENT_TYPE_MEMORY", "14": "COMPONENT_TYPE_TRANSCEIVER", "15": "COMPONENT_TYPE_GPON_TRANSCEIVER", "16": "COMPONENT_TYPE_XGS_PON_TRANSCEIVER"}}, {"name": "ComponentAdminState", "type": "enum", "module": "hw", "values": {"0": "COMP_ADMIN_STATE_UNDEFINED", "1": "COMP_ADMIN_STATE_UNKNOWN", "2": "COMP_ADMIN_STATE_LOCKED", "3": "COMP_ADMIN_STATE_SHUTTING_DOWN", "4": "COMP_ADMIN_STATE_UNLOCKED"}}, {"name": "ComponentOperState", "type": "enum", "module": "hw", "values": {"0": "COMP_OPER_STATE_UNDEFINED", "1": "COMP_OPER_STATE_UNKNOWN", "2": "COMP_OPER_STATE_DISABLED", "3": "COMP_OPER_STATE_ENABLED", "4": "COMP_OPER_STATE_TESTING"}}, {"name": "ComponentUsageState", "type": "enum", "module": "hw", "values": {"0": "COMP_USAGE_STATE_UNDEFINED", "1": "COMP_USAGE_STATE_UNKNOWN", "2": "COMP_USAGE_STATE_IDLE", "3": "COMP_USAGE_STATE_ACTIVE", "4": "COMP_USAGE_STATE_BUSY"}}, {"name": "ComponentAlarmState", "type": "enum", "module": "hw", "values": {"0": "COMP_ALARM_STATE_UNDEFINED", "1": "COMP_ALARM_STATE_UNKNOWN", "2": "COMP_ALARM_STATE_UNDER_REPAIR", "3": "COMP_ALARM_STATE_CRITICAL", "4": "COMP_ALARM_STATE_MAJOR", "5": "COMP_ALARM_STATE_MINOR", "6": "COMP_ALARM_STATE_WARNING", "7": "COMP_ALARM_STATE_INTERMEDIATE"}}, {"name": "ComponentStandbyState", "type": "enum", "module": "hw", "values": {"0": "COMP_STANDBY_STATE_UNDEFINED", "1": "COMP_STANDBY_STATE_UNKNOWN", "2": "COMP_STANDBY_STATE_HOT", "3": "COMP_STANDBY_STATE_COLD", "4": "COMP_STANDBY_STATE_PROVIDING_SERVICE"}}, {"name": "ComponentState", "type": "message", "module": "hw", "fields": [{"name": "state_last_changed", "is_choice": false, "repeated": false, "type": "google.protobuf.Timestamp", "lookup": true}, {"name": "admin_state", "is_choice": false, "repeated": false, "type": "ComponentAdminState", "lookup": true}, {"name": "oper_state", "is_choice": false, "repeated": false, "type": "ComponentOperState", "lookup": true}, {"name": "usage_state", "is_choice": false, "repeated": false, "type": "ComponentUsageState", "lookup": true}, {"name": "alarm_state", "is_choice": false, "repeated": false, "type": "ComponentAlarmState", "lookup": true}, {"name": "standby_state", "is_choice": false, "repeated": false, "type": "ComponentStandbyState", "lookup": true}]}, {"name": "SensorValueType", "type": "enum", "module": "hw", "values": {"0": "SENSOR_VALUE_TYPE_UNDEFINED", "1": "SENSOR_VALUE_TYPE_OTHER", "2": "SENSOR_VALUE_TYPE_UNKNOWN", "3": "SENSOR_VALUE_TYPE_VOLTS_AC", "4": "SENSOR_VALUE_TYPE_VOLTS_DC", "5": "SENSOR_VALUE_TYPE_AMPERES", "6": "SENSOR_VALUE_TYPE_WATTS", "7": "SENSOR_VALUE_TYPE_HERTZ", "8": "SENSOR_VALUE_TYPE_CELSIUS", "9": "SENSOR_VALUE_TYPE_PERCENT_RH", "10": "SENSOR_VALUE_TYPE_RPM", "11": "SENSOR_VALUE_TYPE_CMM", "12": "SENSOR_VALUE_TYPE_TRUTH_VALUE"}}, {"name": "SensorValueScale", "type": "enum", "module": "hw", "values": {"0": "SENSOR_VALUE_SCALE_UNDEFINED", "1": "SENSOR_VALUE_SCALE_YOCTO", "2": "SENSOR_VALUE_SCALE_ZEPTO", "3": "SENSOR_VALUE_SCALE_ATTO", "4": "SENSOR_VALUE_SCALE_FEMTO", "5": "SENSOR_VALUE_SCALE_PICO", "6": "SENSOR_VALUE_SCALE_NANO", "7": "SENSOR_VALUE_SCALE_MICRO", "8": "SENSOR_VALUE_SCALE_MILLI", "9": "SENSOR_VALUE_SCALE_UNITS", "10": "SENSOR_VALUE_SCALE_KILO", "11": "SENSOR_VALUE_SCALE_MEGA", "12": "SENSOR_VALUE_SCALE_GIGA", "13": "SENSOR_VALUE_SCALE_TERA", "14": "SENSOR_VALUE_SCALE_PETA", "15": "SENSOR_VALUE_SCALE_EXA", "16": "SENSOR_VALUE_SCALE_ZETTA", "17": "SENSOR_VALUE_SCALE_YOTTA"}}, {"name": "SensorStatus", "type": "enum", "module": "hw", "values": {"0": "SENSOR_STATUS_UNDEFINED", "1": "SENSOR_STATUS_OK", "2": "SENSOR_STATUS_UNAVAILABLE", "3": "SENSOR_STATUS_NONOPERATIONAL"}}, {"name": "ComponentSensorData", "type": "message", "module": "hw", "fields": [{"name": "value", "is_choice": false, "repeated": false, "type": "int32", "lookup": false}, {"name": "type", "is_choice": false, "repeated": false, "type": "SensorValueType", "lookup": true}, {"name": "scale", "is_choice": false, "repeated": false, "type": "SensorValueScale", "lookup": true}, {"name": "precision", "is_choice": false, "repeated": false, "type": "int32", "lookup": false}, {"name": "status", "is_choice": false, "repeated": false, "type": "SensorStatus", "lookup": true}, {"name": "units_display", "is_choice": false, "repeated": false, "type": "string", "lookup": false}, {"name": "timestamp", "is_choice": false, "repeated": false, "type": "google.protobuf.Timestamp", "lookup": true}, {"name": "value_update_rate", "is_choice": false, "repeated": false, "type": "uint32", "lookup": false}, {"name": "data_type", "is_choice": false, "repeated": false, "type": "string", "lookup": false}]}, {"name": "Component", "type": "message", "module": "hw", "fields": [{"name": "name", "is_choice": false, "repeated": false, "type": "string", "lookup": false}, {"name": "class", "is_choice": false, "repeated": false, "type": "ComponentType", "lookup": true}, {"name": "description", "is_choice": false, "repeated": false, "type": "string", "lookup": false}, {"name": "parent", "is_choice": false, "repeated": false, "type": "string", "lookup": false}, {"name": "parent_rel_pos", "is_choice": false, "repeated": false, "type": "int32", "lookup": false}, {"name": "children", "is_choice": false, "repeated": true, "type": "Component", "lookup": true}, {"name": "hardware_rev", "is_choice": false, "repeated": false, "type": "string", "lookup": false}, {"name": "firmware_rev", "is_choice": false, "repeated": false, "type": "string", "lookup": false}, {"name": "software_rev", "is_choice": false, "repeated": false, "type": "string", "lookup": false}, {"name": "serial_num", "is_choice": false, "repeated": false, "type": "string", "lookup": false}, {"name": "mfg_name", "is_choice": false, "repeated": false, "type": "string", "lookup": false}, {"name": "model_name", "is_choice": false, "repeated": false, "type": "string", "lookup": false}, {"name": "alias", "is_choice": false, "repeated": false, "type": "string", "lookup": false}, {"name": "asset_id", "is_choice": false, "repeated": false, "type": "string", "lookup": false}, {"name": "is_fru", "is_choice": false, "repeated": false, "type": "bool", "lookup": false}, {"name": "mfg_date", "is_choice": false, "repeated": false, "type": "google.protobuf.Timestamp", "lookup": true}, {"name": "uri", "is_choice": false, "repeated": false, "type": "Uri", "lookup": true}, {"name": "uuid", "is_choice": false, "repeated": false, "type": "Uuid", "lookup": true}, {"name": "state", "is_choice": false, "repeated": false, "type": "ComponentState", "lookup": true}, {"name": "sensor_data", "is_choice": false, "repeated": true, "type": "ComponentSensorData", "lookup": true}]}, {"name": "Hardware", "type": "message", "module": "hw", "fields": [{"name": "last_change", "is_choice": false, "repeated": false, "type": "google.protobuf.Timestamp", "lookup": true}, {"name": "root", "is_choice": false, "repeated": false, "type": "Component", "lookup": true}]}, {"name": "ModifiableComponent", "type": "message", "module": "hw", "fields": [{"name": "name", "is_choice": false, "repeated": false, "type": "string", "lookup": false}, {"name": "class", "is_choice": false, "repeated": false, "type": "ComponentType", "lookup": true}, {"name": "parent", "is_choice": false, "repeated": false, "type": "Component", "lookup": true}, {"name": "parent_rel_pos", "is_choice": false, "repeated": false, "type": "int32", "lookup": false}, {"name": "alias", "is_choice": false, "repeated": false, "type": "string", "lookup": false}, {"name": "asset_id", "is_choice": false, "repeated": false, "type": "string", "lookup": false}, {"name": "uri", "is_choice": false, "repeated": false, "type": "Uri", "lookup": true}, {"name": "admin_state", "is_choice": false, "repeated": false, "type": "ComponentAdminState", "lookup": true}]}, {"name": "MetricNames", "type": "enum", "module": "hw_metrics_mgmt_service", "values": {"0": "METRIC_NAME_UNDEFINED", "1": "METRIC_FAN_SPEED", "100": "METRIC_CPU_TEMP", "101": "METRIC_CPU_USAGE_PERCENTAGE", "200": "METRIC_TRANSCEIVER_TEMP", "201": "METRIC_TRANSCEIVER_VOLTAGE", "202": "METRIC_TRANSCEIVER_BIAS", "203": "METRIC_TRANSCEIVER_RX_POWER", "204": "METRIC_TRANSCEIVER_TX_POWER", "205": "METRIC_TRANSCEIVER_WAVELENGTH", "300": "METRIC_DISK_TEMP", "301": "METRIC_DISK_CAPACITY", "302": "METRIC_DISK_USAGE", "303": "METRIC_DISK_USAGE_PERCENTAGE", "304": "METRIC_DISK_READ_WRITE_PERCENTAGE", "305": "METRIC_DISK_FAULTY_CELLS_PERCENTAGE", "400": "METRIC_RAM_TEMP", "401": "METRIC_RAM_CAPACITY", "402": "METRIC_RAM_USAGE", "403": "METRIC_RAM_USAGE_PERCENTAGE", "500": "METRIC_POWER_MAX", "501": "METRIC_POWER_USAGE", "502": "METRIC_POWER_USAGE_PERCENTAGE", "600": "METRIC_INNER_SURROUNDING_TEMP"}}, {"name": "MetricConfig", "type": "message", "module": "hw_metrics_mgmt_service", "fields": [{"name": "metric_id", "is_choice": false, "repeated": false, "type": "MetricNames", "lookup": true}, {"name": "is_configured", "is_choice": false, "repeated": false, "type": "bool", "lookup": false}, {"name": "poll_interval", "is_choice": false, "repeated": false, "type": "uint32", "lookup": false}]}, {"name": "MetricsConfig", "type": "message", "module": "hw_metrics_mgmt_service", "fields": [{"name": "metrics", "is_choice": false, "repeated": true, "type": "MetricConfig", "lookup": true}]}, {"name": "ListMetricsResponse", "type": "message", "module": "hw_metrics_mgmt_service", "fields": [{"name": "status", "is_choice": false, "repeated": false, "type": "Status", "lookup": true}, {"name": "reason", "is_choice": false, "repeated": false, "type": "Reason", "lookup": true}, {"name": "metrics", "is_choice": false, "repeated": false, "type": "MetricsConfig", "lookup": true}]}, {"name": "MetricsConfigurationRequest", "type": "message", "module": "hw_metrics_mgmt_service", "fields": [{"name": "device_uuid", "is_choice": false, "repeated": false, "type": "Uuid", "lookup": true}, {"name": "operation", "is_choice": true, "cases": [{"name": "changes", "type": "MetricsConfig", "lookup": true}, {"name": "reset_to_default", "type": "bool", "lookup": false}]}]}, {"name": "MetricsConfigurationResponse", "type": "message", "module": "hw_metrics_mgmt_service", "fields": [{"name": "status", "is_choice": false, "repeated": false, "type": "Status", "lookup": true}, {"name": "reason", "is_choice": false, "repeated": false, "type": "Reason", "lookup": true}]}, {"name": "MetricMetaData", "type": "message", "module": "hw_metrics_mgmt_service", "fields": [{"name": "device_uuid", "is_choice": false, "repeated": false, "type": "Uuid", "lookup": true}, {"name": "component_uuid", "is_choice": false, "repeated": false, "type": "Uuid", "lookup": true}, {"name": "component_name", "is_choice": false, "repeated": false, "type": "string", "lookup": false}]}, {"name": "Metric", "type": "message", "module": "hw_metrics_mgmt_service", "fields": [{"name": "metric_id", "is_choice": false, "repeated": false, "type": "MetricNames", "lookup": true}, {"name": "metric_metadata", "is_choice": false, "repeated": false, "type": "MetricMetaData", "lookup": true}, {"name": "value", "is_choice": false, "repeated": false, "type": "ComponentSensorData", "lookup": true}]}, {"name": "GetMetricRequest", "type": "message", "module": "hw_metrics_mgmt_service", "fields": [{"name": "meta_data", "is_choice": false, "repeated": false, "type": "MetricMetaData", "lookup": true}, {"name": "metric_id", "is_choice": false, "repeated": false, "type": "MetricNames", "lookup": true}]}, {"name": "GetMetricResponse", "type": "message", "module": "hw_metrics_mgmt_service", "fields": [{"name": "status", "is_choice": false, "repeated": false, "type": "Status", "lookup": true}, {"name": "reason", "is_choice": false, "repeated": false, "type": "Reason", "lookup": true}, {"name": "metric", "is_choice": false, "repeated": false, "type": "Metric", "lookup": true}]}, {"name": "EventIds", "type": "enum", "module": "hw_events_mgmt_service", "values": {"0": "EVENT_NAME_UNDEFINED", "100": "EVENT_TRANSCEIVER_PLUG_OUT", "101": "EVENT_TRANSCEIVER_PLUG_IN", "102": "EVENT_TRANSCEIVER_VOLTAGE_ABOVE_THRESHOLD", "103": "EVENT_TRANSCEIVER_VOLTAGE_BELOW_THRESHOLD", "104": "EVENT_TRANSCEIVER_TEMPERATURE_ABOVE_THRESHOLD", "105": "EVENT_TRANSCEIVER_TEMPERATURE_BELOW_THRESHOLD", "106": "EVENT_TRANSCEIVER_CURRENT_ABOVE_THRESHOLD", "107": "EVENT_TRANSCEIVER_CURRENT_BELOW_THRESHOLD", "108": "EVENT_TRANSCEIVER_RX_POWER_ABOVE_THRESHOLD", "109": "EVENT_TRANSCEIVER_RX_POWER_BELOW_THRESHOLD", "110": "EVENT_TRANSCEIVER_TX_POWER_ABOVE_THRESHOLD", "111": "EVENT_TRANSCEIVER_TX_POWER_BELOW_THRESHOLD", "112": "EVENT_TRANSCEIVER_FAILURE", "113": "EVENT_TRANSCEIVER_VOLTAGE_ABOVE_THRESHOLD_RECOVERED", "114": "EVENT_TRANSCEIVER_VOLTAGE_BELOW_THRESHOLD_RECOVERED", "115": "EVENT_TRANSCEIVER_TEMPERATURE_ABOVE_THRESHOLD_RECOVERED", "116": "EVENT_TRANSCEIVER_TEMPERATURE_BELOW_THRESHOLD_RECOVERED", "117": "EVENT_TRANSCEIVER_CURRENT_ABOVE_THRESHOLD_RECOVERED", "118": "EVENT_TRANSCEIVER_CURRENT_BELOW_THRESHOLD_RECOVERED", "119": "EVENT_TRANSCEIVER_RX_POWER_ABOVE_THRESHOLD_RECOVERED", "120": "EVENT_TRANSCEIVER_RX_POWER_BELOW_THRESHOLD_RECOVERED", "121": "EVENT_TRANSCEIVER_TX_POWER_ABOVE_THRESHOLD_RECOVERED", "122": "EVENT_TRANSCEIVER_TX_POWER_BELOW_THRESHOLD_RECOVERED", "123": "EVENT_TRANSCEIVER_FAILURE_RECOVERED", "200": "EVENT_PSU_PLUG_OUT", "201": "EVENT_PSU_PLUG_IN", "202": "EVENT_PSU_FAILURE", "203": "EVENT_PSU_FAILURE_RECOVERED", "300": "EVENT_FAN_FAILURE", "301": "EVENT_FAN_PLUG_OUT", "302": "EVENT_FAN_PLUG_IN", "303": "EVENT_FAN_FAILURE_RECOVERED", "400": "EVENT_CPU_TEMPERATURE_ABOVE_CRITICAL", "401": "EVENT_CPU_TEMPERATURE_ABOVE_FATAL", "402": "EVENT_CPU_TEMPERATURE_ABOVE_CRITICAL_RECOVERED", "403": "EVENT_CPU_TEMPERATURE_ABOVE_FATAL_RECOVERED", "500": "EVENT_HW_DEVICE_RESET", "501": "EVENT_HW_DEVICE_TEMPERATURE_ABOVE_CRITICAL", "502": "EVENT_HW_DEVICE_TEMPERATURE_ABOVE_FATAL", "503": "EVENT_HW_DEVICE_TEMPERATURE_ABOVE_CRITICAL_RECOVERED", "504": "EVENT_HW_DEVICE_TEMPERATURE_ABOVE_FATAL_RECOVERED"}}, {"name": "ValueType", "type": "message", "module": "hw_events_mgmt_service", "fields": [{"name": "val", "is_choice": true, "cases": [{"name": "int_val", "type": "int64", "lookup": false}, {"name": "uint_val", "type": "uint64", "lookup": false}, {"name": "float_val", "type": "float", "lookup": false}]}]}, {"name": "WaterMarks", "type": "message", "module": "hw_events_mgmt_service", "fields": [{"name": "high", "is_choice": false, "repeated": false, "type": "ValueType", "lookup": true}, {"name": "low", "is_choice": false, "repeated": false, "type": "ValueType", "lookup": true}]}, {"name": "Thresholds", "type": "message", "module": "hw_events_mgmt_service", "fields": [{"name": "threshold", "is_choice": true, "cases": [{"name": "upper", "type": "WaterMarks", "lookup": true}, {"name": "lower", "type": "WaterMarks", "lookup": true}]}]}, {"name": "ThresholdInformation", "type": "message", "module": "hw_events_mgmt_service", "fields": [{"name": "observed_value", "is_choice": false, "repeated": false, "type": "ValueType", "lookup": true}, {"name": "thresholds", "is_choice": false, "repeated": false, "type": "Thresholds", "lookup": true}]}, {"name": "EventCfg", "type": "message", "module": "hw_events_mgmt_service", "fields": [{"name": "event_id", "is_choice": false, "repeated": false, "type": "EventIds", "lookup": true}, {"name": "is_configured", "is_choice": false, "repeated": false, "type": "bool", "lookup": false}, {"name": "thresholds", "is_choice": false, "repeated": false, "type": "Thresholds", "lookup": true}]}, {"name": "EventsCfg", "type": "message", "module": "hw_events_mgmt_service", "fields": [{"name": "items", "is_choice": false, "repeated": true, "type": "EventCfg", "lookup": true}]}, {"name": "ListEventsResponse", "type": "message", "module": "hw_events_mgmt_service", "fields": [{"name": "status", "is_choice": false, "repeated": false, "type": "Status", "lookup": true}, {"name": "reason", "is_choice": false, "repeated": false, "type": "Reason", "lookup": true}, {"name": "events", "is_choice": false, "repeated": false, "type": "EventsCfg", "lookup": true}]}, {"name": "EventsConfigurationRequest", "type": "message", "module": "hw_events_mgmt_service", "fields": [{"name": "device_uuid", "is_choice": false, "repeated": false, "type": "Uuid", "lookup": true}, {"name": "operation", "is_choice": true, "cases": [{"name": "changes", "type": "EventsCfg", "lookup": true}, {"name": "reset_to_default", "type": "bool", "lookup": false}]}]}, {"name": "EventsConfigurationResponse", "type": "message", "module": "hw_events_mgmt_service", "fields": [{"name": "status", "is_choice": false, "repeated": false, "type": "Status", "lookup": true}, {"name": "reason", "is_choice": false, "repeated": false, "type": "Reason", "lookup": true}]}, {"name": "EventMetaData", "type": "message", "module": "hw_events_mgmt_service", "fields": [{"name": "device_uuid", "is_choice": false, "repeated": false, "type": "Uuid", "lookup": true}, {"name": "component_uuid", "is_choice": false, "repeated": false, "type": "Uuid", "lookup": true}, {"name": "component_name", "is_choice": false, "repeated": false, "type": "string", "lookup": false}]}, {"name": "Event", "type": "message", "module": "hw_events_mgmt_service", "fields": [{"name": "event_metadata", "is_choice": false, "repeated": false, "type": "EventMetaData", "lookup": true}, {"name": "event_id", "is_choice": false, "repeated": false, "type": "EventIds", "lookup": true}, {"name": "raised_ts", "is_choice": false, "repeated": false, "type": "google.protobuf.Timestamp", "lookup": true}, {"name": "threshold_info", "is_choice": false, "repeated": false, "type": "ThresholdInformation", "lookup": true}, {"name": "add_info", "is_choice": false, "repeated": false, "type": "string", "lookup": false}]}, {"name": "ImageVersion", "type": "message", "module": "sw_image", "fields": [{"name": "image_name", "is_choice": false, "repeated": false, "type": "string", "lookup": false}, {"name": "version", "is_choice": false, "repeated": false, "type": "string", "lookup": false}]}, {"name": "ImageInformation", "type": "message", "module": "sw_image", "fields": [{"name": "image", "is_choice": false, "repeated": false, "type": "ImageVersion", "lookup": true}, {"name": "image_install_script", "is_choice": false, "repeated": false, "type": "string", "lookup": false}, {"name": "image_url", "is_choice": false, "repeated": false, "type": "string", "lookup": false}, {"name": "sha256sum", "is_choice": false, "repeated": false, "type": "string", "lookup": false}]}, {"name": "ImageState", "type": "enum", "module": "sw_image", "values": {"0": "UNDEFINED_STATE", "1": "COPYING_IMAGE", "2": "INSTALLING_IMAGE", "3": "COMMITTING_IMAGE", "4": "REBOOTING_DEVICE", "5": "UPGRADE_COMPLETE", "6": "UPGRADE_FAILED", "7": "ACTIVATION_COMPLETE", "8": "ACTIVATION_FAILED"}}, {"name": "Reason", "type": "enum", "module": "sw_image", "values": {"0": "UNDEFINED_REASON", "1": "ERROR_IN_REQUEST", "2": "INTERNAL_ERROR", "3": "DEVICE_IN_WRONG_STATE", "4": "INVALID_IMAGE", "5": "WRONG_IMAGE_CHECKSUM"}}, {"name": "ImageStatus", "type": "message", "module": "sw_image", "fields": [{"name": "status", "is_choice": false, "repeated": false, "type": "Status", "lookup": true}, {"name": "reason", "is_choice": false, "repeated": false, "type": "Reason", "lookup": true}, {"name": "state", "is_choice": false, "repeated": false, "type": "ImageState", "lookup": true}, {"name": "description", "is_choice": false, "repeated": false, "type": "string", "lookup": false}]}, {"name": "PhysicalInventoryRequest", "type": "message", "module": "hw_management_service", "fields": [{"name": "device_uuid", "is_choice": false, "repeated": false, "type": "Uuid", "lookup": true}]}, {"name": "PhysicalInventoryResponse", "type": "message", "module": "hw_management_service", "fields": [{"name": "status", "is_choice": false, "repeated": false, "type": "Status", "lookup": true}, {"name": "reason", "is_choice": false, "repeated": false, "type": "Reason", "lookup": true}, {"name": "inventory", "is_choice": false, "repeated": false, "type": "Hardware", "lookup": true}]}, {"name": "HWComponentInfoGetRequest", "type": "message", "module": "hw_management_service", "fields": [{"name": "device_uuid", "is_choice": false, "repeated": false, "type": "Uuid", "lookup": true}, {"name": "component_uuid", "is_choice": false, "repeated": false, "type": "Uuid", "lookup": true}, {"name": "component_name", "is_choice": false, "repeated": false, "type": "string", "lookup": false}]}, {"name": "HWComponentInfoGetResponse", "type": "message", "module": "hw_management_service", "fields": [{"name": "status", "is_choice": false, "repeated": false, "type": "Status", "lookup": true}, {"name": "reason", "is_choice": false, "repeated": false, "type": "Reason", "lookup": true}, {"name": "component", "is_choice": false, "repeated": false, "type": "Component", "lookup": true}]}, {"name": "HWComponentInfoSetRequest", "type": "message", "module": "hw_management_service", "fields": [{"name": "device_uuid", "is_choice": false, "repeated": false, "type": "Uuid", "lookup": true}, {"name": "component_uuid", "is_choice": false, "repeated": false, "type": "Uuid", "lookup": true}, {"name": "component_name", "is_choice": false, "repeated": false, "type": "string", "lookup": false}, {"name": "changes", "is_choice": false, "repeated": false, "type": "ModifiableComponent", "lookup": true}]}, {"name": "HWComponentInfoSetResponse", "type": "message", "module": "hw_management_service", "fields": [{"name": "status", "is_choice": false, "repeated": false, "type": "Status", "lookup": true}, {"name": "reason", "is_choice": false, "repeated": false, "type": "Reason", "lookup": true}]}, {"name": "StartManagingDeviceResponse", "type": "message", "module": "hw_management_service", "fields": [{"name": "status", "is_choice": false, "repeated": false, "type": "Status", "lookup": true}, {"name": "reason", "is_choice": false, "repeated": false, "type": "Reason", "lookup": true}, {"name": "device_uuid", "is_choice": false, "repeated": false, "type": "Uuid", "lookup": true}]}, {"name": "StopManagingDeviceRequest", "type": "message", "module": "hw_management_service", "fields": [{"name": "name", "is_choice": false, "repeated": false, "type": "string", "lookup": false}]}, {"name": "StopManagingDeviceResponse", "type": "message", "module": "hw_management_service", "fields": [{"name": "status", "is_choice": false, "repeated": false, "type": "Status", "lookup": true}, {"name": "reason", "is_choice": false, "repeated": false, "type": "Reason", "lookup": true}]}, {"name": "ManagedDevicesResponse", "type": "message", "module": "hw_management_service", "fields": [{"name": "devices", "is_choice": false, "repeated": true, "type": "ModifiableComponent", "lookup": true}]}, {"name": "SetLoggingEndpointRequest", "type": "message", "module": "hw_management_service", "fields": [{"name": "device_uuid", "is_choice": false, "repeated": false, "type": "Uuid", "lookup": true}, {"name": "logging_endpoint", "is_choice": false, "repeated": false, "type": "string", "lookup": false}, {"name": "logging_protocol", "is_choice": false, "repeated": false, "type": "string", "lookup": false}]}, {"name": "SetRemoteEndpointResponse", "type": "message", "module": "hw_management_service", "fields": [{"name": "status", "is_choice": false, "repeated": false, "type": "Status", "lookup": true}, {"name": "reason", "is_choice": false, "repeated": false, "type": "Reason", "lookup": true}]}, {"name": "GetLoggingEndpointResponse", "type": "message", "module": "hw_management_service", "fields": [{"name": "status", "is_choice": false, "repeated": false, "type": "Status", "lookup": true}, {"name": "reason", "is_choice": false, "repeated": false, "type": "Reason", "lookup": true}, {"name": "logging_endpoint", "is_choice": false, "repeated": false, "type": "string", "lookup": false}, {"name": "logging_protocol", "is_choice": false, "repeated": false, "type": "string", "lookup": false}]}, {"name": "SetMsgBusEndpointRequest", "type": "message", "module": "hw_management_service", "fields": [{"name": "msgbus_endpoint", "is_choice": false, "repeated": false, "type": "string", "lookup": false}]}, {"name": "GetMsgBusEndpointResponse", "type": "message", "module": "hw_management_service", "fields": [{"name": "status", "is_choice": false, "repeated": false, "type": "Status", "lookup": true}, {"name": "reason", "is_choice": false, "repeated": false, "type": "Reason", "lookup": true}, {"name": "msgbus_endpoint", "is_choice": false, "repeated": false, "type": "string", "lookup": false}]}, {"name": "EntitiesLogLevel", "type": "message", "module": "hw_management_service", "fields": [{"name": "logLevel", "is_choice": false, "repeated": false, "type": "LogLevel", "lookup": true}, {"name": "entities", "is_choice": false, "repeated": true, "type": "string", "lookup": false}]}, {"name": "SetLogLevelRequest", "type": "message", "module": "hw_management_service", "fields": [{"name": "device_uuid", "is_choice": false, "repeated": false, "type": "Uuid", "lookup": true}, {"name": "loglevels", "is_choice": false, "repeated": true, "type": "EntitiesLogLevel", "lookup": true}]}, {"name": "SetLogLevelResponse", "type": "message", "module": "hw_management_service", "fields": [{"name": "device_uuid", "is_choice": false, "repeated": false, "type": "Uuid", "lookup": true}, {"name": "status", "is_choice": false, "repeated": false, "type": "Status", "lookup": true}, {"name": "reason", "is_choice": false, "repeated": false, "type": "Reason", "lookup": true}]}, {"name": "GetLogLevelRequest", "type": "message", "module": "hw_management_service", "fields": [{"name": "device_uuid", "is_choice": false, "repeated": false, "type": "Uuid", "lookup": true}, {"name": "entities", "is_choice": false, "repeated": true, "type": "string", "lookup": false}]}, {"name": "GetLogLevelResponse", "type": "message", "module": "hw_management_service", "fields": [{"name": "device_uuid", "is_choice": false, "repeated": false, "type": "Uuid", "lookup": true}, {"name": "logLevels", "is_choice": false, "repeated": true, "type": "EntitiesLogLevel", "lookup": true}, {"name": "status", "is_choice": false, "repeated": false, "type": "Status", "lookup": true}, {"name": "reason", "is_choice": false, "repeated": false, "type": "Reason", "lookup": true}]}, {"name": "GetLoggableEntitiesRequest", "type": "message", "module": "hw_management_service", "fields": [{"name": "device_uuid", "is_choice": false, "repeated": false, "type": "Uuid", "lookup": true}]}, {"name": "SoftwareVersionInformation", "type": "message", "module": "sw_management_service", "fields": [{"name": "active_versions", "is_choice": false, "repeated": true, "type": "ImageVersion", "lookup": true}, {"name": "standby_versions", "is_choice": false, "repeated": true, "type": "ImageVersion", "lookup": true}]}, {"name": "GetSoftwareVersionInformationResponse", "type": "message", "module": "sw_management_service", "fields": [{"name": "status", "is_choice": false, "repeated": false, "type": "Status", "lookup": true}, {"name": "reason", "is_choice": false, "repeated": false, "type": "Reason", "lookup": true}, {"name": "info", "is_choice": false, "repeated": false, "type": "SoftwareVersionInformation", "lookup": true}]}, {"name": "DownloadImageRequest", "type": "message", "module": "sw_management_service", "fields": [{"name": "device_uuid", "is_choice": false, "repeated": false, "type": "Uuid", "lookup": true}, {"name": "image_info", "is_choice": false, "repeated": false, "type": "ImageInformation", "lookup": true}]}, {"name": "ConfigRequest", "type": "message", "module": "sw_management_service", "fields": [{"name": "device_uuid", "is_choice": false, "repeated": false, "type": "Uuid", "lookup": true}, {"name": "config_url", "is_choice": false, "repeated": false, "type": "string", "lookup": false}]}, {"name": "ConfigResponse", "type": "message", "module": "sw_management_service", "fields": [{"name": "status", "is_choice": false, "repeated": false, "type": "Status", "lookup": true}, {"name": "reason", "is_choice": false, "repeated": false, "type": "Reason", "lookup": true}]}], "services": [{"name": "NativeMetricsManagementService", "module": "hw_metrics_mgmt_service", "rpcs": [{"name": "ListMetrics", "request": {"is_stream": false, "type": "HardwareID", "lookup": true}, "response": {"is_stream": false, "type": "ListMetricsResponse", "lookup": true}}, {"name": "UpdateMetricsConfiguration", "request": {"is_stream": false, "type": "MetricsConfigurationRequest", "lookup": true}, "response": {"is_stream": false, "type": "MetricsConfigurationResponse", "lookup": true}}, {"name": "GetMetric", "request": {"is_stream": false, "type": "GetMetricRequest", "lookup": true}, "response": {"is_stream": false, "type": "GetMetricResponse", "lookup": true}}]}, {"name": "NativeEventsManagementService", "module": "hw_events_mgmt_service", "rpcs": [{"name": "ListEvents", "request": {"is_stream": false, "type": "HardwareID", "lookup": true}, "response": {"is_stream": false, "type": "ListEventsResponse", "lookup": true}}, {"name": "UpdateEventsConfiguration", "request": {"is_stream": false, "type": "EventsConfigurationRequest", "lookup": true}, "response": {"is_stream": false, "type": "EventsConfigurationResponse", "lookup": true}}]}, {"name": "NativeHWManagementService", "module": "hw_management_service", "rpcs": [{"name": "StartManagingDevice", "request": {"is_stream": false, "type": "ModifiableComponent", "lookup": true}, "response": {"is_stream": true, "type": "StartManagingDeviceResponse", "lookup": true}}, {"name": "StopManagingDevice", "request": {"is_stream": false, "type": "StopManagingDeviceRequest", "lookup": true}, "response": {"is_stream": false, "type": "StopManagingDeviceResponse", "lookup": true}}, {"name": "GetManagedDevices", "request": {"is_stream": false, "type": "google.protobuf.Empty", "lookup": false}, "response": {"is_stream": false, "type": "ManagedDevicesResponse", "lookup": true}}, {"name": "GetPhysicalInventory", "request": {"is_stream": false, "type": "PhysicalInventoryRequest", "lookup": true}, "response": {"is_stream": true, "type": "PhysicalInventoryResponse", "lookup": true}}, {"name": "GetHWComponentInfo", "request": {"is_stream": false, "type": "HWComponentInfoGetRequest", "lookup": true}, "response": {"is_stream": true, "type": "HWComponentInfoGetResponse", "lookup": true}}, {"name": "SetHWComponentInfo", "request": {"is_stream": false, "type": "HWComponentInfoSetRequest", "lookup": true}, "response": {"is_stream": false, "type": "HWComponentInfoSetResponse", "lookup": true}}, {"name": "SetLoggingEndpoint", "request": {"is_stream": false, "type": "SetLoggingEndpointRequest", "lookup": true}, "response": {"is_stream": false, "type": "SetRemoteEndpointResponse", "lookup": true}}, {"name": "GetLoggingEndpoint", "request": {"is_stream": false, "type": "HardwareID", "lookup": true}, "response": {"is_stream": false, "type": "GetLoggingEndpointResponse", "lookup": true}}, {"name": "SetMsgBusEndpoint", "request": {"is_stream": false, "type": "SetMsgBusEndpointRequest", "lookup": true}, "response": {"is_stream": false, "type": "SetRemoteEndpointResponse", "lookup": true}}, {"name": "GetMsgBusEndpoint", "request": {"is_stream": false, "type": "google.protobuf.Empty", "lookup": false}, "response": {"is_stream": false, "type": "GetMsgBusEndpointResponse", "lookup": true}}, {"name": "GetLoggableEntities", "request": {"is_stream": false, "type": "GetLoggableEntitiesRequest", "lookup": true}, "response": {"is_stream": false, "type": "GetLogLevelResponse", "lookup": true}}, {"name": "SetLogLevel", "request": {"is_stream": false, "type": "SetLogLevelRequest", "lookup": true}, "response": {"is_stream": false, "type": "SetLogLevelResponse", "lookup": true}}, {"name": "GetLogLevel", "request": {"is_stream": false, "type": "GetLogLevelRequest", "lookup": true}, "response": {"is_stream": false, "type": "GetLogLevelResponse", "lookup": true}}]}, {"name": "NativeSoftwareManagementService", "module": "sw_management_service", "rpcs": [{"name": "GetSoftwareVersion", "request": {"is_stream": false, "type": "HardwareID", "lookup": true}, "response": {"is_stream": false, "type": "GetSoftwareVersionInformationResponse", "lookup": true}}, {"name": "DownloadImage", "request": {"is_stream": false, "type": "DownloadImageRequest", "lookup": true}, "response": {"is_stream": true, "type": "ImageStatus", "lookup": true}}, {"name": "ActivateImage", "request": {"is_stream": false, "type": "HardwareID", "lookup": true}, "response": {"is_stream": true, "type": "ImageStatus", "lookup": true}}, {"name": "RevertToStandbyImage", "request": {"is_stream": false, "type": "HardwareID", "lookup": true}, "response": {"is_stream": true, "type": "ImageStatus", "lookup": true}}, {"name": "UpdateStartupConfiguration", "request": {"is_stream": false, "type": "ConfigRequest", "lookup": true}, "response": {"is_stream": true, "type": "ConfigResponse", "lookup": true}}]}]}
\ No newline at end of file
diff --git a/grpc_robot/services/dmi/dmi_0_9_5/sw_management_service.py b/grpc_robot/services/dmi/dmi_0_9_5/sw_management_service.py
new file mode 100644
index 0000000..d9db6d9
--- /dev/null
+++ b/grpc_robot/services/dmi/dmi_0_9_5/sw_management_service.py
@@ -0,0 +1,56 @@
+# Copyright 2020-present Open Networking Foundation
+# Original copyright 2020-present ADTRAN, Inc.
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+from robot.api.deco import keyword
+from grpc_robot.services.service import is_connected
+
+from grpc_robot.services.service import Service
+from dmi import sw_management_service_pb2_grpc, sw_management_service_pb2, hw_pb2
+
+
+class NativeSoftwareManagementService(Service):
+
+ prefix = 'sw_management_service_'
+
+ def __init__(self, ctx):
+ super().__init__(ctx=ctx, stub=sw_management_service_pb2_grpc.NativeSoftwareManagementServiceStub)
+
+ # rpc GetSoftwareVersion(HardwareID) returns(GetSoftwareVersionInformationResponse);
+ @keyword
+ @is_connected
+ def sw_management_service_get_software_version(self, param_dict, **kwargs):
+ return self._grpc_helper(self.stub.GetSoftwareVersion, hw_pb2.HardwareID, param_dict, **kwargs)
+
+ # rpc DownloadImage(DownloadImageRequest) returns(stream ImageStatus);
+ @keyword
+ @is_connected
+ def sw_management_service_download_image(self, param_dict, **kwargs):
+ return self._grpc_helper(self.stub.DownloadImage, sw_management_service_pb2.DownloadImageRequest, param_dict, **kwargs)
+
+ # rpc ActivateImage(HardwareID) returns(stream ImageStatus);
+ @keyword
+ @is_connected
+ def sw_management_service_activate_image(self, param_dict, **kwargs):
+ return self._grpc_helper(self.stub.ActivateImage, hw_pb2.HardwareID, param_dict, **kwargs)
+
+ # rpc RevertToStandbyImage(HardwareID) returns(stream ImageStatus);
+ @keyword
+ @is_connected
+ def sw_management_service_revert_to_standby_image(self, param_dict, **kwargs):
+ return self._grpc_helper(self.stub.RevertToStandbyImage, hw_pb2.HardwareID, param_dict, **kwargs)
+
+ # rpc UpdateStartupConfiguration(ConfigRequest) returns(stream ConfigResponse);
+ @keyword
+ @is_connected
+ def sw_management_service_update_startup_configuration(self, param_dict, **kwargs):
+ return self._grpc_helper(self.stub.UpdateStartupConfiguration, sw_management_service_pb2.ConfigRequest, param_dict, **kwargs)
diff --git a/grpc_robot/services/dmi/dmi_0_9_6/__init__.py b/grpc_robot/services/dmi/dmi_0_9_6/__init__.py
new file mode 100644
index 0000000..f700805
--- /dev/null
+++ b/grpc_robot/services/dmi/dmi_0_9_6/__init__.py
@@ -0,0 +1,14 @@
+# Copyright 2020-present Open Networking Foundation
+# Original copyright 2020-present ADTRAN, Inc.
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+from ..dmi_0_9_5 import *
diff --git a/grpc_robot/services/dmi/dmi_0_9_6/dmi.json b/grpc_robot/services/dmi/dmi_0_9_6/dmi.json
new file mode 100644
index 0000000..3205f2c
--- /dev/null
+++ b/grpc_robot/services/dmi/dmi_0_9_6/dmi.json
@@ -0,0 +1 @@
+{"modules": [{"name": "commons", "imports": []}, {"name": "hw", "imports": ["timestamp"]}, {"name": "hw_metrics_mgmt_service", "imports": ["commons", "hw"]}, {"name": "hw_events_mgmt_service", "imports": ["commons", "hw", "timestamp"]}, {"name": "sw_image", "imports": ["commons"]}, {"name": "hw_management_service", "imports": ["commons", "hw", "empty"]}, {"name": "sw_management_service", "imports": ["commons", "hw", "sw_image"]}], "data_types": [{"name": "Status", "type": "enum", "module": "commons", "values": {"0": "UNDEFINED_STATUS", "1": "OK_STATUS", "2": "ERROR_STATUS"}}, {"name": "Reason", "type": "enum", "module": "commons", "values": {"0": "UNDEFINED_REASON", "1": "UNKNOWN_DEVICE", "2": "INTERNAL_ERROR", "3": "WRONG_METRIC", "4": "WRONG_EVENT", "5": "LOGGING_ENDPOINT_ERROR", "6": "LOGGING_ENDPOINT_PROTOCOL_ERROR", "7": "KAFKA_ENDPOINT_ERROR", "8": "UNKNOWN_LOG_ENTITY", "9": "ERROR_FETCHING_CONFIG", "10": "INVALID_CONFIG"}}, {"name": "LogLevel", "type": "enum", "module": "commons", "values": {"0": "TRACE", "1": "DEBUG", "2": "INFO", "3": "WARN", "4": "ERROR"}}, {"name": "Uuid", "type": "message", "module": "hw", "fields": [{"name": "uuid", "is_choice": false, "repeated": false, "type": "string", "lookup": false}]}, {"name": "HardwareID", "type": "message", "module": "hw", "fields": [{"name": "uuid", "is_choice": false, "repeated": false, "type": "Uuid", "lookup": true}]}, {"name": "Uri", "type": "message", "module": "hw", "fields": [{"name": "uri", "is_choice": false, "repeated": false, "type": "string", "lookup": false}]}, {"name": "ComponentType", "type": "enum", "module": "hw", "values": {"0": "COMPONENT_TYPE_UNDEFINED", "1": "COMPONENT_TYPE_UNKNOWN", "2": "COMPONENT_TYPE_CHASSIS", "3": "COMPONENT_TYPE_BACKPLANE", "4": "COMPONENT_TYPE_CONTAINER", "5": "COMPONENT_TYPE_POWER_SUPPLY", "6": "COMPONENT_TYPE_FAN", "7": "COMPONENT_TYPE_SENSOR", "8": "COMPONENT_TYPE_MODULE", "9": "COMPONENT_TYPE_PORT", "10": "COMPONENT_TYPE_CPU", "11": "COMPONENT_TYPE_BATTERY", "12": "COMPONENT_TYPE_STORAGE", "13": "COMPONENT_TYPE_MEMORY", "14": "COMPONENT_TYPE_TRANSCEIVER", "15": "COMPONENT_TYPE_GPON_TRANSCEIVER", "16": "COMPONENT_TYPE_XGS_PON_TRANSCEIVER"}}, {"name": "ComponentAdminState", "type": "enum", "module": "hw", "values": {"0": "COMP_ADMIN_STATE_UNDEFINED", "1": "COMP_ADMIN_STATE_UNKNOWN", "2": "COMP_ADMIN_STATE_LOCKED", "3": "COMP_ADMIN_STATE_SHUTTING_DOWN", "4": "COMP_ADMIN_STATE_UNLOCKED"}}, {"name": "ComponentOperState", "type": "enum", "module": "hw", "values": {"0": "COMP_OPER_STATE_UNDEFINED", "1": "COMP_OPER_STATE_UNKNOWN", "2": "COMP_OPER_STATE_DISABLED", "3": "COMP_OPER_STATE_ENABLED", "4": "COMP_OPER_STATE_TESTING"}}, {"name": "ComponentUsageState", "type": "enum", "module": "hw", "values": {"0": "COMP_USAGE_STATE_UNDEFINED", "1": "COMP_USAGE_STATE_UNKNOWN", "2": "COMP_USAGE_STATE_IDLE", "3": "COMP_USAGE_STATE_ACTIVE", "4": "COMP_USAGE_STATE_BUSY"}}, {"name": "ComponentAlarmState", "type": "enum", "module": "hw", "values": {"0": "COMP_ALARM_STATE_UNDEFINED", "1": "COMP_ALARM_STATE_UNKNOWN", "2": "COMP_ALARM_STATE_UNDER_REPAIR", "3": "COMP_ALARM_STATE_CRITICAL", "4": "COMP_ALARM_STATE_MAJOR", "5": "COMP_ALARM_STATE_MINOR", "6": "COMP_ALARM_STATE_WARNING", "7": "COMP_ALARM_STATE_INDETERMINATE"}}, {"name": "ComponentStandbyState", "type": "enum", "module": "hw", "values": {"0": "COMP_STANDBY_STATE_UNDEFINED", "1": "COMP_STANDBY_STATE_UNKNOWN", "2": "COMP_STANDBY_STATE_HOT", "3": "COMP_STANDBY_STATE_COLD", "4": "COMP_STANDBY_STATE_PROVIDING_SERVICE"}}, {"name": "ComponentState", "type": "message", "module": "hw", "fields": [{"name": "state_last_changed", "is_choice": false, "repeated": false, "type": "google.protobuf.Timestamp", "lookup": true}, {"name": "admin_state", "is_choice": false, "repeated": false, "type": "ComponentAdminState", "lookup": true}, {"name": "oper_state", "is_choice": false, "repeated": false, "type": "ComponentOperState", "lookup": true}, {"name": "usage_state", "is_choice": false, "repeated": false, "type": "ComponentUsageState", "lookup": true}, {"name": "alarm_state", "is_choice": false, "repeated": false, "type": "ComponentAlarmState", "lookup": true}, {"name": "standby_state", "is_choice": false, "repeated": false, "type": "ComponentStandbyState", "lookup": true}]}, {"name": "SensorValueType", "type": "enum", "module": "hw", "values": {"0": "SENSOR_VALUE_TYPE_UNDEFINED", "1": "SENSOR_VALUE_TYPE_OTHER", "2": "SENSOR_VALUE_TYPE_UNKNOWN", "3": "SENSOR_VALUE_TYPE_VOLTS_AC", "4": "SENSOR_VALUE_TYPE_VOLTS_DC", "5": "SENSOR_VALUE_TYPE_AMPERES", "6": "SENSOR_VALUE_TYPE_WATTS", "7": "SENSOR_VALUE_TYPE_HERTZ", "8": "SENSOR_VALUE_TYPE_CELSIUS", "9": "SENSOR_VALUE_TYPE_PERCENT_RH", "10": "SENSOR_VALUE_TYPE_RPM", "11": "SENSOR_VALUE_TYPE_CMM", "12": "SENSOR_VALUE_TYPE_TRUTH_VALUE"}}, {"name": "SensorValueScale", "type": "enum", "module": "hw", "values": {"0": "SENSOR_VALUE_SCALE_UNDEFINED", "1": "SENSOR_VALUE_SCALE_YOCTO", "2": "SENSOR_VALUE_SCALE_ZEPTO", "3": "SENSOR_VALUE_SCALE_ATTO", "4": "SENSOR_VALUE_SCALE_FEMTO", "5": "SENSOR_VALUE_SCALE_PICO", "6": "SENSOR_VALUE_SCALE_NANO", "7": "SENSOR_VALUE_SCALE_MICRO", "8": "SENSOR_VALUE_SCALE_MILLI", "9": "SENSOR_VALUE_SCALE_UNITS", "10": "SENSOR_VALUE_SCALE_KILO", "11": "SENSOR_VALUE_SCALE_MEGA", "12": "SENSOR_VALUE_SCALE_GIGA", "13": "SENSOR_VALUE_SCALE_TERA", "14": "SENSOR_VALUE_SCALE_PETA", "15": "SENSOR_VALUE_SCALE_EXA", "16": "SENSOR_VALUE_SCALE_ZETTA", "17": "SENSOR_VALUE_SCALE_YOTTA"}}, {"name": "SensorStatus", "type": "enum", "module": "hw", "values": {"0": "SENSOR_STATUS_UNDEFINED", "1": "SENSOR_STATUS_OK", "2": "SENSOR_STATUS_UNAVAILABLE", "3": "SENSOR_STATUS_NONOPERATIONAL"}}, {"name": "ComponentSensorData", "type": "message", "module": "hw", "fields": [{"name": "value", "is_choice": false, "repeated": false, "type": "int32", "lookup": false}, {"name": "type", "is_choice": false, "repeated": false, "type": "SensorValueType", "lookup": true}, {"name": "scale", "is_choice": false, "repeated": false, "type": "SensorValueScale", "lookup": true}, {"name": "precision", "is_choice": false, "repeated": false, "type": "int32", "lookup": false}, {"name": "status", "is_choice": false, "repeated": false, "type": "SensorStatus", "lookup": true}, {"name": "units_display", "is_choice": false, "repeated": false, "type": "string", "lookup": false}, {"name": "timestamp", "is_choice": false, "repeated": false, "type": "google.protobuf.Timestamp", "lookup": true}, {"name": "value_update_rate", "is_choice": false, "repeated": false, "type": "uint32", "lookup": false}, {"name": "data_type", "is_choice": false, "repeated": false, "type": "string", "lookup": false}]}, {"name": "Component", "type": "message", "module": "hw", "fields": [{"name": "name", "is_choice": false, "repeated": false, "type": "string", "lookup": false}, {"name": "class", "is_choice": false, "repeated": false, "type": "ComponentType", "lookup": true}, {"name": "description", "is_choice": false, "repeated": false, "type": "string", "lookup": false}, {"name": "parent", "is_choice": false, "repeated": false, "type": "string", "lookup": false}, {"name": "parent_rel_pos", "is_choice": false, "repeated": false, "type": "int32", "lookup": false}, {"name": "children", "is_choice": false, "repeated": true, "type": "Component", "lookup": true}, {"name": "hardware_rev", "is_choice": false, "repeated": false, "type": "string", "lookup": false}, {"name": "firmware_rev", "is_choice": false, "repeated": false, "type": "string", "lookup": false}, {"name": "software_rev", "is_choice": false, "repeated": false, "type": "string", "lookup": false}, {"name": "serial_num", "is_choice": false, "repeated": false, "type": "string", "lookup": false}, {"name": "mfg_name", "is_choice": false, "repeated": false, "type": "string", "lookup": false}, {"name": "model_name", "is_choice": false, "repeated": false, "type": "string", "lookup": false}, {"name": "alias", "is_choice": false, "repeated": false, "type": "string", "lookup": false}, {"name": "asset_id", "is_choice": false, "repeated": false, "type": "string", "lookup": false}, {"name": "is_fru", "is_choice": false, "repeated": false, "type": "bool", "lookup": false}, {"name": "mfg_date", "is_choice": false, "repeated": false, "type": "google.protobuf.Timestamp", "lookup": true}, {"name": "uri", "is_choice": false, "repeated": false, "type": "Uri", "lookup": true}, {"name": "uuid", "is_choice": false, "repeated": false, "type": "Uuid", "lookup": true}, {"name": "state", "is_choice": false, "repeated": false, "type": "ComponentState", "lookup": true}, {"name": "sensor_data", "is_choice": false, "repeated": true, "type": "ComponentSensorData", "lookup": true}]}, {"name": "Hardware", "type": "message", "module": "hw", "fields": [{"name": "last_change", "is_choice": false, "repeated": false, "type": "google.protobuf.Timestamp", "lookup": true}, {"name": "root", "is_choice": false, "repeated": false, "type": "Component", "lookup": true}]}, {"name": "ModifiableComponent", "type": "message", "module": "hw", "fields": [{"name": "name", "is_choice": false, "repeated": false, "type": "string", "lookup": false}, {"name": "class", "is_choice": false, "repeated": false, "type": "ComponentType", "lookup": true}, {"name": "parent", "is_choice": false, "repeated": false, "type": "Component", "lookup": true}, {"name": "parent_rel_pos", "is_choice": false, "repeated": false, "type": "int32", "lookup": false}, {"name": "alias", "is_choice": false, "repeated": false, "type": "string", "lookup": false}, {"name": "asset_id", "is_choice": false, "repeated": false, "type": "string", "lookup": false}, {"name": "uri", "is_choice": false, "repeated": false, "type": "Uri", "lookup": true}, {"name": "admin_state", "is_choice": false, "repeated": false, "type": "ComponentAdminState", "lookup": true}]}, {"name": "MetricNames", "type": "enum", "module": "hw_metrics_mgmt_service", "values": {"0": "METRIC_NAME_UNDEFINED", "1": "METRIC_FAN_SPEED", "100": "METRIC_CPU_TEMP", "101": "METRIC_CPU_USAGE_PERCENTAGE", "200": "METRIC_TRANSCEIVER_TEMP", "201": "METRIC_TRANSCEIVER_VOLTAGE", "202": "METRIC_TRANSCEIVER_BIAS", "203": "METRIC_TRANSCEIVER_RX_POWER", "204": "METRIC_TRANSCEIVER_TX_POWER", "205": "METRIC_TRANSCEIVER_WAVELENGTH", "300": "METRIC_DISK_TEMP", "301": "METRIC_DISK_CAPACITY", "302": "METRIC_DISK_USAGE", "303": "METRIC_DISK_USAGE_PERCENTAGE", "304": "METRIC_DISK_READ_WRITE_PERCENTAGE", "305": "METRIC_DISK_FAULTY_CELLS_PERCENTAGE", "400": "METRIC_RAM_TEMP", "401": "METRIC_RAM_CAPACITY", "402": "METRIC_RAM_USAGE", "403": "METRIC_RAM_USAGE_PERCENTAGE", "500": "METRIC_POWER_MAX", "501": "METRIC_POWER_USAGE", "502": "METRIC_POWER_USAGE_PERCENTAGE", "600": "METRIC_INNER_SURROUNDING_TEMP"}}, {"name": "MetricConfig", "type": "message", "module": "hw_metrics_mgmt_service", "fields": [{"name": "metric_id", "is_choice": false, "repeated": false, "type": "MetricNames", "lookup": true}, {"name": "is_configured", "is_choice": false, "repeated": false, "type": "bool", "lookup": false}, {"name": "poll_interval", "is_choice": false, "repeated": false, "type": "uint32", "lookup": false}]}, {"name": "MetricsConfig", "type": "message", "module": "hw_metrics_mgmt_service", "fields": [{"name": "metrics", "is_choice": false, "repeated": true, "type": "MetricConfig", "lookup": true}]}, {"name": "ListMetricsResponse", "type": "message", "module": "hw_metrics_mgmt_service", "fields": [{"name": "status", "is_choice": false, "repeated": false, "type": "Status", "lookup": true}, {"name": "reason", "is_choice": false, "repeated": false, "type": "Reason", "lookup": true}, {"name": "metrics", "is_choice": false, "repeated": false, "type": "MetricsConfig", "lookup": true}]}, {"name": "MetricsConfigurationRequest", "type": "message", "module": "hw_metrics_mgmt_service", "fields": [{"name": "device_uuid", "is_choice": false, "repeated": false, "type": "Uuid", "lookup": true}, {"name": "operation", "is_choice": true, "cases": [{"name": "changes", "type": "MetricsConfig", "lookup": true}, {"name": "reset_to_default", "type": "bool", "lookup": false}]}]}, {"name": "MetricsConfigurationResponse", "type": "message", "module": "hw_metrics_mgmt_service", "fields": [{"name": "status", "is_choice": false, "repeated": false, "type": "Status", "lookup": true}, {"name": "reason", "is_choice": false, "repeated": false, "type": "Reason", "lookup": true}]}, {"name": "MetricMetaData", "type": "message", "module": "hw_metrics_mgmt_service", "fields": [{"name": "device_uuid", "is_choice": false, "repeated": false, "type": "Uuid", "lookup": true}, {"name": "component_uuid", "is_choice": false, "repeated": false, "type": "Uuid", "lookup": true}, {"name": "component_name", "is_choice": false, "repeated": false, "type": "string", "lookup": false}]}, {"name": "Metric", "type": "message", "module": "hw_metrics_mgmt_service", "fields": [{"name": "metric_id", "is_choice": false, "repeated": false, "type": "MetricNames", "lookup": true}, {"name": "metric_metadata", "is_choice": false, "repeated": false, "type": "MetricMetaData", "lookup": true}, {"name": "value", "is_choice": false, "repeated": false, "type": "ComponentSensorData", "lookup": true}]}, {"name": "GetMetricRequest", "type": "message", "module": "hw_metrics_mgmt_service", "fields": [{"name": "meta_data", "is_choice": false, "repeated": false, "type": "MetricMetaData", "lookup": true}, {"name": "metric_id", "is_choice": false, "repeated": false, "type": "MetricNames", "lookup": true}]}, {"name": "GetMetricResponse", "type": "message", "module": "hw_metrics_mgmt_service", "fields": [{"name": "status", "is_choice": false, "repeated": false, "type": "Status", "lookup": true}, {"name": "reason", "is_choice": false, "repeated": false, "type": "Reason", "lookup": true}, {"name": "metric", "is_choice": false, "repeated": false, "type": "Metric", "lookup": true}]}, {"name": "EventIds", "type": "enum", "module": "hw_events_mgmt_service", "values": {"0": "EVENT_NAME_UNDEFINED", "100": "EVENT_TRANSCEIVER_PLUG_OUT", "101": "EVENT_TRANSCEIVER_PLUG_IN", "102": "EVENT_TRANSCEIVER_VOLTAGE_ABOVE_THRESHOLD", "103": "EVENT_TRANSCEIVER_VOLTAGE_BELOW_THRESHOLD", "104": "EVENT_TRANSCEIVER_TEMPERATURE_ABOVE_THRESHOLD", "105": "EVENT_TRANSCEIVER_TEMPERATURE_BELOW_THRESHOLD", "106": "EVENT_TRANSCEIVER_CURRENT_ABOVE_THRESHOLD", "107": "EVENT_TRANSCEIVER_CURRENT_BELOW_THRESHOLD", "108": "EVENT_TRANSCEIVER_RX_POWER_ABOVE_THRESHOLD", "109": "EVENT_TRANSCEIVER_RX_POWER_BELOW_THRESHOLD", "110": "EVENT_TRANSCEIVER_TX_POWER_ABOVE_THRESHOLD", "111": "EVENT_TRANSCEIVER_TX_POWER_BELOW_THRESHOLD", "112": "EVENT_TRANSCEIVER_FAILURE", "113": "EVENT_TRANSCEIVER_VOLTAGE_ABOVE_THRESHOLD_RECOVERED", "114": "EVENT_TRANSCEIVER_VOLTAGE_BELOW_THRESHOLD_RECOVERED", "115": "EVENT_TRANSCEIVER_TEMPERATURE_ABOVE_THRESHOLD_RECOVERED", "116": "EVENT_TRANSCEIVER_TEMPERATURE_BELOW_THRESHOLD_RECOVERED", "117": "EVENT_TRANSCEIVER_CURRENT_ABOVE_THRESHOLD_RECOVERED", "118": "EVENT_TRANSCEIVER_CURRENT_BELOW_THRESHOLD_RECOVERED", "119": "EVENT_TRANSCEIVER_RX_POWER_ABOVE_THRESHOLD_RECOVERED", "120": "EVENT_TRANSCEIVER_RX_POWER_BELOW_THRESHOLD_RECOVERED", "121": "EVENT_TRANSCEIVER_TX_POWER_ABOVE_THRESHOLD_RECOVERED", "122": "EVENT_TRANSCEIVER_TX_POWER_BELOW_THRESHOLD_RECOVERED", "123": "EVENT_TRANSCEIVER_FAILURE_RECOVERED", "200": "EVENT_PSU_PLUG_OUT", "201": "EVENT_PSU_PLUG_IN", "202": "EVENT_PSU_FAILURE", "203": "EVENT_PSU_FAILURE_RECOVERED", "300": "EVENT_FAN_FAILURE", "301": "EVENT_FAN_PLUG_OUT", "302": "EVENT_FAN_PLUG_IN", "303": "EVENT_FAN_FAILURE_RECOVERED", "400": "EVENT_CPU_TEMPERATURE_ABOVE_CRITICAL", "401": "EVENT_CPU_TEMPERATURE_ABOVE_FATAL", "402": "EVENT_CPU_TEMPERATURE_ABOVE_CRITICAL_RECOVERED", "403": "EVENT_CPU_TEMPERATURE_ABOVE_FATAL_RECOVERED", "500": "EVENT_HW_DEVICE_RESET", "501": "EVENT_HW_DEVICE_TEMPERATURE_ABOVE_CRITICAL", "502": "EVENT_HW_DEVICE_TEMPERATURE_ABOVE_FATAL", "503": "EVENT_HW_DEVICE_TEMPERATURE_ABOVE_CRITICAL_RECOVERED", "504": "EVENT_HW_DEVICE_TEMPERATURE_ABOVE_FATAL_RECOVERED"}}, {"name": "ValueType", "type": "message", "module": "hw_events_mgmt_service", "fields": [{"name": "val", "is_choice": true, "cases": [{"name": "int_val", "type": "int64", "lookup": false}, {"name": "uint_val", "type": "uint64", "lookup": false}, {"name": "float_val", "type": "float", "lookup": false}]}]}, {"name": "WaterMarks", "type": "message", "module": "hw_events_mgmt_service", "fields": [{"name": "high", "is_choice": false, "repeated": false, "type": "ValueType", "lookup": true}, {"name": "low", "is_choice": false, "repeated": false, "type": "ValueType", "lookup": true}]}, {"name": "Thresholds", "type": "message", "module": "hw_events_mgmt_service", "fields": [{"name": "threshold", "is_choice": true, "cases": [{"name": "upper", "type": "WaterMarks", "lookup": true}, {"name": "lower", "type": "WaterMarks", "lookup": true}]}]}, {"name": "ThresholdInformation", "type": "message", "module": "hw_events_mgmt_service", "fields": [{"name": "observed_value", "is_choice": false, "repeated": false, "type": "ValueType", "lookup": true}, {"name": "thresholds", "is_choice": false, "repeated": false, "type": "Thresholds", "lookup": true}]}, {"name": "EventCfg", "type": "message", "module": "hw_events_mgmt_service", "fields": [{"name": "event_id", "is_choice": false, "repeated": false, "type": "EventIds", "lookup": true}, {"name": "is_configured", "is_choice": false, "repeated": false, "type": "bool", "lookup": false}, {"name": "thresholds", "is_choice": false, "repeated": false, "type": "Thresholds", "lookup": true}]}, {"name": "EventsCfg", "type": "message", "module": "hw_events_mgmt_service", "fields": [{"name": "items", "is_choice": false, "repeated": true, "type": "EventCfg", "lookup": true}]}, {"name": "ListEventsResponse", "type": "message", "module": "hw_events_mgmt_service", "fields": [{"name": "status", "is_choice": false, "repeated": false, "type": "Status", "lookup": true}, {"name": "reason", "is_choice": false, "repeated": false, "type": "Reason", "lookup": true}, {"name": "events", "is_choice": false, "repeated": false, "type": "EventsCfg", "lookup": true}]}, {"name": "EventsConfigurationRequest", "type": "message", "module": "hw_events_mgmt_service", "fields": [{"name": "device_uuid", "is_choice": false, "repeated": false, "type": "Uuid", "lookup": true}, {"name": "operation", "is_choice": true, "cases": [{"name": "changes", "type": "EventsCfg", "lookup": true}, {"name": "reset_to_default", "type": "bool", "lookup": false}]}]}, {"name": "EventsConfigurationResponse", "type": "message", "module": "hw_events_mgmt_service", "fields": [{"name": "status", "is_choice": false, "repeated": false, "type": "Status", "lookup": true}, {"name": "reason", "is_choice": false, "repeated": false, "type": "Reason", "lookup": true}]}, {"name": "EventMetaData", "type": "message", "module": "hw_events_mgmt_service", "fields": [{"name": "device_uuid", "is_choice": false, "repeated": false, "type": "Uuid", "lookup": true}, {"name": "component_uuid", "is_choice": false, "repeated": false, "type": "Uuid", "lookup": true}, {"name": "component_name", "is_choice": false, "repeated": false, "type": "string", "lookup": false}]}, {"name": "Event", "type": "message", "module": "hw_events_mgmt_service", "fields": [{"name": "event_metadata", "is_choice": false, "repeated": false, "type": "EventMetaData", "lookup": true}, {"name": "event_id", "is_choice": false, "repeated": false, "type": "EventIds", "lookup": true}, {"name": "raised_ts", "is_choice": false, "repeated": false, "type": "google.protobuf.Timestamp", "lookup": true}, {"name": "threshold_info", "is_choice": false, "repeated": false, "type": "ThresholdInformation", "lookup": true}, {"name": "add_info", "is_choice": false, "repeated": false, "type": "string", "lookup": false}]}, {"name": "ImageVersion", "type": "message", "module": "sw_image", "fields": [{"name": "image_name", "is_choice": false, "repeated": false, "type": "string", "lookup": false}, {"name": "version", "is_choice": false, "repeated": false, "type": "string", "lookup": false}]}, {"name": "ImageInformation", "type": "message", "module": "sw_image", "fields": [{"name": "image", "is_choice": false, "repeated": false, "type": "ImageVersion", "lookup": true}, {"name": "image_install_script", "is_choice": false, "repeated": false, "type": "string", "lookup": false}, {"name": "image_url", "is_choice": false, "repeated": false, "type": "string", "lookup": false}, {"name": "sha256sum", "is_choice": false, "repeated": false, "type": "string", "lookup": false}]}, {"name": "ImageState", "type": "enum", "module": "sw_image", "values": {"0": "UNDEFINED_STATE", "1": "COPYING_IMAGE", "2": "INSTALLING_IMAGE", "3": "COMMITTING_IMAGE", "4": "REBOOTING_DEVICE", "5": "UPGRADE_COMPLETE", "6": "UPGRADE_FAILED", "7": "ACTIVATION_COMPLETE", "8": "ACTIVATION_FAILED"}}, {"name": "Reason", "type": "enum", "module": "sw_image", "values": {"0": "UNDEFINED_REASON", "1": "ERROR_IN_REQUEST", "2": "INTERNAL_ERROR", "3": "DEVICE_IN_WRONG_STATE", "4": "INVALID_IMAGE", "5": "WRONG_IMAGE_CHECKSUM"}}, {"name": "ImageStatus", "type": "message", "module": "sw_image", "fields": [{"name": "status", "is_choice": false, "repeated": false, "type": "Status", "lookup": true}, {"name": "reason", "is_choice": false, "repeated": false, "type": "Reason", "lookup": true}, {"name": "state", "is_choice": false, "repeated": false, "type": "ImageState", "lookup": true}, {"name": "description", "is_choice": false, "repeated": false, "type": "string", "lookup": false}]}, {"name": "PhysicalInventoryRequest", "type": "message", "module": "hw_management_service", "fields": [{"name": "device_uuid", "is_choice": false, "repeated": false, "type": "Uuid", "lookup": true}]}, {"name": "PhysicalInventoryResponse", "type": "message", "module": "hw_management_service", "fields": [{"name": "status", "is_choice": false, "repeated": false, "type": "Status", "lookup": true}, {"name": "reason", "is_choice": false, "repeated": false, "type": "Reason", "lookup": true}, {"name": "inventory", "is_choice": false, "repeated": false, "type": "Hardware", "lookup": true}]}, {"name": "HWComponentInfoGetRequest", "type": "message", "module": "hw_management_service", "fields": [{"name": "device_uuid", "is_choice": false, "repeated": false, "type": "Uuid", "lookup": true}, {"name": "component_uuid", "is_choice": false, "repeated": false, "type": "Uuid", "lookup": true}, {"name": "component_name", "is_choice": false, "repeated": false, "type": "string", "lookup": false}]}, {"name": "HWComponentInfoGetResponse", "type": "message", "module": "hw_management_service", "fields": [{"name": "status", "is_choice": false, "repeated": false, "type": "Status", "lookup": true}, {"name": "reason", "is_choice": false, "repeated": false, "type": "Reason", "lookup": true}, {"name": "component", "is_choice": false, "repeated": false, "type": "Component", "lookup": true}]}, {"name": "HWComponentInfoSetRequest", "type": "message", "module": "hw_management_service", "fields": [{"name": "device_uuid", "is_choice": false, "repeated": false, "type": "Uuid", "lookup": true}, {"name": "component_uuid", "is_choice": false, "repeated": false, "type": "Uuid", "lookup": true}, {"name": "component_name", "is_choice": false, "repeated": false, "type": "string", "lookup": false}, {"name": "changes", "is_choice": false, "repeated": false, "type": "ModifiableComponent", "lookup": true}]}, {"name": "HWComponentInfoSetResponse", "type": "message", "module": "hw_management_service", "fields": [{"name": "status", "is_choice": false, "repeated": false, "type": "Status", "lookup": true}, {"name": "reason", "is_choice": false, "repeated": false, "type": "Reason", "lookup": true}]}, {"name": "StartManagingDeviceResponse", "type": "message", "module": "hw_management_service", "fields": [{"name": "status", "is_choice": false, "repeated": false, "type": "Status", "lookup": true}, {"name": "reason", "is_choice": false, "repeated": false, "type": "Reason", "lookup": true}, {"name": "device_uuid", "is_choice": false, "repeated": false, "type": "Uuid", "lookup": true}]}, {"name": "StopManagingDeviceRequest", "type": "message", "module": "hw_management_service", "fields": [{"name": "name", "is_choice": false, "repeated": false, "type": "string", "lookup": false}]}, {"name": "StopManagingDeviceResponse", "type": "message", "module": "hw_management_service", "fields": [{"name": "status", "is_choice": false, "repeated": false, "type": "Status", "lookup": true}, {"name": "reason", "is_choice": false, "repeated": false, "type": "Reason", "lookup": true}]}, {"name": "ManagedDevicesResponse", "type": "message", "module": "hw_management_service", "fields": [{"name": "devices", "is_choice": false, "repeated": true, "type": "ModifiableComponent", "lookup": true}]}, {"name": "SetLoggingEndpointRequest", "type": "message", "module": "hw_management_service", "fields": [{"name": "device_uuid", "is_choice": false, "repeated": false, "type": "Uuid", "lookup": true}, {"name": "logging_endpoint", "is_choice": false, "repeated": false, "type": "string", "lookup": false}, {"name": "logging_protocol", "is_choice": false, "repeated": false, "type": "string", "lookup": false}]}, {"name": "SetRemoteEndpointResponse", "type": "message", "module": "hw_management_service", "fields": [{"name": "status", "is_choice": false, "repeated": false, "type": "Status", "lookup": true}, {"name": "reason", "is_choice": false, "repeated": false, "type": "Reason", "lookup": true}]}, {"name": "GetLoggingEndpointResponse", "type": "message", "module": "hw_management_service", "fields": [{"name": "status", "is_choice": false, "repeated": false, "type": "Status", "lookup": true}, {"name": "reason", "is_choice": false, "repeated": false, "type": "Reason", "lookup": true}, {"name": "logging_endpoint", "is_choice": false, "repeated": false, "type": "string", "lookup": false}, {"name": "logging_protocol", "is_choice": false, "repeated": false, "type": "string", "lookup": false}]}, {"name": "SetMsgBusEndpointRequest", "type": "message", "module": "hw_management_service", "fields": [{"name": "msgbus_endpoint", "is_choice": false, "repeated": false, "type": "string", "lookup": false}]}, {"name": "GetMsgBusEndpointResponse", "type": "message", "module": "hw_management_service", "fields": [{"name": "status", "is_choice": false, "repeated": false, "type": "Status", "lookup": true}, {"name": "reason", "is_choice": false, "repeated": false, "type": "Reason", "lookup": true}, {"name": "msgbus_endpoint", "is_choice": false, "repeated": false, "type": "string", "lookup": false}]}, {"name": "EntitiesLogLevel", "type": "message", "module": "hw_management_service", "fields": [{"name": "logLevel", "is_choice": false, "repeated": false, "type": "LogLevel", "lookup": true}, {"name": "entities", "is_choice": false, "repeated": true, "type": "string", "lookup": false}]}, {"name": "SetLogLevelRequest", "type": "message", "module": "hw_management_service", "fields": [{"name": "device_uuid", "is_choice": false, "repeated": false, "type": "Uuid", "lookup": true}, {"name": "loglevels", "is_choice": false, "repeated": true, "type": "EntitiesLogLevel", "lookup": true}]}, {"name": "SetLogLevelResponse", "type": "message", "module": "hw_management_service", "fields": [{"name": "device_uuid", "is_choice": false, "repeated": false, "type": "Uuid", "lookup": true}, {"name": "status", "is_choice": false, "repeated": false, "type": "Status", "lookup": true}, {"name": "reason", "is_choice": false, "repeated": false, "type": "Reason", "lookup": true}]}, {"name": "GetLogLevelRequest", "type": "message", "module": "hw_management_service", "fields": [{"name": "device_uuid", "is_choice": false, "repeated": false, "type": "Uuid", "lookup": true}, {"name": "entities", "is_choice": false, "repeated": true, "type": "string", "lookup": false}]}, {"name": "GetLogLevelResponse", "type": "message", "module": "hw_management_service", "fields": [{"name": "device_uuid", "is_choice": false, "repeated": false, "type": "Uuid", "lookup": true}, {"name": "logLevels", "is_choice": false, "repeated": true, "type": "EntitiesLogLevel", "lookup": true}, {"name": "status", "is_choice": false, "repeated": false, "type": "Status", "lookup": true}, {"name": "reason", "is_choice": false, "repeated": false, "type": "Reason", "lookup": true}]}, {"name": "GetLoggableEntitiesRequest", "type": "message", "module": "hw_management_service", "fields": [{"name": "device_uuid", "is_choice": false, "repeated": false, "type": "Uuid", "lookup": true}]}, {"name": "SoftwareVersionInformation", "type": "message", "module": "sw_management_service", "fields": [{"name": "active_versions", "is_choice": false, "repeated": true, "type": "ImageVersion", "lookup": true}, {"name": "standby_versions", "is_choice": false, "repeated": true, "type": "ImageVersion", "lookup": true}]}, {"name": "GetSoftwareVersionInformationResponse", "type": "message", "module": "sw_management_service", "fields": [{"name": "status", "is_choice": false, "repeated": false, "type": "Status", "lookup": true}, {"name": "reason", "is_choice": false, "repeated": false, "type": "Reason", "lookup": true}, {"name": "info", "is_choice": false, "repeated": false, "type": "SoftwareVersionInformation", "lookup": true}]}, {"name": "DownloadImageRequest", "type": "message", "module": "sw_management_service", "fields": [{"name": "device_uuid", "is_choice": false, "repeated": false, "type": "Uuid", "lookup": true}, {"name": "image_info", "is_choice": false, "repeated": false, "type": "ImageInformation", "lookup": true}]}, {"name": "ConfigRequest", "type": "message", "module": "sw_management_service", "fields": [{"name": "device_uuid", "is_choice": false, "repeated": false, "type": "Uuid", "lookup": true}, {"name": "config_url", "is_choice": false, "repeated": false, "type": "string", "lookup": false}]}, {"name": "ConfigResponse", "type": "message", "module": "sw_management_service", "fields": [{"name": "status", "is_choice": false, "repeated": false, "type": "Status", "lookup": true}, {"name": "reason", "is_choice": false, "repeated": false, "type": "Reason", "lookup": true}]}], "services": [{"name": "NativeMetricsManagementService", "module": "hw_metrics_mgmt_service", "rpcs": [{"name": "ListMetrics", "request": {"is_stream": false, "type": "HardwareID", "lookup": true}, "response": {"is_stream": false, "type": "ListMetricsResponse", "lookup": true}}, {"name": "UpdateMetricsConfiguration", "request": {"is_stream": false, "type": "MetricsConfigurationRequest", "lookup": true}, "response": {"is_stream": false, "type": "MetricsConfigurationResponse", "lookup": true}}, {"name": "GetMetric", "request": {"is_stream": false, "type": "GetMetricRequest", "lookup": true}, "response": {"is_stream": false, "type": "GetMetricResponse", "lookup": true}}]}, {"name": "NativeEventsManagementService", "module": "hw_events_mgmt_service", "rpcs": [{"name": "ListEvents", "request": {"is_stream": false, "type": "HardwareID", "lookup": true}, "response": {"is_stream": false, "type": "ListEventsResponse", "lookup": true}}, {"name": "UpdateEventsConfiguration", "request": {"is_stream": false, "type": "EventsConfigurationRequest", "lookup": true}, "response": {"is_stream": false, "type": "EventsConfigurationResponse", "lookup": true}}]}, {"name": "NativeHWManagementService", "module": "hw_management_service", "rpcs": [{"name": "StartManagingDevice", "request": {"is_stream": false, "type": "ModifiableComponent", "lookup": true}, "response": {"is_stream": true, "type": "StartManagingDeviceResponse", "lookup": true}}, {"name": "StopManagingDevice", "request": {"is_stream": false, "type": "StopManagingDeviceRequest", "lookup": true}, "response": {"is_stream": false, "type": "StopManagingDeviceResponse", "lookup": true}}, {"name": "GetManagedDevices", "request": {"is_stream": false, "type": "google.protobuf.Empty", "lookup": false}, "response": {"is_stream": false, "type": "ManagedDevicesResponse", "lookup": true}}, {"name": "GetPhysicalInventory", "request": {"is_stream": false, "type": "PhysicalInventoryRequest", "lookup": true}, "response": {"is_stream": true, "type": "PhysicalInventoryResponse", "lookup": true}}, {"name": "GetHWComponentInfo", "request": {"is_stream": false, "type": "HWComponentInfoGetRequest", "lookup": true}, "response": {"is_stream": true, "type": "HWComponentInfoGetResponse", "lookup": true}}, {"name": "SetHWComponentInfo", "request": {"is_stream": false, "type": "HWComponentInfoSetRequest", "lookup": true}, "response": {"is_stream": false, "type": "HWComponentInfoSetResponse", "lookup": true}}, {"name": "SetLoggingEndpoint", "request": {"is_stream": false, "type": "SetLoggingEndpointRequest", "lookup": true}, "response": {"is_stream": false, "type": "SetRemoteEndpointResponse", "lookup": true}}, {"name": "GetLoggingEndpoint", "request": {"is_stream": false, "type": "HardwareID", "lookup": true}, "response": {"is_stream": false, "type": "GetLoggingEndpointResponse", "lookup": true}}, {"name": "SetMsgBusEndpoint", "request": {"is_stream": false, "type": "SetMsgBusEndpointRequest", "lookup": true}, "response": {"is_stream": false, "type": "SetRemoteEndpointResponse", "lookup": true}}, {"name": "GetMsgBusEndpoint", "request": {"is_stream": false, "type": "google.protobuf.Empty", "lookup": false}, "response": {"is_stream": false, "type": "GetMsgBusEndpointResponse", "lookup": true}}, {"name": "GetLoggableEntities", "request": {"is_stream": false, "type": "GetLoggableEntitiesRequest", "lookup": true}, "response": {"is_stream": false, "type": "GetLogLevelResponse", "lookup": true}}, {"name": "SetLogLevel", "request": {"is_stream": false, "type": "SetLogLevelRequest", "lookup": true}, "response": {"is_stream": false, "type": "SetLogLevelResponse", "lookup": true}}, {"name": "GetLogLevel", "request": {"is_stream": false, "type": "GetLogLevelRequest", "lookup": true}, "response": {"is_stream": false, "type": "GetLogLevelResponse", "lookup": true}}]}, {"name": "NativeSoftwareManagementService", "module": "sw_management_service", "rpcs": [{"name": "GetSoftwareVersion", "request": {"is_stream": false, "type": "HardwareID", "lookup": true}, "response": {"is_stream": false, "type": "GetSoftwareVersionInformationResponse", "lookup": true}}, {"name": "DownloadImage", "request": {"is_stream": false, "type": "DownloadImageRequest", "lookup": true}, "response": {"is_stream": true, "type": "ImageStatus", "lookup": true}}, {"name": "ActivateImage", "request": {"is_stream": false, "type": "HardwareID", "lookup": true}, "response": {"is_stream": true, "type": "ImageStatus", "lookup": true}}, {"name": "RevertToStandbyImage", "request": {"is_stream": false, "type": "HardwareID", "lookup": true}, "response": {"is_stream": true, "type": "ImageStatus", "lookup": true}}, {"name": "UpdateStartupConfiguration", "request": {"is_stream": false, "type": "ConfigRequest", "lookup": true}, "response": {"is_stream": true, "type": "ConfigResponse", "lookup": true}}]}]}
\ No newline at end of file
diff --git a/grpc_robot/services/dmi/dmi_0_9_8/__init__.py b/grpc_robot/services/dmi/dmi_0_9_8/__init__.py
new file mode 100644
index 0000000..6209d14
--- /dev/null
+++ b/grpc_robot/services/dmi/dmi_0_9_8/__init__.py
@@ -0,0 +1,17 @@
+# Copyright 2020-present Open Networking Foundation
+# Original copyright 2020-present ADTRAN, Inc.
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+from ..dmi_0_9_1.hw_events_mgmt_service import *
+from ..dmi_0_9_4.hw_management_service import *
+from ..dmi_0_9_1.hw_metrics_mgmt_service import *
+from .sw_management_service import *
diff --git a/grpc_robot/services/dmi/dmi_0_9_8/dmi.json b/grpc_robot/services/dmi/dmi_0_9_8/dmi.json
new file mode 100644
index 0000000..4959cf0
--- /dev/null
+++ b/grpc_robot/services/dmi/dmi_0_9_8/dmi.json
@@ -0,0 +1 @@
+{"modules": [{"name": "commons", "imports": []}, {"name": "hw", "imports": ["timestamp"]}, {"name": "hw_metrics_mgmt_service", "imports": ["commons", "hw"]}, {"name": "hw_events_mgmt_service", "imports": ["commons", "hw", "timestamp"]}, {"name": "sw_image", "imports": ["commons"]}, {"name": "hw_management_service", "imports": ["commons", "hw", "empty"]}, {"name": "sw_management_service", "imports": ["commons", "hw", "sw_image"]}], "data_types": [{"name": "Status", "type": "enum", "module": "commons", "values": {"0": "UNDEFINED_STATUS", "1": "OK_STATUS", "2": "ERROR_STATUS"}}, {"name": "LogLevel", "type": "enum", "module": "commons", "values": {"0": "TRACE", "1": "DEBUG", "2": "INFO", "3": "WARN", "4": "ERROR"}}, {"name": "Uuid", "type": "message", "module": "hw", "fields": [{"name": "uuid", "is_choice": false, "repeated": false, "type": "string", "lookup": false}]}, {"name": "HardwareID", "type": "message", "module": "hw", "fields": [{"name": "uuid", "is_choice": false, "repeated": false, "type": "Uuid", "lookup": true}]}, {"name": "Uri", "type": "message", "module": "hw", "fields": [{"name": "uri", "is_choice": false, "repeated": false, "type": "string", "lookup": false}]}, {"name": "ComponentType", "type": "enum", "module": "hw", "values": {"0": "COMPONENT_TYPE_UNDEFINED", "1": "COMPONENT_TYPE_UNKNOWN", "2": "COMPONENT_TYPE_CHASSIS", "3": "COMPONENT_TYPE_BACKPLANE", "4": "COMPONENT_TYPE_CONTAINER", "5": "COMPONENT_TYPE_POWER_SUPPLY", "6": "COMPONENT_TYPE_FAN", "7": "COMPONENT_TYPE_SENSOR", "8": "COMPONENT_TYPE_MODULE", "9": "COMPONENT_TYPE_PORT", "10": "COMPONENT_TYPE_CPU", "11": "COMPONENT_TYPE_BATTERY", "12": "COMPONENT_TYPE_STORAGE", "13": "COMPONENT_TYPE_MEMORY", "14": "COMPONENT_TYPE_TRANSCEIVER", "15": "COMPONENT_TYPE_GPON_TRANSCEIVER", "16": "COMPONENT_TYPE_XGS_PON_TRANSCEIVER"}}, {"name": "ComponentAdminState", "type": "enum", "module": "hw", "values": {"0": "COMP_ADMIN_STATE_UNDEFINED", "1": "COMP_ADMIN_STATE_UNKNOWN", "2": "COMP_ADMIN_STATE_LOCKED", "3": "COMP_ADMIN_STATE_SHUTTING_DOWN", "4": "COMP_ADMIN_STATE_UNLOCKED"}}, {"name": "ComponentOperState", "type": "enum", "module": "hw", "values": {"0": "COMP_OPER_STATE_UNDEFINED", "1": "COMP_OPER_STATE_UNKNOWN", "2": "COMP_OPER_STATE_DISABLED", "3": "COMP_OPER_STATE_ENABLED", "4": "COMP_OPER_STATE_TESTING"}}, {"name": "ComponentUsageState", "type": "enum", "module": "hw", "values": {"0": "COMP_USAGE_STATE_UNDEFINED", "1": "COMP_USAGE_STATE_UNKNOWN", "2": "COMP_USAGE_STATE_IDLE", "3": "COMP_USAGE_STATE_ACTIVE", "4": "COMP_USAGE_STATE_BUSY"}}, {"name": "ComponentAlarmState", "type": "enum", "module": "hw", "values": {"0": "COMP_ALARM_STATE_UNDEFINED", "1": "COMP_ALARM_STATE_UNKNOWN", "2": "COMP_ALARM_STATE_UNDER_REPAIR", "3": "COMP_ALARM_STATE_CRITICAL", "4": "COMP_ALARM_STATE_MAJOR", "5": "COMP_ALARM_STATE_MINOR", "6": "COMP_ALARM_STATE_WARNING", "7": "COMP_ALARM_STATE_INDETERMINATE"}}, {"name": "ComponentStandbyState", "type": "enum", "module": "hw", "values": {"0": "COMP_STANDBY_STATE_UNDEFINED", "1": "COMP_STANDBY_STATE_UNKNOWN", "2": "COMP_STANDBY_STATE_HOT", "3": "COMP_STANDBY_STATE_COLD", "4": "COMP_STANDBY_STATE_PROVIDING_SERVICE"}}, {"name": "ComponentState", "type": "message", "module": "hw", "fields": [{"name": "state_last_changed", "is_choice": false, "repeated": false, "type": "google.protobuf.Timestamp", "lookup": true}, {"name": "admin_state", "is_choice": false, "repeated": false, "type": "ComponentAdminState", "lookup": true}, {"name": "oper_state", "is_choice": false, "repeated": false, "type": "ComponentOperState", "lookup": true}, {"name": "usage_state", "is_choice": false, "repeated": false, "type": "ComponentUsageState", "lookup": true}, {"name": "alarm_state", "is_choice": false, "repeated": false, "type": "ComponentAlarmState", "lookup": true}, {"name": "standby_state", "is_choice": false, "repeated": false, "type": "ComponentStandbyState", "lookup": true}]}, {"name": "SensorValueType", "type": "enum", "module": "hw", "values": {"0": "SENSOR_VALUE_TYPE_UNDEFINED", "1": "SENSOR_VALUE_TYPE_OTHER", "2": "SENSOR_VALUE_TYPE_UNKNOWN", "3": "SENSOR_VALUE_TYPE_VOLTS_AC", "4": "SENSOR_VALUE_TYPE_VOLTS_DC", "5": "SENSOR_VALUE_TYPE_AMPERES", "6": "SENSOR_VALUE_TYPE_WATTS", "7": "SENSOR_VALUE_TYPE_HERTZ", "8": "SENSOR_VALUE_TYPE_CELSIUS", "9": "SENSOR_VALUE_TYPE_PERCENT_RH", "10": "SENSOR_VALUE_TYPE_RPM", "11": "SENSOR_VALUE_TYPE_CMM", "12": "SENSOR_VALUE_TYPE_TRUTH_VALUE"}}, {"name": "SensorValueScale", "type": "enum", "module": "hw", "values": {"0": "SENSOR_VALUE_SCALE_UNDEFINED", "1": "SENSOR_VALUE_SCALE_YOCTO", "2": "SENSOR_VALUE_SCALE_ZEPTO", "3": "SENSOR_VALUE_SCALE_ATTO", "4": "SENSOR_VALUE_SCALE_FEMTO", "5": "SENSOR_VALUE_SCALE_PICO", "6": "SENSOR_VALUE_SCALE_NANO", "7": "SENSOR_VALUE_SCALE_MICRO", "8": "SENSOR_VALUE_SCALE_MILLI", "9": "SENSOR_VALUE_SCALE_UNITS", "10": "SENSOR_VALUE_SCALE_KILO", "11": "SENSOR_VALUE_SCALE_MEGA", "12": "SENSOR_VALUE_SCALE_GIGA", "13": "SENSOR_VALUE_SCALE_TERA", "14": "SENSOR_VALUE_SCALE_PETA", "15": "SENSOR_VALUE_SCALE_EXA", "16": "SENSOR_VALUE_SCALE_ZETTA", "17": "SENSOR_VALUE_SCALE_YOTTA"}}, {"name": "SensorStatus", "type": "enum", "module": "hw", "values": {"0": "SENSOR_STATUS_UNDEFINED", "1": "SENSOR_STATUS_OK", "2": "SENSOR_STATUS_UNAVAILABLE", "3": "SENSOR_STATUS_NONOPERATIONAL"}}, {"name": "ComponentSensorData", "type": "message", "module": "hw", "fields": [{"name": "value", "is_choice": false, "repeated": false, "type": "int32", "lookup": false}, {"name": "type", "is_choice": false, "repeated": false, "type": "SensorValueType", "lookup": true}, {"name": "scale", "is_choice": false, "repeated": false, "type": "SensorValueScale", "lookup": true}, {"name": "precision", "is_choice": false, "repeated": false, "type": "int32", "lookup": false}, {"name": "status", "is_choice": false, "repeated": false, "type": "SensorStatus", "lookup": true}, {"name": "units_display", "is_choice": false, "repeated": false, "type": "string", "lookup": false}, {"name": "timestamp", "is_choice": false, "repeated": false, "type": "google.protobuf.Timestamp", "lookup": true}, {"name": "value_update_rate", "is_choice": false, "repeated": false, "type": "uint32", "lookup": false}, {"name": "data_type", "is_choice": false, "repeated": false, "type": "string", "lookup": false}]}, {"name": "Component", "type": "message", "module": "hw", "fields": [{"name": "name", "is_choice": false, "repeated": false, "type": "string", "lookup": false}, {"name": "class", "is_choice": false, "repeated": false, "type": "ComponentType", "lookup": true}, {"name": "description", "is_choice": false, "repeated": false, "type": "string", "lookup": false}, {"name": "parent", "is_choice": false, "repeated": false, "type": "string", "lookup": false}, {"name": "parent_rel_pos", "is_choice": false, "repeated": false, "type": "int32", "lookup": false}, {"name": "children", "is_choice": false, "repeated": true, "type": "Component", "lookup": true}, {"name": "hardware_rev", "is_choice": false, "repeated": false, "type": "string", "lookup": false}, {"name": "firmware_rev", "is_choice": false, "repeated": false, "type": "string", "lookup": false}, {"name": "software_rev", "is_choice": false, "repeated": false, "type": "string", "lookup": false}, {"name": "serial_num", "is_choice": false, "repeated": false, "type": "string", "lookup": false}, {"name": "mfg_name", "is_choice": false, "repeated": false, "type": "string", "lookup": false}, {"name": "model_name", "is_choice": false, "repeated": false, "type": "string", "lookup": false}, {"name": "alias", "is_choice": false, "repeated": false, "type": "string", "lookup": false}, {"name": "asset_id", "is_choice": false, "repeated": false, "type": "string", "lookup": false}, {"name": "is_fru", "is_choice": false, "repeated": false, "type": "bool", "lookup": false}, {"name": "mfg_date", "is_choice": false, "repeated": false, "type": "google.protobuf.Timestamp", "lookup": true}, {"name": "uri", "is_choice": false, "repeated": false, "type": "Uri", "lookup": true}, {"name": "uuid", "is_choice": false, "repeated": false, "type": "Uuid", "lookup": true}, {"name": "state", "is_choice": false, "repeated": false, "type": "ComponentState", "lookup": true}, {"name": "sensor_data", "is_choice": false, "repeated": true, "type": "ComponentSensorData", "lookup": true}]}, {"name": "Hardware", "type": "message", "module": "hw", "fields": [{"name": "last_change", "is_choice": false, "repeated": false, "type": "google.protobuf.Timestamp", "lookup": true}, {"name": "root", "is_choice": false, "repeated": false, "type": "Component", "lookup": true}]}, {"name": "ModifiableComponent", "type": "message", "module": "hw", "fields": [{"name": "name", "is_choice": false, "repeated": false, "type": "string", "lookup": false}, {"name": "class", "is_choice": false, "repeated": false, "type": "ComponentType", "lookup": true}, {"name": "parent", "is_choice": false, "repeated": false, "type": "Component", "lookup": true}, {"name": "parent_rel_pos", "is_choice": false, "repeated": false, "type": "int32", "lookup": false}, {"name": "alias", "is_choice": false, "repeated": false, "type": "string", "lookup": false}, {"name": "asset_id", "is_choice": false, "repeated": false, "type": "string", "lookup": false}, {"name": "uri", "is_choice": false, "repeated": false, "type": "Uri", "lookup": true}, {"name": "admin_state", "is_choice": false, "repeated": false, "type": "ComponentAdminState", "lookup": true}]}, {"name": "MetricNames", "type": "enum", "module": "hw_metrics_mgmt_service", "values": {"0": "METRIC_NAME_UNDEFINED", "1": "METRIC_FAN_SPEED", "100": "METRIC_CPU_TEMP", "101": "METRIC_CPU_USAGE_PERCENTAGE", "200": "METRIC_TRANSCEIVER_TEMP", "201": "METRIC_TRANSCEIVER_VOLTAGE", "202": "METRIC_TRANSCEIVER_BIAS", "203": "METRIC_TRANSCEIVER_RX_POWER", "204": "METRIC_TRANSCEIVER_TX_POWER", "205": "METRIC_TRANSCEIVER_WAVELENGTH", "300": "METRIC_DISK_TEMP", "301": "METRIC_DISK_CAPACITY", "302": "METRIC_DISK_USAGE", "303": "METRIC_DISK_USAGE_PERCENTAGE", "304": "METRIC_DISK_READ_WRITE_PERCENTAGE", "305": "METRIC_DISK_FAULTY_CELLS_PERCENTAGE", "400": "METRIC_RAM_TEMP", "401": "METRIC_RAM_CAPACITY", "402": "METRIC_RAM_USAGE", "403": "METRIC_RAM_USAGE_PERCENTAGE", "500": "METRIC_POWER_MAX", "501": "METRIC_POWER_USAGE", "502": "METRIC_POWER_USAGE_PERCENTAGE", "600": "METRIC_INNER_SURROUNDING_TEMP"}}, {"name": "MetricConfig", "type": "message", "module": "hw_metrics_mgmt_service", "fields": [{"name": "metric_id", "is_choice": false, "repeated": false, "type": "MetricNames", "lookup": true}, {"name": "is_configured", "is_choice": false, "repeated": false, "type": "bool", "lookup": false}, {"name": "poll_interval", "is_choice": false, "repeated": false, "type": "uint32", "lookup": false}]}, {"name": "MetricsConfig", "type": "message", "module": "hw_metrics_mgmt_service", "fields": [{"name": "metrics", "is_choice": false, "repeated": true, "type": "MetricConfig", "lookup": true}]}, {"name": "Reason", "type": "enum", "module": "hw_metrics_mgmt_service", "values": {"0": "UNDEFINED_REASON", "1": "UNKNOWN_DEVICE", "2": "INTERNAL_ERROR"}}, {"name": "ListMetricsResponse", "type": "message", "module": "hw_metrics_mgmt_service", "fields": [{"name": "status", "is_choice": false, "repeated": false, "type": "Status", "lookup": true}, {"name": "reason", "is_choice": false, "repeated": false, "type": "Reason", "lookup": true}, {"name": "metrics", "is_choice": false, "repeated": false, "type": "MetricsConfig", "lookup": true}]}, {"name": "MetricsConfigurationRequest", "type": "message", "module": "hw_metrics_mgmt_service", "fields": [{"name": "device_uuid", "is_choice": false, "repeated": false, "type": "Uuid", "lookup": true}, {"name": "operation", "is_choice": true, "cases": [{"name": "changes", "type": "MetricsConfig", "lookup": true}, {"name": "reset_to_default", "type": "bool", "lookup": false}]}]}, {"name": "Reason", "type": "enum", "module": "hw_metrics_mgmt_service", "values": {"0": "UNDEFINED_REASON", "1": "UNKNOWN_DEVICE", "2": "INTERNAL_ERROR", "3": "POLL_INTERVAL_UNSUPPORTED", "4": "INVALID_METRIC"}}, {"name": "MetricsConfigurationResponse", "type": "message", "module": "hw_metrics_mgmt_service", "fields": [{"name": "status", "is_choice": false, "repeated": false, "type": "Status", "lookup": true}, {"name": "reason", "is_choice": false, "repeated": false, "type": "Reason", "lookup": true}]}, {"name": "MetricMetaData", "type": "message", "module": "hw_metrics_mgmt_service", "fields": [{"name": "device_uuid", "is_choice": false, "repeated": false, "type": "Uuid", "lookup": true}, {"name": "component_uuid", "is_choice": false, "repeated": false, "type": "Uuid", "lookup": true}, {"name": "component_name", "is_choice": false, "repeated": false, "type": "string", "lookup": false}]}, {"name": "Metric", "type": "message", "module": "hw_metrics_mgmt_service", "fields": [{"name": "metric_id", "is_choice": false, "repeated": false, "type": "MetricNames", "lookup": true}, {"name": "metric_metadata", "is_choice": false, "repeated": false, "type": "MetricMetaData", "lookup": true}, {"name": "value", "is_choice": false, "repeated": false, "type": "ComponentSensorData", "lookup": true}]}, {"name": "GetMetricRequest", "type": "message", "module": "hw_metrics_mgmt_service", "fields": [{"name": "meta_data", "is_choice": false, "repeated": false, "type": "MetricMetaData", "lookup": true}, {"name": "metric_id", "is_choice": false, "repeated": false, "type": "MetricNames", "lookup": true}]}, {"name": "Reason", "type": "enum", "module": "hw_metrics_mgmt_service", "values": {"0": "UNDEFINED_REASON", "1": "UNKNOWN_DEVICE", "2": "UNKNOWN_COMPONENT", "3": "INTERNAL_ERROR", "4": "INVALID_METRIC"}}, {"name": "GetMetricResponse", "type": "message", "module": "hw_metrics_mgmt_service", "fields": [{"name": "status", "is_choice": false, "repeated": false, "type": "Status", "lookup": true}, {"name": "reason", "is_choice": false, "repeated": false, "type": "Reason", "lookup": true}, {"name": "metric", "is_choice": false, "repeated": false, "type": "Metric", "lookup": true}]}, {"name": "EventIds", "type": "enum", "module": "hw_events_mgmt_service", "values": {"0": "EVENT_NAME_UNDEFINED", "100": "EVENT_TRANSCEIVER_PLUG_OUT", "101": "EVENT_TRANSCEIVER_PLUG_IN", "102": "EVENT_TRANSCEIVER_VOLTAGE_ABOVE_THRESHOLD", "103": "EVENT_TRANSCEIVER_VOLTAGE_BELOW_THRESHOLD", "104": "EVENT_TRANSCEIVER_TEMPERATURE_ABOVE_THRESHOLD", "105": "EVENT_TRANSCEIVER_TEMPERATURE_BELOW_THRESHOLD", "106": "EVENT_TRANSCEIVER_CURRENT_ABOVE_THRESHOLD", "107": "EVENT_TRANSCEIVER_CURRENT_BELOW_THRESHOLD", "108": "EVENT_TRANSCEIVER_RX_POWER_ABOVE_THRESHOLD", "109": "EVENT_TRANSCEIVER_RX_POWER_BELOW_THRESHOLD", "110": "EVENT_TRANSCEIVER_TX_POWER_ABOVE_THRESHOLD", "111": "EVENT_TRANSCEIVER_TX_POWER_BELOW_THRESHOLD", "112": "EVENT_TRANSCEIVER_FAILURE", "113": "EVENT_TRANSCEIVER_VOLTAGE_ABOVE_THRESHOLD_RECOVERED", "114": "EVENT_TRANSCEIVER_VOLTAGE_BELOW_THRESHOLD_RECOVERED", "115": "EVENT_TRANSCEIVER_TEMPERATURE_ABOVE_THRESHOLD_RECOVERED", "116": "EVENT_TRANSCEIVER_TEMPERATURE_BELOW_THRESHOLD_RECOVERED", "117": "EVENT_TRANSCEIVER_CURRENT_ABOVE_THRESHOLD_RECOVERED", "118": "EVENT_TRANSCEIVER_CURRENT_BELOW_THRESHOLD_RECOVERED", "119": "EVENT_TRANSCEIVER_RX_POWER_ABOVE_THRESHOLD_RECOVERED", "120": "EVENT_TRANSCEIVER_RX_POWER_BELOW_THRESHOLD_RECOVERED", "121": "EVENT_TRANSCEIVER_TX_POWER_ABOVE_THRESHOLD_RECOVERED", "122": "EVENT_TRANSCEIVER_TX_POWER_BELOW_THRESHOLD_RECOVERED", "123": "EVENT_TRANSCEIVER_FAILURE_RECOVERED", "200": "EVENT_PSU_PLUG_OUT", "201": "EVENT_PSU_PLUG_IN", "202": "EVENT_PSU_FAILURE", "203": "EVENT_PSU_FAILURE_RECOVERED", "300": "EVENT_FAN_FAILURE", "301": "EVENT_FAN_PLUG_OUT", "302": "EVENT_FAN_PLUG_IN", "303": "EVENT_FAN_FAILURE_RECOVERED", "400": "EVENT_CPU_TEMPERATURE_ABOVE_CRITICAL", "401": "EVENT_CPU_TEMPERATURE_ABOVE_FATAL", "402": "EVENT_CPU_TEMPERATURE_ABOVE_CRITICAL_RECOVERED", "403": "EVENT_CPU_TEMPERATURE_ABOVE_FATAL_RECOVERED", "500": "EVENT_HW_DEVICE_RESET", "501": "EVENT_HW_DEVICE_TEMPERATURE_ABOVE_CRITICAL", "502": "EVENT_HW_DEVICE_TEMPERATURE_ABOVE_FATAL", "503": "EVENT_HW_DEVICE_TEMPERATURE_ABOVE_CRITICAL_RECOVERED", "504": "EVENT_HW_DEVICE_TEMPERATURE_ABOVE_FATAL_RECOVERED"}}, {"name": "ValueType", "type": "message", "module": "hw_events_mgmt_service", "fields": [{"name": "val", "is_choice": true, "cases": [{"name": "int_val", "type": "int64", "lookup": false}, {"name": "uint_val", "type": "uint64", "lookup": false}, {"name": "float_val", "type": "float", "lookup": false}]}]}, {"name": "WaterMarks", "type": "message", "module": "hw_events_mgmt_service", "fields": [{"name": "high", "is_choice": false, "repeated": false, "type": "ValueType", "lookup": true}, {"name": "low", "is_choice": false, "repeated": false, "type": "ValueType", "lookup": true}]}, {"name": "Thresholds", "type": "message", "module": "hw_events_mgmt_service", "fields": [{"name": "threshold", "is_choice": true, "cases": [{"name": "upper", "type": "WaterMarks", "lookup": true}, {"name": "lower", "type": "WaterMarks", "lookup": true}]}]}, {"name": "ThresholdInformation", "type": "message", "module": "hw_events_mgmt_service", "fields": [{"name": "observed_value", "is_choice": false, "repeated": false, "type": "ValueType", "lookup": true}, {"name": "thresholds", "is_choice": false, "repeated": false, "type": "Thresholds", "lookup": true}]}, {"name": "EventCfg", "type": "message", "module": "hw_events_mgmt_service", "fields": [{"name": "event_id", "is_choice": false, "repeated": false, "type": "EventIds", "lookup": true}, {"name": "is_configured", "is_choice": false, "repeated": false, "type": "bool", "lookup": false}, {"name": "thresholds", "is_choice": false, "repeated": false, "type": "Thresholds", "lookup": true}]}, {"name": "EventsCfg", "type": "message", "module": "hw_events_mgmt_service", "fields": [{"name": "items", "is_choice": false, "repeated": true, "type": "EventCfg", "lookup": true}]}, {"name": "Reason", "type": "enum", "module": "hw_events_mgmt_service", "values": {"0": "UNDEFINED_REASON", "1": "UNKNOWN_DEVICE", "2": "INTERNAL_ERROR"}}, {"name": "ListEventsResponse", "type": "message", "module": "hw_events_mgmt_service", "fields": [{"name": "status", "is_choice": false, "repeated": false, "type": "Status", "lookup": true}, {"name": "reason", "is_choice": false, "repeated": false, "type": "Reason", "lookup": true}, {"name": "events", "is_choice": false, "repeated": false, "type": "EventsCfg", "lookup": true}]}, {"name": "EventsConfigurationRequest", "type": "message", "module": "hw_events_mgmt_service", "fields": [{"name": "device_uuid", "is_choice": false, "repeated": false, "type": "Uuid", "lookup": true}, {"name": "operation", "is_choice": true, "cases": [{"name": "changes", "type": "EventsCfg", "lookup": true}, {"name": "reset_to_default", "type": "bool", "lookup": false}]}]}, {"name": "Reason", "type": "enum", "module": "hw_events_mgmt_service", "values": {"0": "UNDEFINED_REASON", "1": "UNKNOWN_DEVICE", "2": "INTERNAL_ERROR", "3": "INVALID_CONFIG"}}, {"name": "EventsConfigurationResponse", "type": "message", "module": "hw_events_mgmt_service", "fields": [{"name": "status", "is_choice": false, "repeated": false, "type": "Status", "lookup": true}, {"name": "reason", "is_choice": false, "repeated": false, "type": "Reason", "lookup": true}]}, {"name": "EventMetaData", "type": "message", "module": "hw_events_mgmt_service", "fields": [{"name": "device_uuid", "is_choice": false, "repeated": false, "type": "Uuid", "lookup": true}, {"name": "component_uuid", "is_choice": false, "repeated": false, "type": "Uuid", "lookup": true}, {"name": "component_name", "is_choice": false, "repeated": false, "type": "string", "lookup": false}]}, {"name": "Event", "type": "message", "module": "hw_events_mgmt_service", "fields": [{"name": "event_metadata", "is_choice": false, "repeated": false, "type": "EventMetaData", "lookup": true}, {"name": "event_id", "is_choice": false, "repeated": false, "type": "EventIds", "lookup": true}, {"name": "raised_ts", "is_choice": false, "repeated": false, "type": "google.protobuf.Timestamp", "lookup": true}, {"name": "threshold_info", "is_choice": false, "repeated": false, "type": "ThresholdInformation", "lookup": true}, {"name": "add_info", "is_choice": false, "repeated": false, "type": "string", "lookup": false}]}, {"name": "ImageVersion", "type": "message", "module": "sw_image", "fields": [{"name": "image_name", "is_choice": false, "repeated": false, "type": "string", "lookup": false}, {"name": "version", "is_choice": false, "repeated": false, "type": "string", "lookup": false}]}, {"name": "ImageInformation", "type": "message", "module": "sw_image", "fields": [{"name": "image", "is_choice": false, "repeated": false, "type": "ImageVersion", "lookup": true}, {"name": "image_install_script", "is_choice": false, "repeated": false, "type": "string", "lookup": false}, {"name": "image_url", "is_choice": false, "repeated": false, "type": "string", "lookup": false}, {"name": "sha256sum", "is_choice": false, "repeated": false, "type": "string", "lookup": false}]}, {"name": "ImageState", "type": "enum", "module": "sw_image", "values": {"0": "UNDEFINED_STATE", "1": "COPYING_IMAGE", "2": "INSTALLING_IMAGE", "3": "COMMITTING_IMAGE", "4": "REBOOTING_DEVICE", "5": "UPGRADE_COMPLETE", "6": "UPGRADE_FAILED", "7": "ACTIVATION_COMPLETE", "8": "ACTIVATION_FAILED"}}, {"name": "Reason", "type": "enum", "module": "sw_image", "values": {"0": "UNDEFINED_REASON", "1": "ERROR_IN_REQUEST", "2": "INTERNAL_ERROR", "3": "DEVICE_IN_WRONG_STATE", "4": "INVALID_IMAGE", "5": "WRONG_IMAGE_CHECKSUM", "6": "OPERATION_ALREADY_IN_PROGRESS", "7": "UNKNOWN_DEVICE", "8": "DEVICE_NOT_REACHABLE"}}, {"name": "ImageStatus", "type": "message", "module": "sw_image", "fields": [{"name": "status", "is_choice": false, "repeated": false, "type": "Status", "lookup": true}, {"name": "reason", "is_choice": false, "repeated": false, "type": "Reason", "lookup": true}, {"name": "state", "is_choice": false, "repeated": false, "type": "ImageState", "lookup": true}, {"name": "description", "is_choice": false, "repeated": false, "type": "string", "lookup": false}]}, {"name": "PhysicalInventoryRequest", "type": "message", "module": "hw_management_service", "fields": [{"name": "device_uuid", "is_choice": false, "repeated": false, "type": "Uuid", "lookup": true}]}, {"name": "Reason", "type": "enum", "module": "hw_management_service", "values": {"0": "UNDEFINED_REASON", "1": "UNKNOWN_DEVICE", "2": "INTERNAL_ERROR"}}, {"name": "PhysicalInventoryResponse", "type": "message", "module": "hw_management_service", "fields": [{"name": "status", "is_choice": false, "repeated": false, "type": "Status", "lookup": true}, {"name": "reason", "is_choice": false, "repeated": false, "type": "Reason", "lookup": true}, {"name": "inventory", "is_choice": false, "repeated": false, "type": "Hardware", "lookup": true}]}, {"name": "HWComponentInfoGetRequest", "type": "message", "module": "hw_management_service", "fields": [{"name": "device_uuid", "is_choice": false, "repeated": false, "type": "Uuid", "lookup": true}, {"name": "component_uuid", "is_choice": false, "repeated": false, "type": "Uuid", "lookup": true}, {"name": "component_name", "is_choice": false, "repeated": false, "type": "string", "lookup": false}]}, {"name": "Reason", "type": "enum", "module": "hw_management_service", "values": {"0": "UNDEFINED_REASON", "1": "UNKNOWN_DEVICE", "2": "UNKNOWN_COMPONENT", "3": "INTERNAL_ERROR"}}, {"name": "HWComponentInfoGetResponse", "type": "message", "module": "hw_management_service", "fields": [{"name": "status", "is_choice": false, "repeated": false, "type": "Status", "lookup": true}, {"name": "reason", "is_choice": false, "repeated": false, "type": "Reason", "lookup": true}, {"name": "component", "is_choice": false, "repeated": false, "type": "Component", "lookup": true}]}, {"name": "HWComponentInfoSetRequest", "type": "message", "module": "hw_management_service", "fields": [{"name": "device_uuid", "is_choice": false, "repeated": false, "type": "Uuid", "lookup": true}, {"name": "component_uuid", "is_choice": false, "repeated": false, "type": "Uuid", "lookup": true}, {"name": "component_name", "is_choice": false, "repeated": false, "type": "string", "lookup": false}, {"name": "changes", "is_choice": false, "repeated": false, "type": "ModifiableComponent", "lookup": true}]}, {"name": "Reason", "type": "enum", "module": "hw_management_service", "values": {"0": "UNDEFINED_REASON", "1": "UNKNOWN_DEVICE", "2": "UNKNOWN_COMPONENT", "3": "INVALID_PARAMS", "4": "INTERNAL_ERROR"}}, {"name": "HWComponentInfoSetResponse", "type": "message", "module": "hw_management_service", "fields": [{"name": "status", "is_choice": false, "repeated": false, "type": "Status", "lookup": true}, {"name": "reason", "is_choice": false, "repeated": false, "type": "Reason", "lookup": true}]}, {"name": "Reason", "type": "enum", "module": "hw_management_service", "values": {"0": "UNDEFINED_REASON", "1": "DEVICE_ALREADY_MANAGED", "2": "OPERATION_ALREADY_IN_PROGRESS", "3": "INVALID_PARAMS", "4": "INTERNAL_ERROR"}}, {"name": "StartManagingDeviceResponse", "type": "message", "module": "hw_management_service", "fields": [{"name": "status", "is_choice": false, "repeated": false, "type": "Status", "lookup": true}, {"name": "reason", "is_choice": false, "repeated": false, "type": "Reason", "lookup": true}, {"name": "device_uuid", "is_choice": false, "repeated": false, "type": "Uuid", "lookup": true}]}, {"name": "StopManagingDeviceRequest", "type": "message", "module": "hw_management_service", "fields": [{"name": "name", "is_choice": false, "repeated": false, "type": "string", "lookup": false}]}, {"name": "Reason", "type": "enum", "module": "hw_management_service", "values": {"0": "UNDEFINED_REASON", "1": "UNKNOWN_DEVICE"}}, {"name": "StopManagingDeviceResponse", "type": "message", "module": "hw_management_service", "fields": [{"name": "status", "is_choice": false, "repeated": false, "type": "Status", "lookup": true}, {"name": "reason", "is_choice": false, "repeated": false, "type": "Reason", "lookup": true}]}, {"name": "ManagedDevicesResponse", "type": "message", "module": "hw_management_service", "fields": [{"name": "devices", "is_choice": false, "repeated": true, "type": "ModifiableComponent", "lookup": true}]}, {"name": "SetLoggingEndpointRequest", "type": "message", "module": "hw_management_service", "fields": [{"name": "device_uuid", "is_choice": false, "repeated": false, "type": "Uuid", "lookup": true}, {"name": "logging_endpoint", "is_choice": false, "repeated": false, "type": "string", "lookup": false}, {"name": "logging_protocol", "is_choice": false, "repeated": false, "type": "string", "lookup": false}]}, {"name": "Reason", "type": "enum", "module": "hw_management_service", "values": {"0": "UNDEFINED_REASON", "1": "UNKNOWN_DEVICE", "2": "INTERNAL_ERROR", "3": "LOGGING_ENDPOINT_ERROR", "4": "LOGGING_ENDPOINT_PROTOCOL_ERROR", "5": "MSGBUS_ENDPOINT_ERROR"}}, {"name": "SetRemoteEndpointResponse", "type": "message", "module": "hw_management_service", "fields": [{"name": "status", "is_choice": false, "repeated": false, "type": "Status", "lookup": true}, {"name": "reason", "is_choice": false, "repeated": false, "type": "Reason", "lookup": true}]}, {"name": "Reason", "type": "enum", "module": "hw_management_service", "values": {"0": "UNDEFINED_REASON", "1": "UNKNOWN_DEVICE", "2": "INTERNAL_ERROR"}}, {"name": "GetLoggingEndpointResponse", "type": "message", "module": "hw_management_service", "fields": [{"name": "status", "is_choice": false, "repeated": false, "type": "Status", "lookup": true}, {"name": "reason", "is_choice": false, "repeated": false, "type": "Reason", "lookup": true}, {"name": "logging_endpoint", "is_choice": false, "repeated": false, "type": "string", "lookup": false}, {"name": "logging_protocol", "is_choice": false, "repeated": false, "type": "string", "lookup": false}]}, {"name": "SetMsgBusEndpointRequest", "type": "message", "module": "hw_management_service", "fields": [{"name": "msgbus_endpoint", "is_choice": false, "repeated": false, "type": "string", "lookup": false}]}, {"name": "Reason", "type": "enum", "module": "hw_management_service", "values": {"0": "UNDEFINED_REASON", "1": "INTERNAL_ERROR"}}, {"name": "GetMsgBusEndpointResponse", "type": "message", "module": "hw_management_service", "fields": [{"name": "status", "is_choice": false, "repeated": false, "type": "Status", "lookup": true}, {"name": "reason", "is_choice": false, "repeated": false, "type": "Reason", "lookup": true}, {"name": "msgbus_endpoint", "is_choice": false, "repeated": false, "type": "string", "lookup": false}]}, {"name": "EntitiesLogLevel", "type": "message", "module": "hw_management_service", "fields": [{"name": "logLevel", "is_choice": false, "repeated": false, "type": "LogLevel", "lookup": true}, {"name": "entities", "is_choice": false, "repeated": true, "type": "string", "lookup": false}]}, {"name": "SetLogLevelRequest", "type": "message", "module": "hw_management_service", "fields": [{"name": "device_uuid", "is_choice": false, "repeated": false, "type": "Uuid", "lookup": true}, {"name": "loglevels", "is_choice": false, "repeated": true, "type": "EntitiesLogLevel", "lookup": true}]}, {"name": "Reason", "type": "enum", "module": "hw_management_service", "values": {"0": "UNDEFINED_REASON", "1": "UNKNOWN_DEVICE", "2": "INTERNAL_ERROR", "3": "UNKNOWN_LOG_ENTITY"}}, {"name": "SetLogLevelResponse", "type": "message", "module": "hw_management_service", "fields": [{"name": "device_uuid", "is_choice": false, "repeated": false, "type": "Uuid", "lookup": true}, {"name": "status", "is_choice": false, "repeated": false, "type": "Status", "lookup": true}, {"name": "reason", "is_choice": false, "repeated": false, "type": "Reason", "lookup": true}]}, {"name": "GetLogLevelRequest", "type": "message", "module": "hw_management_service", "fields": [{"name": "device_uuid", "is_choice": false, "repeated": false, "type": "Uuid", "lookup": true}, {"name": "entities", "is_choice": false, "repeated": true, "type": "string", "lookup": false}]}, {"name": "Reason", "type": "enum", "module": "hw_management_service", "values": {"0": "UNDEFINED_REASON", "1": "UNKNOWN_DEVICE", "2": "INTERNAL_ERROR", "3": "UNKNOWN_LOG_ENTITY"}}, {"name": "GetLogLevelResponse", "type": "message", "module": "hw_management_service", "fields": [{"name": "device_uuid", "is_choice": false, "repeated": false, "type": "Uuid", "lookup": true}, {"name": "logLevels", "is_choice": false, "repeated": true, "type": "EntitiesLogLevel", "lookup": true}, {"name": "status", "is_choice": false, "repeated": false, "type": "Status", "lookup": true}, {"name": "reason", "is_choice": false, "repeated": false, "type": "Reason", "lookup": true}]}, {"name": "GetLoggableEntitiesRequest", "type": "message", "module": "hw_management_service", "fields": [{"name": "device_uuid", "is_choice": false, "repeated": false, "type": "Uuid", "lookup": true}]}, {"name": "SoftwareVersionInformation", "type": "message", "module": "sw_management_service", "fields": [{"name": "active_versions", "is_choice": false, "repeated": true, "type": "ImageVersion", "lookup": true}, {"name": "standby_versions", "is_choice": false, "repeated": true, "type": "ImageVersion", "lookup": true}]}, {"name": "Reason", "type": "enum", "module": "sw_management_service", "values": {"0": "UNDEFINED_REASON", "1": "UNKNOWN_DEVICE", "2": "INTERNAL_ERROR"}}, {"name": "GetSoftwareVersionInformationResponse", "type": "message", "module": "sw_management_service", "fields": [{"name": "status", "is_choice": false, "repeated": false, "type": "Status", "lookup": true}, {"name": "reason", "is_choice": false, "repeated": false, "type": "Reason", "lookup": true}, {"name": "info", "is_choice": false, "repeated": false, "type": "SoftwareVersionInformation", "lookup": true}]}, {"name": "DownloadImageRequest", "type": "message", "module": "sw_management_service", "fields": [{"name": "device_uuid", "is_choice": false, "repeated": false, "type": "Uuid", "lookup": true}, {"name": "image_info", "is_choice": false, "repeated": false, "type": "ImageInformation", "lookup": true}]}, {"name": "ConfigRequest", "type": "message", "module": "sw_management_service", "fields": [{"name": "device_uuid", "is_choice": false, "repeated": false, "type": "Uuid", "lookup": true}, {"name": "config_url", "is_choice": false, "repeated": false, "type": "string", "lookup": false}]}, {"name": "Reason", "type": "enum", "module": "sw_management_service", "values": {"0": "UNDEFINED_REASON", "1": "UNKNOWN_DEVICE", "2": "INTERNAL_ERROR", "3": "ERROR_FETCHING_CONFIG", "4": "INVALID_CONFIG", "5": "OPERATION_ALREADY_IN_PROGRESS"}}, {"name": "ConfigResponse", "type": "message", "module": "sw_management_service", "fields": [{"name": "status", "is_choice": false, "repeated": false, "type": "Status", "lookup": true}, {"name": "reason", "is_choice": false, "repeated": false, "type": "Reason", "lookup": true}]}, {"name": "StartupConfigInfoRequest", "type": "message", "module": "sw_management_service", "fields": [{"name": "device_uuid", "is_choice": false, "repeated": false, "type": "Uuid", "lookup": true}]}, {"name": "Reason", "type": "enum", "module": "sw_management_service", "values": {"0": "UNDEFINED_REASON", "1": "UNKNOWN_DEVICE", "2": "INTERNAL_ERROR"}}, {"name": "StartupConfigInfoResponse", "type": "message", "module": "sw_management_service", "fields": [{"name": "status", "is_choice": false, "repeated": false, "type": "Status", "lookup": true}, {"name": "reason", "is_choice": false, "repeated": false, "type": "Reason", "lookup": true}, {"name": "config_url", "is_choice": false, "repeated": false, "type": "string", "lookup": false}, {"name": "version", "is_choice": false, "repeated": false, "type": "string", "lookup": false}]}], "services": [{"name": "NativeMetricsManagementService", "module": "hw_metrics_mgmt_service", "rpcs": [{"name": "ListMetrics", "request": {"is_stream": false, "type": "HardwareID", "lookup": true}, "response": {"is_stream": false, "type": "ListMetricsResponse", "lookup": true}}, {"name": "UpdateMetricsConfiguration", "request": {"is_stream": false, "type": "MetricsConfigurationRequest", "lookup": true}, "response": {"is_stream": false, "type": "MetricsConfigurationResponse", "lookup": true}}, {"name": "GetMetric", "request": {"is_stream": false, "type": "GetMetricRequest", "lookup": true}, "response": {"is_stream": false, "type": "GetMetricResponse", "lookup": true}}]}, {"name": "NativeEventsManagementService", "module": "hw_events_mgmt_service", "rpcs": [{"name": "ListEvents", "request": {"is_stream": false, "type": "HardwareID", "lookup": true}, "response": {"is_stream": false, "type": "ListEventsResponse", "lookup": true}}, {"name": "UpdateEventsConfiguration", "request": {"is_stream": false, "type": "EventsConfigurationRequest", "lookup": true}, "response": {"is_stream": false, "type": "EventsConfigurationResponse", "lookup": true}}]}, {"name": "NativeHWManagementService", "module": "hw_management_service", "rpcs": [{"name": "StartManagingDevice", "request": {"is_stream": false, "type": "ModifiableComponent", "lookup": true}, "response": {"is_stream": true, "type": "StartManagingDeviceResponse", "lookup": true}}, {"name": "StopManagingDevice", "request": {"is_stream": false, "type": "StopManagingDeviceRequest", "lookup": true}, "response": {"is_stream": false, "type": "StopManagingDeviceResponse", "lookup": true}}, {"name": "GetManagedDevices", "request": {"is_stream": false, "type": "google.protobuf.Empty", "lookup": false}, "response": {"is_stream": false, "type": "ManagedDevicesResponse", "lookup": true}}, {"name": "GetPhysicalInventory", "request": {"is_stream": false, "type": "PhysicalInventoryRequest", "lookup": true}, "response": {"is_stream": true, "type": "PhysicalInventoryResponse", "lookup": true}}, {"name": "GetHWComponentInfo", "request": {"is_stream": false, "type": "HWComponentInfoGetRequest", "lookup": true}, "response": {"is_stream": true, "type": "HWComponentInfoGetResponse", "lookup": true}}, {"name": "SetHWComponentInfo", "request": {"is_stream": false, "type": "HWComponentInfoSetRequest", "lookup": true}, "response": {"is_stream": false, "type": "HWComponentInfoSetResponse", "lookup": true}}, {"name": "SetLoggingEndpoint", "request": {"is_stream": false, "type": "SetLoggingEndpointRequest", "lookup": true}, "response": {"is_stream": false, "type": "SetRemoteEndpointResponse", "lookup": true}}, {"name": "GetLoggingEndpoint", "request": {"is_stream": false, "type": "HardwareID", "lookup": true}, "response": {"is_stream": false, "type": "GetLoggingEndpointResponse", "lookup": true}}, {"name": "SetMsgBusEndpoint", "request": {"is_stream": false, "type": "SetMsgBusEndpointRequest", "lookup": true}, "response": {"is_stream": false, "type": "SetRemoteEndpointResponse", "lookup": true}}, {"name": "GetMsgBusEndpoint", "request": {"is_stream": false, "type": "google.protobuf.Empty", "lookup": false}, "response": {"is_stream": false, "type": "GetMsgBusEndpointResponse", "lookup": true}}, {"name": "GetLoggableEntities", "request": {"is_stream": false, "type": "GetLoggableEntitiesRequest", "lookup": true}, "response": {"is_stream": false, "type": "GetLogLevelResponse", "lookup": true}}, {"name": "SetLogLevel", "request": {"is_stream": false, "type": "SetLogLevelRequest", "lookup": true}, "response": {"is_stream": false, "type": "SetLogLevelResponse", "lookup": true}}, {"name": "GetLogLevel", "request": {"is_stream": false, "type": "GetLogLevelRequest", "lookup": true}, "response": {"is_stream": false, "type": "GetLogLevelResponse", "lookup": true}}]}, {"name": "NativeSoftwareManagementService", "module": "sw_management_service", "rpcs": [{"name": "GetSoftwareVersion", "request": {"is_stream": false, "type": "HardwareID", "lookup": true}, "response": {"is_stream": false, "type": "GetSoftwareVersionInformationResponse", "lookup": true}}, {"name": "DownloadImage", "request": {"is_stream": false, "type": "DownloadImageRequest", "lookup": true}, "response": {"is_stream": true, "type": "ImageStatus", "lookup": true}}, {"name": "ActivateImage", "request": {"is_stream": false, "type": "HardwareID", "lookup": true}, "response": {"is_stream": true, "type": "ImageStatus", "lookup": true}}, {"name": "RevertToStandbyImage", "request": {"is_stream": false, "type": "HardwareID", "lookup": true}, "response": {"is_stream": true, "type": "ImageStatus", "lookup": true}}, {"name": "UpdateStartupConfiguration", "request": {"is_stream": false, "type": "ConfigRequest", "lookup": true}, "response": {"is_stream": true, "type": "ConfigResponse", "lookup": true}}, {"name": "GetStartupConfigurationInfo", "request": {"is_stream": false, "type": "StartupConfigInfoRequest", "lookup": true}, "response": {"is_stream": false, "type": "StartupConfigInfoResponse", "lookup": true}}]}]}
\ No newline at end of file
diff --git a/grpc_robot/services/dmi/dmi_0_9_8/sw_management_service.py b/grpc_robot/services/dmi/dmi_0_9_8/sw_management_service.py
new file mode 100644
index 0000000..1807c0f
--- /dev/null
+++ b/grpc_robot/services/dmi/dmi_0_9_8/sw_management_service.py
@@ -0,0 +1,62 @@
+# Copyright 2020-present Open Networking Foundation
+# Original copyright 2020-present ADTRAN, Inc.
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+from robot.api.deco import keyword
+from grpc_robot.services.service import is_connected
+
+from grpc_robot.services.service import Service
+from dmi import sw_management_service_pb2_grpc, sw_management_service_pb2, hw_pb2
+
+
+class NativeSoftwareManagementService(Service):
+
+ prefix = 'sw_management_service_'
+
+ def __init__(self, ctx):
+ super().__init__(ctx=ctx, stub=sw_management_service_pb2_grpc.NativeSoftwareManagementServiceStub)
+
+ # rpc GetSoftwareVersion(HardwareID) returns(GetSoftwareVersionInformationResponse);
+ @keyword
+ @is_connected
+ def sw_management_service_get_software_version(self, param_dict, **kwargs):
+ return self._grpc_helper(self.stub.GetSoftwareVersion, hw_pb2.HardwareID, param_dict, **kwargs)
+
+ # rpc DownloadImage(DownloadImageRequest) returns(stream ImageStatus);
+ @keyword
+ @is_connected
+ def sw_management_service_download_image(self, param_dict, **kwargs):
+ return self._grpc_helper(self.stub.DownloadImage, sw_management_service_pb2.DownloadImageRequest, param_dict, **kwargs)
+
+ # rpc ActivateImage(HardwareID) returns(stream ImageStatus);
+ @keyword
+ @is_connected
+ def sw_management_service_activate_image(self, param_dict, **kwargs):
+ return self._grpc_helper(self.stub.ActivateImage, hw_pb2.HardwareID, param_dict, **kwargs)
+
+ # rpc RevertToStandbyImage(HardwareID) returns(stream ImageStatus);
+ @keyword
+ @is_connected
+ def sw_management_service_revert_to_standby_image(self, param_dict, **kwargs):
+ return self._grpc_helper(self.stub.RevertToStandbyImage, hw_pb2.HardwareID, param_dict, **kwargs)
+
+ # rpc UpdateStartupConfiguration(ConfigRequest) returns(stream ConfigResponse);
+ @keyword
+ @is_connected
+ def sw_management_service_update_startup_configuration(self, param_dict, **kwargs):
+ return self._grpc_helper(self.stub.UpdateStartupConfiguration, sw_management_service_pb2.ConfigRequest, param_dict, **kwargs)
+
+ # rpc GetStartupConfigurationInfo(StartupConfigInfoRequest) returns(StartupConfigInfoResponse);
+ @keyword
+ @is_connected
+ def sw_management_service_get_startup_configuration_info(self, param_dict, **kwargs):
+ return self._grpc_helper(self.stub.GetStartupConfigurationInfo, sw_management_service_pb2.StartupConfigInfoRequest, param_dict, **kwargs)
diff --git a/grpc_robot/services/dmi/dmi_0_9_9/__init__.py b/grpc_robot/services/dmi/dmi_0_9_9/__init__.py
new file mode 100644
index 0000000..1c90929
--- /dev/null
+++ b/grpc_robot/services/dmi/dmi_0_9_9/__init__.py
@@ -0,0 +1,14 @@
+# Copyright 2020-present Open Networking Foundation
+# Original copyright 2020-present ADTRAN, Inc.
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+from ..dmi_0_9_8 import *
diff --git a/grpc_robot/services/dmi/dmi_0_9_9/dmi.json b/grpc_robot/services/dmi/dmi_0_9_9/dmi.json
new file mode 100644
index 0000000..4959cf0
--- /dev/null
+++ b/grpc_robot/services/dmi/dmi_0_9_9/dmi.json
@@ -0,0 +1 @@
+{"modules": [{"name": "commons", "imports": []}, {"name": "hw", "imports": ["timestamp"]}, {"name": "hw_metrics_mgmt_service", "imports": ["commons", "hw"]}, {"name": "hw_events_mgmt_service", "imports": ["commons", "hw", "timestamp"]}, {"name": "sw_image", "imports": ["commons"]}, {"name": "hw_management_service", "imports": ["commons", "hw", "empty"]}, {"name": "sw_management_service", "imports": ["commons", "hw", "sw_image"]}], "data_types": [{"name": "Status", "type": "enum", "module": "commons", "values": {"0": "UNDEFINED_STATUS", "1": "OK_STATUS", "2": "ERROR_STATUS"}}, {"name": "LogLevel", "type": "enum", "module": "commons", "values": {"0": "TRACE", "1": "DEBUG", "2": "INFO", "3": "WARN", "4": "ERROR"}}, {"name": "Uuid", "type": "message", "module": "hw", "fields": [{"name": "uuid", "is_choice": false, "repeated": false, "type": "string", "lookup": false}]}, {"name": "HardwareID", "type": "message", "module": "hw", "fields": [{"name": "uuid", "is_choice": false, "repeated": false, "type": "Uuid", "lookup": true}]}, {"name": "Uri", "type": "message", "module": "hw", "fields": [{"name": "uri", "is_choice": false, "repeated": false, "type": "string", "lookup": false}]}, {"name": "ComponentType", "type": "enum", "module": "hw", "values": {"0": "COMPONENT_TYPE_UNDEFINED", "1": "COMPONENT_TYPE_UNKNOWN", "2": "COMPONENT_TYPE_CHASSIS", "3": "COMPONENT_TYPE_BACKPLANE", "4": "COMPONENT_TYPE_CONTAINER", "5": "COMPONENT_TYPE_POWER_SUPPLY", "6": "COMPONENT_TYPE_FAN", "7": "COMPONENT_TYPE_SENSOR", "8": "COMPONENT_TYPE_MODULE", "9": "COMPONENT_TYPE_PORT", "10": "COMPONENT_TYPE_CPU", "11": "COMPONENT_TYPE_BATTERY", "12": "COMPONENT_TYPE_STORAGE", "13": "COMPONENT_TYPE_MEMORY", "14": "COMPONENT_TYPE_TRANSCEIVER", "15": "COMPONENT_TYPE_GPON_TRANSCEIVER", "16": "COMPONENT_TYPE_XGS_PON_TRANSCEIVER"}}, {"name": "ComponentAdminState", "type": "enum", "module": "hw", "values": {"0": "COMP_ADMIN_STATE_UNDEFINED", "1": "COMP_ADMIN_STATE_UNKNOWN", "2": "COMP_ADMIN_STATE_LOCKED", "3": "COMP_ADMIN_STATE_SHUTTING_DOWN", "4": "COMP_ADMIN_STATE_UNLOCKED"}}, {"name": "ComponentOperState", "type": "enum", "module": "hw", "values": {"0": "COMP_OPER_STATE_UNDEFINED", "1": "COMP_OPER_STATE_UNKNOWN", "2": "COMP_OPER_STATE_DISABLED", "3": "COMP_OPER_STATE_ENABLED", "4": "COMP_OPER_STATE_TESTING"}}, {"name": "ComponentUsageState", "type": "enum", "module": "hw", "values": {"0": "COMP_USAGE_STATE_UNDEFINED", "1": "COMP_USAGE_STATE_UNKNOWN", "2": "COMP_USAGE_STATE_IDLE", "3": "COMP_USAGE_STATE_ACTIVE", "4": "COMP_USAGE_STATE_BUSY"}}, {"name": "ComponentAlarmState", "type": "enum", "module": "hw", "values": {"0": "COMP_ALARM_STATE_UNDEFINED", "1": "COMP_ALARM_STATE_UNKNOWN", "2": "COMP_ALARM_STATE_UNDER_REPAIR", "3": "COMP_ALARM_STATE_CRITICAL", "4": "COMP_ALARM_STATE_MAJOR", "5": "COMP_ALARM_STATE_MINOR", "6": "COMP_ALARM_STATE_WARNING", "7": "COMP_ALARM_STATE_INDETERMINATE"}}, {"name": "ComponentStandbyState", "type": "enum", "module": "hw", "values": {"0": "COMP_STANDBY_STATE_UNDEFINED", "1": "COMP_STANDBY_STATE_UNKNOWN", "2": "COMP_STANDBY_STATE_HOT", "3": "COMP_STANDBY_STATE_COLD", "4": "COMP_STANDBY_STATE_PROVIDING_SERVICE"}}, {"name": "ComponentState", "type": "message", "module": "hw", "fields": [{"name": "state_last_changed", "is_choice": false, "repeated": false, "type": "google.protobuf.Timestamp", "lookup": true}, {"name": "admin_state", "is_choice": false, "repeated": false, "type": "ComponentAdminState", "lookup": true}, {"name": "oper_state", "is_choice": false, "repeated": false, "type": "ComponentOperState", "lookup": true}, {"name": "usage_state", "is_choice": false, "repeated": false, "type": "ComponentUsageState", "lookup": true}, {"name": "alarm_state", "is_choice": false, "repeated": false, "type": "ComponentAlarmState", "lookup": true}, {"name": "standby_state", "is_choice": false, "repeated": false, "type": "ComponentStandbyState", "lookup": true}]}, {"name": "SensorValueType", "type": "enum", "module": "hw", "values": {"0": "SENSOR_VALUE_TYPE_UNDEFINED", "1": "SENSOR_VALUE_TYPE_OTHER", "2": "SENSOR_VALUE_TYPE_UNKNOWN", "3": "SENSOR_VALUE_TYPE_VOLTS_AC", "4": "SENSOR_VALUE_TYPE_VOLTS_DC", "5": "SENSOR_VALUE_TYPE_AMPERES", "6": "SENSOR_VALUE_TYPE_WATTS", "7": "SENSOR_VALUE_TYPE_HERTZ", "8": "SENSOR_VALUE_TYPE_CELSIUS", "9": "SENSOR_VALUE_TYPE_PERCENT_RH", "10": "SENSOR_VALUE_TYPE_RPM", "11": "SENSOR_VALUE_TYPE_CMM", "12": "SENSOR_VALUE_TYPE_TRUTH_VALUE"}}, {"name": "SensorValueScale", "type": "enum", "module": "hw", "values": {"0": "SENSOR_VALUE_SCALE_UNDEFINED", "1": "SENSOR_VALUE_SCALE_YOCTO", "2": "SENSOR_VALUE_SCALE_ZEPTO", "3": "SENSOR_VALUE_SCALE_ATTO", "4": "SENSOR_VALUE_SCALE_FEMTO", "5": "SENSOR_VALUE_SCALE_PICO", "6": "SENSOR_VALUE_SCALE_NANO", "7": "SENSOR_VALUE_SCALE_MICRO", "8": "SENSOR_VALUE_SCALE_MILLI", "9": "SENSOR_VALUE_SCALE_UNITS", "10": "SENSOR_VALUE_SCALE_KILO", "11": "SENSOR_VALUE_SCALE_MEGA", "12": "SENSOR_VALUE_SCALE_GIGA", "13": "SENSOR_VALUE_SCALE_TERA", "14": "SENSOR_VALUE_SCALE_PETA", "15": "SENSOR_VALUE_SCALE_EXA", "16": "SENSOR_VALUE_SCALE_ZETTA", "17": "SENSOR_VALUE_SCALE_YOTTA"}}, {"name": "SensorStatus", "type": "enum", "module": "hw", "values": {"0": "SENSOR_STATUS_UNDEFINED", "1": "SENSOR_STATUS_OK", "2": "SENSOR_STATUS_UNAVAILABLE", "3": "SENSOR_STATUS_NONOPERATIONAL"}}, {"name": "ComponentSensorData", "type": "message", "module": "hw", "fields": [{"name": "value", "is_choice": false, "repeated": false, "type": "int32", "lookup": false}, {"name": "type", "is_choice": false, "repeated": false, "type": "SensorValueType", "lookup": true}, {"name": "scale", "is_choice": false, "repeated": false, "type": "SensorValueScale", "lookup": true}, {"name": "precision", "is_choice": false, "repeated": false, "type": "int32", "lookup": false}, {"name": "status", "is_choice": false, "repeated": false, "type": "SensorStatus", "lookup": true}, {"name": "units_display", "is_choice": false, "repeated": false, "type": "string", "lookup": false}, {"name": "timestamp", "is_choice": false, "repeated": false, "type": "google.protobuf.Timestamp", "lookup": true}, {"name": "value_update_rate", "is_choice": false, "repeated": false, "type": "uint32", "lookup": false}, {"name": "data_type", "is_choice": false, "repeated": false, "type": "string", "lookup": false}]}, {"name": "Component", "type": "message", "module": "hw", "fields": [{"name": "name", "is_choice": false, "repeated": false, "type": "string", "lookup": false}, {"name": "class", "is_choice": false, "repeated": false, "type": "ComponentType", "lookup": true}, {"name": "description", "is_choice": false, "repeated": false, "type": "string", "lookup": false}, {"name": "parent", "is_choice": false, "repeated": false, "type": "string", "lookup": false}, {"name": "parent_rel_pos", "is_choice": false, "repeated": false, "type": "int32", "lookup": false}, {"name": "children", "is_choice": false, "repeated": true, "type": "Component", "lookup": true}, {"name": "hardware_rev", "is_choice": false, "repeated": false, "type": "string", "lookup": false}, {"name": "firmware_rev", "is_choice": false, "repeated": false, "type": "string", "lookup": false}, {"name": "software_rev", "is_choice": false, "repeated": false, "type": "string", "lookup": false}, {"name": "serial_num", "is_choice": false, "repeated": false, "type": "string", "lookup": false}, {"name": "mfg_name", "is_choice": false, "repeated": false, "type": "string", "lookup": false}, {"name": "model_name", "is_choice": false, "repeated": false, "type": "string", "lookup": false}, {"name": "alias", "is_choice": false, "repeated": false, "type": "string", "lookup": false}, {"name": "asset_id", "is_choice": false, "repeated": false, "type": "string", "lookup": false}, {"name": "is_fru", "is_choice": false, "repeated": false, "type": "bool", "lookup": false}, {"name": "mfg_date", "is_choice": false, "repeated": false, "type": "google.protobuf.Timestamp", "lookup": true}, {"name": "uri", "is_choice": false, "repeated": false, "type": "Uri", "lookup": true}, {"name": "uuid", "is_choice": false, "repeated": false, "type": "Uuid", "lookup": true}, {"name": "state", "is_choice": false, "repeated": false, "type": "ComponentState", "lookup": true}, {"name": "sensor_data", "is_choice": false, "repeated": true, "type": "ComponentSensorData", "lookup": true}]}, {"name": "Hardware", "type": "message", "module": "hw", "fields": [{"name": "last_change", "is_choice": false, "repeated": false, "type": "google.protobuf.Timestamp", "lookup": true}, {"name": "root", "is_choice": false, "repeated": false, "type": "Component", "lookup": true}]}, {"name": "ModifiableComponent", "type": "message", "module": "hw", "fields": [{"name": "name", "is_choice": false, "repeated": false, "type": "string", "lookup": false}, {"name": "class", "is_choice": false, "repeated": false, "type": "ComponentType", "lookup": true}, {"name": "parent", "is_choice": false, "repeated": false, "type": "Component", "lookup": true}, {"name": "parent_rel_pos", "is_choice": false, "repeated": false, "type": "int32", "lookup": false}, {"name": "alias", "is_choice": false, "repeated": false, "type": "string", "lookup": false}, {"name": "asset_id", "is_choice": false, "repeated": false, "type": "string", "lookup": false}, {"name": "uri", "is_choice": false, "repeated": false, "type": "Uri", "lookup": true}, {"name": "admin_state", "is_choice": false, "repeated": false, "type": "ComponentAdminState", "lookup": true}]}, {"name": "MetricNames", "type": "enum", "module": "hw_metrics_mgmt_service", "values": {"0": "METRIC_NAME_UNDEFINED", "1": "METRIC_FAN_SPEED", "100": "METRIC_CPU_TEMP", "101": "METRIC_CPU_USAGE_PERCENTAGE", "200": "METRIC_TRANSCEIVER_TEMP", "201": "METRIC_TRANSCEIVER_VOLTAGE", "202": "METRIC_TRANSCEIVER_BIAS", "203": "METRIC_TRANSCEIVER_RX_POWER", "204": "METRIC_TRANSCEIVER_TX_POWER", "205": "METRIC_TRANSCEIVER_WAVELENGTH", "300": "METRIC_DISK_TEMP", "301": "METRIC_DISK_CAPACITY", "302": "METRIC_DISK_USAGE", "303": "METRIC_DISK_USAGE_PERCENTAGE", "304": "METRIC_DISK_READ_WRITE_PERCENTAGE", "305": "METRIC_DISK_FAULTY_CELLS_PERCENTAGE", "400": "METRIC_RAM_TEMP", "401": "METRIC_RAM_CAPACITY", "402": "METRIC_RAM_USAGE", "403": "METRIC_RAM_USAGE_PERCENTAGE", "500": "METRIC_POWER_MAX", "501": "METRIC_POWER_USAGE", "502": "METRIC_POWER_USAGE_PERCENTAGE", "600": "METRIC_INNER_SURROUNDING_TEMP"}}, {"name": "MetricConfig", "type": "message", "module": "hw_metrics_mgmt_service", "fields": [{"name": "metric_id", "is_choice": false, "repeated": false, "type": "MetricNames", "lookup": true}, {"name": "is_configured", "is_choice": false, "repeated": false, "type": "bool", "lookup": false}, {"name": "poll_interval", "is_choice": false, "repeated": false, "type": "uint32", "lookup": false}]}, {"name": "MetricsConfig", "type": "message", "module": "hw_metrics_mgmt_service", "fields": [{"name": "metrics", "is_choice": false, "repeated": true, "type": "MetricConfig", "lookup": true}]}, {"name": "Reason", "type": "enum", "module": "hw_metrics_mgmt_service", "values": {"0": "UNDEFINED_REASON", "1": "UNKNOWN_DEVICE", "2": "INTERNAL_ERROR"}}, {"name": "ListMetricsResponse", "type": "message", "module": "hw_metrics_mgmt_service", "fields": [{"name": "status", "is_choice": false, "repeated": false, "type": "Status", "lookup": true}, {"name": "reason", "is_choice": false, "repeated": false, "type": "Reason", "lookup": true}, {"name": "metrics", "is_choice": false, "repeated": false, "type": "MetricsConfig", "lookup": true}]}, {"name": "MetricsConfigurationRequest", "type": "message", "module": "hw_metrics_mgmt_service", "fields": [{"name": "device_uuid", "is_choice": false, "repeated": false, "type": "Uuid", "lookup": true}, {"name": "operation", "is_choice": true, "cases": [{"name": "changes", "type": "MetricsConfig", "lookup": true}, {"name": "reset_to_default", "type": "bool", "lookup": false}]}]}, {"name": "Reason", "type": "enum", "module": "hw_metrics_mgmt_service", "values": {"0": "UNDEFINED_REASON", "1": "UNKNOWN_DEVICE", "2": "INTERNAL_ERROR", "3": "POLL_INTERVAL_UNSUPPORTED", "4": "INVALID_METRIC"}}, {"name": "MetricsConfigurationResponse", "type": "message", "module": "hw_metrics_mgmt_service", "fields": [{"name": "status", "is_choice": false, "repeated": false, "type": "Status", "lookup": true}, {"name": "reason", "is_choice": false, "repeated": false, "type": "Reason", "lookup": true}]}, {"name": "MetricMetaData", "type": "message", "module": "hw_metrics_mgmt_service", "fields": [{"name": "device_uuid", "is_choice": false, "repeated": false, "type": "Uuid", "lookup": true}, {"name": "component_uuid", "is_choice": false, "repeated": false, "type": "Uuid", "lookup": true}, {"name": "component_name", "is_choice": false, "repeated": false, "type": "string", "lookup": false}]}, {"name": "Metric", "type": "message", "module": "hw_metrics_mgmt_service", "fields": [{"name": "metric_id", "is_choice": false, "repeated": false, "type": "MetricNames", "lookup": true}, {"name": "metric_metadata", "is_choice": false, "repeated": false, "type": "MetricMetaData", "lookup": true}, {"name": "value", "is_choice": false, "repeated": false, "type": "ComponentSensorData", "lookup": true}]}, {"name": "GetMetricRequest", "type": "message", "module": "hw_metrics_mgmt_service", "fields": [{"name": "meta_data", "is_choice": false, "repeated": false, "type": "MetricMetaData", "lookup": true}, {"name": "metric_id", "is_choice": false, "repeated": false, "type": "MetricNames", "lookup": true}]}, {"name": "Reason", "type": "enum", "module": "hw_metrics_mgmt_service", "values": {"0": "UNDEFINED_REASON", "1": "UNKNOWN_DEVICE", "2": "UNKNOWN_COMPONENT", "3": "INTERNAL_ERROR", "4": "INVALID_METRIC"}}, {"name": "GetMetricResponse", "type": "message", "module": "hw_metrics_mgmt_service", "fields": [{"name": "status", "is_choice": false, "repeated": false, "type": "Status", "lookup": true}, {"name": "reason", "is_choice": false, "repeated": false, "type": "Reason", "lookup": true}, {"name": "metric", "is_choice": false, "repeated": false, "type": "Metric", "lookup": true}]}, {"name": "EventIds", "type": "enum", "module": "hw_events_mgmt_service", "values": {"0": "EVENT_NAME_UNDEFINED", "100": "EVENT_TRANSCEIVER_PLUG_OUT", "101": "EVENT_TRANSCEIVER_PLUG_IN", "102": "EVENT_TRANSCEIVER_VOLTAGE_ABOVE_THRESHOLD", "103": "EVENT_TRANSCEIVER_VOLTAGE_BELOW_THRESHOLD", "104": "EVENT_TRANSCEIVER_TEMPERATURE_ABOVE_THRESHOLD", "105": "EVENT_TRANSCEIVER_TEMPERATURE_BELOW_THRESHOLD", "106": "EVENT_TRANSCEIVER_CURRENT_ABOVE_THRESHOLD", "107": "EVENT_TRANSCEIVER_CURRENT_BELOW_THRESHOLD", "108": "EVENT_TRANSCEIVER_RX_POWER_ABOVE_THRESHOLD", "109": "EVENT_TRANSCEIVER_RX_POWER_BELOW_THRESHOLD", "110": "EVENT_TRANSCEIVER_TX_POWER_ABOVE_THRESHOLD", "111": "EVENT_TRANSCEIVER_TX_POWER_BELOW_THRESHOLD", "112": "EVENT_TRANSCEIVER_FAILURE", "113": "EVENT_TRANSCEIVER_VOLTAGE_ABOVE_THRESHOLD_RECOVERED", "114": "EVENT_TRANSCEIVER_VOLTAGE_BELOW_THRESHOLD_RECOVERED", "115": "EVENT_TRANSCEIVER_TEMPERATURE_ABOVE_THRESHOLD_RECOVERED", "116": "EVENT_TRANSCEIVER_TEMPERATURE_BELOW_THRESHOLD_RECOVERED", "117": "EVENT_TRANSCEIVER_CURRENT_ABOVE_THRESHOLD_RECOVERED", "118": "EVENT_TRANSCEIVER_CURRENT_BELOW_THRESHOLD_RECOVERED", "119": "EVENT_TRANSCEIVER_RX_POWER_ABOVE_THRESHOLD_RECOVERED", "120": "EVENT_TRANSCEIVER_RX_POWER_BELOW_THRESHOLD_RECOVERED", "121": "EVENT_TRANSCEIVER_TX_POWER_ABOVE_THRESHOLD_RECOVERED", "122": "EVENT_TRANSCEIVER_TX_POWER_BELOW_THRESHOLD_RECOVERED", "123": "EVENT_TRANSCEIVER_FAILURE_RECOVERED", "200": "EVENT_PSU_PLUG_OUT", "201": "EVENT_PSU_PLUG_IN", "202": "EVENT_PSU_FAILURE", "203": "EVENT_PSU_FAILURE_RECOVERED", "300": "EVENT_FAN_FAILURE", "301": "EVENT_FAN_PLUG_OUT", "302": "EVENT_FAN_PLUG_IN", "303": "EVENT_FAN_FAILURE_RECOVERED", "400": "EVENT_CPU_TEMPERATURE_ABOVE_CRITICAL", "401": "EVENT_CPU_TEMPERATURE_ABOVE_FATAL", "402": "EVENT_CPU_TEMPERATURE_ABOVE_CRITICAL_RECOVERED", "403": "EVENT_CPU_TEMPERATURE_ABOVE_FATAL_RECOVERED", "500": "EVENT_HW_DEVICE_RESET", "501": "EVENT_HW_DEVICE_TEMPERATURE_ABOVE_CRITICAL", "502": "EVENT_HW_DEVICE_TEMPERATURE_ABOVE_FATAL", "503": "EVENT_HW_DEVICE_TEMPERATURE_ABOVE_CRITICAL_RECOVERED", "504": "EVENT_HW_DEVICE_TEMPERATURE_ABOVE_FATAL_RECOVERED"}}, {"name": "ValueType", "type": "message", "module": "hw_events_mgmt_service", "fields": [{"name": "val", "is_choice": true, "cases": [{"name": "int_val", "type": "int64", "lookup": false}, {"name": "uint_val", "type": "uint64", "lookup": false}, {"name": "float_val", "type": "float", "lookup": false}]}]}, {"name": "WaterMarks", "type": "message", "module": "hw_events_mgmt_service", "fields": [{"name": "high", "is_choice": false, "repeated": false, "type": "ValueType", "lookup": true}, {"name": "low", "is_choice": false, "repeated": false, "type": "ValueType", "lookup": true}]}, {"name": "Thresholds", "type": "message", "module": "hw_events_mgmt_service", "fields": [{"name": "threshold", "is_choice": true, "cases": [{"name": "upper", "type": "WaterMarks", "lookup": true}, {"name": "lower", "type": "WaterMarks", "lookup": true}]}]}, {"name": "ThresholdInformation", "type": "message", "module": "hw_events_mgmt_service", "fields": [{"name": "observed_value", "is_choice": false, "repeated": false, "type": "ValueType", "lookup": true}, {"name": "thresholds", "is_choice": false, "repeated": false, "type": "Thresholds", "lookup": true}]}, {"name": "EventCfg", "type": "message", "module": "hw_events_mgmt_service", "fields": [{"name": "event_id", "is_choice": false, "repeated": false, "type": "EventIds", "lookup": true}, {"name": "is_configured", "is_choice": false, "repeated": false, "type": "bool", "lookup": false}, {"name": "thresholds", "is_choice": false, "repeated": false, "type": "Thresholds", "lookup": true}]}, {"name": "EventsCfg", "type": "message", "module": "hw_events_mgmt_service", "fields": [{"name": "items", "is_choice": false, "repeated": true, "type": "EventCfg", "lookup": true}]}, {"name": "Reason", "type": "enum", "module": "hw_events_mgmt_service", "values": {"0": "UNDEFINED_REASON", "1": "UNKNOWN_DEVICE", "2": "INTERNAL_ERROR"}}, {"name": "ListEventsResponse", "type": "message", "module": "hw_events_mgmt_service", "fields": [{"name": "status", "is_choice": false, "repeated": false, "type": "Status", "lookup": true}, {"name": "reason", "is_choice": false, "repeated": false, "type": "Reason", "lookup": true}, {"name": "events", "is_choice": false, "repeated": false, "type": "EventsCfg", "lookup": true}]}, {"name": "EventsConfigurationRequest", "type": "message", "module": "hw_events_mgmt_service", "fields": [{"name": "device_uuid", "is_choice": false, "repeated": false, "type": "Uuid", "lookup": true}, {"name": "operation", "is_choice": true, "cases": [{"name": "changes", "type": "EventsCfg", "lookup": true}, {"name": "reset_to_default", "type": "bool", "lookup": false}]}]}, {"name": "Reason", "type": "enum", "module": "hw_events_mgmt_service", "values": {"0": "UNDEFINED_REASON", "1": "UNKNOWN_DEVICE", "2": "INTERNAL_ERROR", "3": "INVALID_CONFIG"}}, {"name": "EventsConfigurationResponse", "type": "message", "module": "hw_events_mgmt_service", "fields": [{"name": "status", "is_choice": false, "repeated": false, "type": "Status", "lookup": true}, {"name": "reason", "is_choice": false, "repeated": false, "type": "Reason", "lookup": true}]}, {"name": "EventMetaData", "type": "message", "module": "hw_events_mgmt_service", "fields": [{"name": "device_uuid", "is_choice": false, "repeated": false, "type": "Uuid", "lookup": true}, {"name": "component_uuid", "is_choice": false, "repeated": false, "type": "Uuid", "lookup": true}, {"name": "component_name", "is_choice": false, "repeated": false, "type": "string", "lookup": false}]}, {"name": "Event", "type": "message", "module": "hw_events_mgmt_service", "fields": [{"name": "event_metadata", "is_choice": false, "repeated": false, "type": "EventMetaData", "lookup": true}, {"name": "event_id", "is_choice": false, "repeated": false, "type": "EventIds", "lookup": true}, {"name": "raised_ts", "is_choice": false, "repeated": false, "type": "google.protobuf.Timestamp", "lookup": true}, {"name": "threshold_info", "is_choice": false, "repeated": false, "type": "ThresholdInformation", "lookup": true}, {"name": "add_info", "is_choice": false, "repeated": false, "type": "string", "lookup": false}]}, {"name": "ImageVersion", "type": "message", "module": "sw_image", "fields": [{"name": "image_name", "is_choice": false, "repeated": false, "type": "string", "lookup": false}, {"name": "version", "is_choice": false, "repeated": false, "type": "string", "lookup": false}]}, {"name": "ImageInformation", "type": "message", "module": "sw_image", "fields": [{"name": "image", "is_choice": false, "repeated": false, "type": "ImageVersion", "lookup": true}, {"name": "image_install_script", "is_choice": false, "repeated": false, "type": "string", "lookup": false}, {"name": "image_url", "is_choice": false, "repeated": false, "type": "string", "lookup": false}, {"name": "sha256sum", "is_choice": false, "repeated": false, "type": "string", "lookup": false}]}, {"name": "ImageState", "type": "enum", "module": "sw_image", "values": {"0": "UNDEFINED_STATE", "1": "COPYING_IMAGE", "2": "INSTALLING_IMAGE", "3": "COMMITTING_IMAGE", "4": "REBOOTING_DEVICE", "5": "UPGRADE_COMPLETE", "6": "UPGRADE_FAILED", "7": "ACTIVATION_COMPLETE", "8": "ACTIVATION_FAILED"}}, {"name": "Reason", "type": "enum", "module": "sw_image", "values": {"0": "UNDEFINED_REASON", "1": "ERROR_IN_REQUEST", "2": "INTERNAL_ERROR", "3": "DEVICE_IN_WRONG_STATE", "4": "INVALID_IMAGE", "5": "WRONG_IMAGE_CHECKSUM", "6": "OPERATION_ALREADY_IN_PROGRESS", "7": "UNKNOWN_DEVICE", "8": "DEVICE_NOT_REACHABLE"}}, {"name": "ImageStatus", "type": "message", "module": "sw_image", "fields": [{"name": "status", "is_choice": false, "repeated": false, "type": "Status", "lookup": true}, {"name": "reason", "is_choice": false, "repeated": false, "type": "Reason", "lookup": true}, {"name": "state", "is_choice": false, "repeated": false, "type": "ImageState", "lookup": true}, {"name": "description", "is_choice": false, "repeated": false, "type": "string", "lookup": false}]}, {"name": "PhysicalInventoryRequest", "type": "message", "module": "hw_management_service", "fields": [{"name": "device_uuid", "is_choice": false, "repeated": false, "type": "Uuid", "lookup": true}]}, {"name": "Reason", "type": "enum", "module": "hw_management_service", "values": {"0": "UNDEFINED_REASON", "1": "UNKNOWN_DEVICE", "2": "INTERNAL_ERROR"}}, {"name": "PhysicalInventoryResponse", "type": "message", "module": "hw_management_service", "fields": [{"name": "status", "is_choice": false, "repeated": false, "type": "Status", "lookup": true}, {"name": "reason", "is_choice": false, "repeated": false, "type": "Reason", "lookup": true}, {"name": "inventory", "is_choice": false, "repeated": false, "type": "Hardware", "lookup": true}]}, {"name": "HWComponentInfoGetRequest", "type": "message", "module": "hw_management_service", "fields": [{"name": "device_uuid", "is_choice": false, "repeated": false, "type": "Uuid", "lookup": true}, {"name": "component_uuid", "is_choice": false, "repeated": false, "type": "Uuid", "lookup": true}, {"name": "component_name", "is_choice": false, "repeated": false, "type": "string", "lookup": false}]}, {"name": "Reason", "type": "enum", "module": "hw_management_service", "values": {"0": "UNDEFINED_REASON", "1": "UNKNOWN_DEVICE", "2": "UNKNOWN_COMPONENT", "3": "INTERNAL_ERROR"}}, {"name": "HWComponentInfoGetResponse", "type": "message", "module": "hw_management_service", "fields": [{"name": "status", "is_choice": false, "repeated": false, "type": "Status", "lookup": true}, {"name": "reason", "is_choice": false, "repeated": false, "type": "Reason", "lookup": true}, {"name": "component", "is_choice": false, "repeated": false, "type": "Component", "lookup": true}]}, {"name": "HWComponentInfoSetRequest", "type": "message", "module": "hw_management_service", "fields": [{"name": "device_uuid", "is_choice": false, "repeated": false, "type": "Uuid", "lookup": true}, {"name": "component_uuid", "is_choice": false, "repeated": false, "type": "Uuid", "lookup": true}, {"name": "component_name", "is_choice": false, "repeated": false, "type": "string", "lookup": false}, {"name": "changes", "is_choice": false, "repeated": false, "type": "ModifiableComponent", "lookup": true}]}, {"name": "Reason", "type": "enum", "module": "hw_management_service", "values": {"0": "UNDEFINED_REASON", "1": "UNKNOWN_DEVICE", "2": "UNKNOWN_COMPONENT", "3": "INVALID_PARAMS", "4": "INTERNAL_ERROR"}}, {"name": "HWComponentInfoSetResponse", "type": "message", "module": "hw_management_service", "fields": [{"name": "status", "is_choice": false, "repeated": false, "type": "Status", "lookup": true}, {"name": "reason", "is_choice": false, "repeated": false, "type": "Reason", "lookup": true}]}, {"name": "Reason", "type": "enum", "module": "hw_management_service", "values": {"0": "UNDEFINED_REASON", "1": "DEVICE_ALREADY_MANAGED", "2": "OPERATION_ALREADY_IN_PROGRESS", "3": "INVALID_PARAMS", "4": "INTERNAL_ERROR"}}, {"name": "StartManagingDeviceResponse", "type": "message", "module": "hw_management_service", "fields": [{"name": "status", "is_choice": false, "repeated": false, "type": "Status", "lookup": true}, {"name": "reason", "is_choice": false, "repeated": false, "type": "Reason", "lookup": true}, {"name": "device_uuid", "is_choice": false, "repeated": false, "type": "Uuid", "lookup": true}]}, {"name": "StopManagingDeviceRequest", "type": "message", "module": "hw_management_service", "fields": [{"name": "name", "is_choice": false, "repeated": false, "type": "string", "lookup": false}]}, {"name": "Reason", "type": "enum", "module": "hw_management_service", "values": {"0": "UNDEFINED_REASON", "1": "UNKNOWN_DEVICE"}}, {"name": "StopManagingDeviceResponse", "type": "message", "module": "hw_management_service", "fields": [{"name": "status", "is_choice": false, "repeated": false, "type": "Status", "lookup": true}, {"name": "reason", "is_choice": false, "repeated": false, "type": "Reason", "lookup": true}]}, {"name": "ManagedDevicesResponse", "type": "message", "module": "hw_management_service", "fields": [{"name": "devices", "is_choice": false, "repeated": true, "type": "ModifiableComponent", "lookup": true}]}, {"name": "SetLoggingEndpointRequest", "type": "message", "module": "hw_management_service", "fields": [{"name": "device_uuid", "is_choice": false, "repeated": false, "type": "Uuid", "lookup": true}, {"name": "logging_endpoint", "is_choice": false, "repeated": false, "type": "string", "lookup": false}, {"name": "logging_protocol", "is_choice": false, "repeated": false, "type": "string", "lookup": false}]}, {"name": "Reason", "type": "enum", "module": "hw_management_service", "values": {"0": "UNDEFINED_REASON", "1": "UNKNOWN_DEVICE", "2": "INTERNAL_ERROR", "3": "LOGGING_ENDPOINT_ERROR", "4": "LOGGING_ENDPOINT_PROTOCOL_ERROR", "5": "MSGBUS_ENDPOINT_ERROR"}}, {"name": "SetRemoteEndpointResponse", "type": "message", "module": "hw_management_service", "fields": [{"name": "status", "is_choice": false, "repeated": false, "type": "Status", "lookup": true}, {"name": "reason", "is_choice": false, "repeated": false, "type": "Reason", "lookup": true}]}, {"name": "Reason", "type": "enum", "module": "hw_management_service", "values": {"0": "UNDEFINED_REASON", "1": "UNKNOWN_DEVICE", "2": "INTERNAL_ERROR"}}, {"name": "GetLoggingEndpointResponse", "type": "message", "module": "hw_management_service", "fields": [{"name": "status", "is_choice": false, "repeated": false, "type": "Status", "lookup": true}, {"name": "reason", "is_choice": false, "repeated": false, "type": "Reason", "lookup": true}, {"name": "logging_endpoint", "is_choice": false, "repeated": false, "type": "string", "lookup": false}, {"name": "logging_protocol", "is_choice": false, "repeated": false, "type": "string", "lookup": false}]}, {"name": "SetMsgBusEndpointRequest", "type": "message", "module": "hw_management_service", "fields": [{"name": "msgbus_endpoint", "is_choice": false, "repeated": false, "type": "string", "lookup": false}]}, {"name": "Reason", "type": "enum", "module": "hw_management_service", "values": {"0": "UNDEFINED_REASON", "1": "INTERNAL_ERROR"}}, {"name": "GetMsgBusEndpointResponse", "type": "message", "module": "hw_management_service", "fields": [{"name": "status", "is_choice": false, "repeated": false, "type": "Status", "lookup": true}, {"name": "reason", "is_choice": false, "repeated": false, "type": "Reason", "lookup": true}, {"name": "msgbus_endpoint", "is_choice": false, "repeated": false, "type": "string", "lookup": false}]}, {"name": "EntitiesLogLevel", "type": "message", "module": "hw_management_service", "fields": [{"name": "logLevel", "is_choice": false, "repeated": false, "type": "LogLevel", "lookup": true}, {"name": "entities", "is_choice": false, "repeated": true, "type": "string", "lookup": false}]}, {"name": "SetLogLevelRequest", "type": "message", "module": "hw_management_service", "fields": [{"name": "device_uuid", "is_choice": false, "repeated": false, "type": "Uuid", "lookup": true}, {"name": "loglevels", "is_choice": false, "repeated": true, "type": "EntitiesLogLevel", "lookup": true}]}, {"name": "Reason", "type": "enum", "module": "hw_management_service", "values": {"0": "UNDEFINED_REASON", "1": "UNKNOWN_DEVICE", "2": "INTERNAL_ERROR", "3": "UNKNOWN_LOG_ENTITY"}}, {"name": "SetLogLevelResponse", "type": "message", "module": "hw_management_service", "fields": [{"name": "device_uuid", "is_choice": false, "repeated": false, "type": "Uuid", "lookup": true}, {"name": "status", "is_choice": false, "repeated": false, "type": "Status", "lookup": true}, {"name": "reason", "is_choice": false, "repeated": false, "type": "Reason", "lookup": true}]}, {"name": "GetLogLevelRequest", "type": "message", "module": "hw_management_service", "fields": [{"name": "device_uuid", "is_choice": false, "repeated": false, "type": "Uuid", "lookup": true}, {"name": "entities", "is_choice": false, "repeated": true, "type": "string", "lookup": false}]}, {"name": "Reason", "type": "enum", "module": "hw_management_service", "values": {"0": "UNDEFINED_REASON", "1": "UNKNOWN_DEVICE", "2": "INTERNAL_ERROR", "3": "UNKNOWN_LOG_ENTITY"}}, {"name": "GetLogLevelResponse", "type": "message", "module": "hw_management_service", "fields": [{"name": "device_uuid", "is_choice": false, "repeated": false, "type": "Uuid", "lookup": true}, {"name": "logLevels", "is_choice": false, "repeated": true, "type": "EntitiesLogLevel", "lookup": true}, {"name": "status", "is_choice": false, "repeated": false, "type": "Status", "lookup": true}, {"name": "reason", "is_choice": false, "repeated": false, "type": "Reason", "lookup": true}]}, {"name": "GetLoggableEntitiesRequest", "type": "message", "module": "hw_management_service", "fields": [{"name": "device_uuid", "is_choice": false, "repeated": false, "type": "Uuid", "lookup": true}]}, {"name": "SoftwareVersionInformation", "type": "message", "module": "sw_management_service", "fields": [{"name": "active_versions", "is_choice": false, "repeated": true, "type": "ImageVersion", "lookup": true}, {"name": "standby_versions", "is_choice": false, "repeated": true, "type": "ImageVersion", "lookup": true}]}, {"name": "Reason", "type": "enum", "module": "sw_management_service", "values": {"0": "UNDEFINED_REASON", "1": "UNKNOWN_DEVICE", "2": "INTERNAL_ERROR"}}, {"name": "GetSoftwareVersionInformationResponse", "type": "message", "module": "sw_management_service", "fields": [{"name": "status", "is_choice": false, "repeated": false, "type": "Status", "lookup": true}, {"name": "reason", "is_choice": false, "repeated": false, "type": "Reason", "lookup": true}, {"name": "info", "is_choice": false, "repeated": false, "type": "SoftwareVersionInformation", "lookup": true}]}, {"name": "DownloadImageRequest", "type": "message", "module": "sw_management_service", "fields": [{"name": "device_uuid", "is_choice": false, "repeated": false, "type": "Uuid", "lookup": true}, {"name": "image_info", "is_choice": false, "repeated": false, "type": "ImageInformation", "lookup": true}]}, {"name": "ConfigRequest", "type": "message", "module": "sw_management_service", "fields": [{"name": "device_uuid", "is_choice": false, "repeated": false, "type": "Uuid", "lookup": true}, {"name": "config_url", "is_choice": false, "repeated": false, "type": "string", "lookup": false}]}, {"name": "Reason", "type": "enum", "module": "sw_management_service", "values": {"0": "UNDEFINED_REASON", "1": "UNKNOWN_DEVICE", "2": "INTERNAL_ERROR", "3": "ERROR_FETCHING_CONFIG", "4": "INVALID_CONFIG", "5": "OPERATION_ALREADY_IN_PROGRESS"}}, {"name": "ConfigResponse", "type": "message", "module": "sw_management_service", "fields": [{"name": "status", "is_choice": false, "repeated": false, "type": "Status", "lookup": true}, {"name": "reason", "is_choice": false, "repeated": false, "type": "Reason", "lookup": true}]}, {"name": "StartupConfigInfoRequest", "type": "message", "module": "sw_management_service", "fields": [{"name": "device_uuid", "is_choice": false, "repeated": false, "type": "Uuid", "lookup": true}]}, {"name": "Reason", "type": "enum", "module": "sw_management_service", "values": {"0": "UNDEFINED_REASON", "1": "UNKNOWN_DEVICE", "2": "INTERNAL_ERROR"}}, {"name": "StartupConfigInfoResponse", "type": "message", "module": "sw_management_service", "fields": [{"name": "status", "is_choice": false, "repeated": false, "type": "Status", "lookup": true}, {"name": "reason", "is_choice": false, "repeated": false, "type": "Reason", "lookup": true}, {"name": "config_url", "is_choice": false, "repeated": false, "type": "string", "lookup": false}, {"name": "version", "is_choice": false, "repeated": false, "type": "string", "lookup": false}]}], "services": [{"name": "NativeMetricsManagementService", "module": "hw_metrics_mgmt_service", "rpcs": [{"name": "ListMetrics", "request": {"is_stream": false, "type": "HardwareID", "lookup": true}, "response": {"is_stream": false, "type": "ListMetricsResponse", "lookup": true}}, {"name": "UpdateMetricsConfiguration", "request": {"is_stream": false, "type": "MetricsConfigurationRequest", "lookup": true}, "response": {"is_stream": false, "type": "MetricsConfigurationResponse", "lookup": true}}, {"name": "GetMetric", "request": {"is_stream": false, "type": "GetMetricRequest", "lookup": true}, "response": {"is_stream": false, "type": "GetMetricResponse", "lookup": true}}]}, {"name": "NativeEventsManagementService", "module": "hw_events_mgmt_service", "rpcs": [{"name": "ListEvents", "request": {"is_stream": false, "type": "HardwareID", "lookup": true}, "response": {"is_stream": false, "type": "ListEventsResponse", "lookup": true}}, {"name": "UpdateEventsConfiguration", "request": {"is_stream": false, "type": "EventsConfigurationRequest", "lookup": true}, "response": {"is_stream": false, "type": "EventsConfigurationResponse", "lookup": true}}]}, {"name": "NativeHWManagementService", "module": "hw_management_service", "rpcs": [{"name": "StartManagingDevice", "request": {"is_stream": false, "type": "ModifiableComponent", "lookup": true}, "response": {"is_stream": true, "type": "StartManagingDeviceResponse", "lookup": true}}, {"name": "StopManagingDevice", "request": {"is_stream": false, "type": "StopManagingDeviceRequest", "lookup": true}, "response": {"is_stream": false, "type": "StopManagingDeviceResponse", "lookup": true}}, {"name": "GetManagedDevices", "request": {"is_stream": false, "type": "google.protobuf.Empty", "lookup": false}, "response": {"is_stream": false, "type": "ManagedDevicesResponse", "lookup": true}}, {"name": "GetPhysicalInventory", "request": {"is_stream": false, "type": "PhysicalInventoryRequest", "lookup": true}, "response": {"is_stream": true, "type": "PhysicalInventoryResponse", "lookup": true}}, {"name": "GetHWComponentInfo", "request": {"is_stream": false, "type": "HWComponentInfoGetRequest", "lookup": true}, "response": {"is_stream": true, "type": "HWComponentInfoGetResponse", "lookup": true}}, {"name": "SetHWComponentInfo", "request": {"is_stream": false, "type": "HWComponentInfoSetRequest", "lookup": true}, "response": {"is_stream": false, "type": "HWComponentInfoSetResponse", "lookup": true}}, {"name": "SetLoggingEndpoint", "request": {"is_stream": false, "type": "SetLoggingEndpointRequest", "lookup": true}, "response": {"is_stream": false, "type": "SetRemoteEndpointResponse", "lookup": true}}, {"name": "GetLoggingEndpoint", "request": {"is_stream": false, "type": "HardwareID", "lookup": true}, "response": {"is_stream": false, "type": "GetLoggingEndpointResponse", "lookup": true}}, {"name": "SetMsgBusEndpoint", "request": {"is_stream": false, "type": "SetMsgBusEndpointRequest", "lookup": true}, "response": {"is_stream": false, "type": "SetRemoteEndpointResponse", "lookup": true}}, {"name": "GetMsgBusEndpoint", "request": {"is_stream": false, "type": "google.protobuf.Empty", "lookup": false}, "response": {"is_stream": false, "type": "GetMsgBusEndpointResponse", "lookup": true}}, {"name": "GetLoggableEntities", "request": {"is_stream": false, "type": "GetLoggableEntitiesRequest", "lookup": true}, "response": {"is_stream": false, "type": "GetLogLevelResponse", "lookup": true}}, {"name": "SetLogLevel", "request": {"is_stream": false, "type": "SetLogLevelRequest", "lookup": true}, "response": {"is_stream": false, "type": "SetLogLevelResponse", "lookup": true}}, {"name": "GetLogLevel", "request": {"is_stream": false, "type": "GetLogLevelRequest", "lookup": true}, "response": {"is_stream": false, "type": "GetLogLevelResponse", "lookup": true}}]}, {"name": "NativeSoftwareManagementService", "module": "sw_management_service", "rpcs": [{"name": "GetSoftwareVersion", "request": {"is_stream": false, "type": "HardwareID", "lookup": true}, "response": {"is_stream": false, "type": "GetSoftwareVersionInformationResponse", "lookup": true}}, {"name": "DownloadImage", "request": {"is_stream": false, "type": "DownloadImageRequest", "lookup": true}, "response": {"is_stream": true, "type": "ImageStatus", "lookup": true}}, {"name": "ActivateImage", "request": {"is_stream": false, "type": "HardwareID", "lookup": true}, "response": {"is_stream": true, "type": "ImageStatus", "lookup": true}}, {"name": "RevertToStandbyImage", "request": {"is_stream": false, "type": "HardwareID", "lookup": true}, "response": {"is_stream": true, "type": "ImageStatus", "lookup": true}}, {"name": "UpdateStartupConfiguration", "request": {"is_stream": false, "type": "ConfigRequest", "lookup": true}, "response": {"is_stream": true, "type": "ConfigResponse", "lookup": true}}, {"name": "GetStartupConfigurationInfo", "request": {"is_stream": false, "type": "StartupConfigInfoRequest", "lookup": true}, "response": {"is_stream": false, "type": "StartupConfigInfoResponse", "lookup": true}}]}]}
\ No newline at end of file
diff --git a/grpc_robot/services/dmi/dmi_1_0_0/__init__.py b/grpc_robot/services/dmi/dmi_1_0_0/__init__.py
new file mode 100644
index 0000000..d03333b
--- /dev/null
+++ b/grpc_robot/services/dmi/dmi_1_0_0/__init__.py
@@ -0,0 +1,17 @@
+# Copyright 2020-present Open Networking Foundation
+# Original copyright 2020-present ADTRAN, Inc.
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+from ..dmi_0_9_8.sw_management_service import *
+from .hw_events_mgmt_service import *
+from .hw_management_service import *
+from .hw_metrics_mgmt_service import *
diff --git a/grpc_robot/services/dmi/dmi_1_0_0/dmi.json b/grpc_robot/services/dmi/dmi_1_0_0/dmi.json
new file mode 100644
index 0000000..d4bbb96
--- /dev/null
+++ b/grpc_robot/services/dmi/dmi_1_0_0/dmi.json
@@ -0,0 +1 @@
+{"modules": [{"name": "commons", "imports": []}, {"name": "hw", "imports": ["timestamp"]}, {"name": "hw_metrics_mgmt_service", "imports": ["commons", "hw", "empty"]}, {"name": "hw_events_mgmt_service", "imports": ["commons", "hw", "timestamp", "empty"]}, {"name": "sw_image", "imports": ["commons"]}, {"name": "hw_management_service", "imports": ["commons", "hw", "empty"]}, {"name": "sw_management_service", "imports": ["commons", "hw", "sw_image"]}], "data_types": [{"name": "Status", "type": "enum", "module": "commons", "values": {"0": "UNDEFINED_STATUS", "1": "OK_STATUS", "2": "ERROR_STATUS"}}, {"name": "LogLevel", "type": "enum", "module": "commons", "values": {"0": "TRACE", "1": "DEBUG", "2": "INFO", "3": "WARN", "4": "ERROR"}}, {"name": "Uuid", "type": "message", "module": "hw", "fields": [{"name": "uuid", "is_choice": false, "repeated": false, "type": "string", "lookup": false}]}, {"name": "HardwareID", "type": "message", "module": "hw", "fields": [{"name": "uuid", "is_choice": false, "repeated": false, "type": "Uuid", "lookup": true}]}, {"name": "Uri", "type": "message", "module": "hw", "fields": [{"name": "uri", "is_choice": false, "repeated": false, "type": "string", "lookup": false}]}, {"name": "ComponentType", "type": "enum", "module": "hw", "values": {"0": "COMPONENT_TYPE_UNDEFINED", "1": "COMPONENT_TYPE_UNKNOWN", "2": "COMPONENT_TYPE_CHASSIS", "3": "COMPONENT_TYPE_BACKPLANE", "4": "COMPONENT_TYPE_CONTAINER", "5": "COMPONENT_TYPE_POWER_SUPPLY", "6": "COMPONENT_TYPE_FAN", "7": "COMPONENT_TYPE_SENSOR", "8": "COMPONENT_TYPE_MODULE", "9": "COMPONENT_TYPE_PORT", "10": "COMPONENT_TYPE_CPU", "11": "COMPONENT_TYPE_BATTERY", "12": "COMPONENT_TYPE_STORAGE", "13": "COMPONENT_TYPE_MEMORY", "14": "COMPONENT_TYPE_TRANSCEIVER"}}, {"name": "ComponentAdminState", "type": "enum", "module": "hw", "values": {"0": "COMP_ADMIN_STATE_UNDEFINED", "1": "COMP_ADMIN_STATE_UNKNOWN", "2": "COMP_ADMIN_STATE_LOCKED", "3": "COMP_ADMIN_STATE_SHUTTING_DOWN", "4": "COMP_ADMIN_STATE_UNLOCKED"}}, {"name": "ComponentOperState", "type": "enum", "module": "hw", "values": {"0": "COMP_OPER_STATE_UNDEFINED", "1": "COMP_OPER_STATE_UNKNOWN", "2": "COMP_OPER_STATE_DISABLED", "3": "COMP_OPER_STATE_ENABLED", "4": "COMP_OPER_STATE_TESTING"}}, {"name": "ComponentUsageState", "type": "enum", "module": "hw", "values": {"0": "COMP_USAGE_STATE_UNDEFINED", "1": "COMP_USAGE_STATE_UNKNOWN", "2": "COMP_USAGE_STATE_IDLE", "3": "COMP_USAGE_STATE_ACTIVE", "4": "COMP_USAGE_STATE_BUSY"}}, {"name": "ComponentAlarmState", "type": "enum", "module": "hw", "values": {"0": "COMP_ALARM_STATE_UNDEFINED", "1": "COMP_ALARM_STATE_UNKNOWN", "2": "COMP_ALARM_STATE_UNDER_REPAIR", "3": "COMP_ALARM_STATE_CRITICAL", "4": "COMP_ALARM_STATE_MAJOR", "5": "COMP_ALARM_STATE_MINOR", "6": "COMP_ALARM_STATE_WARNING", "7": "COMP_ALARM_STATE_INDETERMINATE"}}, {"name": "ComponentStandbyState", "type": "enum", "module": "hw", "values": {"0": "COMP_STANDBY_STATE_UNDEFINED", "1": "COMP_STANDBY_STATE_UNKNOWN", "2": "COMP_STANDBY_STATE_HOT", "3": "COMP_STANDBY_STATE_COLD", "4": "COMP_STANDBY_STATE_PROVIDING_SERVICE"}}, {"name": "ComponentState", "type": "message", "module": "hw", "fields": [{"name": "state_last_changed", "is_choice": false, "repeated": false, "type": "google.protobuf.Timestamp", "lookup": true}, {"name": "admin_state", "is_choice": false, "repeated": false, "type": "ComponentAdminState", "lookup": true}, {"name": "oper_state", "is_choice": false, "repeated": false, "type": "ComponentOperState", "lookup": true}, {"name": "usage_state", "is_choice": false, "repeated": false, "type": "ComponentUsageState", "lookup": true}, {"name": "alarm_state", "is_choice": false, "repeated": false, "type": "ComponentAlarmState", "lookup": true}, {"name": "standby_state", "is_choice": false, "repeated": false, "type": "ComponentStandbyState", "lookup": true}]}, {"name": "DataValueType", "type": "enum", "module": "hw", "values": {"0": "VALUE_TYPE_UNDEFINED", "1": "VALUE_TYPE_OTHER", "2": "VALUE_TYPE_UNKNOWN", "3": "VALUE_TYPE_VOLTS_AC", "4": "VALUE_TYPE_VOLTS_DC", "5": "VALUE_TYPE_AMPERES", "6": "VALUE_TYPE_WATTS", "7": "VALUE_TYPE_HERTZ", "8": "VALUE_TYPE_CELSIUS", "9": "VALUE_TYPE_PERCENT_RH", "10": "VALUE_TYPE_RPM", "11": "VALUE_TYPE_CMM", "12": "VALUE_TYPE_TRUTH_VALUE", "13": "VALUE_TYPE_PERCENT", "14": "VALUE_TYPE_METERS", "15": "VALUE_TYPE_BYTES"}}, {"name": "ValueScale", "type": "enum", "module": "hw", "values": {"0": "VALUE_SCALE_UNDEFINED", "1": "VALUE_SCALE_YOCTO", "2": "VALUE_SCALE_ZEPTO", "3": "VALUE_SCALE_ATTO", "4": "VALUE_SCALE_FEMTO", "5": "VALUE_SCALE_PICO", "6": "VALUE_SCALE_NANO", "7": "VALUE_SCALE_MICRO", "8": "VALUE_SCALE_MILLI", "9": "VALUE_SCALE_UNITS", "10": "VALUE_SCALE_KILO", "11": "VALUE_SCALE_MEGA", "12": "VALUE_SCALE_GIGA", "13": "VALUE_SCALE_TERA", "14": "VALUE_SCALE_PETA", "15": "VALUE_SCALE_EXA", "16": "VALUE_SCALE_ZETTA", "17": "VALUE_SCALE_YOTTA"}}, {"name": "SensorStatus", "type": "enum", "module": "hw", "values": {"0": "SENSOR_STATUS_UNDEFINED", "1": "SENSOR_STATUS_OK", "2": "SENSOR_STATUS_UNAVAILABLE", "3": "SENSOR_STATUS_NONOPERATIONAL"}}, {"name": "ComponentSensorData", "type": "message", "module": "hw", "fields": [{"name": "value", "is_choice": false, "repeated": false, "type": "int32", "lookup": false}, {"name": "type", "is_choice": false, "repeated": false, "type": "DataValueType", "lookup": true}, {"name": "scale", "is_choice": false, "repeated": false, "type": "ValueScale", "lookup": true}, {"name": "precision", "is_choice": false, "repeated": false, "type": "int32", "lookup": false}, {"name": "status", "is_choice": false, "repeated": false, "type": "SensorStatus", "lookup": true}, {"name": "units_display", "is_choice": false, "repeated": false, "type": "string", "lookup": false}, {"name": "timestamp", "is_choice": false, "repeated": false, "type": "google.protobuf.Timestamp", "lookup": true}, {"name": "value_update_rate", "is_choice": false, "repeated": false, "type": "uint32", "lookup": false}, {"name": "data_type", "is_choice": false, "repeated": false, "type": "string", "lookup": false}]}, {"name": "ConnectorType", "type": "enum", "module": "hw", "values": {"0": "CONNECTOR_TYPE_UNDEFINED", "1": "RJ45", "2": "FIBER_LC", "3": "FIBER_SC_PC", "4": "FIBER_MPO", "5": "RS232"}}, {"name": "Speed", "type": "enum", "module": "hw", "values": {"0": "SPEED_UNDEFINED", "1": "DYNAMIC", "2": "GIGABIT_1", "3": "GIGABIT_10", "4": "GIGABIT_25", "5": "GIGABIT_40", "6": "GIGABIT_100", "7": "GIGABIT_400", "8": "MEGABIT_2500", "9": "MEGABIT_1250"}}, {"name": "Protocol", "type": "enum", "module": "hw", "values": {"0": "PROTOCOL_UNDEFINED", "1": "ETHERNET", "2": "GPON", "3": "XGPON", "4": "XGSPON", "5": "GFAST", "6": "SERIAL", "7": "EPON", "8": "BITS"}}, {"name": "PortComponentAttributes", "type": "message", "module": "hw", "fields": [{"name": "connector_type", "is_choice": false, "repeated": false, "type": "ConnectorType", "lookup": true}, {"name": "speed", "is_choice": false, "repeated": false, "type": "Speed", "lookup": true}, {"name": "protocol", "is_choice": false, "repeated": false, "type": "Protocol", "lookup": true}, {"name": "physical_label", "is_choice": false, "repeated": false, "type": "string", "lookup": false}]}, {"name": "ContainerComponentAttributes", "type": "message", "module": "hw", "fields": [{"name": "physical_label", "is_choice": false, "repeated": false, "type": "string", "lookup": false}]}, {"name": "SupportedVoltage", "type": "enum", "module": "hw", "values": {"0": "SUPPORTED_VOLTAGE_UNDEFINED", "1": "V48", "2": "V230", "3": "V115"}}, {"name": "PsuComponentAttributes", "type": "message", "module": "hw", "fields": [{"name": "supported_voltage", "is_choice": false, "repeated": false, "type": "SupportedVoltage", "lookup": true}]}, {"name": "FormFactor", "type": "enum", "module": "hw", "values": {"0": "FORM_FACTOR_UNKNOWN", "1": "QSFP", "2": "QSFP_PLUS", "3": "QSFP28", "4": "SFP", "5": "SFP_PLUS", "6": "XFP", "7": "CFP4", "8": "CFP2", "9": "CPAK", "10": "X2", "11": "OTHER", "12": "CFP", "13": "CFP2_ACO", "14": "CFP2_DCO"}}, {"name": "Type", "type": "enum", "module": "hw", "values": {"0": "TYPE_UNKNOWN", "1": "ETHERNET", "2": "GPON", "3": "XGPON", "4": "XGSPON", "5": "CPON", "6": "NG_PON2", "7": "EPON"}}, {"name": "TransceiverComponentsAttributes", "type": "message", "module": "hw", "fields": [{"name": "form_factor", "is_choice": false, "repeated": false, "type": "FormFactor", "lookup": true}, {"name": "trans_type", "is_choice": false, "repeated": false, "type": "Type", "lookup": true}, {"name": "max_distance", "is_choice": false, "repeated": false, "type": "uint32", "lookup": false}, {"name": "max_distance_scale", "is_choice": false, "repeated": false, "type": "ValueScale", "lookup": true}, {"name": "rx_wavelength", "is_choice": false, "repeated": true, "type": "uint32", "lookup": false}, {"name": "tx_wavelength", "is_choice": false, "repeated": true, "type": "uint32", "lookup": false}, {"name": "wavelength_scale", "is_choice": false, "repeated": false, "type": "ValueScale", "lookup": true}]}, {"name": "Component", "type": "message", "module": "hw", "fields": [{"name": "name", "is_choice": false, "repeated": false, "type": "string", "lookup": false}, {"name": "class", "is_choice": false, "repeated": false, "type": "ComponentType", "lookup": true}, {"name": "description", "is_choice": false, "repeated": false, "type": "string", "lookup": false}, {"name": "parent", "is_choice": false, "repeated": false, "type": "string", "lookup": false}, {"name": "parent_rel_pos", "is_choice": false, "repeated": false, "type": "int32", "lookup": false}, {"name": "children", "is_choice": false, "repeated": true, "type": "Component", "lookup": true}, {"name": "hardware_rev", "is_choice": false, "repeated": false, "type": "string", "lookup": false}, {"name": "firmware_rev", "is_choice": false, "repeated": false, "type": "string", "lookup": false}, {"name": "software_rev", "is_choice": false, "repeated": false, "type": "string", "lookup": false}, {"name": "serial_num", "is_choice": false, "repeated": false, "type": "string", "lookup": false}, {"name": "mfg_name", "is_choice": false, "repeated": false, "type": "string", "lookup": false}, {"name": "model_name", "is_choice": false, "repeated": false, "type": "string", "lookup": false}, {"name": "alias", "is_choice": false, "repeated": false, "type": "string", "lookup": false}, {"name": "asset_id", "is_choice": false, "repeated": false, "type": "string", "lookup": false}, {"name": "is_fru", "is_choice": false, "repeated": false, "type": "bool", "lookup": false}, {"name": "mfg_date", "is_choice": false, "repeated": false, "type": "google.protobuf.Timestamp", "lookup": true}, {"name": "uri", "is_choice": false, "repeated": false, "type": "Uri", "lookup": true}, {"name": "uuid", "is_choice": false, "repeated": false, "type": "Uuid", "lookup": true}, {"name": "state", "is_choice": false, "repeated": false, "type": "ComponentState", "lookup": true}, {"name": "sensor_data", "is_choice": false, "repeated": true, "type": "ComponentSensorData", "lookup": true}, {"name": "specific", "is_choice": true, "cases": [{"name": "port_attr", "type": "PortComponentAttributes", "lookup": true}, {"name": "container_attr", "type": "ContainerComponentAttributes", "lookup": true}, {"name": "psu_attr", "type": "PsuComponentAttributes", "lookup": true}, {"name": "transceiver_attr", "type": "TransceiverComponentsAttributes", "lookup": true}]}]}, {"name": "Hardware", "type": "message", "module": "hw", "fields": [{"name": "last_change", "is_choice": false, "repeated": false, "type": "google.protobuf.Timestamp", "lookup": true}, {"name": "root", "is_choice": false, "repeated": false, "type": "Component", "lookup": true}, {"name": "last_booted", "is_choice": false, "repeated": false, "type": "google.protobuf.Timestamp", "lookup": true}]}, {"name": "ModifiableComponent", "type": "message", "module": "hw", "fields": [{"name": "name", "is_choice": false, "repeated": false, "type": "string", "lookup": false}, {"name": "class", "is_choice": false, "repeated": false, "type": "ComponentType", "lookup": true}, {"name": "parent", "is_choice": false, "repeated": false, "type": "Component", "lookup": true}, {"name": "parent_rel_pos", "is_choice": false, "repeated": false, "type": "int32", "lookup": false}, {"name": "alias", "is_choice": false, "repeated": false, "type": "string", "lookup": false}, {"name": "asset_id", "is_choice": false, "repeated": false, "type": "string", "lookup": false}, {"name": "uri", "is_choice": false, "repeated": false, "type": "Uri", "lookup": true}, {"name": "admin_state", "is_choice": false, "repeated": false, "type": "ComponentAdminState", "lookup": true}]}, {"name": "MetricNames", "type": "enum", "module": "hw_metrics_mgmt_service", "values": {"0": "METRIC_NAME_UNDEFINED", "1": "METRIC_FAN_SPEED", "100": "METRIC_CPU_TEMP", "101": "METRIC_CPU_USAGE_PERCENTAGE", "200": "METRIC_TRANSCEIVER_TEMP", "201": "METRIC_TRANSCEIVER_VOLTAGE", "202": "METRIC_TRANSCEIVER_BIAS", "203": "METRIC_TRANSCEIVER_RX_POWER", "204": "METRIC_TRANSCEIVER_TX_POWER", "205": "METRIC_TRANSCEIVER_WAVELENGTH", "300": "METRIC_DISK_TEMP", "301": "METRIC_DISK_CAPACITY", "302": "METRIC_DISK_USAGE", "303": "METRIC_DISK_USAGE_PERCENTAGE", "304": "METRIC_DISK_READ_WRITE_PERCENTAGE", "305": "METRIC_DISK_FAULTY_CELLS_PERCENTAGE", "400": "METRIC_RAM_TEMP", "401": "METRIC_RAM_CAPACITY", "402": "METRIC_RAM_USAGE", "403": "METRIC_RAM_USAGE_PERCENTAGE", "500": "METRIC_POWER_MAX", "501": "METRIC_POWER_USAGE", "502": "METRIC_POWER_USAGE_PERCENTAGE", "600": "METRIC_INNER_SURROUNDING_TEMP"}}, {"name": "MetricConfig", "type": "message", "module": "hw_metrics_mgmt_service", "fields": [{"name": "metric_id", "is_choice": false, "repeated": false, "type": "MetricNames", "lookup": true}, {"name": "is_configured", "is_choice": false, "repeated": false, "type": "bool", "lookup": false}, {"name": "poll_interval", "is_choice": false, "repeated": false, "type": "uint32", "lookup": false}]}, {"name": "MetricsConfig", "type": "message", "module": "hw_metrics_mgmt_service", "fields": [{"name": "metrics", "is_choice": false, "repeated": true, "type": "MetricConfig", "lookup": true}]}, {"name": "Reason", "type": "enum", "module": "hw_metrics_mgmt_service", "values": {"0": "UNDEFINED_REASON", "1": "UNKNOWN_DEVICE", "2": "INTERNAL_ERROR", "3": "DEVICE_UNREACHABLE"}}, {"name": "ListMetricsResponse", "type": "message", "module": "hw_metrics_mgmt_service", "fields": [{"name": "status", "is_choice": false, "repeated": false, "type": "Status", "lookup": true}, {"name": "reason", "is_choice": false, "repeated": false, "type": "Reason", "lookup": true}, {"name": "metrics", "is_choice": false, "repeated": false, "type": "MetricsConfig", "lookup": true}, {"name": "reason_detail", "is_choice": false, "repeated": false, "type": "string", "lookup": false}]}, {"name": "MetricsConfigurationRequest", "type": "message", "module": "hw_metrics_mgmt_service", "fields": [{"name": "device_uuid", "is_choice": false, "repeated": false, "type": "Uuid", "lookup": true}, {"name": "operation", "is_choice": true, "cases": [{"name": "changes", "type": "MetricsConfig", "lookup": true}, {"name": "reset_to_default", "type": "bool", "lookup": false}]}]}, {"name": "Reason", "type": "enum", "module": "hw_metrics_mgmt_service", "values": {"0": "UNDEFINED_REASON", "1": "UNKNOWN_DEVICE", "2": "INTERNAL_ERROR", "3": "POLL_INTERVAL_UNSUPPORTED", "4": "INVALID_METRIC", "5": "DEVICE_UNREACHABLE"}}, {"name": "MetricsConfigurationResponse", "type": "message", "module": "hw_metrics_mgmt_service", "fields": [{"name": "status", "is_choice": false, "repeated": false, "type": "Status", "lookup": true}, {"name": "reason", "is_choice": false, "repeated": false, "type": "Reason", "lookup": true}, {"name": "reason_detail", "is_choice": false, "repeated": false, "type": "string", "lookup": false}]}, {"name": "MetricMetaData", "type": "message", "module": "hw_metrics_mgmt_service", "fields": [{"name": "device_uuid", "is_choice": false, "repeated": false, "type": "Uuid", "lookup": true}, {"name": "component_uuid", "is_choice": false, "repeated": false, "type": "Uuid", "lookup": true}, {"name": "component_name", "is_choice": false, "repeated": false, "type": "string", "lookup": false}]}, {"name": "Metric", "type": "message", "module": "hw_metrics_mgmt_service", "fields": [{"name": "metric_id", "is_choice": false, "repeated": false, "type": "MetricNames", "lookup": true}, {"name": "metric_metadata", "is_choice": false, "repeated": false, "type": "MetricMetaData", "lookup": true}, {"name": "value", "is_choice": false, "repeated": false, "type": "ComponentSensorData", "lookup": true}]}, {"name": "GetMetricRequest", "type": "message", "module": "hw_metrics_mgmt_service", "fields": [{"name": "meta_data", "is_choice": false, "repeated": false, "type": "MetricMetaData", "lookup": true}, {"name": "metric_id", "is_choice": false, "repeated": false, "type": "MetricNames", "lookup": true}]}, {"name": "Reason", "type": "enum", "module": "hw_metrics_mgmt_service", "values": {"0": "UNDEFINED_REASON", "1": "UNKNOWN_DEVICE", "2": "UNKNOWN_COMPONENT", "3": "INTERNAL_ERROR", "4": "INVALID_METRIC", "5": "DEVICE_UNREACHABLE"}}, {"name": "GetMetricResponse", "type": "message", "module": "hw_metrics_mgmt_service", "fields": [{"name": "status", "is_choice": false, "repeated": false, "type": "Status", "lookup": true}, {"name": "reason", "is_choice": false, "repeated": false, "type": "Reason", "lookup": true}, {"name": "metric", "is_choice": false, "repeated": false, "type": "Metric", "lookup": true}, {"name": "reason_detail", "is_choice": false, "repeated": false, "type": "string", "lookup": false}]}, {"name": "EventIds", "type": "enum", "module": "hw_events_mgmt_service", "values": {"0": "EVENT_NAME_UNDEFINED", "100": "EVENT_TRANSCEIVER_PLUG_OUT", "101": "EVENT_TRANSCEIVER_PLUG_IN", "102": "EVENT_TRANSCEIVER_VOLTAGE_ABOVE_THRESHOLD", "103": "EVENT_TRANSCEIVER_VOLTAGE_BELOW_THRESHOLD", "104": "EVENT_TRANSCEIVER_TEMPERATURE_ABOVE_THRESHOLD", "105": "EVENT_TRANSCEIVER_TEMPERATURE_BELOW_THRESHOLD", "106": "EVENT_TRANSCEIVER_CURRENT_ABOVE_THRESHOLD", "107": "EVENT_TRANSCEIVER_CURRENT_BELOW_THRESHOLD", "108": "EVENT_TRANSCEIVER_RX_POWER_ABOVE_THRESHOLD", "109": "EVENT_TRANSCEIVER_RX_POWER_BELOW_THRESHOLD", "110": "EVENT_TRANSCEIVER_TX_POWER_ABOVE_THRESHOLD", "111": "EVENT_TRANSCEIVER_TX_POWER_BELOW_THRESHOLD", "112": "EVENT_TRANSCEIVER_FAILURE", "113": "EVENT_TRANSCEIVER_VOLTAGE_ABOVE_THRESHOLD_RECOVERED", "114": "EVENT_TRANSCEIVER_VOLTAGE_BELOW_THRESHOLD_RECOVERED", "115": "EVENT_TRANSCEIVER_TEMPERATURE_ABOVE_THRESHOLD_RECOVERED", "116": "EVENT_TRANSCEIVER_TEMPERATURE_BELOW_THRESHOLD_RECOVERED", "117": "EVENT_TRANSCEIVER_CURRENT_ABOVE_THRESHOLD_RECOVERED", "118": "EVENT_TRANSCEIVER_CURRENT_BELOW_THRESHOLD_RECOVERED", "119": "EVENT_TRANSCEIVER_RX_POWER_ABOVE_THRESHOLD_RECOVERED", "120": "EVENT_TRANSCEIVER_RX_POWER_BELOW_THRESHOLD_RECOVERED", "121": "EVENT_TRANSCEIVER_TX_POWER_ABOVE_THRESHOLD_RECOVERED", "122": "EVENT_TRANSCEIVER_TX_POWER_BELOW_THRESHOLD_RECOVERED", "123": "EVENT_TRANSCEIVER_FAILURE_RECOVERED", "200": "EVENT_PSU_PLUG_OUT", "201": "EVENT_PSU_PLUG_IN", "202": "EVENT_PSU_FAILURE", "203": "EVENT_PSU_FAILURE_RECOVERED", "300": "EVENT_FAN_FAILURE", "301": "EVENT_FAN_PLUG_OUT", "302": "EVENT_FAN_PLUG_IN", "303": "EVENT_FAN_FAILURE_RECOVERED", "400": "EVENT_CPU_TEMPERATURE_ABOVE_CRITICAL", "401": "EVENT_CPU_TEMPERATURE_ABOVE_FATAL", "402": "EVENT_CPU_TEMPERATURE_ABOVE_CRITICAL_RECOVERED", "403": "EVENT_CPU_TEMPERATURE_ABOVE_FATAL_RECOVERED", "500": "EVENT_HW_DEVICE_RESET", "501": "EVENT_HW_DEVICE_TEMPERATURE_ABOVE_CRITICAL", "502": "EVENT_HW_DEVICE_TEMPERATURE_ABOVE_FATAL", "503": "EVENT_HW_DEVICE_TEMPERATURE_ABOVE_CRITICAL_RECOVERED", "504": "EVENT_HW_DEVICE_TEMPERATURE_ABOVE_FATAL_RECOVERED", "505": "EVENT_HW_DEVICE_REBOOT"}}, {"name": "ValueType", "type": "message", "module": "hw_events_mgmt_service", "fields": [{"name": "val", "is_choice": true, "cases": [{"name": "int_val", "type": "int64", "lookup": false}, {"name": "uint_val", "type": "uint64", "lookup": false}, {"name": "float_val", "type": "float", "lookup": false}]}]}, {"name": "WaterMarks", "type": "message", "module": "hw_events_mgmt_service", "fields": [{"name": "high", "is_choice": false, "repeated": false, "type": "ValueType", "lookup": true}, {"name": "low", "is_choice": false, "repeated": false, "type": "ValueType", "lookup": true}]}, {"name": "Thresholds", "type": "message", "module": "hw_events_mgmt_service", "fields": [{"name": "threshold", "is_choice": true, "cases": [{"name": "upper", "type": "WaterMarks", "lookup": true}, {"name": "lower", "type": "WaterMarks", "lookup": true}]}]}, {"name": "ThresholdInformation", "type": "message", "module": "hw_events_mgmt_service", "fields": [{"name": "observed_value", "is_choice": false, "repeated": false, "type": "ValueType", "lookup": true}, {"name": "thresholds", "is_choice": false, "repeated": false, "type": "Thresholds", "lookup": true}]}, {"name": "EventCfg", "type": "message", "module": "hw_events_mgmt_service", "fields": [{"name": "event_id", "is_choice": false, "repeated": false, "type": "EventIds", "lookup": true}, {"name": "is_configured", "is_choice": false, "repeated": false, "type": "bool", "lookup": false}, {"name": "thresholds", "is_choice": false, "repeated": false, "type": "Thresholds", "lookup": true}]}, {"name": "EventsCfg", "type": "message", "module": "hw_events_mgmt_service", "fields": [{"name": "items", "is_choice": false, "repeated": true, "type": "EventCfg", "lookup": true}]}, {"name": "Reason", "type": "enum", "module": "hw_events_mgmt_service", "values": {"0": "UNDEFINED_REASON", "1": "UNKNOWN_DEVICE", "2": "INTERNAL_ERROR", "3": "DEVICE_UNREACHABLE"}}, {"name": "ListEventsResponse", "type": "message", "module": "hw_events_mgmt_service", "fields": [{"name": "status", "is_choice": false, "repeated": false, "type": "Status", "lookup": true}, {"name": "reason", "is_choice": false, "repeated": false, "type": "Reason", "lookup": true}, {"name": "events", "is_choice": false, "repeated": false, "type": "EventsCfg", "lookup": true}, {"name": "reason_detail", "is_choice": false, "repeated": false, "type": "string", "lookup": false}]}, {"name": "EventsConfigurationRequest", "type": "message", "module": "hw_events_mgmt_service", "fields": [{"name": "device_uuid", "is_choice": false, "repeated": false, "type": "Uuid", "lookup": true}, {"name": "operation", "is_choice": true, "cases": [{"name": "changes", "type": "EventsCfg", "lookup": true}, {"name": "reset_to_default", "type": "bool", "lookup": false}]}]}, {"name": "Reason", "type": "enum", "module": "hw_events_mgmt_service", "values": {"0": "UNDEFINED_REASON", "1": "UNKNOWN_DEVICE", "2": "INTERNAL_ERROR", "3": "INVALID_CONFIG", "4": "DEVICE_UNREACHABLE"}}, {"name": "EventsConfigurationResponse", "type": "message", "module": "hw_events_mgmt_service", "fields": [{"name": "status", "is_choice": false, "repeated": false, "type": "Status", "lookup": true}, {"name": "reason", "is_choice": false, "repeated": false, "type": "Reason", "lookup": true}, {"name": "reason_detail", "is_choice": false, "repeated": false, "type": "string", "lookup": false}]}, {"name": "EventMetaData", "type": "message", "module": "hw_events_mgmt_service", "fields": [{"name": "device_uuid", "is_choice": false, "repeated": false, "type": "Uuid", "lookup": true}, {"name": "component_uuid", "is_choice": false, "repeated": false, "type": "Uuid", "lookup": true}, {"name": "component_name", "is_choice": false, "repeated": false, "type": "string", "lookup": false}]}, {"name": "Event", "type": "message", "module": "hw_events_mgmt_service", "fields": [{"name": "event_metadata", "is_choice": false, "repeated": false, "type": "EventMetaData", "lookup": true}, {"name": "event_id", "is_choice": false, "repeated": false, "type": "EventIds", "lookup": true}, {"name": "raised_ts", "is_choice": false, "repeated": false, "type": "google.protobuf.Timestamp", "lookup": true}, {"name": "threshold_info", "is_choice": false, "repeated": false, "type": "ThresholdInformation", "lookup": true}, {"name": "add_info", "is_choice": false, "repeated": false, "type": "string", "lookup": false}]}, {"name": "ImageVersion", "type": "message", "module": "sw_image", "fields": [{"name": "image_name", "is_choice": false, "repeated": false, "type": "string", "lookup": false}, {"name": "version", "is_choice": false, "repeated": false, "type": "string", "lookup": false}]}, {"name": "ImageInformation", "type": "message", "module": "sw_image", "fields": [{"name": "image", "is_choice": false, "repeated": false, "type": "ImageVersion", "lookup": true}, {"name": "image_install_script", "is_choice": false, "repeated": false, "type": "string", "lookup": false}, {"name": "image_url", "is_choice": false, "repeated": false, "type": "string", "lookup": false}, {"name": "sha256sum", "is_choice": false, "repeated": false, "type": "string", "lookup": false}]}, {"name": "ImageState", "type": "enum", "module": "sw_image", "values": {"0": "UNDEFINED_STATE", "1": "COPYING_IMAGE", "2": "INSTALLING_IMAGE", "3": "COMMITTING_IMAGE", "4": "REBOOTING_DEVICE", "5": "UPGRADE_COMPLETE", "6": "UPGRADE_FAILED", "7": "ACTIVATION_COMPLETE", "8": "ACTIVATION_FAILED"}}, {"name": "Reason", "type": "enum", "module": "sw_image", "values": {"0": "UNDEFINED_REASON", "1": "ERROR_IN_REQUEST", "2": "INTERNAL_ERROR", "3": "DEVICE_IN_WRONG_STATE", "4": "INVALID_IMAGE", "5": "WRONG_IMAGE_CHECKSUM", "6": "OPERATION_ALREADY_IN_PROGRESS", "7": "UNKNOWN_DEVICE", "8": "DEVICE_NOT_REACHABLE"}}, {"name": "ImageStatus", "type": "message", "module": "sw_image", "fields": [{"name": "status", "is_choice": false, "repeated": false, "type": "Status", "lookup": true}, {"name": "reason", "is_choice": false, "repeated": false, "type": "Reason", "lookup": true}, {"name": "state", "is_choice": false, "repeated": false, "type": "ImageState", "lookup": true}, {"name": "description", "is_choice": false, "repeated": false, "type": "string", "lookup": false}, {"name": "reason_detail", "is_choice": false, "repeated": false, "type": "string", "lookup": false}]}, {"name": "PhysicalInventoryRequest", "type": "message", "module": "hw_management_service", "fields": [{"name": "device_uuid", "is_choice": false, "repeated": false, "type": "Uuid", "lookup": true}]}, {"name": "Reason", "type": "enum", "module": "hw_management_service", "values": {"0": "UNDEFINED_REASON", "1": "UNKNOWN_DEVICE", "2": "INTERNAL_ERROR", "3": "DEVICE_UNREACHABLE"}}, {"name": "PhysicalInventoryResponse", "type": "message", "module": "hw_management_service", "fields": [{"name": "status", "is_choice": false, "repeated": false, "type": "Status", "lookup": true}, {"name": "reason", "is_choice": false, "repeated": false, "type": "Reason", "lookup": true}, {"name": "inventory", "is_choice": false, "repeated": false, "type": "Hardware", "lookup": true}, {"name": "reason_detail", "is_choice": false, "repeated": false, "type": "string", "lookup": false}]}, {"name": "HWComponentInfoGetRequest", "type": "message", "module": "hw_management_service", "fields": [{"name": "device_uuid", "is_choice": false, "repeated": false, "type": "Uuid", "lookup": true}, {"name": "component_uuid", "is_choice": false, "repeated": false, "type": "Uuid", "lookup": true}, {"name": "component_name", "is_choice": false, "repeated": false, "type": "string", "lookup": false}]}, {"name": "Reason", "type": "enum", "module": "hw_management_service", "values": {"0": "UNDEFINED_REASON", "1": "UNKNOWN_DEVICE", "2": "UNKNOWN_COMPONENT", "3": "INTERNAL_ERROR", "4": "DEVICE_UNREACHABLE"}}, {"name": "HWComponentInfoGetResponse", "type": "message", "module": "hw_management_service", "fields": [{"name": "status", "is_choice": false, "repeated": false, "type": "Status", "lookup": true}, {"name": "reason", "is_choice": false, "repeated": false, "type": "Reason", "lookup": true}, {"name": "component", "is_choice": false, "repeated": false, "type": "Component", "lookup": true}, {"name": "reason_detail", "is_choice": false, "repeated": false, "type": "string", "lookup": false}]}, {"name": "HWComponentInfoSetRequest", "type": "message", "module": "hw_management_service", "fields": [{"name": "device_uuid", "is_choice": false, "repeated": false, "type": "Uuid", "lookup": true}, {"name": "component_uuid", "is_choice": false, "repeated": false, "type": "Uuid", "lookup": true}, {"name": "component_name", "is_choice": false, "repeated": false, "type": "string", "lookup": false}, {"name": "changes", "is_choice": false, "repeated": false, "type": "ModifiableComponent", "lookup": true}]}, {"name": "Reason", "type": "enum", "module": "hw_management_service", "values": {"0": "UNDEFINED_REASON", "1": "UNKNOWN_DEVICE", "2": "UNKNOWN_COMPONENT", "3": "INVALID_PARAMS", "4": "INTERNAL_ERROR", "5": "DEVICE_UNREACHABLE"}}, {"name": "HWComponentInfoSetResponse", "type": "message", "module": "hw_management_service", "fields": [{"name": "status", "is_choice": false, "repeated": false, "type": "Status", "lookup": true}, {"name": "reason", "is_choice": false, "repeated": false, "type": "Reason", "lookup": true}, {"name": "reason_detail", "is_choice": false, "repeated": false, "type": "string", "lookup": false}]}, {"name": "Reason", "type": "enum", "module": "hw_management_service", "values": {"0": "UNDEFINED_REASON", "1": "DEVICE_ALREADY_MANAGED", "2": "OPERATION_ALREADY_IN_PROGRESS", "3": "INVALID_PARAMS", "4": "INTERNAL_ERROR", "5": "AUTHENTICATION_FAILURE", "6": "INCOMPATIBLE_DEVICE"}}, {"name": "StartManagingDeviceResponse", "type": "message", "module": "hw_management_service", "fields": [{"name": "status", "is_choice": false, "repeated": false, "type": "Status", "lookup": true}, {"name": "reason", "is_choice": false, "repeated": false, "type": "Reason", "lookup": true}, {"name": "device_uuid", "is_choice": false, "repeated": false, "type": "Uuid", "lookup": true}, {"name": "reason_detail", "is_choice": false, "repeated": false, "type": "string", "lookup": false}]}, {"name": "StopManagingDeviceRequest", "type": "message", "module": "hw_management_service", "fields": [{"name": "name", "is_choice": false, "repeated": false, "type": "string", "lookup": false}]}, {"name": "Reason", "type": "enum", "module": "hw_management_service", "values": {"0": "UNDEFINED_REASON", "1": "UNKNOWN_DEVICE"}}, {"name": "StopManagingDeviceResponse", "type": "message", "module": "hw_management_service", "fields": [{"name": "status", "is_choice": false, "repeated": false, "type": "Status", "lookup": true}, {"name": "reason", "is_choice": false, "repeated": false, "type": "Reason", "lookup": true}, {"name": "reason_detail", "is_choice": false, "repeated": false, "type": "string", "lookup": false}]}, {"name": "ManagedDeviceInfo", "type": "message", "module": "hw_management_service", "fields": [{"name": "info", "is_choice": false, "repeated": false, "type": "ModifiableComponent", "lookup": true}, {"name": "device_uuid", "is_choice": false, "repeated": false, "type": "Uuid", "lookup": true}]}, {"name": "Reason", "type": "enum", "module": "hw_management_service", "values": {"0": "UNDEFINED_REASON", "1": "INTERNAL_ERROR"}}, {"name": "ManagedDevicesResponse", "type": "message", "module": "hw_management_service", "fields": [{"name": "status", "is_choice": false, "repeated": false, "type": "Status", "lookup": true}, {"name": "reason", "is_choice": false, "repeated": false, "type": "Reason", "lookup": true}, {"name": "devices", "is_choice": false, "repeated": true, "type": "ManagedDeviceInfo", "lookup": true}]}, {"name": "SetLoggingEndpointRequest", "type": "message", "module": "hw_management_service", "fields": [{"name": "device_uuid", "is_choice": false, "repeated": false, "type": "Uuid", "lookup": true}, {"name": "logging_endpoint", "is_choice": false, "repeated": false, "type": "string", "lookup": false}, {"name": "logging_protocol", "is_choice": false, "repeated": false, "type": "string", "lookup": false}]}, {"name": "Reason", "type": "enum", "module": "hw_management_service", "values": {"0": "UNDEFINED_REASON", "1": "UNKNOWN_DEVICE", "2": "INTERNAL_ERROR", "3": "LOGGING_ENDPOINT_ERROR", "4": "LOGGING_ENDPOINT_PROTOCOL_ERROR", "5": "MSGBUS_ENDPOINT_ERROR", "6": "DEVICE_UNREACHABLE"}}, {"name": "SetRemoteEndpointResponse", "type": "message", "module": "hw_management_service", "fields": [{"name": "status", "is_choice": false, "repeated": false, "type": "Status", "lookup": true}, {"name": "reason", "is_choice": false, "repeated": false, "type": "Reason", "lookup": true}, {"name": "reason_detail", "is_choice": false, "repeated": false, "type": "string", "lookup": false}]}, {"name": "Reason", "type": "enum", "module": "hw_management_service", "values": {"0": "UNDEFINED_REASON", "1": "UNKNOWN_DEVICE", "2": "INTERNAL_ERROR", "3": "DEVICE_UNREACHABLE"}}, {"name": "GetLoggingEndpointResponse", "type": "message", "module": "hw_management_service", "fields": [{"name": "status", "is_choice": false, "repeated": false, "type": "Status", "lookup": true}, {"name": "reason", "is_choice": false, "repeated": false, "type": "Reason", "lookup": true}, {"name": "logging_endpoint", "is_choice": false, "repeated": false, "type": "string", "lookup": false}, {"name": "logging_protocol", "is_choice": false, "repeated": false, "type": "string", "lookup": false}, {"name": "reason_detail", "is_choice": false, "repeated": false, "type": "string", "lookup": false}]}, {"name": "SetMsgBusEndpointRequest", "type": "message", "module": "hw_management_service", "fields": [{"name": "msgbus_endpoint", "is_choice": false, "repeated": false, "type": "string", "lookup": false}]}, {"name": "Reason", "type": "enum", "module": "hw_management_service", "values": {"0": "UNDEFINED_REASON", "1": "INTERNAL_ERROR", "2": "DEVICE_UNREACHABLE"}}, {"name": "GetMsgBusEndpointResponse", "type": "message", "module": "hw_management_service", "fields": [{"name": "status", "is_choice": false, "repeated": false, "type": "Status", "lookup": true}, {"name": "reason", "is_choice": false, "repeated": false, "type": "Reason", "lookup": true}, {"name": "msgbus_endpoint", "is_choice": false, "repeated": false, "type": "string", "lookup": false}, {"name": "reason_detail", "is_choice": false, "repeated": false, "type": "string", "lookup": false}]}, {"name": "EntitiesLogLevel", "type": "message", "module": "hw_management_service", "fields": [{"name": "logLevel", "is_choice": false, "repeated": false, "type": "LogLevel", "lookup": true}, {"name": "entities", "is_choice": false, "repeated": true, "type": "string", "lookup": false}]}, {"name": "SetLogLevelRequest", "type": "message", "module": "hw_management_service", "fields": [{"name": "device_uuid", "is_choice": false, "repeated": false, "type": "Uuid", "lookup": true}, {"name": "loglevels", "is_choice": false, "repeated": true, "type": "EntitiesLogLevel", "lookup": true}]}, {"name": "Reason", "type": "enum", "module": "hw_management_service", "values": {"0": "UNDEFINED_REASON", "1": "UNKNOWN_DEVICE", "2": "INTERNAL_ERROR", "3": "UNKNOWN_LOG_ENTITY", "4": "DEVICE_UNREACHABLE"}}, {"name": "SetLogLevelResponse", "type": "message", "module": "hw_management_service", "fields": [{"name": "device_uuid", "is_choice": false, "repeated": false, "type": "Uuid", "lookup": true}, {"name": "status", "is_choice": false, "repeated": false, "type": "Status", "lookup": true}, {"name": "reason", "is_choice": false, "repeated": false, "type": "Reason", "lookup": true}, {"name": "reason_detail", "is_choice": false, "repeated": false, "type": "string", "lookup": false}]}, {"name": "GetLogLevelRequest", "type": "message", "module": "hw_management_service", "fields": [{"name": "device_uuid", "is_choice": false, "repeated": false, "type": "Uuid", "lookup": true}, {"name": "entities", "is_choice": false, "repeated": true, "type": "string", "lookup": false}]}, {"name": "Reason", "type": "enum", "module": "hw_management_service", "values": {"0": "UNDEFINED_REASON", "1": "UNKNOWN_DEVICE", "2": "INTERNAL_ERROR", "3": "UNKNOWN_LOG_ENTITY", "4": "DEVICE_UNREACHABLE"}}, {"name": "GetLogLevelResponse", "type": "message", "module": "hw_management_service", "fields": [{"name": "device_uuid", "is_choice": false, "repeated": false, "type": "Uuid", "lookup": true}, {"name": "logLevels", "is_choice": false, "repeated": true, "type": "EntitiesLogLevel", "lookup": true}, {"name": "status", "is_choice": false, "repeated": false, "type": "Status", "lookup": true}, {"name": "reason", "is_choice": false, "repeated": false, "type": "Reason", "lookup": true}, {"name": "reason_detail", "is_choice": false, "repeated": false, "type": "string", "lookup": false}]}, {"name": "GetLoggableEntitiesRequest", "type": "message", "module": "hw_management_service", "fields": [{"name": "device_uuid", "is_choice": false, "repeated": false, "type": "Uuid", "lookup": true}]}, {"name": "Heartbeat", "type": "message", "module": "hw_management_service", "fields": [{"name": "heartbeat_signature", "is_choice": false, "repeated": false, "type": "fixed32", "lookup": false}]}, {"name": "RebootDeviceRequest", "type": "message", "module": "hw_management_service", "fields": [{"name": "device_uuid", "is_choice": false, "repeated": false, "type": "Uuid", "lookup": true}]}, {"name": "Reason", "type": "enum", "module": "hw_management_service", "values": {"0": "UNDEFINED_REASON", "1": "UNKNOWN_DEVICE", "2": "INTERNAL_ERROR", "3": "DEVICE_UNREACHABLE"}}, {"name": "RebootDeviceResponse", "type": "message", "module": "hw_management_service", "fields": [{"name": "status", "is_choice": false, "repeated": false, "type": "Status", "lookup": true}, {"name": "reason", "is_choice": false, "repeated": false, "type": "Reason", "lookup": true}, {"name": "reason_detail", "is_choice": false, "repeated": false, "type": "string", "lookup": false}]}, {"name": "SoftwareVersionInformation", "type": "message", "module": "sw_management_service", "fields": [{"name": "active_versions", "is_choice": false, "repeated": true, "type": "ImageVersion", "lookup": true}, {"name": "standby_versions", "is_choice": false, "repeated": true, "type": "ImageVersion", "lookup": true}]}, {"name": "Reason", "type": "enum", "module": "sw_management_service", "values": {"0": "UNDEFINED_REASON", "1": "UNKNOWN_DEVICE", "2": "INTERNAL_ERROR", "3": "DEVICE_UNREACHABLE"}}, {"name": "GetSoftwareVersionInformationResponse", "type": "message", "module": "sw_management_service", "fields": [{"name": "status", "is_choice": false, "repeated": false, "type": "Status", "lookup": true}, {"name": "reason", "is_choice": false, "repeated": false, "type": "Reason", "lookup": true}, {"name": "info", "is_choice": false, "repeated": false, "type": "SoftwareVersionInformation", "lookup": true}, {"name": "reason_detail", "is_choice": false, "repeated": false, "type": "string", "lookup": false}]}, {"name": "DownloadImageRequest", "type": "message", "module": "sw_management_service", "fields": [{"name": "device_uuid", "is_choice": false, "repeated": false, "type": "Uuid", "lookup": true}, {"name": "image_info", "is_choice": false, "repeated": false, "type": "ImageInformation", "lookup": true}]}, {"name": "ConfigRequest", "type": "message", "module": "sw_management_service", "fields": [{"name": "device_uuid", "is_choice": false, "repeated": false, "type": "Uuid", "lookup": true}, {"name": "config_url", "is_choice": false, "repeated": false, "type": "string", "lookup": false}]}, {"name": "Reason", "type": "enum", "module": "sw_management_service", "values": {"0": "UNDEFINED_REASON", "1": "UNKNOWN_DEVICE", "2": "INTERNAL_ERROR", "3": "ERROR_FETCHING_CONFIG", "4": "INVALID_CONFIG", "5": "OPERATION_ALREADY_IN_PROGRESS", "6": "DEVICE_UNREACHABLE"}}, {"name": "ConfigResponse", "type": "message", "module": "sw_management_service", "fields": [{"name": "status", "is_choice": false, "repeated": false, "type": "Status", "lookup": true}, {"name": "reason", "is_choice": false, "repeated": false, "type": "Reason", "lookup": true}, {"name": "reason_detail", "is_choice": false, "repeated": false, "type": "string", "lookup": false}]}, {"name": "StartupConfigInfoRequest", "type": "message", "module": "sw_management_service", "fields": [{"name": "device_uuid", "is_choice": false, "repeated": false, "type": "Uuid", "lookup": true}]}, {"name": "Reason", "type": "enum", "module": "sw_management_service", "values": {"0": "UNDEFINED_REASON", "1": "UNKNOWN_DEVICE", "2": "INTERNAL_ERROR", "3": "DEVICE_UNREACHABLE"}}, {"name": "StartupConfigInfoResponse", "type": "message", "module": "sw_management_service", "fields": [{"name": "status", "is_choice": false, "repeated": false, "type": "Status", "lookup": true}, {"name": "reason", "is_choice": false, "repeated": false, "type": "Reason", "lookup": true}, {"name": "config_url", "is_choice": false, "repeated": false, "type": "string", "lookup": false}, {"name": "version", "is_choice": false, "repeated": false, "type": "string", "lookup": false}, {"name": "reason_detail", "is_choice": false, "repeated": false, "type": "string", "lookup": false}]}], "services": [{"name": "NativeMetricsManagementService", "module": "hw_metrics_mgmt_service", "rpcs": [{"name": "ListMetrics", "request": {"is_stream": false, "type": "HardwareID", "lookup": true}, "response": {"is_stream": false, "type": "ListMetricsResponse", "lookup": true}}, {"name": "UpdateMetricsConfiguration", "request": {"is_stream": false, "type": "MetricsConfigurationRequest", "lookup": true}, "response": {"is_stream": false, "type": "MetricsConfigurationResponse", "lookup": true}}, {"name": "GetMetric", "request": {"is_stream": false, "type": "GetMetricRequest", "lookup": true}, "response": {"is_stream": false, "type": "GetMetricResponse", "lookup": true}}, {"name": "StreamMetrics", "request": {"is_stream": false, "type": "google.protobuf.Empty", "lookup": false}, "response": {"is_stream": true, "type": "Metric", "lookup": true}}]}, {"name": "NativeEventsManagementService", "module": "hw_events_mgmt_service", "rpcs": [{"name": "ListEvents", "request": {"is_stream": false, "type": "HardwareID", "lookup": true}, "response": {"is_stream": false, "type": "ListEventsResponse", "lookup": true}}, {"name": "UpdateEventsConfiguration", "request": {"is_stream": false, "type": "EventsConfigurationRequest", "lookup": true}, "response": {"is_stream": false, "type": "EventsConfigurationResponse", "lookup": true}}, {"name": "StreamEvents", "request": {"is_stream": false, "type": "google.protobuf.Empty", "lookup": false}, "response": {"is_stream": true, "type": "Event", "lookup": true}}]}, {"name": "NativeHWManagementService", "module": "hw_management_service", "rpcs": [{"name": "StartManagingDevice", "request": {"is_stream": false, "type": "ModifiableComponent", "lookup": true}, "response": {"is_stream": true, "type": "StartManagingDeviceResponse", "lookup": true}}, {"name": "StopManagingDevice", "request": {"is_stream": false, "type": "StopManagingDeviceRequest", "lookup": true}, "response": {"is_stream": false, "type": "StopManagingDeviceResponse", "lookup": true}}, {"name": "GetManagedDevices", "request": {"is_stream": false, "type": "google.protobuf.Empty", "lookup": false}, "response": {"is_stream": false, "type": "ManagedDevicesResponse", "lookup": true}}, {"name": "GetPhysicalInventory", "request": {"is_stream": false, "type": "PhysicalInventoryRequest", "lookup": true}, "response": {"is_stream": true, "type": "PhysicalInventoryResponse", "lookup": true}}, {"name": "GetHWComponentInfo", "request": {"is_stream": false, "type": "HWComponentInfoGetRequest", "lookup": true}, "response": {"is_stream": true, "type": "HWComponentInfoGetResponse", "lookup": true}}, {"name": "SetHWComponentInfo", "request": {"is_stream": false, "type": "HWComponentInfoSetRequest", "lookup": true}, "response": {"is_stream": false, "type": "HWComponentInfoSetResponse", "lookup": true}}, {"name": "SetLoggingEndpoint", "request": {"is_stream": false, "type": "SetLoggingEndpointRequest", "lookup": true}, "response": {"is_stream": false, "type": "SetRemoteEndpointResponse", "lookup": true}}, {"name": "GetLoggingEndpoint", "request": {"is_stream": false, "type": "HardwareID", "lookup": true}, "response": {"is_stream": false, "type": "GetLoggingEndpointResponse", "lookup": true}}, {"name": "SetMsgBusEndpoint", "request": {"is_stream": false, "type": "SetMsgBusEndpointRequest", "lookup": true}, "response": {"is_stream": false, "type": "SetRemoteEndpointResponse", "lookup": true}}, {"name": "GetMsgBusEndpoint", "request": {"is_stream": false, "type": "google.protobuf.Empty", "lookup": false}, "response": {"is_stream": false, "type": "GetMsgBusEndpointResponse", "lookup": true}}, {"name": "GetLoggableEntities", "request": {"is_stream": false, "type": "GetLoggableEntitiesRequest", "lookup": true}, "response": {"is_stream": false, "type": "GetLogLevelResponse", "lookup": true}}, {"name": "SetLogLevel", "request": {"is_stream": false, "type": "SetLogLevelRequest", "lookup": true}, "response": {"is_stream": false, "type": "SetLogLevelResponse", "lookup": true}}, {"name": "GetLogLevel", "request": {"is_stream": false, "type": "GetLogLevelRequest", "lookup": true}, "response": {"is_stream": false, "type": "GetLogLevelResponse", "lookup": true}}, {"name": "HeartbeatCheck", "request": {"is_stream": false, "type": "google.protobuf.Empty", "lookup": false}, "response": {"is_stream": false, "type": "Heartbeat", "lookup": true}}, {"name": "RebootDevice", "request": {"is_stream": false, "type": "RebootDeviceRequest", "lookup": true}, "response": {"is_stream": false, "type": "RebootDeviceResponse", "lookup": true}}]}, {"name": "NativeSoftwareManagementService", "module": "sw_management_service", "rpcs": [{"name": "GetSoftwareVersion", "request": {"is_stream": false, "type": "HardwareID", "lookup": true}, "response": {"is_stream": false, "type": "GetSoftwareVersionInformationResponse", "lookup": true}}, {"name": "DownloadImage", "request": {"is_stream": false, "type": "DownloadImageRequest", "lookup": true}, "response": {"is_stream": true, "type": "ImageStatus", "lookup": true}}, {"name": "ActivateImage", "request": {"is_stream": false, "type": "HardwareID", "lookup": true}, "response": {"is_stream": true, "type": "ImageStatus", "lookup": true}}, {"name": "RevertToStandbyImage", "request": {"is_stream": false, "type": "HardwareID", "lookup": true}, "response": {"is_stream": true, "type": "ImageStatus", "lookup": true}}, {"name": "UpdateStartupConfiguration", "request": {"is_stream": false, "type": "ConfigRequest", "lookup": true}, "response": {"is_stream": true, "type": "ConfigResponse", "lookup": true}}, {"name": "GetStartupConfigurationInfo", "request": {"is_stream": false, "type": "StartupConfigInfoRequest", "lookup": true}, "response": {"is_stream": false, "type": "StartupConfigInfoResponse", "lookup": true}}]}]}
\ No newline at end of file
diff --git a/grpc_robot/services/dmi/dmi_1_0_0/hw_events_mgmt_service.py b/grpc_robot/services/dmi/dmi_1_0_0/hw_events_mgmt_service.py
new file mode 100644
index 0000000..ff4f093
--- /dev/null
+++ b/grpc_robot/services/dmi/dmi_1_0_0/hw_events_mgmt_service.py
@@ -0,0 +1,44 @@
+# Copyright 2020-present Open Networking Foundation
+# Original copyright 2020-present ADTRAN, Inc.
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+from robot.api.deco import keyword
+from grpc_robot.services.service import is_connected
+
+from grpc_robot.services.service import Service
+from dmi import hw_events_mgmt_service_pb2_grpc, hw_events_mgmt_service_pb2, hw_pb2
+
+
+class NativeEventsManagementService(Service):
+
+ prefix = 'hw_event_mgmt_service_'
+
+ def __init__(self, ctx):
+ super().__init__(ctx=ctx, stub=hw_events_mgmt_service_pb2_grpc.NativeEventsManagementServiceStub)
+
+ # rpc ListEvents(HardwareID) returns(ListEventsResponse);
+ @keyword
+ @is_connected
+ def hw_event_mgmt_service_list_events(self, param_dict, **kwargs):
+ return self._grpc_helper(self.stub.ListEvents, hw_pb2.HardwareID, param_dict, **kwargs)
+
+ # rpc UpdateEventsConfiguration(EventsConfigurationRequest) returns(EventsConfigurationResponse);
+ @keyword
+ @is_connected
+ def hw_event_mgmt_service_update_events_configuration(self, param_dict, **kwargs):
+ return self._grpc_helper(self.stub.UpdateEventsConfiguration, hw_events_mgmt_service_pb2.EventsConfigurationRequest, param_dict, **kwargs)
+
+ # rpc StreamEvents(google.protobuf.Empty) returns(stream Event);
+ @keyword
+ @is_connected
+ def hw_event_mgmt_service_stream_events(self, **kwargs):
+ return self._grpc_helper(self.stub.StreamEvents, **kwargs)
diff --git a/grpc_robot/services/dmi/dmi_1_0_0/hw_management_service.py b/grpc_robot/services/dmi/dmi_1_0_0/hw_management_service.py
new file mode 100644
index 0000000..9d1a2dd
--- /dev/null
+++ b/grpc_robot/services/dmi/dmi_1_0_0/hw_management_service.py
@@ -0,0 +1,116 @@
+# Copyright 2020-present Open Networking Foundation
+# Original copyright 2020-present ADTRAN, Inc.
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+from robot.api.deco import keyword
+from ...service import is_connected
+
+from grpc_robot.services.service import Service
+from dmi import hw_management_service_pb2_grpc, hw_management_service_pb2, hw_pb2
+
+
+class NativeHWManagementService(Service):
+
+ prefix = 'hw_management_service_'
+
+ def __init__(self, ctx):
+ super().__init__(ctx=ctx, stub=hw_management_service_pb2_grpc.NativeHWManagementServiceStub)
+
+ # rpc StartManagingDevice(ModifiableComponent) returns(stream StartManagingDeviceResponse);
+ @keyword
+ @is_connected
+ def hw_management_service_start_managing_device(self, param_dict, **kwargs):
+ return self._grpc_helper(self.stub.StartManagingDevice, hw_pb2.ModifiableComponent, param_dict, **kwargs)
+
+ # rpc StopManagingDevice(StopManagingDeviceRequest) returns(StopManagingDeviceResponse);
+ @keyword
+ @is_connected
+ def hw_management_service_stop_managing_device(self, param_dict, **kwargs):
+ return self._grpc_helper(self.stub.StopManagingDevice, hw_management_service_pb2.StopManagingDeviceRequest, param_dict, **kwargs)
+
+ # rpc GetPhysicalInventory(PhysicalInventoryRequest) returns(stream PhysicalInventoryResponse);
+ @keyword
+ @is_connected
+ def hw_management_service_get_physical_inventory(self, param_dict, **kwargs):
+ return self._grpc_helper(self.stub.GetPhysicalInventory, hw_management_service_pb2.PhysicalInventoryRequest, param_dict, **kwargs)
+
+ # rpc GetHWComponentInfo(HWComponentInfoGetRequest) returns(stream HWComponentInfoGetResponse);
+ @keyword
+ @is_connected
+ def hw_management_service_get_hw_component_info(self, param_dict, **kwargs):
+ return self._grpc_helper(self.stub.GetHWComponentInfo, hw_management_service_pb2.HWComponentInfoGetRequest, param_dict, **kwargs)
+
+ # rpc SetHWComponentInfo(HWComponentInfoSetRequest) returns(HWComponentInfoSetResponse);
+ @keyword
+ @is_connected
+ def hw_management_service_set_hw_component_info(self, param_dict, **kwargs):
+ return self._grpc_helper(self.stub.SetHWComponentInfo, hw_management_service_pb2.HWComponentInfoSetRequest, param_dict, **kwargs)
+
+ # rpc GetManagedDevices(google.protobuf.Empty) returns(ManagedDevicesResponse);
+ @keyword
+ @is_connected
+ def hw_management_service_get_managed_devices(self, **kwargs):
+ return self._grpc_helper(self.stub.GetManagedDevices, **kwargs)
+
+ # rpc SetLoggingEndpoint(SetLoggingEndpointRequest) returns(SetRemoteEndpointResponse);
+ @keyword
+ @is_connected
+ def hw_management_service_set_logging_endpoint(self, param_dict, **kwargs):
+ return self._grpc_helper(self.stub.SetLoggingEndpoint, hw_management_service_pb2.SetLoggingEndpointRequest, param_dict, **kwargs)
+
+ # rpc GetLoggingEndpoint(HardwareID) returns(GetLoggingEndpointResponse);
+ @keyword
+ @is_connected
+ def hw_management_service_get_logging_endpoint(self, param_dict, **kwargs):
+ return self._grpc_helper(self.stub.GetLoggingEndpoint, hw_pb2.HardwareID, param_dict)
+
+ # rpc SetMsgBusEndpoint(SetMsgBusEndpointRequest) returns(SetRemoteEndpointResponse);
+ @keyword
+ @is_connected
+ def hw_management_service_set_msg_bus_endpoint(self, param_dict, **kwargs):
+ return self._grpc_helper(self.stub.SetMsgBusEndpoint, hw_management_service_pb2.SetMsgBusEndpointRequest, param_dict, **kwargs)
+
+ # rpc GetMsgBusEndpoint(google.protobuf.Empty) returns(GetMsgBusEndpointResponse);
+ @keyword
+ @is_connected
+ def hw_management_service_get_msg_bus_endpoint(self, **kwargs):
+ return self._grpc_helper(self.stub.GetMsgBusEndpoint, **kwargs)
+
+ # rpc GetLoggableEntities(GetLoggableEntitiesRequest) returns(GetLogLevelResponse);
+ @keyword
+ @is_connected
+ def hw_management_service_get_loggable_entities(self, param_dict, **kwargs):
+ return self._grpc_helper(self.stub.GetLoggableEntities, hw_management_service_pb2.GetLoggableEntitiesRequest, param_dict, **kwargs)
+
+ # rpc SetLogLevel(SetLogLevelRequest) returns(SetLogLevelResponse);
+ @keyword
+ @is_connected
+ def hw_management_service_set_log_level(self, param_dict, **kwargs):
+ return self._grpc_helper(self.stub.SetLogLevel, hw_management_service_pb2.SetLogLevelRequest, param_dict, **kwargs)
+
+ # rpc GetLogLevel(GetLogLevelRequest) returns(GetLogLevelResponse);
+ @keyword
+ @is_connected
+ def hw_management_service_get_log_level(self, param_dict, **kwargs):
+ return self._grpc_helper(self.stub.GetLogLevel, hw_management_service_pb2.GetLogLevelRequest, param_dict, **kwargs)
+
+ # rpc HeartbeatCheck(google.protobuf.Empty) returns (Heartbeat);
+ @keyword
+ @is_connected
+ def hw_management_service_heartbeat_check(self, **kwargs):
+ return self._grpc_helper(self.stub.HeartbeatCheck, **kwargs)
+
+ # rpc RebootDevice(RebootDeviceRequest) returns(RebootDeviceResponse);
+ @keyword
+ @is_connected
+ def hw_management_service_reboot_device(self, param_dict, **kwargs):
+ return self._grpc_helper(self.stub.RebootDevice, hw_management_service_pb2.RebootDeviceRequest, param_dict, **kwargs)
diff --git a/grpc_robot/services/dmi/dmi_1_0_0/hw_metrics_mgmt_service.py b/grpc_robot/services/dmi/dmi_1_0_0/hw_metrics_mgmt_service.py
new file mode 100644
index 0000000..bc983ec
--- /dev/null
+++ b/grpc_robot/services/dmi/dmi_1_0_0/hw_metrics_mgmt_service.py
@@ -0,0 +1,50 @@
+# Copyright 2020-present Open Networking Foundation
+# Original copyright 2020-present ADTRAN, Inc.
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+from robot.api.deco import keyword
+from grpc_robot.services.service import is_connected
+
+from grpc_robot.services.service import Service
+from dmi import hw_metrics_mgmt_service_pb2_grpc, hw_metrics_mgmt_service_pb2, hw_pb2
+
+
+class NativeMetricsManagementService(Service):
+
+ prefix = 'hw_metrics_mgmt_service_'
+
+ def __init__(self, ctx):
+ super().__init__(ctx=ctx, stub=hw_metrics_mgmt_service_pb2_grpc.NativeMetricsManagementServiceStub)
+
+ # rpc ListMetrics(HardwareID) returns(ListMetricsResponse);
+ @keyword
+ @is_connected
+ def hw_metrics_mgmt_service_list_metrics(self, param_dict, **kwargs):
+ return self._grpc_helper(self.stub.ListMetrics, hw_pb2.HardwareID, param_dict, **kwargs)
+
+ # rpc UpdateMetricsConfiguration(MetricsConfigurationRequest) returns(MetricsConfigurationResponse);
+ @keyword
+ @is_connected
+ def hw_metrics_mgmt_service_update_metrics_configuration(self, param_dict, **kwargs):
+ return self._grpc_helper(self.stub.UpdateMetricsConfiguration, hw_metrics_mgmt_service_pb2.MetricsConfigurationRequest, param_dict, **kwargs)
+
+ # rpc GetMetric(GetMetricRequest) returns(GetMetricResponse);
+ @keyword
+ @is_connected
+ def hw_metrics_mgmt_service_get_metric(self, param_dict, **kwargs):
+ return self._grpc_helper(self.stub.GetMetric, hw_metrics_mgmt_service_pb2.GetMetricRequest, param_dict, **kwargs)
+
+ # rpc StreamMetrics(google.protobuf.Empty) returns(stream Metric);
+ @keyword
+ @is_connected
+ def hw_metrics_mgmt_service_stream_metrics(self, **kwargs):
+ return self._grpc_helper(self.stub.StreamMetrics, **kwargs)
diff --git a/grpc_robot/services/service.py b/grpc_robot/services/service.py
new file mode 100644
index 0000000..da799c0
--- /dev/null
+++ b/grpc_robot/services/service.py
@@ -0,0 +1,254 @@
+# Copyright 2020-present Open Networking Foundation
+# Original copyright 2020-present ADTRAN, Inc.
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+import grpc
+from grpc import _channel, ChannelConnectivity
+from decorator import decorator
+
+from ..tools.protobuf_to_dict import protobuf_to_dict, dict_to_protobuf
+from ..tools.robot_tools import Collections
+from google.protobuf import empty_pb2
+
+
+# decorator to check if connection is open
+@decorator
+def is_connected(library_function, *args, **kwargs):
+ try:
+ assert args[0].ctx.grpc_channel is not None
+ grpc.channel_ready_future(args[0].ctx.grpc_channel).result(timeout=10)
+ except (AssertionError, grpc.FutureTimeoutError):
+ raise ConnectionError('not connected to a gRPC channel')
+
+ return library_function(*args, **kwargs)
+
+
+# unfortunately conversation from snake-case to camel-case does not work for all keyword names, so we define a mapping dict
+kw_name_mapping = {
+ 'GetHwComponentInfo': 'GetHWComponentInfo',
+ 'SetHwComponentInfo': 'SetHWComponentInfo'
+}
+
+one_of_note = """*Note*: Bold dictionary keys are cases of an ONEOF type that is not transmitted in gRPC.\n"""
+named_parameters_note = """*Named parameters*:\n
+- return_enum_integer: <bool> or <string>; Whether or not to return the enum values as integer values rather than their labels. Default: _${FALSE}_ or _false_.\n
+- return_defaults: <bool> or <string>; Whether or not to return the default values. Default: _${FALSE}_ or _false_.\n
+- timeout: <int> or <string>; Number of seconds to wait for the response. Default: The timeout value set by keywords _Connection Open_ and _Connection Parameters Set_."""
+
+
+class Service(object):
+
+ prefix = ''
+
+ def __init__(self, ctx, stub=None):
+ super().__init__()
+ self.ctx = ctx
+
+ try:
+ self.stub = stub(channel=ctx.grpc_channel)
+ except AttributeError:
+ self.stub = None
+
+ def get_next_type_def(self, type_name, module):
+
+ next_type_defs = [d for d in self.ctx.protobuf['data_types'] if d['name'] == type_name]
+
+ if not next_type_defs:
+ return None
+
+ if len(next_type_defs) > 1:
+ next_type_def = [d for d in next_type_defs if d['module'] == module]
+
+ if next_type_def:
+ return next_type_def[0]
+
+ else:
+ return next_type_defs[0]
+
+ else:
+ return next_type_defs[0]
+
+ def lookup_type_def(self, _type_def, _indent='', _lookup_table=None, enum_indent=''):
+
+ _lookup_table = _lookup_table or []
+
+ if _type_def['name'] in _lookup_table:
+ return '< recursive type: ' + _type_def['name'] + ' >'
+ else:
+ _lookup_table.append(_type_def['name'])
+
+ if _type_def['type'] == 'message':
+
+ doc_string = '{ # type: %s\n' % _type_def['name']
+ _indent += ' '
+
+ for field in _type_def['fields']:
+ if field.get('is_choice', False):
+ doc_string += self.get_field_doc(field, _indent, _lookup_table[:], _type_def['module'], field['name'])
+ else:
+ doc_string += "%s'%s': %s\n" % (_indent, field['name'], self.get_field_doc(field, _indent, _lookup_table[:], _type_def['module']))
+
+ return doc_string + _indent[:-2] + '}'
+
+ if _type_def['type'] == 'enum':
+
+ try:
+ k_len = 0
+ for k, v in _type_def['values'].items():
+ k_len = max(len(k), k_len)
+ enum = (' |\n %s%s' % (_indent, enum_indent)).join(['%s%s - %s' % ((k_len - len(k)) * ' ', k, v) for k, v in _type_def['values'].items()])
+
+ except AttributeError:
+ enum = ' | '.join(_type_def['values'])
+
+ return '< %s >' % enum
+
+ return ''
+
+ def get_field_doc(self, _type_def, _indent, _lookup_table, module, choice_name=''):
+
+ doc_string = ''
+
+ _indent = (_indent + ' ') if _type_def.get('repeated', False) else _indent
+
+ if _type_def.get('is_choice', False):
+ for case in _type_def['cases']:
+ # doc_string += "%s'*%s*' (ONEOF _%s_): %s\n" % (_indent, case['name'], choice_name, self.get_field_doc(case, _indent, _lookup_table[:], module))
+ doc_string += "%s'_ONEOF %s_: *%s*': %s\n" % (_indent, choice_name, case['name'], self.get_field_doc(case, _indent, _lookup_table[:], module))
+
+ elif _type_def.get('lookup', False):
+ try:
+ next_type_def = self.get_next_type_def(_type_def['type'], module=module)
+ if next_type_def is not None:
+ doc_string += self.lookup_type_def(next_type_def, _indent, _lookup_table, (len(_type_def['name']) + 5) * ' ')
+ else:
+ doc_string += "<%s>," % _type_def['type']
+
+ except KeyError:
+ doc_string += _type_def['type']
+ else:
+ doc_string += "<%s>," % _type_def['type']
+
+ if _type_def.get('repeated', False):
+ doc_string = '[ # list of:\n' + _indent + doc_string + '\n' + _indent[:-2] + ']'
+
+ return doc_string
+
+ def get_rpc_documentation(self, type_def, module):
+
+ indent = ' ' if type_def['is_stream'] else ''
+
+ if type_def['lookup']:
+ next_type_def = self.get_next_type_def(type_def['type'], module)
+ if next_type_def is not None:
+ doc_string = self.lookup_type_def(next_type_def, indent)
+ else:
+ doc_string = type_def['type'] + '\n'
+ else:
+ doc_string = type_def['type'] + '\n'
+
+ if type_def['is_stream']:
+ return '[ # list of:\n' + indent + doc_string + '\n]'
+ else:
+ return doc_string
+
+ def get_documentation(self, keyword_name):
+
+ keyword_name = Collections.to_camel_case(keyword_name.replace(self.prefix, ''), True)
+ keyword_name = kw_name_mapping.get(keyword_name, keyword_name)
+
+ try:
+ service = Collections.list_get_dict_by_value(self.ctx.protobuf.get('services', []), 'name', self.__class__.__name__)
+ except KeyError:
+ return 'no documentation available'
+
+ rpc = Collections.list_get_dict_by_value(service.get('rpcs', []), 'name', keyword_name)
+
+ doc_string = 'RPC _%s_ from _%s_.\n' % (rpc['name'], service['name'])
+ doc_string += '\n\n*Parameters*:\n'
+
+ for attr, attr_str in [('request', '- param_dict'), ('named_params', None), ('response', '*Return*')]:
+
+ if rpc.get(attr) is not None:
+ rpc_doc = '\n'.join(['| %s' % line for line in self.get_rpc_documentation(rpc.get(attr), service['module']).splitlines()])
+
+ if rpc_doc == '| google.protobuf.Empty':
+ doc_string += '_none_\n\n'
+ continue
+
+ doc_string += '\n%s:\n' % attr_str if '_ONEOF' not in rpc_doc else '\n%s: %s\n' % (attr_str, one_of_note)
+ doc_string += rpc_doc + '\n'
+
+ elif attr == 'named_params':
+ doc_string += named_parameters_note
+
+ return doc_string
+
+ @staticmethod
+ def to_protobuf(type_def, param_dict):
+ try:
+ return dict_to_protobuf(type_def or empty_pb2.Empty, param_dict or {})
+ except Exception as e:
+ raise ValueError('parameter dictionary does not match the ProtoBuf type definition: %s' % e)
+
+ def _process_response(self, response, index=None, **kwargs):
+
+ debug_text = 'RESPONSE' if index is None else 'RESPONSE-NEXT ' if index else 'RESPONSE-STREAM'
+
+ return_enum_integer = bool(str(kwargs.get('return_enum_integer', False)).lower() == 'true')
+ return_defaults = bool(str(kwargs.get('return_defaults', False)).lower() == 'true')
+
+ self.ctx.logger.debug('%s : data=%s' % (debug_text, response))
+ _response = protobuf_to_dict(response, use_enum_labels=not return_enum_integer, including_default_value_fields=return_defaults)
+
+ return _response
+
+ def _grpc_helper(self, func, arg_type=None, param_dict=None, **kwargs):
+
+ def generate_stream(arg, data_list):
+
+ for idx, data in enumerate(data_list):
+ _protobuf = self.to_protobuf(arg, data)
+ debug_text = 'REQUEST-NEXT :' if idx else 'REQUEST-STREAM : method=%s;' % func._method.decode()
+ self.ctx.logger.debug('%s data=%s' % (debug_text, _protobuf))
+ yield _protobuf
+
+ if isinstance(param_dict, list):
+ response = func(generate_stream(arg_type, param_dict), timeout=int(kwargs.get('timeout') or self.ctx.timeout))
+ else:
+ protobuf = self.to_protobuf(arg_type, param_dict)
+ self.ctx.logger.debug('REQUEST : method=%s; data=%s' % (func._method.decode(), protobuf))
+ response = func(protobuf, timeout=int(kwargs.get('timeout') or self.ctx.timeout))
+
+ try:
+
+ # streamed response is of type <grpc._channel._MultiThreadedRendezvous> and must be handle as list
+ if isinstance(response, _channel._MultiThreadedRendezvous):
+
+ return_list = []
+ for idx, list_item in enumerate(response):
+ return_list.append(self._process_response(list_item, index=idx, **kwargs))
+
+ return return_list
+
+ else:
+
+ return self._process_response(response, **kwargs)
+
+ except grpc.RpcError as e:
+ if e.code().name == 'DEADLINE_EXCEEDED':
+ self.ctx.logger.error('TimeoutError (%ss): %s' % (kwargs.get('timeout') or self.ctx.timeout, e))
+ raise TimeoutError('no response within %s seconds' % (kwargs.get('timeout') or self.ctx.timeout))
+ else:
+ self.ctx.logger.error(e)
+ raise e
+
diff --git a/grpc_robot/services/voltha/voltha_4_0_13/__init__.py b/grpc_robot/services/voltha/voltha_4_0_13/__init__.py
new file mode 100644
index 0000000..66de09c
--- /dev/null
+++ b/grpc_robot/services/voltha/voltha_4_0_13/__init__.py
@@ -0,0 +1,18 @@
+# Copyright 2020-present Open Networking Foundation
+# Original copyright 2020-present ADTRAN, Inc.
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+from .extension import *
+from .health_service import *
+from .openolt import *
+from .ponsim import *
+from .voltha_service import *
diff --git a/grpc_robot/services/voltha/voltha_4_0_13/extension.py b/grpc_robot/services/voltha/voltha_4_0_13/extension.py
new file mode 100644
index 0000000..ef379a1
--- /dev/null
+++ b/grpc_robot/services/voltha/voltha_4_0_13/extension.py
@@ -0,0 +1,41 @@
+# Copyright 2020-present Open Networking Foundation
+# Original copyright 2020-present ADTRAN, Inc.
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+from robot.api.deco import keyword
+from grpc_robot.services.service import is_connected
+
+from grpc_robot.services.service import Service
+from voltha_protos import extensions_pb2_grpc, extensions_pb2
+
+
+class Extension(Service):
+
+ prefix = 'extension_'
+
+ def __init__(self, ctx):
+ super().__init__(ctx=ctx, stub=extensions_pb2_grpc.ExtensionStub)
+
+ # rpc GetExtValue(SingleGetValueRequest) returns (SingleGetValueResponse);
+ @keyword
+ @is_connected
+ def extension_get_ext_value(self, param_dict, **kwargs):
+ return self._grpc_helper(self.stub.GetExtValue, extensions_pb2.SingleGetValueRequest, param_dict, **kwargs)
+
+ # rpc SetExtValue(SingleSetValueRequest) returns (SingleSetValueResponse);
+ @keyword
+ @is_connected
+ def extension_set_ext_value(self, param_dict, **kwargs):
+ return self._grpc_helper(self.stub.SetExtValue, extensions_pb2.SingleSetValueRequest, param_dict, **kwargs)
+
+
+
diff --git a/grpc_robot/services/voltha/voltha_4_0_13/health_service.py b/grpc_robot/services/voltha/voltha_4_0_13/health_service.py
new file mode 100644
index 0000000..72bb4f5
--- /dev/null
+++ b/grpc_robot/services/voltha/voltha_4_0_13/health_service.py
@@ -0,0 +1,32 @@
+# Copyright 2020-present Open Networking Foundation
+# Original copyright 2020-present ADTRAN, Inc.
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+from robot.api.deco import keyword
+from grpc_robot.services.service import is_connected
+
+from grpc_robot.services.service import Service
+from voltha_protos import health_pb2_grpc
+
+
+class HealthService(Service):
+
+ prefix = 'health_service_'
+
+ def __init__(self, ctx):
+ super().__init__(ctx=ctx, stub=health_pb2_grpc.HealthServiceStub)
+
+ # rpc GetHealthStatus(google.protobuf.Empty) returns (HealthStatus) {...};
+ @keyword
+ @is_connected
+ def hw_management_service_get_health_status(self, **kwargs):
+ return self._grpc_helper(self.stub.GetHealthStatus, **kwargs)
diff --git a/grpc_robot/services/voltha/voltha_4_0_13/openolt.py b/grpc_robot/services/voltha/voltha_4_0_13/openolt.py
new file mode 100644
index 0000000..2b6a26c
--- /dev/null
+++ b/grpc_robot/services/voltha/voltha_4_0_13/openolt.py
@@ -0,0 +1,200 @@
+# Copyright 2020-present Open Networking Foundation
+# Original copyright 2020-present ADTRAN, Inc.
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+from robot.api.deco import keyword
+from grpc_robot.services.service import is_connected
+
+from grpc_robot.services.service import Service
+from voltha_protos import openolt_pb2_grpc, openolt_pb2, tech_profile_pb2, ext_config_pb2
+
+
+class Openolt(Service):
+
+ prefix = 'open_olt_'
+
+ def __init__(self, ctx):
+ super().__init__(ctx=ctx, stub=openolt_pb2_grpc.OpenoltStub)
+
+ # rpc DisableOlt(Empty) returns (Empty) {...};
+ @keyword
+ @is_connected
+ def open_olt_disable_olt(self, **kwargs):
+ return self._grpc_helper(self.stub.DisableOlt, **kwargs)
+
+ # rpc ReenableOlt(Empty) returns (Empty) {...};
+ @keyword
+ @is_connected
+ def open_olt_reenable_olt(self, **kwargs):
+ return self._grpc_helper(self.stub.ReenableOlt, **kwargs)
+
+ # rpc ActivateOnu(Onu) returns (Empty) {...};
+ @keyword
+ @is_connected
+ def open_olt_activate_onu(self, param_dict, **kwargs):
+ return self._grpc_helper(self.stub.ActivateOnu, openolt_pb2.Onu, param_dict, **kwargs)
+
+ # rpc DeactivateOnu(Onu) returns (Empty) {...};
+ @keyword
+ @is_connected
+ def open_olt_deactivate_onu(self, param_dict, **kwargs):
+ return self._grpc_helper(self.stub.DeactivateOnu, openolt_pb2.Onu, param_dict, **kwargs)
+
+ # rpc DeleteOnu(Onu) returns (Empty) {...};
+ @keyword
+ @is_connected
+ def open_olt_delete_onu(self, param_dict, **kwargs):
+ return self._grpc_helper(self.stub.DeleteOnu, openolt_pb2.Onu, param_dict, **kwargs)
+
+ # rpc OmciMsgOut(OmciMsg) returns (Empty) {...};
+ @keyword
+ @is_connected
+ def open_olt_omci_msg_out(self, param_dict, **kwargs):
+ return self._grpc_helper(self.stub.OmciMsgOut, openolt_pb2.OmciMsg, param_dict, **kwargs)
+
+ # rpc OnuPacketOut(OnuPacket) returns (Empty) {...};
+ @keyword
+ @is_connected
+ def open_olt_onu_packet_out(self, param_dict, **kwargs):
+ return self._grpc_helper(self.stub.OnuPacketOut, openolt_pb2.OnuPacket, param_dict, **kwargs)
+
+ # rpc UplinkPacketOut(UplinkPacket) returns (Empty) {...};
+ @keyword
+ @is_connected
+ def open_olt_uplink_packet_out(self, param_dict, **kwargs):
+ return self._grpc_helper(self.stub.UplinkPacketOut, openolt_pb2.UplinkPacket, param_dict, **kwargs)
+
+ # rpc FlowAdd(Flow) returns (Empty) {...};
+ @keyword
+ @is_connected
+ def open_olt_flow_add(self, param_dict, **kwargs):
+ return self._grpc_helper(self.stub.FlowAdd, openolt_pb2.Flow, param_dict, **kwargs)
+
+ # rpc FlowRemove(Flow) returns (Empty) {...};
+ @keyword
+ @is_connected
+ def open_olt_flow_remove(self, param_dict, **kwargs):
+ return self._grpc_helper(self.stub.FlowRemove, openolt_pb2.Flow, param_dict, **kwargs)
+
+ # rpc HeartbeatCheck(Empty) returns (Heartbeat) {...};
+ @keyword
+ @is_connected
+ def open_olt_heartbeat_check(self, **kwargs):
+ return self._grpc_helper(self.stub.HeartbeatCheck, **kwargs)
+
+ # rpc EnablePonIf(Interface) returns (Empty) {...};
+ @keyword
+ @is_connected
+ def open_olt_enable_pon_if(self, param_dict, **kwargs):
+ return self._grpc_helper(self.stub.EnablePonIf, openolt_pb2.Interface, param_dict, **kwargs)
+
+ # rpc DisablePonIf(Interface) returns (Empty) {...};
+ @keyword
+ @is_connected
+ def open_olt_disable_pon_if(self, param_dict, **kwargs):
+ return self._grpc_helper(self.stub.DisablePonIf, openolt_pb2.Interface, param_dict, **kwargs)
+
+ # rpc GetDeviceInfo(Empty) returns (DeviceInfo) {...};
+ @keyword
+ @is_connected
+ def open_olt_get_device_info(self, **kwargs):
+ return self._grpc_helper(self.stub.GetDeviceInfo, **kwargs)
+
+ # rpc Reboot(Empty) returns (Empty) {...};
+ @keyword
+ @is_connected
+ def open_olt_reboot(self, **kwargs):
+ return self._grpc_helper(self.stub.Reboot, **kwargs)
+
+ # rpc CollectStatistics(Empty) returns (Empty) {...};
+ @keyword
+ @is_connected
+ def open_olt_collect_statistics(self, **kwargs):
+ return self._grpc_helper(self.stub.CollectStatistics, **kwargs)
+
+ # rpc GetOnuStatistics(Onu) returns (OnuStatistics) {...};
+ @keyword
+ @is_connected
+ def open_olt_get_onu_statistics(self, param_dict, **kwargs):
+ return self._grpc_helper(self.stub.GetOnuStatistics, openolt_pb2.Onu, param_dict, **kwargs)
+
+ # rpc GetGemPortStatistics(OnuPacket) returns (GemPortStatistics) {...};
+ @keyword
+ @is_connected
+ def open_olt_get_gem_port_statistics(self, param_dict, **kwargs):
+ return self._grpc_helper(self.stub.GetGemPortStatistics, openolt_pb2.OnuPacket, param_dict, **kwargs)
+
+ # rpc CreateTrafficSchedulers(tech_profile.TrafficSchedulers) returns (Empty) {...};
+ @keyword
+ @is_connected
+ def open_olt_create_traffic_schedulers(self, param_dict, **kwargs):
+ return self._grpc_helper(self.stub.CreateTrafficSchedulers, tech_profile_pb2.TrafficSchedulers, param_dict, **kwargs)
+
+ # rpc RemoveTrafficSchedulers(tech_profile.TrafficSchedulers) returns (Empty) {...};
+ @keyword
+ @is_connected
+ def open_olt_remove_traffic_schedulers(self, param_dict, **kwargs):
+ return self._grpc_helper(self.stub.RemoveTrafficSchedulers, tech_profile_pb2.TrafficSchedulers, param_dict, **kwargs)
+
+ # rpc CreateTrafficQueues(tech_profile.TrafficQueues) returns (Empty) {...};
+ @keyword
+ @is_connected
+ def open_olt_create_traffic_queues(self, param_dict, **kwargs):
+ return self._grpc_helper(self.stub.CreateTrafficQueues, tech_profile_pb2.TrafficQueues, param_dict, **kwargs)
+
+ # rpc RemoveTrafficQueues(tech_profile.TrafficQueues) returns (Empty) {...};
+ @keyword
+ @is_connected
+ def open_olt_remove_traffic_queues(self, param_dict, **kwargs):
+ return self._grpc_helper(self.stub.RemoveTrafficQueues, tech_profile_pb2.TrafficQueues, param_dict, **kwargs)
+
+ # rpc EnableIndication(Empty) returns (stream Indication) {...};
+ @keyword
+ @is_connected
+ def open_olt_enable_indication(self, **kwargs):
+ return self._grpc_helper(self.stub.EnableIndication, **kwargs)
+
+ # rpc PerformGroupOperation(Group) returns (Empty) {...};
+ @keyword
+ @is_connected
+ def open_olt_perform_group_operation(self, param_dict, **kwargs):
+ return self._grpc_helper(self.stub.PerformGroupOperation, openolt_pb2.Group, param_dict, **kwargs)
+
+ # rpc DeleteGroup(Group) returns (Empty) {...};
+ @keyword
+ @is_connected
+ def open_olt_delete_group(self, param_dict, **kwargs):
+ return self._grpc_helper(self.stub.DeleteGroup, openolt_pb2.Group, param_dict, **kwargs)
+
+ # rpc GetExtValue(ValueParam) returns (common.ReturnValues) {...};
+ @keyword
+ @is_connected
+ def open_olt_get_ext_value(self, param_dict, **kwargs):
+ return self._grpc_helper(self.stub.GetExtValue, openolt_pb2.ValueParam, param_dict, **kwargs)
+
+ # rpc OnuItuPonAlarmSet(config.OnuItuPonAlarm) returns (Empty) {...};
+ @keyword
+ @is_connected
+ def open_olt_onu_itu_pon_alarm_set(self, param_dict, **kwargs):
+ return self._grpc_helper(self.stub.OnuItuPonAlarmSet, ext_config_pb2.OnuItuPonAlarm, param_dict, **kwargs)
+
+ # rpc GetLogicalOnuDistanceZero(Onu) returns (OnuLogicalDistance) {...};
+ @keyword
+ @is_connected
+ def open_olt_get_logical_onu_distance_zero(self, param_dict, **kwargs):
+ return self._grpc_helper(self.stub.GetLogicalOnuDistanceZero, openolt_pb2.Onu, param_dict, **kwargs)
+
+ # rpc GetLogicalOnuDistance(Onu) returns (OnuLogicalDistance) {...};
+ @keyword
+ @is_connected
+ def open_olt_get_logical_onu_distance(self, param_dict, **kwargs):
+ return self._grpc_helper(self.stub.GetLogicalOnuDistanceF, openolt_pb2.Onu, param_dict, **kwargs)
diff --git a/grpc_robot/services/voltha/voltha_4_0_13/ponsim.py b/grpc_robot/services/voltha/voltha_4_0_13/ponsim.py
new file mode 100644
index 0000000..579a66d
--- /dev/null
+++ b/grpc_robot/services/voltha/voltha_4_0_13/ponsim.py
@@ -0,0 +1,56 @@
+# Copyright 2020-present Open Networking Foundation
+# Original copyright 2020-present ADTRAN, Inc.
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+from robot.api.deco import keyword
+from grpc_robot.services.service import is_connected
+
+from grpc_robot.services.service import Service
+from voltha_protos import ponsim_pb2_grpc, ponsim_pb2
+
+
+class PonSim(Service):
+
+ prefix = 'pon_sim_'
+
+ def __init__(self, ctx):
+ super().__init__(ctx=ctx, stub=ponsim_pb2_grpc.PonSimStub)
+
+ # rpc SendFrame(PonSimFrame) returns (google.protobuf.Empty) {}
+ @keyword
+ @is_connected
+ def pon_sim_send_frame(self, param_dict, **kwargs):
+ return self._grpc_helper(self.stub.SendFrame, ponsim_pb2.PonSimFrame, param_dict, **kwargs)
+
+ # rpc ReceiveFrames(google.protobuf.Empty) returns (stream PonSimFrame) {}
+ @keyword
+ @is_connected
+ def pon_sim_receive_frames(self, **kwargs):
+ return self._grpc_helper(self.stub.ReceiveFrames, **kwargs)
+
+ # rpc GetDeviceInfo(google.protobuf.Empty) returns(PonSimDeviceInfo) {}
+ @keyword
+ @is_connected
+ def pon_sim_get_device_info(self, **kwargs):
+ return self._grpc_helper(self.stub.GetDeviceInfo, **kwargs)
+
+ # rpc UpdateFlowTable(FlowTable) returns(google.protobuf.Empty) {}
+ @keyword
+ @is_connected
+ def pon_sim_update_flow_table(self, param_dict, **kwargs):
+ return self._grpc_helper(self.stub.UpdateFlowTable, ponsim_pb2.FlowTable, param_dict, **kwargs)
+
+ # rpc GetStats(google.protobuf.Empty) returns(PonSimMetrics) {}
+ @keyword
+ @is_connected
+ def pon_sim_get_stats(self, **kwargs):
+ return self._grpc_helper(self.stub.GetStats, **kwargs)
diff --git a/grpc_robot/services/voltha/voltha_4_0_13/voltha_service.py b/grpc_robot/services/voltha/voltha_4_0_13/voltha_service.py
new file mode 100644
index 0000000..66c5099
--- /dev/null
+++ b/grpc_robot/services/voltha/voltha_4_0_13/voltha_service.py
@@ -0,0 +1,404 @@
+# Copyright 2020-present Open Networking Foundation
+# Original copyright 2020-present ADTRAN, Inc.
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+from robot.api.deco import keyword
+from grpc_robot.services.service import is_connected
+
+from grpc_robot.services.service import Service
+from voltha_protos import voltha_pb2_grpc, voltha_pb2, common_pb2, openflow_13_pb2
+
+
+class VolthaService(Service):
+
+ prefix = 'voltha_service_'
+
+ def __init__(self, ctx):
+ super().__init__(ctx=ctx, stub=voltha_pb2_grpc.VolthaServiceStub)
+
+ # rpc GetMembership(google.protobuf.Empty) returns(Membership) {...};
+ @keyword
+ @is_connected
+ def voltha_service_get_membership(self, **kwargs):
+ return self._grpc_helper(self.stub.GetMembership, **kwargs)
+
+ # rpc UpdateMembership(Membership) returns(google.protobuf.Empty) {...};
+ @keyword
+ @is_connected
+ def voltha_service_update_membership(self, param_dict, **kwargs):
+ return self._grpc_helper(self.stub.UpdateMembership, voltha_pb2.Membership, param_dict, **kwargs)
+
+ # rpc GetVoltha(google.protobuf.Empty) returns(Voltha) {...};
+ @keyword
+ @is_connected
+ def voltha_service_get_voltha(self, **kwargs):
+ return self._grpc_helper(self.stub.GetVoltha, **kwargs)
+
+ # rpc ListCoreInstances(google.protobuf.Empty) returns(CoreInstances) {...};
+ @keyword
+ @is_connected
+ def voltha_service_list_core_instances(self, **kwargs):
+ return self._grpc_helper(self.stub.ListCoreInstances, **kwargs)
+
+ # rpc GetCoreInstance(common.ID) returns(CoreInstance) {...};
+ @keyword
+ @is_connected
+ def voltha_service_get_core_instance(self, param_dict, **kwargs):
+ return self._grpc_helper(self.stub.GetCoreInstance, common_pb2.ID, param_dict, **kwargs)
+
+ # rpc ListAdapters(google.protobuf.Empty) returns(Adapters) {...};
+ @keyword
+ @is_connected
+ def voltha_service_list_adapters(self, **kwargs):
+ return self._grpc_helper(self.stub.ListAdapters, **kwargs)
+
+ # rpc ListLogicalDevices(google.protobuf.Empty) returns(LogicalDevices) {...};
+ @keyword
+ @is_connected
+ def voltha_service_list_logical_devices(self, **kwargs):
+ return self._grpc_helper(self.stub.ListLogicalDevices, **kwargs)
+
+ # rpc GetLogicalDevice(common.ID) returns(LogicalDevice) {...};
+ @keyword
+ @is_connected
+ def voltha_service_get_logical_device(self, param_dict, **kwargs):
+ return self._grpc_helper(self.stub.GetLogicalDevice, common_pb2.ID, param_dict, **kwargs)
+
+ # rpc ListLogicalDevicePorts(common.ID) returns(LogicalPorts) {...};
+ @keyword
+ @is_connected
+ def voltha_service_list_logical_device_ports(self, param_dict, **kwargs):
+ return self._grpc_helper(self.stub.ListLogicalDevicePorts, common_pb2.ID, param_dict, **kwargs)
+
+ # rpc GetLogicalDevicePort(LogicalPortId) returns(LogicalPort) {...};
+ @keyword
+ @is_connected
+ def voltha_service_get_logical_device_port(self, param_dict, **kwargs):
+ return self._grpc_helper(self.stub.GetLogicalDevicePort, voltha_pb2.LogicalPortId, param_dict, **kwargs)
+
+ # rpc EnableLogicalDevicePort(LogicalPortId) returns(google.protobuf.Empty) {...};
+ @keyword
+ @is_connected
+ def voltha_service_enable_logical_device_port(self, param_dict, **kwargs):
+ return self._grpc_helper(self.stub.EnableLogicalDevicePort, voltha_pb2.LogicalPortId, param_dict, **kwargs)
+
+ # rpc DisableLogicalDevicePort(LogicalPortId) returns(google.protobuf.Empty) {...};
+ @keyword
+ @is_connected
+ def voltha_service_disable_logical_device_port(self, param_dict, **kwargs):
+ return self._grpc_helper(self.stub.DisableLogicalDevicePort, voltha_pb2.LogicalPortId, param_dict, **kwargs)
+
+ # rpc ListLogicalDeviceFlows(common.ID) returns(openflow_13.Flows) {...};
+ @keyword
+ @is_connected
+ def voltha_service_list_logical_device_flows(self, param_dict, **kwargs):
+ return self._grpc_helper(self.stub.ListLogicalDeviceFlows, common_pb2.ID, param_dict, **kwargs)
+
+ # rpc UpdateLogicalDeviceFlowTable(openflow_13.FlowTableUpdate) returns(google.protobuf.Empty) {...};
+ @keyword
+ @is_connected
+ def voltha_service_update_logical_device_flow_table(self, param_dict, **kwargs):
+ return self._grpc_helper(self.stub.UpdateLogicalDeviceFlowTable, openflow_13_pb2.FlowTableUpdate, param_dict, **kwargs)
+
+ # rpc UpdateLogicalDeviceMeterTable(openflow_13.MeterModUpdate) returns(google.protobuf.Empty) {...};
+ @keyword
+ @is_connected
+ def voltha_service_update_logical_device_meter_table(self, param_dict, **kwargs):
+ return self._grpc_helper(self.stub.UpdateLogicalDeviceMeterTable, openflow_13_pb2.MeterModUpdate, param_dict, **kwargs)
+
+ # rpc ListLogicalDeviceMeters(common.ID) returns (openflow_13.Meters) {...};
+ @keyword
+ @is_connected
+ def voltha_service_list_logical_device_meters(self, param_dict, **kwargs):
+ return self._grpc_helper(self.stub.ListLogicalDeviceMeters, common_pb2.ID, param_dict, **kwargs)
+
+ # rpc ListLogicalDeviceFlowGroups(common.ID) returns(openflow_13.FlowGroups) {...};
+ @keyword
+ @is_connected
+ def voltha_service_list_logical_device_flow_groups(self, param_dict, **kwargs):
+ return self._grpc_helper(self.stub.ListLogicalDeviceFlowGroups, common_pb2.ID, param_dict, **kwargs)
+
+ # rpc UpdateLogicalDeviceFlowGroupTable(openflow_13.FlowGroupTableUpdate) returns(google.protobuf.Empty) {...};
+ @keyword
+ @is_connected
+ def voltha_service_update_logical_device_flow_group_table(self, param_dict, **kwargs):
+ return self._grpc_helper(self.stub.UpdateLogicalDeviceFlowGroupTable, openflow_13_pb2.FlowGroupTableUpdate, param_dict, **kwargs)
+
+ # rpc ListDevices(google.protobuf.Empty) returns(Devices) {...};
+ @keyword
+ @is_connected
+ def voltha_service_list_devices(self, **kwargs):
+ return self._grpc_helper(self.stub.ListDevices, **kwargs)
+
+ # rpc ListDeviceIds(google.protobuf.Empty) returns(common.IDs) {...};
+ @keyword
+ @is_connected
+ def voltha_service_list_device_ids(self, **kwargs):
+ return self._grpc_helper(self.stub.ListDeviceIds, **kwargs)
+
+ # rpc ReconcileDevices(common.IDs) returns(google.protobuf.Empty) {...};
+ @keyword
+ @is_connected
+ def voltha_service_reconcile_devices(self, param_dict, **kwargs):
+ return self._grpc_helper(self.stub.ReconcileDevices, common_pb2.IDs, param_dict, **kwargs)
+
+ # rpc GetDevice(common.ID) returns(Device) {...};
+ @keyword
+ @is_connected
+ def voltha_service_get_device(self, param_dict, **kwargs):
+ return self._grpc_helper(self.stub.GetDevice, common_pb2.ID, param_dict, **kwargs)
+
+ # rpc CreateDevice(Device) returns(Device) {...};
+ @keyword
+ @is_connected
+ def voltha_service_create_device(self, param_dict, **kwargs):
+ return self._grpc_helper(self.stub.CreateDevice, voltha_pb2.Device, param_dict, **kwargs)
+
+ # rpc EnableDevice(common.ID) returns(google.protobuf.Empty) {...};
+ @keyword
+ @is_connected
+ def voltha_service_enable_device(self, param_dict, **kwargs):
+ return self._grpc_helper(self.stub.EnableDevice, common_pb2.ID, param_dict, **kwargs)
+
+ # rpc DisableDevice(common.ID) returns(google.protobuf.Empty) {...};
+ @keyword
+ @is_connected
+ def voltha_service_disable_device(self, param_dict, **kwargs):
+ return self._grpc_helper(self.stub.DisableDevice, common_pb2.ID, param_dict, **kwargs)
+
+ # rpc RebootDevice(common.ID) returns(google.protobuf.Empty) {...};
+ @keyword
+ @is_connected
+ def voltha_service_reboot_device(self, param_dict, **kwargs):
+ return self._grpc_helper(self.stub.RebootDevice, common_pb2.ID, param_dict, **kwargs)
+
+ # rpc DeleteDevice(common.ID) returns(google.protobuf.Empty) {...};
+ @keyword
+ @is_connected
+ def voltha_service_delete_device(self, param_dict, **kwargs):
+ return self._grpc_helper(self.stub.DeleteDevice, common_pb2.ID, param_dict, **kwargs)
+
+ # rpc ForceDeleteDevice(common.ID) returns(google.protobuf.Empty) {...};
+ @keyword
+ @is_connected
+ def voltha_service_force_delete_device(self, param_dict, **kwargs):
+ return self._grpc_helper(self.stub.ForceDeleteDevice, common_pb2.ID, param_dict, **kwargs)
+
+ # rpc DownloadImage(ImageDownload) returns(common.OperationResp) {...};
+ @keyword
+ @is_connected
+ def voltha_service_download_image(self, param_dict, **kwargs):
+ return self._grpc_helper(self.stub.DownloadImage, voltha_pb2.ImageDownload, param_dict, **kwargs)
+
+ # rpc GetImageDownloadStatus(ImageDownload) returns(ImageDownload) {...};
+ @keyword
+ @is_connected
+ def voltha_service_get_image_download_status(self, param_dict, **kwargs):
+ return self._grpc_helper(self.stub.GetImageDownloadStatus, voltha_pb2.ImageDownload, param_dict, **kwargs)
+
+ # rpc GetImageDownload(ImageDownload) returns(ImageDownload) {...};
+ @keyword
+ @is_connected
+ def voltha_service_get_image_download(self, param_dict, **kwargs):
+ return self._grpc_helper(self.stub.GetImageDownload, voltha_pb2.ImageDownload, param_dict, **kwargs)
+
+ # rpc ListImageDownloads(common.ID) returns(ImageDownloads) {...};
+ @keyword
+ @is_connected
+ def voltha_service_list_image_downloads(self, param_dict, **kwargs):
+ return self._grpc_helper(self.stub.ListImageDownloads, common_pb2.ID, param_dict, **kwargs)
+
+ # rpc CancelImageDownload(ImageDownload) returns(common.OperationResp) {...};
+ @keyword
+ @is_connected
+ def voltha_service_cancel_image_download(self, param_dict, **kwargs):
+ return self._grpc_helper(self.stub.CancelImageDownload, voltha_pb2.ImageDownload, param_dict, **kwargs)
+
+ # rpc ActivateImageUpdate(ImageDownload) returns(common.OperationResp) {...};
+ @keyword
+ @is_connected
+ def voltha_service_activate_image_update(self, param_dict, **kwargs):
+ return self._grpc_helper(self.stub.ActivateImageUpdate, voltha_pb2.ImageDownload, param_dict, **kwargs)
+
+ # rpc RevertImageUpdate(ImageDownload) returns(common.OperationResp) {...};
+ @keyword
+ @is_connected
+ def voltha_service_revert_image_update(self, param_dict, **kwargs):
+ return self._grpc_helper(self.stub.RevertImageUpdate, voltha_pb2.ImageDownload, param_dict, **kwargs)
+
+ # rpc ListDevicePorts(common.ID) returns(Ports) {...};
+ @keyword
+ @is_connected
+ def voltha_service_list_device_ports(self, param_dict, **kwargs):
+ return self._grpc_helper(self.stub.ListDevicePorts, common_pb2.ID, param_dict, **kwargs)
+
+ # rpc ListDevicePmConfigs(common.ID) returns(PmConfigs) {...};
+ @keyword
+ @is_connected
+ def voltha_service_list_device_pm_configs(self, param_dict, **kwargs):
+ return self._grpc_helper(self.stub.ListDevicePmConfigs, common_pb2.ID, param_dict, **kwargs)
+
+ # rpc UpdateDevicePmConfigs(voltha.PmConfigs) returns(google.protobuf.Empty) {...};
+ @keyword
+ @is_connected
+ def voltha_service_update_device_pm_configs(self, param_dict, **kwargs):
+ return self._grpc_helper(self.stub.UpdateDevicePmConfigs, voltha_pb2.PmConfigs, param_dict, **kwargs)
+
+ # rpc ListDeviceFlows(common.ID) returns(openflow_13.Flows) {...};
+ @keyword
+ @is_connected
+ def voltha_service_list_device_flows(self, param_dict, **kwargs):
+ return self._grpc_helper(self.stub.ListDeviceFlows, common_pb2.ID, param_dict, **kwargs)
+
+ # rpc ListDeviceFlowGroups(common.ID) returns(openflow_13.FlowGroups) {...};
+ @keyword
+ @is_connected
+ def voltha_service_list_device_flow_groups(self, param_dict, **kwargs):
+ return self._grpc_helper(self.stub.ListDeviceFlowGroups, common_pb2.ID, param_dict, **kwargs)
+
+ # rpc ListDeviceTypes(google.protobuf.Empty) returns(DeviceTypes) {...};
+ @keyword
+ @is_connected
+ def voltha_service_list_device_types(self, **kwargs):
+ return self._grpc_helper(self.stub.ListDeviceTypes, **kwargs)
+
+ # rpc GetDeviceType(common.ID) returns(DeviceType) {...};
+ @keyword
+ @is_connected
+ def voltha_service_get_device_type(self, param_dict, **kwargs):
+ return self._grpc_helper(self.stub.GetDeviceType, common_pb2.ID, param_dict, **kwargs)
+
+ # rpc ListDeviceGroups(google.protobuf.Empty) returns(DeviceGroups) {...};
+ @keyword
+ @is_connected
+ def voltha_service_list_device_groups(self, **kwargs):
+ return self._grpc_helper(self.stub.ListDeviceGroups, **kwargs)
+
+ # rpc StreamPacketsOut(stream openflow_13.PacketOut) returns(google.protobuf.Empty) {...};
+ @keyword
+ @is_connected
+ def voltha_service_stream_packets_out(self, param_dict, **kwargs):
+ return self._grpc_helper(self.stub.StreamPacketsOut, openflow_13_pb2.PacketOut, param_dict, **kwargs)
+
+ # rpc ReceivePacketsIn(google.protobuf.Empty) returns(stream openflow_13.PacketIn) {...};
+ @keyword
+ @is_connected
+ def voltha_service_receive_packets_in(self, **kwargs):
+ return self._grpc_helper(self.stub.ReceivePacketsIn, **kwargs)
+
+ # rpc ReceiveChangeEvents(google.protobuf.Empty) returns(stream openflow_13.ChangeEvent) {...};
+ @keyword
+ @is_connected
+ def voltha_service_receive_change_events(self, **kwargs):
+ return self._grpc_helper(self.stub.ReceiveChangeEvents, **kwargs)
+
+ # rpc GetDeviceGroup(common.ID) returns(DeviceGroup) {...};
+ @keyword
+ @is_connected
+ def voltha_service_get_device_group(self, param_dict, **kwargs):
+ return self._grpc_helper(self.stub.GetDeviceGroup, common_pb2.ID, param_dict, **kwargs)
+
+ # rpc CreateEventFilter(EventFilter) returns(EventFilter) {...};
+ @keyword
+ @is_connected
+ def voltha_service_create_event_filter(self, param_dict, **kwargs):
+ return self._grpc_helper(self.stub.CreateEventFilter, voltha_pb2.EventFilter, param_dict, **kwargs)
+
+ # rpc GetEventFilter(common.ID) returns(EventFilters) {...};
+ @keyword
+ @is_connected
+ def voltha_service_get_event_filter(self, param_dict, **kwargs):
+ return self._grpc_helper(self.stub.GetEventFilter, common_pb2.ID, param_dict, **kwargs)
+
+ # rpc UpdateEventFilter(EventFilter) returns(EventFilter) {...};
+ @keyword
+ @is_connected
+ def voltha_service_update_event_filter(self, param_dict, **kwargs):
+ return self._grpc_helper(self.stub.UpdateEventFilter, voltha_pb2.EventFilter, param_dict, **kwargs)
+
+ # rpc DeleteEventFilter(EventFilter) returns(google.protobuf.Empty) {...};
+ @keyword
+ @is_connected
+ def voltha_service_delete_event_filter(self, param_dict, **kwargs):
+ return self._grpc_helper(self.stub.DeleteEventFilter, voltha_pb2.EventFilter, param_dict, **kwargs)
+
+ # rpc ListEventFilters(google.protobuf.Empty) returns(EventFilters) {...};
+ @keyword
+ @is_connected
+ def voltha_service_list_event_filters(self, **kwargs):
+ return self._grpc_helper(self.stub.ListEventFilters, **kwargs)
+
+ # rpc GetImages(common.ID) returns(Images) {...};
+ @keyword
+ @is_connected
+ def voltha_service_get_images(self, param_dict, **kwargs):
+ return self._grpc_helper(self.stub.GetImages, common_pb2.ID, param_dict, **kwargs)
+
+ # rpc SelfTest(common.ID) returns(SelfTestResponse) {...};
+ @keyword
+ @is_connected
+ def voltha_service_self_test(self, param_dict, **kwargs):
+ return self._grpc_helper(self.stub.SelfTest, common_pb2.ID, param_dict, **kwargs)
+
+ # rpc GetMibDeviceData(common.ID) returns(omci.MibDeviceData) {...};
+ @keyword
+ @is_connected
+ def voltha_service_get_mib_device_data(self, param_dict, **kwargs):
+ return self._grpc_helper(self.stub.GetMibDeviceData, common_pb2.ID, param_dict, **kwargs)
+
+ # rpc GetAlarmDeviceData(common.ID) returns(omci.AlarmDeviceData) {...};
+ @keyword
+ @is_connected
+ def voltha_service_get_alarm_device_data(self, param_dict, **kwargs):
+ return self._grpc_helper(self.stub.GetAlarmDeviceData, common_pb2.ID, param_dict, **kwargs)
+
+ # rpc SimulateAlarm(SimulateAlarmRequest) returns(common.OperationResp) {...};
+ @keyword
+ @is_connected
+ def voltha_service_simulate_alarm(self, param_dict, **kwargs):
+ return self._grpc_helper(self.stub.SimulateAlarm, voltha_pb2.SimulateAlarmRequest, param_dict, **kwargs)
+
+ # rpc Subscribe (OfAgentSubscriber) returns (OfAgentSubscriber) {...};
+ @keyword
+ @is_connected
+ def voltha_service_subscribe(self, param_dict, **kwargs):
+ return self._grpc_helper(self.stub.Subscribe, voltha_pb2.OfAgentSubscriber, param_dict, **kwargs)
+
+ # rpc EnablePort(voltha.Port) returns(google.protobuf.Empty) {...};
+ @keyword
+ @is_connected
+ def voltha_service_enable_port(self, param_dict, **kwargs):
+ return self._grpc_helper(self.stub.EnablePort, voltha_pb2.Port, param_dict, **kwargs)
+
+ # rpc DisablePort(voltha.Port) returns(google.protobuf.Empty) {...};
+ @keyword
+ @is_connected
+ def voltha_service_disable_port(self, param_dict, **kwargs):
+ return self._grpc_helper(self.stub.DisablePort, voltha_pb2.Port, param_dict, **kwargs)
+
+ # rpc GetExtValue(common.ValueSpecifier) returns(common.ReturnValues) {...};
+ @keyword
+ @is_connected
+ def voltha_service_get_ext_value(self, param_dict, **kwargs):
+ return self._grpc_helper(self.stub.GetExtValue, common_pb2.ValueSpecifier, param_dict, **kwargs)
+
+ # rpc SetExtValue(ValueSet) returns(google.protobuf.Empty) {...};
+ @keyword
+ @is_connected
+ def voltha_service_set_ext_value(self, param_dict, **kwargs):
+ return self._grpc_helper(self.stub.SetExtValue, voltha_pb2.ValueSet, param_dict, **kwargs)
+
+ # rpc StartOmciTestAction(OmciTestRequest) returns(TestResponse) {...};
+ @keyword
+ @is_connected
+ def voltha_service_start_omci_test_action(self, param_dict, **kwargs):
+ return self._grpc_helper(self.stub.StartOmciTestAction, voltha_pb2.OmciTestRequest, param_dict, **kwargs)
diff --git a/grpc_robot/services/voltha/voltha_4_2_0/__init__.py b/grpc_robot/services/voltha/voltha_4_2_0/__init__.py
new file mode 100644
index 0000000..d482d83
--- /dev/null
+++ b/grpc_robot/services/voltha/voltha_4_2_0/__init__.py
@@ -0,0 +1,18 @@
+# Copyright 2020-present Open Networking Foundation
+# Original copyright 2020-present ADTRAN, Inc.
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+from ..voltha_4_0_13.extension import *
+from ..voltha_4_0_13.health_service import *
+from ..voltha_4_0_13.openolt import *
+from ..voltha_4_0_13.ponsim import *
+from ..voltha_4_0_13.voltha_service import *
diff --git a/grpc_robot/tools/__init__.py b/grpc_robot/tools/__init__.py
new file mode 100644
index 0000000..b1ed822
--- /dev/null
+++ b/grpc_robot/tools/__init__.py
@@ -0,0 +1,13 @@
+# Copyright 2020-present Open Networking Foundation
+# Original copyright 2020-present ADTRAN, Inc.
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
diff --git a/grpc_robot/tools/dmi_tools.py b/grpc_robot/tools/dmi_tools.py
new file mode 100644
index 0000000..5bdb168
--- /dev/null
+++ b/grpc_robot/tools/dmi_tools.py
@@ -0,0 +1,84 @@
+# Copyright 2020-present Open Networking Foundation
+# Original copyright 2020-present ADTRAN, Inc.
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+from grpc_robot.grpc_robot import _package_version_get
+
+from dmi import hw_metrics_mgmt_service_pb2, hw_events_mgmt_service_pb2
+from ..tools.protobuf_to_dict import protobuf_to_dict
+
+
+class DmiTools(object):
+ """
+ Tools for the device-management-interface, e.g decoding / conversions.
+ """
+
+ try:
+ ROBOT_LIBRARY_VERSION = _package_version_get('grpc_robot')
+ except NameError:
+ ROBOT_LIBRARY_VERSION = 'unknown'
+
+ @staticmethod
+ def hw_metrics_mgmt_decode_metric(bytestring, return_enum_integer='false', return_defaults='false', human_readable_timestamps='true'):
+ """
+ Converts bytes to a Metric as defined in _message Metric_ from hw_metrics_mgmt_service.proto
+
+ *Parameters*:
+ - bytestring: <bytes>; Byte string, e.g. as it comes from Kafka messages.
+ - return_enum_integer: <string> or <bool>; Whether or not to return the enum values as integer values rather than their labels. Default: _false_.
+ - return_defaults: <string> or <bool>; Whether or not to return the default values. Default: _false_.
+ - human_readable_timestamps: <string> or <bool>; Whether or not to convert the timestamps to human-readable format. Default: _true_.
+
+ *Return*: A dictionary with same structure as the _metric_ key from the return dictionary of keyword _Hw Metrics Mgmt Service Get Metric_.
+
+ *Example*:
+ | Import Library | grpc_robot.DmiTools | WITH NAME | dmi_tools |
+ | ${kafka_records} | kafka.Records Get |
+ | FOR | ${kafka_record} | IN | @{kafka_records} |
+ | | ${metric} | dmi_tools.Hw Metrics Mgmt Decode Metric | ${kafka_record}[message] |
+ | | Log | ${metric} |
+ | END |
+ """
+ return_enum_integer = str(return_enum_integer).lower() == 'true'
+ metric = hw_metrics_mgmt_service_pb2.Metric.FromString(bytestring)
+ return protobuf_to_dict(metric,
+ use_enum_labels=not return_enum_integer,
+ including_default_value_fields=str(return_defaults).lower() == 'true',
+ human_readable_timestamps=str(human_readable_timestamps).lower() == 'true')
+
+ @staticmethod
+ def hw_events_mgmt_decode_event(bytestring, return_enum_integer='false', return_defaults='false', human_readable_timestamps='true'):
+ """
+ Converts bytes to a Event as defined in _message Event_ from hw_events_mgmt_service.proto
+
+ *Parameters*:
+ - bytestring: <bytes>; Byte string, e.g. as it comes from Kafka messages.
+ - return_enum_integer: <string> or <bool>; Whether or not to return the enum values as integer values rather than their labels. Default: _false_.
+ - return_defaults: <string> or <bool>; Whether or not to return the default values. Default: _false_.
+ - human_readable_timestamps: <string> or <bool>; Whether or not to convert the timestamps to human-readable format. Default: _true_.
+
+ *Return*: A dictionary with same structure as the _event_ key from the return dictionary of keyword _Hw Event Mgmt Service List Events_.
+
+ *Example*:
+ | Import Library | grpc_robot.DmiTools | WITH NAME | dmi_tools |
+ | ${kafka_records} | kafka.Records Get |
+ | FOR | ${kafka_record} | IN | @{kafka_records} |
+ | | ${event} | dmi_tools.Hw Events Mgmt Decode Event | ${kafka_record}[message] |
+ | | Log | ${event} |
+ | END |
+ """
+ return_enum_integer = str(return_enum_integer).lower() == 'true'
+ event = hw_events_mgmt_service_pb2.Event.FromString(bytestring)
+ return protobuf_to_dict(event,
+ use_enum_labels=not return_enum_integer,
+ including_default_value_fields=str(return_defaults).lower() == 'true',
+ human_readable_timestamps=str(human_readable_timestamps).lower() == 'true')
diff --git a/grpc_robot/tools/protobuf_parse.py b/grpc_robot/tools/protobuf_parse.py
new file mode 100644
index 0000000..f11e1a3
--- /dev/null
+++ b/grpc_robot/tools/protobuf_parse.py
@@ -0,0 +1,456 @@
+# Copyright 2020-present Open Networking Foundation
+# Original copyright 2020-present ADTRAN, Inc.
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# -*- coding: utf-8 -*-
+
+# Parser for protocol buffer .proto files
+import enum as stdlib_enum
+from string import ascii_letters, digits, hexdigits, octdigits
+
+import attr
+
+from parsy import char_from, from_enum, generate, regex, seq, string
+
+# This file follows the spec at
+# https://developers.google.com/protocol-buffers/docs/reference/proto3-spec
+# very closely.
+
+# However, because we are parsing into useful objects, we do transformations
+# along the way e.g. turning into integers, strings etc. and custom objects.
+# Some of the lowest level items have been implemented using 'regex' and converting
+# the descriptions to regular expressions. Higher level constructs have been
+# implemented using other parsy primitives and combinators.
+
+# Notes:
+
+# 1. Whitespace is very badly defined in the 'spec', so we guess what is meant.
+# 2. The spec doesn't allow for comments, and neither does this parser.
+# Other places mention that C++ style comments are allowed. To support that,
+# this parser would need to be changed into split lexing/parsing stages
+# (otherwise you hit issues with comments start markers within string literals).
+# 3. Other notes inline.
+
+
+# Our utilities
+optional_string = lambda s: string(s).times(0, 1).concat()
+convert_decimal = int
+convert_octal = lambda s: int(s, 8)
+convert_hex = lambda s: int(s, 16)
+exclude_none = lambda l: [i for i in l if i is not None]
+
+
+def lexeme(p):
+ """
+ From a parser (or string), make a parser that consumes
+ whitespace on either side.
+ """
+ if isinstance(p, str):
+ p = string(p)
+ return regex(r'\s*') >> p << regex(r'\s*')
+
+
+def is_present(p):
+ """
+ Given a parser or string, make a parser that returns
+ True if the parser matches, False otherwise
+ """
+ return lexeme(p).optional().map(lambda v: False if v is None else True)
+
+
+# Our data structures
+@attr.s
+class Import:
+ identifier = attr.ib()
+ option = attr.ib()
+
+
+@attr.s
+class Package:
+ identifer = attr.ib()
+
+
+@attr.s
+class Option:
+ name = attr.ib()
+ value = attr.ib()
+
+
+@attr.s
+class Field:
+ repeated = attr.ib()
+ type = attr.ib()
+ name = attr.ib()
+ number = attr.ib()
+ options = attr.ib()
+
+
+@attr.s
+class OneOfField:
+ type = attr.ib()
+ name = attr.ib()
+ number = attr.ib()
+ options = attr.ib()
+
+
+@attr.s
+class OneOf:
+ name = attr.ib()
+ fields = attr.ib()
+
+
+@attr.s
+class Map:
+ key_type = attr.ib()
+ type = attr.ib()
+ name = attr.ib()
+ number = attr.ib()
+ options = attr.ib()
+
+
+@attr.s
+class Reserved:
+ items = attr.ib()
+
+
+@attr.s
+class Range:
+ from_ = attr.ib()
+ to = attr.ib()
+
+
+@attr.s
+class EnumField:
+ name = attr.ib()
+ value = attr.ib()
+ options = attr.ib()
+
+
+@attr.s
+class Enum:
+ name = attr.ib()
+ body = attr.ib()
+
+
+@attr.s
+class Message:
+ name = attr.ib()
+ body = attr.ib()
+
+
+@attr.s
+class Service:
+ name = attr.ib()
+ body = attr.ib()
+
+
+@attr.s
+class Rpc:
+ name = attr.ib()
+ request_stream = attr.ib()
+ request_message_type = attr.ib()
+ response_stream = attr.ib()
+ response_message_type = attr.ib()
+ options = attr.ib()
+
+
+@attr.s
+class Proto:
+ syntax = attr.ib()
+ statements = attr.ib()
+
+
+# Enums:
+class ImportOption(stdlib_enum.Enum):
+ WEAK = "weak"
+ PUBLIC = "public"
+
+
+class Type(stdlib_enum.Enum):
+ DOUBLE = "double"
+ FLOAT = "float"
+ INT32 = "int32"
+ INT64 = "int64"
+ UINT32 = "uint32"
+ UINT64 = "uint64"
+ SINT32 = "sint32"
+ SINT64 = "sint64"
+ FIXED32 = "fixed32"
+ FIXED64 = "fixed64"
+ SFIXED32 = "sfixed32"
+ SFIXED64 = "sfixed64"
+ BOOL = "bool"
+ STRING = "string"
+ BYTES = "bytes"
+
+
+class KeyType(stdlib_enum.Enum):
+ INT32 = "int32"
+ INT64 = "int64"
+ UINT32 = "uint32"
+ UINT64 = "uint64"
+ SINT32 = "sint32"
+ SINT64 = "sint64"
+ FIXED32 = "fixed32"
+ FIXED64 = "fixed64"
+ SFIXED32 = "sfixed32"
+ SFIXED64 = "sfixed64"
+ BOOL = "bool"
+ STRING = "string"
+
+
+# Some extra constants to avoid typing
+SEMI, EQ, LPAREN, RPAREN, LBRACE, RBRACE, LBRAC, RBRAC = [lexeme(c) for c in ";=(){}[]"]
+
+
+# -- Beginning of following spec --
+# Letters and digits
+letter = char_from(ascii_letters)
+decimalDigit = char_from(digits)
+octalDigit = char_from(octdigits)
+hexDigit = char_from(hexdigits)
+
+# Identifiers
+
+# Compared to spec, we add some '_' prefixed items which are not wrapped in `lexeme`,
+# on the assumption that spaces in the middle of identifiers are not accepted.
+_ident = (letter + (letter | decimalDigit | string("_")).many().concat()).desc('ident')
+ident = lexeme(_ident)
+fullIdent = lexeme(ident + (string(".") + ident).many().concat()).desc('fullIdent')
+_messageName = _ident
+messageName = lexeme(ident).desc('messageName')
+_enumName = ident
+enumName = lexeme(_enumName).desc('enumName')
+fieldName = ident.desc('fieldName')
+oneofName = ident.desc('oneofName')
+mapName = ident.desc('mapName')
+serviceName = ident.desc('serviceName')
+rpcName = ident.desc('rpcName')
+messageType = optional_string(".") + (_ident + string(".")).many().concat() + _messageName
+enumType = optional_string(".") + (_ident + string(".")).many().concat() + _enumName
+
+# Integer literals
+decimalLit = regex("[1-9][0-9]*").desc('decimalLit').map(convert_decimal)
+octalLit = regex("0[0-7]*").desc('octalLit').map(convert_octal)
+hexLit = regex("0[x|X][0-9a-fA-F]+").desc('octalLit').map(convert_hex)
+intLit = decimalLit | octalLit | hexLit
+
+
+# Floating-point literals
+decimals = r'[0-9]+'
+exponent = r'[e|E][+|-]?' + decimals
+floatLit = regex(r'({decimals}\.({decimals})?({exponent})?)|{decimals}{exponent}|\.{decimals}({exponent})?'
+ .format(decimals=decimals, exponent=exponent)).desc('floatLit').map(float)
+
+
+# Boolean
+boolLit = (string("true").result(True) | string("false").result(False)).desc('boolLit')
+
+
+# String literals
+hexEscape = regex(r"\\[x|X]") >> regex("[0-9a-fA-F]{2}").map(convert_hex).map(chr)
+octEscape = regex(r"\\") >> regex('[0-7]{2}').map(convert_octal).map(chr)
+charEscape = regex(r"\\") >> (
+ string("a").result("\a")
+ | string("b").result("\b")
+ | string("f").result("\f")
+ | string("n").result("\n")
+ | string("r").result("\r")
+ | string("t").result("\t")
+ | string("v").result("\v")
+ | string("\\").result("\\")
+ | string("'").result("'")
+ | string('"').result('"')
+)
+escapes = hexEscape | octEscape | charEscape
+# Correction to spec regarding " and ' inside quoted strings
+strLit = (string("'") >> (escapes | regex(r"[^\0\n\'\\]")).many().concat() << string("'")
+ | string('"') >> (escapes | regex(r"[^\0\n\"\\]")).many().concat() << string('"')).desc('strLit')
+quote = string("'") | string('"')
+
+# EmptyStatement
+emptyStatement = string(";").result(None)
+
+# Signed numbers:
+# (Extra compared to spec, to cope with need to produce signed numeric values)
+signedNumberChange = lambda s, num: (-1) if s == "-" else (+1)
+sign = regex("[-+]?")
+signedIntLit = seq(sign, intLit).combine(signedNumberChange)
+signedFloatLit = seq(sign, floatLit).combine(signedNumberChange)
+
+
+# Constant
+# put fullIdent at end to disabmiguate from boolLit
+constant = signedIntLit | signedFloatLit | strLit | boolLit | fullIdent
+
+# Syntax
+syntax = lexeme("syntax") >> EQ >> quote >> string("proto3") << quote + SEMI
+
+# Import Statement
+import_option = from_enum(ImportOption)
+
+import_ = seq(lexeme("import") >> import_option.optional().tag('option'),
+ lexeme(strLit).tag('identifier') << SEMI).combine_dict(Import)
+
+# Package
+package = seq(lexeme("package") >> fullIdent << SEMI).map(Package)
+
+# Option
+optionName = (ident | (LPAREN >> fullIdent << RPAREN)) + (string(".") + ident).many().concat()
+option = seq(lexeme("option") >> optionName.tag('name'),
+ EQ >> constant.tag('value') << SEMI,
+ ).combine_dict(Option)
+
+# Normal field
+type_ = lexeme(from_enum(Type) | messageType | enumType)
+fieldNumber = lexeme(intLit)
+
+fieldOption = seq(optionName.tag('name'),
+ EQ >> constant.tag('value')).combine_dict(Option)
+fieldOptions = fieldOption.sep_by(lexeme(","), min=1)
+fieldOptionList = (lexeme("[") >> fieldOptions << lexeme("]")).optional().map(
+ lambda o: [] if o is None else o)
+
+field = seq(is_present("repeated").tag('repeated'),
+ type_.tag('type'),
+ fieldName.tag('name') << EQ,
+ fieldNumber.tag('number'),
+ fieldOptionList.tag('options') << SEMI,
+ ).combine_dict(Field)
+
+# Oneof and oneof field
+oneofField = seq(type_.tag('type'),
+ fieldName.tag('name') << EQ,
+ fieldNumber.tag('number'),
+ fieldOptionList.tag('options') << SEMI,
+ ).combine_dict(OneOfField)
+oneof = seq(lexeme("oneof") >> oneofName.tag('name'),
+ LBRACE
+ >> (oneofField | emptyStatement).many().map(exclude_none).tag('fields')
+ << RBRACE
+ ).combine_dict(OneOf)
+
+# Map field
+keyType = lexeme(from_enum(KeyType))
+mapField = seq(lexeme("map") >> lexeme("<") >> keyType.tag('key_type'),
+ lexeme(",") >> type_.tag('type'),
+ lexeme(">") >> mapName.tag('name'),
+ EQ >> fieldNumber.tag('number'),
+ fieldOptionList.tag('options') << SEMI
+ ).combine_dict(Map)
+
+# Reserved
+range_ = seq(lexeme(intLit).tag('from_'),
+ (lexeme("to") >> (intLit | lexeme("max"))).optional().tag('to')
+ ).combine_dict(Range)
+ranges = range_.sep_by(lexeme(","), min=1)
+# The spec for 'reserved' indicates 'fieldName' here, which is never a quoted string.
+# But the example has a quoted string. We have changed it to 'strLit'
+fieldNames = strLit.sep_by(lexeme(","), min=1)
+reserved = seq(lexeme("reserved") >> (ranges | fieldNames) << SEMI
+ ).combine(Reserved)
+
+# Enum definition
+enumValueOption = seq(optionName.tag('name') << EQ,
+ constant.tag('value')
+ ).combine_dict(Option)
+enumField = seq(ident.tag('name') << EQ,
+ lexeme(intLit).tag('value'),
+ (lexeme("[") >> enumValueOption.sep_by(lexeme(","), min=1) << lexeme("]")).optional()
+ .map(lambda o: [] if o is None else o).tag('options')
+ << SEMI
+ ).combine_dict(EnumField)
+enumBody = (LBRACE
+ >> (option | enumField | emptyStatement).many().map(exclude_none)
+ << RBRACE)
+enum = seq(lexeme("enum") >> enumName.tag('name'),
+ enumBody.tag('body')
+ ).combine_dict(Enum)
+
+
+# Message definition
+@generate
+def message():
+ yield lexeme("message")
+ name = yield messageName
+ body = yield messageBody
+ return Message(name=name, body=body)
+
+
+messageBody = (LBRACE
+ >> (field | enum | message | option | oneof | mapField
+ | reserved | emptyStatement).many()
+ << RBRACE)
+
+
+# Service definition
+rpc = seq(lexeme("rpc") >> rpcName.tag('name'),
+ LPAREN
+ >> (is_present("stream").tag("request_stream")),
+ messageType.tag("request_message_type") << RPAREN,
+ lexeme("returns") >> LPAREN
+ >> (is_present("stream").tag("response_stream")),
+ messageType.tag("response_message_type")
+ << RPAREN,
+ ((LBRACE
+ >> (option | emptyStatement).many()
+ << RBRACE)
+ | SEMI.result([])
+ ).optional().map(exclude_none).tag('options')
+ ).combine_dict(Rpc)
+
+service = seq(lexeme("service") >> serviceName.tag('name'),
+ LBRACE
+ >> (option | rpc | emptyStatement).many().map(exclude_none).tag('body')
+ << RBRACE
+ ).combine_dict(Service)
+
+
+# Proto file
+topLevelDef = message | enum | service
+proto = seq(syntax.tag('syntax'),
+ (import_ | package | option | topLevelDef | emptyStatement
+ ).many().map(exclude_none).tag('statements')
+ ).combine_dict(Proto)
+
+
+EXAMPLE = """syntax = "proto3";
+import public "other.proto";
+option java_package = "com.example.foo";
+option java_package = "com.example.foo";
+package dmi;
+
+enum EnumAllowingAlias {
+ option allow_alias = true;
+ UNKNOWN = 0;
+ STARTED = 1;
+ RUNNING = 2 [(custom_option) = "hello world"];
+}
+message outer {
+ option (my_option).a = true;
+ message inner {
+ int64 ival = 1;
+ }
+ repeated inner inner_message = 2;
+ EnumAllowingAlias enum_field =3;
+ map<int32, string> my_map = 4;
+ oneof operation {
+ MetricsConfig changes = 2;
+ bool reset_to_default = 3;
+ }
+}
+"""
+# Smoke test - should find 4 top level statements in the example:
+# assert len(proto.parse(EXAMPLE).statements) == 4
+# print(proto.parse(EXAMPLE).statements)
+# for st in proto.parse(EXAMPLE).statements:
+# print(type(st))
diff --git a/grpc_robot/tools/protobuf_to_dict.py b/grpc_robot/tools/protobuf_to_dict.py
new file mode 100644
index 0000000..19ebf1a
--- /dev/null
+++ b/grpc_robot/tools/protobuf_to_dict.py
@@ -0,0 +1,281 @@
+# Copyright 2020-present Open Networking Foundation
+# Original copyright 2020-present ADTRAN, Inc.
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+
+# This is free and unencumbered software released into the public domain
+# by its author, Ben Hodgson <ben@benhodgson.com>.
+#
+# Anyone is free to copy, modify, publish, use, compile, sell, or
+# distribute this software, either in source code form or as a compiled
+# binary, for any purpose, commercial or non-commercial, and by any
+# means.
+#
+# In jurisdictions that recognise copyright laws, the author or authors
+# of this software dedicate any and all copyright interest in the
+# software to the public domain. We make this dedication for the benefit
+# of the public at large and to the detriment of our heirs and
+# successors. We intend this dedication to be an overt act of
+# relinquishment in perpetuity of all present and future rights to this
+# software under copyright law.
+#
+# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+# EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+# IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR
+# OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
+# ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+# OTHER DEALINGS IN THE SOFTWARE.
+#
+# For more information, please refer to <http://unlicense.org/>
+
+
+# -*- coding:utf-8 -*-
+
+# copied from https://github.com/kaporzhu/protobuf-to-dict
+# all credits to this script go to Kapor Zhu (kapor.zhu@gmail.com)
+#
+# Comments:
+# - need a fix for bug: "Use enum_label when setting the default value if use_enum_labels is true" (line 95)
+# - try to convert timestaps to a human readable format
+
+import base64
+
+import six
+from datetime import datetime
+
+from google.protobuf.message import Message
+from google.protobuf.descriptor import FieldDescriptor
+
+
+__all__ = ["protobuf_to_dict", "TYPE_CALLABLE_MAP", "dict_to_protobuf",
+ "REVERSE_TYPE_CALLABLE_MAP"]
+
+
+EXTENSION_CONTAINER = '___X'
+
+
+TYPE_CALLABLE_MAP = {
+ FieldDescriptor.TYPE_DOUBLE: float,
+ FieldDescriptor.TYPE_FLOAT: float,
+ FieldDescriptor.TYPE_INT32: int,
+ FieldDescriptor.TYPE_INT64: int if six.PY3 else six.integer_types[1],
+ FieldDescriptor.TYPE_UINT32: int,
+ FieldDescriptor.TYPE_UINT64: int if six.PY3 else six.integer_types[1],
+ FieldDescriptor.TYPE_SINT32: int,
+ FieldDescriptor.TYPE_SINT64: int if six.PY3 else six.integer_types[1],
+ FieldDescriptor.TYPE_FIXED32: int,
+ FieldDescriptor.TYPE_FIXED64: int if six.PY3 else six.integer_types[1],
+ FieldDescriptor.TYPE_SFIXED32: int,
+ FieldDescriptor.TYPE_SFIXED64: int if six.PY3 else six.integer_types[1],
+ FieldDescriptor.TYPE_BOOL: bool,
+ FieldDescriptor.TYPE_STRING: six.text_type,
+ FieldDescriptor.TYPE_BYTES: six.binary_type,
+ FieldDescriptor.TYPE_ENUM: int,
+}
+
+
+def repeated(type_callable):
+ return lambda value_list: [type_callable(value) for value in value_list]
+
+
+def enum_label_name(field, value):
+ return field.enum_type.values_by_number[int(value)].name
+
+
+def _is_map_entry(field):
+ return (field.type == FieldDescriptor.TYPE_MESSAGE and
+ field.message_type.has_options and
+ field.message_type.GetOptions().map_entry)
+
+
+def protobuf_to_dict(pb, type_callable_map=TYPE_CALLABLE_MAP,
+ use_enum_labels=False,
+ including_default_value_fields=False,
+ human_readable_timestamps=False):
+ result_dict = {}
+ extensions = {}
+ for field, value in pb.ListFields():
+ if field.message_type and field.message_type.has_options and field.message_type.GetOptions().map_entry:
+ result_dict[field.name] = dict()
+ value_field = field.message_type.fields_by_name['value']
+ type_callable = _get_field_value_adaptor(
+ pb, value_field, type_callable_map,
+ use_enum_labels, including_default_value_fields)
+ for k, v in value.items():
+ result_dict[field.name][k] = type_callable(v)
+ continue
+ type_callable = _get_field_value_adaptor(pb, field, type_callable_map,
+ use_enum_labels,
+ including_default_value_fields,
+ human_readable_timestamps)
+ if field.label == FieldDescriptor.LABEL_REPEATED:
+ type_callable = repeated(type_callable)
+
+ if field.is_extension:
+ extensions[str(field.number)] = type_callable(value)
+ continue
+
+ if field.full_name in ['google.protobuf.Timestamp.seconds'] and human_readable_timestamps:
+ result_dict[field.name] = datetime.fromtimestamp(type_callable(value)).strftime('%Y-%m-%d %H:%M:%S.%f')
+ else:
+ result_dict[field.name] = type_callable(value)
+
+ # Serialize default value if including_default_value_fields is True.
+ if including_default_value_fields:
+ for field in pb.DESCRIPTOR.fields:
+ # Singular message fields and oneof fields will not be affected.
+ if ((
+ field.label != FieldDescriptor.LABEL_REPEATED and
+ field.cpp_type == FieldDescriptor.CPPTYPE_MESSAGE) or
+ field.containing_oneof):
+ continue
+ if field.name in result_dict:
+ # Skip the field which has been serailized already.
+ continue
+ if _is_map_entry(field):
+ result_dict[field.name] = {}
+ else:
+ if use_enum_labels and field.type == FieldDescriptor.TYPE_ENUM:
+ result_dict[field.name] = enum_label_name(field, field.default_value)
+ else:
+ result_dict[field.name] = field.default_value
+
+ if extensions:
+ result_dict[EXTENSION_CONTAINER] = extensions
+ return result_dict
+
+
+def _get_field_value_adaptor(pb, field, type_callable_map=TYPE_CALLABLE_MAP,
+ use_enum_labels=False,
+ including_default_value_fields=False,
+ human_readable_timestamps=False):
+ if field.type == FieldDescriptor.TYPE_MESSAGE:
+ # recursively encode protobuf sub-message
+ return lambda pb: protobuf_to_dict(
+ pb, type_callable_map=type_callable_map,
+ use_enum_labels=use_enum_labels,
+ including_default_value_fields=including_default_value_fields,
+ human_readable_timestamps=human_readable_timestamps
+ )
+
+ if use_enum_labels and field.type == FieldDescriptor.TYPE_ENUM:
+ return lambda value: enum_label_name(field, value)
+
+ if field.type in type_callable_map:
+ return type_callable_map[field.type]
+
+ raise TypeError("Field %s.%s has unrecognised type id %d" % (
+ pb.__class__.__name__, field.name, field.type))
+
+
+REVERSE_TYPE_CALLABLE_MAP = {
+}
+
+
+def dict_to_protobuf(pb_klass_or_instance, values, type_callable_map=REVERSE_TYPE_CALLABLE_MAP, strict=True, ignore_none=False):
+ """Populates a protobuf model from a dictionary.
+
+ :param pb_klass_or_instance: a protobuf message class, or an protobuf instance
+ :type pb_klass_or_instance: a type or instance of a subclass of google.protobuf.message.Message
+ :param dict values: a dictionary of values. Repeated and nested values are
+ fully supported.
+ :param dict type_callable_map: a mapping of protobuf types to callables for setting
+ values on the target instance.
+ :param bool strict: complain if keys in the map are not fields on the message.
+ :param bool strict: ignore None-values of fields, treat them as empty field
+ """
+ if isinstance(pb_klass_or_instance, Message):
+ instance = pb_klass_or_instance
+ else:
+ instance = pb_klass_or_instance()
+ return _dict_to_protobuf(instance, values, type_callable_map, strict, ignore_none)
+
+
+def _get_field_mapping(pb, dict_value, strict):
+ field_mapping = []
+ for key, value in dict_value.items():
+ if key == EXTENSION_CONTAINER:
+ continue
+ if key not in pb.DESCRIPTOR.fields_by_name:
+ if strict:
+ raise KeyError("%s does not have a field called %s" % (pb, key))
+ continue
+ field_mapping.append((pb.DESCRIPTOR.fields_by_name[key], value, getattr(pb, key, None)))
+
+ for ext_num, ext_val in dict_value.get(EXTENSION_CONTAINER, {}).items():
+ try:
+ ext_num = int(ext_num)
+ except ValueError:
+ raise ValueError("Extension keys must be integers.")
+ if ext_num not in pb._extensions_by_number:
+ if strict:
+ raise KeyError("%s does not have a extension with number %s. Perhaps you forgot to import it?" % (pb, key))
+ continue
+ ext_field = pb._extensions_by_number[ext_num]
+ pb_val = None
+ pb_val = pb.Extensions[ext_field]
+ field_mapping.append((ext_field, ext_val, pb_val))
+
+ return field_mapping
+
+
+def _dict_to_protobuf(pb, value, type_callable_map, strict, ignore_none):
+ fields = _get_field_mapping(pb, value, strict)
+
+ for field, input_value, pb_value in fields:
+ if ignore_none and input_value is None:
+ continue
+ if field.label == FieldDescriptor.LABEL_REPEATED:
+ if field.message_type and field.message_type.has_options and field.message_type.GetOptions().map_entry:
+ value_field = field.message_type.fields_by_name['value']
+ for key, value in input_value.items():
+ if value_field.cpp_type == FieldDescriptor.CPPTYPE_MESSAGE:
+ _dict_to_protobuf(getattr(pb, field.name)[key], value, type_callable_map, strict, ignore_none)
+ else:
+ getattr(pb, field.name)[key] = value
+ continue
+ for item in input_value:
+ if field.type == FieldDescriptor.TYPE_MESSAGE:
+ m = pb_value.add()
+ _dict_to_protobuf(m, item, type_callable_map, strict, ignore_none)
+ elif field.type == FieldDescriptor.TYPE_ENUM and isinstance(item, six.string_types):
+ pb_value.append(_string_to_enum(field, item))
+ else:
+ pb_value.append(item)
+ continue
+ if field.type == FieldDescriptor.TYPE_MESSAGE:
+ _dict_to_protobuf(pb_value, input_value, type_callable_map, strict, ignore_none)
+ continue
+
+ if field.type in type_callable_map:
+ input_value = type_callable_map[field.type](input_value)
+
+ if field.is_extension:
+ pb.Extensions[field] = input_value
+ continue
+
+ if field.type == FieldDescriptor.TYPE_ENUM and isinstance(input_value, six.string_types):
+ input_value = _string_to_enum(field, input_value)
+
+ setattr(pb, field.name, input_value)
+
+ return pb
+
+
+def _string_to_enum(field, input_value):
+ enum_dict = field.enum_type.values_by_name
+ try:
+ input_value = enum_dict[input_value].number
+ except KeyError:
+ raise KeyError("`%s` is not a valid value for field `%s`" % (input_value, field.name))
+ return input_value
diff --git a/grpc_robot/tools/protop.py b/grpc_robot/tools/protop.py
new file mode 100644
index 0000000..7e53a1d
--- /dev/null
+++ b/grpc_robot/tools/protop.py
@@ -0,0 +1,203 @@
+# Copyright 2020-present Open Networking Foundation
+# Original copyright 2020-present ADTRAN, Inc.
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+import os
+import re
+import glob
+import json
+import argparse
+
+try:
+ from . import protobuf_parse as parser
+except ImportError:
+ import protobuf_parse as parser
+
+__version__ = '1.0'
+
+USAGE = """ProtoBuf -- Parser of Protocol Buffer to create the input JSON file for the library
+
+Usage: grpc_robot.protop [options] target_version
+
+ProtoBuf parser can be used to parse ProtoBuf files (*.proto) into a json formatted input file
+for the grpc_robot library to be used for keyword documentation.
+
+"""
+
+EPILOG = """
+Example
+=======
+# Executing `grpc_robot.protop` module using Python.
+$ grpc_robot.protop -i /home/user/Workspace/grpc/proto/dmi 0.9.1
+"""
+
+
+class ProtoBufParser(object):
+
+ def __init__(self, target, target_version, input_dir, output_dir=None):
+
+ super().__init__()
+
+ self.target = target
+ self.target_version = target_version.replace('.', '_')
+ self.input_dir = input_dir
+ self.output_dir = output_dir
+
+ @staticmethod
+ def read_enum(enum, protobuf_dict, module):
+ enum_dict = {'name': enum.name, 'type': 'enum', 'module': module, 'values': {ef.value: ef.name for ef in enum.body}}
+ protobuf_dict['data_types'].append(enum_dict)
+
+ def read_message(self, message, protobuf_dict, module):
+ message_dict = {'name': message.name, 'type': 'message', 'module': module, 'fields': []}
+
+ for f in message.body:
+
+ if f is None:
+ continue
+
+ if isinstance(f, parser.Enum):
+ self.read_enum(f, protobuf_dict, module)
+ continue
+
+ elif isinstance(f, parser.Message):
+ self.read_message(f, protobuf_dict, module)
+ continue
+
+ field_dict = {'name': f.name, 'is_choice': isinstance(f, parser.OneOf)}
+
+ if isinstance(f, parser.Field):
+ field_dict['repeated'] = f.repeated
+
+ try:
+ field_dict['type'] = f.type._value_
+ field_dict['lookup'] = False
+ except AttributeError:
+ field_dict['type'] = f.type
+ field_dict['lookup'] = True
+
+ elif isinstance(f, parser.OneOf):
+ field_dict['cases'] = []
+ for c in f.fields:
+ case_dict = {'name': c.name}
+ try:
+ case_dict['type'] = c.type._value_
+ case_dict['lookup'] = False
+ except AttributeError:
+ case_dict['type'] = c.type
+ case_dict['lookup'] = True
+ field_dict['cases'].append(case_dict)
+
+ message_dict['fields'].append(field_dict)
+
+ protobuf_dict['data_types'].append(message_dict)
+
+ def parse_files(self):
+
+ protobuf_dict = {
+ 'modules': [],
+ 'data_types': [],
+ 'services': []
+ }
+
+ for file_name in glob.glob(os.path.join(self.input_dir, '*.proto')):
+ print(file_name)
+
+ module = os.path.splitext(os.path.basename(file_name))[0]
+ module_dict = {'name': module, 'imports': []}
+
+ # the protobuf parser can not handle comments "// ...", so remove them first from the file
+ file_content = re.sub(r'\/\/.*', '', open(file_name).read())
+ parsed = parser.proto.parse(file_content)
+
+ # print(parsed.statements)
+
+ for p in parsed.statements:
+ # print(p)
+
+ if isinstance(p, parser.Import):
+ module_dict['imports'].append(os.path.splitext(os.path.basename(p.identifier))[0])
+
+ elif isinstance(p, parser.Enum):
+ self.read_enum(p, protobuf_dict, module)
+
+ elif isinstance(p, parser.Message):
+ self.read_message(p, protobuf_dict, module)
+
+ elif isinstance(p, parser.Service):
+ service_dict = {'name': p.name, 'module': module, 'rpcs': []}
+
+ for field in p.body:
+
+ if isinstance(field, parser.Enum):
+ self.read_enum(field, protobuf_dict, module)
+
+ elif isinstance(field, parser.Message):
+ self.read_message(field, protobuf_dict, module)
+
+ elif isinstance(field, parser.Rpc):
+ rpc_dict = {'name': field.name, 'request': {}, 'response': {}}
+
+ for attr in ['request', 'response']:
+ try:
+ rpc_dict[attr]['is_stream'] = field.__getattribute__('%s_stream' % attr)
+
+ try:
+ rpc_dict[attr]['type'] = field.__getattribute__('%s_message_type' % attr)._value_
+ rpc_dict[attr]['lookup'] = False
+ except AttributeError:
+ rpc_dict[attr]['type'] = field.__getattribute__('%s_message_type' % attr)
+ rpc_dict[attr]['lookup'] = not rpc_dict[attr]['type'].lower().startswith('google.protobuf.')
+
+ except AttributeError:
+ rpc_dict[attr] = None
+
+ service_dict['rpcs'].append(rpc_dict)
+
+ protobuf_dict['services'].append(service_dict)
+
+ protobuf_dict['modules'].append(module_dict)
+
+ if self.output_dir is not None:
+ json_file_name = os.path.join(self.output_dir, self.target, '%s_%s' % (self.target, self.target_version), '%s.json' % self.target)
+ json.dump(protobuf_dict, open(json_file_name, 'w'))
+
+ return protobuf_dict
+
+
+base_dir = os.path.dirname(os.path.realpath(__file__))
+output_base_dir = os.path.join(os.path.split(base_dir)[:-1][0], 'services')
+
+
+def main():
+ # create commandline parser
+ arg_parse = argparse.ArgumentParser(description=USAGE, epilog=EPILOG, formatter_class=argparse.RawTextHelpFormatter)
+
+ # add parser options
+ arg_parse.add_argument('target', choices=['dmi', 'voltha'],
+ help="Target type of which the ProtocolBuffer files shall be converted to the JSON file.")
+ arg_parse.add_argument('target_version', help="Version number of the ProtocolBuffer files.")
+
+ arg_parse.add_argument('-i', '--inputdir', default=os.getcwd(), help="Path to the location of the ProtocolBuffer files.")
+ arg_parse.add_argument('-o', '--outputdir', default=os.getcwd(), help="Path to the location JSON file to be stored.")
+
+ arg_parse.add_argument('-v', '--version', action='version', version=__version__)
+ arg_parse.set_defaults(feature=False)
+
+ # parse commandline
+ args = arg_parse.parse_args()
+
+ ProtoBufParser(args.target, args.target_version, args.inputdir or os.getcwd(), args.outputdir or output_base_dir).parse_files()
+
+
+if __name__ == '__main__':
+ main()
diff --git a/grpc_robot/tools/robot_tools.py b/grpc_robot/tools/robot_tools.py
new file mode 100644
index 0000000..f5b7b0c
--- /dev/null
+++ b/grpc_robot/tools/robot_tools.py
@@ -0,0 +1,116 @@
+# Copyright 2020-present Open Networking Foundation
+# Original copyright 2020-present ADTRAN, Inc.
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+from grpc_robot.grpc_robot import _package_version_get
+
+
+class Collections(object):
+ """
+ Tools for collections (list, dict) related functionality.
+ """
+
+ try:
+ ROBOT_LIBRARY_VERSION = _package_version_get('grpc_robot')
+ except NameError:
+ ROBOT_LIBRARY_VERSION = 'unknown'
+
+ @staticmethod
+ def dict_get_key_by_value(input_dict, search_value):
+ """
+ Gets the first key from _input_dict_ which has the value of _search_value_.
+
+ If _search_value_ is not found in _input_dict_, an empty string is returned.
+
+ *Parameters*:
+ - _input_dict_: <dictionary> to be browsed.
+ - _search_value_: <string>, value to be searched for.
+
+ *Return*: key of dictionary if search value is in input_dict else empty string
+ """
+ return_key = ''
+ for key, val in input_dict.items():
+ if val == search_value:
+ return_key = key
+ break
+
+ return return_key
+
+ @staticmethod
+ def dict_get_value(values_dict, key, strict=False):
+ """
+ Returns the value for given _key_ in _values_dict_.
+
+ If _strict_ is set to False (default) it will return given _key_ if its is not in the dictionary.
+ If set to True, an AssertionError is raised.
+
+ *Parameters*:
+ - _key_: <string>, key to be searched in dictionary.
+ - _values_dict_: <dictionary> in which the key is searched.
+ - _strict_: Optional: <boolean> switch to indicate if an exception shall be raised if key is not in values_dict.
+ Default: False
+
+ *Return*:
+ - if key is in values_dict: Value from _values_dict_ for _key_.
+ - else: _key_.
+ - raises AssertionError in case _key_ is not in _values_dict_ and _strict_ is True.
+ """
+ try:
+ return_value = values_dict[key]
+ except KeyError:
+ if strict:
+ raise AssertionError('Error: Value not found for key: %s' % key)
+ else:
+ return_value = key
+
+ return return_value
+
+ @staticmethod
+ def list_get_dict_by_value(input_list, key_name, value, match='first'):
+ """
+ Retrieves a dictionary from a list of dictionaries where _key_name_ has the _value, if _match_ is
+ "first". Else it returns all matching dictionaries.
+
+ *Parameters*:
+ - _input_list_: <list> ; List of dictionaries.
+ - _key_name_: <dictionary> or <list> ; Name of the key to be searched for.
+ - _value_: <string> or <number> ; Any value of key _key_name_ to be searched for.
+
+ *Example*:
+ | ${dict1} | Create Dictionary | key_key=master1 | key1=value11 | key2=value12 | |
+ | ${dict2} | Create Dictionary | key_key=master2 | key1=value21 | key2=value22 | |
+ | ${dict3} | Create Dictionary | key_key=master3 | key1=value31 | key2=value32 | |
+ | ${dict4} | Create Dictionary | key_key=master4 | key5=value41 | key6=value42 | |
+ | ${the_list} | Create List | ${dict1} | ${dict2} | ${dict3} | ${dict4} |
+ | ${result} | List Get Dict By Value | ${the_list} | key_key | master4 | |
+
+ Variable ${result} has following structure:
+ | ${result} = {
+ | 'key_key': 'master4',
+ | 'key5': 'value41',
+ | 'key6': 'value42'
+ | }
+ """
+ try:
+ if match == 'first':
+ return input_list[next(index for (index, d) in enumerate(input_list) if d[key_name] == value)]
+ else:
+ return [d for d in input_list if d[key_name] == value]
+ except (KeyError, TypeError, StopIteration):
+ raise KeyError('list does not contain a dictionary with key:value "%s:%s"' % (key_name, value))
+
+ @staticmethod
+ def to_camel_case(snake_str, first_uppercase=False):
+ components = snake_str.split('_')
+ # We capitalize the first letter of each component except the first one
+ # with the 'title' method and join them together.
+ return (components[0] if not first_uppercase else components[0].title()) + ''.join(x.title() for x in components[1:])
diff --git a/grpc_robot/tools/voltha_tools.py b/grpc_robot/tools/voltha_tools.py
new file mode 100644
index 0000000..ac18c5a
--- /dev/null
+++ b/grpc_robot/tools/voltha_tools.py
@@ -0,0 +1,122 @@
+# Copyright 2020-present Open Networking Foundation
+# Original copyright 2020-present ADTRAN, Inc.
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+from grpc_robot.grpc_robot import _package_version_get
+
+from voltha_protos import events_pb2
+from voltha_protos import tech_profile_pb2
+from grpc_robot.tools.protobuf_to_dict import protobuf_to_dict
+
+
+class VolthaTools(object):
+ """
+ Tools for the voltha, e.g decoding / conversions.
+ """
+
+ try:
+ ROBOT_LIBRARY_VERSION = _package_version_get('grpc_robot')
+ except NameError:
+ ROBOT_LIBRARY_VERSION = 'unknown'
+
+ @staticmethod
+ def _convert_string_to_bytes(string):
+ """Converts a string to a bytes object."""
+ try:
+ return bytes.fromhex(string.replace('\\x', ' '))
+ except:
+ try:
+ b = bytearray()
+ b.extend(map(ord, string))
+ return bytes(b)
+ except (TypeError, AttributeError, SystemError):
+ return string
+
+ def events_decode_event(self, bytestring, return_enum_integer='false', return_defaults='false', human_readable_timestamps='true'):
+ """
+ Converts bytes to an Event as defined in _message Event_ from events.proto
+
+ *Parameters*:
+ - bytestring: <bytes>; Byte string, e.g. as it comes from Kafka messages.
+ - return_enum_integer: <string> or <bool>; Whether or not to return the enum values as integer values rather than their labels. Default: _false_.
+ - return_defaults: <string> or <bool>; Whether or not to return the default values. Default: _false_.
+ - human_readable_timestamps: <string> or <bool>; Whether or not to convert the timestamps to human-readable format. Default: _true_.
+
+ *Return*: A dictionary with _event_ structure.
+
+ *Example*:
+ | Import Library | grpc_robot.VolthaTools | WITH NAME | voltha_tools |
+ | ${kafka_records} | kafka.Records Get |
+ | FOR | ${kafka_record} | IN | @{kafka_records} |
+ | | ${event} | voltha_tools.Events Decode Event | ${kafka_record}[message] |
+ | | Log | ${event} |
+ | END |
+ """
+ return_enum_integer = str(return_enum_integer).lower() == 'true'
+ result = events_pb2.Event.FromString(self._convert_string_to_bytes(bytestring))
+ return protobuf_to_dict(result,
+ use_enum_labels=not return_enum_integer,
+ including_default_value_fields=str(return_defaults).lower() == 'true',
+ human_readable_timestamps=str(human_readable_timestamps).lower() == 'true')
+
+ def tech_profile_decode_resource_instance(self, bytestring, return_enum_integer='false', return_defaults='false', human_readable_timestamps='true'):
+ """
+ Converts bytes to an resource instance as defined in _message ResourceInstance_ from tech_profile.proto
+
+ *Parameters*:
+ - bytestring: <bytes>; Byte string, e.g. as it comes from Kafka messages.
+ - return_enum_integer: <string> or <bool>; Whether or not to return the enum values as integer values rather than their labels. Default: _false_.
+ - return_defaults: <string> or <bool>; Whether or not to return the default values. Default: _false_.
+ - human_readable_timestamps: <string> or <bool>; Whether or not to convert the timestamps to human-readable format. Default: _true_.
+
+ *Return*: A dictionary with _event_ structure.
+
+ *Example*:
+ | Import Library | grpc_robot.VolthaTools | WITH NAME | voltha_tools |
+ | ${kafka_records} | kafka.Records Get |
+ | FOR | ${kafka_record} | IN | @{kafka_records} |
+ | | ${event} | voltha_tools. Tech Profile Decode Resource Instance | ${kafka_record}[message] |
+ | | Log | ${event} |
+ | END |
+ """
+ return_enum_integer = str(return_enum_integer).lower() == 'true'
+ result = tech_profile_pb2.ResourceInstance.FromString(self._convert_string_to_bytes(bytestring))
+ return protobuf_to_dict(result,
+ use_enum_labels=not return_enum_integer,
+ including_default_value_fields=str(return_defaults).lower() == 'true',
+ human_readable_timestamps=str(human_readable_timestamps).lower() == 'true')
+
+
+if __name__ == '__main__':
+ messages = [
+ b'\nD\n#Voltha.openolt..1626255789301080436\x10\x02 \x02*\x030.12\x06\x08\xad\xe3\xba\x87\x06:\x0c\x08\xad\xe3\xba\x87\x06\x10\xd9\xc9\xc8\x8f\x01"\xc2\x02\x11\x00\x00@k\xac;\xd8A\x1a\xb6\x02\n\x93\x01\n\x08PONStats\x11\x00\x00@k\xac;\xd8A*$65950aaf-b40f-4697-b5c3-8deb50fedd5d2-\n\x05oltid\x12$65950aaf-b40f-4697-b5c3-8deb50fedd5d2\x15\n\ndevicetype\x12\x07openolt2\x12\n\tportlabel\x12\x05pon-0\x12\x10\n\tTxPackets\x15\x00\x00\x8bC\x12\x15\n\x0eTxMcastPackets\x15\x00\x00\xa6B\x12\x15\n\x0eTxBcastPackets\x15\x00\x00\xa6B\x12\x0e\n\x07RxBytes\x15\x00\x00\x8bF\x12\x10\n\tRxPackets\x15\x00\x00\x8bC\x12\x15\n\x0eRxMcastPackets\x15\x00\x00\xa6B\x12\x15\n\x0eRxBcastPackets\x15\x00\x00\xa6B\x12\x0e\n\x07TxBytes\x15\x00\x00\x8bF',
+ b'\nD\n#Voltha.openolt..1613491472935896440\x10\x02 \x02*\x030.12\x06\x08\xad\xe3\xba\x87\x06:\x0c\x08\xad\xe3\xba\x87\x06\x10\xd9\xc9\xc8\x8f\x01"\xc2\x02\x11\x00\x00@k\xac;\xd8A\x1a\xb6\x02\n\x93\x01\n\x08PONStats\x11\x00\x00@k\xac;\xd8A*$65950aaf-b40f-4697-b5c3-8deb50fedd5d2-\n\x05oltid\x12$65950aaf-b40f-4697-b5c3-8deb50fedd5d2\x15\n\ndevicetype\x12\x07openolt2\x12\n\tportlabel\x12\x05pon-0\x12\x10\n\tTxPackets\x15\x00\x00\x8bC\x12\x15\n\x0eTxMcastPackets\x15\x00\x00\xa6B\x12\x15\n\x0eTxBcastPackets\x15\x00\x00\xa6B\x12\x0e\n\x07RxBytes\x15\x00\x00\x8bF\x12\x10\n\tRxPackets\x15\x00\x00\x8bC\x12\x15\n\x0eRxMcastPackets\x15\x00\x00\xa6B\x12\x15\n\x0eRxBcastPackets\x15\x00\x00\xa6B\x12\x0e\n\x07TxBytes\x15\x00\x00\x8bF'
+ ]
+ for message in messages:
+ print(VolthaTools().events_decode_event(message))
+
+ messages = [
+ b"\x08\x40\x12\x07\x58\x47\x53\x2d\x50\x4f\x4e\x1a\x42\x6f\x6c\x74\x2d\x7b\x39\x35\x36\x31\x37\x31\x32\x62\x2d\x35\x33\x32\x33\x2d\x34\x64\x64\x63\x2d\x38\x36\x62\x34\x2d\x64\x35\x31\x62\x62\x34\x61\x65\x30\x37\x33\x39\x7d\x2f\x70\x6f\x6e\x2d\x7b\x31\x7d\x2f\x6f\x6e\x75\x2d\x7b\x32\x7d\x2f\x75\x6e\x69\x2d\x7b\x30\x7d\x20\x81\x08\x2a\x10\x88\x08\x89\x08\x8a\x08\x8b\x08\x8c\x08\x8d\x08\x8e\x08\x8f\x08",
+ b"\x08\x40\x12\x07\x58\x47\x53\x2d\x50\x4f\x4e\x1a\x42\x6f\x6c\x74\x2d\x7b\x35\x66\x35\x39\x61\x32\x32\x63\x2d\x37\x63\x37\x65\x2d\x34\x65\x30\x63\x2d\x39\x38\x30\x65\x2d\x37\x34\x66\x31\x35\x33\x62\x33\x32\x33\x38\x31\x7d\x2f\x70\x6f\x6e\x2d\x7b\x30\x7d\x2f\x6f\x6e\x75\x2d\x7b\x31\x7d\x2f\x75\x6e\x69\x2d\x7b\x30\x7d\x20\x81\x08\x2a\x10\x88\x08\x89\x08\x8a\x08\x8b\x08\x8c\x08\x8d\x08\x8e\x08\x8f\x08",
+ b"\x08\x40\x12\x07\x58\x47\x53\x2d\x50\x4f\x4e\x1a\x42\x6f\x6c\x74\x2d\x7b\x35\x66\x35\x39\x61\x32\x32\x63\x2d\x37\x63\x37\x65\x2d\x34\x65\x30\x63\x2d\x39\x38\x30\x65\x2d\x37\x34\x66\x31\x35\x33\x62\x33\x32\x33\x38\x31\x7d\x2f\x70\x6f\x6e\x2d\x7b\x30\x7d\x2f\x6f\x6e\x75\x2d\x7b\x32\x7d\x2f\x75\x6e\x69\x2d\x7b\x30\x7d\x20\x80\x08\x2a\x10\x80\x08\x81\x08\x82\x08\x83\x08\x84\x08\x85\x08\x86\x08\x87\x08",
+ b"\x08\x40\x12\x07\x58\x47\x53\x2d\x50\x4f\x4e\x1a\x42\x6f\x6c\x74\x2d\x7b\x35\x66\x35\x39\x61\x32\x32\x63\x2d\x37\x63\x37\x65\x2d\x34\x65\x30\x63\x2d\x39\x38\x30\x65\x2d\x37\x34\x66\x31\x35\x33\x62\x33\x32\x33\x38\x31\x7d\x2f\x70\x6f\x6e\x2d\x7b\x31\x7d\x2f\x6f\x6e\x75\x2d\x7b\x31\x7d\x2f\x75\x6e\x69\x2d\x7b\x30\x7d\x20\x81\x08\x2a\x10\x88\x08\x89\x08\x8a\x08\x8b\x08\x8c\x08\x8d\x08\x8e\x08\x8f\x08",
+ b"\x08\x40\x12\x07\x58\x47\x53\x2d\x50\x4f\x4e\x1a\x42\x6f\x6c\x74\x2d\x7b\x35\x66\x35\x39\x61\x32\x32\x63\x2d\x37\x63\x37\x65\x2d\x34\x65\x30\x63\x2d\x39\x38\x30\x65\x2d\x37\x34\x66\x31\x35\x33\x62\x33\x32\x33\x38\x31\x7d\x2f\x70\x6f\x6e\x2d\x7b\x31\x7d\x2f\x6f\x6e\x75\x2d\x7b\x32\x7d\x2f\x75\x6e\x69\x2d\x7b\x30\x7d\x20\x80\x08\x2a\x10\x80\x08\x81\x08\x82\x08\x83\x08\x84\x08\x85\x08\x86\x08\x87\x08",
+ b"\x08\x40\x12\x07\x58\x47\x53\x2d\x50\x4f\x4e\x1a\x42\x6f\x6c\x74\x2d\x7b\x38\x34\x62\x35\x64\x35\x61\x39\x2d\x33\x34\x64\x66\x2d\x34\x61\x33\x37\x2d\x62\x66\x37\x64\x2d\x63\x37\x37\x61\x34\x65\x33\x34\x33\x61\x37\x64\x7d\x2f\x70\x6f\x6e\x2d\x7b\x30\x7d\x2f\x6f\x6e\x75\x2d\x7b\x31\x7d\x2f\x75\x6e\x69\x2d\x7b\x30\x7d\x20\x81\x08\x2a\x10\x88\x08\x89\x08\x8a\x08\x8b\x08\x8c\x08\x8d\x08\x8e\x08\x8f\x08",
+ b"\x08\x40\x12\x07\x58\x47\x53\x2d\x50\x4f\x4e\x1a\x42\x6f\x6c\x74\x2d\x7b\x38\x34\x62\x35\x64\x35\x61\x39\x2d\x33\x34\x64\x66\x2d\x34\x61\x33\x37\x2d\x62\x66\x37\x64\x2d\x63\x37\x37\x61\x34\x65\x33\x34\x33\x61\x37\x64\x7d\x2f\x70\x6f\x6e\x2d\x7b\x30\x7d\x2f\x6f\x6e\x75\x2d\x7b\x32\x7d\x2f\x75\x6e\x69\x2d\x7b\x30\x7d\x20\x80\x08\x2a\x10\x80\x08\x81\x08\x82\x08\x83\x08\x84\x08\x85\x08\x86\x08\x87\x08",
+ b"\x08\x40\x12\x07\x58\x47\x53\x2d\x50\x4f\x4e\x1a\x42\x6f\x6c\x74\x2d\x7b\x38\x34\x62\x35\x64\x35\x61\x39\x2d\x33\x34\x64\x66\x2d\x34\x61\x33\x37\x2d\x62\x66\x37\x64\x2d\x63\x37\x37\x61\x34\x65\x33\x34\x33\x61\x37\x64\x7d\x2f\x70\x6f\x6e\x2d\x7b\x31\x7d\x2f\x6f\x6e\x75\x2d\x7b\x31\x7d\x2f\x75\x6e\x69\x2d\x7b\x30\x7d\x20\x80\x08\x2a\x10\x80\x08\x81\x08\x82\x08\x83\x08\x84\x08\x85\x08\x86\x08\x87\x08",
+ b"\x08\x40\x12\x07\x58\x47\x53\x2d\x50\x4f\x4e\x1a\x42\x6f\x6c\x74\x2d\x7b\x38\x34\x62\x35\x64\x35\x61\x39\x2d\x33\x34\x64\x66\x2d\x34\x61\x33\x37\x2d\x62\x66\x37\x64\x2d\x63\x37\x37\x61\x34\x65\x33\x34\x33\x61\x37\x64\x7d\x2f\x70\x6f\x6e\x2d\x7b\x31\x7d\x2f\x6f\x6e\x75\x2d\x7b\x32\x7d\x2f\x75\x6e\x69\x2d\x7b\x30\x7d\x20\x81\x08\x2a\x10\x88\x08\x89\x08\x8a\x08\x8b\x08\x8c\x08\x8d\x08\x8e\x08\x8f\x08",
+ b"\x08\x40\x12\x07\x58\x47\x53\x2d\x50\x4f\x4e\x1a\x42\x6f\x6c\x74\x2d\x7b\x61\x61\x34\x36\x63\x62\x63\x61\x2d\x39\x31\x64\x37\x2d\x34\x36\x64\x65\x2d\x61\x61\x30\x65\x2d\x61\x32\x65\x33\x64\x32\x36\x61\x61\x66\x36\x32\x7d\x2f\x70\x6f\x6e\x2d\x7b\x30\x7d\x2f\x6f\x6e\x75\x2d\x7b\x31\x7d\x2f\x75\x6e\x69\x2d\x7b\x30\x7d\x20\x80\x08\x2a\x10\x80\x08\x81\x08\x82\x08\x83\x08\x84\x08\x85\x08\x86\x08\x87\x08",
+ "\x08\x40\x12\x07\x58\x47\x53\x2d\x50\x4f\x4e\x1a\x42\x6f\x6c\x74\x2d\x7b\x61\x61\x34\x36\x63\x62\x63\x61\x2d\x39\x31\x64\x37\x2d\x34\x36\x64\x65\x2d\x61\x61\x30\x65\x2d\x61\x32\x65\x33\x64\x32\x36\x61\x61\x66\x36\x32\x7d\x2f\x70\x6f\x6e\x2d\x7b\x30\x7d\x2f\x6f\x6e\x75\x2d\x7b\x31\x7d\x2f\x75\x6e\x69\x2d\x7b\x30\x7d\x20\x80\x08\x2a\x10\x80\x08\x81\x08\x82\x08\x83\x08\x84\x08\x85\x08\x86\x08\x87\x08",
+ "\\x08\\x40\\x12\\x07\\x58\\x47\\x53\\x2d\\x50\\x4f\\x4e\\x1a\\x42\\x6f\\x6c\\x74\\x2d\\x7b\\x61\\x61\\x34\\x36\\x63\\x62\\x63\\x61\\x2d\\x39\\x31\\x64\\x37\\x2d\\x34\\x36\\x64\\x65\\x2d\\x61\\x61\\x30\\x65\\x2d\\x61\\x32\\x65\\x33\\x64\\x32\\x36\\x61\\x61\\x66\\x36\\x32\\x7d\\x2f\\x70\\x6f\\x6e\\x2d\\x7b\\x30\\x7d\\x2f\\x6f\\x6e\\x75\\x2d\\x7b\\x31\\x7d\\x2f\\x75\\x6e\\x69\\x2d\\x7b\\x30\\x7d\\x20\\x80\\x08\\x2a\\x10\\x80\\x08\\x81\\x08\\x82\\x08\\x83\\x08\\x84\\x08\\x85\\x08\\x86\\x08\\x87\\x08"
+ ]
+ # for message in messages:
+ # print(VolthaTools().tech_profile_decode_resource_instance(message))
diff --git a/grpc_robot/voltha_robot.py b/grpc_robot/voltha_robot.py
new file mode 100644
index 0000000..80bce7b
--- /dev/null
+++ b/grpc_robot/voltha_robot.py
@@ -0,0 +1,44 @@
+# Copyright 2020-present Open Networking Foundation
+# Original copyright 2020-present ADTRAN, Inc.
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+import voltha_protos
+
+from robot.api.deco import keyword
+from grpc_robot.grpc_robot import GrpcRobot
+
+
+class GrpcVolthaRobot(GrpcRobot):
+ """
+ This library is intended to supported different Protocol Buffer definitions. Precondition is that python files
+ generated from Protocol Buffer files are available in a pip package which must be installed before the library
+ is used.
+
+ | Supported device | Pip package | Pip package version | Library Name |
+ | voltha | voltha-protos | 4.0.13 | grpc_robot.Voltha |
+ """
+
+ device = 'voltha'
+ package_name = 'voltha-protos'
+ installed_package = voltha_protos
+
+ def __init__(self, **kwargs):
+ super().__init__(**kwargs)
+
+ @keyword
+ def voltha_version_get(self):
+ """
+ Retrieve the version of the currently used python module _voltha-protos_.
+
+ *Return*: version string consisting of three dot-separated numbers (x.y.z)
+ """
+ return self.pb_version