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 | |
| 16 | // Package common provides constants. |
| 17 | package common |
| 18 | import ( |
| 19 | "errors" |
| 20 | ) |
| 21 | |
| 22 | //AdminState represents Status of an VLAN:ENABLE/DISABLE |
| 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 | ) |
| 29 | // DeviceState refers to the state of device |
| 30 | type DeviceState string |
| 31 | |
| 32 | // Device State constants |
| 33 | const ( |
| 34 | DeviceStateDOWN DeviceState = "DOWN" |
| 35 | DeviceStateUP DeviceState = "UP" |
| 36 | ) |
| 37 | |
| 38 | // Status represents the status of the request sent to the device manager. |
| 39 | type Status string |
| 40 | |
| 41 | //LogLevel represents the type of the OLT's LOG |
| 42 | type LogLevel int |
| 43 | |
| 44 | const ( |
| 45 | // CRITICAL represents log level type of the OLT. |
| 46 | CRITICAL LogLevel = iota |
| 47 | // ERROR represents log level type of the OLT. |
| 48 | ERROR |
| 49 | // WARNING represents log level type of the OLT. |
| 50 | WARNING |
| 51 | // INFO represents log level type of the OLT. |
| 52 | INFO |
| 53 | // DEBUG represents log level type of the OLT. |
| 54 | DEBUG |
| 55 | ) |