blob: 23950b5991baed51ead0e4ce809f8b74db6781c7 [file] [log] [blame]
Martin Cosyns0efdc872021-09-27 16:24:30 +00001# Copyright 2020-present Open Networking Foundation
2# Original copyright 2020-present ADTRAN, Inc.
3#
4# Licensed under the Apache License, Version 2.0 (the "License");
5# you may not use this file except in compliance with the License.
6# You may obtain a copy of the License at
7#
8# http://www.apache.org/licenses/LICENSE-2.0
9#
10# Unless required by applicable law or agreed to in writing, software
11# distributed under the License is distributed on an "AS IS" BASIS,
12# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13# See the License for the specific language governing permissions and
14import dmi
15
16from robot.api.deco import keyword
17from grpc_robot.grpc_robot import GrpcRobot
18
19
20class GrpcDmiRobot(GrpcRobot):
21 """
22 This library is intended to supported different Protocol Buffer definitions. Precondition is that python files
23 generated from Protocol Buffer files are available in a pip package which must be installed before the library
24 is used.
25
26 | Supported device | Pip package | Pip package version | Library Name |
27 | dmi | device-management-interface | 0.9.1 | grpc_robot.Dmi |
28 | dmi | device-management-interface | 0.9.2 | grpc_robot.Dmi |
29 | dmi | device-management-interface | 0.9.3 | grpc_robot.Dmi |
30 | dmi | device-management-interface | 0.9.4 | grpc_robot.Dmi |
31 | dmi | device-management-interface | 0.9.5 | grpc_robot.Dmi |
32 | dmi | device-management-interface | 0.9.6 | grpc_robot.Dmi |
33 | dmi | device-management-interface | 0.9.8 | grpc_robot.Dmi |
34 | dmi | device-management-interface | 0.9.9 | grpc_robot.Dmi |
35 | dmi | device-management-interface | 0.10.1 | grpc_robot.Dmi |
36 | dmi | device-management-interface | 0.10.2 | grpc_robot.Dmi |
37 | dmi | device-management-interface | 0.12.0 | grpc_robot.Dmi |
38 | dmi | device-management-interface | 1.0.0 | grpc_robot.Dmi |
39 """
40
41 device = 'dmi'
42 package_name = 'device-management-interface'
43 installed_package = dmi
44
45 def __init__(self, **kwargs):
46 super().__init__(**kwargs)
47
48 @keyword
49 def dmi_version_get(self):
50 """
51 Retrieve the version of the currently used python module _device-management-interface_.
52
53 *Return*: version string consisting of three dot-separated numbers (x.y.z)
54 """
55 return self.pb_version