Naveen Sampath | 04696f7 | 2022-06-13 15:19:14 +0530 | [diff] [blame] | 1 | /* |
| 2 | * Copyright 2022-present Open Networking Foundation |
| 3 | * Licensed under the Apache License, Version 2.0 (the "License"); |
| 4 | * you may not use this file except in compliance with the License. |
| 5 | * You may obtain a copy of the License at |
| 6 | * |
| 7 | * http://www.apache.org/licenses/LICENSE-2.0 |
| 8 | * |
| 9 | * Unless required by applicable law or agreed to in writing, software |
| 10 | * distributed under the License is distributed on an "AS IS" BASIS, |
| 11 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 12 | * See the License for the specific language governing permissions and |
| 13 | * limitations under the License. |
| 14 | */ |
| 15 | |
Naveen Sampath | 04696f7 | 2022-06-13 15:19:14 +0530 | [diff] [blame] | 16 | package common |
vinokuma | 926cb3e | 2023-03-29 11:41:06 +0530 | [diff] [blame] | 17 | |
Naveen Sampath | 04696f7 | 2022-06-13 15:19:14 +0530 | [diff] [blame] | 18 | import ( |
| 19 | "errors" |
| 20 | ) |
| 21 | |
vinokuma | 926cb3e | 2023-03-29 11:41:06 +0530 | [diff] [blame] | 22 | // AdminState represents Status of an VLAN:ENABLE/DISABLE |
Naveen Sampath | 04696f7 | 2022-06-13 15:19:14 +0530 | [diff] [blame] | 23 | type AdminState string |
| 24 | |
| 25 | var ( |
| 26 | // ErrEntryNotFound is the error when the key doesn't exist in the KVStore |
| 27 | ErrEntryNotFound = errors.New("Entry not found") |
| 28 | ) |
vinokuma | 926cb3e | 2023-03-29 11:41:06 +0530 | [diff] [blame] | 29 | |
Naveen Sampath | 04696f7 | 2022-06-13 15:19:14 +0530 | [diff] [blame] | 30 | // DeviceState refers to the state of device |
| 31 | type DeviceState string |
| 32 | |
| 33 | // Device State constants |
| 34 | const ( |
| 35 | DeviceStateDOWN DeviceState = "DOWN" |
| 36 | DeviceStateUP DeviceState = "UP" |
| 37 | ) |
| 38 | |
| 39 | // Status represents the status of the request sent to the device manager. |
| 40 | type Status string |
| 41 | |
vinokuma | 926cb3e | 2023-03-29 11:41:06 +0530 | [diff] [blame] | 42 | // LogLevel represents the type of the OLT's LOG |
Naveen Sampath | 04696f7 | 2022-06-13 15:19:14 +0530 | [diff] [blame] | 43 | type LogLevel int |
| 44 | |
| 45 | const ( |
vinokuma | 926cb3e | 2023-03-29 11:41:06 +0530 | [diff] [blame] | 46 | // CRITICAL represents log level type of the OLT. |
| 47 | CRITICAL LogLevel = iota |
| 48 | // ERROR represents log level type of the OLT. |
| 49 | ERROR |
| 50 | // WARNING represents log level type of the OLT. |
| 51 | WARNING |
| 52 | // INFO represents log level type of the OLT. |
| 53 | INFO |
| 54 | // DEBUG represents log level type of the OLT. |
| 55 | DEBUG |
Naveen Sampath | 04696f7 | 2022-06-13 15:19:14 +0530 | [diff] [blame] | 56 | ) |