blob: cf0a1ad65d2f240b7051598d44878916858efef9 [file] [log] [blame]
Prince Pereirac1c21d62021-04-22 08:38:15 +00001/*
2 * Copyright 2020-present Open Networking Foundation
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
14 * limitations under the License.
15 */
16
17// Package contains version v1 of Device Info
18package v1
19
20import (
21 "github.com/golang/protobuf/ptypes/timestamp"
22 "github.com/opencord/device-management-interface/go/dmi"
23)
24
25type DeviceRecordV1_0 struct {
26 Uuid string `json:"uuid,omitempty"`
27 Name string `json:"name,omitempty"`
28 Make string `json:"make,omitempty"`
29 Class dmi.ComponentType `json:"class,omitempty"`
30 Parent *dmi.Component `json:"parent,omitempty"`
31 ParentRelPos int32 `json:"parent_rel_pos,omitempty"`
32 Alias string `json:"alias,omitempty"`
33 AssetId string `json:"asset_id,omitempty"`
34 Uri string `json:"uri,omitempty"`
35 HardwareRev string `json:"hardware_rev,omitempty"`
36 FirmwareRev string `json:"firmware_rev,omitempty"`
37 SoftwareRev string `json:"software_rev,omitempty"`
38 SerialNum string `json:"serial_num,omitempty"`
39 ModelName string `json:"model_name,omitempty"`
40 MfgName string `json:"mfg_name,omitempty"`
41 MfgDate *timestamp.Timestamp `json:"mfg_date,omitempty"`
42 State *dmi.ComponentState `json:"state,omitempty"`
43 Inventories map[string]string `json:"inventories,omitempty"`
44 Children []string `json:"children,omitempty"` // Children stores uuid of all direct child
45 Logging LoggingInfo `json:"logging,omitempty"`
46 LastChange *timestamp.Timestamp `json:"last_change,omitempty"`
47 LastBooted *timestamp.Timestamp `json:"last_booted,omitempty"` // Timestamp at which the hardware last booted
48}
49
50type LoggingInfo struct {
51 EndPoint string `json:"end_point,omitempty"`
52 Protocol string `json:"protocol,omitempty"`
53 LogLevel dmi.LogLevel `json:"log_level,omitempty"`
54 LoggableEntities map[string]dmi.LogLevel `json:"loggable_entities,omitempty"`
55}